Know Your Nomenclature

November 25th, 2007

It’s very hard to discuss software engineering topics with respect to a given language when there’s some confusion between “function overloading” and “function overriding.”

Refactoring Could’ve Saved the Day

November 2nd, 2007
Posted in Refactoring | No Comments

I have ran into a few snags while trying to update parts of my code that depended on other peoples’ code. Other people updated the interface of their modules, and I needed to update the way my module interacted with theirs. Being slightly optimistic and feeling a bit of schedule pressure, a simple identifier substitution with an occasional update of data type seemed sufficient for the task without actually employing some refactoring techniques.

I was lucky enough to be able to tighten my development cycle. In particular, I was able to jump into testing very early in the implementation of the module. With the use of an automated test tool such as JUnit, the functionality of a module can be continually tested as the module is being developed. The automated test tool is also useful in ensuring that the expected behavior does not change while performing a refactoring such as modifying entity names within a module.

I acted to apply the changes as quickly as it was known to me that an update needed to be done. This resulted in an instance of a big bang that is often dreaded and warned of in software engineering circles. As Franklin says, “Experience keeps a dear school, but fools will learn in no other.” I have read the lessons that Fowler tries to spread in his book, Refactoring: Improving the Design of Existing Code, but I failed to appreciate how applicable his lessons are to my situation. My development cycle was very tight. I was developing a functional unit, testing it, refining it, and then repeating this cycle for other units. I deviated from this cycle, which served me well, by jumping into making multiple global changes at a time. After all changes were made, the suite of unit tests failed, and a sizable part of the day was lost to chasing faults.

I made the decision that it would probably be better to restart the day, since I usually leave my work each day in a stable and acceptable state to continue on the next day. This time, I took a breather and set up some scaffolding, as is suggested in a majority of the refactorings in Fowler’s book. After some scaffolding was set up, I compiled, tested, and continued. Now, I am able to make changes with less risk in a more controlled and well-tested manner. The scaffold allows the code to be functional, while it is being refactored, even if refactoring spans more than a day. Having unit tests available seems to be the primary factor in making this possible, because verifying consistency in a module’s behavior and detecting unintended effects without such tests is likely to be difficult.

AMZN: Amazing Delay Times!

October 30th, 2007
Posted in - blah - | No Comments

amzn60small.jpg

The order was submitted on September 10, 2007. It was previously delayed until sometime between October and November. Now, the delivery date is estimated at January 9 to January 11 of the following year! Amazon is amazing. I’m afraid that if we stick around again, they’ll just move the delivery date another quarter.

I simply want the book at the agreed price in the agreed condition that was determined at purchase. So, it looks like I’ll have to accept the delay.

The NEC ND-3620A and cdrecord

October 24th, 2007

When most hope was lost, a firmware upgrade brought results. After resolving a character set problem with cdrecord through a downgrade, I received a “0x30 Qual 0x05 (cannot write medium – incompatible format) Fru 0x0” error and thought the problem was with the DVDs that I had just purchased. The DVD burner identified itself as “DVD_RW ND-3520A ‘ Revision : ‘1.04’.” After performing the firmware update, the Revision number became 3.07. I was successful in performing a bus scan with cdrecord and doing a dummy write.

The firmware update application required a Microsoft Windows environment. Because the only machine in my possession that operates on a Microsoft Windows environment is a laptop, there was a bit of effort needed in applying the firmware update. I needed to install Microsoft Windows along with assorted drivers on a desktop machine to run NEC’s update application. A task that could have taken about ten minutes required about six hours, because vendors continue to assume that everyone uses Microsoft Windows. It would have been a lot easier, if NEC provided a self-contained bootable image that delivered the firmware update.

For what it was worth, I am glad that the following was ultimately successful:
~$ cdrecord -R -v -sao myiso.iso

Two HDs Down, and Another One on the Way

October 16th, 2007

A Seagate drive and Maxtor drive failed over the week. Now that Maxtor is Seagate, I’ll be sending both drives to the same company for replacement. I can only hope that they return drives that are remanufactured or better, before the Seagate drive that is currently knocking away in my desktop fails.