Code formatters

Use a code formatter!

That’s it. That’s the whole post. If you’re writing code, you should probably assure that it’s formatted to some kind of standard. That’s what formatters do. They will style your code according to best practices so that you don’t have to worry about it.

While there are various opinions on what is best, I recommend black for Python and prettier for JavaScript, although of course there are other possibilities. Whatever language you are using will almost certainly have some options.

That is all. Thank you for your attention :)

Posted in software | Leave a comment

Mind AR

I’ve written a few times on this blog about our library’s augmented reality (AR) game, which we’ve been using during information literacy sessions. The game has been mostly successful, but we’ve had trouble with the computer vision part of it: sometimes the game identifies markers that are not actually there, and therefore shows shapes in the virtual space at the wrong times (we’ve been calling these false positives). Anyhow this was very vexing, and we had put a lot of effort into fixing it without much progress.

But this week I had a big breakthrough. I swapped in a new marker recognition library called Mind AR. It is way better than AR.js, by leaps and bounds. Here are some of the advantages I’ve seen so far:

  • No false positives.
  • It is possible to use much more detailed markers.
  • Far less CSS hackery is needed to get the games’ menus to display properly in the virtual space.
  • It is a drop-in replacement for AR.js, so our A-Frame code can remain pretty much the same.

Resolving the false-positives problem is significant because it allows us to move forward with some of our goals: we can build out quiz questions and other such dialogs, which would not have been suitable at all if they had been appearing due to false positives.

We’ve also moved the game from LibGuides to PythonAnywhere, which has opened up some additional possibilities. All in all a good week for the AR game!

Posted in ar | Leave a comment

Nighttime

There’s something to be said for coding at night. Programmers have long had a reputation for being up at all hours, working until exhaustion with the aid of caffeinated beverages. In my opinion, there’s merit to this stereotype. Really good coding requires immersive concentration, which can be hard to come by during the distracting daytime. But my phone usually goes silent by 11pm, and then the real work can get done.

Give me some ambient music in my headphones, a thermos of tea, and several uninterrupted hours of nighttime quiet, and I’ll write better quality code than I did all day.

Posted in Uncategorized | Leave a comment

Circulation

I have recently swapped some of my responsibilities with a colleague at my library. I am no longer e-resources librarian, rather, I am now head of circulation. I am excited about this. At our library, many librarians wear multiple hats, so despite these changes, I nonetheless remain the web librarian.

There are things about circulation that I am looking forward to. Specifically, it will be nice to spend more time working with people. There are 6 college assistants, 3 student workers and one full-time staff member in the circulation department. They are all lovely and I am happy to be working with them. It will be different from e-resources. E-resources is a bit lonely sometimes; you spend a lot of time by yourself, working with spreadsheets and Alma.

The circulation staff are all very competent and self-sufficient, and the previous head of circulation managed the function well, so circulation is humming along nicely, and as long as I don’t mess it up, my interventions in the near term might be minimal. If that happens, it will free me up to work more on coding projects for my department and for the central Office of Library Services. We will see how this plays out; I am currently optimistic and excited about circulation!

Posted in circulation, eresources | Leave a comment

Comments

An important part of keeping this blog sustainable has been keeping the comments only open to signed-in Commons members. I undoubtedly make some dumb posts, but I don’t need strangers telling me that. Reading the comments — especially critical comments — requires labor that I don’t have the bandwidth for, so I keep the comments mostly closed.

But this also points to a bigger issue: this blog is often (from a technical perspective) not very sophisticated. While it is largely about technology, I concede that I’m not a very accomplished technologist. What I’ve learned is that there is nonetheless an audience: I stand proudly on the side of the beginner and the non-expert who is working with technology. While I wonder what my friends who are good programmers think about my posts, I will also happily ignore the uncharitable randos who no doubt have a lot to tell me.

Posted in meta, workload | Leave a comment

Replit

Since 2016, I’ve hosted many of my Python projects on PythonAnywhere. It has been a reliable and easy platform to use, but recently I’ve been worrying about its future. While I don’t have any particular insights into the health of the PythonAnywhere organization, the technology seems to have mostly stagnated. It makes me wonder how long it will continue to exist.

