Saturday, July 17, 2010

Pourquoi, pas comment - Martin Fowler, Thoughtworks

An interesting talk on why Agile works including some of it's history, by Martin Fowler and Neal Ford of ThoughtWorks:


Pourquoi, pas comment Pourquoi, pas comment

USI 2010 : conférence incontournable du l'IT en France Rendez-vous annuel des Geeks et des Boss souhaitant une informatique qui transforme nos sociétés, USI est une conférence de 2 jours sur les sujets IT : Architecture de SI, Cloud Computing, iPhone, Agile, Lean management, Java, .net... USI 2010 a rassemblé 500 personnes autour d’un programme en 4 thèmes : Innovant, Durable, Ouvert et Valeur. Plus d'informations sur www.universite-du-si.com

The Go Programming Language

Friday, July 16, 2010

Richard Feynman - Ways of Thinking (Part 2)

Richard Feynman - Ways of Thinking

What can I say.. he's the great Richard Feynman, I'll be forever in awe of him:

The Great Richard Feynman - NZ Lecture

Richard Feynman's final lecture in New Zealand.  I'm not afraid to say he's one of my heroes.  See the lecture here.

This is interesting...

Friday, April 30, 2010

Congratulations to C

The C programming language has returned to the No.1 spot for April 2010, leaving Java in second place and C++ in 3rd. Although this has happened for a number of reasons, it still shows the popularity and power of C. It's been over 35 years since C was developed at AT&T Bell Labs by Dennis Ritchie, Ken Thompson, Brian Kernighan and others and yet it's still here as strong as ever.

Don't get me wrong, I'm still a big Java fan and have been using it commercially since 1997 but I always have a soft spot for C as it's the first commercial programming language I used and I still believe has the most power and flexibility.

Here is the TIOBE list for April 2010.

Friday, April 23, 2010

Nature is Boss

Of course we all know this already, but it has been brought home yet again with authority in the recent (and I believe still) eruptions of Eyja (for island), Fjalla (for mountain), and Jökull (for glacier).

I generally like to write my own stuff but I read an interesting little article by Christopher Hitchens which I'd like to share.

I've been hearing the term VAV being thrown around recently on BBC Radio 1 - a VAV being a Vocanic Ash Victim! well, there you go.

Sunday, December 13, 2009

Now you can program the ZX Spectrum

OK, if you just want to be nostalgic and do some BASIC programming on the ZX Spectrum, click on the image below which will run a faithful emulation of the Sinclair ZX Spectrum complete with BASIC. For more information on Sinclair BASIC you can read the manual.

but here is a very simple program to get you started, follow the instructions:

1. type "10 LET a=10" - (note that the spectrum had short-cuts on the keys so immediately you press L it will display "LET" - you might find this weird at first but after you get used to it it's a very fast way to write a program). Then press RETURN (ENTER) - the code will appear at the top of the screen, that is the first line of the program

2. type "20 PRINT a" - (again, pressing 'P' will result in PRINT being displayed). Then press RETURN (ENTER). Your second program line will be displayed at the top of the screen.

to run the program type: 'R' and 'RUN' will be displayed. Press RETURN (ENTER) and the program will run and print "10" - voila!

Here's another program from the manual that demonstrates taking input from the user and the used of FOR loops:

10 LET total=0
20 FOR c=1 TO5
30 INPUT a
40 REM c=number of times that a has been input so far
50 LET total=total+a
60 NEXT c
80 PRINT total




and here is a screenshot of a program with a background of the original Spectrum keyboard:


The ZX Spectrum - Running "The Hobbit"

Below is a ZX Spectrum Emulator (written entirely in Java) and running the game "The Hobbit" which I spent many hours playing when I was 12 years old.

To start playing, just click on the image and press a key.  You can use basic commands such as:

NORTH, SOUTH, EAST, WEST, UNLOCK/LOCK TAKE/DROP, ATTACK, OPEN DOOR etc. and here is the manual if you would like to have a real play :-)

Wednesday, December 9, 2009

Reversing a Double Linked-List in C++ using a 'reference pointer'

Here's an example I wrote for how to reverse a double (or 'doubly' as some people like to say) linked-list. The main point of this example is to show that reference pointers are actually useful in the real world. In this particular example it has two advantages: to avoid having to return a Node* and to make the code clearer. The alternative is to use a Node** or Node*** but the code is less readable.

Here is the example - and because i'm an ex ZX Spectrum junkie, it's using the original speccy font! If you don't know what a ZX Spectrum is, go to http://www.worldofspectrum.org


Saturday, November 28, 2009

