3 ms·
> I'm the kind of guy that likes to re-run his code continually to see if it validates to what I expect it to be doing This honestly is a bad habit. Thought it
by rapsey 6y ago
> I'm the kind of guy that likes to re-run his code continually to see if it validates to what I expect it to be doing
This honestly is a bad habit. Thought it does depend quite a bit on the type of work you are doing. For some things it is necessary especially if it is inherently fibbly.
Rust is a language to which the programmer must adapt his way of working and thinking. If the programmer is too set in his way, his Rust journey will be unsuccessful. If the programmer is adaptable, he will come out in the end a better programmer, because the Rust way is actually the right way.
I think I actually went a couple of weeks once before trying out my program for the first time and there was no big deal to get it to actually work in the end.
- bluecmd 6y ago> because the Rust way is actually the right way. [Citation needed]
- johnfn 6y ago> This honestly is a bad habit. I'd like to hear some justification for this rather than a blanket assertion. Just because our work styles differ doesn't mean that my style is necessarily wrong. > Rust is a language to which the programmer must adapt his way of working and thinking. I mean, Rust is actively attempting to improve compile times. It's not like devs made them intentionally long to cultivate good programming habits or something. So I'm not sure how this is relevant.
- rapsey 6y agoThe most time wasteful part of programming is debugging. Writing slowly and thinking through your options and double checking what you wrote saves time. Especially since you are doing this while writing and you have the complete picture in your head. Obviously it does not catch everything. But one should strive to minimize detective work.
- drenvuk 6y agoAfter I've been programming for an entire day I will rely on the compile to tell me when I'm wrong with an assumption. I'm honestly trying to conserve mental energy so I've learned that it's better to do it from the start and avoid keeping track of as much stuff as possible in my head. The compile tells me something's wrong somewhere and I go fix it and move on. That's not detective work, at least it doesn't feel like it to me since it's so quick.
- rapsey 6y agoYou are talking about compiling he is talking about running. Finding issues from running results in detective work.
- ironmagma 6y agoTurning off parts of your brain is generally not a great idea when the goal is to write code that works. A better way to conserve mental energy would be to take a break, go for a walk, or just context switch for a while.