Monday, 11 June 2007

TU/e campus software

Always forget the link for campus software like I do? Find the list at this page.


I use my MacBook every single day, both at home and at university. Although you can specify more than one outgoing mail server in Apple mail, it is a bit annoying that you have to change the setting every time you change location. Enter MarcoPolo. This is quite a new program, but I use it on a daily basis and am very happy with it. MarcoPolo guesses at which location you currently are and can do a numer of things based on this guess. For me it changes outgoing mail server, default printer and, at university, switches off wifi.

It's free, it works great and, if you need this functionality, I strongly recommend it. Of course it also has builtin Growl support!

Visit MarcoPolo's website.


This is another type of application that you may not be familiar with. Growl is a program that shows notifications, little messages pop up on your screen. The great thing is that programs can let you know some task is completed, new mail has arrived, hardware was added to your system etc etc. This all happens without interfering with what you were doing. The messages do not distract, are yet informative and above all: different programs let you know stuff in a consistent way.

Many programs have Growl support built in; for some you can install little helper scripts or programs. I have installed GrowlMail and HardwareGrowler.

The program is free and super useful, so go get it!

Thursday, 7 June 2007


Every so often I need to measure data from a picture or pdf file. I keep searching for the perfect onscreen set of rulers. I found one a while ago that allowed me to first set up the scale with a few mouse clicks and then do the measurements. Alas, I have lost track of that app.

However, this RealBASIC app seems to be quit up for doing the job, and better still it runs equally well on Windows as on Apple. (RealBASIC should even run on Linux, no?) Check it out at:

Journler: how to organize things

Yesterday, I already discussed how to make more use of Spotlight with SpotInside. Spotlight is great for finding things, and you can find things even after you forgot where you have put things. I still tend to put things together in subfolders of subfolders, but sometimes wonder if things should go into my Programming/C++ folder or in my Work/SomeProject folder. In the end things tend to get scattered around anyway.

Wishing I had a Mac at my disposable the whole day, I would use this program: It lets you make a journal of things you collect. For me, when working on a project there is a lot of files on the periphery of the actual research or coding that can get lost. Scientific articles with interesting infomation, but how to store that knowledge. I tend to carry a lot of notes and articles with annotations. But these are all in paper, and that's hard to backup, or in half a year: hard to find.

With this fabulous program, you can make notes, and store all kinds of files with those notes. This means I could store a PDF together with my own notes about why this article was useful to me or what idea I got from it, in a digital form. Digital for me means backup-able, re-findable, re-usable.

Unfortunately having a Mac only at night, I cannot properly use to program, lest a sync all the files I generated or used during the day anyway. But that would mean I already would have organized them, and I need this program for that...

Early evaluation

Things I miss from a wiki-type solution instead of this blog:

  • possibility to edit (extend, change) other people's posts. Comments are available, but less visible and not suitable for e.g. typo's in the original post
  • ease of editing. Typing HTML codes is more work than wiki markup
  • not possible to see how some things (including pictures, making lists etc.) are done because you do not get to see the source of other people's messages
  • no list of recent changes

Advantages are obviously that we have a nicer link to the site and that we do not need to run our own server. Also, the user interface for blogger is localized and gets improved by Google over time.

Wednesday, 6 June 2007

QuickSilver - must have

Yeah, let's make this an Apple fan-boy blog! Inspired by Bas's previous two posts on Apple software, I thought I'd mention QuickSilver. This is a must have program, and it's free too!

QuickSilver's website is quite obscure, as is the program's documentation. You get a very good impression of what you can do by this post though. Check it out. You don't want to do without it once you've installed it on your Mac!

SpotInside: usable spotlight queries

MacOS X comes with a handy desktop search built right in. However, choosing what you are looking for from a long list of results can be quite awkward. On my ageing Mac Mini — a real Mac being a PowerPC! — also the search-as-you-type feature of spotlight makes it painfully slow, to the point of unusable.

A better way to search the results is offered by SpotInside. It shows the contents of almost everything, makeing it a treasure to find what you are looking for.

References in LaTeX using bibtex

If you use LaTeX often you will soon find that you should keep track of references with bibtex rather than specifying them time and time again in a bibliography-environment in each document separately. Here's a short intro on working with bibtex.

Somewhere in the beginning of your text document, you tell LaTeX which style to use for the references, e.g.


You can just cite papers and books with "\cite" as you do now. However, at the end of the document, you write


instead of the whole thebibliography environment you use now. That's all.

Now, use "latex mytext" on your file twice, next run "bibtex mytext" and finally twice more "latex mytext". You don't have to do this every time - just when you have used new citations in your text, you need to run
"bibtex" again. (Explanation: bibtex actually generates the thebibliography environment for you, including all references you actually use. See the file mytext.bbl for the generated file.)

