I Think I Might Be A Code Snob

by Administrator 30. May 2008 01:42

I've noticed lately that I seem to be referring to people's code the same sort of way wine connoisseurs refer to wines.  When asked about a particular piece of code I find myself saying things like

It's overly complex with a hint of a Java underneath.

or

It's amatureish with clear VB6 connotations

or

An exciting but immature blend which hasn't had enough time to solidify.

On one hand I think it clearly explains the coding style and maturity in a way that any skilled developer would thoroughly understand.  On the other hand it makes me sound like a BS critic.

I wanted to grab some samples to clarify what I mean but It's late, I'm tired and I have a lot of work to do so your just going to have to use your imagination.

 

TTFN

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags:

Miscellaneous Whining, Moaning & Ramblings

by Administrator 27. May 2008 01:00

We printed up 20,000 raffle tickets to help with this years festival.  It's the same amount every year and has the potential to raise as much money as the rest of the festival combined.  Last year we lost money on the raffle.  The wife and I picked up responsibility for the festival late in the year and couldn't get the tickets printed and distributed before school let out.  This year we got on it early and started the process two full months before the end of the school year.  The wife and I purchased envelopes and printed up flyers explaining the importance of the raffle tickets.  We also got approval from the principal to throw a pizza party for the homeroom that sold the most tickets.  All at our own expense.  Not that it will break us or anything but I just want it to be clear that we are dedicated to the effort.  The wife and I then sat down on the floor one night and spent four hours separating 7500 tickets into groups of 25 which we then stuffed into 300 envelopes along with the afore mentioned flyer.  The wife dropped them off at the school the next morning for distribution to each of the families.  Friday was the deadline for turning in the tickets.  Five families returned a total of 125 tickets.

We still need to distribute the remaining tickets to the parish as well as sell them at the festival itself, but it is very discouraging to think that we are going to spend more on the pizza party than the entire school managed to make selling the tickets in the first place.  Which brings me to my first "What do I do now" question.  At this rate it is unlikely that we will sell enough tickets to even cover the cost of the prizes, setting us up for another loss on the raffle.  Currently we are debating on wether or not we should load our kids along with the kids from one or two other families who are equally over-extended in volunteer hours, into the car and start heading door to door hawking raffle tickets in an effort to at least make enough to cover costs.  Once again proving that the majority is supported by an over-extended minority, a pattern I'm seeing more often and in more places than I think is supportable.

On a completely different note; check out the site http://www.worldometers.info/  It has running counts of some interesting world stats. 

I'd also like to report on my ongoing battle with creating a PVR from my old laptop.  First off, my old laptop is a Sony Vaio.  It has a docking station complete with a TV turner.  It came with XP and a few third party media tools.  I was trying to decide between Vista and one of the MythTV distros.  Also of note, the DVD drive is broken (welcome to the Sanford and Son lab).  I decided to start with Vista.  Installed it and realized it wouldn't recognize my TV tuner card.  Also it dragged the system to its knees.  Add in DRM and limited support for content from the Internet (ie. RSS feeds, Hulu, etc...) and Vista turns out to be a complete waste of time.  It's pretty, but it's shit.  So on to MythBuntu, only one little problem, while the Sony has a bios setting to boot from an external device, it won't recognize an external DVD drive.  Also, it won't recognize a bootable USB pen drive.  I do have a 3.5" external floppy which it seems to be able to boot from and I can get DSL up by booting GRUB from the floppy and then installing via a USB, but can't seem to get the same thing to work for MythBuntu.  The MythBuntu boot floppy doesn't seem to recognize the USB or external DVD.  So I've now wasted hours of my time trying to install MythBuntu from pieces and parts I have laying around. 

Oh yeah, I can't recover XP on the laptop either because of something that Vista screwed with, even if I bypass the POS boot loader that Vista installs, the recovery fails with a BSOD.  I think my next step is to try and blow away the entire Vista partition and install DSL then see if I can figure out how to build a boot disk for some variety of MythTV... maybe a Knoppix distro?

