Rick Strahl's Weblog  

Wind, waves, code and everything in between...
.NET • C# • Markdown • WPF • All Things Web
Contact   •   Articles   •   Products   •   Support   •   Advertise
Sponsored by:
Markdown Monster - The Markdown Editor for Windows

What can you keep in your Head?


:P
On this page:

Over the weekend I've been doing some work for a long time customer of mine on a project that's very similar to an existing project we built about a year ago. It's funny how things get reused these days.brainiac

But here I am looking at a problem that I solved last year (which is not THAT long ago) and now I constantly find myself looking at the old code   to see what's salvageable and what should just be rebuild. The app is a custom data service interface that serves XML data to a legacy rich client application and I've built a number of these types of service interfaces in recent years so there are a lot of similarities and code reuse opportunities.

But what's scary is just how much I've 'lost' in the time span in between. I can't remember how the original application works, and I have to dig out my help documents and look at a few of the tests to see what's what. Did I mention it's only been a year?

But as I was plowing through the implementation today I realized just how much time I was spending - uh - 'remembering'. Or rather...what feels more like cheating by going back to the other app and see 'How the hell did I do this". It's not just architectural  decisions but even down to specific code snippets or trickyh routines that I had come up with to solve a particular problem. What was the schema I decided to use? How did we optimize the Xml generation etc.

A lot of looking things up things previously done, rather than truly pulling it out of my thick skull spur of the moment. I find myself getting more and more lazy with stuffing things away as part of other projects or work I've done in the past not even making an effort trying to remember it all. And I find myself constantly digging up old code from old projects - or code I posted on my own blog to jog my memory, rather than focusing a little harder to remember. I'm turning into a lazy bum and a packrat trying to keep stuff around for later 'reference'...

Lazy Code BuIs this what's it like 'getting old'? Is my 'experience' just getting in the way of a healthy active mind? It feels a little like getting senile - and maybe some of that is really kicking in. I'm not 40 anymore after all. Over the hill and all that.

But seriously, I was thinking about this last week as I ran into another one of those posts from some geek putting forth 20 questions to ask at a .NET interview and I found myself thinking - shit, I'd probably fail that interview. Most of the things mentioned I've dealt with before, and with a few minutes notice I can probably dig up the relevant solutions, but cut me off from my computer and my Internet connection I become a bumbling idiot that can't do very much at all.

Just yesterday I was working with a friend of mine who happened to be doing some ADO.NET code with DataSets. Now I've used data sets in the past and still do in a few older projects. I know how to retrieve them through my business layer, but please don't ask me for the 20 lines of code to use a table adapter. I haven't written that code in 5 years probably and that's even though I was using data sets in that time <g>. And that's an easy example.

Do you remember of the top of your head how to use XmlSerializer? How about XmlWriter and writing out attributes on an element? Do you write the attributes before the element or after? Off I go looking at some code I've used with XmlWriter. And right after I go and write out some control level code that outputs Html with HtmlTextWriter? How about now? Write the attributes first or after the open element tag? Can you smell the inconsistencies? (and yes it's the opposite between XmlTextWriter and HtmlTextWriter). Remember XPathNavigator's interface? It's super powerful and efficient API but don't ask me to remember any of it even though I used it a shitload on a project last year to parse OFX documents. Anything about it - I draw a blank. Off to my code cache I go... Just a month ago I worked on XML Signatures. Dug up information forever - needed it again today, and couldn't remember squat beyond the core class (SignedXml) I need to use. Oh yeah and the blog entry that I thankfully wrote about it and that could job my memory.

The thing is, I can feel myself not even trying to remember some information even when a lot of effort went into figuring something out. I actually am relying on a crutch - the electronic crutch - to bail me out. The reality is that there's so much information to absorb these days with all the different technologies I'm juggling that I think for me its the only way to cope. To actively FORGET certain things to keep some room for the things that matter or are more immediately relevant. In a way, it feels like indexing and prioritizing, so instead of keeping the information in my head I remember where I used it, applied it or wrote it up and hope I can remember where to find this reference later. Referencing over storage.

