An elegant solution to a clunky problem...

I make no apologies for taking photos of code. As a self confessed geek I do find programming code can in some ways be very artistic. Not necessarily visually artistic but logically artistic when it efficiently works round a problem with seemingly minimum effort.

Have you ever listened to B.B. King play guitar? He can play a single note and give it more weight and impact than someone else ripping across a fretboard at 200bpm.

I feel the same about computer code. If you can achieve the same result with a few well thought out lines of code rather than cluttering a screen and memory up with screeds of the stuff, then coding is logically very elegant.

This particular snippet was a revelation moment for me this afternoon when I solved a problem that's been nagging me for about 3 years. I tell it a date to start from and it goes back and collects data from monthly named databases all the way up to the most recent month and collates them in one wee manageable chunk.

Comments
Sign in or get an account to comment.