Friday, June 12, 2009

Three Questions About Each Bug You Find

A useful technique to follow while debugging your software.

The key idea behind these questions is that every bug is a symptom of an underlying process. You have to treat the symptoms, but if all you do is treat symptoms, you'll continue to see more symptoms forever. You need to find out what process produced the bug and change the process. The underlying process that caused your bug is probably non-random and can be controlled, once you identify what happened and what caused it to happen.

Tuesday, June 9, 2009

How to Write an Equality Method in Java

Essential article on how to avoid common pitfalls and preserve the contract of equals() when writing an equality method in Java.
Class java.lang.Object defines an equals method, which subclasses may override. Unfortunately, it turns out that writing a correct equality method is surprisingly difficult in object-oriented languages. In fact, after studying a large body of Java code, the authors of a 2007 paper concluded that almost all implementations of equals methods are faulty.

Friday, June 5, 2009

The Model MHDD - Manual Hard Drive Destroyer

When you need to make sure your data is truly destroyed, use one of these.

Government specifications require that in an emergency situation a hard drive needs to be destroyed so that a person or persons can not spin the drive. This must be done quickly and reliably. The MHDD meets this requirement. It takes less than 15 seconds to destroy each hard drive. All one needs to do is to insert the proper drive height adaptor (if applicable) into the slot and crank the handle 8 rotations. The internal workings of the unit press down on the drive, bending it approximately 90 degrees. The MHDD then pushes the destroyed hard drive out for easy disposal.

Wednesday, May 27, 2009

PicPick - all-in-one screen capture utility

Feature-filled screen capture utility with a number of other useful tools.

PicPick is an all-in-one software for software developers, graphic designers and home user.

...

It features a powerful capture tool, image editor, color picker, color palette, pixel ruler, protractor, crosshair, whiteboard and etc. You can use all these tools freely.......

Wednesday, April 15, 2009

Google's Servers

Google reveals details about its servers.

Google's big surprise: each server has its own 12-volt battery to supply power if there's a problem with the main source of electricity. The company also revealed for the first time that since 2005, its data centers have been composed of standard shipping containers--each with 1,160 servers and a power consumption that can reach 250 kilowatts.

It may sound geeky, but a number of attendees--the kind of folks who run data centers packed with thousands of servers for a living--were surprised not only by Google's built-in battery approach, but by the fact that the company has kept it secret for years. Jai said in an interview that Google has been using the design since 2005 and now is in its sixth or seventh generation of design.

Friday, April 3, 2009

Excercises for Tendonitis and Carpal Tunnel

This video shows a few exercises you can do to stretch the tendons in your wrists and hands.

Link (via Lifehacker)

Tuesday, March 17, 2009

Book: Producing Open Source Software

Producing Open Source Software: How to Run a Successful Free Software Project is a book from O'Reilly about managing open source projects—but the information could be applied to pretty much any software project. You can download a free copy from the website.

Producing Open Source Software is a book about the human side of open source development. It describes how successful projects operate, the expectations of users and developers, and the culture of free software. The book is released under an open copyright: it is available in bookstores and from the publisher (O'Reilly Media), or you can browse or download it here.

Monday, February 23, 2009

DiskDigger

DiskDigger is a powerful undelete utility for Windows. It is capable of doing a deep scan and may be able to recover more files than simpler programs.

Wednesday, January 21, 2009

SendKeys under Vista

If you are maintaining a VB6 application or something similar under Vista, and the application makes use of the SendKeys call, you will likely get an exception, particularly if you are running the application within an IDE. This appears to be due to the security model in Vista.

In my case, I was able to rewrite the code to avoid the use of SendKeys. For other possible workarounds, see:

Friday, January 16, 2009

Ubuntu: invalid GPG signatures during apt-get update

If you get a message like the following while running apt-get update on Ubuntu:

W: GPG error: http://archive.ubuntu.com hardy-security Release: The following signatures were invalid: BADSIG 40976EAF437D05B5 Ubuntu Archive Automatic Signing Key 
Try deleting the files in /var/lib/apt/lists/ (but leave the 'partial' directory alone) and running apt-get update again.

Source: update gpg error? - Ubuntu Forums

Thursday, January 15, 2009

ntpd "Invalid argument" messages in log

I noticed that ntpd was generating a bunch of these messages in my logs.

Jan 14 06:05:14 starbug ntpd[5574]: sendto(xxx.xxx.xxx.xxx) (fd=22): Invalid argument
Jan 14 06:05:36 starbug ntpd[5574]: sendto(yyy.yyy.yyy.yyy) (fd=22): Invalid argument
Jan 14 06:05:40 starbug ntpd[5574]: sendto(zzz.zzz.zzz.zzz) (fd=22): Invalid argument

A quick Google search will tell you that this happens when your interface changes. In my case, my dynamic IP address from my ISP had changed. Restarting the ntpd service will correct the problem.