A Glorious Dawn

The incomparable Carl Sagan.


Thursday, November 26, 2009

My First Erlang Server - A MathServer

Erlang is a very cool language - OK, it's not the most intuitive to learn if you're a Java/C++ developer but it is extremely powerful and scaleable.  I managed to start 15,000 client sessions against my MathServer on my laptop without any problem whatsoever.  Imagine doing that in Java or C++... not easy to get the kind of performance that Erlang gives you for free.

Here is the code:





and for completeness, this is how you start the server (replace AndrewTosh with the name of your PC):



See the Erlang official website for more details. I'll be doing lots more with Erlang so watch this space...

Saturday, November 21, 2009

MatLab on Windows 7 Tip

In order to run MatLab on Windows 7 you will need to reset your theme to 'Windows Classic'.  If you don't, you will only see the splash screen before the app quickly shuts down:



Notice I have a SuSE Linux desktop background ;-) with a carbon-fibre feel.

How to Avoid Windows 7 'Corrupt Disk' Errors

If you install Windows 7 on an apparently clean and perfectly nice partition created & formatted with Acronis Disk Director (like I did) you will suffer from a stream of seemingly never-ending The disk structure is corrupted and unreadable errors, especially when installing new software.

Don't panic!, your disk is not corrupted.  I too was alarmed at first and immediately started running CHKDSK which didn't help at all because the disk was fine.  The problem is with an incompatibility between Acronis Disk Director (and presumable other Acronis tools that format the disk) and Windows 7.  Now, you can still quite happily install programs on your other partitions (if you still have them) that were created for XP/Vista but not on your new partition that I presume you created explicitly for Windows 7 in the first place - which is just annoying.

There are two ways to solve this problem.

Solution 1.
  1. re-boot into XP/Vista
  2. use the Disk Management console (under Administrative Tools -> Computer Management) tool OR your favourite paritioning tool to delete the Windows 7 partition & re-create it
  3. this is the part that makes the difference.  Using the Windows disk management console, format the new partition (use the normal slow format, NOT the Quick Format)

  4. re-install Windows 7 - be sure to select 'Custom Install' and select your newly formatted partition.  All the 'corrupt disk' error messages will now disappear.  If you do get them at some point, it most likely is a corrupt disk but so far i've installed lots of apps and it's working perfectly
Solution 2.

  1. Using your Windows 7 installation DVD, select a custom install and let the installation format your partition for you.  This is the easiest solution if you have your Windows installation DVD handy.

Thursday, November 19, 2009

C++ Palendrome Detector

Don't ask me why (please don't!) but i've just written a Palendrome detector in C++. If you don't already know, a palendrome is a sentence that reads the same backwards as forwards. Some famous palendromes are:

"A man, a plan, a canal, Panama"
"Madam, I'm Adama"
"Madam, in Eden I'm Adam"

etc.

To test the function I also use the one of the longest palendromes ever created - a 15,139 word palendrome at http://norvig.com/pal1txt.html which I copied into a file and read into a string.

Here is the code:



Wednesday, November 18, 2009

Laurence Krauss - A Universe From Nothing

Laurence Krauss is one of the world's foremost theoretical physicists and a very interesting and funny guy as well. I regularly read his books and view his talks and lectures on physics and cosmology.

more info on Laurence Krauss here:

Google Chrome (Native) Browser on Linux

I've just installed the native Google Chrome (developer edition) on SuSE Linux 11.2. It's fast and easy to use and in my opinion it's better than Firefox. You could install this via WINE but why do that when there's a native version?

All I had to do was execute the following commands in the shell:

sudo rpm -Uvh http://www.benkevan.com/upload/software/google-chrome-unstable-3.0.191.3-1.i386.rpm --nodeps

and

for i in libplds4.so libplc4.so libnspr4.so ; do sudo ln -s /usr/lib/$i /usr/lib/$i.0d; done

I didn't get any errors but if you do please let me know and i'll try to help. This may also work in other Linux distro's.

Unweaving the Rainbow, by Richard Dawkins

We are going to die, and that makes us the lucky ones. Most people are never going to die because they are never going to be born. The potential people who could have been here in my place but who will in fact never see the light of day outnumber the sand grains of Sahara. Certainly those unborn ghosts include greater poets than Keats, scientists greater than Newton. We know this because the set of possible people allowed by our DNA so massively outnumbers the set of actual people. In the teeth of these stupefying odds it is you and I, in our ordinariness, that are here.
RichardDawkins.net

Books I am reading this book at the moment:

Atheist

The Out Campaign: Scarlet Letter of Atheism