Thursday, July 28, 2005

Mark it on your calendar

We're back in business baby on October 5!

http://www.cbc.ca/story/sports/national/2005/07/27/Sports/nhl_sked050727.html

In the immortal words of Wayne and Garth
Wanye> Game on.
Garth> Game on.

and so it begins.

Sunday, July 24, 2005

I think I see land

If I was born 200 years ago, I would like to have been an explorer. Relying on your instincts and brains. Knowing you are going somewhere that few (if any) have tred before. Damn.

Alas, I had the misfortune of being born in the 20th century. No new lands to discover. No new places to go.

But being born in the 20th century has its perks. Running water. Plenty of washroom facilities. And let's not forget a rather large amount of scientific knowledge.

So, instead of exploring the vast expanses of the globe, I trek into the unknown nether-regions of differential equations. Where few have gone, and even fewer understand what is going on (including me). But then, after 2 years of searching... having made right turns and wrong ones... I can see the horizon appearing. It looks like land. But maybe it's one of those ocean mirages. I've been in front of the keyboard for so long that my eyes have become irradiated. If I can keep the computer programs from mutinying for a little longer we might just make it.

to be continued...

Monday, July 11, 2005

scientific programming

It's interesting.

I spend probably more than 50% of my day programming or running programs. Yet I have next to no actual programming training. I took a couple C++ courses in my first year of college, where the most advanced concepts we touched on were stacks and function handle passing. Object Oriented Programming (OOP) was flashed in front of us the whole time we were there... but when your code is (maybe) 1000 lines, you don't actually put in the effort, nor learn the lessons, that would really help you become a better programmer.

After that first year of programming, I picked up Fortran (F77, F90, F95) and C, which was so different from the C++ I had been using, it might as well have been a new language. Then, along came Perl which scared the hell out of me... but fortunately a sound programmer who knows more than I, pointed me towards the wonder of Python.

Now I spend most days working with Matlab, which is pretty much C for those who don't want to take the time to write good programs AND those who like to have nice graphing utilities built in.

Through the course of my Master's (coming up on 2 years) I've probably written 10000+ lines of code. A respectable amount, but aside from some clever alogrithms and neat Math present in it, it sucks from a programming perspective.

  • Anything unexpected happens, it exits... no graceful exception handling here. If x is supposed to be positive, and it ain't, it goes running to mommy.
  • I use integers to represent everything. EVERYTHING! 0==Use algorithm 1, unless you are in function foo() in which case it means switch the sign of variable A. YUCK!

And the worst part? Matlab has all the tools I need to do proper programming in it. There's exception handling. There are structures (not as nice as classes, but better than integers) for handling parameter sets and the like.

So, I've decided to do two things. 1) Clean up my code so that I don't cringe 3 years from now when someone emails me to ask what x==0 means in one of my files. 2) For my PhD I will not sacrifice good code for speed. During development, that's fine. But when I actually consider how many times I've re-written everything from scratch because I didn't code things up smarter in the first place... well, let's just say I have a few more gray hairs now than I did.

Wish me luck. Hopefully I emerge with some sanity and my wrists still functioning.

surfs up

r.