Misfiring Neurons Just another geek with a blog

9Dec/11Off

The lost and found art of touch typing

I remember being rather frustrated the first time I tried a mechanical typewriter. It took ages to find the right letter, then push on the key with quite a bit of effort, and get a tiny imprint on the blank page with each noisy strike.

I can't remember when I first tried typing on a computer keyboard. Doing it with any regularity started when I was about ten, and my mum brought home a borrowed work Pravetz-16 for the summer holidays. The experience was even more frustrating because now there were mountains of text I *wanted* to input (long listings of Basic programs at first) yet progress was glacial.

It is hard to imagine a time when the qwerty layout hadn't been burned into my muscle memory. Like all self-taught computer geeks, typing was a funny mixture of using two or three fingers, flying all over the keyboard. It was only much later, once my typing speed had picked up tremendously, that I realized I need to make a consciouss effort to change or risk permanent injury. Typing tutorial time well spent. I transitioned to touch typing, eliminated wrist movement almost completely, and reduced my error rate significantly.

I realized yesterday that I am back at the same point with my iPad -- sometimes using just two fingers, other times more using something closer to touch typing but only using three or maybe four fingers. And not just me, plenty of others I’ve observed have invented their own technique. It works surprisingly well considering the “keys” are projected onto a glass screen with zero tactile feedback.

So this got me thinking -- will there be a time when we look back to this early period of learning a new input method? Will the software/touch keyboards enable more innovation than the qwerty layout now that they're not baked into hardware? Or is touch typing proper going to become a rare and arcane skill, known only to a subset of computing users, akin to long haul truck driving today? Replaced by pointing, touching, voice, eye and movement tracking? Can't wait to find out.

Filed under: Technology No Comments
18Nov/11Off

Marco Arment nails tablets

In his Kindle Fire review, Marco absolutely nails what makes the iPad great:

A tablet is a tough sell. It’s too big for your pocket, so you won’t always have it available like a phone. It’s too small to have rich and precise input methods like keyboards and mice, and its power and size constraints prevent it from using advanced PC-class hardware, so it’s probably not going to replace your laptop. It’s just one more gadget to charge, encase, carry (sometimes), care for, and update. And it’s one more expenditure that can easily be cut and done without, especially in an economic depression.

“Tablets” weren’t a category that anyone needed to give a damn about until the iPad. It was a massive hit not because it managed to remove any of the problems inherent to tablets, but because it was so delightful, fun, and pleasant to use that anyone who tried their friend’s iPad for a few minutes needed to have one of their own.

Hard to explain to anyone who hasn't lived with an iPad for a little while. (I tend to think a few minutes are not enough for everyone.) Spec-obsessed hardcore PC geeks excepted, of course ;-)

Filed under: Technology No Comments
14Nov/10Off

Why some sites require the www prefix while others work just fine without it

Ever wondered why some web sites work if you type their name without the www. prefix, while others give you odd error messages and sometimes even result in the wrong page displaying? This is why.

It all starts with DNS, the Domain Name System. When you type a name in the address bar of a web browser it takes the server name and posts a query to your nearest DNS server. So for instance the URL http://example.com/somepage will result in a DNS query for example.com.

At this point, depending on how the domain was registered, the DNS will either respond with an IP address for example.com, or with a "not found" DNS reply. If there is no IP address record for the name you the browser will display a standard error page telling you that it cannot find such a site.

If the DNS responds back with an IP address, then the browser will attempt to connect and send an HTTP request to it. Here is where things tend to go wrong. HTTP supports a feature called virtual hosting where multiple web sites can be served by the same web server, using just one IP address. In order to distinguish between different sites living on the same server the browser sends an HTTP header indicating which site it wants to talk to. If the web server is not configured to correctly match up your request to a specific website hosted on it, it might return a default page (ISPs and large hosting providers tend to do that) or just serve the wrong website altogether.

