Showing posts from September, 2011

Accessing Library Folder in Mac OS X 10.7 (Lion)

By default you can't see your Library folder in Finder in Mac OS X 10.7, also known as Lion. Fortunately there are several ways to access it sill. My favourite is this one:Holding down the Option key will show the “Library” directory as an option in the Finders Go menu. The other nice thing about the Go menu is that after you have accessed ~/Library on multiple occasions, it will start to appear in the “Recent Folders” submenu for easy repeat access.Read more ways here.

Mac + Chrome + Facebook + Writing a Message = Crash

For the last couple of weeks, I couldn't write multi-line messages in Facebook on Google Chrome on Mac OS X. Some other web sites also had this problem. If I persisted in trying too much, then the browser tab would crash.I solved this by deleting my Google Chrome Profile. I did it as follows:1) I closed Google Chrome2) I opened Terminal, by typing Terminal into Spotlight, and opening the "Top Hit".3) In Terminal I typed the following (use copy + paste):rm -rf ~/Library/Application\ Support/Google/Chrome/
4) I pressed the enter keyIt took several seconds to complete. Once it finished, I opened Google Chrome, and it acted like it was opened for the first time. Facebook now lets me enter multi-line messages without crashing.

The McGurk Effect

It sounds like the name of a bad teen comedy. Actually it is the name of a phenomenon whereby what you see can affect what you hear.It's rather cool.

Joke of the Day

Stick through to the end. You won't regret it.

Bad JavaScript Bug and typing

Johan thinks I was unfairly bashing untyped languages in general in this post.Here's how I think JavaScript (or an alternative) language should best handle the following code:var s = '7';
var num = s * 5;The virtual machine should now know that s is of type String. The virtual machine should now halt and report an error. You shouldn't be able to multiple a String by 5. Unfortunately JavaScript automatically tries to turn the string into a number, thereby giving us 35.The following code should be necessary:var s = '7';
var num = parseInt(s)*5;I suggest this not because of one JavaScript problem. I suggest it because I've seen JavaScript continue to negatively surprise programmers for 12 years.Here's my favourite example of the mysterious workings of JavaScript:var s = '7' + 0; // s is a string containing '70'
var t = '7' - 0; // t is a  number containing 7The rumour is that Google will shortly be announcing a new language that runs i…

Ebay…addictive, anarchic, and archaic

I'm caught up in the fun of selling stuff on eBay. But really, some of the people who use it…I advertised a bookshelf with the measurements and colour listed clearly in the product title. Someone asks, "how wide is it? what colour is it? how high is it?"And the user interface…it is like the last decade of web application user interface improvements never happened!I just hit a limit on how much I could sell. AFTER I spent 15 minutes creating a detailed listing for my iMac, eBay informs me I can't sell it for another 90 days because I've sold too many things in certain restricted categories.So I'm going to have to sell my iMac the old-fashioned way. Even more old-fashioned, that is, than eBay.

He Photographs his TV Viewing

Norman Fineman has seen it all.This makes me despair. And laugh.

Bad JavaScript Bug

Here's a great StackOverflow question that demonstrates how easy it is to create bizarre bugs in JavaScript.Give me strongly-typed languages any day.

Java Newsletter

As a side-project, I started The Java Newsletter some time ago. The Java Newsletter is an email newsletter. Subscribers receive weekly tips on the Java programming language.Sign up for the Java Newsletter here.I read sometime ago that the world of blog-followers and RSS feed readers is somewhat a minority of Internet users. Most people - including developers - are best served via newsletters, directly in their email inbox. This got me thinking. Java is something I know well. There are millions of Java developers. I could write on enough Java topics to keep a weekly email list going for at least a year. It takes about an hour per week to create an article, test the code, proof-read it, and to send it. Why not give it a go?I used Wufoo to create a simple sign-up form, for free.I used MailChimp to manage the list of subscribers and to send the weekly email.Topics come from Effective Java, StackOverflow, and my head.I bought the domain for about $10 from GoDaddy.I'm…

Throbbin' 84

Throbbin '84. That was the first album I got.For my 12th birthday, to go with my brand new Walkman.

No TV. Not missing it. Yet.

I sold my television on Monday. It sat there unused except occasionally being hooked up to a computer when I had guests, in order to brutally subject them to a excruciating, long session of the best of my travel photos, going way back to 2004. Digital cameras have bequeathed us new types of suffering.It's now Friday. I don't miss the television at all. Which makes me wonder why I bothered having one for so long. A living room with a television does look somewhat empty, as if to inform visitors that I live a deprived half-life. I think I need to put a plant where the television was. My plants, however, are all unpleasant to look at, suffering from extended bouts of low-water life, in soil that probably lost all nutrients long ago.

Selling on the eBay for the first time

So…for the first time ever I tried creating an auction on eBay. I'm surprised how cumbersome the process is…and buggy. I would have thought after all these years, eBay would have an excellent process. Is this what happens in a natural monopoly?Here's what I'm selling.