Maybe I’m being too pessimistic about it, but I am being prudent and looking for alternatives. I was referred to Replit, which I have been poking at. It is a different world in terms of functionality: it’s more of an IDE than a shell (although of course you can use the shell too). It’s more expensive and more modern. Mostly I just want git and vim, so the modern accoutrements are not big selling points for me; but maybe it will be around longer than PythonAnywhere, and maybe I would eventually warm to some of the fancy features. It’s worth considering.

Posted in python, pythonanywhere, replit | Leave a comment

Moving on from ubuntu

There are a lot of reasons that I really like Ubuntu. Foremost among them is the availability of help: there are a wealth of posts on Ask Ubuntu and elsewhere that are often super useful when trying to solve almost any Ubuntu problem. It’s great. It’s especially good for someone new to Linux.

But I am not on board with Ubuntu’s new plan to have everyone sign up to Ubuntu Pro in order to receive updates. This rankles me for reasons I can’t quite articulate. Ubuntu Pro is free for personal use (under 5 machines), and then there is an enterprise tier above that. I assume that the reason for insisting that everyone register is so that they can monetize all those organizations with more than five installs.

But to me this goes against the spirit of free software. Refusing to update non-registered users is just licensing by other means. So I’m probably going to move on to another distro. I’ve posted before about how I have been enjoying running Debian on my Chromebook. I like it for different reasons than Ubuntu. My (possibly incorrect) initial impressions are that Debian is more stable and more command line-focused than Ubuntu. Which is fine; perhaps even preferable.

I have some new (to me) hardware that I’m going to install Debian on this weekend. We’ll see how it goes.

Posted in debian, linux, ubuntu | Leave a comment

Replacing libguides’ annoying “email me” buttons

I did some JavaScripting yesterday that I thought might be of interest to librarians who use LibGuides and LibAnswers. The impetus for this was that some of the librarians at my college were dissatisfied with the “Email Me” buttons that are on LibGuides’ profile pages and profile boxes.

I have to agree, the Email Me buttons are not great. They’re old-timey “mailto” links, which are notorious for often attempting to open an email client that is not actually set up. Besides wanting to avoid that obvious annoyance, we also wanted something that would add a patron’s question to a LibAnswers queue, instead of sending an email. A queue is preferable to an email because it will help prevent a question from getting lost somewhere in a librarian’s inbox, and also any librarian can claim it, hopefully improving response times.

Anyhow, it only took a little bit of JS, CSS and a widget from LibAnswers. The code is in our kingsborough-libguide repository on GitHub. I’d like to remove the jQuery from this snippet, but that may have to wait a day or two.

Posted in javascript, libguides | Leave a comment

November 476th, 2022

November came and went on Mastodon, without almost any mention in my timeline of the anniversary of the previous year’s Eternal September. It was such a non-event, I’m only getting around to posting about it now. I’m not sure why the anniversary was passed over in silence; it seems strange. Perhaps no one really wants to remember a trying time in the history of the network. I made some rather emotional posts in 2022, when stuff was hitting the fan, but like most everyone else, I’ve been silent about it since then.

Hopefully this lack of attention is because the fediverse has moved on. As best I can tell, there wasn’t a mass abandonment of the network. Most everyone that I paid attention to before is still there, but the conversation has changed a bit. We have some new problems now, and it remains to be seen how transitory they are.

Mercifully, the conversation about quote-toots has finally gone quiet again and we can now hopefully all go back to posting our usual nonsense.

Posted in mastodon | Comments closed

Following academic journals with rss

RSS is really the perfect way to follow an academic journal. Even better, it’s a really good way to follow lots of academic journals. This is particularly true because journals are generally low volume and sometimes irregularly published. They’re also something you only want to dip into when you have a free hour or two to devote to some articles.

Sure, some people claim RSS is a dead technology, but they can be ignored. Most journal sites still support RSS. I love that Taylor & Francis link their feeds directly from their journal homepages rather than hiding them; but even when feeds are hidden, a decent reader should be able to locate and follow them for you.

Keeping tabs on some feeds is a very efficient way to keep on top of the latest scholarship. If you need a reader, NewsBlur is one I’ve used for ages and which is very solid. Happy reading!

Posted in rss | Comments closed
  • Subscribe to this blog

Skip to toolbar