That brings my count of MS Windows OSes down to one.  I have XP 64 running on one machine and Linux running all of my other machines.  Just to add to my bitch blog, the Zune software does not support XP 64, so I've now also rendered my Zune useless.  It looks like I'll have to set up a VM whose soul purpose will be to keep my Zune updated.

As always there is a lot more going on in my life but no one wants to hear me whine about it, just needed a virtual ear to bend for a few minutes.  Now that I'm done, I promise not to drone on too often about my boring life ;-}

 

TTFN

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags:

SimpleDB, BigTable, HBase

by Administrator 23. May 2008 01:19

Over the past couple of days I've spent my free brain cycles trying to wrap my head around the various implementations of persistent multidimensional sparse arrays which seem to have cropped up recently.  In particular I've been focusing in on Amazon's SimpleDB service, and I have to say that the mind shift from an RDBMS mentality has been a bit difficult.

The underlining concept is pretty straight forward and is something most low-level developers have used at one point in their life or another.  Basically it boils down to a multidimensional sparse array that can be persisted, queried and retrieved.  A rough translation of SimpleDB terms to RDBMS would be

SimpleDB RDBMS
Domain Schema
Table Table
Row Row
Column Column
Attribute Column Value(s)

While at first glance it seems like a reasonable one-to-one mapping there are some very important differences.  First of the columns for one row may not be the same as the columns for another row.  This is where the "sparse" part comes in.  If a column doesn't have an attribute then that column doesn't exist in the row.  This also allows for columns to be easily added on the fly.  The next significant difference is that an attribute can be comprised of multiple values.  Unlike an RDBMS where multiple values for a given column are stored in multiple rows, in SimpleDB a single row may have a single column with dozens of values.  Once you wrap your head around this it makes sense and you realize the value of this approach.

Where the difficulty comes in is trying to picture how this would be used in a real world application.  I have an active project I'm currently working on (active = touched in the past 30 days) which is basically Yet Another Social Network.  It's comprised of Users, Posts, Comments and Grouping information.  In an RDBMS these would loosely translate into tables which would relate to each other through a set of mapping tables.  Those tables could then be queried using the standard JOIN nomenclature to do things like retrieve the list of Comments for a Post and the Users who authored each of them.

In the SimpleDB world things work a little differently.  First off it's not a good idea to store "large" objects in the DB.  Instead it is better to store the large objects on something more akin to a file system (aka: S3).  So in this example instead of storing the actual Post or Comment in the DB, each would be stored in a separate file in an S3 bucket.  What would be stored in the DB would be the information you would want to search and information about the relationships of the various files.

With my current thinking that looks like a single domain/table that looks minimally like the following:

Post
User
Group
Comment

An example of how the data would then appear would be:

Post User Group Comment
Post1.html User1.xml Group1.txt Comment1.html, Comment2.html, Comment3.html
Post2.html User1.xml Group1.txt Comment5.html
Post3.html User2.xml Group1.txt  

In order to pull out the list of comments for a given post we have to query the data for the post and then retrieve each of the attribute values for the Comment column.  We would then retrieve the Post file and each of the subsequent Comment files as indicated by the attributes values.  Each of the comment files would contain the User which submitted the comment and the associated User files would then need to be retrieved. 

Now you're saying to yourself "This seems like a lot of work for something that could be done via a single query in an RDBMS.  What's the deal?"  Here's my take on it:

  • I may not have my head wrapped around it well enough yet and may be going about it all wrong.
  • Since the DB is distributed and the file system is distributed reliability and scalability are very high.
  • Moving the semi-static data out of the DB makes it very easy to integrate into a CDN greatly boosting delivery speed.
  • It's good to think about different solutions to a problem.

Barring extremely high demand I'm not yet convinced that this is a better solution than a few tables in a SQLServer but I'm willing to give it a try in the name of education.  Besides, you can't recommend something without trying it out first and where better to do that than a non-critical side project ;-}

 

TTFN

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags:

Messing Around

by Administrator 20. May 2008 01:11

I was reminded of an old idea today and since I had a couple of hours tonight I decided to kick the the tires on it in lieu of doing any thing that could be misconstrued as useful work. 

