## Android development talk

On Thursday 10th May, I was asked to present a small talk on android development. I have not been coding android for very long, but I had learned enough to get background services working and activities not popping up where they should be. The slides won’t be as complete without my talk, but they should get the idea across.

The following is a very light overview of the tools at your disposal:

## Viral Marketing

I’ve been slowly writing up a skills bank for the Lancaster Award and while finding something for organisation I came across the old working documents for a viral marketing campaign I ran in my first intro week as president of the Computing Society.

I was trying to attract more people to the academic side so I made a simple challenge that went up on posters around campus. The poster that was put up can be found here.

This led to a landing page which sadly is no longer available at the original URL as I no longer control the domain, however I have put it back up here (for those who wish to give the challenge a go, change the domain for http://cslu.co.uk to http://109.74.204.44).

I think overall we had 5 people email in and solve it, which wasn’t very many – but I remember there was a lot of talk wondering what the posters were about, and as they had our logo on them a fair amount of people turned up to the first meeting.

I think if I was to do it again, I wouldn’t say which society it was (there is still a lot of social stigma attached to computing societies) but would just put the date, time, and venue of the first meeting. A few different levels of challenge with prizes would be better too. The challenge was very easy and would fall very quickly when put up against the internet, but a university has a different make-up of population and not everyone who could easily solve mental challenges may want to do so at intro week.

It was quite exciting seeing the posters scattered everywhere though.

## Code Golf

CSLU did code golf today. I did 1 and a half tasks, which were:

1. Output the first 100 prime numbers
2. Output e to 100 decimal places

## Prime numbers

I’m quite proud of this, I managed to do this in 55 characters initially but then after some collaboration with the rest of the club shrunk it down to 49 characters

`2.upto(541){|a|i=2;i+=1 while a%i>0;p a if i==a}`

## e

I never got his fully working as I ended up getting caught up in list comprehensions. Ended up with:

`1 + sum [1 / (product [m | m<- [1..n] ]) | n <- [1..300] ]`

Which is the same as $e = sum_{n=0}^{infty } frac{1}{n!}$ and shows how pretty Haskell is.

## Fountain code challenge

For the second term of the 2011/2012 academic year I’ve made a small challenge for members of CSLU.

Details are found on the PDF.

Good luck.

P.S a bit of background reading can be found here.

PDF: CSLU Lent Challenge

EDIT: Document has been updated with some clarifications.

## Programming languages course

So I ran a talk on learning programming languages last week. It was the second time I had done that particular talk, and in this case the hardware setup went smoothly – as it was done by Stephen Wattam the CSLU VP.

We had a pretty good turn out, mostly of year year undergraduate students who so far had only played with a little C. I took pictures of everyone hard at work doing their task … well, ok. They were mostly on tryruby.org which was even better.

It showed that they had an interest in a new language which is fairly good at prototyping and will allow them to try out their ideas fast. I may have semi pushed them on to it in my talk, so I’m glad they were listening. No one tried learning Haskell though, but then I’ll drop in on everyone next term and see how they are doing. The slides and some info for my talk can be found  at the CSLU site.

On a side note … My Instagram tshirt came! I’m not sure if I’ll ever wear it outside as it’s a bit long, but still!

## CSLU Demo Prep

Well, this is getting rather fun, but quite time consuming.

My alarm clock is ticking away and my sleep time dwindling as I type, but I just don;t feel the urge to sleep yet. I’ve got a talk/demo I’m preparing for Wednesday for CSLU and it is getting bigger and bigger workload wise.

I’m hoping this translates to geeky hacky fun though.

The talk is on languages and paradigms, so I’m introducing a load of languages (8 I think, off the top of my head), describing the basic constructs, and then getting the room to build a “99 bottles” program using 3 of the given languages.

The fun, but time consuming, part of this is that I’m building cheat sheets for each language. Done the first one tonight, and it was for C, so quite detailed. Hoping I can cut/paste a lot of stuff for similar languages, and hoping I don’t have to fall back to a stock one. It is nice to make a custom one for the group, and also cements my own knowledge, especially of the languages I am unfamiliar with.

After the 99 bottles task, I am going to set some slightly longer challenges which can be made easier using certain paradigms. I have an OO one, which can be done procedurally. It’s based around a game scenario. For procedural I will probably do a processing batch type thing. For functional I need to do a little more research.

With the department allowing me to set up a load of VMs for everyone to use too, this should be pretty fun on Wednesday … so long as I get it all finished in time!

## Blogs and Wonder

Hello!

I have got the barebones of a new site up at http://www.jimhi.com so go and have a bit of a browse!

Also the Lancaster Computing Society has a development blog up!
Find it at http://compsocblog.blogspot.com/

Short post from me, all developmenty stuff is going on the Computing Society blog.

C