This short entry was also published on my personal website
I have been reading some good books on forming habits recently. After digesting these, ...
For further actions, you may consider blocking this person and/or reporting abuse
Any tips on where I can find programming exercises?
Codewars.com is a cool site with a bunch of exercises
thank you!
Code wars is a nice site, but the exercises are only little algorithms. Sadly they can't reproduce the experience made with an (even little) completed project.
pragprog.com/book/bhwb/exercises-f...
Avoid "future programming" -one of the strongest points here that seems counterintuitive, but is fundamentally critical.
Simple designs are future proof... complicated designs anticipating an unreal future are messy (not clean).
"Last Responsible Moment" - The key is to make decisions as late as you can responsibly wait because that is the point at which you have the most information on which to base the decision.
I've been here so many times that I'm actually ashamed.
First think of the Minimum Viable Product (MVP). Give functionality to yourself or your client. THEN, when things are working worry about improving them.
Trying to create a perfect design from the start is impossible, mainly for one reason: we often don't really understand what the client wants, and neither does the client. When we work on small functionalities that grow and improve over time, we give ourselves (and the client) time and experience to understand the domain of the problem and understand WHERE the software needs to be improved for real.
Great input. I heave heard something like that somwhere... not sure where though. Take your time to make a decision and decide late, but then execute fast.
In line with these practical habits, I would add the habit of thinking in commits: Even if I work on non-programming projects I put the project in a git repo and I structure my work in steps doing one thing at a time, commiting and then reviewing the changes.
Doing work without committing it after feels like I haven't finished it.
I also started "writing any code from forming some test cases". Basically after I create a method in an interface, I leave it unimplemented. Then I create a test class with various test scenarios so that they all fail first! I will work on the implementation till all test cases pass.
I think I share your point of view about being "in the zone". To be honest, Being in the zone as a developer doesn't look all that attractive. I always thought as "the zone" as a state of mind where you are performing at your highest level, doing things you already know.
As a developer, you might want to always reach outside your comfort zone. Not always, but a reasonable portion of your time should probably be spent stretching your comfort zone, feeling uncomfortable.
"Flow" is not doing things you just already know. It's when your skill in an area is high and when the challenge is high as well.
This graph, from the wikipedia article on Flow sums it up succinctly: en.wikipedia.org/wiki/File:Challen...
What you're describing is more in the "Relaxation" section
Thanks. You are right but I believe we all, devs or not, should aim to keep on stretching the comfort zone as it seems to be the best way to grow. :)
I love doing desktop tests with paper and pencil for complex functionalities with lots of logic. This helps me understand and better document my code.
I do this too! It's usually to try and understand what code someone else wrote is doing.
I'll take the excerpt I'm stuck on, print it out, and then draw lines between function calls, highlight areas, etc.
There really is something different about having it physically in front of you.
That is great! It is sometimes good to write or draw our thoughts down on a good old piece of paper. They appear to make more sense when we can see them with our eyes. :)
Eight useful programming habits:
Yea, I have bad habit. Sometimes my mind drifts away to other thoughts, when I read. If anyone has something similar, would want to know how you deal with that. Personally I end up re-reading the paragraph.
"So basically short zone bursts are great for performance but make sure you take regular stops."
Couldn't agree more. Not only this, but failing to do this could lead you into burning out for weeks.
I was once working 2 jobs, a mall job from morning to afternoon and coding from afternoon to night. I would never take breaks.
I got the project done but by the time I was 80% complete I was working only at 50% efficiency. I tired my brain out. Especially since it's staring at a screen all day.
Great write-up Bart.
Oooh! On the note of auto-saving: I do that too, and moving to IntelliJ which saves on my behalf was annoying at first. But! I found a trick: Make Cmd+s/Ctrl+s run your last test. This works regardless of programming style, but it gives you super powers if you're doing TDD! It also subconsciously validates that your files have been saved as they must be saved to be executed.
Great article!
This Ctr+S habit is a real lifesaver.
Do not under estimate the power behind a sound-proof basement. We architects would rather say "it's a trade off" ☺
These are all great tips.
I see a co-worker using this and it seems so weird to me, but you and he seem to love it.
Thanks Ben! I know it seems weird but at least it does not make any harm.
I do this, it's also saved my bum a few times.
Sometimes I get carried away and save my browser. lolol.
I did that twice today. Accidentally saving my served files that I'm only occasionally demoing in the browser. It's embarrassing when you're showing a teammate a bug you're currently trying to fix.
I often tend to create wrong assumptions and take them for granted while spending too much time in there. Thanks!
Great list! . One habit that I have is to have a notebook and a pencil to write all sort of things and sometimes to draw some quick code debbug.
Yap cmd+s is Life.
These are great! Book name?
Thanks! The book I had in mind while writing this was Stephen Covey's "The 7 Habits of Highly Effective People" and although it is definitely worth reading, it has got nothing to do with programming. :)