Wednesday, 20 July 2016

Fixed a long time bug

As a programmer, I was told to never admit mistakes. It makes the entire world of computing seem vulnerable. Especially to those that don't understand the complex nuances of the task. The eclipse-chasers web site has been an on going, learn as I go, project since 1999 and contains millions of lines of code in the form of HTML, PHP, Javascript, and CSS files. When I go back and try to change something, it can be a real education as to what I did wrong and so on. Much of the code was created using reference books containing equations and so the comments all link back to those references. It can be laborious at times.

Fortunately, I am a rather good programmer and know a few tricks of the trade. For one, I use modular structures. Another is that without thinking much about it, I use Object Oriented Programming as a natural language. This makes working the code much easier and I can often correct or modify things quickly as a result.

But there has been one that has been bugging me. Several users have reported that when entering information for an annular eclipse it was logged as a total. All the input matched up with a total, but it was just not being saved correctly.

I have poured through that code carefully and could not find anything that would cause these problems. For years I searched and then, yesterday, the bug manifested itself clearly and I was able to correct it! I am pleased to report that annular eclipses should be recorded properly and not require webmaster intervention. I thought I had licked this problem last March, but I had missed a small module and now it is back in a proper way, no longer an orphaned child of a quick hack.

This has been a good week for fixing simple bugs. Just sent an update to Fred's eclipse-wise correcting a stupid omission on my behalf.

Keep adding your observations to the log and encourage others to do the same! And let me know if you find anything amiss.

No comments:

Post a Comment