Skip to main content

Staying healthy == better code...

As developers on any given day we may put on the hat of many different roles such as the requirements gatherer, interpreter, problem solver, designer, coder, user, tester and many more...

This article aims to highlight links between good coding, more productive development and some best practices for the most sophisticated of systems, our bodies. I encourage you to comment and suggest other techniques that you have found beneficial also.

Let’s get one thing said before we kick off. I for one have been on projects where caffeine and junk food where absolutely necessary to crank out a big ‘go live’ or update code over a 24hr period that could affect hundreds of thousands of people or involved in a hackathon guerrilla event where commodes were more efficient than using the bathroom J. However, when the dust settles and things are a little more normal and day to day, good health habits can make a big difference to not only help you think more clearly but deal with those high pressure situations when they arise tomorrow.


When I was a kid I remember a book entitled “You are what you eat”. It’s a phrase that stuck and sometimes makes a difference when I am choosing my lunch.
There is a ton of differing opinions when it comes to diet so here goes mine. “Balance” That single word gives me complete freedom to eat what I want but at the same time keeps me conscious of what my body needs.
I recently did a 2 week Juice diet in an attempt to lose a bit of weight and fill my body with nutrients, enzymes and basically feel more energised. It worked, I lost about 7lbs and genuinely felt better. Now I have that as a plan at least once a year to do something similar.
Drinking plenty of water each day has been proven to increase concentration, something as developers we need a lot of.
Avoiding a big lunch can aid in productivity because needed energy is not spent breaking down food and means you escape the urge to have nap under your desk.


We have all had the memo or meeting about screen height or keyboard position. I bought a chair last year which forces good posture. If I sit in it for longer than 2 hours my knees have no feeling J but the point is that switching position and being aware of your sitting position is really important. Our bodies have not been designed for long hours of sitting in the same position so the more you move in between or change position the better. 

Below is a chair I have in my office which you are supposed to switch over to for a while each day, it claims to force good posture. It looks a little like a torture device but it does seem to work. The Knees go in first with the bottom on the top part, guiding the back in a vertical angle. The main benefits focus around the lower back which tends to take a lot of strain during a day of sitting.


On a previous developer role we were given a reduced membership at a local health club. So once or twice a week I embarked on having a swim over lunch. Wow what a difference, that complete somewhat forced break really helped me focus better in the afternoon. Swimming is renowned for working many muscles in the body including the lower back which any coder sitting for long periods of time can suffer a bit with.
What about getting to and from work? I was working on a train route for a while and was able to cycle from home to the train and at the other end for a total of about 4 miles. Then at the end of the day it’s all reversed. I can honestly say it was great. Sure I got wet a few times but nothing a pair of waterproofs couldn’t solve, but also I enjoyed many sunny mornings and evenings which is surprisingly relaxing before getting home. There is something very satisfying about arriving home after work, knowing that you already did your exercise for the day during normal work hours.
Everyone’s schedule is different and only you know yours. The point is try and make room for something each day which gets your heart pumping a little and produces stress relieving endorphins.  

Take a break

I was one of the world’s worst at just working through problems without taking a break. However by taking a break, and by that I mean leaving your desk, going for a walk outside the office for some minutes, even when under pressure can make a massive difference to your whole approach to a problem.       

Sleep on it

Sometimes you take a break and you still spend the rest of the day on that, and I quote “Impossible Problem” and can’t see the wood for the trees. Don’t despair, sometimes you need to put the problem down, shift your attention to something a little lighter and just sleep on it. If I had a pound for the times I woke the next morning with a solution to a problem or sometimes in the middle of the night I would be a rich man. The brain is very powerful and sometimes we just need to let its thing.

You may have heard of young developer named Santiago Gonzalez on YouTube where he says "I Dream In Code". Well Santiago, we have news for you, we all do if we just let go and let our brain do it's thing as we sleep.

Don’t take yourself too seriously

Some studies suggest that some seemingly healthy lifestyle’s can lead to stress. My take is that some can worry so much about health and body matters that they basically fail to enjoy life along the way, causing more anxiety and stress than the efforts to avoid it. Don’t be afraid to laugh at yourself once in a while. As developers we can sometimes get a bit proud of our code and not take criticism easily. Remember that every system ever written contains bugs. If another dev. points out something in a code review, embrace it, learn and let go. Life is too short for perfection. Find something to make you chuckle each day, and remember the healing power of laughter.


