Robin's Blog

Archive for the ‘IDL’ Category

Showing code changes when teaching

A key – but challenging – part of learning to program is moving from writing technically-correct code ‘that works’ to writing high-quality code that is sensibly decomposed into functions, generically-applicable and generally ‘good’. Indeed, you could say that this is exactly what Software Carpentry is about – taking you from someone bodging together a few […]

Previously Unpublicised Code: RTWIDL

When looking through my profile on Github recently, I realised that I had over fifty repositories – and a number of these weren’t really used much by me anymore, but probably contained useful code that no-one really knows about! So, I’m going to write a series of posts giving brief descriptions of the code and […]

Encouraging citation of software – introducing CITATION files

Summary: Put a plaintext file named CITATION in the root directory of your code, and put information in it about how to cite your software. Go on, do it now – it’ll only take two minutes! Software is very important in science – but good software takes time and effort that could be used to do […]

Please use sensible colours in your maps

If you are creating maps then for goodness sake Use sensible colours!  I was helping some undergraduates with some work the other day, and they decided to use the following colour scheme for representing river depth: Deep water: Red Medium-depth water: Bright green Shallow water: Pink Why did they do this? Well, either they were […]

Get more detailed messages for maths errors in IDL

I’ve just discovered something that I feel I must share here – partly to make more people aware of it, and partly so I don’t forget it. In the IDL programming language you will sometimes find your program interrupted by a line saying something like: % Program caused arithmetic error: Floating divide by 0 Sometimes […]