Sure I can remember core language things and the things I use day in and day out. But anything that doesn't get used for a while goes out the window. I have a vague recollection what to do but the concrete implementation escapes me. Instead I have a place holder that points me to another project, maybe a blog entry or a bookmark. And when all else fails - or when I know I haven't touched the subject before - go to the Search Engines.

So, does that count as passing the grade or am I just becoming one of those kids in the class who get caught by Miss Mumsley because I've been writing crib notes into the palm of my hand?

What about you? Are you a spry brainiac who can rattle of .NET APIs, DOM element properties, CSS style tags, RegEx selectors and expression modifiers, jQuery functions and selectors all without breaking a sweat? Or is your head too on overload all the time too using an indexing scheme rather than  permanent storage to reference the multitude of data that we all need to be dealing with?

Posted in Personal  

The Voices of Reason


 

Thomas
March 30, 2008

# re: What can you keep in your Head?

Don't worry - same here. And I am not even 30 ;-). There's a nice phrase in German: You don't have to know everything - you only have to know where to look up.

There is so much stuff which comes up to us day for day - I think it's impossible to get this completely in mind. For example, I did the client side coding (XHTML, CSS) with a lot of fun additionally to server side coding for more than 7 years before concentrating on the server code only. Now, only one year after doing so, I have problems to remember the simplest CSS browser hacks.

On the other side I think this helps us to enhance and improve our own knowledge (globally). I know people who just take old code, compile and sell it again. That's not the way I want to go - even because I want to deliver always the best quality I can, so critical considerations are necessary followed by refactoring. So I think the need to working in to old code is helpfull for this process, otherwise I maybe only would copy&paste, too.

Greetings from Old Europe ;-)

Chris
March 30, 2008

# re: What can you keep in your Head?

No worries, I imagine most of the developers out there ride this boat -- I know I do! XSLT is a big sorespot for me in that regard, no matter how often I do it, I constantly have to look it up to remember the syntax.

Rik Hemsley
March 30, 2008

# re: What can you keep in your Head?

Yep my brain works the same way, though I got an MRI scanner cheap and make a backup of my brain every night. One day I'll be able to restore...

Scott Allen
March 30, 2008

# re: What can you keep in your Head?

Hey Rick:

I read your post and I just wanted to say...

Wait.

What was the question again?

Ricky
March 30, 2008

# re: What can you keep in your Head?

You're not the only one, Rick... and it feels nice that I'm not the only one either ;-) Actually I've had the exact same thoughts as you for a while in my head - and sometimes I also have shared the same worries as you. But as I've gotten older (turning 34 soon) and more experienced, I am convinced that this is the way to work.

Thanks for an excellent blog, your work and struggles are quite similar to mine, even though I live up here in the cold (at least in the winter) Nordic region and you spend your days in a slightly warmer place.

Regards
/Ricky

Steve from Pleasant Hill
March 30, 2008

# re: What can you keep in your Head?

Didn't you know that's what's meant by "re-use"?

Yes, there are too many things. Yes, there are times when you devote yourself to a piece of it and figure it out and nail it, and you know you have and so it's OK to come back to it later because it's still a great example or technology in action.

The bigger picture is knowing which pieces of technology to wire together for a particular application, and I think at times our minds tell us, "dude, you've done this already, go look at it, spend your brain cycles on the rest of the project."

I have to confess that I put less energy these days into trying to remember things when I know I can look it up and get up to speed quickly.

Ryan Garaygay
March 30, 2008

# re: What can you keep in your Head?

Good thing, comments in code are possible and there's a concept of documentation. Otherwise no matter how I'll try my best to not create spaghetti code, I'd still get lost in my own code written just months (and maybe) days ago. And I'm in my 20's :) So you're definitely not alone.

