Andrew Que Sites list Photos
Projects Contact
Main

March 31, 2006

RAM for Indigo-Dragon

RAM

RAM

   A few days ago I ordered RAM for the Indigo Dragon.  It has been painful lately, ever since I installed the latest service pack updates.  Since it looks like I'm going to be using this as my laptop for sometime still, I figured more RAM would be a fairly simple update to make it workable.  The Indigo Dragon now has 512 MB of RAM.

March 31, 2006

Vain spammers

   It surprises me how much effort spammers put into their craft.  DrQue.net hosts the site 'Drink'n Drano' for a friend of ours, which has a guest book.  Back in January, the guest book started getting solicitation posts.  When it happened, I thought to myself "well, they must not have known the site doesn't even get 10 visitors a day (most of which are search engines)".  Regardless, the spam was a nuisance.  I did a search on google for something like "php image number verification" and found this site.  I copied it almost line for line and in about 10 minutes, had it working.
   Then, much to my surprise, said spammer decided the revenue opportunities presented by not even 300 visitors a month site were too great to pass up.  They implemented some system to do OCR and continued their spam efforts.
   I decided to put forth a little more effort.  With a little searching, I discovered the term "CAPTCHA" which is an acronym for "completely automated public Turing test to tell computers and humans apart".  Through a good article on wikipedia, I found several PHP captcha implementation.  I selected "freeCap 1.4" because it seemed to have the most readable text, while producing output similar to captchas deemed "pretty good" by PWNtcha, a site devoted to decoding captchas with AI.
   The program dropped in place in just a few minutes.  I made a few modifications.  First, I added passing of the PHP session ID.  I try to avoid requiring people to use cookies.  Then, I added checking the IP address between the guest book page and the captcha image script.  The spammer that likes to attack the Drink'n Drano's guest book spoofs their IP address, using a different IP each request they make. 
   Since freeCap is licensed under GPL, I'm required to make public my modifications.  You can download my modified version of freecap.php source here.
   My conclusions on the matter leaves me with one question: Why all the vain effort?  Say I had given up and decided not to take additional measures with the guest book.  There is no way that the effort needed to setup the spamming of an extremely low traffic site would have ever made enough/any money to warrant such work.  Are spammers grasping at straws?  Or are they just looking to turn the entire Internet into an irritating realm of scams and misinformation?
   The kittens first walk outside of their box today.  Walking is quite awkward for them and it seems they don't have coordination between the back legs and the front.  Sometimes the kittens will use too much force on their back legs, which will throw their rear-end up and over their head.  Other times, the back legs lag behind while the front legs drag the little kitty along.  None the less, the kittens are persistent and took a look around the area of their box.

March 29, 2006

Spaghetti code

Kristy, 3/29/2006

Kristy, 3/29/2006

   I decided to do a little volunteer work for a company I use to by employed.  They had an old DOS program used to upload and download the settings of their controllers, and it doesn't work on windows systems.  Having worked at this company for 5 years, I was familiar with this software and I thought to myself "I can fix that".
   Introduces "spaghetti code".  I haven't worked for this company, or even look at the original source code to any of that company's projects since I left.  At the time I left, I thought the code was an unworkable mess.  Now, I think the code is an unworkable mess!  
   Over my 15 or so years of writing code, I adopted several standards: modeler code, stringent formating styles and excessive comment blocks to name a few.  The idea is to create source code that is easy to understand with blocks of code that have clear functions in order to streamline future modification.  Such is not the case with the code I'm working with.  It is a compiler specific, tangled mess of mystery variable names and little modularity.  To simply "rewrite" the portion that pertained to serial port communication was not trivial.  I ended up having to rework a good deal more.
   My initial change took several hours.  Having no way to test it, I sent the code to a former coworker.  As I suspected, it didn't work.  That was a few days ago.  Not being the type that is defeated by such things, I thought up a new approach.  I didn't have the hardware needed to test this program, but I did have the firmware source code in backups.  It is also a set of spaghetti code, even more hardware and compiler dependant.  But it was C++ (more or less) and most of the high-level functions were pure C code (most!).  I had once ported the code to run on a PC by re-writing the hardware specific functions.  I couldn't find that code, but I figured I could do it again.  This was a large undertaking, but I managed to make it compile and run the main loop.  After hooking the serial communications unit, I now basically had a simulator to test the original software I set out to modify.  And in a short while, it was working.  In theory, it should be fully functional with the real product.
   This exercise reinforces why I govern my own code with such strict conventions.  I've had to re-write a serial communications interface in my own code once.  Some code that originally used MS window's serial communication API had to be changed to use Linux API.  It took a couple hours and only required changes to one file.  I've also ported an entire project originally written to run on a windows system and had it running under Linux in less than an hour.
   I'm not going to say I'm an awesome coder because of this.  However, this is a case and point why you take the time to write code clean from start to finish.
   Pictured is Kristy at her work area.

