Browse Tag: career

How to avoid burnout

You work hard 7 days a week, and you do your best to stay up to date with the latest industry trends.  Inevitably you will become demoralized and demotivated and eventually suffer a partial or full-on collapse where all your progress comes to a grinding halt.  After a period of time (days, weeks or months!) you get back on track and pick up where you left off, eventually leading to the inevitable burnout cycle where you end up back where you were.  I’ve been through this cycle several times, and I’ve even blogged about it before, but now I have learnt the ultimate techniques to break the endless cycle and find a more maintainable work-life balance.

Here are my 5 ultimate tips to avoid burnout.

Stop

Start by reducing your workload.

Stop

You are probably doing some or all of the following on a regular basis;

  1. Watching training videos, doing some form of professional online training
  2. Freelance or other paid work for friends, family, or professionally
  3. Contributing to open source, or some form of unpaid work where you have responsibilities and deadlines
  4. Your day job

You probably can’t stop doing your day job, so you will want to give that the highest precedence.  However, I can’t tell you how many people I’ve met in my life who “forget” to take paid leave (holiday days) on a regular basis.  I’ve known people who still have 15 or more holiday days available in early December, and whom either lose those days or just take the money instead.  You should ensure that you regularly take some time off from work, at least once a quarter, and actually have time to yourself or do something relaxing with close family and friends.

If you’re doing online training on a regular basis, you shouldn’t stress about it.  Don’t try and watch 12 hours of Pluralsight videos a 3x speed every night…stretch it out over a week or longer, you will absorb the information better and ultimately get more from the training than you probably will otherwise.

Freelance or other paid work on top of your day job is a recipe for disaster.   The stress of meeting additional deadlines, not being able to have face-to-face discussions with your client, and generally working 15 hours a day will rapidly accelerate burnout.  Try not to take on freelance work if possible, or try and cap it at 1 project at any one time.  The same goes for open source or otherwise unpaid work.  Whilst typically not as stressful, the pressure of expectation can still sit on your shoulders, so try and keep it to a minimum.

 

Get a hobby

But software development is your hobby, right?  For me that was certainly the case.  I started programming as a hobbyist and eventually became a professional.  Whilst I still consider software development to be a hobby, I enjoy it a lot, I’ve since broadened my interests and now consider myself to have several hobbies.

Some ideas for new hobbies;

  1. Some form of physical exercise.  It might be working out (see my post on how I got fit), walking, hiking, skiing, cycling, or anything you like!  Exercise is excellent for stress relief and refocusing the mind.  As well, exercising will lead to a healthier lifestyle and better sleep/eating patterns, which will lead to having more energy, which will contribute significantly to reducing burnout.
  2. Learn a new skill.  I am in the process of teaching myself several new skills; DIY, plumbing, developing an understanding of the sciences (including Quantum theory, advanced mathematics, astronomy/planetary science), and more.  But here is my killer advice; learn life skills.  What I mean by life skills is this; if you learn how to, for example, put up a shelf…this is a life skill.  The process of putting up a shelf is unlikely to change much.  Screws, nails, hammers, etc are pretty constant things and probably won’t change much.  In 10 years you will still know how to put up a shelf.  That’s the common problem with our industry, the technology evolves so rapidly that 90% of what you learnt 5 years ago is irrelevant.

Whatever you decide to do, try and have at least one other hobby, ideally one that other people can get involved with too.

 

Read

I didn’t start reading books on a regular basis until I was 25 years old.  The first book I read, by choice and not because somebody was forcing me to, was The Hobbit.  I loved the book and I was instantly hooked.  If you want a good science fiction read, I highly recommend checking out The Martian, its awesome!

I don’t limit myself to just fiction books though, I read a wide variety of books on subjects like; stock market investment, soft skills, autobiographies, and more.

Read

So why read?  It’s simple, reading refocuses your mind on something different.  Lets say you’ve been writing code all morning, and your stuck on a problem that you can’t fix.  If at lunchtime, for example, you go away from your computer and read a book for 30-45 minutes, when you get back to your desk you will be mentally refreshed.  And in the meantime, the problem you were having earlier in the day has been percolating away at the back of your mind and I can’t tell you how many times I’ve come in and fixed a difficult problem within just a few minutes.

Taking the time top step back and let your mind power down and focus on something else is a very useful technique for relaxing, de-stressing, and ultimately helping to prevent burnout.

Try and read every day… you never know, you might even enjoy it.

 

Spend more time with immediate family, and friends

This is the ultimate technique for preventing burnout, spending time with close friends and family.  Humans are very sociable beings, and benefit a lot from interacting with others.

Being sociable with others can trigger your body to release one of four feel good chemicals; endorphins, oxytocin, serotonin and dopamine.  This will result in a happiness boost, which will help reduce stress, and trigger a chain reaction where you are rewarded more the more you interact with others.  Having strong relationships with work colleagues and also have other untended consequences, including faster career progression and priority when decision-makers are appointing people to interesting projects.