I've enclosed a small example, see test.tex:



% The following command changes the way your list of
% references will look, as well as how the citations in
% the text will look. Unquote "apalike" to get similar references as
% in my PhD thesis.


Here is a reference to the first entry in my bibliography file

If you would like to refer to a theorem or page in a reference,
use something like \cite[p.~100]{RANA9804} or \cite[Th.~4]{RANA9804}.

If you use the \verb=cite=-package, lists of references will be
put in a nicer form, such as \cite{RANA9804,RWTH152,NAVW}.



Here's the bibtex file martijn.bib:

% Sample bibtex file

author = "Martijn J. H. Anthonissen and Bas van 't Hof and Arnold A. Reusken",
title = {A finite volume scheme for solving elliptic boundary
value problems on composite grids},
month = feb,
year = 1998,
institution = {Eindhoven University of Technology},
address = {Eindhoven},
number = {RANA 98-04}

author = "Martijn Anthonissen and Bas van 't Hof and Arnold Reusken",
title = {A Finite Volume Scheme for Solving Elliptic Boundary
Value Problems on Composite Grids},
month = feb,
year = 1998,
institution = {Institut f\"ur Geometrie und Praktisch Mathematik, RWTH Aachen},
address = {Aachen},
number = {Bericht Nr.~152}

author = "M. J. H. Anthonissen and B. van 't Hof and A. A. Reusken",
title = {An Iterative Finite Volume Discretization Method for Solving Elliptic Boundary
Value Problems on Locally Refined Grids},
journal = {Nieuw Archief voor Wiskunde},
volume = 17,
pages = {111--123},
year = 1999

References in LaTeX

A quick LaTeX-tip on the authors field in an item in a bibtex-file. You should always use spaces in
between initials, so e.g.

author = "C. R. Traas and H. G. ter Morsche and R. M. J. van Damme",

If you do not include the spaces, bibtex thinks the first author has first name "C.R." rather than understanding that you mean he has initials "C" and "R".

This makes a difference depending on which bibliography style you use.

Shell scripts

The following script is not an example of great programming, but shows some of the standard commands available in the UNIX shell:

for FILE in *.gif
do if test $l -ge 100
then mv $FILE $l.gif
elif test $l -ge 10
then mv $FILE 0$l.gif
else mv $FILE 00$l.gif

A standard loop can be programmed via

for (( n=1 ; n<9 ; n=$((n+1)) )); do echo $n; done

TU/e Dial-in

If you are ever in the sad situation that you want to use an old-fashioned telephone modem to access the internet, you can use the TU/e dial-in server. The telephone number is 06760 04321. Log in using your NT account.

Using the shell

Never underestimate the power of the UNIX shell! The following one-liner converts a batch of files from gif to jpeg for you

for file in *.gif; do convert ${file} ${file%gif}png; done

Note that the %gif removes gif from the file name for you. If you are trying to create such a one-liner it is very convenient to use echo to first print commands before actually executing them, so

for file in *.gif; do echo convert ${file} ${file%gif}png; done

is harmless but gives you an indication of what will happen.

Index in LaTeX

If you want to add an index to a LaTeX document (say, a thesis), the simplest option to mark a word (e.g. convection is to use \index{convection}. More advanced uses include:

  • \index{dimensions!rule!width} - this is for subitems
  • somewhere in your text you put \index{domain decomposition|(}, then you write a lot of stuff on this topic and you end with \index{domain decomposition|)} - this is for a page range
  • \index{delta@$\delta$} - this tells LaTeX that it should treat the letter as the word "delta" when compiling the index
  • \index{topic|see{some other topic}} - for a cross-reference

Brackets in LaTeX

If you use \left( and \right) in LaTeX it will automatically make the brackets larger, depending on what you put in between. Sometimes it doesn't do a good job and you should manually resize the brackets. These are, arranged from smaller to larger, your options:

  • (, )
  • \bigl(, \bigr)
  • \Bigl(, \Bigr)
  • \biggl(, \biggr)
  • \Biggl(, \Biggr)

Tuesday, 5 June 2007

Vienna RSS reader

Surfing from website to website to quench the thirst for nerdy news can be quite consuming as interesting websites as, and move more and more into the Web 2.0 era and their pages take longer and longer to load. If, on top of that, you decide to start a blog to replace an unfortunately and most stupidly perished snipsnap wiki that you and (much more so) a friend had filled with information about all the computing bits and pieces of a numerical analyst's life, then the daunting task of visiting even more website can become quite frightening.

Of course, what one needs is a decent RSS reader and while Safari displats feeds quite nicely a real RSS reader can safe a lot of time. On MacOS, I prefer Vienna ( opensource and complete.