All articles in the Computers category

Automated notifications in C++ loops

Posted February 26th, 2009 in Software. Tags: , .

As a computational physicist, I’m often running programs that consist of many nested for-loops. At the moment, my outermost loop cycles through millions of data points and various inner loops explore tens of thousands of parameters. I’m always fiddling with the settings on the inner loops in ways that cause the run time to vary between 10 seconds and 10 weeks.

Annoyingly, it’s not always easy to predict how long the program will run after each set of modifications. Also, my code occasionally has bugs which make it hang indefinitely. When a program’s expected run time is measured in weeks, it’s reassuring to see regular progress reports. Otherwise I worry that the program has silently crashed.

At first I just slapped a print statement into the outermost for-loop, encased in an if-then statement which only activated once every 1000 loops. The print statement used the time elapsed since the start of the loop and the progress made to estimate the time remaining. It looked a little like this (plus some type casting): (more…)

I’m never using RAID again

Posted November 6th, 2008 in Hardware. Tags: .

Hard drive failures have taught me to be very careful about backing up my data. Currently, I use a Redundant Array of Independent Disks (RAID) and Super Flexible File Synchronizer (SFFS) to provide two levels of data redundancy. I use RAID 1 (where two hard drives are exact copies of each other) which allows one drive to fail without shutting the system down. I don’t like the native backup utilities in Windows XP, so I bought SFFS to automatically backup my main machine’s data to a secondary computer every morning at 4AM.

This is the second PC I’ve built with a RAID 1 array. It’s also the last. (more…)


Switch to our mobile site