Back to family.  If you’re working all the time, you’re by definition spending less quality time with your significant other (wife, girlfriend, husband, etc).  Spending more time with them will result in a better quality of life, happiness and reduced risk of burnout.

 

Record your progress

If you absolutely must ignore all the prior advice, then please take away the advice given in this last point.  Record your progress.

Time

The most effective way I have found to stay motivated and ward off burnout is to effectively track you time and progress.  Take your freelance project, or whatever you are working on, and break it down into a list of tasks.  Then as you work your way through each task, record how long it took to complete that task and physically tick it, cross it out, or in some way indicate that the task is finished.  Then at the end of each day or the end of each week, take the time out to review the list and see how much progress you have made during that period.  Doing this methodically will help you remember that you are moving forward all the time and getting closer to your goals.

Tracking your forward progress and getting closer to your end goal is the ultimate technique for avoiding burnout.

 

Summary

Following this advice will help restore your work-life balance by making your work time much more focused, giving your brain time to slow down to better absorb new information, and generally will make you happier in daily life thanks to the better relationships you will develop with others who are important to you.  If you absolutely can’t follow the first 4 tips, make sure you at least record your progress so you can see yourself moving forward towards a goal over a period of time.

Devs, this is how I got fit

Right now, I’m in pretty good shape. I have the confidence to say this because I’ve worked very hard over the last 18 months to get to this point. I’m not a muscular person, like what you might see in a designer underwear advert…and this was never my personal goal, but I certainly don’t feel embarrassed anymore when I take my shirt off. I’ve discovered a few very simple patterns for losing weight, gaining muscle (at a slow rate) and generally feeling better about myself. This has been such a big success for me, that I felt it only right to share with you.

I talk about myself a lot in this post, and I apologize for that, but it’s hard not to. I believe that if you follow this advice and these tips, you can achieve the same results as me.

Backstory

Poor diet, smoker, drinker, allergic to exercise guy

Growing up as a teenager in North-West England, UK, in the early 2000’s, I was skinny. I had an extremely poor diet and frankly was “allergic” (not literally, just mentally) to vegetables and healthy food in general. I flat out refused to eat vegetables because I simply didn’t like them. For tea I would have “chips and something”, usually chicken, beef, pork, typically skins on and deep fried.

My diet only got worse as I got older. I worked for a fast food chain for a while, and would regularly eat 3 meals on site up to 5 days a week (this particular fast food restaurant classifies you as a “heavy user” if you consume their food once a week).

When I became independent, i.e. I moved out of my parents house and got my own place, the trend continued for years.

As a software developer, a crazy obsessive one at that, I would spend all my time programming or playing on the games console (PS2/3, or XBox 360). Going outside wasn’t something I would do in a typical month. For a long time, I worked from home and would rarely venture outdoors. Basically I was very inactive, other than to empty the bin or to pick up the post (thank goodness for the elevator in our apartment block!).

At the time, I also smoked and drank alcohol heavily. My favourite tobacco was Golden Virginia (or Amber Leaf if money was a bit tight) and I was an avid whiskey drinker. Every Saturday night I would get so drunk that I would often end up being sick and doing much worse things than I care to share with you!

Any of this sound familiar?

The eureka moment

I think I’m relatively unique in that I didn’t have a eureka moment as such. Over a period of a few months I came to dislike my appearance. I would look at myself in the mirror, typically after a shower or when getting dressed, and I didn’t like what I saw. I wanted to do something about it, but I never made a serious commitment to actually do anything.

I had a couple of fads. I bought myself a press-up bar. Basically it was a small piece of equipment that helped you do push ups, and also doubled up as a pull-up bar that could easily be attached to a door, with no screws required. I would have a go a couple of times a week…hell I might even do 1 or 2 push-ups and a couple of pull-ups. But to be honest, I never once even broke a sweat.

For the last few years, I’ve been waking up early in the morning at the weekend. This is because my body behaves the opposite to most people. When I drink a lot of alcohol, my body temperature increases dramatically and as a result I can’t sleep. I get too hot for sleep, so I go downstairs and do something useful. I might write a blog post, watch a PluralSight course, write some code, or do something. As its typically around 3-4am, the place is very quite and I typically get a lot done, which is great, so this works well for me.

One day, I switched on the TV and one of those sucky TV shopping channels was on. I immediately reached for the remote control, but in the 2.5 seconds it took me to grab the it, I was instantly captivated on what they were advertising.

Insanity

Insanity is an exercise program for regular people, thin people, fat people, tall people, short people, men, women, fit people, people looking to lose weight or gain muscle or all of the above. This was a training programme for me that would get me on the road to good health and fitness. Insanity is a 9 week (60 day) workout program that requires no equipment, and can be done at home.

You work out 6 days a week, for a varying amount of time between 38 minutes and 60 minutes. The first week hurts like hell. After that, you get used to it but it never gets easier. In fact, the harder you push yourself, the more rewarding it becomes. Insanity is great for toning your body, improving your general health and fitness, and it gets you active.

The best part of Insanity? Its all you. No gym, no equipment, no public shame, no awkward showers. You do the workout in the comfort of your own home, and at a time that suits you.

