A while after I wrote the Apixu libraries for Go and PHP, they asked me if I could help them with some issue a client had when trying to install the Python library. I quickly tested and sent them steps on how to install all requirements. And I noticed the library could use some additions.
My experience with Python was of a few lines and I felt like it would be a good context to write a few more, to understand the language a little better, to learn about its requirements, ways to set up a library and write some tests to validate JSON schemas. A clean language with a simple package manager and clear error handling. Basic integrations with Flask and Django were pretty smooth.
One thing I like about Apixu is they have multiple libraries and after freshening the Python one I was inspired to do more. And there was where to choose from.
JavaScript is an old friend but we met only in the browser some years ago. It was time to face its server side of the moon and add some touches to the NodeJS library. I’m not a huge fan of callbacks, but Promises are indeed a nice way to handle responses. Express was easy to start with, I like its micro framework feeling. The package manager, npm, doesn’t seem too far from PHP’s composer, we got along well.
Then, I have no idea why I looked at Perl. I guess it was already a language challenge, I wanted to take a few of them a bit further than Hello World. But I’m not happy with Perl, I’m not very comfortable with its syntax and for sure its error handling is not for me. There are some extra modules you can use for decent exceptions, but it didn’t feel right for me. At least Mojolicious framework is easy to set up.
Things got back on track when I decided to redesign the Ruby library, too. I didn’t have any encounters with the language before, but I quickly found out it’s very humble (in a good way), at least on simple projects. It has a clean syntax, easy to follow. Exceptions are approachable and class variables are… private. They’re private from the start, which pleasantly surprised me. It encourages good design in a way. What I spent a little bit more time on is the Ruby on Rails setup and understanding that packages not published as gems (installed directly from Github or from a local path) are to be loaded with Bundler.
I spent some great weeks using these languages and I’m happy to have understood how to set up environments for them, write JSON schema tests, use linters, write clear docs and make clear install steps and integrations with frameworks.