Do all the things like ++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatarSign Up
odite499316dshouldn't you be doing that before anyway?
neeno104516dFor some reason I almost never do that. Seems I'm "weaker" if I do that. I know it's stupid, but idk why I think this way.
netikras2279516dThat's what tdd does by default
C0D45672716d@netikras well yes and no.
Tdd contains the expected result for a unit of work, not how to get to it.
For planning I find a big ass whiteboard and work through it before I touch a line of code when it's going to be a complex matter.
Know what you're trying to achieve before you set out to achieve it, otherwise it'll bit your ass halfway through when you miss something.
netikras2279516d@C0D4 Depends on how you do TDD.
1. create an empty test method
2. write pseudocode with method names:
3. go and implement each method in the same manner: pseudocode method names -> implementation -> pseudocode -> implementation -> etc.
it's like pseudocode-driven-tdd :) It makes building new features very easy as you
1. define your end goal (test method)
2. define steps required to achieve that goal
3. define steps to achieve those steps
4. ↑↑ -- repeat until you have no pseudocode to write and end up with actual code.
I still find whiteboard useful for planning at larger scale
halfflat195716dI'm just sorta amazed that this is a programming tip.
What's the alternative — try random shit until it looks right when you squint?
hjk101230715dI have learned that is the most complicated logic situations you need to ask questions first. This is not a time saver (well in the long run perhaps and definitely for the end user, but not for you).
Does this logic truly represent the real world? (Convoluted reasons with a lot of "might" and "will" in it)
Why is it this so complex?
Is there a better way to solve the problem? (Look at how these things are solved normally)
Basically getting to the simpler solution is the right way to do it. It's bloody hard though and often requires process changes.
nikmanG13CS Professor: “What M word is the black hole to all productivity?” Student: “Management” CS Professo...
jsombrio31They just bought 2 fucking 23" extra monitors for every developer in my org. FEELS GOOD MAN
cjaro5We just spent 30 minutes standing around watching Elon Musk launch his car into orbit. I love working in IT.