Category Archives: Essay

Writing is hard

Writing is hard. Especially if you start thinking. Never stop to think about what to write (unless you must), it will ruin the flow. Never stop to correct yourself, to judge or run a spellcheck. Don’t do that; that’s what editing is for.

I’ve read the same tips again and again: Write first, edit later. The first draft is for you, the second is for everyone else (or just an editor or a confidante). Don’t interrupt the flow. If you need to look something up, place a marker in the text and look it up later.

That’s why I love to journal using pen and paper. You only have one direction: forward. Get the words down on the page in the order they appear in your head and move on with your day.

Breaking the flow has been one of my biggest issues when it comes to writing, both at school and later in life. I always ended up fiddling with the text before I got all the ideas out of my head. Looking up words, finding reference material (blog posts, news articles), checking facts. Don’t do that either. Checking facts is a part of the editing process.

In school I could spend half an hour playing with WordArt (remember WordArt?) for the title alone. The title can wait, you may want to change it anyway.

Another mistake I’ve made is installing a SEO plugin for WordPress and trying to make it happy. It has tips that make sense for readability: Use active words instead of passive. However, most of the tips are there to transform your style into something it’s not – someone else’s.

Add an image. Add a key phrase. Repeat the phase repeatedly throughout the text. Shorten your paragraphs. Add subheadings. Add more outbound links (but don’t forget internal links!).

Forget about SEO. That’s not part of the game, if it is: you’re not writing for yourself anymore. Don’t let anyone dictate your style; find your own voice. If you need pointers on style: read a book, then read some more.

Once you run out of steam; you’re most likely done. Take a break. If nothing new pops up in your head, you can start the editing process. If you thought writing was hard, wait till you start editing. Editing is hard.

Maps, activation codes and server-side validation

If you skip server-side validation, someone will eventually find out. Hi, I’m someone, and this is a story about why you should think about server-side validation.


Story time

In July 2013, I bought a new, previously owned, Volvo V60. As part of the deal, the dealership included the latest map update. So, I left the dealership with the car and a box containing not one, not two, but three DVDs. Each that would spend hours in the DVD tray while updating the maps.

Now, these DVDs were probably dime a dozen. You could buy them used on the Internet, pick them up at any Volvo dealership and I would not be surprised if they were available for download from the Internet as well. So, to prevent piracy, you had to type in an activation code when starting the upgrade progress. But wait – then everyone with an activation code could sell their DVDs and the code to the next person once they had updated their maps? Well, no. You see, the activation code only worked on your car.

Getting the activation code

The way you got your activation code was simple: you would visit a web site, type in your vehicle identification number (VIN for short) and a drop-down list would show the part number for the maps you had the right to use. I mean, you could literally type in any valid VIN for that brand and model series and see what map options they had. You could even request their activation code sent to your email address. Now that is user friendly.

So, the activation code only worked with the correct combination of map number and VIN. However, when I entered my VIN, the part number for my DVDs did not show up in the drop-down. A few others appeared, presumably already installed by the previous owner.

Apparently, the company selling the maps had not yet received the order from the dealership. This was late Friday afternoon, if I recall correctly, so contacting the dealership would have to wait … but then I thought, what if I change the options in the drop-down list? It cannot be that easy? Surly they would validate the input, check it against their database one more time before sending out an activation key?

You already know the answer; I opened developer tools and changed the product to match the one I had. I pressed submit and a few moments later, voila! You got mail!

“Dear Valued Volvo Driver, […] Here is your activation code.”

Would you look at that. It was almost too easy. So, just to confirm, I found another number on the Internet and, once again, I received an email with a new activation code.

So, here you have a service that gives you a list of choices, and they do not even check if you have selected within that range. That is just lazy.

In the end, I could have saved me the trouble; after the weekend, the part number automatically appeared in the drop-down list, and a year or so later, Volvo put the maps on the Internet for free. All you had to do was download them to a USB stick and plug it into your car. Well, you also had to upgrade your navigation system to remove the need for an activation code, for a small fee, of course.

Doing the right thing

I reported the bug to the company responsible for the map service, but I never heard back from them. Since this service no longer exists, I think it is okay to share this story. I did not break any rules, from my point of view, but I can see how this could have been abused.

To be honest, for a split second, I was thinking about sampling a few VINs, note down the map options and crossmatch them to generate a lot of activation codes, which I then could try to figure out how the code generation worked. But that would have been crossing a line.

So, the takeaway is this: Do not trust the client-side, always do server-side validation.