Optus, Optus, Optus. You really like screwing over your customers right? I really didn’t appreciate having to work out why my home network printer stopped working right in the middle of exams — because you screwed with DNS to earn a few easy quid. (Same goes for you, Telstra.)
You are currently browsing the archive for the Computing category.
The International Free and Open Source Software Law Review – about time, although, of course, it’s more for lawyers than FOSS enthusiasts.
When the SUITS web server went down a couple of weeks ago, the skies darkened and there was much outpouring of grief.
In the words of one committee member:
At approximately 1445 today, suitsbeta shut itself down, never to wake up again. Attempts were made to revive it by powering it up, but alas it failed to POST. Our thoughts go out to its family and friends.
Another expressed regret:
It was nice knowing you suitsbeta. We’re sad that you toiled alone and in sickness for your last few months.
But it was well-loved:
Although I did not log into suitsbeta many times I did appreciate the machine and the contribution it made to this society. Few can claim to have sustained such continuous service to the society and its members, never asking for recognition or relief.
However, death can give rise to hope:
The memory of suitsbeta’s cranky innards will live on in the cron messages, reboot requests, and database errors that pepper my email archives. May the metal be reborn and the warnings silenced.
Tags: suits
I recently started doing software development on a casual basis for GPlates, at the School of Geosciences, University of Sydney. Think back to high-school science class where you learnt about Pangaea and Gondwanaland and how the Earth’s tectonic plates have ever-so-slowly shifted over millions of years. GPlates is software that allows scientists to “wind the clock back” on these plate movements and visualise what the Earth might have looked like all these years ago. It’s open-source, so if you’re curious, grab a copy and play with it.
I’m quite glad to have met the GPlates team. It’s difficult, I think, to find quality software engineering in Australia, and GPlates development is led by a bunch of developers who are passionate about writing quality, well-designed, best-practice C++ code. It’s certainly not your average in-house or academic research software. And it sure is more intellectually safisfying than working in corporate IT.
I just got my Google Wave developer sandbox account! I can’t wait to play with it, but I think I’m going to have to put my excitement on ice until I finish my exams in a week’s time. Boo.
Tags: google wave
To kill a singleton: I found this to be a useful discussion on how to write a singleton class in C++ that ensures the singleton is properly destroyed (for even multithreaded applications).
- If you hate Sydney Mail, fear not: you have options.
- To redirect your Sydney Mail email to another email account, you can either a) use a “redirect” rule in Sydney Mail or b) get your email client (such as Gmail) to pick it up via POP3 (for this, see the main post below). Both a) and b) do the job.
- To send email from within Gmail as if you were sending it from Sydney Mail, add your Sydney Mail address under the Addresses tab in Settings in Gmail.
- However, some recipients, such as those using Outlook, may see that the sender of your email is “xyz@gmail.com on behalf of abcd1234@uni.sydney.edu.au”. If you don’t like this, you can fix this by getting Gmail to send email via SMTP. To find out the address of the SMTP server, see these instructions.
“Sydney Mail is a new and significantly improved student email service,” announced the email from the university proudly.
The truth is that the university has delivered something that’s better, but is rather deficient in its own right: they’ve outsourced email to Microsoft so it’s all now run off Outlook Web Access. I could go on and on about why I would never use it, but I’ll just show you how to avoid using it.
The existing email system allows you to forward to a personal email address, and the university provides instructions for how to do it on the new system. Don’t follow those instructions! It is true that email will be forwarded from Outlook to your personal email but what happens is that the emails are literally forwarded! If Bob sends you an email, when it pops up in your personal email, the From field will show your university email as opposed to Bob, which is incredibly inconvenient.
The solution? Get your mail client to retrieve mail from Outlook via POP3. If you’re using Gmail like me, go to Settings > Accounts. Look for the “Get mail from other accounts” section and click the “Add a mail account you own” link. A window will then pop up; try the following settings:

Email sent to your university email won’t get forwarded instantly like it used to, but it’s a much better solution than the one offered by the university.
Tags: email, epic fail, gmail, microsoft, outlook, sydney university
Here are the solutions to the C++ maps exercise I posed in this post.
The first set of problems relates to the fact that the Employee class has no default constructor. Here’s why. In the line
id[0] = Employee("John Smith");
what doesn’t happen is that the key 0 gets associated with the new Employee object you just created. What does happen is that the id[0] part tries to default initialise an Employee object, and then assign using operator= the Employee object you created on the right hand side. That’s all fine if you have a default constructor, but our Employee class doesn’t have one (because I’ve defined another constructor but not the default constructor). Without changing the class definition to add a default constructor, you will need to explicitly insert the key-value pair into the map, like this:
id.insert(make_pair(0, Employee("John Smith")));
But what about this line?
cout << id[0].name << endl;
Surely, it wouldn’t be trying to call the default constructor here, because I am merely retrieving the value of id[0], which I know has already been constructed? But at compile time, how would the compiler know whether the call to id[0] will result in a new object being constructed or not even if you do? To get around this problem, you’ll have to go around the long way:
cout << id.find(0)->second.name << endl;
So the moral of the story is write a default constructor (if it makes sense to do so)! Note that operator[] is also unavailable when you have a const map. (Why?)
For the second lot of problems, the root of the problem is that you are using Employee as the key type of the map. You can only use a class as a key if you can order objects of that class, so you’ll have to write an operator< for Employee.
Why doesn’t the following code compile? Without changing the definition of the struct Employee, can you make it compile so that it does what it’s meant to do?
#include <iostream> #include <map> #include <string> using namespace std; struct Employee { string name; Employee(const string& s) : name(s) { } }; int main() { map<int, Employee> id; id[0] = Employee("John Smith"); id[1] = Employee("Mary Jane"); cout << id[0].name << endl; map<Employee, int> id2; Employee a("A"), b("B"); id2[a] = 100; id2[b] = 200; return 0; }
(I gave this exercise to my C++ students a couple of weeks ago.)


Recent Comments