Hammer of Code

Ruby Oneliner: Benchmarking a string concordance

Just the other week in one of my university Comp. Sci. classes I was asked to use a supplied Linked List to create a Concordance from standard input (in C I might add). The problem wasn’t necessarily hard, in fact, it was simple enough some friends and I realized it was a great Ruby one-liner candidate; Sure enough this was the result after no more than a minute of jabbering:

hash = Hash.new(0); str.split.each { |m| hash[m] += 1}

Well thats all fine and dandy… A plain old Ruby one-liner. My friend Stef, however, suggested this close alternative:

repurposing the blog

Well as GSoC has come to an end and my interests have moved on. I will be repurposing the blog as a more code/personal-centric blog (it is, THE, hammer of code). If your GSoC RSS keeps nagging you with my annoying posts give me a shout telling me where I’m getting to you from; I’ll remove myself from that feed aggregator.

Moving

I’ll be moving to a new host over the next few hours. If you happen to hit up the site before then be warned; I’ll be back soon, but I can’t guarantee things will be up and running right away.

Organization: Thousand Parsec Original: Source

still alive?

Well, contrary to how my current weekly post-count must look, I am still alive. Where I last left off I had just finished up the official part of my work on thousand parsec. Since then I travelled a few times, to a family member’s cabin in Gimli, MB, and into Winnipeg while my wife did some professional development for work.

still alive?

Well, contrary to how my current weekly post-count must look, I am still alive. Where I last left off I had just finished up the official part of my work on thousand parsec. Since then I travelled a few times, to a family member’s cabin in Gimli, MB, and into Winnipeg while my wife did some professional development for work.

thats a wrap

Well things have finally come to an end. As my time with GSoC wraps up I look back and realize how quickly the summer came to an end, and how much fun I had. After my short trip out of province to visit family and friends I arrived home yesterday to finish off the last of my emails and correspondences. Today I exported my screencasts in a higher resolution for the TP media server, and got a few last minute bugs resolved. While I won’t quit working on Risk I am drawing the line between GSoC and personal work today.

a wrap?

Well as far as actual working days goes today was my last “pencil up” day of work. Tomorrow I will be starting a short holiday out of province to visit friends and attend a wedding.

I won’t launch into a large speech about my time with GSoC and the Thousand Parsec project yet, as things aren’t QUITE done yet. I won’t be back until the ~12-13 so as far as things have gone I will be in the “code wrap-up stage.” Things are generally pretty good, and in the remaining time I will tidy up my code and polish off bonus reinforcements. It is almost too bad that screencasts took to long (I barely finished today), as there are many other “small” features I would have liked to integrate (such as BattleXML, inkscape-independant map imports, and other “Risk” features.)

a wrap?

Well as far as actual working days goes today was my last “pencil up” day of work. Tomorrow I will be starting a short holiday out of province to visit friends and attend a wedding.

I won’t launch into a large speech about my time with GSoC and the Thousand Parsec project yet, as things aren’t QUITE done yet. I won’t be back until the ~12-13 so as far as things have gone I will be in the “code wrap-up stage.” Things are generally pretty good, and in the remaining time I will tidy up my code and polish off bonus reinforcements. It is almost too bad that screencasts took to long (I barely finished today), as there are many other “small” features I would have liked to integrate (such as BattleXML, inkscape-independant map imports, and other “Risk” features.)

Weekly Report 12

Well having gotten back into the swing of things and well on my way to getting my screencasts done I’m starting to feel much better. I (think I) have finished my first screencast; having learnt very quickly that a good script is a huge part of successfully taping a good screencast. Second to that is practicing a few times. I managed rewrite a good part of my Advanced screencast script and record and edit the screencast again. I just today hashed out almost all of the map making script and should be recording that some time this weekend. Here is a link to the youtube upload (I’ve noticed it gets rather fuzzy on the upload, but I believe I haven’t left any crucial things out of the voicework. I can always reproduce at a higher resolution if anyone has a better place to post to):

Weekly Report 12

Well having gotten back into the swing of things and well on my way to getting my screencasts done I’m starting to feel much better. I (think I) have finished my first screencast; having learnt very quickly that a good script is a huge part of successfully taping a good screencast. Second to that is practicing a few times. I managed rewrite a good part of my Advanced screencast script and record and edit the screencast again. I just today hashed out almost all of the map making script and should be recording that some time this weekend. Here is a link to the youtube upload (I’ve noticed it gets rather fuzzy on the upload, but I believe I haven’t left any crucial things out of the voicework. I can always reproduce at a higher resolution if anyone has a better place to post to):

recording begins

Well after almost a full weeks worth of meddling, script writing, and the addition of wormholes to RIsk I’ve finally managed to begin filming my screencasts. As things turned out I quickly realized how useless my scripts actually were, and quickly reverted to “winging it.” Since I intend to down the screen captures I don’t exactly need to worry about screwing up, simple pause, and start again. I have to admit how alien producing a screencast feels for me in general and as part of GSoC. Today I managed to record my advanced screencast and my map making screencast. Since the train is now rolling I see no problem in recording my basic screencast tomorrow. For everyone’s entertainment I have uploaded to youtube the uncut/unedited recording of my advanced screencast; please let me know if the panning is too jumpy, the recording is short enough I can redo it with some different configuration to clean that up.

