General

Happy Programmer’s Day!


// Compile with Visual C# 2005.

using System;
using System.Collections.Generic;
using System.Globalization;
using System.Text;

namespace HappyProgrammersDay
{
class Program
{
static void Main (string [] args)
{
DateTime dtNow = DateTime.Now;
Calendar calDay = CultureInfo.InvariantCulture.Calendar;

if (calDay.GetDayOfYear (dtNow) == 256)
Console.WriteLine ("Happy Programmer's Day!");
}
}
}


Today is Programmer’s Day. This is the 256th day of the year which usually turns out to be September 13, but on leap years its the 12th day. The number 256 is used because if you fill a byte with 1′s, i.e. 1111 1111, the value of it is 256. Aren’t we programmers clever?

The traditions to this day are, according to Wikipedia, “behaving silly, coding silly programs, mini computer games, playing with old computers, etc.”. This isn’t an official statutory holiday, but I think if enough people contact their local political representative, we can make it one.

Bad News for Dot Com Moguls: Ad Blocking

I remember back when VCR’s were common, a device could be purchased for it that would prevent commercials from being recorded to your tape. It operated on the principle that commercial advertising was louder than the program you were recording. When the volume increased, the VCR stopped recording until the volume went back to normal. This was a great investment for those who were tired of viewing endless advertising throughout their favourite programs.

Many people today are equally sick of seeing so many ads on web sites. The worst ads are the ones that cover your screen and don’t go away until you close it or it closes by itself after a certain time. For my web sites, I would never use ads that cover content. All of the advertising is around the content and can be easily ignored. I don’t ask people to support my sites by clicking on ads and/or making purchases through the ads, but its appreciated if they do. :)

Blocking Ads With A Free Firefox Plugin

Recently, a plugin for Firefox called Adblock Plus has received quite a bit of attention. This application terrifies people who fill their web sites with advertising. Adblock Plus prevents advertising from appearing when you view a web page. You right click on the ad you don’t like and then choose Adblock from the context menu. The ad won’t appear again on the page. Like spam filters for e-mail, it doesn’t block everything but it does block most ads.

Web site owners with advertising aren’t pleased with Adblock Plus. Firefox users with this plugin are accused as being thieves. They are said to be robbing potential sales from the web advertising. I don’t agree with this line of thinking. One of the selling points of the Internet is the great freedom that it gives to everyone. People should be free to view ads or block them.

Web Site Owners Strike Back

Some web owners don’t see things this way and choose to block all Firefox users from their sites. I don’t think this will convince anyone to stop blocking ads or even continuing to use their web site. The Internet gives you a great variety of choices and there are always other similar web sites to go to.

These angry web site owners recommend people to stop using Firefox and start using Internet Explorer, Opera, or Safari. Its only a matter of time before easy to use ad blocking plugins are made for these browsers. If your a more advanced user, you can use the Hosts file to block unwanted ads that works with any web browser.

The Solution

There is nothing wrong with blocking ads from web sites. What is wrong are web site owners attacking their users and potential customers. An important thing to remember is that if you want to convince someone to accept your viewpoint, you have to change how they feel about it. Explain to your users why the advertising is there and perhaps they won’t block it.

Great Web Designs for Non-Designers

I used to create the layouts for my web sites. A decade ago, most web sites were built by programmers instead of graphic designers … and it showed. The designs were very plain and boxy. Programmers lack the imagination and ability to make images flow between cells in a table. In general, the designs were very poor. This is what you get when a software developer does the work of a graphic designer.

It can be expensive hiring an experienced designer to build a good template for your web site. A low end designer could charge you around $1500. I would stay away from the designers who create entire web sites for $500. They are usually amateurs with no real talent.

If you can’t afford to hire a web designer, the next option would be to buy a template and modify it yourself. Most commercial templates cost around $40-60 which is not an unreasonable amount to pay for a very professional looking design. One of the best and most beautiful designs I’ve seen for web sites is on www.templatemonster.com. Another good commercial site is www.templatesbox.com.

In case you don’t want to pay for a template, the following sites have good designs that you can download and modify:

One thing to keep in mind when you using a web template is that you may need to modify Photoshop or Flash files to customize it for your web site. It’s also a good idea to know CSS so that you adjust fonts and colours. Using a template is not as simple as drag-and-drop. While additional work is usually required to create your web site, this is definitely a viable option for programmers who lack design skills.

Healthy Mind, Healthy Body = Great Source Code

