I'm 44 now and I just love code!
And software and programming. And MSDN, and Communication of the ACM and Programmez (French magazine) and Stack Overflow and McConnell, Cwalina/Abrams, J. Skeet and J. Spolsky and... every great post ever made about software development !
Call it a passion...
Well, I really love my job and I still don't believe someone could pay me for what I'm doing - I'm most of the time eager to go to my workplace in the morning and a little sorry to quit....
I would do it for half the price, I think ^^.
But when I look around me, most of my fellows at Université de Montréal are now Product Managers, Directors, Project Managers, or even something completely different...
And looking around, at my place, I see young clever boys and girls of less than 5 years of experience being paid as much as I am. They are pretty cool and clever of course, I agree on that. But their code is unmaintainable, as cool as they can be.
My question (sorry for this long introduction :) is pretty simple : can anyone hope to write code after 45 ?
Any experience on that subject ?
All the best.
I'm 55. I can't seem to learn quite as fast as I used to, but I have a heck of a lot of general knowledge and experience to draw on.
My advice: don't stop learning.
I am 46.282191780821917808219178082192 years old as of this moment.
I make more $ now than ever before - mostly due to starting my own business, and being more willing to travel. And more willing to say "No" to projects that don't pay enough or don't interest me.
I have far less tolerance for trivia than I used to - no time to waste. Code Golf, for example, or topcoder.com - not a productive use of my time.
Similarly, I have much less enthusiasm for the newest shiniest widget - not because I don't care, but because they are so rarely a significant improvement.
I have managed other programmers - 25 of them at once for one project - and hated it; I prefer to keep the team small and my hands in the code. I just don't get any satisfaction from other people's achievements; not that I wasn't proud of my team, they were (almost) all stellar coders, it's just that architecting, mentoring, et al are just not as much fun as actually creating things that work.
The code I write gets better each year; that's what experience can do for you.
The lessons learned from 30 years (I started pro very early) in this career field make me far more efficient at analysis, research, learning, and coding than the five-year guys. Experience in a dozen industries makes for a big 'ol bag 'o tricks, and several different viewpoints to bear on problems.
I am a Google master, and know how to time-box tasks so they don't run away with the schedule.
I do not multi-task; I focus on one thing and do it well, then move on to the next thing. Texting, talking on the phone, chatting, emailing, and reading SO are all distractions that make me less efficient.
I cannot code for 36 hours straight subsisting on nothing but Mountain Dew and cookies any more. 20 hours is about my limit these days - and if I have to do that, it is a planning failure on my part [the aftereffects get more severe past about 35].
I value family time and non-technical time much more than I used to, but still love what I do.
I still have Big Ideas, more of them now than ever before...but less time to pursue them. So I choose only the best of the best to spend my time on, and let the rest fall to the floor.
I don't think I want to be coding for a living when I'm 65, or even 55 - but then again, the tools should be really really cool by then, so who knows!?
And looking around, at my place, I see young clever boys and girls of less than 5 years of experience being paid as much as I am. They are pretty cool and clever of course, I agree on that. But their code is unmaintainable, as cool as they can be
This is the number one reason why you should get a raise. Your added value and experience can be clearly identified with time, you end up saving your company a lot of money in the long run because you code knowing what maintainable code is.
So... Get a raise, buy more programming books, and keep enjoying what you're doing!
Real Programmers never quit, their baud rate just starts to diminish a little...
I am 52 and still coding. I have several friends the same age whose jobs are 100% coding.
I have another friend who is almost 80 and is about ready to release his C++ based genealogy program.
And I promise you, I will die at my keyboard. :-)
52 and coding.
[Well, wasting time with Stack Overflow, but mostly coding.]
The big deal is that newer tools make it easier to be a one-person show. With a few decades of experience, I'm very productive, relative to n00bz. Even including the time spent on SO.
Didn't start learning Python until mid-40's. Looking forward to learning how to do better-looking web pages (particularly controlling CSS).
Back in the early '80s (I wasn't even 30 yet) I spent some time as a manager. Went back to programming.
In the late '90s (I was 40) I spent some time as a director of a product offering. Went back to programming.
All with the same company! They call me an "architect" and I do have to spend a lot of time on proposals and planning and directing other programmers. Right now, (outside stack overflow) I'm expected to spend my day programming, the other stuff is an interruption.
47 and still going strong...
A good friend of mine, whom I still have the pleasure of working with, is 60 years old, and he codes still.
He was smart, and went back to school, and continues to stay current with the modern movement of software development.
He is fully using all the latests and greatest that .NET has to offer, with no signs of using old programming paradigms (Like declaring all your variables at the beggining of a function (Yes, Mister C to C++ guy) or naming your variables aaa (looking at you, Fortran Guy!))
So can you still code, meaningful projects after 45? Yes, absolutely, but you gotta have passion for it, and the desire to stay current.
The best software engineers I've ever worked with have been doing it for longer than much of the work force has been alive. The fundamentals of good software development haven't changed. Languages come and go, technology changes, disk drives keep getting bigger but that doesn't change the fact the software development, good software development, requires disciplined, experienced, creative problem solvers. No age restriction on that.
Maybe you should take a look at Neil Butterworth's answer to this question:
Approaching 40, I've been in the IT business for a while (programmer, analyst, phone guy, network guy (my MCSE and $3.50 will get me a cup of coffee), etc, etc). Still haven't finished the CS degree I've been working on for the better part of 20 years.
Although I intend to still be a developer in ten years, I've recently changed majors to something not technology related. (Lots of reasons for the change).
The problem (as I see it) is that our field usually doesn't have room for the guy with lots of years of experience that doesn't want to move into management. So, you get the kids that make as much as we do fresh out of school, the managers that know even less than the fresh-faced college kids, and the occasional Dev that's been promoted to management and discovered that Good Dev != Good Dev Manager.
I realize that I'm just ranting rather than answering ... Oh, well. I'm old and cranky, and deserve some concessions.
Basically, if you're still enjoying it, and are happy with your income level then keep going, keep learning and keep enjoying it.
You can code even if you are 100.
I'm 36 and just as passionate now as when I was 14 when I started programming. I had the pleasure to work with a guy in his 60s. I can still see the fire in his eyes whenever I ask him about how he started and why he's never stopped. He's "been there, done that" and kept asking for more!
I'm 62 next week. Have been a manager but it's not for me. Still a developer - learning and working with lot's of the new technologies - AJAX - Silverlight - .Net 3.5 and so on. Still loving it. I think that the smarter organizations realize the benefit of experience.
And another one - I'm 49 and still coding for a living. I absolutely love it, can't think of anything I'd rather do - although of late I keep having regrets that I'm not 20 years younger because there's so much cool new stuff coming along and of so little time to play with it.
What I'd like to add to the general discussion is that I'm self employed and running a consultancy where I have around half a dozen core clients and another dozen or so more peripheral ones, with some churn. My clients are SMEs or 'SME-equivalents' inside larger organisations. I don't just code - I provide analysis and business consultancy too and I don't seem to have any problems obtaining and keeping clients. I think by the time you reach past your 40s even pretty hardcore programmers will have gathered some quite considerable business knowledge and your advantage over the young whippersnappers is that you can combine this technical knowledge.
With most of my clients I'm basically providing the full solution to a problem rather than working as a pure code-monkey. I think what they value is I can go and talk to the boss (I try to work only for companies where I can have a direct relationship with the owners) and discuss their issues in business terms in business language - I can then go away and spec that up, code it (sometimes bringing in extra resources as needed) and basically make the pain go away that most managers experience when dealing with software requirements.
Where I think I do differ from many older programmers I come across (but expressively not the ones using SO) is that many have a tendency to identify a legacy market and stick in it rather than always looking to play with the new shiny. These people are often coding something like VB6 or Access and are absolute wizards in those fields, but really have little interest in moving outside their comfort zone. Generally these people remain as coders for a while then drop out into something else - and of late I've been hearing several articles about such people made redundant by the recession who complain of not being able to get a job - it just makes one want to scream at the media 'why are you not coding a startup then?
Myself I'm still hoping to create a new market busting product from scratch. For the past 10 or 15 years with growing offspring just churning the money to keep the family living comfortably has been the priority, but as the end of this draws into sight I'm wondering - hoping - that I'll have the opportunity to go out on a limb a bit more again - can there be a second flowering for entrepreneurial coding in middle age? I certainly hope so!
Only 33, but I'm wondering the same thing.
I don't know what my future has in store for me, but sometimes I wonder - suppose I just don't want to get into project-management, but 'just' want to stay coding ?
The usual carreer-route would be to progress to team-lead, get more and more into project management etc., and you'll earn more money.
If you stay where you are 'cause you like it - coding away - you probably won't get the pay-rises etc. Sometimes I wonder where to go - the choice between career & money, or just doing what you love. Once I find out what the best thing to do is I'll get back to you, but it might take me 40 years to find out... :)
Still at it at 50. Learning new stuff all the time....
I know of at least one person doing "hardcore" programming well after 45. This person is primarily working in assembler on Z/OS mainframes. In general, this seems to me to be the kind of thing that you want to get experienced people to do. I would imagine that there are a lot of programming problems requiring people with difficult-to-master skill sets (such as competency writing production code in privileged mode assembler on a mainframe) or highly developed analysis skills that are more suited to people with 20+ years of programming experience than they are to folks that have 2 harvests writing webapps under their belts.
I'm 22 and coding as I may be "cool and fresh" but at work I often find myself looking towards my older colleagues for help or asking what's the best way to do something is, because I know they have much more years of experience than me. You should code till you die.
What a good question.
I am 50 now and have been coding since I was 18 - Fortran IV on an old (it was old even then) IBM mainframe. I went through Assembler, C, C++, Smalltalk, Java, Ruby, a bit of Python, C#, and now I am looking at F# and thinking that I really must learn that too.
But when I was 18 I worked with a group of programmers who were in their 30's and 40's. I looked up to them and respected them. I learned a great deal by working with them - all of what I learned then has been useful to me - whether it was about the right or best way to look at something or whether it was about how NOT to do something. It was all useful.
The thing is, you just need to keep learning - something new every day - the interest is deep.
So you have young people who are quick to learn but lack experience, and older people who have slowed down a bit (well, I have anyway) but who have a vast experience of languages, techniques, people, and life.
It seems obvious to me, but if both groups work together then it benefits everyone. I just wish that all employers would see it that way!
I am 48. Still coding as well as leading a team. I am a reference for new programmers.
I'm 57 and still coding. Graduated from COBOL to VB6 in 2000, and C# and .NET in 2002. Now coding ASP.NET and mainly keeping up with the trends. I probably couldn't manage a project to save my life, but I think I can keep up with the coding until I'm 90. Ha, ha, in this economy I might have to!
I am 41 now, and I am still a developer. I don't find myself very attracted to play architecture position, that is why I didn't push myself so hard, to be an architect. But I like to be a technical manager, and I am trying to be. I was contractor, and I made some money, but now I am back to be "Senior developer" for a stable company, and I am trying to go up in the ladder.
The last I checked universities and research labs were filled with older and respected folks who were pushing the limits and learning/teaching.
As our industry matures so will the idea that only the young can lead the way.
There is no reason why one should stop coding at any age. Even if companies don't want you, your passion and experience would still be much appreciated in schools, IMO.
Are you kidding me? Of course a 44+ yr old can write code! I work with a couple of older guys that I look up to. My colleagues that are the same age as I are smart but the older programmers with the experience are normally the ones that answer my questions and handle the heavier part of the workload. Yeah, technology and languages are forever changing but if you held on to your logic, you shouldn't be paid less because of Age! Just make it known that you can still write code!
I'm 46. You know, it's my eyes. I can't can't look at a screen filled with code for 8+ hours anymore. I'm good for like 3 hours, and then a break is required. Other then that, I think us "older" geeks bring much to any table. Nothing is better than experience.
It is not about how old are you. Development is all about your creativity and I must say how much you are addicted to the coding.
Am 47, been programming for 28 years started with PL/1, then C. C++, Java and C#. I'm still learning. Now doing Ruby for fun and also trying to learn LISP.
I never got to grips with Perl though, it's the language of the devil :) (please no flames, it's supposed to be a joke!)
I'm 42, and over the years found that I'm more valuable as a "Coach" to those young developers. I can share the painful lessons of my years coding, and hope to prevent them from making the same errors. Leadership is more valuable than coding I've found, because someone has to lead the way and make the right application design and architectural design decisions. As we grow older, I'd suggest we code less, coach more, but still keep coding.
I'm nearly 40, though I look younger which, although it shouldn't, does appear to help in interviews. That being said, I have worked with some terrific people, both young and old, as well as some awful people, both young and old. I would hire the good people in the future, but not the bad people, regardless of their age.
If I have ever got a 'why is he still coding, why doesn't he go into management' initial impression, it's very quickly replaced by 'he's a good coder, I hope we can keep him'
I also believe that a passion for coding, as I certainly have and it sounds as if you do to, is the most important thing. If it is obvious that you love your trade, people will want to hire you.
Regarding your comment that you can't believe they pay you to, I remember my first coding job, sitting warily, with a big smile on my face, hoping no one would notice that this was actually my job and yell at me to 'go serve someone' or 'move those boxes' :)
I'm only 26 but I've known some skilled 50+ year old programmers. So I don't worry about it too much. In fact, I'm starting a Micro-ISV this year and I'm relying on my ability to continue to develop quality software for many years to come.
I'm in my late 30's and have gone through periods of my career where I wanted to "move up the ladder" into management and beyond - and while I was a good technical manager, I didn't have the passion for that type of work. I realized that what I most enjoy is building (and breaking and fixing) things - it's my nature.
So I'm now an independent contractor, make more money than I ever did in management, and enjoy my job 99% of the time. I'll never be a CIO, CTO or VP of Technology - but that's ok with me.
Will I be able to continue doing this into my 40s & 50s? I sincerely hope so - and I don't see any reason why that can't happen.
The thing is, with just 2-3 years of intense training, a new person can learn all the latest jargon and technologies. Then they will often pass the interviews, get the same salary, etc., as someone with more experience.
The subtle qualities that can be gained with more experience are more difficult to detect, so sometimes mistakes are made in interviewing, etc., that might not be caught until later (i.e. unmaintainable software).
So yes, you may be making no more than someone 20 years younger. But you can certainly keep up with them, and on top of that, you'll be more accumulating more real world experience, understand the SDLC better, etc.
The reason many people move to something else is, I believe, that it is demanding to keep up on the latest stuff. Some people decide for various reasons that it is to time-consuming, or difficult, or not a high enough priority for them anymore.
If you are passionate about development, then you are right where you should be! Actually, my team now has 4 people about 45-50, myself (39), and one 25 year old. Everyone is a good contributor, and the team works together pretty well. By the way, I few more enlightened companies like Microsoft, recognize a dual route for career growth, either on the manager route or the pure technology route.
I just turned 47. Currently working at a large software company, which was a big goal of mine 10 years ago, but am looking forward to layoffs hitting my division soon. Meanwhile, the company is, in the middle of layoffs, still continuing with their college hires from overseas. This bodes of a desire by the company to get rid of older folks, in my opinion. I have recently become convinced that my future as a software developer will probably require me to either a) start my own company (not sure I have the business expertise to make a go of that), or b) gain some more arcane, specialized knowledge and skill. I believe the body of experienced device driver writers to be much smaller than other areas, like .Net framework coding, so that might be an example of a way to distinguish myself. I am sure there are other areas as well, that is just an example.
To answer your question: first, keep the passion, that is vital; next, find a way to either make yourself stand out, take control of your destiny in some way. You can definitely do it, but the road ahead will different from what you have already traveled.
I am 44+, and still coding. I have successfully avoided getting into management so far, while moving up the ladder. I can identify with your passion - I learn one language every year (after reading Pragmatic Programmer), lurk on tech chat rooms, and don't want to slow down. 44? That is when the going gets good :)
I admire your passion. It's easy to "slow down" as we age, but the field we have chosen doesn't really take well to that.
Stay current, keep the passion alive, and we'll make it to whenever we feel like quitting!
50 and still going strong!
If you are good enough, there is always a need for you. There will always be a need for good people, no matter the work you are doing. You just have to be outstanding :).
And specific for you, if you don't mind getting paid the same as some rookies (like me =]) nobody cares for your age i guess. Maybe on friday nights in the pub when that chick comes i like but not while working ;).
If you do mind getting paid the same as rookies it comes down to your company and their views on how many experienced people they need for the job. This again comes down to your experience and to my first point :).
Many of the best engineers I've been fortunate enough to work with were programming before I was born and in that time they have accrued incredible knowledge and experience. In a team environment that experience is priceless and often provides a great stabilising force especially in times of stress.
At the end of the day if you are still passionate about learning, improving and (hopefully) teaching, there's no reason why you can't be writing code.
I myself don't understand this corporate mentality of placing an "age barrier" on the developer position. Experience is valued in every other field except ours. I guess my point is, I wouldn't see the added life/career experience as a detractor when finding a job.
I turn 40 this week. I grew up in Silicon Valley and have coded since I was 10, went on to get a BS and MS in computer science. I've worked at several software and Internet companies, many startups, managed large teams of 30+, including offshore teams. Long story short I've played many non-programmer roles as well in my career which have been very beneficial in developing my career skills.
I still code a lot as an independent contractor. It seems I have to re-invent myself every year to stay current with the marketplace (Rails, iPhone/Objective C, jQuery, keeping up with .NET changes, which is the platform I work on mostly).
It's great because I enjoy being able to hack on any number of platforms and languages, but it takes a lot of work to become proficient at each one and to know the inner-nuances of them and get involved in their respective communities. It's hard to remain expert in many platforms if you're not using them on a regular basis (my enterprise Java skills are shot).
While I love to code, I think I'm getting tired of coding for other people, the stress of hitting deadlines and their budget restraints, especially when they don't pay me or have trouble paying me on time. It's very demoralizing and makes me seek out a more stable source of income.
Lately my passion has been coding trading indicators and automated trading strategies for futures and currencies markets. I've always had a passion for trading and have been trading the markets as a hobby (sometimes, a very expensive hobby) for years and now I'm using my coding skills for that.
Eventually, I think I will make enough income trading that I can trade for a living, and coding will just be a tool that I use for trading or any other software product/web services that I may want to launch, or not.
The great thing about that is I can trade/code any where in the world and not need to be in-front of customers. We're already setting goals for which countries my wife and I want to bring the kids to and live in for a few months out of the year. I should have never read "The 4-hour Work Week" :)
At the end of the day coding is a tool, a trade skill, that can be used for many things above and beyond having a job writing code for a company. I'm very grateful to live in an era of computing and the many opportunities and conveniences it provides.
In our team, we have 3 guys around 52 - 53, including me. Still going strong and ranking no. 1 and 2 on peer reviews. The best way it to keep updating your skill set. Attending a conference like JavaOne  will help. Another tip is getting a certificate once a year with the whole team. We had SCJP ( Sun Certified Java Programmer ) and SCWCD ( Sun Certified Web Component Developer ) sucessfully and working on SCEA ( Sun Certified Enterprise Architect ) this year. And help your young peers, of course. http://en.wikipedia.org/wiki/JavaOne
I have 26 and I going crazy. I want a reform :) I love to code and I die if can't code every day. Long live for all coders.
I used to think that there was no future in software development as programmer's got old, Until I met some really smart programmers and in their 50's in my third job. During my previous jobs, I used to be the "Senior Developer" in my late twenties. However to stay in programming as you get older, it's important to develop other skills besides coding, such as ability to write & communicate specs, ability to manage own project, ability to gather requirements from clients, ability to run the QC process independently etc.
From what I have seen, during downsizing, people who are let go first are employees with single skills, such as QC Testers, Project Managers and finally programmers who do only one type of programming.
Life is short. So code faster.
I'm 46. When I talk puppies listen. I will code until I die.
The flashing cursor is as a great leveler.
The CPU cares not how old you are. The HDD seek time is the same, regardless of how clever you are. And the keyboard knows not, and cares less how pretty you are.
Go forth. Create. What have you got to loose?
Do, or do not. There is no try.
I'm 51 and still coding and going stronger each year. :) I have no formal degree in programming, however, I am employed as software developer for an engineering firm. From HP Basic to VB and Powerbasic, I learned the languages by self-study. I have to move up to C# lately to make sure that my next job won't be something like flipping burgers. I estimate that I will be coding for the next 15 to 20 years. :)
Can anyone hope to write code after 45?
God, I hope so! I'm 38 and in the process of trying to turn my code-writing hobby of 25 years into a second career. I'd hate to think it's only going to be 7 years long (particularly as I intend to live to be about 150)...
I'm relying on P J O'Rourke being right when he said:
"Age and guile beat youth, innocence and a bad haircut".
I am 30 Years old with only 5 years of programming experience and I would love to have somebody alongside me with this much experience and real knowledge of all the things. I live in a world where all the senior guys don't stay here. I don't know whether it is true for other such countries or not but here in Pakistan, anybody who gets around 5 years of experience under his belt just flies away to US or European countries due to which there is a shortage of really experienced guys like you. I don't know what I will do in 2,3 years time but if I would be in the same situation, I will most probably follow the suit. :)
At my place, I am a Senior Software Engineer :), I know it is only a designation and I have to code a lot but I would love to have this kind of designation when I had at least 10 years of programming experience.
I would say , keep programming but make sure that your management knows the true importance of your experience.
You shouldn't be employed at 44.
You're too old to be a "programmer". You can be more than that.
At 43, I started a software company (an ISV). I program 70% of the time, but I'm also a salesman, a businessman, a graphic artist, and a number of other things I never dreamed of being.
It's time to go beyond just programming. Stop working for The Man. Be The Man. You know you've got the skill. And you've got the passion. So make something! Make something great and change the world.
Some of my best years of code (and learning) were when I was working with a mentor that was over 45. He was also one the best developers I have ever had the privilege of working with.
I am 28 and have been the youngest developer in all the shops I have worked in for several years. From the “young guys” perspective I have seen both sides of this. I worked with developers that far exceeded my experience that couldn’t/wouldn’t adapt to the new languages, methods or even work with the younger guys and I have worked with some that have lead the way. I think this is the distinction. Being one of the young guys it’s how I see I need to be (always able to adapt and learn) to stay successful for a long career.
Younger developers cost less; most of the time. This is an issue I see for myself as the years go on.
All in all I think if development is a passion it shows in the work you produce and hopefully management finds value in retaining the best developers for the job regardless of age.
Now, as the young guy should, I will go back to my cube and hope no one is offending by me saying anything….
Wow, what a great post. I have been thinking the same thing recently. I am 33 and often think about what the landscape of IT will look like 20 years from now. Personally I love to keep learning new technologies. It keeps thing interesting in life. Now when kids come along I am sure that is going to put a dent in my "learning" time. Personally I hope age does not matter for any job. If you can do the work, then there should not be any issues.
I'm 62. I started programming when I was 20. I still love to write code and make it work (but it does seem harder sometimes).
It seems like there are two kinds of programmers: those that love to write code and those that don't.
I tend to view code as an end in itself as opposed to a means to an end.
Real programmers never die, they just get kicked up to that great server room in the sky.
An important aspect to this question is what are the hazards of being an older developer? Mostly, it's don't get sidelined.
I've worked alongside a few very valuable developers who've been coding up to the point they retired, partly because they enjoyed it, and partly because they sure as hell didn't want to become managers. Based on that, the traps I think you want to avoid are:
It's easy to end up being seen as The Dependable One, and so become the one who looks after the insane/crusty/dull bits of the code-base, because no-one else can face it, and you've at least been there before. This is good for job security, less so for your motivation.
Be careful how you say 'that won't work'. If you, say, express scepticism about this year's software development bandwagon, it's deplorably easy for people to mishear it as some old guy muttering about how it was all harder in his (less often her) day. Being up to date on current stuff is useful, not only CV-wise, but also because it gives you the credibility to be able to pass on your advice (I've spotted myself slipping into this trap).
Short version: make sure at least some of your war stories are about architectures people have heard of.
I'm 66 and still going strong as a database developer. I've done the management thing and even been a CTO, but I just love solving problems. For me, software development is like sovling sudoko or kenken puzzles, but only getting paid of it. When I took my current job, I told my boss and his boss that I didn't want their jobs, I just wanted to be their database expert and they've let me do that. I'll probably "retire" in next 18 months, but I don't see myself stopping. My current company is willing to let me "taper" off plus I consult on the outside. In my mind when I stop programming my life is over.
We joke around but I know there is ageism in programming. I regret that when I was a hotshot in my late 20s I had a very bad attitude about older programmers who seemed slow.
Well I hope you stick around, we need more balance, also when I get older I won't feel so bad. I'm 36 now and I feel the pressure to be a lead or manage others, but I have no desire. I just want to write code...
What you're really asking is can an experienced very passionate programmer program? I think it's a no brainier....
(On a side note - your passion is priceless, you really should consider writing a book...)
Yes, there's a future in training new recruits and then ensuring they do a good job (possibly through means of paired programming). You could always stay where you are as long as money isn't a big issue for you. After all, you seem very happy doing what you do.
I'm 46 and coding. Maybe I am getting a bit slower in bragging out code lines, but I think it's because I have learned to think first and then avoid the unneccessary lines. And then one learns to avoid some of the bad ideas without even thinking. So all in all you're getting faster. And my definition of cool code is that it has to be as simple as possible and just works from start and has not to be touched again.
I hope we have a future in it and I plan to make it mine. I typed in some BASIC on a TRS-80 about 26 years ago and have been around computers since then. I'm almost 40 and plan on doing it nearly 26 more years. Even if I manage to retire before that I think I'll still be working on something involving code. I don't see any reason why not.
I am very pleased to see some people fight the "Be Manager" to get promoted kind of behavior, I really like working as a developer, and I also hate managing other people, and this problem makes the software business always lose the highly experienced developers, because the average life time of a developer "who writes production code" is about 6 years, which is very short compared to other careers like Doctors, Actors, Pilots, ... etc, it is like always flying with a fresh graduate from aviation school
I'm 29, 12 years of experience in IT, 5 as manager (50 persons dept), now running my own business for a year.
From what you have written - I would be happy to have a programmer like you in my team, on the other hand you haven't written anything that would justify giving you a higher salary than young programmer with 5 years of experience, nor that you should get less.
Try to emphasize your strong points and not only visible conditions. I believe you have something in your resume that you are proud of and it is more than your age.
The more experience you have, the higher you will be paid. If you are over 40 and have more than 10, 15, 20 years of experience (or something like that) you will receive, huge, huge salaries. The clever boys and girls may be smart, but they are not making as much money as experienced professionals.
The problem is not that you cannot code or keep up with juniors, I think. I'm 33 and a better professional than I was ten years ago in nearly every aspect, and when I look around I see that it is more or less the same for my friends. The problem may lie in this short-sighted, ill perspective that unfortunately a lot of people may have: "well, he's 45 and if he is not director/manager/CEO, then he must be incompetent in some way". I don't know, maybe we can call this age and position matching.
I think with experience, you get a very high level view of each project. You can predict what go wrong with a particular design, methodology. I have seen people with 17+ yrs exp writiing the core components of a product. These components have remained unchanged over different versions of .NET framework. I feel, with experience, you can code in a much much better way.
As Robin Sharma says,
the only way to reverse aging, is by learning.
I went to a startup in 2003. I was shocked to see mostly older folks there (I'm a little more than in-between age-wise I guess) where the other company that we had earlier "taken public" was filled with young developers and half-seasoned management.
Long story short, the quality of the software was far better than any other environment in which I worked. The DBAs were tried and true. The developers talked FORTRAN. Absolutely no-frills software. Software code was tight, fast, maintainable, had failsafe actions and any software esoterica of any age could be answered by a walk over to the next desk. They over-purchased servers (by millions) and kept the desktops antiquated. Team work, maturity and I learned more from them both in code and in tact than anywhere else.
When I get funding for the next big thing, personally I'm looking forward to hiring seasoned software folks.
I think there are a lot of reasons most developers aren't over 45 but it doesn't have to do with ability:
1) There weren't a lot of people programming 40 years ago so there are not a lot now over 40.
2) Of those that WERE programming 40 years ago many made a fortune before the dotcom bust and retired early.
3) Software Development is REAL hard and a lot of people that don't have a passion for it don't do it for more than 10 years. 4) Management, in general, pays better so a large number of the over 40 programmers are now managing the younger generations. 5) Unforutately, most companies seem to favor younger fresher minds...especially start ups. But not all of them!
I'm approaching 45 and still active in my industry. My father in in his late 60's and still developing. I wouldn't say it's very hard to keep developing as you get older, I would say its hard to find someone older that has a lasting passion to stay in the field! But when you find them, hold on to them!
My advice to Allain - look for a company that has a technical ladder where you can grow doing what you love, instead of growing proportionally to the people that report to you.
There are such companies, like Microsoft, Google, etc. Microsoft keeps inventing titles for people that grow tehchnically, like Technical Fellow, or Distinguished Engineer.
Also - you mention that your company hires people that writes unmantainable code. You have an opportunity in there to correct that e.g. by establishing a better hiring process and carrying it out. You can become a "Hiring Consultant" in the company, which I bet you would love doing.
(BTW - great words Allain. It's nice to read those kind words of love for a profession.)
Of course you can code until the day you retire, but I think as a pure code guy or gal your earning potential peaks 5-10 years in. This is just because of the pace of change of technology.
If I'm looking to hire a coder will I care that they programmed delphi for a decade and c++ for another? Probably not. Or at least not enough for them to be worth the premium over some kid 3-4 years out of school with the same amount of relevant experience.
You can have a philosophical debate about how all those years programming and thinking in different languages make you a better developer, but in every interview experience I've ever had or even heard off, it's always been: "how well do you know the tech we're using?" and "how good of a general problem solver are you?".
This is a good article on the issue: Programmers: Before you turn 40, get a plan B 
With a quote from Craig Barrett (Mr. Intel): "The half-life of an engineer, software or hardware, is only a few years." http://improvingsoftware.com/2009/05/19/programmers-before-you-turn-40-get-a-plan-b/
My wife and I are both developers. We have both been working as developers for 15+ years. One thing we noticed was that there were alot of people working as developers who really shouldn't be, they didn't have the aptitude, interest or sometimes even the background. Those folks usually decide that programming is not for them and move on to different job. Some go into management, some become analysts, while others change careers completely.
What's left? The ones who are passionate about development and are interested in doing it right. They love learning new stuff and don't gripe about how things used to be in "The good ole' days." They might be grumpy but they usually know their stuff.
The main problem would be in finding management who doesn't have a pre-conceived notion about what makes a good developer. If they feel that only the younger ones have the stamina to keep up with the pace, I'd wonder whether those same employers were the same ones who believe that the 'Deathmarch' style of project management is standard operating procedure. They'd rather grind through fresh-meat developers than listen to the experienced ones and change their management style.
Lastly, I've noticed that doing nothing but coding holds less business value than being able to communicate with customers, users, and vendors. One reason you start coding less is because finding answers to ambiguous requirements takes more experience and provides more payback to the business.
My advice would be to find a place where they need experienced developers to help with the overall task of creating or maintaining software, that also gives you the opportunity to code regularly. That way you can have the time to keep up with industry changes.
I won't reach my 30 before some years and have been working only with young so told "dynamic" dev. Ok, coolness is fun, but I really miss a wisdom representative sometime.
Cocky and risky can be boring if not balanced with some long term values. Things I guess only living can teach you.
56 in a month and a half. I have no plans to stop.
I feel bad. I just, not more than 30 minutes ago, announced to my wife of how old I feel. We were driving back from FedEx; I mailed my undergraduate transcripts for a master program that I am enrolling in...
I guess I need to take the "I feel old" back. ::Sigh::
Edit: Part of what fueled this though is the fact that it is our 4 year anniversiry. In addition, wifey wants a child. I'm 26 (so you don't need to look at my profile).
Ultimately, I think you can code to any age as long as you keep your knowledge up (like any programmer) and as long as you continue to enjoy it. I hope to be enjoying programming at 70!
I'm 26 right now, and you see just young besides you because you are pioneer. Now the software industry is big, that's why all the new people get this area to work.
I have a friend that is 56 years old, and code good, but he don't like software process, he likes to code, and avoid bureaucracy.
I think coding is one of the best mental exercises exists. Good to health, if you like, continue till die. I will.
I prefer management, but I always had a spare time project to do in Java. Just to be updated.
"You know what they do with engineers when they turn forty?" [to Aaron, who shakes his head] "They take them out and shoot them."
There is really no room for older programmers. It doesn't matter how good you are, the younger programmers don't want you around. Of course if you are an American and most of the staff is foreign, for example Indian, then forget about it, you are the outsider in your own country. The best thing would be to transition into a second career where experience won't count against you. If you really love programming so much that it's the only thing you can stand to do, your only hope of survival is to start your own company. But I would encourage you instead to broaden your horizons and realize that one reason programming is becoming a domain of the young and of 3rd world types is because it is after all not a very good career. I think in general having any kind of business where you are self-supporting and not dependent on bossholes is the way to go, at least here in the U.S. where workers have relatively few rights and no security compared to Europe. But even in Europe I would stay away from IT at this time. Frankly it's much better to make a living running a hotdog stand and being independent than working for some company that will simply exploit you. By the way, if you set up a hotdog stand and make really good hotdogs, you will be contributing more to society than most software companies!
By the way, I see someone mentioned Google and Microsoft as companies that will keep good people around even if they are older. That of course is total rubbish. Both companies have reputations for tremendous age bias, and so far I haven't seen any hard data that would refute that.