back at it

Well it is my first day back at work without family meddling around the house. It is a lot easier to get, well, anything done. I spent some time today playing around with clients and finalizing my plans for the screencasts. I’m very glad to have wormhole support as I now no longer need to explain why it is so darn difficult to play Risk :P. Since adding wormhole’s to the Risk ruleset it is now impossible to play Risk without a fully up-to-date client (including libtpclient-py and libtpproto-py). I’ve had some difficulty getting a client up and running again in OS X but things have been a breeze on linux. Hopefully the version number of tpclient-pywx can be incremented to force upon everyone Risk compatibility. Other than that I have little today to talk about. My foray into screencasting should begin tomorrow; I’m sure I’ll have lots to say about that!

Organization: Thousand Parsec Original: Source

vacationing family has vacated

Rings the bells and spread the word, vacationing family has finally vacated! I am now free from the influence of 4 adults and 5 dogs intruding on my workplace. I have to say I really expected things to go a little better than they did; Originally half of the family was staying at a local campground, but when their time ran up and they were going to leave they found out their trailer was massively out of alignment. They needed to stay an extra 1/2 week for their alignment appointment, and as a result instead of only having 2 people/dogs at the house we had double. I don’t hate my family or anything, its just too many people and dogs in one place.

Weekly Report 11

Well as a culmination of many things this week probably turned out to be the biggest waste of time/disappointment of my time with GSoC. As a result of 5 large dogs, 4 adults and 1 baby taking up temporary residency in my home (I think its called “visiting”) I’ve gone from productive to… well not really much. I did my best to get SOME space here and there to work; I managed to write scripts for my screencasts, and help the AI guys get started making an AI(s) for Risk. (This of course is the only real exciting part of my week.) I did also get to start today in getting the PyOgre client running on my machines, so I can get some good screen shots for Risk. I’m presently hoping anyone with a plane or helicopter might come and rescue me and my laptop to a more dog/relative-free location…anyone?

Weekly Report 11

Well as a culmination of many things this week probably turned out to be the biggest waste of time/disappointment of my time with GSoC. As a result of 5 large dogs, 4 adults and 1 baby taking up temporary residency in my home (I think its called “visiting”) I’ve gone from productive to… well not really much. I did my best to get SOME space here and there to work; I managed to write scripts for my screencasts, and help the AI guys get started making an AI(s) for Risk. (This of course is the only real exciting part of my week.) I did also get to start today in getting the PyOgre client running on my machines, so I can get some good screen shots for Risk. I’m presently hoping anyone with a plane or helicopter might come and rescue me and my laptop to a more dog/relative-free location…anyone?

scripts

Well I’ve finally gotten a substantial break away from family to get some productive work done this week. As I was saying earlier, I’ve gotten the default map for the Risk ruleset all sorted out, and I am now working on scripts for the three screencasts I’ve decided to do (Map making, Basic play, and advanced play.) The massive amount of company I have in my home at the moment makes work and blogging pretty difficult, but I’ll survive. For now I will have to leave you with a preview of the default map:

tp

Organization: Thousand Parsec Original: Source

scripts

Well I’ve finally gotten a substantial break away from family to get some productive work done this week. As I was saying earlier, I’ve gotten the default map for the Risk ruleset all sorted out, and I am now working on scripts for the three screencasts I’ve decided to do (Map making, Basic play, and advanced play.) The massive amount of company I have in my home at the moment makes work and blogging pretty difficult, but I’ll survive. For now I will have to leave you with a preview of the default map:

not so much from here on in

Well I’m getting the feeling I will be having less and less to write about daily in the coming few weeks as things start to wind down. Right now I’m working on scripts for screencasts and I just finished the full default map in SVG. I’ll be sure to post links to videos as I get drafts prepared.

Organization: Thousand Parsec Original: Source

Weekly Report 10

I unfortunately need to be brief this weekly report; Companies coming saturday and our house needs much tidying and chores, many of which I am responsible for :(. This week was another one of those “feel good” weeks that happens when a lot of things go right very quickly. The last such time like this was getting the ruleset playing. This time its map imports. I was astonished at how quickly the pieces fell into place. At last weeks close I had just gotten support for TinyXML integrated, having already spent a lot of time planning and thinking. Once all that was finished things just happened; I went from no map import to full map import in less than 48 hours, leaving me a little bewildered.

time to digest

Well today was another one of those odd “productive days.” I got naming constellations working, as well as their bonuses. At present to label a constellation all one needs to do is create a text object with %NAME%|%BONUS% that has the same color as the constellation being labelled. This may or not be the best way to get things done, but for the time being it works. I’ve now gotten a little bit ahead of my supervision :P and am planning to spend a bit of time dubbing JLP’s screencast to give my supervision time to comment (as I’m sure there will be positive and negative opinions of my work [even I have some :O]).

Organization: Thousand Parsec Original: Source