Every programmer wants to produce great, bug free source code. Its not because of pride, but we tend to be perfectionists and after carefully planning our application, its expected to work well. A well designed application depends on the quality of source code and the planning behind the architecture of the software. While being knowledgeable in software development is important here, it takes more than that to produce well written software.

A key ingredient that is often missing in a programmer’s life is good health. The sedentary profession and poor diet that goes with it results in a standard of health that is typical in first world countries, which is mediocre health. The favourite food in the IT industry are pizzas, fast food, and soft drinks. In other words, lots of saturated fats and sugars.

Software developers and other workers in information technology fields rely heavily on problem solving. This requires a great deal of thinking. The mind works better when it is healthy and has the appropriate fuel to drive it. Coffee, pizza, french fries, and smoking is not something which helps the thought processes. Eating raw fruit and vegetables, drinking lots of water, and exercising fuels a healthy body.

There is another factor which would help software development. That is, a healthy mind. This isn’t the physical aspect of it, but a spiritual one. You can think better when you have are at peace with yourself and your surroundings, and have a clear conscience. Guilt and anger hinder the thought processes involved with programming.

Laughter is also important with maintaining good health. Laughing boosts the immune system, reduces stress, and lowers blood pressure. According to Dr. Michael Miller, director of the Center for Preventative Cardiology at the University of Maryland Medical Centre,

The old saying that ‘laughter is the best medicine’, definitely appears to be true when it comes to protecting your heart … We don’t know yet why laughing protects the heart, but we know that mental stress is associated with impairment of the endothelium, the protective barrier lining our blood vessels. This can cause a series of inflammatory reactions that lead to fat and cholesterol build-up in the coronary arteries and ultimately to a heart attack.

There is a symbiotic relationship between the mind and body. A healthy mind leads to a healthy body, and unhealthy mind can compromise your physical health.

Software developers need to take the time to acquire a health sense. This will not only result in producing better software, but the quality of life will also be improved.

Anything Worth Doing Is Worth Doing Poorly

Why does most software suck? Is it because the software engineers behind it are incompetent? Or should we blame their managers for wanting to rush out products before they’re ready so they can make money for the shareholders?

A philosophy that many of us were indoctrinated in from an early age is that anything worth doing is worth doing well. This sounds like wise advice but its really self destructive in its consequences. People who believe this lie will work on things until they are 100% perfect before calling it complete and introducing it to the world.

The problem with software development, or even building large scale web sites, is that the system becomes so complex that its impossible to fully debug and remove all errors in the code. Its not just the source code programmers write that can have problems, the libraries their compilers use can be buggy, as well as the third party libraries they purchase. There may also be bugs in the operating system which affects the application. On top of all of this is the wide range of hardware and software that users have in their computer systems which can influence how a program can run.

Another problem when developing software is trying to implement all of the great features that you think your customers would want. Each feature takes time to program and debug. A common thing software companies do is try to match their competitors feature for feature. This is a great way to waste your resources and the results of doing this will only impress those who read magazine review comparisons of the software.

A good software developer would not wait until their application is perfect. It only has to be good enough to be accepted by their customers. This is not to say that software with serious bugs should be released. This is a great way to damage your credibility and could take years to recover from.

A product can be released early and then improved to keep the users happy. If the software is released too late, opportunities may be lost and your competitor may gain the market share that should have been yours.

A good example of this is IBM’s OS/2 operating system. The operating system was completed one year before the Presentation Manager (the GUI) was ready. IBM wanted to release OS/2 with the Presentation Manager so they delayed its release until it was ready. When it was released, Microsoft also released Windows 3.0, which was vastly inferior to the pre-emptive multitasking and rock solid OS/2 operating system. With the mighty Microsoft marketing machine, they eventually dominated the market and operating system war was over.

The funny thing was that at the time, no one was using Windows GUI or OS/2 GUI applications. All they wanted to do was multitask DOS applications. OS/2 would have been more than sufficient for this and they would have had a one year head start by the time Windows 3.0 was released.

Henry Ford had said, “Thank God for my customers. They buy my products before they are perfected.” Ford would have released OS/2 before it was ready and we would likely be running that on our computers instead of Windows XP or Vista.

When developing software, find out what your customers need and give them most of it in the first version. Add the additional features and fix bugs in later versions. Give them enough to keep them happy and make them happier with more features later. Build a relationship with them early and they will remain your customers for a long time.