Ohh and I think blogging actually helps you remember as you're re-describing what you previously did (sort of going through the solution one more time). But would only work if and only if you still try to remember. So keep blogging! :D

Steven Smith
March 30, 2008

# re: What can you keep in your Head?

Hey Rick, your post spawned a pretty lengthy response on my blog:
http://aspadvice.com/blogs/ssmith/archive/2008/03/30/Two-Kinds-of-Knowledge.aspx

:)

Richard Norris
March 30, 2008

# re: What can you keep in your Head?

Rick, you've just pointed out some of the biggest problems with modern day software development. There is just too much technology these days and you cannot get away without using most of it at some time. You need to keep up pace just to stay in the game but I think you do it very well. I think the key is knowing where to get the info, its the biggest problem I have, you're message board is a key resource for me as I know someone wll remember something for me <g>

You have so much choice now when programming, what the hell technology and technique should I use? The thing I learned last month is out of date next month, its a never ending rollercoaster! I was talking to someone the other day about some of the latest stuff MS thats baking in the oven. I was thinking two things at the time, WOW thats cool and OMG not another tool/technology to get my head round!!!

The fact is companies like MS are starting to realise that there is just too much technology. They also realise that despite that its all needed and has its uses. If you look at what they are doing with .NET now, it looks like they are trying to take that "having to remember 200 things" away from developers. We have too many tools, too many languages, too many different programming styles to cope with; at this rate I'll burn out before I'm 30!

Anyhow, I respect your honesty, with the knowledge you share online with us guys I was beginning to think you were a computer!! I'm glad theres a human being on the other side <bg>. I cannot thank you enough for the tools you've developed and your guidance on your message-board, even if you need to look it up ;)

Keep doing what your doing because it works!

Rich

Joe McLain
March 30, 2008

# re: What can you keep in your Head?

Hey Rick, Richard Norris is right - there is too much 'noise' in software development today. We can't remember it all, don't even try.

BTW, the next step in getting older is to stop caring that you can't remember it all - that is a good thing! Of course if your as old as I am you don't remember anything ...

-joe-

Glenn Wiley
March 30, 2008

# re: What can you keep in your Head?

I used to worry about how anyone could possibly remember all of the knowledge needed to develop software effectively, but the old saying that has really stuck with me is that the wise man doesn't always know the answer, but knows where to find it. For example, many a search on an ASP.Net issue has led me to your blog. I read enough to get a general idea of what technologies are out there and what they are good for. There aren't enough hours in the day to keep up with everything, even with a rather narrow focus on a specific technology. I just try to remember the general details and keep notes for future reference. The notes have saved my bacon on more than one occasion. I'm usually in the same boat when I have to go back and try to remember what I was doing on a particular project a year ago. I tend to work on several smaller and varied projects, so the details just don't stick for very long.

Joshua Starr
March 30, 2008

# re: What can you keep in your Head?

I mentioned this on another blog that was linked here -- what I have done for myself is created a folder within my e-mail mailbox called "KB" where I send code-snippet rich emails that can range from general things, like a .NET Repeater layout, to something more complex, like an algorithm....

This allows me to work smarter, not harder. Aren't most coders lazy? (I know I am) We write software once so we don't have to do it again.

I just hit 28, and it's nice to see that I'm not alone in my "looking things up" habit. This is good practice for old age senility when we will need to "look up" where we left our sandals. :)

E.R. Gilmore
March 30, 2008

# re: What can you keep in your Head?

Rick,

If a smart guy like you is feeling that way, think of how the rest of us feel. At 45, I'm starting to wonder if I want to work with this level of complexity for another 20 years. I might just have to do something a little easier on the brain, maybe start up a surf camp.

Regards,

E.R.

rich
March 30, 2008

# re: What can you keep in your Head?

What am I missing? If you're not using DataSets what are you using?

Bahador
March 30, 2008

# re: What can you keep in your Head?

