Richard Lennox
Archive for the ‘Programming’ Category
Programming the beep
For those C# developers out there, I came across this post: If you ever wanted to play Fur Elise in the console. This uses the internal machine beep so no speakers required!
private void FurElise()
{
Console.Beep(420, 200);
Console.Beep(400, 200);
Console.Beep(420, 200);
Console.Beep(400, 200);
Console.Beep(420, 200);
Console.Beep(315, 200);
Console.Beep(370, 200);
Console.Beep(335, 200);
Console.Beep(282, 600);
Console.Beep(180, 200);
Console.Beep(215, 200);
Console.Beep(282, 200);
Console.Beep(315, 600);
Console.Beep(213, 200);
Console.Beep(262, 200);
Console.Beep(315, 200);
Console.Beep(335, 600);
Console.Beep(213, 200);
Console.Beep(420, 200);
Console.Beep(400, 200);
Console.Beep(420, 200);
Console.Beep(400, 200);
Console.Beep(420, 200);
Console.Beep(315, 200);
Console.Beep(370, 200);
Console.Beep(335, 200);
Console.Beep(282, 600);
Console.Beep(180, 200);
Console.Beep(215, 200);
Console.Beep(282, 200);
Console.Beep(315, 600);
Console.Beep(213, 200);
Console.Beep(330, 200);
Console.Beep(315, 200);
Console.Beep(282, 600);
}
When you go off on holiday
This is what happens when I go off on holiday for 2 weeks!! I am going to need a week to go through it all with the final total sitting at 1570 after a good trimming of subscriptions before I went!

Hug a developer
How very appropriate!
[YouTube]1lqxORnQARw[/YouTube]
Wordpress Successfully Upgraded
As none of you will have noticed, there have been a few periods of downtime last night into this morning! This is because I have been upgrading the underlying Wordpress installation to the latest and most secure 2.1.3. This is a significant upgrade from the 2.0 version although not a major update. Thankfully it has gone relatively smoothly, with only minor modifications required.
I have also taken the opportunity to upgrade some of the underlying CSS and HTML of the theme. This won't mean any visible changes, it simply cleans things up a little in the code. Let me know if you come across any issues…Thanks!
Why Good Programmers are Lazy and Dumb
In my time trawling through google results for the answer to my questions I have stumbled upon an article in Google Blogoscoped – Why Good Programmers are Lazy and Dumb. This is really what I do and it caught my attention.
The basics of the article sum up the efforts that as a programmer I am constantly making. To sum it up a programmer must be lazy – to prevent being repetitive in his work, repeating oneself over and over means that you have to maintain the work everywhere, doing it once and re-using it the lazy way ensures that it is inevitably clean and tidy code, leading to a better application that is easier to debug. A programmer must be dumb so as not to become too "smart" to learn the latest techniques and technologies. He must dumb down, when asked to solve a problem, asking the simple questions to ensure that the parameters of the problem are set out in full and not someones impression of the parameters of the problem.
It is funny how on reading this, I understood exactly what the guy is saying. I am constantly fighting to stop myself repeating code because it is easier to write if I just copy it. I would also say 90% of my support queries can be answered using the simple question method – I even had one where they phoned up and said they can't access the software or any other web page – he had forgotten to plug in his network cable. Ok, so that is a little exaggeration on my part, but it is so easily done, and the simple answer is usually the right one. I recommend the article if you have time for a quick read, I will be one happy programmer the next someone calls me either lazy or dumb!!