150 points · by throwaway_stuck · 16y ago · 130 comments
One possibility is that I'm not as good as I think I am -- but I have had lots of validation. In the recent past (5 years) I've succeeded at some of the hardest interview processes in the world. I've written things that I'm proud of. I can speak as intelligently about code as any HNer.
Despite all this every time I sit down to code my brain turns to mush, somehow, and nothing gets done. I can always give my managers an intelligent explanation of why progress is so slow, but the thing is, progress is still slow. Lately I find myself making more and more beginner mistakes.
The weird thing is, I don't even feel burned out or depressed. I couldn't be happier with my current job. I'm just… stuck.
If something about this sounds familiar, feel free to offer advice. While psychological diagnoses may be right, at this point though I feel like there's something wrong in my practices.
I need some sort of professional help that doesn't exist. Someone to sit next to me all day and tell me what it is I'm doing that's burning up 8 hours a day without actually achieving anything.
A few years ago I was playing icehockey maybe once a day or something and I felt great, school was easy and I had a lot of energy to spare (well, for a teenager anway).
Then I quit hockey and I started doing nothing, just sitting in front of the computer and guess what happened? I got inexplicitly tired and burned out. I love math but it got boring and my arms where like spaghetti and I almost tanked school (thankfully I didn't). I've always thought it was lack of challenges but now I know it wasn't that simple.
I think that my lack of working out really did make me more tired, and not just a bit but extremely tired and depressed and a whole heap of things. Now when I've started at the university I had this same strange sensation like back then, much milder but still familiar. So I went to a couple of taekwondo practices and I'm feeling a ton better already.
So my suggestion is to start a regular, and then I do mean regular with no skipping because you don't feel for it or don't have time etc, workout. You don't have to go for a run if you don't think that's the most fun thing there is (I personally really dislike it) but find something fun - ball sports, climbing, dancing whatever.
Definitely worth a try!
I had a bad habit of not eating when I was deeply into something (or deeply stressed), and my body would simply run out of fuel. I think there is something weird about my physiology that causes me to not notice hunger as much as others. So I wouldn't feel super hungry, but I'd get this spacey, apathetic, faded feeling and have trouble focusing.
The longer I waited, the worse it got. But I'd already wasted so much time, I'd feel bad 'wasting' more by taking a break and getting something to eat. So it would go on like this, sometimes for a couple days at a time.
After a few years of this I happened to meet a beautiful, loving girl who also liked to cook. She made sure I ate at least one good meal a day, and lo and behold, the focus problems largely went away. I put two and two together and nowadays when I feel the fadey feeling kick in, I know what it is and get up and get a string cheese or something.
I imagine this probably sounds ridiculous, and I think I may be the only person on earth to have this specific issue. But I just wanted to reinforce the _practices_ bit. It could be something simple. Maybe find a trusted friend or coworker to watch your work practices for a few days and tell you if anything seems odd?
It turned out my office had bad ventilation. Working with the door open fixed that problem. Simple :)
Somehow a doctor figured out I was mildly hypoglycemic, basically you have to eat consistently and everything, but if you haven't eaten in too long you get that long crash where you end up just being almost exhausted for no reason. I always make sure I eat at least something for breakfast lunch and dinner and grab a small snack in the afternoon, an it helps a lot.
I just worked for 16 hours on nothing but a hot dog, a candy bar, and a granola bar. Even though I feel almost dead right now, I'm still not very hungry.
Oh, so this happens at work...This exact same thing has happened to me many times and here is what I figured out...
The problem is NOT with you, it's with the work.
Like you I have scored excellently on interviews and tests and have written code so cool I even surprised myself. So we have to believe that we are as good as we think we are. That belief is what enables us to take on the hard projects. That belief is also what turns our brains to mush when our work is too many levels below our capabilities.
Sure, we all do work below our level every once in a while; we have to, that's the nature of the beast. But when you're doing low level work for too long (like at many jobs), you lose energy from the lack of stimulation. We then mistake that lack of energy for many other things: our skill, our commitment, even our health.
Here's what I've done in situations like yours: build something cool on your own time. It will get your juices flowing and you'll be your old self in no time. Of course, you'll want to work on your own project instead of your employer's, but that's another problem.
Another problem that's fixed by having a profitable side project ;)
Apparently your inspiration is at a very low tide and you don't seem to derive much enjoyment from your work.
This is not something you are going to 'fix' (unless you're just looking at the short term) through technical measures or tricks, your body is giving you a pretty strong signal and you really have to take it serious.
In the long term your inspiration and energy will return but you need to conserve what energy you have left to maintain your health and your relationships with other people, not to pour it in to some chunk of code unless that would give you the energy to do more.
It's very tricky to give you any solid advice without knowing you much better, please be careful.
I do not second the ADD responses in this thread, they do not mesh with your analysis of yourself in some particular respects, the thing that jumps out most at me is this: "every time I sit down to code my brain turns to mush" and the second is this "One possibility is that I'm not as good as I think I am", that means that even though you may not be 'burned out' you are definitely in the risk group for burning out.
While this may be a huge change to think about, don't underestimate it as a real viable option.
I actually was having the same problem as OP and have been in the process of switching careers to screen printing of all things. I've noticed myself having more energy both in and outside of work and a feeling of accomplishment that I'm actually getting shit done in a measurable way. When I actually do sit down to write some code in my off-time, I've felt much more inspired and have actually had the drive to finish the things I start.
Obviously this is all heavily YMMV, but certainly something to consider.
I don't want to get into specific advice, as I don't know you, but don't forget that there are many types of programming. If you are doing web stuff and are super bored, maybe you really should be programming robots or video games. Personally, this didn't work for me. I do like the thought processes in software, and I like typing in code, but I greatly dislike sitting in front of a computer for longer than about 2 hours.
Someone on HN mentioned a couple of self-help books by Barbara Sher. I've found them very useful, they are not flaky or very "self-helpy" just more practical advice about career changing and trying to figure out what I'd rather be doing.
Good luck.
What helps me personally is having a notepad where I jolt down TODO items, to the most atomic level if possible. To give an idea what's on it here now:
- probe for activity on the I2C bus
- find the SIGCHLD problem
- remove rectangle in the logo on web interface
- follow up to a customer on his RFI
I.e. tiny bits of work that do not present much challenge separately, yet are actual, necessary things to be done. No deadlines, priorities, long descriptions, etc. No grand items like "add feature X" or "do complete test coverage". They are easy enough that I can complete at least one (but usually a bunch) in the day, and strike it out. Each time you do that, there is a modest tingle of gratification, so it helps to maintain working mood. Also, looking back at the list of completed items is reassuring.I not only felt accountable to myself, but as I work alone, friends or family visiting me would ensure my checklist was being ticked off and ask questions on specific points ("why haven't you done that?" "because XYZ is taking longer than expected" etc...)
The list makes you answer questions about how you'll tackle the problem, it also allows you to think without staring at a screen which is beneficial.
If I need to add a feature, I just come up with first obvious things that have to be done, and expand it as the problem works out or new circumstances arise. E.g. I had to add a protocol support (Modbus TCP & UDP) to the product, the list ended up like this (editorializing a bit):
- get green light from the manager
- read the spec for minimal conforming implementation
- implement conforming request parsing
- implement register read command
- add application-specific bit X to a register
- add application-specific bit Y to a register
- implement UDP recv/send loop
- test UDP part
- implement TCP listener
- test TCP part
- fix zombie issue with TCP handler
- test TCP part
- build of product with the new feature
- test the build
- test the build vs real PLC
Perhaps everyone has at least some ideas what you should do when you begin on chunk of work X, so you just write them down, no matter how trivial.So yes you can train yourself to be a wonderful cog in somebody else's machine. But consider the other advice here: find a better project. You have never actually been in charge of your career until you took a job that paid Less, because the project was better.
1. get yourself checked out for ADD. I'm not saying this is the problem, but it's easy to check for, and if it is the problem, there are drugs that can at least temporarily make the problem just go away. Now if this is something you've never experienced until just now, it's probably not ADD. But if you've had these sorts of problems on and off forever, (I know for me, my performance falls off a cliff after I've had a job for about a year.) ADD is something to check out.
2. Try pair programming. It works really well for me.
3. Move into management. Even if your organizational skills are not great, having the knowledge of the field gives you a pretty good leg up. If you manage your own company, you can hire people specifically to take care of the things you are no good at or hate. You can get a CS student to watch you code and kick your chair when you stop for under ten bucks an hour.
Do NOT let this relatively easily solvable problem destroy your career. I made this mistake early on in my career and paid for it with a lost job. I'm glad things ended up the way they did, but it would have been better if I left there on good terms.
Even if medication is a temporary fix, it might be what this situation calls for. Often in life we have to chose the best of two evils, and your career is not something to put on the line. I know that I am way happier working 40 hours a week steady than I was when I would binge hack for 120 hours straight while riding a motivation wave.
If you can get yourself back into the groove and being productive, try to figure out what gives you motivation and try to work your way into a position that continuously feeds you these things. That's what I'm working towards.
Holy crap, you just described my life. There's no way I'm an extreme case, but maybe I really do have a little ADHD going on...?
I think that the lack of drive and focus is a symptom of something, in rare cases perhaps ADD/ADHD. However from personal experience I usually discover a core problem that was causing these symptoms. Resolving that problem takes care of the lack of motivation and focus.
Perhaps the specific work environment isn't for you. One job I worked directly out of university crushed my soul as a developer. As an intern I had vast responsibility and did a lot of interesting projects. Once I joined on fulltime, they were going through a restructuring period and I ended up doing trivial work putting out fires. Luckily they downsized a third of the company a few months later and I was fired - a blessing in disguise there. A week later I was running a small team doing innovative new projects at a large corp.
Often it can be outside factors in life that strangle your productivity. When my father was very sick and hospitalized, my work drastically suffered. I'd like to consider myself a strong individual whose outlook on life would allow me to deal with such events with ease. However, in the situation without knowing it at the time it was impacting my life. Instead of taking a few weeks off and dealing with the issues at hand, I threw myself into my work while my progress continued slowing exponentially. Eventually I was working 16 hours a day and writing 0 lines of code. I ended up quitting that job, and taking time to deal with my life.
Anyways, the moral of the story was stepping back and discovering the root cause of these symptoms can be very beneficial. Don't block it out with meds unless that is really the cause.
"frequent shifts in conversation, not listening to others, not keeping one's mind on conversations"
I can have "black out" episodes where I impulsively and immediately walk away from conversations without finishing them, often with a little amnesia. I've asked my girlfriend a question, essentially immediately forgotten that I did so, and turned up the radio volume.
Really? That's news to me. How do they check?
> Move into management
+1. The tech world needs more managers who actually know tech.
1. The doctor will interview you and ask you about your history, all the way back to childhood. If you haven't had problems focusing, concentrating, etc. throughout your whole life (even as a child), the doctor might be skeptical.
2. They'll test you to make sure you're not having seizures.
3. They'll also test your focus, concentration and short term memory with a computer test called CPT (continuous performance test).
Assuming you have a history of ADHD symptoms, you currently have symptoms that are interfering with your life, and you do poorly on the computer test, the doctor will probably start some kind of treatment, probably using prescription stimulants.
That said, I'm sure there are a lot of other medical conditions that cause symptoms similar to ADHD's. You might end up learning you have some other problem entirely.
The first doctor I tried wanted to have me see a shrink to get tested. The first visit cost me a $50 copay and then I had to have another visit to do the actual test, costing another $50 copay. I skipped that second visit and went to another doctor. (The shrink seemed like a quack anyhow).
My new doctor whipped out a giant book and started reading a battery of questions from the back of it. Based on the answers to those questions he determined I "met the requirements for treatment." Seemed a bit weak, but I didn't ask any questions since I knew I had already been through all the typical tests before. having been diagnosed as a child.
TLDR: YMMV. Just talk to the doc and see what he says.
Typically diagnosis is made after an interview (about an hour) and questionnaires. If there's some doubt about the diagnosis you may need to bring in old school reports. It's also possible to diagnose using brain scans now (e.g http://www.sydneydevelopmentalclinic.com.au/brain_scanning.h...), and medication can be trialled and selected on the basis of an individual response to the medication (shown with another brain scan, or using testing, e.g http://www.sydneydevelopmentalclinic.com.au/medication_testi...).
It's like a very boring 10 minute video game. You click a button when a certain stimulus is presented on screen, but not when a different stimulus is presented. It measures your reaction times and your errors (click when you shouldn't, don't click when you should). Then the program does some statistical comparisons and prints out a report.
At least, that's what was done in 1993. Could be different now.
Combine that with a history. I imagine it's a lot easier to diagnose in adults, because so much more data is available. And the doctor doesn't have the pressure of diagnosing ADHD for a little kid whose parents are worried he'll get less out of school. As an adult, that damage is already done. ;^)
It's an interview process. But really, as far as I can tell, the check is "do the drugs make you hyper or do they make you focused" The only definition of ADD that I've heard that differs appreciably from simply being lazy sometimes is that people with ADD respond differently to stimulants. Jack up my nervous system enough and I'll actually lay down for a nap.
I found that morning meetings with the other devs on the project, where we are all publicly assigned stories to complete in the day also helps - you don't want the rest of the team feeling like you're slacking off, so you push on through the distractions. But of course, you need the whole team to be on board, and indeed, you need a team!
As I often work alone, the Agile methodology that helps me the most is TDD. It helps me keep focused on what I need to do next. Conceptually it's similar to a TODO list, as suggested in other posts, but it has the advantage that you can't allow the tool itself to be a distraction (I've tried TODO lists, and I end up playing more with the list than with the work). With TDD, either you're writing tests, or you're writing the product code, but either way you are creating an artifact that is useful to the project.
Another good strategy is to break everything down to small tasks. Tasks you can do in 30 minutes or less. Watching the list getting shorter makes you feel like you're doing something. I think this is part of the agile approach.
Excellent idea.
Are you happy with your job - or just the salary that you get paid? Take some time and think about your motives for staying where you are.
Maybe you can look for advancement (challenge) that will help you to be renewed in your current job; maybe you simply need a change. If you do decide to move on to something new, I highly advise taking an extended break between the old and new... reset, refresh and revitalize.
You have to know what the problems are before you can solve them. Seems simple, but it's surprisingly common to overlook this one simple truth. Just ask yourself - what do you like about your current job?
Luckily I still have a reputation earned from some years ago. Plus, I interview well. People still give me jobs.
Managers don't seem to have a response here. In my experience most managers only have one bit of information devoted to programmer ability (ROCKSTAR xor SUCKS). They have alternately told me to try harder, or threatened then fired me.
I had felt like I was deceiving employers so I took a nine month break and did an artistic project. However even with a whole day to do nothing but that, I wasn't able to achieve much. I worked with a small number of people and lef that project, and it got done, but not very well, even though it was my "full time" job. Still, I felt that I had had enough of a sabbatical, and also had made some progress in psychotherapy, so I returned to the workforce, only to run into the same problems I had before. I now think the psychotherapy was not addressing the right problems -- it's more about what I do than how I feel. And it's clear my attempt at a sabbatical didn't clear up the fundamental issues.
I have friends that are able to learn programming languages on the side or take blacksmithing courses and otherwise have full and exciting lives. In other words they have reserve energy. I am so behind on just the basic requirements for my project, I feel I can't do any of this. I schedule more and more and more and more time for work and yet still nothing gets done.
As for happiness with work; I have a pattern of working with codebases that are in great need of refactoring and I am feeling a great need to stretch out and do something more original. So that is a problem.
That said, the guy who sits next to me has enough energy to actually satisfy those needs both at work (gets managers to agree to major refactorings) and also code up some great things in his spare time. Whereas I'm perenially playing catch-up and my code is ugly.
Working with existing code that someone else wrote is harder than a new project. I've only really gotten into heavy testing in the last year or two, but having tests also improves confidence that your changes are not bringing down the entire system.
Finally, what I would say is you need to get into a habit of mentally stimulating yourself after work. I found that when I was in a rut, I thought that I was burnt out and needed to "veg out" more, but I later felt that vegging out only bred more laziness and more procrastination. Once I started to get my brain stimulated in any way, whether it was reading a book, or trying something to learn something new, the effects would carry over.
Summary, laziness breeds more laziness, and stimulation actually recharges you.
Personally I'm pretty prone to burn out. I work as a developer and have lots of programming side projects I work on. My advantage is that I can sense the burn out and when it happens I stop all side projects and try to do mostly administrivia at work.
I did stay in one programming job while burned out for over 2 years (this was before I realized what was it was). I produced practically nothing in that time but the act of sitting there trying to force my way through made the burn out get gradually worse. I stepped completely away from programming for about 30 months to get over it.
Another thing that made my burnout worse at that company was that the environment was so incredibly awful. Are you sure you're actually happy where you are, or do you say that because you fear being fired again? I would have said (and if fact did tell someone) that I loved my job during those dark two years, but it was because I felt worthless and unable to get anything better. I wasn't trying to trick the person that I told, I was trying to trick myself into believing it.
And I feel that there are people who could be a bit better at what I do now: people with very very good memory. Maintaining a huge illogical mess needs very good memory and nothing else. I don't have very good memory. That's why I love logical and conciese solutions which have 'philosophy' behind them.
1. There is something else which is pre-occupying your subconscious mind. Probably something which you are trying to sideline as not a big deal, but subconsciously it is a big deal. Find out what that is and take care of it head-on. This will fix itself after that.
2. You might not see yourself being 'successfull' in this job over a longer term. For example, you want to do a startup and even though you need this job for the money, you still understand that your longer term interests are better served by quitting right now and doing a startup. It could be something else but essentialy what could be happenning is that your subconsious realizes that you doing this work is not getting you any closer to your longer term goals and hence it is revolting.
Do not seek to change yourself or your circumstances right now. Only seek to understand yourself - once you have done that these things will go away by themselves.
I think there are two pieces to being effective at programming. If you have a clear idea of what you are trying to achieve, you can just bang out the code. Unfortunately, most of the time you are understanding the problem while you code it due to very ambiguous specs, so you just can't code as efficiently.
Last, but not least, tweak and tweak away. Write some code, take a walk, come back and take a look at it again. Review your own code thinking about where you are making mistakes, it'll give you a map of what to watch out for.
Helped me get something done.
-Don't worry about it. Its just a phase and it happens to the best of programmers.
-Drink loads of water. I don't know the biology behind it but when I'm properly hydrated I think much more clearly.
-Take some time off work. Play a game, watch a movie. Any of those guilty pleasures that you generally avoid. And don't feel bad about wasting a bit of time. Your mind needs the rest.
-Cycle through different kinds of music. I see that sometimes working with music helps and sometimes working without. Sometimes changing music genre helps. I cycle through phases during which I am most productive in either Heavy Metal, Folk, Classical or 80's pop music.
-Aboodman has already mentioned the importance of timely healthy meals. I tend to keep some fruits with me when I start programming, to munch on over the programming session.
-Something that might be the most important is, solve easier problems and gradually move to the harder problems. Generally (and managers would tell you) that you want to solve the harder problems first, but when you are in stuck and looking for inspiration solve some easier problems. If there are no relatively easy problem at work, there are lot of easy programming problems available on the net (Google programming interview questions). Find some relatively easier problems and code a solution. Then, move to relatively harder ones.
--I tend to like easier problems where the target is to achieve a particular performance (say processing should end in xyz seconds) because then you could gradually improve your solutions. Victories in small battles are just as important for our mind as the bigger ones.
Just my 2 cents.
edit: formatting
I've been doing most of that lately, though I can get into a dream state quite a bit where I want to make something really awesome that will slow things down a bit too far.
I don't get a lot of friends and associates asking about my progress, but I always make sure to reach out to them every so often to see how they are doing and offer myself as a resource if they need it for anything.
I remind myself though, that what you see in others around you is the polished exterior surface of their lives, which many times hide the tangled mess of cabling and crap inside. My point is you are comparing your messy insides to another person's polished exterior - hardly a fair comparison for you.
Best of luck
Here's what's worked for me:
10 under 10:
Every night I write out 10 (or more) tasks, each under 10 minutes. I make sure there's a few super easy ones (coupla minutes each) at the top of the list. That's what I work on the next day.
10 mins is a good length. It means you have to think down to near the deepest level of a task. I found with 20 min tasks, it's very easy to get mentally lazy, & next thing you know you're depressed/unmotivated coz something you thought would take 20 minutes is actually a day's work, full of subtle gotchyas.
Each day I try to do 10 of these tasks. If I achieve 10, I know I've had a good day. Thing is, once I've done a bunch of them, I'm usually motivated enough to do to a ton more. Eg, today I've done 79 (so far).
10 * 10=100 minutes of coding may not sound like a lot, but you'd be surprised how little actual work most people do (see: Office Space).
I keep two lists: the 10 under 10, and my 'done' list for the day. As I do something, I c&p it from the former to the latter. That way if I need perking up during the day, I can just look at my 'done' list to see how productive I've been.
Identifying limiting beliefs:
This is a bit trickier. It's easy to see the noise at the top level of our mind (mental chatter: "This problem is too tough for me" "I can't do this" etc). That stuff is relatively trivial to let go of (just decide to, you're the boss of your brain).
What's trickier is finding the subconscious stuff, doubts etc that affect our behaviour, but don't necessarily rise to the level of conscious thought. What I've found is that a lot of times things are so abhorrent that our mind "protects" us from them by hiding them. You can only see that you're being limited by looking at your output (behaviour, patterns, productivity etc).
A useful framework is this:
1) Assume you can do anything (as you pointed out, within this field there's no reason you can't).
2) From that basis, anything you're not doing is because you WON'T. Thus,
3) Ask yourself "Why won't I do X?" - with the followup question "What am I afraid of?"
What I've found is for every "won't", there's a fear behind it.
Now, the super subtle thing is this: You won't necessarily get any internal (mental) answers to these questions. However, if relaxed & attentive, you may feel tension or energy rising in your body in response. This is your body's physiological connection to those deep fears. Know how when you get stressed you tense your shoulders? Yeah, it's like that.
So, when you feel that energy or tension rising, in response to the questions, just let it go. Make the choice to consciously relax & let go of that tension. As you do, what you're doing is simultaneously letting go of the associated belief. Keep letting go till you feel relaxed about the questions.
Those two techniques combined have worked wonders for me, coming from exactly the same situation you describe. Good luck!
For what it's worth, I've gotten good use out of the Pomodoro Technique ( http://en.wikipedia.org/wiki/Pomodoro_Technique ) to keep myself focused, but it usually only works for me if I'm already motivated to begin with.
Doing both the 10-under-10 and Pomodoro may help to get things started and keep the momentum going.
It's no biggie though. There are was of coping and over-coming your issues. As others recommended, exercise helps. If physical activity itself doesn't help, try something with a strong mental or emotional component like martial arts, rock climbing, or dancing. You just need an outlet for whatever you're holding on to.
I have some success with a product(webapp) that i build, outside my job and recently get bussines angels money to start my own bussines. I dont know if i undervalue myself but i have the feeling that i dont deserve this success. I'm afraid of fail because my work style problem. I hope that now that i go into management and will hire people the things change but i'm not sure, maybe the problem affect all my personality, i used to act similar in my schools days. Some time i think is a kind of mental problem.
Excuse my english.
A very experienced adult has strong notions of what is possible. If you're around very successful people these notions are lofty.
Sure it's possible to bang out a program in an afternoon. I used to do it. My coworker does it all the time. But I am not doing it now so there must be something very wrong. Maybe I'm too old or depressed or have ADD or ...
I found you just have to really step out of your head for a second. My managers are genuinely happy with my progress even if its slow. They know they can count on me to understand the problem and keep advancing and deliver something that works, even if that takes weeks where it could theoretically be done in an afternoon.
Furthermore, they want me to be relaxed and happy and that means it's fine to play hooky or slack off some days.
So I just focus on my personal relationship with my coworkers, and my mental health, not my "productivity." I am not a robot.
Your first line is revealing succeeded at some of the hardest interview processes in the world. That means you're supposed to be good, doesn't it? That's paralyzing. How can you know you'll be good at solving a problem you've never seen before? You need beginner's mind™.
The heaviness of being successful was replaced by the lightness of being a beginner again http://www.freerepublic.com/focus/chat/1422863/posts (note: just because he's incredibly successful doesn't mean it we should all try to be like him; but this quote does chime in with my own experience.)
Little things like inconsistent return conventions or code disagreeing with documentation comment blocks.
People are referring me to classic coder texts like Code Complete. Okay, maybe I do need a review but I fucking read that book in the 90s. It's incredibly galling.
Maybe something similar would work for you.
http://www.washingtonpost.com/wp-dyn/content/story/2009/01/1...
I was stuck in the code mines a few years ago; I'd always find some way to convince myself I was happy about what I was doing, but then I read this blog about SEO and started dreaming about making my own web sites that make money...
At that point my mental health really cracked and I couldn't focus on 9-to-5 work at all anymore. It was a sign that I had to change what I did, and gradually, that's what happened.
- Be aware of how much you sleep, avoid chronic sleep deprivation,
- drink enough water that your urine is clear,
- watch out for blood sugar crashes from eating irregularly or eating refined sugar, these can mess your head,
- go running or to the gym, this will kick up your metabolism, and being in a better physical condition might provide more energy for mental work,
- try some basic dietary supplements, some omega-3 source, multivitamins and calcium seem to be commonly used
You said you had done well in the interviews and you're an experienced programmer. By listing these reasons you make appearent that any person with your qualities must be able to produce outstanding work.
By looking from that perspective maybe you're imposing expectations that are too high about yourself instead of just letting it go and enjoying your job.
So maybe treat yourself as a newbie programmer who's just started his career, and instead of trying to do outstanding work you should try to gain as much "experience" as possible.
It's possible that your day becomes to compartmentalized that you don't really have time to build up some momentum on anything? Possibly staying back longer at work might help get a bit of flow happening, I know personally if I was working a 9-5 job it would at times kill productivity with the stopping and starting the next day again overhead.
Secondly, is it your development environment. Some tools have gotten very large and can disrupt the flow of reasoning.
Thirdly, try doing as much of the design work away from the computer. Then when you are there, you are just writing code.
1. Is programming the right job for you? If you feel uncomfortable or dismissive of this line of thinking, consider a quote by Jefferson: "Question with boldness even the existence of God; because, if there be one, he must more approve of the homage of reason than that of blindfolded fear." If programming is the profession that truly satisfies you and complements your abilities and personality, then it should withstand critical probing. Is this something you're doing because it's comfortable and you've never looked elsewhere? Are you truly competent?
2. Build something. Something simple and tangible. Get an $10 point & shoot camera, go into the woods and take 20 pictures of wild flowers. Print the pictures and make a physical album. Do as many of these small, creation-oriented, achievable "distraction projects" as you can. In my experience, they provide a great boost of self-confidence, and this allows me to think about personal problems with perspective and calm. This allows me to introspect in a healthy fashion. Heavy weight lifting and long walks seem to provide the same boost to my thought process.
I hope that helps.
My current activity is cooking. I make the time most nights to make a real dinner from scratch. I've gotten in to bread baking too. The part that I think is most beneficial is both that it produces something that you can actually touch (and taste) and I can finish preparing a meal in an hour or two, so I don't have to wait for months to see the outcome of he thing I am creating. Plus it doesn't hurt to have a solid healthy meal everyday.
1) decide on the task to be done
2) set the pomodoro (timer) to 25 minutes
3) work on the task until the timer rings; record with an x
4) take a short break (5 minutes)
5) every four "pomodoros" take a longer break (15–20 minutes)
That way, after a few month of working that way I could make about 8 pomodoros a day (comparing to 2 at start) and it made me merely 4 times more productive, also attention after that kind of training started to improve.And then I try it, but it doesn't work because I still didn't understand the existing code. Rinse, repeat.
However, just the other week I decided somehow to FIGURE OUT HOW IT ALL WORKS, DAMMIT. I actually kept a glass of ice cubes next to my desk and pressed one to my head if I felt I was drifting, which worked surprisingly well. I realized that this codebase always had a lot of the functionality I had always wanted, hidden away in a particular method. I'd been staring right at it for months and it didn't click in my head.
I felt ashamed.
> Luckily I still have a reputation earned from some years ago.
You've been capable of doing good work in the past, but you're deeply critical of your current work:
> I felt ashamed. ... and my code is ugly.
When you try to work, do you start on an approach but then doubt it and lose momentum?
It could be anxiety. Here are some thoughts:
1. Remember that programming is difficult and takes time. Adjust your expectations to accept slow progress.
2. Refuse to churn, even if it means writing crap code. Consider everything you write at the outset of the project/day/feature to be a rough draft. You will return to revise it, so the rough draft can be utter crap.
3. Keep your focus on a small corner of the project. Seeing the big picture can help you design a higher quality system, but considering the big picture for too long or too often allows your mind to despair. Todo lists help, but the attitude of ignoring everything but the current task helps more.
Pay attention to what you're thinking about when your mind fuzzes out. Are you worrying about something? Learn to recognize the beginning of your focus dropping away.
You said this:
> it's more about what I do than how I feel ... at this point though I feel like there's something wrong in my practices.
I think you're wrong. You knew what to do in the past (you told us so) yet you fail at similar tasks today. Your "brain turns to mush" and you think it's practice that's lacking? Not doing TDD? Too many templates? Not knowing the latest design pattern?
It's in your mind.
Personally I would only try to understand the parts I currently need.
Yes, in theory it would be nice to understand everything before you start. It would also be nice to understand quantum physics, and all sorts of other things. In real life, though, sometimes you have to compromise.
I've had the same experience with specifications, btw. Yes, I'll read the whole document before starting. But usually I only really understand it once I start implementing the details. (I am also not convinced that specs of several hundred pages are any use at all).
Part of me is itching to strike out on my own but if I don't have the discipline to even do halfway well at a job like this, how am I going to deal with a startup?
>I'm doing that's burning up 8 hours a day without actually achieving anything.
If you're certain it is not... have you tried brain hacks like the The Pomodoro Technique? Also considering asking another hacker to mentor you. Simply sharing what you are working on is great motivation. I often tell my friends about the projects I am working on knowing that I will lose traction doing the low level stuff. Having someone you respect checking on progress goes a long way.
And forget about this ADD crap. You are absolutely normal living thinking person.
Much of the coding which I do tends to be oriented around a particular kind of goal which I'd like to reach, and which has remained elusive enough to keep me trying and learning different things.
Are you going out to lunch at restaurants and having big portions?
Are you drinking alot of coffee with sugar and cream in the morning?
Gatbage in, garbage out.
Try doing the easiest things first. That motivates you to do the next and the one after that. It also helps get you into some rhythm
Also, Try taking a break :). It helps
The level of technical discussion in HN is very low. Either HNers are not knowledgeable or is just that they/we don't use this forum for in deep technical discussion.
Get something done.
It'll help you GTD and also helps structure your thoughts.
Not least because there's an audio clip out there of Curly of the Three Stooges saying it.
Of course, to each his own.
1. Tim Ferriss's 4HWW suggestion to focus on one or two things a day and when you're doing one of those things, do it in one shot. Don't take any breaks, ready any news, or get lunch before you're done with it.
2. Scrum. The daily meetings and sprint demos have highly motivated to show what I've done. It's also hard to explain away bad performance when the burndown chart is falling behind because of you.
3. GTD tip: What's the next action? It feels great to boil big projects down to a next action. Sometimes great enough to actually start doing it. :)
4. Listen to some music. Sometimes this boosts my mood and motivates me to delve into a project. The trick is turning off the music once you get to the first problem that requires some deep thought.
Some other possibly reasons, from mine (and others) lives.
Check physical health. "Random" examples: Sleep apnea. Bacteria infection.
Some weird allergy/food intolerance. Change where you work, eat and sleep. [Edit: From comment below it seems you've had this long enough and in enough jobs to know this isn't true.]
You might have problems relaxing when not working, try a course in meditation. [Edit: You took time from comment, so this is probably not it, either.]