I tend to write a lot of background to paint a picture why I’m doing things, so I’ll try to keep it short for to move on to the code quickly.
I have a digital music collection that was sorted by the first letter of the artist (A, B, C etc.) and then the artist and underneath that the albums. While that is good to find things, it’s not optimal for listening in my car (via USB stick). Sometimes I find myself wanting to listen to all of Melodic Death Metal on shuffle play. My car doesn’t support this like iTunes, with its internal music library, which is why I wanted to group artists and albums by genre. Since I didn’t plan to do this all manually, I opted to write some scripts in Python.
The code is available on GitHub. If you have suggestions for improvements, please comment or create a pull request. I’m not a Python pro, so I’m sure there’s some room to make it better.
As discussed in a recent blog post, I was in the market for a laptop. Several days after I had written about that topic and spent countless hours researching pros and cons, I had made the decision and went out to buy one. As the title suggests, it resulted in the most expensive product of the three options I was looking at and I’m here to write about it. This, however, is not the review as it would clearly blow up this piece. I’ll leave that for another day (I have written >1000 words already *tease*). In this blog post I’ll be explaining myself. Why I went with the MacBook Pro over the much more affordable and better equipped non-Mac laptops.
If you are a user of any form of computer and care one bit about your sanity, then you probably have a backup strategy. Otherwise, if all hell breaks loose and your whole computer burns to ash or the hard drive melts to a heap of metal, turning it into an ugly door stop, you’ll likely be kinda angry, maybe slightly pissed, your pulse most definitely at 180, that you’ve lost all your data. I’d certainly be, especially about all my pictures of all the festivals and places I’ve been to.
(And maybe some family 😅)
But, to be honest, I’ve been a bit lazy about backups for some time now. I do have copies of all my important files, but that’s not a backup. It’s a copy. A backup lets you go back in time and get an older version of a file or folder, not just the most recent one that has been synced.
So why is it, that I’m not as diligent as I should be? There are a few factors in that equation. It’s laziness for one, knowledge that I do have at least one copy, the fact that I haven’t had any data loss so far and stinginess. Why the latter? Up until now, being a Windows user (not any more though, on my main machine), I was relying on Acronis True Image, a commercial backup software. However, the version that I own – 2014, I think – stopped being reliable in one of the past Windows 10 versions. I simply don’t want to spend the money any more.
I’m not here to tell you that I have changed my mind on that. No. I’m, of course, coding my own solution. Why wouldn’t I? Everything is done multiple times in the Open Source community.
I am pondering the idea of buying a laptop and I’m having troubledeciding on the platform. Ultimately, sometime in the future, I’dlike to get rid of my stationary PC and replace it with
a laptop as the center of my data and (hobby) work and
a console for gaming.
The latter is a long term plan because I wouldalso need a better television. Right now, all my gaming is Windowsbased and therefore I’m still somewhat bound to that OS. But that’sa different topic.
I do not explicitly need a mobile computer.There’s nothing technically wrong with my PC. In fact, moving to alaptop would mean to sacrifice a lot of performance. But I really donot like to place myself in front of the desk to get something done.I don’t even play games as much any more. And that’s solelybecause it feels too much like work-work. Apart from it being apretty sleek looking PC tower instead of a notebook hooked up to twomonitors as is the case at work, the act of sitting in a chair infront of a big desk feels too much like being at work. Don’tget me wrong, I like my profession and I even like going to theoffice (again; after switching jobs). I’d even like to tinker athome some more. But, as I was saying, I don’t want it to feel likework. Sitting at the desk is also very constraining. I have to be inthis one particular spot to do some computing. In that regard I’meven more flexible at work because I could just pop out the computerfrom its docking station and go somewhere else. Why can’t I freelychoose where I want to sit with my computer when I’m at home? I amactively procrastinating as a result. I do have ideas for projects tocode and to write and it makes me sad that I do not want to pursuethem.
In my search for information about what a web.xml exactly is and does, I ran across a video series on YouTube of Dr. Jules White who created over 70 videos explaining the basics and advanced topics of creating web services for mobile applications. The videos are roughly between 5 and 15 minutes long, so they are ideal for in-between watching, without sacrificing in content. You can binge them too, of course.
What I found most pleasing is that his presentation style is very informative and professional. There are no awkward pauses or anything else that would make me cringe. It’s very pleasant to watch and there’s a lot of good information in it, even for someone that already has a background in building web applications.
I created this list of links to all the individual videos because wanted to have more structure and information than a YouTube Playlist can provide in case I want to go back and watch something particular. Additionally, there’s a little sorting and numbering bug in the YouTube Playlist 😉
Groovy Spock is a testing framework that can be used as an alternative to the venerable JUnit. In Java projects it’s probably very common (I don’t have any data, just an assumption based on how I think) to also use a Java based testing framework. The most widely known is JUnit, although not the only one of its kind (e.g. see this article on DZone). However, Java’s syntax can sometimes be rather cumbersome and verbose, and this is where a dynamic language like Groovy can help. It is often used to create nice and interesting DSLs, e.g. as the basis of the Gradle project or, as in the case of Spock, for testing.
Here’s how to integrate the Groovy Spock testing framework in a Maven based Java project.
One thing up front: I’m no fan of Groovy. I’ve worked with Grails projects for several years and using Groovy has more than once proven to be a problem. Especially in very large applications. However, I do see the benefits it can provide in certain situations and I have come to like the more expressive, although sometimes odd to read, Spock DSL in tests.
This is a short opinion piece about a very good talk I’ve been watching recently. It was presented by Kevlin Henney and is about seven ineffective coding habits of many programmers. Not only is his style very engaging and entertaining, it also contains seven informational things a coder might want to think about. While I generally agree with all of it, there’s one instance where I can see why it is done – if that’s the actual reason is a question for another day. I’m talking about appending the word Exception to classes that are exceptions.Read More »