October 31, 2006
Here's an excellent bit of halloween advice from Mike Gunderloy: go read some source code you wrote five years ago for a real scare.
It's a good idea to go occasionally back to the well and get a sense of your progress as a so-called professional software developer. My goal is to suck slightly less every year. What were you writing in October, 2001?
I was writing a lot of VBScript code at that time, in the form of Windows Script Host scripts and classic ASP pages. One of the few nice things about WSH was its modern (for the time) regex support, so I first discovered the joy of regular expressionism around this time. I was also beginning to develop a healthy dislike of XML, which has matured into a lifelong ennui. Not that plain text is any better, but angle brackets aren't a silver bullet, either.
Reading through some of my five year old code, it's difficult to tell my personal WTFs apart from the WTFs inherited due to limitations in the WSH languages and Classic ASP coding environments. It's only been five years, true, but I think the clean-room elegance of the .NET framework, and the vastly improved development environment offered by Visual Studio 200x, far outstrip my meager improvements as a developer in the same time frame. Did I make mistakes? Absolutely. But when the only tools you have to choose from are
Server.CreateObject, it's hard to imagine what you could have done differently. It's like trying to choose between using an old shoe or a glass bottle to hammer nails. I'm just lucky I still have the use of both of my hands.
Perhaps, in hindsight, this is an argument in support of learning alternative development environments. In 2001, I knew I was wearing blinders-- and I also knew .NET was right around the corner. But what's around the next corner? How will I look back on today's code five years from now?
Posted by Jeff Atwood
5 years ago, I was just starting to learn VB.Net (didn't know any VB at all). I have definitely seen an improvement in my code over the years.
Of course, nothing is humbling than learning that your base code for a DB access layer that I "thought" was pretty slick, is in fact a major bottle-neck. Live and learn!
Permanent dain bramage was done to the world by C and C++. Many souls could have been saved had they used some form of Pascal, but preferably the Delphi environment. Much of what we enjoy today in the .NET world and C# is due to the Borland engineers who went to M$.
The new Turbo Delphi tools look promising, and for Win32 development, there is nothing better.
Five years ago I was still a Java developer, and right now I am a .Net developer. At that time I just joined the workforce to coding in JSP, and the project dead silently. I was writing object oriented code without knowing why I should write it in OO. But after more coding, and system needs to maintain and enhance, I found OOP is something to make the system scalable.
Five years ago, I'd not heard of any language other than QBASIC. I started learning C++ in spring 2003, and am now a C/C++/Python coder. It deeply frightens me that with only three years of coding experience, I can apparently write better software than 50% of all programmers - many of those I've worked with have never heard of design patterns, or unit testing, or anything other than slopping a bunch of files in a .zip and calling it a release.
I offer you the wisdom of Jerry Kindall ( http://www.jerrykindall.com/who.asp ):
I was such an idiot just a few short years ago. But then, it's been my experience so far that no matter how old I get, I was always an idiot a few years ago.
"Not that plain text is any better, but angle brackets aren't a silver bullet, either."
It's not about the angle brackets you crazy man. It's about *indentation* !
Hmm, it's weird but my code from 5 years ago looks pretty darn good. I was writing C++ at the time in Borland C++ Builder. Hands down the best C++ environment, even though the class library (VCL) is written in Pascal.
Back then I had the luxury of no one breathing down my neck waiting for me to finish. I was developing an application level network protocol, so it was a bit easier for me to make an argument that code will be ready when it's ready.
Now things are very deadline driven - which, when deadlines are too tight, leads to the code I'll be scared to look at five years from now.
Five years ago, I was writing vbscript for asp pages. Now, I'm writing vb.net and c# for .net 1.1 and 2.0 sites. Six years ago, I wrote a BHO, and I'd never go near doing that again. Other systems programming I did back then are far far easier in .NET than they were in VB6 (such as NT Services and event logging).
5 years ago I was building a CRM system in an Access Data Project 2000. SQL Server 7 back end. The company folded. Last year it came back to life and they are a client. So I am actually working with my 5 year old VBA code. Man what a mess I was back then.
Now I spend 50% of my time in SQL 2k and 05, 25% in VB.net 2 and the rest in VBA.
5 Years ago, I was writing Java code and VB too, but almost all this code was trying to undertand software development for mobile devices, I tried some SDK's like SuperWaba, AppFoge, J2ME, so on... finally we decide that C/C++ will be alway the best, but we still using J2ME.
5 years ago I developed VB/shell/Perl/Java tricky system. It was mostly maintenance, though VB part was totally rewritten. What excited me most of all is that the system worked. Even more, it worked as required :)
Few months later it was VB/ASP/Java/HTML/JS system. It worked not as good, but worked (and it is still used at some places. Wow...) Now it is Java/HTML/JS. It works much better than those two, used all over the world, but is somewhat boring :)
I can definitely say that I'm much better now at coding/design and even architecting. But THAT code still excites me.
That was an interesting article you linked to, about Ruby - right up until I read the comments.
Matey was simply pointing out that all of the stuff that Ruby does now, will be in .Net soon and he's a language bigot in the next post O-o
To be fair, Ruby does a lot of things that C# doesn't, that's why I'm keeping my eye on it - but C# does a lot of things that Ruby doesn't, too.
Anyway that's not really relevant here , was just too scared to post there :)
Does anyone else look at Ruby/Rails and get a screaming case of the Heebie 'Not invented here' Jeebies ?
I love that a platform can do all my data for me, I simply pop a text box here, a column there and hey presto!!!
Sorry, I don't trust it - it's snake oil.
It's even more amazing how much better your code gets when you stick with a toolset for a long time. Though you may never reach perfect enlightenment experience *is* additive. I credit reading code more than writing it though. The rapid technology churn we see in the Java and .Net worlds can only work against this though. The language ecosystem (OS, framework, DBMS, etc.) is a much more important issue than the glue (programming language) unless you're just writing the 21st Century equivalent of Cobol applications.
There's an application I did years ago that haunts me to this day. My first Asp.Net app, when I thought saving the dataset in the session would make it really fast and impress the user. It did, but now we have 4000 row datasets being saved in the session. Too much of that and the server starts to crawl then eventually die. This doesn't impress the user.
I've learned a lot since then.
I'm 35. My code was as beautiful 5 years ago as it is now. But I have not changed toolset, it's still and has always been C++ in its basic form (no obscure meta-programming stuff with templates, for example). I believe in minimalist, short, readable debuggable code, and not throwaway code (like some XP people do. :-D )
Five years ago, I used to write mainly ASP/VBScript pages beefed up by custom COM objects (namely, a semiautomated Data entry/Templating layer that worked so well that deserved a C# conversion).
Code was quite horrible indeed: I already knew about the benefits of proper OO, but the whole system, while object-based, did not allow it. So, I had to cope with it.
Nowadays I write mainly in C#: sources are mostly single-class files, with a lot of declarative programming and implementation of Command pattern: more elegant and a lot more maintenable.
Sometimes I think about my first ASP app, a mish-mash of HTML, select...case..end select and VBScript. It was, in my eyes,the worst app I ever coded, even if the customer was quite happy about it (so happy that it is still used to this day).
I started with simple Pascal coding and then i started coding in Perl, C and PHP :)
Actually i love C.
I forgot to mention Basic on those weird green screens! But that was much before 5 years ago...
Six years ago I released a href="http://s92417348.onlinehome.us/software/dataloom/index.html"Data Loom 1.1/a, C++ on Classic Mac. I've subsequently released a Windows version (C#) and have on the back burner a Java version. My coding style, language, and practices have changed some since then, but I look back on that code and I'm still pretty pleased with it.
Twenty years ago, now - that would be a college project in Fortran-IV. I've still got the greenbar printout. I would never want to work in Fortran again, but considering what I had to work with, technologically and conceptually, I'm not ashamed of that code.
I'm another C++ Builder (and sometimes Delphi) user reading your blog. It amazes me that Borland was so far ahead of the curve back then. So much of C# and .NET comes from Borland (in the form of the people who moved from Borland to Microsoft). But I'm just glad a broader audience now has access to those ways of creating programs.
As for me, I've added Java and Ruby to my list in the last five years. They are amazing especially when it comes to sharing code for Windows and Mac projects.
five years ago? heck, i'm amazed at the stuff i did 3 months ago ;)
A text game version of the Bridge Of Death scene from Monty Python And The Holy Grail in C++.
I was the coolest kid in class.
Five years ago I was writing ASP and MTS applications in Visual Basic. Yucky part: we were hitting a Microsoft Access database. Not my design, mind you. Scariest part: It was a portal application for a massive Web application. I don't know who the genius was that decided to put an entire online store in a Microsoft Access database, but...whatever.
It didn't last long.
The code was horrific. Deployment was a nightmare. I didn't stay involved in that too long. I moved into the Release Manager role and wrote a different piece of software that automated the build process. *THAT* software was far more rewarding. It drove the branch/get latest/label/pin process for Visual SourceSafe (*shudder*), build, installer creation, and notification process all at the click of a button. Not bad for something written in VB 6.0.
I think that today, that remains one of the best pieces of software I've ever written. I wish I had a copy of it.
"I love that a platform can do all my data for me, I simply pop a text box here, a column there and hey presto!!!
Sorry, I don't trust it - it's snake oil."
How is this any different from dragging a control from the toolbox in VS.NET onto your WebForm and watching the "magic" happen? Can you dig into the source code of ASP.NET and figure out how/why that magic is happening? Didn't think so.
I make my living with .NET but have been using Rails for about a year and a half. When I look at code I wrote 5 years ago, I'm struck that I could refactor it in Rails in less time, less code and more fun. FWIW, I actually did that with a classic ASP app that took 3+ months to write. It took 2 weeks in Rails (as a newbie) and it had more features than the ASP app.
Five years ago huh? Well I wasn't coding, that's for sure. I was spitting out HTML left and right, more than once, and all over the place! That's basically what happens when you don't have a clue what's going on and don't have a notion for refactoring code. Now, I use .Net to do all my coding, and I only spit out what .Net tells me I can spit out. ;)
For even more fun, get assigned to update some software you worked on a few years ago, and haven't seen since.
I've come back around to my first big .NET project, and it is very hard to resist the temptation to refactor the whole thing.
I looked at code I did five years ago in VBA and what took me about 30-40 lines and a giant array set I was able to cut down to 10 lines and a quick recordset.
I was embarrassed that someone else might see that code. But the large majority of the rest still stands strong.
Five years ago I was writing VB Applications for my employer at that time.
Even though Delphi was since 1995 my prefered tool of choice. (Bummer :( )
Guess what? I'm my own boss now, and happy coding in Delphi once again.
Things look very promissing at Borland/Devco once again :-)
to be honest, sometimes the code I wrote 6 months ago makes me scream. 3 years ago when I thought I knew asp+html (not .net) I wrote a slick report system. I just spent the last week re-writing most of it just for w3c compliance sake. OMFG! what was I thinking back then. Everyday I look back at old code an cringe, and make mental notes that this has to be re-written, soon.
thank god I work at in a department where my boss still has no clue what I do, but as long as I show results he is happy.
Five years ago I was hand-coding databases in Perl. (And yes, it was about as successful as it sounds.)
The application (CRM) that I support was using VB6 5 years ago and it still uses VB6 today. (starting to support some .NET but not until the next big release). Since it's mostly API driven the code really hasn't changed too much. But over the past 5 years, it has been more of an exploration of what can I get the app to do that it wasn't meant to do. I guess that is a must when the world keeps moving but the application/language stays the same.
Five years ago I was writing VBScript for ASP. That system still lives, but is being converted to C# on ASP.NET with much better architecture. A real data layer and business logic layer with disconnected UI.
Going back to do a bug fix on an unconverted page hurts.
Kind of related: I usualy say that if you read your 3 years code and think is ok, you should probably worry.
It means you did not evolve at all, so go read a technical book and learn something, or give up programming and do something else.
I recently visited my old employer and met some of the guys maintaining my code. I always cringe inside when this happens because I imagine that underneath their smiles, they are thinking "So this is the guy who wrote this crap."
I want to say, "Hey, I was under some tight constraints and did the best I could. I know a lot more now."
5 years ago I was a rookie writing code for Cisco's manufacturing testing platform (Autotest) in a proprietary language (Klemspeak).
in 2001, I was coding in Delphi, working as a contractor in Dallas, TX. It was a lot of fun, as the late 90s and early 00s were the heady years for Delphi. I worked at a company where they had a ping-pong and a foosball table. So, long days of coding with brief spurts of great hilarity!
The code that was written was written by many who were better than me, and I learned a lot. It was a good time to be had by all!
I decided to check a piece of code written 5 years ago. Best I could come up with was 4.5 years. It's a perl script that stores subrouties me and a co-worker wrote, into our database. It's doesn't offer a search capability (the idea was we'd search it in SQL), it doesn't grab the routines and automatically store them for you, it makes you type it all in (web page).
This catastrophe cost me weeks of my time and is a svelt 636 lines of code. One of its subs is called "idiot" and I wish I had realized then that that sub would have defined the entire concept of the project 5 years later.
Five years ago, I was a cutting-edge batch program developer using DOS "Edit". So much has come to pass since then, however, and the learning curve has been outrageous. Now that I've gotten up to speed with Notepad, the possibilities seem endless.
Fire years ago, I was doing java applet games/demos in my spare time, and that was probably at that time I had most fun coding. At that time I had my first full-time job with ASP. I made some very crappy code, but it was easy to get things done and it was easy to change things. The company had for political reasons decided to move our site to London to a Pearl/Oracle solution, and I was trying with arms and legs to stop it, but it never helped. They newer managed to pull off what we wanted, so we used WSH to http-post/get content to their system, to sort of “hack” our own administration system. Very stupid indeed, but it worked at that time. Today they run as Asp solution, just a little too late.
Actually I can and often do, There's a neat program by Lutz Roeder called Reflector that allows you to pretty much see the C# code for anything in the CLR.
So yes, in my inquisitive nature, I do like to see what's going on.
Yeah, five years ago I wrote my first large project, a sound editor. I wrote it in Delphi. The code was really HORRIBLE. No OO, very poor structure, large 3-screen window message handlers, almost pure spagetti code with one-letter var names. I can't understand by now, how I managed to make that whole thing work. But I DID!
Since than everything has changed. One year of Delphi excersising with proper code formatting, commenting, and testing
Than C with deep understanding of modular and structure paradigms
Than C++ and studying OO analisys, design coding.
Now I'm using C# generally. It's not so powerfull as C++ 'course but with VS 2005 environment coding in C# became rather convinient.
'Course not that my code is perfect now - oppositely it's awful (as well as spelling) but I'm greatly thankfull to my teachers for getting me to know that coding skill isn't all about knowing a language.
five years ago, i was in college too. no code was written.
Five years ago, I worked at Microsoft as an escalation engineer -- debugging other people's code.
Today, I'm writing a file system filter driver for Windows. Over the last couple of years, I've written .NET user controls in C#.
Working with a really good developer who spanked me every time I did something stupid made my coding improve significantly.
I still need a lot more improvement though....
Five years ago I was cleaning pots in London restaurants in London... after three years coding in C++, ASP, Java and the likes. I am sure that if I could look to the code I would scream and laugh quite a lot... Back now to hardcore Win32 C++ and C#.
I am sure my approach/toolset is way better now..
I honestly don't know how any computer professional could stumble through a career without realising the importance of regular expressions. They're quite fundamental, and have been around for a little bit longer than five years.
This is scary - millions of apps five year old apps still running and we were all horrible programmers at the time?
Five years ago I was in Gen Pop serving out the remainder of my fraud/embezzlement conviction.
Now I work at a MAJOR brokerage firm writing code...
LOL, I'm doing this now! not that I'm any kind of programmmer.....
" VBScript code at that time, in the form of Windows Script Host scripts "
I just retired the "application" I wrote five years back. It was a utility to take data from our main CRM database and massage it for use with various output formats we needed that the CRM package did not directly support.
Anyhow, it did do some things well, such as work virtually error free for 5 years once the initial bugs were worked out. And I did do a reasonably good job of separating things into distinct layers.
What I did wrong, or at least "interesting" was that it was an access application. And it pretty much ran the entire transform in VBA. I realize now that the 1200 line main transform method could have been replaced by three or so SQL queries. But such is life.
Looking back at my code from five years ago, the main question that comes to mind is: "Good freaking lord, why the *** was I ever so enamored with Hungarian notation?"
Five years ago i was an accountant. i rolled into IT by leading an ERP implementation 4 yrs ago. since 2003 i learned sql,vb6,dotnet from books and colleagues, and now i'm beginning with ASP.net so i basically started from zero. now i can do accounting and some IT. i think that's an asset. i really like programming now.
Yes looking at old code can be very scary. I remember first encountering OO and writing over complicated code using far more classes and flexibilty than was needed.
five years ago I fell into the Financial Services Industry, and have been held captive by MF programmers who think a relational database is just an alter form of VSAM I/O to COBOL code. plz save me.
5 years ago I wasn't coding like I do now but then a lot has changed since then. Five years ago the agency I worked for thought the Flash was the future and the only way to make a website look good.
5 years ago, I worked at my first job as a C++ software engineer. At this moment, I was developing a GIS application.
Five years ago?middle school.so nothing
Five years ago? I was in college,
and I thinked I should became
5 years ago I writing some simple coding in PASCAL. My Knowledge was lack about programming and algorithm. I losing my self when I can simple showing a text in the monitor. "Hello World!!". :)
Five years ago, I am a student in middle shool,
but I was studying the c++ and QBasic language.
5 years ago I was beginning in school learning Java.
Five years ago I was a decent asm programmer. Drivers, sysutils, games (to write a game in pure assembly.. isn't it cool?)....
Now I'm a decent C# programmer.
Still love assembler. For me it's the best language on earth.
5 years ago, I was in my 2nd year of college, writing some pretty simple C++ programs. Lots of data structures and basic algorithms like quicksort. My coding skills have come a long way since joining the work force, so looking at some of my 5 year old code would surely inspire blood-curdling screams.
It would be interesting the see if the comments are the same 5 years ago from now except that the language/toolset has changed.
I think the constant churn of toolsets somewhat prevents mastery of coding in general.
I was doing heavy VB/ASP development with SQL Server backend. I remember logging a bug with MS premier support which got fixed in NT Server 4.0 SP 4 or 5, can't remember which. We were working on a newsfeed application which was depositing 1000s upon 1000s of small HTML files (news feed files)to the system. Eventually the master file table got corrupted because of the sheer amount of files on the file system and NT started to do all kinds of wierd things in reporting disk space and number of files.
Our "dynamic" web site was a VB program that produced all the HTML files once a day at 2AM. It took a few hours, but the content was updated and redone. The next version was dynamic and used database queries on the meta data to build HTML reposonses dynamically (since the users couldn't wait for content changes).
Unfortunately, the system was slower than the previous "dynamic" site.
5 years ago I had just taught myself PHP and knew only basic SQL selects. At that point I was helping a friend maintain and improve a game. The code was horrible, what's worse is that it was replacing worse code.