To develop software well requires a certain amount of discipline. Adding comments, creating unit tests, refactoring, just to mention a few, requires effort on our part. If we train our minds to be disciplined outside of work, it becomes a lot less effort in work to desire that all the planets are aligned and our code and supporting documentation is kept up to date. Having said that creative minds are often not very tidy ones.
As the mind is the most complex of all body parts it is important to avoid stress outside of work. This allows it to focus and work out complex problems with a lot more ease. My personal observation has been that happy individuals with a good friend or family supporting network, tend to be able to focus better and find solutions to problems faster.


·         Eat Well
·         Sit Well
·         Take Breaks
·         Exercise
·         Drink plenty of water
·         Laugh
·         Get enough sleep

At Assemblysoft we specialise in Custom Software Development tailored to your requirements. We have experience creating Booking solutions, as we did for HappyCamperVan Hire. You can read more here.

We can onboard and add value to your business rapidly. We are an experienced Full-stack development team able to provide specific technical expertise or manage your project requirements end to end. We specialise in the Microsoft cloud and .NET Solutions and Services. Our developers are Microsoft Certified. We have real-world experience developing .NET applications and Azure Services for a large array of business domains. If you would like some assistance with Azure | Azure DevOps Services | Blazor Development  or in need of custom software development, from an experienced development team in the United Kingdom, then please get in touch, we would love to add immediate value to your business.

Assemblysoft - Your Safe Pair of Hands


I am certainly not a health freak, nor a fitness fanatic but I do believe that if you take a balanced approach and most importantly give it some thought, you can definitely increase your productivity and wellbeing which ends up making you more successful and productive as developers.

For some more musings, checkout my and azure blog here

Popular posts from this blog

Windows Azure Storage Emulator failed to install

CodeProject Windows Azure Storage Emulator failed to install When attempting to install a new version of the Azure Storage Emulator either as a separate installation package or automatically as part of an Azure SDK update, you may run into an error message which states the storage emulator has failed to install. This can occur using the Web Platform Installer (WebPI), NuGet Package Manager or when performing the install manually. Below is the message received using the WebPI.   Storage Emulator Background  (optional reading) The windows azure storage emulator executable lives under the Microsoft SDKs directory as shown below: Configuration If we take a quick look inside the WAStorageEmulator.exe.config file we can see each of the storage services pointing to local service endpoints. <StorageEmulatorConfig>     <services>       <service name=" Blob " url=""/>       <service

Debugging Python and Iron Python using Visual Studio

Now Python is a first class citizen since the release of Visual Studio 2017 and can be configured directly from the Installation IDE, below are a few settings worth bookmarking for your next python integration project. Debugging Python One of the first things you are going to want to do is step through your code when using Visual Studio, particularly as the language is dynamic and inspection of local and global scope soon becomes necessary. One thing to note is that if you start from a native python project, this is all wired up for you but if you are using .Net to call python modules or want to support an older python version, such as 2.7, you will soon see that breakpoints are not being hit due to symbols not being loaded.   Enable Just My Code To distinguish user code from non-user code in .net, Just My Code looks at two things: PDB (Program Database) files, and Optimization Program Database A .pdb file, otherwise known as a symbol file, maps the identifiers

Test connection to remote SQL Server Database from an Application server

While aiming to test whether a SQL connection is succeeding between an Application server and a remote Database Server, it is often not possible to install SQL Server Management Studio (SSMS) or Microsoft Command Line Utilities (MsSqlCmdLnUtils) due to the locked down nature of the targets, particularly in test and production environments. A lightweight approach that worked for me recently, makes use of components that have been a part of windows boxes for a long time, albeit different levels of database driver support as the components have evolved, the Microsoft Data Access Components (MDAC). MDAC provide a Universal Data Link, which can be configured using a common user interface for specifying connection properties as well as testing the connection.  Data Link properties dialog box At Assemblysoft we specialise in  Custom Software Development  tailored to your requirements. We have experience creating Booking solutions, as we did for HappyCamper