For me it was:<p>1. Writing out input output relations for a function with quite a few examples before actually starting to write the function. Basically writing tests. It makes you realise what the function is actually supposed to do. I learnt this from How to Design Programs (htdp) book. It was a game changer.<p>2. Working on Fermi Problems aka Street Fighting Mathematics. I learnt from the books of Sanjoy Mahajan. They made me much better at estimating how the output to some input may be like.<p>What about you?
Before I knew that there was an actual term for it[0], I would get a blank piece of paper, pretend I was an esteemed professor teaching whatever it was I was trying to accomplish. I would "ask my students" questions and "hear their answers". Then I would "guide them to the correct path".<p>0 - <a href="https://en.wikipedia.org/wiki/Rubber_duck_debugging" rel="nofollow">https://en.wikipedia.org/wiki/Rubber_duck_debugging</a>
Code really badly, and feel no shame in that. Then after the sloppy code has been understood, you can start to iterate on it and polish it, making your code seem professional, but you know you started the project as a total noob.
- getting used to designing abstractions before coding<p>- laying out how I'm going to program before starting<p>- using TDD for most bug fixes and refactoring efforts<p>- learning how to steal the best parts of code from other people<p>- code reading everyday via PRs (my mental VM is pretty close to a real VM)<p>- learning algorithms and data structures (at least the basics, I'm no competitive programming pro)<p>- learning how to do code archaeology with git blame
Writing code constantly and with each new product, how do I get it out faster and in less pages? This has made me a better programmer. I aim to try and get projects done from 1 weekend to 1 month and not take too much longer than that.
Thinking at the function level.
Instead of thinking: view, controller, Service , database .<p>I write a function that does what I’m trying to accomplish, like image upload.<p>It’s a small part that can be reused in some bigger system.<p>Then make it work with a few constraints: file size, file type.<p>I also hardcode stuff