Validation: black or white list

When you’re validating data – either client- or serverside – there are basically two strategies you can choose between. You can either blacklist data or white list data. Blacklisting seems to be the most popular way to validate data, but white listing is so much better. Here’s a brief description of the two strategies and why the white listing is better. The black listing strategy is validating you input against a list of characters which are illegal in the input. You can either reject input containing the blacklisted characters or just remove them from the input.

Small smart books

It’s always nice to see the Internet enable new businesses and products to exist, and the pragmatic programmers has in their latest venture – Fridays – shown a new interesting idea (which I’m sure others has done before, but not in the same quality I expect from them). Small books in PDF format only available online – fewer pages, lesser price, narrow topic – it’s sounds quite interesting.

Do Repeat Yourself

It seems most developers has listen too much to the principle of “don’t repeat yourself”, and so otherwise bright developers in some cases strive too much to avoid repeating themselves and makes a mess of their systems but avoids repetitions completely. If your developer and reads about the DRY, do also remember the important step one: Think. I’m basically all for DRY. Endless repetitions of the same lines of codes is a pretty bad idea and should be avoided.

Weather Widget

If you’re a European Mac user, and using the weather widget in Dashboard, now would be a good time to replace the Widget from AccuWeather with a BBC Weather Widget. The weather reporting and forecasts a much closer to the real world than accuweather has ever been.

From windows to mac

Generally speaking moving from Windows to OS X has been a far lesser challenge than excepted. So far I’m only missing a few applications from the Windows world and most daily tasks on the Mac has been surprisingly easy to figure out. Here are some of the challenges I’ve had most difficulty with.

The Keyboard

The keyboard layout (at least on Danish keyboards) are slightly different from the keyboards on Windows and Linux - the $ sign, the @ sign and several other keys are placed on different locations, and it certainly slows down the typing when you can’t find the keys you need.