Educating myself about food

Insanity had captured my interest and I instantly knew that I wanted to do it. Over the years I have gone from being the sort of person who makes snap decisions, takes risks, and generally doesn’t engage the brain before speaking, to a deep methodical thinker less inclined to take risks, but whom favours calculated risks.

If this was going to work, I had to give it 100% commitment. No excuses, no BS, no slip ups..for 9 solid weeks. I immediately set about educating myself about food.

Calorie Requirements

I had heard the term, like most people, “calories”. I knew that food contained calories. Healthier food contains less calories and unhealthy food contains more calories. Strictly speaking, this is not always true, but that is the basic idea. My body is a power station, and calories are its fuel. Understanding how many calories my body needs was the first challenge.

In the food guide that accompanied the Insanity workout programme was a useful formula for calculating your bodies calorie needs. The formula was based on the Harris Benedict equations. I typed up the formula into Microsoft Excel and added about 30%, as recommended by the guide based on the frequency of exercising I was planning on doing.

Using this very simple formula, I determined that I needed to consume about 3000 calories a day to lose weight and survive the workouts. To put that into perspective, the average male requires around 2500 calories a day to maintain their body-weight, and I would have to eat more than that!

I had already learnt my first lesson. It is possible to eat more food and still lose weight, as long as the food was fresh and healthy.. The first step was to throw away all the junk food in every cupboard in my kitchen. And that included sugar, soft drinks, and all the processed frozen food in my freezer.

Eating healthily

After determining how many calories my body needs to function correctly, and withstand regular exercise, I now had to understand what foods contained what calories. If I was going to consume 3000 calories a day, which is not a small task, I would need a solid plan and schedule for eating, cooking, and cleaning (cooking generates a lot of dishes!).

The key to losing weight is to eat more food. As many as 5 meals a day. This may seem like bad advice. After all, if you want to lose weight, then you should surely eat less food, right? Well no. The idea is that the more food you eat, the more energy your body uses to digest and process said food. If you eat 5 times a day (breakfast, morning snack, lunch, afternoon snack, evening dinner) then your body is going to be continuously processing food, and burning calories in the process. If you’re eating good, healthy, nutritional food which is low in fat and high in protein (and moderate in carbohydrates), combined with very regular, high intensity training, then you end up in caloric deficit (you have less calories left over than your body needs to maintain weight, therefore you lose weight).

How do you eat healthily?

Pro tip 1 – Plan all meals in advance

Before you deep dive into buying every fruit and vegetable on sale at the supermarket, you should take a step back and plan what you’re doing to eat. This is an alien concept to a lot of people today, but you can actually think ahead of time, list all the ingredients that make up each of your meals, and buy all those ingredients in a single trip to the supermarket each week. Only going shopping once a week is not only going to save you money (no impulse buying) but it will save you time (handy, because you’re going to need that for exercising) and reduce temptation/chances of falling off the wagon.

Sit down and research all your meals, list all the ingredients on a Microsoft Word document, and gather together all the recipes you need.

Here are 3 different shopping lists I have put together that you can use as an example. Note that these lists are catered to my personal needs and tastes, and you may need to adjust accordingly. They’re also not 100% accurate.

  • Current shopping list. This is the list I’m using right now (I’m doing daily fasting at the minute, which is why there are no breakfasts or snacks)
  • Insanity shopping list. Based on the Insanity healthy eating plan, with several customizations for my own tastes.
  • Focus T25 shopping list. Based on the Focus T25 healthy eating plan, again with my own twists and customizations.

As a very important note, you need some self discipline here. Whatever eating plan you use, you should stick to it 100% with no slip ups, snacks, nipples, nothing. Losing weight is a serious commitment and can easily be derailed by the odd treat.

On the other hand, I regularly schedule a treat meal for myself (perhaps once a week). This might be on a Friday night as a reward for the hard work done during the week, but it is always planned ahead of time and is never done on impulse.

Avoid all trans-fats (bad fats), cut all sugar out of your diet, excluding that found in fruit, and eat protein rich foods such as; chicken, beef and turkey. Nuts are super healthy and contain a lot of good fats that your body needs. My favourites include; walnuts, pecans, hazelnuts, cashews and some dried fruits with a twist of salt.

Note, I recommend changing up your meal plan every 4 weeks. There are two reasons for this. First is that eating the same food over and over gets boring. Second is that your body certainly seems to get used to the food your body consumes, and your weight loss my plateau or stop altogether. Shaking things up stops this from happening. You will also want to revisit the Harris Benedict equation from time to time to make sure you are consuming the correct amount of calories (this figure will likely decrease as your body weight decreases).

Pro tip 2 – Always cook fresh

I mentioned earlier that you will save a lot of time not going to the supermarket every day, because you’ve bought all your fresh food in a single trip to the supermarket each week.