I have exactly the same problem, and it worries me a lot when I think about having a job interview.

Dennis Bailey
March 30, 2008

# re: What can you keep in your Head?

Hey Rick!

You are not alone! I'm not quite 40 yet, but I too feel that sometimes I find myself wondering the same things you do. I think of the internet as part of my toolbox, you can't remember everything and even if you do, things change so fast that what you did a year ago is not even relevant to the concepts that are being used today. Trying to keep up with all of the changes and additions are not easy, but it seems to me that if you are able to look up the concept or idea and then apply what you find to your particular problem you are way more valuable that being able to regurgitate facts.

Dennis

Zubair.NET!
March 31, 2008

# re: What can you keep in your Head?

Thanks God I'm not alone, I think the better approach is how Steve puts it, keep our own collection of code on a blog to be able to access it when needed.

http://aspadvice.com/blogs/ssmith/archive/2008/03/30/Two-Kinds-of-Knowledge.aspx

Attie
March 31, 2008

# re: What can you keep in your Head?

Hi Rick,

Ive had to build com components, outlook/word addins, drivers, WM hacks etc. Thinking back, I cant quite remember how any of it worked... *gasp* seems that without my code archive i'm completely useless :)

Siderite
March 31, 2008

# re: What can you keep in your Head?

Hey, Mark!

Did it ever happen to you to Google for the solution to a programming language problem and to find it in your own blog? It happens to me all the time. It's one of the reasons I made the blog in the first place.

Alan Bourke
March 31, 2008

# re: What can you keep in your Head?

Regarding the '20 questions' thing, I know what you mean. Those tests are bullshit IMO, they just test your ability to remember trivia when as you correctly say any programmer would look stuff up on the internet.

The .NET Framework is huge and unless you are actively using a subset on a regular basis you will forget. I know what generics do, but since I don't use them daily I would struggle to sit down and write out the syntax 100% correctly. But so what? We should be judged on how many production .NET applications are successfully being used, not some obscure bollocks about when you should use a List over a Dictionary.

Parag Mehta
March 31, 2008

# re: What can you keep in your Head?

Hi Rick,

I will be 30 this September and face the same issues that you are facing :). I had to do from everything right from DBase III to upto .NET and I forgot most of the things I did last year!

There is one more point though, write comments with code :) . Because it's not anyone else but ourselves are going to need it!

Regards,
Parag
iparag.com

Bernal Schooley
March 31, 2008

# re: What can you keep in your Head?

I've had this problem or many years and found that the best solution is to have nearly all of the code I've ever written (or been a part of writing) in a single project code archive folder on my computer. With this I can quickly find out how I've done something in the past by using desktop search. Only when that fails to find a solution do I start a web search. This tends to work better for me because any new solution I find on the web usually involves a process of looking through multiple approaches and finding the most elegent and simple one to use myself. So by searching my own code first, I can sometimes cut down the time it takes to filter through all the bad examples you run into on the web.

David Douglass
March 31, 2008

# re: What can you keep in your Head?

A long time ago (i. e., the early 80s) you really could know it all. Whatever the platform was it wasn't very large and didn't change very much. After a few years you'd seen it all and used it often enough to remember it. Now? Microsoft's platform is a vast sea; every day brings tidal waves of "breakthrough technology".

Knowing the answer isn't worth much; knowing how to find the answer is everything.

Kevin J Baird
April 01, 2008

# re: What can you keep in your Head?

I'm just glad that Rick Strahl is human. I often wonder how entry level programmers make sense of all this information. Programming has always been a daunting exercise, but now with the expanse of technologies all tied together and the rate at which they change, it makes it nearly impossible to keep up. I can only imagine what it'll be like in ten years, and I have another 30 to go before I even think about retirement.

Craig Bailey
April 01, 2008

# re: What can you keep in your Head?