Today's discussion went something like "Wouldn't it be neat if you could output trace information the way a commentator calls a football game?"  I envisioned this sounding something like "Good day folks!  It's a balmy 42 here in beautiful downtown Pittsburgh Pennsylvania where we are getting ready for the opening constructor of HelloWorld.  Statics have all been declared and initialized and here goes the opening main...."  Obviously I was trying to distract myself so as not to kill our "DBA"

While something like that would be kinda fun to write, it really doesn't serve a whole lot of purpose.  Even a text-to-speech trace listener would only be moderately useful in most situations although could prove to have some reasonable value.  The thought I had some time back was geared more toward documentation.  Why in this time of YouTube and iPods are developers still putting all of their comments in plain text or worse yet markup?  Wouldn't it be nice to add multi-media comments to your source?  Maybe a picture of the whiteboard discussion that lead to a particular implementation or perhaps a short video of the process you're trying to improve.  At the very least a quick audio comment that could explain in seconds what might take several minutes to explain with text.

Since I didn't feel like fighting the CSS battles tonight I spent the last two hours investigating what it would take to implement multi-media comments into VS and much to my surprise discovered that it is really easy! 

Using VS2008 I simply created an extensibility project, found code for a simple audio recorder / player on CodePlex, did a little bit of piss poor programming and Viola!  I can record and playback audio comments. 

Now I'd like to point you at a nice zip file that you could download and install the add-in yourself but alas, it was just a proof of concept and nothing I'd unleash on anyone, but it did prove that a couple of days worth of work could yield a fairly nice new utility that could potentially ad a dimension or two to the way people develop code.

Plus it gave me something to blog about that didn't involve fantasies of cars running down sk8r boys screaming "NativeKey varchar(50) is not gay!"

 

TTFN

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags:

Jott + IWantSandy = Sexy Time

by Administrator 14. May 2008 02:48

I was planning on doing a whole thing on a couple of sites that I just discovered today through Jason Kolb's blog JasonKolb.com (which BTW if you're not reading, you should be.  This guy is very bright and has great insight).  The thing is it's after 1:00 am and I just finished stuffing 7500 raffle tickets into envelopes for the festival.  My fingers hurt and I'm tired and I just don't feel like it right now so I'm going to mail this one in.

The first of the two sites is Jott.com.  It's a free phone service that allows you to leave messages to a list of contacts you setup.  After you sign up you tell Jott your phone number.  You then call a 866 number where Jott identifies you via caller ID.  You then give it the name of the contact you which to jott a message to and a subsequent message.  The Jott service then translates your voice message to text and sends an email to that contact with the translated message.  Pretty cool.

The second site is IWantSandy.com.  This is a virtual personal assistant that keeps track of appointments, reminders, todo lists etc.. It's a nice little site that allows you to enter appointments in a natural way ie. "Remind me to meet Fred for lunch at 3 on Tuesday"  Sandy translates that text and adds an appointment to your calendar with optional reminders.  Sandy also provides the ability to export that calendar via an ICS file so you can link it to  your Google calendar.

Each of the sites is useful and pretty cool on their own, but put the two together and WOW!  So I setup Jott as a speed dial on my cell phone.  Now I press 6, tell Jott I want to Jott a message to Sandy (which I added as a contact in Jott) and then say "Remind me to meet Fred for lunch at 3 on Tuesday"  Jott translates the speech to text and emails it to Sandy who deciphers the message and adds the appointment to my Sandy calendar which is linked to my Google calendar and presto!  We just went from pretty cool to WAY COOL!

And if you're a twitter fan, just ad Twitter to your Jott contacts and voice your tweets.  Or maybe write a service to control your X10 home automation or schedule reservations at a nearby restaurant or help you count calories or purchase a book from Amazon or add a new contact for someone you've just met or.....

Anyhow, very cool.

One last note, USuxBallz is going to have a temporary home on BayWords for the time being.  It's a stop gap and it's not quite setup yet (something else I was planning on doing tonight but just don't have the energy right now).  For now there isn't a mechanism to post new ball suckers so if you have someone who deserves to be added, just send the info to USuxBallz@Gmail.com and we'll take it from there ;-}

 

TTFN

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags:

Powered by BlogEngine.NET 1.4.5.0
Theme by Mads Kristensen