If you are a webmaster and for whatever reason you wish to only have your website available when accessed using a www. prefix, you should ensure that your domain name does not have an A record. Most registrars will insert one by default when you first register a domain and so you need to remove it; only add an A record pointing to your web server against the www entry. That's it, now no one will be able to access your site without typing out the full name.

Most people will probably prefer to help their visitors out by allowing access via a shortened name as well. In order for this to work, you need to:

Make sure there is a correct A record against the base domain name

In DNS terms, this is called the @ record - the root of the specific DNS zone. So if your web server has an IP address of 192.168.0.1 the DNS zone should contain the following records:

@	A	192.168.0.1
www	A	192.168.0.1 

Make sure your virtual hosts are correctly defined

If you are using the popular Apache httpd web server you can use the ServerAlias directive to specify any number of alternative names to your site:

<VirtualHost *:80>
    ServerName www.example.com
    ServerAlias example.com w3.example.com
    ServerAdmin webmaster@example.com
    DocumentRoot /var/www/example.com
</VirtualHost>

Bonus: make sure your web server is set up to serve a default error page if it doesn't recognize the virtual host requested

What happens if someone mistakenly point a DNS name to your web server? In Apache, the first virtual host is the default one and if no server name or alias matches the request, that is what will get served. So if you are hosting multiple virtual hosts on your server, make sure the first virtual host you define points to a page containing some meaningful message stating that the site is not yet up.

Optional: rewrite the URLs to redirect visitors to your preferred domain name

If you would prefer your visitors to use one specific name for your site - e.g. for marketing reasons - you can use the following configuration to redirect those using the alternative name:

<VirtualHost *:80>
    ServerName www.example.com
    Redirect permanent / http://example.com/
</VirtualHost>
<VirtualHost *:80>
    ServerName example.com
    DocumentRoot /var/www/example.com
</VirtualHost>

In this case you should remove www.example.com from the aliases.

Bottom line: make sure that whatever DNS records you do have are also configured in your web server. And unless you have a good reason not to, you should probably add the short domain name as a valid alternative.

Filed under: Rants, Web No Comments
11Feb/10Off

Stop Buzzing me!

Google has rolled out Buzz to much discussion - reactions vary from "can't be bothered, turned it off" to "this is the new Twitbook killer". Here are some very unstructured thoughts on the subject.

Let me start with an observation on the two biggest players in this space. Twitter and Facebook are diametrically opposite in the way that their social links work - Twitter is asymmetrical where following someone has no implication for them. Befriending someone on Facebook on the other hand is a symmetrical relationship. (Facebook has tried to augment this, quite successfully, with the Pages feature.) These core properties also dictate the experience: Twitter serves up small slices of chatter and subscribers see updates fairly close in time to them being published. Facebook on the other hand personalizes your news feed and prioritizes items based on your past activity. (You can also choose to view the latest news from all your Facebook friends from a couple of iterations ago - see a pattern here?)

Buzz's major downside for me at the moment is that the popular posts tend to stay at the top, even if I'm not that interested in them. If you contrast to the above paragraph, you'll see how it fits right in the middle - you get a public conversation with the "buzzing" items floating up to the top. Google will probably tweak the post prioritization over time to get the signal-to-noise ratio lower (I would like a button to mute specific items for starters. Edit: ah, it's right there in the little triangle menu - silly me).

Jason Calacanis writes that "Facebook just lost half its value". I'm not convinced of that - for one, Facebook has iterated on their UI much more and is very good at catering to the use cases that people want from it, IMHO. Another is privacy concerns - for all the gaffes, Facebook does actually have working privacy controls. Google has a lot of catching up to do in pure features here. That is, if they even want to go there. My guess is that they'll stay out in the open like Twitter and sidestep the issue. Simple example: I would upload photos to Facebook that will never see Flickr or Google's Picasa data centres.

I also think that it's Twitter that may have lost half its value - in the 24h that I've had Buzz in my Gmail, I've seen much more potential to strike up a conversation in public on Buzz than I have on Twitter, which in turn tends to be quite impersonal until you have built something of a following. If Google provides an API with open access, Buzz could really become the centre of one's online universe. One potential killer feature (for technogeeks anyway) would be to aggregate ad-hoc social interactions such as comments on blog posts and forum posts from all over the internet. Blogger is already supported, all that's needed is push support in Disqus and vBulletin/phpBB . The challenge here will probably be minimizing noise - think Facebook app spam.

