3 ms·
Ask HN: How do I become more careful?
I finding myself making a lot of careless coding errors and also failing to consider all the repercussions my changes.
For instance I recently lost a lot of work because of a careless version control screw up.
I try to focus better but there seems to be a limit beyond which I just cant avoid slipping up more often than normal people.
What are the techniques that you use to achieve greater rigour and perfection in your work ?
- lostInTheWoods3 13y ago- Make small changes, frequent commits - Make testing habitual - Keep a record of everything you do - Have a backup. Be ready and able to revert. - Automate what you can - Create procedures (checklists) for common tasks - Slow down. Never rush to commit code. If your problem is focus, identify what the distraction is and deal with it.
- beobab 13y agoGet lots of sleep.
- chany2 13y agoDepending on what you are building, I think its natural to make mistakes. If you are building your own product, your mind is probably spinning between technical, design, and marketing. Within each buckets, you are also trying to think more innovative-ly. With inclusion of you doing research, and constantly thinking outside-of-the-box, its human to forget a previous step or two. The other option is using stuff like Koality, which allow you to test your code in development with a production environment.
- nmc 13y agoTwo pieces of advice: Read "horror stories", like a crazy bug introduced by an innocent commit, or how forgetting a single line of code can lead to a massive security breach. This will give you some "subconscious awareness" about the power of the tools you are using. Pre-emptively prevent yourself from making mistakes. If you know you often misuse some command, just make it ask you for confirmation: function confirm() { echo -n "Continue? (Y/N) " read YN return $([ "$YN" = "Y" ]) } alias rm="confirm&&rm" You could even consider more elaborate checks, like GMail's "Mail Goggles" [1]. [1] http://gmailblog.blogspot.nl/2008/10/new-in-labs-stop-sending-mail-you-later.html http://gmailblog.blogspot.nl/2008/10/new-in-labs-stop-sendin...
- professorTuring 13y agoIf you want to become more careful then you have to: 1. Age: the older you get, the more errors you have made in the past, the more careful you are. 2. Meanwhile... make yourself a procedure with bullets (or a decision tree) for critical things and stick to it . Sticking to it is fundamental. Something like "1. Make a backup of the original work. 2. Check the origin of the problem. 2. Check the solution done. 3..."
- caw 13y agoI use post-it notes on my monitor to remind me of things, until I don't need the note anymore. When I first started managing NFS storage, I had "Never use recursive" taped to my monitor so I would never do something horribly recursive across the NFS space.
- runjake 13y ago- Get enough sleep. - Exercise (even walking) to keep the blood flowing well. - Eat right & drink water throughout your work day. - Eliminate distractions (HN) and arrange regular periods of silence each day(eg. no radio or podcasts on my commutes). - Maintain GTD-esque dump buckets for stuff that shouldn't be stored in your head. Get those things out of your head and into your system so that your brain can more easily focus on what needs to be done.
- Mankhool 13y agoThink before you act.