1 comment has been made.

From David

March 31, 2006 at 11:07 AM

Que, I see you are still around. Could you contact me? David
Yeh-haw!

Yeh-haw!

   Our large 1.14 KV UPS battery is dead.  I noticed the red alarm light on the front of the UPS the other day.  I opened it up and to check the battery.  Disconnected, I got 13.6 volts about the same when it was connected and plugged in.  However, as soon as a load was put on the battery, the voltage dropped to around 9 volts.  Clearly, the battery is dead.
   The battery currently in the UPS is a 12 volt, 80 amp hours.  Searching around on-line, I seemed to only find one company that made such a beast and they cost around $160.  I checked up on the UPS, and it was speced to use a 12 volt, 75 amp hour battery.  These were easier to find, and the lowest price I found (including shipping) was $115.  I'll live with that.  Currently, however, there is no UPS backup on the Red-Dragon.  The smaller UPS backs up the Indigo Dragon and is still operating fine.
   Pictured are my neighbors having fun on their four-wheelers.

March 26, 2006

Sounds proofing

Yawn!

Yawn!

   In the move to the Garage and the rebuild of the box, one difference my head is now directly under my computer.  Having several computers with several fans each, my room has a significant amount of white-noise.  This is fine and actually helps me sleep my masking out other sounds.  However, being directly under my computers, I can now hear the sounds in more detail.  This kept me awake, and I started by turning off my computer every night (gasp!).  My initial thought was to isolate my computer from the wooden desk top with a layer of polystyrene (Styrofoam).  The box, entirely wood, will naturally resonate at certain frequencies and make some sounds louder.  Not being directly coupled to a noise source did help a little.
   What I noticed was a lower frequency that seemed to fade in and out over three second periods.  The polystyrene had helped mask the higher frequencies, but did nothing for the low ones.  Having read a little about noise proofing, I know you need mass to absorb the energy of sound.  So, I found some cinder blocks left over from the remodeling and placed my computer on that.  And that was exactly what I needed.
   Aunt Heather and cousin Alysia insisted there were not enough pictures of them on my website—so here they are, front and center.  Most of todays pictures are of the Watertown crew I skate with on Saturdays.  Though a process I don't fully understand, I became the adopted child of Ashley and Shane, which means Heather (Ashley's sister) is my aunt and Alysia (Heather's daughter) is my cousin. 
   Anyway, greetz to Alysia, April, Ashley, Heather, Jake (Hoagy), Kevin, Nick, Shane, Shannon and anyone I forgot!
Kristy

Kristy

   Finished building Kristy's bed setup in the living room at the Garage.  For this, I used the parts of the old bunk bed I build in the summer of 1999.  After the Garage reconstruction, the bunk beds sat outside unused.  We had converted them into a latter to get onto the roof, but they didn't work well at this function.  So, since September of 2004, the remains laid out back.  However, they were in good shape and were quickly turned into Kristy's bed.  It basically consists of an air mattress on top of a wood frame about 7 feet off the floor.  Under the frame is Kristy's work area.  It took a bit to get everything constructed, but it's functional now.
   Pictured is Kristy playing acoustic guitar in her living area.