Archive for the ‘Programming’ Category

Rover Problems related to resource consumption

Wednesday, January 28th, 2004

This article talks about the current working theory as to why the rover is crashing.

This sounds like the classic case of programmers not accounting for the “corner cases”. I have been running into this with code written by the engineers I am working with. They ignore that operator new might throw a bad_alloc, and just assume it won’t. When this happens (not if), the code flow will be unexpected, and it is likely that the application will crash. I guess it boils down to programmer lazyness.

NASA, on the other hand, doesn’t have an excuse for this sort of sloppyness. How long did it take to get the rover to Mars? According to this chart , they were launched in June of 2003. 8 months? Ok, so why weren’t they running longevity tests of the rover on Earth during this time? Sounds like a good opportunity to identify the problems before they had them!! Ok, I’m done ranting.

Recursive Locking with Multithreading

Wednesday, January 21st, 2004

I have been working with some developers who have experience primarily in the UNIX realm. We have been doing some multithreaded programming using POSIX threads. The posix mutex model allows several behaviors when it comes to a thread re-locking a mutex. One behavior (which I believe is to make the mutexes more efficient) is to block on a second access of the mutex from the same thread. This has the annoying behavior of deadlocking the thread. Another behavior is to report an error condition from the mutex locking. The third behavior is to allow “recursive” locks.

Other operating systems like Windows, and Java ( yes, Java is an OS :) ) have mutexes as well. Under these environments, the mutexes always behave as the “recursive” mutex in pthread behave.

The developers I mentioned above and I don’t agree on how the mutexes in the applications we are working on should behave. I believe they should be recursive, as this helps promote object oriented design — an object can lock a mutex when it needs to. It also promotes the use of RAII with regard to locking mutexes.

Why in the world would you not want recursive mutexes? If an object is supposed to be reentrant, it should at least be able to use its own public interface!

Spamcop being Acquired

Thursday, November 20th, 2003

InfoWorld: IronPort to acquire SpamCop: November 19, 2003: By : Security

I personally use Spamcop for my mail filtering. Without it, I would be overwhelmed by spam.

eBay Store - Creative Labs Factory Store

Wednesday, November 12th, 2003

eBay Store - Creative Labs Factory Store: Sound Blaster External, Sound Blaster Internal, MP3 Players

Might be a cheaper way of getting Creative Products?