Summer of Etc!

posted: Fri, 18 Dec 2009 11:04 | filed under: / / | permalink | Tags: , , , , , , | Comments: 1

Once again, I've left this site for faaaaar too long without letting you all know what I've been up to of late (oops). Needless to say, a fair bit has happened in the past few weeks, and it's probably worth telling you all about this.

Honours, Semester 1 (during semester 2)

Uni study's been going quite swimmingly of late: both my units of study went pretty well (insofar as I got HDs in them); thesis on the other hand, has only really just started to take off. My research is into the computer vision task fo object detection (for example, finding faces in images), in particular, I'm working on improving the scheme built into the Intel OpenCV Library (Haar Classifier Cascades, if you're at all interested) by having them consider colour.

One of the deficiencies I've discovered during my research is lack of sufficient real-world colour face datasets to perform detection upon: whilst I need in the order of 2000 faces (1000 to train upon, 1000 to test upon), the largest useful academic set is an order of magnitude smaller. For this reason I'm developing my own set. My current intention is to assemble the data set entirely from Creative Commons-licensed data (e.g. from Flickr and Wikipedia) and to release the resultant set under CC licenses too. I expect I'll give a lightning talk at LCA on this, I'll also dump a blog post here somewhere about what sort of data I'd like donated.

Summer of Google

One thing that's looking like it will derail my Honours work slightly happened not too long ago. I applied for a Software Engineering Internship at Google Sydney back in July, and didn't hear much about it. In late October, however, I very suddenly got contacted about it, and interviewed for the position, and quite happily, I was offered a job. This, amongst other things, involved dropping (almost*) everything for the summer, and moving to Sydney within two weeks, which I guess I've done somewhat successfully.

So I'm now working at Google until sometime during the first two weeks of semester (!). My current project involves working on [redacted], to make [redacted] do [redacted]; in related news, the new Sydney offices are pretty damn cool, the food is excellent, and the work is fun. I'm really looking forward to the rest of my time here.

*I guess the most important thing to mention here is that I'm still spending my week-and-a-bit in Wellington for Linux.conf.au 2010, and that I'll still be running the Open Programming Languages Miniconf there. I can hardly wait!

3 birds...

posted: Fri, 24 Jul 2009 22:06 | filed under: / / / | permalink | Tags: , , , , | Comments: 2

Let's kill two birds with one picture, as it were...

Point 1? I got an Honours scholarship. Yay me! Secondly? I got my final mark today (for Functional Analysis), a very satisfying 95 (better than my previous marks for the semester by a long way). This means that I now officially have sufficient credit to graduate to a Bachelor of Science (though this is mostly a formality, I've been doing Honours study for two weeks now), and will do so in two weeks time. Awesome!

The third bird? My Honours thesis topic has been allocated. Put as vaguely as possible, it's about augmenting a machine learning-based object detection system (for images) to use colour images instead of black and white. My supervisor is Mike (my ACM-ICPC coach, as it were). I'll _try_ and explain it better once I've done a bit more reading than I have so far...

Normal service to be resumed later,

--Chris

More Thingies!

posted: Mon, 20 Jul 2009 10:27 | filed under: / / / | permalink | Tags: , , , , | Comments: 1

Time for another status report on things that have happened recently!

More Uni!

First up, I've started on my Honours year! Isn't that exciting? As I've learnt this week, the next 12 months for me will consist of 4 coursework units, and a research thesis. This semester, it looks like I'll be studying Embedded Systems (yay! I get to program some microprocessors! Whoo!), Computing in Context (a research-intensive unit in HCI), and possibly one other, depensive on what the unit outline for it looks like. My thesis I'm not so sure about, given that the process by which we get assigned supervisors hasn't occurred yet. Currently, I have a pile of 12 project areas for my perusal, from which I must rank 6 proposals by order of how much I want to study them. At the moment, there are some interesting-looking proposals relating to Machine Learning, and some interesting ones relating to web monitoring; I find out what I've been assigned by Friday (very exciting, no?).

Linux.conf.au 2010

Linux.conf.au 2010 is being held in Wellington, New Zealand. One of the things that makes LCA a truly wonderful conference is the first two days, devoted to single-day "miniconfs" on topic areas of interest to the Free and Open Source Software communities. I'm currently involved with two proposals; I'm primary proposer of a developers' miniconf (called "Open Languages") aimed towards uniting the developer communities of open source programming languages, and I'm secondary proposer of an education-flavoured miniconf. I'd be equally happy if either of these proposals get up, but with 30 other awesome proposals competing for 12 openings for miniconfs, there's going to be some very stiff competition.

Blackjack?

Hey, turns out I turned 21 on Wednesday. How did I manage that?

End.

posted: Wed, 08 Jul 2009 19:16 | filed under: / / / | permalink | Tags: , , | Comments: 0

After a somewhat self-enforced marathon exams session, I finished my last (and arguably most difficult) exam on Monday, that was for Functional Analysis, and my first results came out this morning: 3 HD marks and a Distinction, not quite as good as my excellent run of last year, but still not dreadful either. Given that I've passed everything, it means that I've finished the undergrad component of my degree! Hurrah!

Graduation is in early August, but before then, the Honours programme starts Friday, after only three days worth of holidays. Excellent!

What? Where did the last 2 months go?

posted: Mon, 01 Jun 2009 14:58 | filed under: / / / | permalink | Tags: , , , , , | Comments: 0

Well, somehow we've made it to the end of the first semester of this year, and I quite inconveniently forgot to write about anything since the start of April. This is quite problematic. I guess that means it's time for me to do my semi-regular dump of notable things. Bleh.

So, where to begin?

ACM-ICPC Trip

So yes, we did arrive safely in Germany, spending a week with my relatives who live just outside of Frankfurt-am-Main in centre of the country. That was a fun week, we spent many days taking in the area, sampling the culture, and preparing for the programming contest the next week. We spent a week in Stockholm, where the contest was held, which was great fun in general (despite being somewhat colder than Germany and indeed Australia), we met many like-minded people, and thoroughly enjoyed the week. In the end, we solved three problems in the contest, which was (just) sufficient to see us getting a ranked position of equal 49th (yay!).

I'll write up the two weeks spent overseas in greater detail soon (hopefully).

Twitter & Co.

So I succumbed to peer pressure roughly two weeks ago, signing up for Twitter and Identi.ca. As a fun experiment into the field, I investigated how long it would take, and what measures would be necessary, for someone to notice that I was on Twitter, and then follow me. I did this by following one or two people per day, and getting them to drop relatively silent hints about my existence. In the end, it took about a week for someone to notice me, with a fairly blatant reference to me needed to make it obvious. Despite the great scientific breakthrough observed, I don't think the result is sufficient to write a paper about... :P

My main observation is that Twitter is miles behind Identi.ca in terms of useful features (I like group notices, denoted by '!' tags in Identi.ca, and Jabber-based updating in particular), stability (updating my Avatar in Identi.ca does indeed work first time, every time, whereas it took me 10 tries to get it to work in Twitter), and ability to store my own name (This would make Twitter the first site that I have ever needed to call myself "Chris" as opposed to "Christopher"), that said, Twitter is ahead greatly in terms of the number of people on it, which makes sticking around there a necessary evil (boo for centralisation!).

End of Semester/Undergrad

And yes, it would be amiss to not note that last week was my last week of lectures as an undergrad student (presuming, of course, that all of my exams go sufficiently well), it was mostly uneventful, with the exception of having to hand in two major assignments, prepare and present a lightning talk, and run the session in which it was presented. All-in-all rather busy!

Cocomo: An experiment in metaprogramming in python

posted: Mon, 01 Jun 2009 11:16 | filed under: / / / | permalink | Tags: , , , , , | Comments: 1

Friday saw the second edition of the UTAS Computing Society Lightning Talks, if you haven't seen them already, I highly recommend that you check them out -- this semester's were at a very high standard indeed, and I wish I'd printed out more certificates for good talks :). My talk was a demonstration of using metaprogramming in Python, though that's not what it seemed to be about.

An introduction

I went to the Apple University Consortium's Cocoa Workshop at the University of New South Wales in February of this year, it was a heap of fun, and we learnt heaps whilst there. One of the key distinguising features of Cocoa is its use of verbose English method and attribute names, the idea being that each line of code should make a reasonable amount of sense when read aloud, hence:

NSString *str = [[NSString alloc] initWithString @"Hello World!"]

does indeed allocate memory to hold a string object, and initialises the newly-allocated memory with a string containing "Hello World!" (this code is highly redundant!). Supposedly such a naming scheme allows coders to write code that is easily maintainable by the original coder, and easily learnable by people who pick up the code for the first time.

On the other hand, my friends, collectively known as Maclab (named after the room at UTAS we inhabit) have developed a rather unique vocabularly, which in particular involves replacing as many words as possible with either 'thrust' or 'fork', so "Thrustingly thrust the forking forker" is not an uncommon utterance amongst my friends. If this is indeed their usual mode of conversation, then Cocoa's way of identifying methods and attributes is not necessarily going to be a particularly intiuitive one. So, clearly, we need a version of cocoa that meets their needs.

The setup

So, conveniently, Apple provide a comprehensive version of the Cocoa API, thanks to the PyObjC project. We can therefore use the Python bindings for Cocoa facilitate our new version of Cocoa. Since Cocoa has a very consistent naming scheme, we can simply perform string replacement to translate from our maclab language to the standard cocoa language, using a routine somewhat like this:

def translate(inp):
	''' Translates an input string from key language to value language '''
	for i in LANGUAGE:
		if i[0].islower():
			# Try both capital case and lowercase
			inp = inp.replace(i, LANGUAGE[i])
			inp = inp.replace(rtitle(i), rtitle(LANGUAGE[i]))
		else:
			inp = inp.replace(i, LANGUAGE[i])
	return inp

def rtitle(i):
	return i[0].upper() + i[1:]

Here, LANGUAGE is a dictionary, with keys in the language code will be written in and values being the target language (in this case, Cocoa). There's not all that much of a sophisticated nature going on in here. Now that we have a method by which we can translate our attribute accesses, we can get to the meat of the the code.

The implementation

To achieve the new API, we need to use a technique that I will call proxying. This involves the use of objects whose sole purpose is to intercept attribute accesses and calls to an underlying object. In this case, the point of intercepting the calls and accesses is to perform translation from our new objects to standard Cocoa objects. In Python we can do this by overriding the standard attribute access and call methods.

First up is __getattr__, the attribute accessor method -- for this, we are passed a string; the name of the attribute that we're looking for, which we translate, and then attempt to access upon the method on the underlying object (in this case, self.__u__). There is one slight hitch: in certain cases, we may not want to translate the attribute name. This is true, in particular, of the attribute that represents the underlying object. Hence we provide a REAL_ATTRS list, for which we use the default __getattr__ method for. This results in code that looks something like this:

	def __getattribute__(self,name):
		#''' Perform method/attribute proxying on ''' + repr(self.__u__)
		if name in REAL_ATTRS:
			return object.__getattribute__(self,name)
		else:
			new_objectname = "self.__u__.%s" % translate(name)
			new_object = eval(new_objectname)
			return CocomoProxy(new_object)

Notice that we use eval to perform the lookup? It turns out that __getattr__ doesn't work universally, whereas . notation does -- so we use that for less failover.

Being able to call methods on the objects is important, but slightly more difficult -- we want behaviour to be maintained, so we need to make sure that proper Cocoa objects are passed as arguments, rather than the Proxy objects that you may have originally dealt with. We can do this with Python's argument unpacking -- we build up a list of arguments, and unproxy them as necessary:

	def __call__(self,*a, **k):
		new_a = [i.__u__ if type(i) == CocomoProxy else i for i in a]
		new_k = dict( (translate(i), k[i].__u__ if type(k[i]) == CocomoProxy else k[i]) for i in k)
		return CocomoProxy(self.__u__(*new_a,**new_k))

We may also need to deal with iterators. This can be done using a standard generator function, thusly:

	def __iter__(self):
		for i in self.__u__:
			yield CocomoProxy(i)

Finally, there may be legitimate reasons for extracting Cocoa objects, these include printing strings, so we provide an accessor method called no_really:

	def no_really(self):
		return self.__u__

And that's the entire implementation! The final thing we need to do is provide a pre-proxied version of the base module for Cocoa. Let's call it GypsyMagic.

The payoff

So now that we have a working bridge from Maclab English to Cocoa English, we can take this sample code that puts some stuff into an array, and then prints it:

import AppKit

hworld = AppKit.NSString.alloc().initWithString_("Hello, World!")
arr = AppKit.NSMutableArray.alloc().init()

arr.addObject_(hworld)
arr.addObject_("Boop!")


for i in arr:
	print i	

And write it in the far more palatable:

from cocomo import GypsyMagic

hworld = GypsyMagic.OGMouthWords.subsume().makeGogoWithMouthWords_("Hello, World!")
arr = GypsyMagic.OGForkableTrinketHolder.subsume().makeGogo()

arr.thrustinglyThrustForker_(hworld)
arr.thrustinglyThrustForker_("Boop!")

for i in arr:
	print i.no_really()

If you're interested in seeing how it all fits together, see Cocomo's website.

February in Brief

posted: Sat, 28 Feb 2009 00:06 | filed under: / / / | permalink | Tags: , , | Comments: 1

Wow. It's been a thoroughly busy month, lots of things to recap, so I won't bother going into too much detail... Here's a selection:

AUC Workshops

In February, the Apple University Consortium sent me to Sydney for their annual Cocoa Developement workshop, and to Melbourne for their inaugural Ruby on OS X Workshop. Both workshops were great, and if you attend an AUC Member University, you really should sign up for their future workshops; that said, I can't see me seriously using Rails for anything in the future, and Obj-C peeves me... Cocoa, on the other hand is seriously exciting, and even from a few days' exposure, I can see why Cocoa developers love their framework so much, and the lack of a similar facility for making good UIs quickly in Linux is really obvious to me now . Hopefully this is something that gets addressed in future releases of the major desktop environments.

Semester 1 Gogog!

Uni went back this week, and it's been all-in-all rather eventful. It's the start of my final semester of undergrad study, which is going to encompass holding the presidency of TUCS, our Campus Computing Society, going to Stockholm to compete in the ACM Programming Contest, all the while juggling effectively 5 units of study. How I'm going to cope with it I have no idea, presumably I will though...

This semester, I'm studying three maths units (two pure, one applied): Computational Methods (or, how to avoid doing hard maths... clever how they keep that one for third year), Algebra 3 (mostly group theory this year) and (Functional) Analysis 3; Computing-wise, I'm studying Data Mining & Text Retrieval (the 3rd-year Machine Learning unit), and Advanced Web Development (purely as a Gimme unit). Hopefully this one constitutes a reasonably good mix between fun and interestingness -- and hopefully not too time-consuming. On another note, Kumudini (the lecturer for Analysis) deserves special thanks, as she's gone out of her way to ensure that Analysis is being offered before Semester 2 for me, which I'm quite grateful for (as it means that I can graduate with the Pure Maths Major).

TUU Societies Day 2009

Mentioning the start of semester without mentioning Societies day would be quite amiss -- for those who are unfamiliar, socieities day is a 3-hour event held on the first Wednesday of the Uni year, where students signup for their chosen sports clubs and societies, generally in return for Alcohol. This year, however, the Union made the curious decision to spilt the allocated space in two, and provide a dry area, which proved to be very useful for us at TUCS (as we'd decided quite some time eadlier that we'd not be providing alcohol). The Union kindly provided us with space directly outside the wet area, which gave us a massive wall for advertising, and the dry area made all our volunteers highly visible (due to there actually being space to move about).

TUCS put on a Barbecue, and provided "Enticing Gift Bags" (full of things including leftover LCA09 schwag) to new members. The Nett effect of this was that TUCS signed up 115 members, which is almost three times as many as we managed on societies day last year. Obviously, we're pretty happy.

TUCS Societies Day 2009TUCS Societies Day 2009

That's all for now, more as it comes!

Academia (Blaargh...)

posted: Fri, 28 Nov 2008 14:19 | filed under: / / / | permalink | Tags: , , | Comments: 0

Another semester, another 4 HDs... No idea what to make of that. More specifically, my marks were: 85 for Graphics, 85 for Research, 96 for Real and Complex Analysis, 97 for Topics in Advanced Mathematics. All in all, it's about what I expected, which is probably the first time that that's happened for me, and it's a nice feeling.

19 down; 5 to go.

The Week in Review...

posted: Fri, 21 Nov 2008 18:41 | filed under: / / / | permalink | Tags: , , , , , , | Comments: 0

Time for me to enumerate a few things that have happened of late (in reverse order of occurrence, naturally), since it now seems like the time to do so.

Uni

I handed in my Computer Science term project today, which, I suppose means that my academic year is now complete. I'm fairly happy with how the semester's progressed, every unit that I studied (including the two that I chose on a whim) has been excellent, which is more than I can say for previous semesters. Analysis (Real analysis to be specific) was absolutely fantastic, and I'll be doing my best to enrol in the follow-up functional analysis unit (I've had it suggested to me by several people, and I'm convinced), and it's certainly made the maths major I'm now enrolled in seem like a very good idea.

As far as I can tell, exams went well, but I won't know for certain until results are released next week (I'm very confident with my two maths units, Graphics is a different story (though I don't recall doing as badly as the lecturer claims the class as a whole went)).

TUCS

In other (though slightly Uni-related) news, TUCS (The UTAS Computing Society) had its Annual General Meeting for 2009 last week, and as well as discovering the joy of barbecued* Woolworths' Quantity Burgers (they're excellent, really!), I was elected society president for 2009. The rest of the exec are also a truly awesome bunch of people, so the future certainly looks bright.

TUCS T-shirt

TUCS has run some excellent events in its inaugural year: our tech talks were, in general, wildly successful, amongst other things. Thanks to that, we've become what appears to be one of the most active societies on campus. I'll be doing my best to make sure that we can replicate, or even better that next year. (If you're a speaker, or know any good ones, and would like to give a talk, let me know!)

In related news, we also took delivery of some particularly awesome TUCS-Branded T-Shirts just after exams -- we're particularly happy with how that went and will probably do it again next year.

(*I will definitely be approving funding for a new barbecue for the society... the current one is truly dreadful)

LCA

Last week-ish, I had dinner with some members of the Linux.conf.au organising committee. Though much of what was discussed must be kept under wraps (it's thoroughly exciting, I promise!), I can tell you that the conference is shaping up to be most excellent, and if you haven't already booked your ticket, I suggest you do so as soon as possible!

That is all for me for now, more news as it comes (I hope!)

Self-absorption in brief

posted: Wed, 16 Jul 2008 17:35 | filed under: / / / | permalink | Tags: , , , , , , | Comments: 0

My 20th Birthday was yesterday, so I'm making amends for not posting about it yesterday by making a note of it today. Notably, I don't really feel any older than any time before, other than a strange feeling of foreboding that accompanies age in general. Or that may just be my stomach. No idea, though I'm sure I'll find out in the ensuing years.

And a brief wrap-up of other me-related news:

That's all for now. More as it comes.

Page 1 of 2  >>