29
Kyu96
5y

Not sure if I should be happy of I should cry.
...

I woke early today so I could directly start working on my little project to make some progress.
I was coding for ~10 hours.. The code worked fine for all testcases, except for one. I debugged for hours and I couldnt figure out what was wrong. I tried changing stuff in my code and it got more and more messy to the point where I couldn't even understand my own code anymore. I was so frustrated ...
> Deleted everything I made today.
> Rewrote the entire thing in one hour with a different, more structured approach.
> Worked perfectly for all cases, even the very complex ones.

1 day wasted....

Should I be happy that I came up with something decent in the end? I am still mad cause I wasted the entire day.. Why did I not directly went for the thing I did in the end ..? ._.

Comments
  • 13
    Time spent debugging, examining and mentally wrestling with code is never time wasted, however much it may seem at the time.

    Or to put it another way - if you never make mistakes, you'll never make anything.
  • 9
    You could have made the right thing straight away. However, this would have cost you about 10 hours of thinking before...
  • 6
    I piss about and experiment too. If you got a result in the end it wasn't wasted.
  • 4
    Well impatience is big problem in software industry so you should be happy that you see your mistakes.
  • 2
    That is totally normal, happens all the time.

    You know that first day you were subconsciously analysing the problem and working out why the first approach was flawed.

    You never could have written the second days code without the experience of the first day even if you don't realise it at a conscious level.
  • 2
    dude, We are rewriting a whole project from the scratch now. Because we discovered that we used a deprecated library (which is the core of our business)..
    So you're not alone, and you're not the worst
  • 3
    What do you gain by being sad? Nothig useful.

    What do you gain by being happy? Motivation.
  • 1
    @Coffe2Code that's a big oof
Add Comment