I highly recommend that you cook all your meals fresh and just-in-time. This can be time consuming, but here are some tips to make it work;

  • Cook several meals at once. If you can, cook breakfast, lunch and dinner at the same time. I typically do this when cooking the dinner each evening. Stick breakfast and lunch in the fridge, and tuck in to dinner straight away.
  • Recruit a significant other to chip in with the dishes. Ask your other half, girlfriend, wife, (mother?), to give you a hand with the dishes. Have one person washing and one person drying. This will speed up the task dramatically.
  • Memorize each dish. You’ll get the cooking done much quicker if you know the timings, quantities and everything else without having to look at your chart/recipe list. However, be sure to have it on hand if needed.

Pro tip 3 – Eat or starve

If you are like how I used to be, i.e. “allergic” to any form of even remotely healthy food, you should use the Eat or starve technique. It’s pretty simple really, eat the food you have prepared, or go without. Don’t buy any “extras” from the supermarkets, and throw away or donate any unhealthy food you have lying around to somebody who needs it. After a couple of days, once your stomach is rumbling continuously, your taste buds will dull slightly and you’ll become more open to experimentation. Treating yourself when nobody is looking is going to do a lot more harm than good.

Another good tip, and I have done this myself several times, If you find it particularly difficult to eat a particular type of food (a salad for example) then go to a very public place and eat it there. Get together with a group of friends and order something healthy. You’re not going to embarrass yourself in front of your peers by not eating it, especially if everybody else is eating healthy too!

It’s also a good idea to take daily vitamin supplements, to be sure that your getting all the vitamins and minerals your body needs.

Exercising regularly

I’ve learnt a little secret that people generally don’t seem to know about. You don’t have to exercise to lose weight. In fact, if you are quite a bit overweight, I would recommend that you actually do no exercise at all for the first 2-3 weeks of your diet (or longer, if you’re quite a quite a bit overweight [not a typo!]). You’ll shed the pounds quickly to start off with, weather you exercise or not.

What is the purpose of exercising? Exercising is great for toning your body, building muscle, improving your core strength and generally helping you feel happier within your own skin. Exercise gives your body definition and shape.

Workout at home to start off with

Signing up for the gym is a huge commitment. Not only is it potentially expensive (the average gym membership fee is probably between £20-£50 a month), but it requires a lot of your time.

If you go to the gym, you have to;

  • Drive or walk to the gym
  • Say “Hi!” to the receptionist
  • Negotiate several layers of security, using various levels of security cards or keys
  • Find a safe corner in the locker room where you feel comfortable enough to change
  • Pluck up the courage to work out in front of other people, and occasionally have to speak to people (!) when you cross their paths
  • Negotiate the showers and the soap
  • Get dressed
  • Drive home, and sob about the whole experience.

As a beginner, this indeed can be a very trying and stressful process. And ideally, you would repeat this 3-4 or perhaps 5 times a week depending on your programme.

There is an alternative, my friend, workout at home;

  • Drive home (you were going there anyway)
  • Get changed in comfort of your own house
  • Work out in total privacy
  • Get showered, and dressed in private.
  • You’re already home! Time to relax.

There are many home based workout programmes out there. My favourite’s are Insanity: The Ultimate Cardio Workout and Fitness DVD Programme and Shaun T’s FOCUS T25 DVD Workout Programme, both are very popular. If you don’t like the look at either of these programmes, have a browse around the web and find something similar that will work for you. Start with Amazon, I’m sure there are hundreds!

Measure, measure, measure.

If you are going to embark upon an exercise and workout programme, I highly recommend that you set realistic targets, and track your progress every single day.

So as a ritual, when you wake up in the morning, do the following;

  • Go to the toilet, do all your business.
  • Weigh yourself, write it down.
  • Measure your chest, arms, belly, and thighs. Write it down.

This might seem obsessive at first, and perhaps it is a little, but measure your performance on a daily basis will help you maintain your focus (and actually becomes a little exciting after a while!).

Protein supplements

To finish the story

At the peak, I was approaching 14st (196lb). As somebody who is of a slender frame, this was very scary to me and according to my BMI, I was well in the “Overweight” category.

Today, I am a very healthy 11st (154lb) and I feel great. I am still eating healthily and I am doing the intermittent fasting eating regime, as discussed by James Clear on his blog. I exercise every single day, and hit the gym regularly. I now have good respect for food and I enjoy eating and preparing it. Turning my life around has made me a happier person and a better, more focused developer. You can achieve the same too. The trick is, it starts today.

Why I don’t want to be a front-end web developer

The job title isn’t representative of my skill set

As a front-end developer, you portray yourself as having a narrow set of skills. This probably isn’t the case.

I did a quick search on a popular job forum for front-end developer jobs, and there is a clear recurring theme as to what skills are required to be a mid-level/senior front-end developer;

  • (X)HTML (5), CSS, SASS/SCSS, LESS.
  • Backbone, Angular, Knockout.
  • Responsive web design (I’m assuming Bootstrap knowledge, Foundation etc).
  • Adobe Photoshop, Magento.
  • Knowledge of source control and some form of client side unit testing.