Yep, it's worrying isn't it.
I hadn't programmed for a little while and then last month did some T-SQL stuff. It took me a minute to remember how to declare a variable. I kid you not... I thought I was going mad. But then it all comes back.
As you say, the best programmers know how to get to the answer, quickly and efficiently, even though they may not be able to cough it up in an exam.

Randy Jean
April 01, 2008

# re: What can you keep in your Head?

Wow, its good to know I'm not alone. I thought I was going crazy and it was just me that had these thoughts. Wait... do I really want to share these thoughts online? ;)

So, now what to do about passing the big .NET exam... I've studied and re-studied, taken test prep classes and I don't feel ready at all. Its like you say, I know where to find the information when/if I need it but to get certification you gotta know it without the help of intellisense. Sigh...

Jason Tadros
April 01, 2008

# re: What can you keep in your Head?

Amen! I don't think it’s a matter of age and loss, it’s more a matter of age and wisdom. IMHO for every 20 lines of code some 20 something can write to db connect... I can build 20 enterprise applications in the same time. Once I let Google, blogs and MSDN be my syntax/ref guide I spend more time knowing how to put all the architecture and heavy lifting in place than trying to remember Linq/sql/rest (flavor of the day) connection syntax. If you have been in IT for longer than 1 iteration of technology, you realize the more it changes the more it’s really stays the same... So kudos to you! When you fail to remember which side the fuel tank is on your mars lander, you'll be safe in the knowledge you built a mars lander in the first place. Just say to the 20 something "fill er up!" :)

Guy
April 02, 2008

# re: What can you keep in your Head?

i think experience teaches us more valuable lessons, and these replace the unimportant detail of frameworks/classes etc...

hence why its usually the young guns who like to tout the latest tech talk.

Alan Bourke
April 02, 2008

# re: What can you keep in your Head?

> hence why its usually the young guns who like to tout the latest tech talk.

Yep, and have to write everything in <insert trendy web-centric scripting language here>, rather than the tool actually most suited to the task.

Peter Bromberg
April 02, 2008

# re: What can you keep in your Head?

Rick,
It's illuminating to read the comments of younger developers and it makes me reflect on what my thrust has been for the last 8 years since we started our eggheadcafe.com ASP / ASP.NET developer site in 2000 (yup that's how old it is!). The idea was to provide a "boutique" approach providing mostly short articles that showed how to solve smaller "how to do XYZ" problems. Since I now have a huge library of solutions that illustrate these techniques (and which I can readily download from our site if I'm having a "Senior Moment" --or if I've been drinking too much Heineken) it's usually not a big deal for me to go "back to the future". In the process, I get a chance to amend previous articles I've written or correct mistakes, or thank contributors for enhancements or fixes). Sometimes, I even get flashes of inspiration and write a brand new contribution.
Thats why I'm a very big fan of Codeplex.com and similar sites that encourage code sharing and collaboration. I'm also a big fan of learning all the search operators to search google etc. effectively, which only a few developers ever bother to invest the time to learn.

neliason
April 09, 2008

# re: What can you keep in your Head?

Obviously I'm not alone. I too have often wondered how I fair on one of those developer tests. I try to write good documentation in code so when I have to revisit it, and I will, I can get back up to speed more quickly. There really is too much technology to keep up with these days. As Peter points out eggheadcafe is another great site I frequently use to help me remember.

A related issue for me is that when I do revisit or reuse code I'm such a perfectionist that I usually then want to refactor it to make it more efficient or better in some way.

secondmouse
May 10, 2008

# re: What can you keep in your Head?

It seems selective though. I add some new function and discover half way through that I already wrote it in another module (with comments) last year. In my comments I am actually telling myself what to be careful of doing, etc. but I don't remember writing it at all. Eerie. On the other hand, I can still recall a lot of Z-80 machine code off the top of my head, circa 1980.

Aaron Seet
May 20, 2008

# re: What can you keep in your Head?


West Wind  © Rick Strahl, West Wind Technologies, 2005 - 2024