Convert escaped Unicode to HTML entities
I’m posting this here just because I spent far too long looking for the solution before eventually finding the answer on Stackoverflow.
The problem (in short):
Data that I want to display on a Web page contains escaped Unicode code units in it (like \u0096) that I want to convert into HTML entities (like –) so that they will show up correctly on the Web page. Read more
“Adequacy is sufficient” – but it’s never going to make you proud
Adam Osborne, creator of the luggable Osborne 1 computer, famously declared, “Adequacy is sufficient. All else is superfluous.” Walter Isaacson, in his new biography of Steve Jobs, says that Jobs found this approach “morally appalling”. Jobs, by all accounts, was an incredibly difficult person to be around a lot of the time, and you’d have needed a thick skin to endure his frequent outbursts, but I admire the fact that he allowed his intuition to tell him when something wasn’t right and he just wasn’t prepared to settle for second best. Read more
Does Facebook prove that bad usability and sparse documentation don’t matter?
I know I’m not alone in finding Facebook’s user interface so poorly designed that it can be really difficult to do anything other than the stuff most people do in there most of the time. Admittedly a fundamental aspect of good usability is that the things you do most often in a software product should be the things you can do quickest and most easily. However, the interface should not hide away the other features in such a way that you need to spend considerable time and effort to uncover them. Read more
Scan for available IP addresses
How do you connect to a device on your local network when you know a valid user name and password but the machine:
- Is not in your DNS system so you can’t get to it using a host name
- Has a static IP address that’s assigned on the machine itself - but you don’t know what the address is
The answer is trial and error … or this handy Windows command line code. Read more
Rails Chronicles – Part 2
More notes made while working through Michael Hartl’s Ruby on Rails Tutorial. In this instalment I mention: how to fix the ANSICON warning you get when running rspec, installing and running Autotest and Growl for Windows, solving the “no DRb server is running” message when running autotest, using the “thin” Web server rather than WEBrick, and preventing ssh.exe dying each time you try to connect to GitHub. Read more
How to: Get a white screen
If you take screenshots of windows with the Windows Aero theme (i.e. semi-transparent window chrome) it’s a good idea to use a plain white background to avoid the distraction of things showing through from underneath. An easy way to do this is to display a blank web page and then go to full screen mode. Here's how to do this using Javascript directly in the address bar. Read more
My first (useful) Ruby program
I just wrote a Ruby program to batch convert a load of files with names like 25_06_2011 21_30.wav to names like 2011-06-25_2130_Saturday.wav. Yeh, okay, this probably isn’t going to be any use to anyone else but me – but, who knows, you might one day need to do something similar so you might be able to reuse something from my code. Or, if you’re a Ruby coder, you might just get a laugh out of the novice errors I’ve made. Read more
Rails Chronicles – Part 1
I have a stinking cold this weekend and, apart from dragging myself out to walk the dog, I’ve been fit for nothing else but sitting on the sofa (or lying in bed) with my laptop. But I thought I’d try to use the time profitably by finally getting around to learning how to use Rails. The purpose of this and subsequent Chronicles is to record how this process goes so that I can look back in a few months and see all the things I got wrong and didn’t understand about Ruby and Rails when I started out. Read more
For more posts see the list of recent posts, or click a month in the Archives calendar at the bottom of the panel on the right.