My perception of these skills;

  • HTML has remained relatively unchanged since it was invented in 1990. If you don’t agree, just take a look at the source code for the first web page. HTML is easy, whatever the flavour. That’s actually is greatest strength, no barrier to entry for new developers.
  • CSS is easy to learn, impossible to be great at. Thankfully tools such as SASS/SCSS and LESS are eliminating the pain. A web developer of any skill level and experience can learn to use these CSS pre-processors in 60 minutes or less. They’re simple. They just work.
  • If you’re good at responsive web design, this is a valuable skill. Thankfully, if, like me, you’re not strong with design… front-end frameworks, such as Bootstrap and Foundation, help most developers sweep this skill gap under the rug.
  • Photoshop is in a world of its own. Its ridiculous level of complexity is only matched by its mind boggling feature set. Kudos if you can even get it to install and run.
  • Source control. All you need to know; git push and git pull.

These are, of course, tongue-in-cheek observations. What I’m trying to say is that a full-stack developer can be strong in all of these areas with minimal exposure and experience. These are not specialist skills. This generalisation I think applies to JavaScript development too. After 3 months of constant exposure to AngularJS, for example, you should have a good (if high level) understanding of how it works, how to use it, when to use it, and most importantly, when not to use it.

I don’t want to be a front-end developer because I have broader range of skills and I don’t want to undersell myself.

From a consultants perspective

Portraying yourself as a front-end developer might make sense in the short term. Developers in general at the minute are in high demand. In the UK especially there is a clear skills shortage, so presenting the image of being an expert or specialist in this field might help you land a lucrative role.

Rather than pitching as a front-end developer, however, I see more value in pitching yourself as a front-end developer with extenstive full-stack experience. That way you’re still ticking the boxes on the potential employers checklist, whilst making clear that your skill set goes much deeper.

Front end development is moving too fast

Sorry but it is. It feels like every day there is some new shiney JavaScript framework or “must have” tool that I “must have” (although if I really “must have” it is often debatable). The web is becoming more and more mature as a platform and I see this trend continuing, but we’re still some way away from being there. Yesterday all the cool kids were using PHP, then ASP .NET MVC, then AngularJS/KnockoutJS/WhateverJS. Tomorrow, ReactJS will (probably) be the framework of choice (or perhaps Aurelia will emerge as a viable competitor).

There is also and endless list of web development tools; Visual Studio, Code, Sublime, Webstorm, Dreamweaver (joking, who uses that?!), Eclipse, Netbeans, arguably Notepad++, VIM, EMACS … and infinitely more.

The net result is that I’ve spent literally hundreds of man hours learning FrameworkX (and probably a decent amount of money too) just for it to be superseeded or even die a painful death literally overnight. (Silverlight…remember that?, AngularJS 1.x according to many). It often feels like despite my best efforts, and regardless of how many hours of effort I put into my own education, my skill level is actually declining.

The pace needs to slow down and things need to stabilise before I can even consider specialising as a front-end developer.

I don’t want to be a front-end developer because I can’t (and don’t want to) half kill myself trying to keep up with the trend setters.

Front-end developers are probably not designers

I’ve found through experience that generally technical people fall in to one of two categories. I agree that this is not true in all cases.

  1. You are either a logical thinker aand prefer to write code
  2. You understand how to make things look beautiful.

Typically you don’t get too many coders with excellent design skills and vice versa.

Speaking personally, I’m a strong coder and always have been. I can scrape by when it comes to design, usually be utilising frameworks such as Bootstrap or Foundation, but I don’t excel at this.

There is a perception that front-end developers are good coders and good at design (take a look at the aforementioned job advertisement skill list, specifically the mention about Adobe Photoshop knowledge). Employers are hiring front-end guys and expecting them to be good at writing code and designing pretty websites. I think this is a mistake and the roles should be seperate.

I don’t want to be a front-end developer because I’m not a strong enough designer, and don’t claim to be. Employers have unrealistic expectations about what they will get from a front-end developer.

Front-end developers earn less money

Its true.

Developer vs Front-end Developer

£10k difference. That’s quite a gap. And that’s just one example.

I don’t want to be a front-end web developer because I want to reach my full earnings potential.

Summary

I don’t want to be a front-end developer because I don’t want to undersell myself, because I want to reach my full earnings potential, and because I don’t want to half kill myself trying to keep up with industry trend setters.

Agree or disagree… leave a comment.

Every developer must be proficient at these 7 things…

In 2015, it is as important as ever for developers of all levels of expertise and experience to re-train and update their skills.  In the fast moving world of technology, failure to do so can result in career stagnation and ultimately not reaching your full earnings potential.

This post is an update to the popular post 10 things every software developer should do in 2014.  All of the points made in that post are still relevant and valid so I recommend you take a look.

This post is entirely based on my own opinion and I highly recommend you use this to figure out your own learning plan, based on your own level of skills an expertise.

1. Source Control

Lets start simple.  You must be using source control.  There is literally no excuse.

99% of companies today are using some form of source control, and its becoming expected that you have at least a basic understanding of how source control works.  Most source control systems have the ability to create branches, view history, merge changes, and display differences between revisions.  You should be familiar at least at a high level, how to perform each of these actions in at least 2 different solutions.