Related - Buzz from the corporate network. How many companies block access to the likes of Facebook? I'd guess quite a few, especially once you reach a certain size. Gmail on the other hand is often permanently open in a browser right next to the corporate Exchange mailbox. Short term advantage to Buzz here, but how long before the network policy declares it an enemy? Gmail is already on the borderline as it is with the embedded Google Talk feature.

I have turned Buzz off for the time being but I will keep revisiting it. I would have much preferred a standalone page which I can visit. As it stands, I find it very distracting in my Gmail. At the same time, I think that over time it will become a very useful tool. I suspect it will eat more into my Twitter usage than Facebook. And I should imagine that Buzz will really hit its stride once mobile support is rolled out.

Filed under: Web No Comments
27Aug/09Off

Developers, developers, developers

Yes, what else, I'm referring to the infamous Steve Ballmer going crazy on stage scene. Bruce Eckel recently wrote in a blog post:

He's right, developers are important. And if you only go to Microsoft conferences, it looks like all developers are using Windows. But if you go to any other developer conference, everyone is using Macs.

Which got me thinking, WTF is up with the Windows command prompt? If there's one thing developers need, it's a solid command line interface which lets them manipulate OS primitives with the minimum of fuss. So why do I find myself installing Cygwin and puttycyg on every Windows machine that I need to get some work done with? Maybe I'm just a *nix die-hard who's too stubborn to learn something new but it works great, for the most part (what's wrong is the subject of another rant altogether).

Some will probably say that PowerShell is meant to be the answer but I disagree. It may be nice for scripted rolling out of patches and performing other sysadmin-type tasks en masse but c'mon, who wants to use that as their shell? Even if you were willing to dig deeper and learn the arcane syntax, you're still stuck in the same old DOS box "terminal" that the regular cmd.exe runs in. Even trivial operations like resizing the window or copy & paste are a misson. A Google search for "Those who don't understand UNIX are condemned to reinvent it, poorly" returns a similar rant about PowerShell as one of the top results so clearly I'm not the only one frustrated by it. It all sounds very good on paper what with the pipes on steroids and .NET integration but it somehow fails to provide a shell replacement.

Are all Windows developers hopelessly stuck somewhere deep inside the Visual Studio GUI? (The ones that haven't migrated to the Mac yet, anyway?)

Filed under: Rants, Software 2 Comments
8Jul/09Off

Google Chrome OS

I had to do a double check if it's not April 1st. Why Chrome OS? And why not Android?

Firstly, this does not sound like another Linux distro. Yes, it might run on top of a Linux kernel and borrow some UI code, but you can think of this as a web browser that runs on the bare metal. What use is such a thing? (ASUS is already doing something similar by embedding a stripped down Linux in their motherboards. It boots in a couple of seconds and lets you browse the web and check your email.)

Google makes money off people using the Internet. More than that, they especially benefit from stuff that runs on open platforms - HTML and JavaScript as opposed to Flash and Silverlight. Hence the massive investment in technologies such as GWT and Gears that enable full-blown interactive applications inside a browser using widely understood open standards. The more people publishing useful stuff on the web, the more Google stands to benefit. The more users on the web, the more Google stands to benefit.

The Chrome OS could work quite well on a stripped down netbook (even lower spec than what we call a netbook today), touch-screen tablets, or minimalist desktop computers with specs along the lines of netbooks.

Given the recent popularity of netbooks, and Microsoft starting to push Windows 7 to OEMs instead of the ancient XP, maybe Google is hoping that some of them will jump ship and give Linux a second chance. What's going to be different this time? If you don't pretend it's a full-blown computer but rather a web-only "device", it's easier to sell it to people who already have several computers in their household.

The ultra low hardware requirements mean that the machine itself should be cheaper to produce too, so once again adding to the "it's a web appliance, not a computer" selling point. Lastly, this must have been fairly easy to do from a technical standpoint. It's simply repackaging a bunch of existing code into something usable so not a hugely risky project for Google.

If some Taiwanese manufacturer jumps on board and produces anything even remotely successful based on this software, it only further entrenches the Web as an application platform. And that, I think, is exactly what Google is hoping for. It's very much the same thinking as that behind Android, just aimed at a different segment of the hardware market.

UPDATE: Further reading - coverage from around the web:

Filed under: Geeky, Web 2 Comments
27Apr/09Off

Vista and file deletion

I've been running Windows Vista for about a year and a half (my desktop hasn't been reinstalled once), and find it to be great. But every once in a while I still encounter the ridiculously slow performance issue where file operations take forever - even simply browsing into a folder with Explorer. Here is an example of a folder deletion of a small source project with a bunch of Git history in it that Windows has been busy deleting for a good half an hour now:

Photobucket

A whole bunch of fixes were supposed to have been included in SP1 but it seems like some problems still remain :-(

UPDATE: it's something to do with the folder being shared - and unsharing takes extremely long, while keeping the hard drive very busy. Possibly some kind of dodgy recursive file system metadata update? Deleting from the command line with "rmdir /s" solved the problem in the end.

Filed under: Rants, Vista 1 Comment
8Apr/09Off

Annotation-based dispatch for Spring ApplicationEvents

I created a little extension that allows you to dispatch Spring application context events in a clean and type-safe way to POJO beans. Instead of implementing the ApplicationListener interface, one can simply create a handler as follows:

public class EventListener {
    @EventHandler
    public void onAppEvent(MyCustomEvent event) {
        // ...
    }
}

Related Spring forum thread.

Update on 2011/05/07.

The code was moved to Github.

Please also see the Spring Custom Annotations project on Google Code.

19Sep/08Off

Dell Ultrasharp 2408WFP Review

Dell 2408WFP

Dell 2408WFP

A couple of months back I started a quest to upgrade my aging 19" LCD. First, I bought a Samsung SyncMaster 2232GW which I'd seen a friend of mine use. This turned out to be a disappointment - I didn't care much for the glossy finish or the shiny black case, but the real deal breaker was the colour banding and, to a lesser degree, RTC artefacts. After reading lots about the different LCD panel types, I decided that I had to get a display that isn't based on TN technology. The Dell Ultrasharp 2408WFP is one of three monitors based on the same Samsung S-PVA panel (the other two being the Samsung 245T and the aging HP LP2465). Short of high-end LaCie and NEC monitors, these three together with the Apple Cinema Displays are the only high-quality enthusiast-level LCDs available in South Africa at present. The Apple Cinema Displays don't play very nicely with PCs (they don't have a built-in scaler so text mode in particular does not work) so I went ahead and ordered the Dell based on my very good experience with the Ultrasharp 1707FPs I use at work.

For the advanced PC or Mac user who values wide viewing angles and colour accuracy, this is an excellent LCD. Dell recommends this monitor for "accurate color representation" in the "home and office", and describes it as offering a "satisfying viewing experience when engaging in digital content creation, gaming and HD entertainment". Depending on where you're coming from, this could be the best monitor you've ever seen or just not good enough to make the grade. Read on for my experience with it. Ergonomics and connectivity are certainly top notch. One possible issue is the extended colour gamut - colour managed apps will display colour accurately, but some apps will have ridiculous neon colours as a result. Lightroom, Photoshop CS3, the Vista desktop (Explorer, photo viewer etc.), and Mozilla Firefox (once configured) all work correctly.

I ordered my monitor on September 4, 2008 and received the original revision, despite a firmware update being released all the way back in June already! I wouldn't ordinarily mind but the original firmware only allows the user to adjust sharpness in increments of 25. The default value of 50 is too high, causing colour halos around text. Dropping it to 25 results in a picture that is way too soft. This also tends to emphasize grain in photos and jagged lines in vector graphics. The new revision firmware should sort this out but don't assume that you'll get it - you might need to send it back to Dell for an update.

What is a more serious issue for graphics/photography users is the so-called "contrast shift" or "gamma shift" that is inherent to PVA matrices. This means that the halftones will shift in brightness when viewed off-centre. This is a major problem as you only need to move your head a few centimeters to notice it. With a panel of this size, simply moving an image from one side of the screen to the other will result in a visible change as you drag the window across. This is the reason we don't buy cheap TN panels in the first place! Except, TN panels change contrast when you move your head up and down. PVA panels change (and quite significantly) when you move left to right. This is arguably even worse, as monitors are wider than they are tall, and typically you'll stay at a constant height when sat in front of a computer.

My last problem with this monitor is hard to describe - some users report is as "DLP-like colour rainbows". I can notice it easily if there is some white text on a black background (e.g. a command shell), or a low-key black and white image on the screen, and move my eyes from one side of the screen to the other. As your eyes move across the screen, the B&W image will temporarily appear to have vivid red/green/blue colour stripes across it. This effect happens to me often enough (without specifically looking for it) to be annoying.

Now onto the positives, of which there are many. The stand is excellent - moves smoothly, yet manages to be well damped. It has a small footprint yet is very stable, and rotates nicely along the vertical axis. The portrait orientation pivot feature might come handy to some. The monitor looks like a serious piece of kit and feels very well put together. On the back, there are all the inputs one could wish for - including the new DisplayPort connector. I think it's particularly well suited for general multimedia and productivity tasks. Watching video on it is fantastic thanks to bright colours and wide viewing angles. Gaming is another strong point - I tried Crysis (using PC over DVI, scaled from 1600x1000) and Call of Duty 4 (Xbox 360 over VGA connection, scaled from 1280x800), both were stunning although I still prefer my couch + plasma TV when it comes to recreation ;)

My monitor is going back to Dell as a result of the above mentioned issues. I still believe it is a very solid choice but not the right one for me. However besides the inherent S-PVA problem of contrast shift, the remaining issues are inexcusable at this price level from a major manufacturer like Dell. Especially when a fix for at least one of them has been available for some months now. Service from Dell SA was outstanding though so I'll be more than happy to deal with them again. In the mean time, I'll be waiting for the new HP LP2475w to launch in SA. This monitor uses the latest generation H-IPS panel from LG and so has the potential to be even better than the Apple Cinema HD Display 23" and as good as the Apple iMac 24" (but without the glossy finish).

Other reviews from around the 'net: TFT Central, TrustedReviews.

17Sep/08Off

Wacom Intuos 3 Tablet on Vista Problem (with Solution)

Windows Device Manager Screenshot

Windows Device Manager Screenshot

Wacom makes the best graphics tablets there are, no question about it. Recently however I started experiencing a weird issue where the tablet work work just fine in Adobe Lightroom or Photoshop, but not outside of these programs. After trying several different driver revisions it was clear that the problem was somehow related to Windows itself and not with the tabler or drivers - switching the pen from "pen mode" to "mouse mode" would actually make it work everywhere. However this has the downside of changing the tabled pointing mode from absolute coordinates to relative - so it works more like a touchpad than a tablet; this is undesirable as it completely mostly defeats the point of having a tablet whose surface is mapped directly to the screen.

The winning answer came courtesy of Mr Benedikt Schmitt of Wacom Europe, who offered the following solution: from the Windows Device Manager, disable the "Wacom Virtual Hid Driver" device. (Go to Control Panel > System and Maintenance > Device Manager, find the driver, right-click it and choose "Disable".) One reboot later (welcome to Windows-land, circa 2008?), everything works as desired. Pressure and tilt sensitivity inside Photoshop still work, and the pen functions just fine in the rest of the Windows desktop. The absolute mapping makes it an absolute pleasure to point quickly and precisely. It makes my laser mouse feel rather clumsy navigating a large 24" screen!

Filed under: Photography, Vista No Comments