Sign in to follow this  
Waaayoff

How often do you revisit your hacky solutions or "ToFix" comments?


Recommended Posts

Always.

 

I always reread and reread my code.  This is my typical workflow:

 

Write -> Test -> Read -> Write -> Read -> Test -> Read -> Test -> Read -> Write -> Read -> Test -> Read -> Test -> Read -> Commit -> Read -> Read -> Refactor -> Test -> Read -> Refactor -> Read... and so on

 

those TODOs won't survive the endless rereads.

Edited by alnite

Share this post


Link to post
Share on other sites

I can't move forward with code until my current solution is to my satisfaction. I've iterated on code for a week or more on personal projects verifying a design. I'll get done with it and more often than not decide on a cleaner design or algorithm. There are no TODO comments. I makes my coding very slow, but it's code I'll go back and look at later and reuse.

 

It's interesting at work I have to maintain and fix bugs. I don't know how to put it nicely, but it's horribly designed and prone to error with >50% comments or commented out code where most of the comments don't match what the code does. (Not the new projects, but old ones). It's weird seeing the difference in coding styles. I ran into one part while fixing a bug where a previous developer had copy and pasted some code in like 10 places and made a change to like 3 of them and forgot the rest leading to very weird behavior. My favorite one the other day was "// Does this even work?" while looking for a bug my breakpoint lands on that. "no is the answer, are you kidding me?" Good times. The code is filled with TODO statements and it wasn't really written in a rush.

Edited by Sirisian

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this