Wednesday, August 18, 2010

Distribution of Scrabble word scores

If you take each word in /usr/share/dict/words (OSX 10.5) that is 7 letters or fewer and can be created with the standard set of Scrabble letters, and calculate its simple value in Scrabble, then the histogram of the data looks like this.


1 | 10
2 | 52
3 | 240
4 | 753
5 | 1541
6 | 3061
7 | 4744
8 | 6220
9 | 7462
10 | 7043
11 | 6439
12 | 5276
13 | 4061
14 | 2959
15 | 2078
16 | 1713
17 | 979
18 | 714
19 | 414
20 | 255
21 | 171
22 | 90
23 | 47
24 | 32
25 | 22
26 | 5
27 | 6
28 | 3
29 | 1

The most valuable word? "jackbox".

Tuesday, August 17, 2010

Marking ALL mail in gmail as read

To mark all Google mail as read without having to page through lots of old messages

1. In the search box, type "is:unread", no quotes
2. In the dropdown that looks like a checkbox (yes, it does) select "All"
3. A link will magically appear that says "Select all conversations that match this search". When clicked, it selects all the messages that are not shown as well as the ones that are shown.
4. Finally, select "Mark All as Read" from wherever it is for you and wait a few minutes.

(via http://www.woodwardweb.com/technology/marking_all_mai.html)

It turns out that the search doesn't select messages in your Drafts folder.

~Matt

Monday, August 16, 2010

A fine and confusing error message from Java


public String myFirstMethod() {
String result = "Hello world";
return result;;
}


A straightforward piece of code that rudely produces a compile-time error "unreachable statement at line 3". "What's so unreachable about that line?" you might ask. Those experienced in the way of Java compilers simply smile and point out the double semi-colon. Accordingly to the compiler, there is an (empty) Java statement between the two semi-colons and it is never reached because the methods always returns before it reaches it.

If I had written writing that error messages, I might have made it say "double semi-colon on line 3".

Thursday, August 12, 2010

What price is a company's reputation worth? Answer: $4600

A reputation once broken may possibly be repaired, but the world will always keep their eyes on the spot where the crack was.
- Joseph Hall

I've been lucky for the last four years as a consultant to not have any major problems with getting paid. So the story of the first client to behave really badly is worth telling.

Back in January 2010 I contracted with an organisation to do $12,000 worth of consulting work for them over the next few months. After two months I sent an intermediate invoice for $9,600 for the work completed so far. Around then the organisation decided due to a strategy change that they no longer wanted the work that I was doing. So they simply went quiet on me and wouldn't acknowledge any email or phone calls. I didn't know what was going on, just got a bit annoyed at the late payment and lack of communication.

Last week I dropped by their offices to sort this out. I received a rather chilly reception and was offered $5,000 as a final payment. Fed up with the five month delay and their lack of communication, I took the offer.

So I lost $4,600, and they lost all my trust and respect. When future clients ask me about that particular organisation's products, I'll probably say "tech is ok, but terrible business practices". Would I work for the same organization again? I'm a pragmatist so probably yes, but with 50% payment or more up-front.

Companies spend thousands of dollars on trade shows and advertising then throw the resulting gains away by treating another business badly. Crazy.