Sam’s Network Simulation Cradle Blog

27 Mar 2008

The end of an era

Filed under: Network Simulation Cradle — sammydre @ 5:54 am

A nice excerpt from a form handed in today:

thesis_submission_excerpt.JPG

It’s done — “there’s no going back now.” I thought when I finally handed the thesis in I’d have a lot to say here. However, I don’t.

19 Mar 2008

The NSC development repository

Filed under: Network Simulation Cradle — sammydre @ 10:06 pm

… Should really be opened up.

This post is just a TODO to remind me to look into this.

Final bits of the thesis…

Filed under: Network Simulation Cradle — sammydre @ 9:56 pm

TODO:

  • read through thesis, check grammar, etc. (done)
  • incorporate fixes from reading above (done)
  • check margins (make into PDF, make sure paper is A4, measure margins to make sure they are right, possibly look for an A4 printer here (might be hard, everything is letter)) (done)
  • check Waikato dissertation style guide for any other things we must conform to (done, and fixed title page)
  • look into ns-2 graph in chapter 2, look to fix (done)
  • check table/figure/listing titles/captions: top or bottom? refer to Waikato dissertation style guide to see what is required (done, no explicit requirements, so wont bother changing unless its requested later)
  • consider changing last paragraph of the abstract (done, think it’s ok)
  • spell check (ensure no local word file first) (done)
  • “check for widows” (done)
  • find which pages need to be printed in colour (done)

15 Mar 2008

Fun with subversion repository history: a visualisation

Filed under: General — sammydre @ 8:34 pm

Some time ago I hacked up a little script to view my subversion repository version over time. I lost the initial script but I’ve recreated it today. Thought it was interesting to look at as the history dates back to 2003. Creating this is very easy with the help of svn log.

Bash:
  1. svn log svn+ssh://host/repository/ | grep -E "^r[0-9]+" | awk ‘{ print $5, $1 }’ | sed ’s/r//’ > repo.txt

Produces a file like:

2008-03-12 1681
2008-03-12 1680
2008-03-11 1679
... etc ...

Looks good for graphing with a program like gnuplot:

set xdata time
# The format of time found in the file
set timefmt "%Y-%m-%d"

set term png
set output "repository.png"

set xlabel "Date"
set ylabel "Repository revision"
set title "Repository version over time"

# The time format actually shown on the x-axis
set format x "%Y"

# It's tricky to get the tics right in time mode, as you have to specify increments in seconds.
# I find it easier to just specify what dates I want shown
set xtics ("2003-1-1", "2004-1-1", "2005-1-1", "2006-1-1", "2007-1-1", "2008-1-1")
set nokey

plot "repository.txt" using 1:2 with lines

And this produces the following result:

Sam’s research repository version over time

The hickup in the graph for me is due to an import with cvs2svn. Looks like the dates don’t quite increase as one would expect (this can be seen in the svn log output, too). In general the approach appears to work well enough, though.

Upgrading WordPress with SVN

Filed under: General — sammydre @ 5:51 am

One of the recommended ways to upgrade WordPress these days is with SVN. This is a convinient way of updating that is a lot quicker than the previous method. One of the problems with WordPress I’ve found over 4 years of running the software is that it has required many updates — I’ve almost never wanted any additional features, but there always seem to be new security holes. So a quicker way of updating is nice.

One of the things about updating with SVN, which does not appear to be discussed, is that it leaves a plethora of “.svn” directories on your webserver. Stored in these directories is the subversion source control info and backups of the working copy. By default, if you update with SVN, any user could browse the exact code that is running your blog. This sounds like a bad idea to me. While Wordpress is already open source, I don’t see any need to allow potential users/crackers/hackers/whatnot to browse through the exact code I’m running here. .htaccess to the rescue.

You could configure your web servers config to deny access to any directory with “.svn” in it.

If you are only a user on a webserver with .htaccess, it gets a bit more tricky. You could put a .htaccess in each .svn directory. Easy with a script, but tough to maintain. Or you could use mod_rewrite to make a simple rule that denies access to any pages with /.svn in the path:

RewriteEngine on
RewriteRule ^(.*\.svn.*)$ $1 [forbidden]

13 Mar 2008

URLs in Latex and hyperref

Filed under: Network Simulation Cradle — sammydre @ 9:48 pm

The url package in Latex does a good job of formatting URLs and breaking them over lines when need be. Unfortunately, when you use hyperref, the package which makes PDF links and stuff work, the breaking over line functionality… breaks.

The solution of this problem is described in the FAQ. Basically, you need to get the breakurl package, a link for which is in the FAQ entry.

12 Mar 2008

List spacing and Latex

Filed under: Network Simulation Cradle — sammydre @ 7:12 pm

I was finding my list environments (enumerate, itemize, etc.) in Latex were taking up a lot of space. While space isn’t a huge concern in a dissertation, they tended to look a bit too… spaced out. I did a bit of research on this and mostly remedied the situation. Turns out that by default the list environments use extra line spacing, so if you’ve already got 1.5 line spacing to begin with, they end up being huge.

Some people advocate creating your own new environment commands where you manually set some of the spacing lengths down.

Another blog provides some very good information on reducing whitespace. This helped a bit for me, but it wasn’t quite what I was looking for.

I found out about the package enumitem. This is quite cool, making it very easy to set the line spacing to something reasonable for all of your lists. I did something like:

LaTeX:
  1. % enumitem setup
  2. \setlist{noitemsep,topsep=0pt}
  3. \setitemize{noitemsep,topsep=0pt}
  4. \setenumerate{noitemsep,topsep=0pt}

It’s still not perfect. I still end up with lots of white space between a paragraph and a list. But its much better than it was.

Performant: real word or not?

Filed under: Network Simulation Cradle — sammydre @ 6:22 pm

I got some feedback from my PhD supervisor recently and one of the comments was as follows:

Real word?

I had been using “performant” to mean something along the lines of “fast enough”. But is it really a word? I wasn’t actually sure. Turns out a few others have had the same problem. Looks like Jeff Boulter bet me to this by about 4 years. The comments on the blog entry there provide a bit more background to this issue.

I just changed the way I wrote my sentence in the end.

Maybe a proliferation of blog entries on this word will aid its journey to the dictionary!

Powered by WordPress