Nick Geoghegan

Professional Yak Shaver

Category: Programming

PGI Compilers and CUDA 5

I’ve been using the PGI Compilers along with CUDA to do GPGPU development for some time. The compilers themselves are fantastic – OpenACC support, OpenMP support and loads of other cool things. Recently I upgraded to CUDA 5.0 and noticed that a number of programs now failed to compile, as the compiler wasn’t seeing CUDA 5 […]

Read More

Scarface as Code

#include <stdio.h> #include <string.h>   void main(void){   int tonyMontana=0; char* get="First";   char* then=", then"; printf("%s",get);   while (!strcmp(get,"women\n")==0){   switch (tonyMontana){ case 1: get="power"; printf("%s", then); break; case 2: get="women\n"; printf("%s", then); break; default : get="money"; break; } tonyMontana++; printf (" you get the %s",get);   } }#include <stdio.h> #include <string.h> void main(void){ […]

Read More

2012 Reading List

My reading list has really spiralled out of control lately, so this is a post to let you know what I’ll be reading for the rest of the year. Python Learning Python by Mark Lutz Programming Python by Mark Lutz Python Cookbook by Alex Martelli, Anna Ravenscroft and David Ascher Python in a Nutshell (In a Nutshell (O’Reilly)) […]

Read More

Inventing on Principle

Every aspect of your life is a choice. There are default choices: you can choose to sleepwalk through your life and accept the path that’s laid out for you. You can choose to accept the world as it is… but you don’t have to. If there is something in the world you feel is wrong, […]

Read More

The ‘Anti-Java’ Professor and the Jobless Programmers

James Maguire’s article raises some interesting questions as to why teaching Java to first year CS / IT students is a bad idea. The article mentions both Ada and Pascal – neither of which really “took off” outside of the States, with the former being used mainly by contractors of the US Dept. of Defense. This […]

Read More

Abstraction

A few things can confuse programming students, or new people to programming. One of these is abstraction. Wikipedia says: In computer science, abstraction is the process by which data and programs are defined with a representation similar to its meaning (semantics), while hiding away the implementation details. Abstraction tries to reduce and factor out details so that the programmer can focus on […]

Read More

Mutex vs. Semaphore

Back when I taught C programming labs, a student asked what was the difference between a Mutex and a Semaphore. My simple explination is below. Little did I know, Niclas Winquist came up with the same explanation in 2005. To me, this really is the best explanation for a non-technical audience. Mutex Mutex is also called “Mutual Exclusion”. […]

Read More