As a minimum, I strongly recommend that you learn how to use the basics of Git and TFS Version Control (TFSVC), as these seem to be the most popular in most circles today (especially if you are a .NET developer.

You may also want to learn more about SVN and Mercurial just to ensure that you have most bases covered.

 

2. CSS Pre-processors

There is a lot of debate on the web about CSS pre-processors and if you should/shouldn’t be using them.

Lets rewind a second. A CSS pre-processor is basically a scripting language that is complied down into plain old CSS by some external tool.  The scripting language is typically an abstraction that can reduce the complexity of the underlying CSS and add additional features.  The scripting language compiles into plain CSS, which a web browser can understand.

The general argument about CSS pre-processors between developers is that CSS should be simple and if your CSS is not simple, then your doing it wrong.  If your CSS is simple, then a pre-processor should be redundant.

My argument is that whilst this is generally true for very small applications, once you start working in a team where everybody has their own way of doing things, or the application generally starts getting larger, then this breaks down.  You usually end up with super long CSS files full of duplication and even worse, inconsistencies.

There are three main CSS pre-processor players; LESS, SASS, Stylus.  The main goals of each of these projects is as follows;

  1. Reduce length and complexity of CSS files.  Usually through partials that are merged together at compile time.
  2. Reduced maintenance through less duplication.
  3. To organise your CSS through nesting.
  4. To introduce variables and operators for calculating sizes etc.

I personally am I big fan of both LESS and SASS, and I’m currently migrating from the former to the latter.  I highly recommend that you have at least a high level of understanding of one or the other.

 

3. JavaScript Supersets/Trans compilers/Pre-processors

Fundamentally the same as CSS pre-processors.  A JavaScript pre-processor is a tool that provides you with some higher level language that ultimately compiles back down to JavaScript.

I’m particularly fond of TypeScript right now.  TypeScript has a slightly steeper learning curve than something like CoffeeScript or LiveScript.

Some features of TypeScript;

  1. Static typing…l types are known or inferred, so compile time checking informs you of any errors.
  2. Strong typing…prevents incompatible types from being passed between functions.
  3. Familiar constructs such as classes and interfaces.
  4. Reduced complexity compared to plain JavaScript.
  5. Decent IntelliSense (if you are a Visual Studio developer), even for third party libraries.

At this point, I feel that JavaScript pre-processors are still in their infancy.  I would still strongly recommend learning JavaScript in its pure form as it will no doubt still be around for at least the next 10 years, but if you can, have a look at TypeScript or CoffeeScript.  I suspect both will grow exponentially over the next year.

 

4. Your primary (code) language

This (might) be a slight generalisation, but most people feel most comfortable when writing one or two languages.  That doesn’t mean they’re not very good at other languages, but that generally they learnt to write one or two languages in particular before branching out.

Personally my first programming language was VB 6 way back in the day, but since then I’ve spent most of my time writing C#.  Whether it be Windows Forms, WPF, ASP .NET or just general back end development.  I know that I can achieve anything I want with C# with relative ease.  When I’m having a conversation with peers, or interviewers, or whomever I’m talking to at that time I’m secretly hoping that they will ask me questions about C# so that I can demonstrate my knowledge.  I have completed many Microsoft exams and gained a tonne of accreditation in the subject.  More importantly I have completed dozens of projects for customers, clients, colleagues and friends so I know how to see it through to completion.

My point is, you should have your own C#.  It doesn’t have to be C# it can be whatever language you want.  JavaScript, HTML, Ruby, Java, C++, or anything you like.  The point to take away is that you should know a language inside out, including its strengths, weaknesses, and especially when you should and shouldn’t use it.

Probably the best way you can really master a language is to start teaching it to others.  You might want to write a blog, give presentations to your colleagues, or attend local user groups and share your knowledge to strangers.  Teaching forces you to look at something thoroughly and in-depth to broaden your understanding, mostly because of the fear that if you don’t you will be caught out by a tricky question from an audience member.

 

5. How to interview well and how to make your CV stand out

This one is so obvious, I almost didn’t include it.

You would be amazed at how many developers submit CVs to potential employers littered with spelling mistakes, incomplete or untrue information, and just plain messy by design.

I don’t claim to be an expert in this field.  I have been for a lot of interviews and I have sent my CV to many, many employers.  I have also had a lot of feedback from friends, family, recruiters and indeed interviewers too.

Here are my top tips for a solid CV;

  • Get the basics right.  Ensure you CV is 100% free of spelling and grammatical errors.  Even the smallest mistakes will guarantee your CV is relegated to the bottom of the pile.
  • Keep the design simple.  Personally I use only a single font face, with 2-3 different sizes and minimal formatting. If you are more design oriented, you might want to do something a little more creative, and that’s fine too…but don’t be too creative.
  • Don’t tell lies.  You will be found out.
  • If you are including links to your portfolio, make sure those links are appropriate to the job your interviewing for.  No potential employers want to see your Geocities website from the late 1990’s.  (Yes I’ve seen somebody actually do this! Needless to say, they didn’t get hired)

As for interviewing, again its all in the basics.  Make sure you prepare well before the interview, read the job description thoroughly and think about what skills/experience you have that the company are specifically looking for.  And as you are a developer, you’ll probably want to brush up on your technical skills too, and read some common interview questions so that you aren’t caught by surprise.

For more information on how to boost your career, I highly recommend checking out an awesome book by John Sonmez, Soft Skills: The software developer’s life manual.

 

6. Relational database alternatives

I’ve touched on this previously in a related post, 8 things every .NET developer must understand.  However, I cannot emphasise the point enough.

Relational databases are not the be-all-and-end-all.  Its not sufficient in todays world to only having an understanding of Microsoft SQL Server or MySQL databases and how they work.  More and more companies are relying on No-SQL databases to improve performance of persisting and retrieving highly volatile data.

No-SQL databases typically lack any formal structure and typically consist of some sort of list of key-value pairs.  At first this may seem a bit bizarre, but there are many benefits to structuring data like this;

  • Easy to develop with.  Either no or few joins.  No complex new language to learn.
  • Horizontal scaling
  • Schema-less
  • Supports large objects
  • Low or no licensing costs.

For a more comprehensive look at the benefits of No-SQL databases, take a look at Adam Fowlers blog post on the subject.

RavenDB, MongoDB, and Windows Azure Blob Storage are the big players at the minute.  Each has a relatively low learning curve and are becoming widely adopted by companies.  I would suggest you take a look at each.

 

7. DevOps

Another industry buzz word that seems to be confusing people, myself included.

What is DevOps? Simply put, an effort to improve collaboration between the software development and IT support teams (referred to as operations).

Traditionally, the role of the software development team within a company is to develop new functionality and generally “make changes” to a system.  That system might be internal or external, and it might be desktop or web based software.

The role of operations is to ensure stability of systems.  The biggest risk to stability is change.

DevOps is a concerned effort to improve the way in which the two teams communicate with each other to ensure continuous deployment whilst minimizing disruptions.  We have in the past, myself very much included, typically taken the attitude that once we make a change or develop a new feature and commit to source control then its “done”.  Its then becomes operations responsibility to deploy the change and “handle that side of things”.

You should at least know what DevOps is, and how you can get more involved in it within your own company.  If your company does not currently employ a DevOps mentality, perhaps you could introduce it.  Get rid of the “them vs. us” culture and gain some respect in the process.

I highly recommend look at What is DevOps by Damon Edwards on Dev2Ops for more information.

 

Summary

2015 is yet another year of rapid change for our industry and developers alike.  There are clear trends towards pre-processors, non-relational databases, JavaScript frameworks, cross platform development should not be ignored.

Books I read in 2014

Last year I set out to try and diversify myself and learn new things.  I have focused primarily on software development for at least the last 13 years, and this year I wanted to do something different.  I shied away from reading software development books and started reading sci-fi books, books of historical importance, fantasy, and yes the occasional development book when I felt the urge.

Here are some of the books I read during 2014 (in no particular order);

There are 21 books listed above (1 or 2 have been excluded for personal reasons).  How did I manage to read so many books in 1 year? The key is consistency.  Read for between 1-2 hours a day, and try not to stop reading mid-chapter where possible.  Reading is good for the mind and is an excellent way of relaxing and destressing, which is very important for your general health and wellbeing.

Sorry I know there are a lot of Amazon affiliate links in this post…but every author gets one of these a year! 🙂

8 things every .NET developer must understand

You’ve been in your current job for a while now, and you’re really starting to get good at what you do.  You’re perhaps thinking about finding something new, and you’re wondering what sort of questions a potential new employer might ask.  I’ve been interviewing a lot recently and I have noticed there are 8 questions that get asked a lot.  Spend some time and make sure that you understand each point in turn, doing so will help make that dream job become a reality.

SOLID Principals

The ultimate acronym of acronyms.  You’ve heard of it, but do you know what it stands for? Do you really understand what each principal means? Yeah thought so.  This awesome video by Derick Bailey will clear things up a lot for you;

Garbage Collection & IDisposable

One of the best features of developing with any .NET language is the lack of effort you have to put in to garbage collection.  You generally don’t have to care too much about 1st/2nd/3rd gen collection cycles, de-allocating memory or anything like that.  Its still a very important topic, however, and every .NET developer should understand how it works.

Once you become a more experienced developer (and I’m especially talking to WPF developers here) you quickly learn that memory management isn’t a forgotten topic.  Failure to unsubscribe from events, failure to close streams, and keeping hold of large objects (say instantiating them in a loop that never ends) is a sure-fire way to balloon up your apps memory usage eventually resulting in a crash (commonly referred to as Memory Leaks).

A useful way of ensuring that managed resources are correctly cleaned up in a timely manner is to implement the IDisposable interface (and actually use it within a using block) on your objects.  Make sure you understand how this works how to implement it.

Example:

private Boolean disposed;

protected virtual void Dispose(Boolean disposing)
{
    if (disposed)
    {
        return;
    }

    if (disposing)
    {
        //TODO: Managed cleanup code here, while managed refs still valid
    }
    //TODO: Unmanaged cleanup code here

    disposed = true;
}

public void Dispose()
{
    Dispose(true);
    GC.SuppressFinalize(this);
}

~Program()
{
    Dispose(false);
}

Code snippet taken from SideWaffle.  Its not enough to simply implement IDisposable, you have to take it a step further by adding a second Dispose method to ensure that both managed and unmanaged resources are properly disposed.

Useful resources:

Three Common Causes of Memory Leaks in Managed Applications (DavidKlineMS)

Garbage Collector Basics and Performance Hints (MSDN)

Writing High-Performance .NET Code (Ben Watson)

Explain why you might use MVC over WebForms?

Another curve ball that employers might throw at you is “Why might you decide to use ASP .NET MVC over something like WebForms”.  I stuttered for a good 30 seconds before I eventually came up with a decent answer to this one, because simply saying “because MVC is better” is not a good enough argument.

Here are some things that come to mind;

  • MVC generates much simpler HTML code, which will be easier to style and maintain over time.
  • MVC arguably has a smaller learning curve, because Razor is very intuitive and developers get to reuse their existing knowledge of HTML/CSS without having to learn how specific user controls work.
  • Due to MVC’s simplified page lifecycle, overhead on the server is reduced potentially resulting in better performance.

There is endless argument about this on the web (the only example you need). I think in reality the employer is trying to establish two things here;

  • How well do you know your frameworks
  • But more importantly, can you assess the benefits and drawbacks of different frameworks and make an informed, unbiased decision regarding which one to use.  I.e. don’t just use it because everybody else is.

No-SQL databases

If you think that SQL server is the be-all-and-end-all, then its time to wake up! Its the year 2014 and the tech world has moved on.  I’m not suggesting for a second that companies are abandoning SQL Server, I believe that it will continue to play a major role in our industry for at least the next 5 years.  However, No-SQL databases are gaining massive traction because of their general speed, ease of use, and scalability benefits (not to mention the fact that SQL Server is very expensive, whereas RavenDB and MongoDB are much more affordable).

I’d recommend that you look at, and understand, each of the following;

Boxing and Un-boxing

It simply amazes me just how many developers don’t understand boxing and un-boxing.  Granted, its been less of an issue since generics was introduced in .NET 2.0 but done wrong, your application’s performance and memory usage will be seriously affected. 

Useful resources:

Also note, when a prospective employer asks you to explain this problem, they may also ask you to explain the difference between reference types and value types.  Reference types of course are classes, whereas value types are structs.  A value type can be thought of as the actual value of an object, whereas a reference type typically contains the address of the actual value, or null (value types are not nullable).

Hoisting and Closures

Developers now are required to have a broader range of skills than has typically been the case.  Its usually not enough to have just SQL and C# on your CV, employers are increasingly looking for more well rounded developers, with a range of skills including (but not limited to); HTML, CSS, JavaScript, KnockoutJS, TDD, AngularJS and so on.

You may never have realised it, but when writing JavaScript code variable scope is not exactly black and white.

Take the following example (pinched and adapted from here)

(function(){

    x = 5; 
 
    alert(x);

    var x;

})();

What is the value of x? No tricks here, the answer is of course 5, but why does this work?  Because the variable declaration is pulled (hoisted) to the top of the current scope.  So regardless of where you declare your variables inside a function, they will always be hoisted to the top.  Be sure that you understand this, as its a basic concept but often misunderstood.

Similarly, closures are another confusing concept of JavaScript that you may be asked about.  In the simplest terms, when you have a function inside another function, the inner function has access to any declared variables in the outer function. 

Example:

(function(){

    var x = "Hello";

    var f = function(){
        alert(x + ", World!");
    }

    f();

})();

What is the result? Hello, World! of course, again no tricks.  The code in the inner function always has access to variables declared in the outer function.

That explanation should pass the Albert Einstein test.

If you can’t explain it to a six year old, you don’t understand it yourself.

Is a string a reference type or a value type?

The one I used to dread the most, until I learnt it properly and understood it.  A string is a reference type, but it behaves like a value type!  Unlike most other reference types, a string is immutable, meaning that the object itself cannot be changed.  When you call a method such as Remove or Substring, you are creating a copy of the string with the new value.  The original string remains intact until it is de-referenced.

The primary reason for this is because the size of strings means that they are too big to be allocated on the stack.

As a side note, take the following code;

string c = "hello";
string d = "hello";

Console.WriteLine(c == d);

Why is the result true?  Well this is a .NET optimization to reduce the memory footprint.  Under the hood each variable has the same pointer (0x021x15ec in this case) to the actual value.  You should always use String.Equals when comparing strings to ensure that the actual value of each string is equality checked, instead of the pointer.

Summary

We looked at 8 concepts that every decent .NET developer should understand, especially when interview for a new role.  Whilst these may seem like simple concepts, they are often misunderstood and this will quickly be picked up by even the most inexperienced interviewer.  It’s important for .NET developers to know their language and their tools inside out to ensure that they have every chance of landing that next dream job.