Foundational Development Concepts
Tips to improve your quality of life, efficiency, sanity, results, all that good stuff!
Planning
The #1 most important thing to do is clearly define the problem and your solution to solving the problem. BEFORE you start coding.
If you don't do this first, you'll spend much more (frustrating) time trying various solutions until something 'looks right'. This will result in functionality that covers cases that won't be used, and missing out on functionality that was expected.
Analyzing the Problem
Ideally, when defining the problem, you also understand the overall goal of the person performing the task. That way you can identify opportunities on how to streamline their process and recommend alternative solutions.
It helps to do some critical thinking on the problem that was presented to you by the client, or your manager. Is there any missing information? Could this problem be avoided entirely, resulting in no new code being written?
Execution
Pics or It Didn’t Happen
After you change something, it must be tested, no matter how trivial the change. It doesn't matter how sure you are, how experienced you are, or how much pressure you're under. The only way to be sure something works is to see it for yourself.
Sure, when you hand it off for approval they may find something you missed, but at least this way you've saved time and sanity for all involved.
The ideal way to test is on a staging environment that matches the production environment as closely as possible. If you must deploy directly to production, then test it there, making exact records of what you did so you can clean up the data afterwards.
Yes, this takes a little more time up front to be thorough. But it saves a ton of potential pain if things don't go as expected. And let's face it, there are far too many variables to claim that you're in total control of the situation.
Use All The Tools at Your Disposal
If something improves the quality and efficiency of your code, use it. From time-to-time, try new tools that pop up and see if you can fit them in.
Whether it's having a library of snippets, language or framework-specific plugins for your code editor, or macros to perform common tasks, it's worth a try.