Stress and motivation
Motivating and managing people is a tricky business. How then do we manage stress and keep people motivated?
Theory X and Theory Y
Donald McGregor identified two attitudes known as Theory X and Theory Y. In short, Theory X is someone that has an innate dislike of work and tends to avoid responsibility. They need coercion, direction and control. Theory Y, on the other hand, is someone that experience work as natural as rest or play and their commitment is typically in relation to the rewards associated with their achievements.
Each theory has a corresponding managerial approach. Theory X managers are autocratic and demand total control, managing through fear and punishment. Theory Y managers set the goal and let the person or team get on with it. With that being said, McGregor found that staff behaviour and motivation is influenced by expectations set by the manager, i.e., if the manager assumes that you are going to produce work of excellence, you are likely to try and meet it.
Models of motivation
Taylorist model
Frederick Taylor believed that people are only motivated by money. This is not always the case, even in situations where the output can be directly related to reward. Output is often constrained through norms accepted by a work group. It’s typically unspoken rules which determine the quantity of output to produce. In a software development environment it is difficult to determine and quantify the amount of work completed by an individual – it’s a team effort. Setting an excessive financial reward between employees must be considered very carefully as it can break down morale and productivity. Bonuses are usually awarded at the end of project as a work-around to this problem.
Maslow’s hierarchy of needs
Motivation is a little more complicated than Frederick Taylor puts forward. Maslow suggests that as one motivator is satisfied, another will emerge. If you are broke, money is a fairly good motivator. When the financial need is satisfied, a higher level need will emerge. The needs hierarchy starts from the basic need of food, shelter and personal safety, to the highest level which is the feeling of fulfilling your potential or self-actualization. At different stages of life people are motivated by different things. For example, an older employee consider the quality of the job more important than a younger employee. The younger employee considers a raise in pay more important than quality of job.
Herzberg’s two factor theory
Herzberg found that there are two factors in a job that will affect your satisfaction. The first is hygiene or maintenance factors. If working conditions are not right, it will definitely affect your level of satisfaction with the job. The other is motivators. These are typically a sense of achievement, or that the job is worthwhile.
Expectancy theory of motivation
Victor Vroom created the expectancy theory, which identifies three influences on motivation. They are expectancy, which is the belief that the harder you work the higher your performance will be; instrumentality, which is the belief that better performance will be rewarded, and finally the perceived value of that reward. If all three motivating factors are high, then motivation will be high. A zero score for any one of the three can remove motivation.
Oldham-Hackman job characteristic model
According the Oldham-Hackman model, there are five factors that influence job satisfaction. The first is the number of skills that can be exercised while doing the job; second is task identity, which refers to the degree to which your work identifies you as the author and lastly, the degree of influence that your work has on other people i.e., the significance of your task. These three factors determines how meaningful your job is to you. The other factors include the amount of say in the way you do your job and the feedback you receive about the work you’ve done.
There are a few simple things one can do to improve motivation, viz.,
- Set specific goals;
- Feedback on work completed;
- Tailoring tasks;
- Increase the task scope;
- Increase responsibility.
Stress
With deadlines, objectives and obstacles, life is pretty stressful as a programmer. On the other hand, some pressure is good as boredom is soul-destroying. That being said, too much pressure affects not only work quality but health too. Some major factors that cause stress is not knowing what is expected from you and what you’re responsible for. Also, being torn between responsibilities such as attending an important meeting or looking after a sick child. Research shows that productivity and quality suffers when more than 40-hours per week is exceeded. One of the axioms of extreme programming is to work no more than 40-hours per week. In a US study it was shown that people under 45 years of age who work more than 48-hours per week had double the risk of death from coronary heart disease.
To prevent overtime, project managers can be more realistic about the effort and time needed to complete a task or project. Exercising good planning and control will help to reduce unexpected obstacles. Some managers use bullying tactics and claim to be successful at pushing projects through. They typically need to create crisis to be able to justify such tactics. On the other hand, you find professional project managers that use rational, orderly and careful methods to deliver successful projects.
References
- Hughes, B. & Cotterell, M. 2009. Software Project Management, 5e. Berkshire: McGraw-Hill Education.
Software quality
When it comes to writing software there is always the issue of software quality. How do we decide whether a system is of high quality or not? What do we mean by quality anyway?
Quality in software systems
Businesses are relying more and more on software for running critical business operations. Naturally, every business owner wants his software stable and reliable. Consider other critical systems such as aircraft control systems. I’m pretty sure that you’d want a quality flight control system on board your next flight. Would you board the aircraft if your software was running on the aeroplane?
Another reason we want to ensure quality from an early stage is that bugs and defects accumulate over time. If we fail to correct quality issues from the beginning of the project, there is simply no easy way that we are going to make up for it in the end. Quality must be considered right from the start.
What is software quality?
The quality of a system is partly determined by the user-experience of a system. If it’s user-friendly, stable and reliable it’s quality is perceived as high. If it fails often and produce incorrect information then the system will be perceived as of poor quality. This is known as external quality.
As important as external quality is, internal quality is just as important. Internal quality is about the maintainability and extensibility of the source code. A system that is very difficult to extend and maintain will not be perceived as high quality.
Measuring software quality is tricky and there are two ways in which it is measured, viz.,
- Direct where the quality is measured directly or observed directly;
- Indirect where the quality is measured by some indicator of the underlying quality.
Quality factors
Before writing a software system it is necessary to decide on some quality factors. It is the only way to know if we succeeded in delivering a system that is of a specified and agreed quality. We specify the quality factors in terms of the following:
- Definition of the quality characteristic;
- Scale of units in which the quality is measured;
- Test that will be conducted to measure the quality;
- Minimum acceptable which is the absolute minimum for this quality characteristic to pass;
- Target range which is the quality number we expect to reach;
- Now which is the current quality number.
For example, reliability can be made up the following quality factors, viz., availability, mean time between failures, failure on demand and support activity. Related to this is maintainability of which “changeability” and “analysability” are key components.
ISO 9126
According to this standard there are three parties who are interested in the quality of the software, viz.,
- Acquirers who are the people obtaining the software;
- Developers who are the people making the software;
- Independent evaluators who assess the quality of the software.
ISO 9126 defines six external software quality measures, viz.,
- Functionality is the functions that the software need to offer to satisfy user needs;
- Reliability is the ability of the software to keep up its level of performance;
- Usability is the effort needed to use the software;
- Efficiency is the physical resources used when executing the software;
- Maintainability is the effort required to make changes to the software;
- Portability is the ability to transfer the software between environments.
In order to measure the quality between different software systems we have to judge the importance of each quality measure for the application in question. We then select the external quality measures that are relevant to the selected quality measures and create a mapping for the measurements indicating the quality rating, such as:
After that we identify the relevant internal measurements and the intermediate products in which they appear. In other words, the source code must be evaluated and rated according to the set out quality measurements. To derive the final quality number for the systems, we combine the ratings for each system and compare them.
References
- Hughes, B. & Cotterell, M. 2009. Software Project Management, 5e. Berkshire: McGraw-Hill Education.
Project scheduling techniques
As part of planning a software project, it is always important to pay attention to the activities and the order in which they execute. This is known as a project schedule.
To create a project schedule, we have to model the project’s activities and their dependencies. Or, if you prefer, their relationships. A project schedule is typically drawn as a graph — arrows joining circles. The fancy way saying this is, edges for the arrows (a.k.a links) and vertices for the circles (a.k.a nodes). This type of graph is typically drawn from left to right, with the project’s starting date on the left.
So, what do the circles and arrows mean? Well, it depends.
Activity-on-node
This is a simple graph where the circles represent the activities and the arrows the dependencies. It is also known as a precedence network. We call it a precedence network because a node, or activity, cannot be executed until all of its preceding activities executed.
To draw an activity-on-node graph, we have to follow some rules:
- only one starting node;
- only one ending node;
- each activity has a duration;
- links have no durations;
- time moves from left to right;
- the graph may not contain any loops;
- the graph may not contain any dangles – a node that just stops in the middle of nowhere.
By the way, this activity label is based on British Standard BS 4335.
Critical Path applied to Activity-on-node
A critical path is the order in which we should execute activities, so that we can get the project done as fast as possible. Not only that, it also shows us which activities will cause us to miss the end date, if they are delayed. How do we determine the critical path?
Well, for each activity we need to have some idea of, how long it will take to do, what is the earliest we can start and complete the activity as well as the latest we can start and complete it. That is the Duration, Early Start, Early Finish, Late Start and Late Finish parts of the activity label.
To calculate the earliest dates, we need to do something called a forward pass. That is, we look at every activity and calculate its early start and early finish dates. The first activity’s early start values always starts at zero.
In the network graph above, we see that Task A and Task C can start immediately. However, Task B must wait until Task A and Task C completes (it’s predecessors). Since Task C has the longest duration (10 days) between Task A and Task C, Task B can only start in 10 days and will complete on day 13. The earliest that Task D can start is in 2 days time, after Task A completed. With this in mind, the earliest that the project can complete is in 13 days time.
Next, we need to do a backward pass on the same network to calculate the Late Start and Late Finish values. This gives us the latest date at which an activity must start and complete without delaying the end date of the project. The late finish date for the project is the same as the early finish date.
In this example, we see that the project will complete in 13 days. So, we work from the end date backwards. Starting at 13 days, we can see that Task B will take 3 days to complete and so the latest start date is 10 days (13-3). Task D also needs to finish on day 13. This task takes 4 days to complete and so the latest date to start this task is in 9 days time (13-4). Task C on the other hand must finish within 10 days and has to start immediately (10-10). Since Task A will take 2 days to complete and we know that the latest finish date is only in 9 days time, we only have to start this task on day 7 (9-2).
To find the critical path in the graph, we find the sequence of tasks that will move the end date, if there is a delay in any of its activities.
If there is a delay in Task C so that it only completes on day 11, it will delay Task B and ultimately the end date. We have to pay special attention to the critical path throughout the project so that we can handle any delays as soon as possible. The critical path sets the activity span. That is, the shortest time in which we can complete the project. If we want to shorten the time of the project, we have to cut the time of the activities in the critical path.
Activity-on-arrow
In activity-on-arrow networks, the arrows, or links, represent the activities. The nodes represent events of activities starting or finishing. Just like the activity-on-node graph, so too activity-on-arrow graphs have rules when it comes to drawing the network graph. They are:
- only one starting node;
- only one ending node;
- duration is on the link;
- nodes have no duration;
- time moves from left to right;
- nodes are numbered sequentially;
- graph may not contain any loops;
- graph may not contain any dangles.
Critical Path applied to Activity-on-arrow
Before we can find the critical path in an Activity-on-arrow graph, we need to do a forward pass. It follows the same principles as activity-on-node. The only exception is that in activity-on-arrow we use the events and not the activity start and end dates.
Let’s look at an example (Hughes and Cotterell, 2009):
The earliest date when an event can start is the date when all the events that it depends on is complete. In the example above, activities A, B and F can start immediately. So, the earliest date for event 1 is zero. Since activity A takes 6 weeks to complete, we can only start activity 2 in 6 weeks time at the earliest. Activity B takes 4 weeks to complete and so event 3 can only be achieved in week 4. Activity F is dependent on the ending date of activity E and so we only know that activity F will complete in 10 weeks. Activity E can start in 4 weeks time and will take 3 weeks to complete. From that we know that activity E will only end in 7 weeks time. We then take the longer of the two ending dates (between E and F) and find that event 5 will only be achieved in 10 weeks time. Event 4 can only start in week 9 (6 + 3) > (4 + 4). We now see that the project will only finish at the end of week 13, at the earliest.
Next, we do a backward pass on the same graph to calculate the latest date at which each event should be achieved. It follows the same principles as the backward pass for activity-on-node.
To find the critical path, we make use of slack. Slack is the difference between the earliest date and latest date. It tells us how late an event can be without affecting the end date of the project. The critical path is that path with all the nodes having a zero slack.
References
- Hughes, B. & Cotterell, M. 2009. Software Project Management, 5e. Berkshire: McGraw-Hill Education.
Monitoring disk space with Powershell
Running out of disk space all of a sudden is just not cool. It tends to wake up men in black suits, bring on the gnashing of teeth and frothing at the mouth. I don’t like that type of drama.
So, I knocked up a little Powershell script that can be scheduled to email a disk space report everyday. Currently the script is written to send a report on a single drive only. There are many other variations of this type of script that reports on all the drives on a server.
$disk = Get-WmiObject -ComputerName $env:COMPUTERNAME Win32_LogicalDisk | Where-Object {$_.DriveType -eq 3} | Where-Object {$_.DeviceID -eq ":"}
[float]$totalSize = [Math]::Round($disk.Size / 1073740824, 2)
[float]$freeSpace = [Math]::Round($disk.FreeSpace / 1073740824, 2)
$deviceID = $disk.DeviceID
$percentFree = [Math]::Round(($freeSpace / $totalSize) * 100, 2);
$smtpServer = ""
$smtp = New-Object Net.Mail.SmtpClient($smtpServer)
$emailFrom = "$env:COMPUTERNAME"
$emailTo = ""
$subject = "$env:COMPUTERNAME - Disk space report"
$body = "$deviceID | Total: $totalSize GB | Available: $freeSpace GB | $percentFree % disk space available"
$smtp.Send($EmailFrom,$emailTo,$subject,$body)
When it comes to management, you might just as well only print the precentage of free disk space and perhaps add that to the subject of the email. That will give all the relevant information in one look. The script can be extended to report on multiple servers and multiple drives.
Have fun!
Sinking your interview before it starts
During a series of interviews I discovered some things about reading CV’s that downright irritate me. I share them here with you just in case your interviewer is anything like me :).
- Keep it short and to the point. CV’s that span more than four pages is too long. I had the displeasure of reading a CV of seventeen pages. That makes me unhappy. Your interviewer simply does not have the time to read your entire life story.
- Observe the DRY (Don’t repeat yourself) principle in your CV. Do not repeat the fact that you have a degree three times.
- Keep the details relevant. I want a programmer. I’m not interested in the fact that you are a landlord or that you are the chairperson of your body corporate.
- If you have been between jobs frequently and they have been contract based, make sure you state it clearly.
- Check and check again for spelling mistakes. There is nothing more annoying than spelling mistakes in a CV.
If you are working through a recruitment agency, insist on reviewing your CV before they send it out. Often the candidate will send the recruitment agency a two page CV and then they will apply power word magic and out comes a CV of seventeen pages. Recruitment agents also tend to embellish CV’s. This is the worst mistake they can make as it will paint this picture-perfect image of you that might not match up to the reality when you are interviewed.
Skills matrices are my absolute favorite. Rating yourself an expert in C# will make me raise an eyebrow if your name is not Anders Hejlsberg or Eric Lippert. Call yourself an expert if you can almost recite the ECMA specifications off by heart.
How to sink yourself in the interview
Sinking your interview isn’t all that hard. When answering questions in an interview, remember that there is a time to shut up. Ten minutes to answer a question is too long. Lookout for the interviewers glazed stare. That is a sign that you have crossed the shut-up-already limit a couple of miles ago.
Remember that you don’t know the people that are interviewing you. They have their opinions and stances and you can offend them in no time. Always keep this in mind.
Personal Knowledge Management with a Wiki
In the excellent book Pragmatic Thinking and Learning: Refactor Your Wetware (Pragmatic Programmers) by Andy Hunt, he suggests that every programmer should have a personal wiki in order to manage knowledge effectively. A sort of exocortex. A place where you can keep ideas, thoughts and nearly anything you want outside your brain.
Ever received one of those emails that you just have to keep somewhere? That snippet of source code that might come in handy? That chocolate muffin recipe? Why not put all of it into your wiki?
My personal choice of this kind of wiki is TiddlyWiki. Simply because all of the content is in a single HTML file. Fan of Getting Things Done? TiddlyWiki can easily be configured to support the Getting Things Done methodology. Have a look at d-cubed for example.
Bear in mind that it has a learning curve to it, but if you are willing to stick to it you will surely reap the benefits.
Some of the features include:
- Tagging
- Searching
- Text formatting, including support for monospace
- Highlighting
- Block quotes
- Tables
- Headers
- Save with backups
- RSS feeds
I would suggest the following plugins to really spice-up TiddlyWiki:
Check out TiddlyTools and TiddlyVault for other plugins. It supports themes, which can be downloaded from TiddlyThemes. There is also a great cheat sheat available.
Workplace Morale
Lately I’ve been thinking on morale in the workplace. What is morale? According to Alexander H. Leighton, “morale is the capacity of a group of people to pull together persistently and consistently in pursuit of a common purpose“.
From this quote, it is evident that if morale decreases, people will no longer pull together in pursuit of the common purpose. Following from that, we can then say that morale is the glue that keeps people united and focused on the given task.
Sustaining a healthy level of morale in the workplace should be one of the primary concerns of managers. I’d like to think that every workplace has a set of morale pumps that help to maintain a certain level of morale, whether it be great coffee, job security or an energizing work culture, which contribute to keeping employees focused and united.
In the current economic environment where most businesses have to consider cutting costs on most levels, be careful when cutting costs on the morale pumps. Consider the cost of reducing and taking away that which maintains this level of morale. I think investing into keeping morale high is probably more needed now than ever before.
Here are some factors that influence morale in the workplace, either positively or negatively :
- Job security;
- Management style;
- Staff feeling that their contribution is valued by their employer;
- Realistic opportunities for merit-based promotion;
- Team composition;
- The work culture;
- Compensation;
- Recognition and rewards;
- Work that isn’t challenging;
- Limited growth opportunities;
- Fun environment to work in


















leave a comment