Advice to CS Undergrads

Media_https3prodwehea_dmuam

Since I’m starting my PhD this year, I have been reflecting on how I would be different if I went back in time and started my degree all over again. I am also continuing tutoring, in my 4th year, and I have been occasionally approached by students and asked for general advice with their studies.

I repeat the same advice to most students, so I’ll attempt to distill it into the points below. Bear in mind that I am writing from a Computer Science perspective, although some of the advice can be applied to any field.

I didn’t do most of this stuff during my undergrad years. I still did well, but I think I would have had more fun if I followed this advice. If you’re not doing all the stuff on this list, that’s okay. Come back and try again later.

Read the rest of this post »

Nanosecond Timing

Media_httpprotomagcom_qdfqt

My Uni (RMIT) uses a mixture of Solaris, Mac OS X, Linux, and Windows computer labs. Our programs are nearly always tested on Solaris, though. Sometimes we are required to provide nanosecond timings in our experiments using the (real-time) POSIX function gethrtime().

Depending on which lab I work in, or if I’m working from home, I might need to comment out (or add compile guards) into my code to compile it correctly. This can make the code less readable, and can make its behavior (particularly output) on Solaris less obvious while testing on a foreign system.

Although the granularity, accuracy and any possible side effects (such as function overhead, or being affected by changing the system clock) may be different for each function, I find it helps to at least give a ball-park figure. Experiments should still be done on Solaris. If you want to use or modify my nanosecond function call wrapper, get it on GitHub.

Note: Not thoroughly tested on all target operating systems or compilers. It is only intended as a convenience.