When I was at a corporate programming job, I accepted jobs from my boss even though I knew its going to take more than 40 hours a week. It stressed me out.

My seat mate even gave me an advice not to over commit on my tasks because they’ll give me more. And he was right.

So here’s the key, do not bite off more than you can chew.

We programmers are measured based on the ff:

quality of work, meaning zero bugs timeliness, meeting the deadline earlier than the due date. efficiency, strictly 40 hour week and no over time.

So the first step in stress free programming is not to accept a task you’re unfamiliar with. When I say unfamiliar, it means when the task specifications are not clear. You have to ask your team lead to be specific on the input, output, validations, and different scenarios if not have a detailed business requirement documentation.

Second step is do not commit to a task if you cannot estimate. Break it down to a more detailed work breakdown schedule or into sub-components on a technical perspective. If you can’t do it, it only means you have to acquire more knowledge in the technology, framework or tools your company uses.

Spend time to plan and do an estimate because it manages expectations between you, your company and the client. Do not sit down and code without it. Leverage on your team lead in helping you to plan and pass the accountability to them if they are not able to explain the detailed customer requirement or user story. Strictly, no specs, no estimate, then no coding. In addition, try to put a buffer on your estimates so to ensure you always finish earlier and not be stressed out cramming to meet the due date.

Be resourceful. If you’re having a hard time defining the algorithm, then use the Internet, seek for an API/library, do not reinvent the wheel. Your colleagues or team lead may I also assist you in brainstorming for the best pseudo code. Algorithm definition is the most exciting task in software development. Your team will gladly help you on this because this is where programming skills are recognized.

Coding and programming is supposedly a fun job. It is gratifying for us to be able to resolve a machine problem specially when we see the end-users happy about the software tool you made for them. Its your choice if you want it to be stressful or not.