Saturday, December 31, 2011

bye 2011

it's the end of the year, an absolutely fantastic one, which in my case it's been focused on learning, especially with others.

I started the year attending more local meetups than ever, and it has proved a fantastic source of experience and learnings. I have enjoyed very much the local Irish and Dublin groups, and all the other stuff we have organised such as hacking evenings and code retreats.

Probably the most intense experience of the year were the code retreats. Participating, organising, or facilitating, it's an experience that I wouldn't let pass you given a chance if you have not experienced it yet.
I also have to mention the great time I had attending the TDD courses in Madrid for XPWeek. Carlos is a fantastic coach and the courses were really enjoyable.

It has also been a great year 'online' with all the projects we've done with Open Wonderland, and I'm hoping to have more time for it in the new year.

The most important event of the year, personally, was leaving work a couple of weeks ago. After four fantastic years working for TCD I have decided to take a break, focus on my PhD for a couple of months, and see what life has in store for me after that.

Hope you all have a fantastic 2012!

Sunday, November 20, 2011

Open Wonderland and Google Docs Proof of Concept

I have been very quiet for the last while but as my work load eases out I've had some time to mess about with Open Wonderland again.

This time I've spent a couple of hours putting together a proof of concept (POC) to send information to Google Docs from inworld. In the following video you can see how a word processor document is created from an in world HUD.



The module is very rough and has only been thought of as a proof but if you want to check it out feel free to do so. As usual my code is in github: Proof of Concept for Google Docs and Open Wonderland Integration.

I have to say that the Google Data API has its quirks, although I have only spent a couple of hours using it, but it seems to be solid enough to create powerful client applications.

Any feedback is very welcome as usual!

Friday, September 30, 2011

the busiest September in years!

This has certainly been the busiest September for me in many many years. I can even say the busiest in my life.

After finishing August in a high note with the Ruby Ireland Rails 3.1 launch party, September started with a Ruby Project night in amworks in which we were working a bit on Conway's Game of Life.

The following week two events took place, on the Tuesday the dublinjs meetup with a fantastic backbone.js presentation by David and a kata by Wiktor, and on the Saturday I had the privilege to co-organise and co-facilitate the first code retreat in Dublin (and in Ireland as far as I know!).

If that was not enough, on Sunday I took a flight to Madrid to attend XPWeek. The Monday was a full day of talks, and the rest of the week I attended the TDD courses by Carlos Ble.

I have posts coming about some of these events so won't go into details here, but all the events were absolutely fantastic!

We have also been pushing a new release of Open Wonderland for a while and I think there will be some juicy news out very soon, which is very exciting!

And tomorrow, 1st of October I will certainly not be missing the SocketStream session that the AOL Dublin guys are preparing. That is if this stupid cold I've been nursing since I'm back in Ireland allows me to get out of bed!

Tuesday, August 16, 2011

the summer of busy

So far this summer is being much busier than usual.

A couple of weeks ago I attended the html 5 hack-a-thon organised by the Dublin GTUG guys. It was real fun and got to meet some very interesting people and to hack on a browser multi-user whiteboard based on WebSockets and canvas. All the projects were really good, and the effort during the two days paid off big time.

Last week we were busy working on a rails mountable engine to add feedback forms to your web during the Ruby Project nights at amworks. Only a few hours there but it's great to be able to learn and share socially out of work hours, at least from time to time!

In the meantime all is good to go for the code retreat we are organising for September the 17th. Location and sponsorship is pretty much all we needed, and we are looking forward to the day. Tickets flew in less than 3 days, so hopefully people will turn up on the day. If you are reading this, have a ticket, and know for sure that you cannot attend, please let us know cause we have a growing waiting list.

And finally, all is ready for the dublinjs meet up tonight in which Wiktor will tell us all about CoffeScript and Dom has prepared a Kata for us to go through. Great fun ahead!!!

Thursday, August 4, 2011

Open Wonderland OurBricks module Preview 2

Another update on the OurBricks module to use within Open Wonderland. This time you can see the process end to end.





There are still a few glitches in the UI, not being very responsive, and the OurBricks API is likely to change in the near future as it is in active development, but the prototype is working now, as you can see in the video.

If you want to play with the sources you can find them in my github account.

Tuesday, August 2, 2011

Open Wonderland OurBricks module Preview

I've been working for the last couple of weeks in a new module that will eventually allow the loading of 3D models from the OurBricks collection directly from within Open Wonderland.

The module is in a very early stage and we are collaborating with the guys at OurBricks to get it finalised as soon as possible, but for now you can see the progress (search functionality) in the following video:



As usual, you can find the source code in my github account. Feel free to clone and change. Pull requests always welcome!

Update: Just got a couple of models imported; a bike and an aircraft, as can be seen in the following screenshot:

Models from OurBricks.com

Thursday, July 28, 2011

Hackerspace and Formal education discussion at Dublin GTUG

After some great responses to the hackerspace and formal education discussion at the monthly Dublin GTUG meet up I would like to make a few comments on the topic.

I don't want to be controversial but I do have to be a bit critical of the event for the very reason Seán mentions: A panel in which 4 out of 5 participants (plus the host) are clearly on one side, and the reamining participant doesn't take sides, can not generate much discussion. On top of that, if you frame it within a local group meetup, where at least a 90% of the people are also going to be on the hackerspace side... well, what can I say?

And don't get me wrong, I really enjoyed the session and I think some very good points were brought up but it would be very interesting to hear some arguments from the other side. Not only from an academic point of view, but running a hackerspace within a college (as it seems to be one of the suggestions) carries a lot of administrative issues such as access to the space, who pays for stuff and how that affects group dynamics (seems like at least the Dublin hackerspace guys prefer to stay away from external funding), who is responsible and liable in the case of anything bad happening, and so on. There are a bunch of issues that we missed out on because there was no one there to expose them.

A point that was fairly commented on was assessment, which is (in my opinion) the hardest topic in education, and (again in my opinion) the one that should be the focus of all potential integration of hackerspaces and formal education.
I am all for innovative and creative educational experiences but SADLY students are still evaluated in isolation and in an environment where collaboration is considered cheating.
This needs changing but hackerspaces only provide for the first part of the equation and assessment is not even an issue. Or is it?
I'd say that there is always assessment in all kind of social interactions. You are obviously not going to be awarded a degree in your hackerspace but there are other kinds of peer review and recognition patterns going on. More active members will become part of the organisation, running courses and leading events, or getting praise and recognition for the pieces they hack together. That peer recognition is obviously enough to motivate involvement with the community so could we use that as a basis for more formal assessment? I would like to hear the thoughts of academics on this (although I might not like what I hear back!).

The panel mentioned ditching standardised tests in favour of a viva after 4 years undergrad, bringing the post-graduate model into undergrad. I'd be happy with that too.

I would also like to comment on a couple of points about formal education that I felt (personal opinion) that were not all that fair. We've all seen Sir Ken Robinson's TED talks and RSA video many times and know that education is rotten but universities can also be places for innovation and fun stuff; you can see it around any postgrad lab where people are given the freedom to work on what they are more interested in. It was mentioned that students coming from a hackerspace background can do really creative projects so it is unfair to say that that does not happen.

Another comment from the host I would like to point out is that he mentioned his disappointment after entering a university classroom not long ago and seeing a waterfall model in a whiteboard (or a similar situation).
I'd say there is nothing wrong with studying waterfall this day and age. The real problem would be if the topic ended there and no other alternatives were discussed. I bring up this because I think in our field (talking about software development) we don't pay enough attention to the past and we are therefore bound to repeat the same mistakes. This is why classic books such as The Mythical Man-Month or The Psychology of Computer Programming remain very much current, even though they were written many years before about half of the audience at the discussion where even born!

Another fair point made by the panel was the big gap between education and the workplace, which funnily enough is my research topic. I still don't have a solution for that, but as soon as I get it sorted you'll be the first ones to know... yeah, that's supposed to be a joke. A bad one. I know.

So as Seán mentions there are a lot of unaswered questions and I would like to bring up another one here: If we are all in the hackerspace side... why are we all still getting degrees?

All panellist have degrees, are working towards one (or more), or expecting to get enough points to get into one.
John Looney mentioned that Google hires people with no degrees (about a 10% of current staff if I heard correctly?) so why are we still going through the pain of getting one?
(Lecturer) Mark described the process as something like yearly semaphores that are used to sort people into groups and keep them entertained for a while. Is the social pressure worth all that pain?

It was very funny to hear one of the guys from 091 Labs in Galway commenting on the Irish mums effect, that can affect how courses can be considered good or bad.
And talking about mums, wouldn't it be nice that instead of being proud of their kid's degrees they'd be proud of their kids spending all evenings at the local hackerspace? Can we make that happen?


As a personal note, I would like to add that I completely disagree with the comments about free education filling up lecture theatres with people that somehow do not deserve being there.
I would hope we could focus on challenging those fake social needs that equate having a degree with being 'someone'. In that case only people with a real interest would go to college, regardless of their parents (or themselves) having the money (or not) to pay for fees.


Utopian? yes, and almost as unachievable as  teaching kids IT skills (Coder Dojocomputer club house, Camara), getting people to build stuff (TOG091labs NexusMilklabs), or creating great software and communities through volunteer work (Apache Foundation, GNU OS, P2PUOpen Wonderland).

Monday, July 18, 2011

Dublin JavaScript Group July meet up -- Kata Reloaded!

We are organising another Kata session for the Dublin Javascript meetup this month, which will happen tomorrow Tuesday the 19th at 6.30pm @amworks. You can sign up here.

These are my slides for the event, which are pretty much the same as the ones I used last month.


The initial idea was to have a presentation on Processing.sj although that has been postponed, but I'm sure Nigel will come up with something. And in any case we are going ahead with uncle Bob's Prime Factors Kata.

The solution, in the form of a powerpoint document, can be found here so you don't really have to worry about the solution itself and can focus on practising the Kata instead.
A couple of interesting points I've noticed after practising it a couple of times are the differences between his Java implementation and a JavaScript one, and my mixed feelings to his last refactoring, which I find a bit contrived. I prefer to stop at the level of 'while' structures because I believe it preserves the intent of the algorithm a lot more than if you go the whole way and replace them with 'for' structures. The result has more lines of code but in my head it's clearer. But as usual, this is a personal preference and everyone will have their own, which is a good thing!

The format for this part of the meetup will be the following:
I will go through the slides, which will take me about 3 minutes. Then we will set about 20 minutes for people to work on the Kata. Working in pairs using ping pong pairing would be highly recommended. The idea is that one person writes the first test, the other person makes that test pass and writes the following test, and this goes on until the Kata is solved. If you don't want to pair, that is fine. If you don't want to program at all, that is fine too!
During those 20 minutes I'll be available to help out, especially to any new faces that are not familiar with the concept of a Kata or with Jasmine. At then end of this period we will project one solution and have a short retrospective about it.

And that is all, please feel free to join us from 6.30pm at amworks. See you there!

Friday, July 15, 2011

Sprockets for JavaScript

As a JavaScript newbie, a thing that some times puts me off when I see some libraries out there is the fact that they tend to be just the one big file, with long functions and tons of lines of code that is not that easy to follow.

Sprockets aim is to help out with this situation. As their website reads:
[Sprockets] helps you turn messy JavaScript into clean modules for development and a single file for deployment.

Sounds good to me!!! so how to get started? Reading the manual, of course!

The following is a quick a dirty guide to Sprockets and how to use it from the command line with the sprocketize command. I have created a really silly bunch of sample files that contain only dummy js functions and are here just to illustrate the use.


Installation

Installation is easy peasy through a Ruby gem. The only trick here is that if you are using rvm (and you should!) you will not need to use sudo, and if you are using your system Ruby it will probably be need. So let's do it:

gem install sprockets

And you are ready to go!

What else you need to know? Only two more things are needed: directives and the sprocketize command.


Directives


//=

Comments that start with the symbol above are considered directives, and they are used to pull in other resources that your project will use: other JavaScript files and any assets you use in the form of stylesheets, images, and so on.

There are two directives currently supported in Sprockets, require for other js files, and provide for other related assets. If the files are surrounded by quotes as in "myfile", then sprockets will only look for that file in the same directory. If is used, then all the load path will be searched for. That load path can be indicated to sprockets through the command line option.

So let's see some code: I have two files called my_file_1.js and my_file_2.js and I want them in just the one file for deployment. The contents of the files are:

my_file_1.js

function firstFunction() {
  // I do nothing really!!!
};



my_file_2.js

//= require "my_file_1.js"
function secondFunction() {
    // I do nothing but function one should appear before me
};


The Sprocketize command

There are different ways to use Sprockets being probably the Ruby library the most used. But the gem also bundles a command line tool which is a wrapper for the Ruby library so let's go with that cause it is really easy.

From the previous section we have two files called my_file_1.js and my_file_2.js and I want them in just the one file for deployment. To generate that concatenated file we can do:


sprocketize *.js > deployment_file.js

This will create a file called deployment_file.js with the following content:

deployment_file.js
function firstFunction() {
};
function secondFunction() {
};


You can see that firstFunction has been pulled in before the second one, and in the process all the comments and stuff that you don't need to deploy have also been stripped out. How nice is that!!!???


Hungry for more?
There is more about Sprockets that you can fin about in their manual. It is a great tool that I hope to start using soon.

Tuesday, July 12, 2011

Code Review Session for Open Wonderland 0.5 Preview 5

Preview 5 is coming... finally!

The Open Wonderland community is closing off the last bunch of issues, being the major one the Video Module that will finally work out of the box, without having to fiddle with the sources. As usual, Jon is in charge of the really hard stuff (Thanks Jon!).

As always, this is a community effort and we are all trying to contribute as much as we can. If you would like to help us move forward please do not hesitate to contact us!

At the meeting, the usual suspects were around, and we all took on some of the problems to fix. On my side of things, I've been poking about with the Placemarks menu, trying to make it a bit more user friendly by alphabetising the marks, separating them in more logical chunks, and so on.

Discussing and Assigning Bugs in-world


Last wonderland Wednesday session was devoted to discuss what was going to be fixed and added in the preview, and this Wednesday (July the 13th), we have organised a Code Review session after the normal Wednesday session.
I think a code review is a great way to learn, and it will definitely be very helpful for me, as I am not very familiar with the codebase. Please feel free to join us if you are interested in Wonderland development.

Tuesday, June 21, 2011

Dublin JavaScript Group June meet up -- jQuery and Jasmine

In a couple of hours the JavaScript Dublin Group will meet up for the second time. The first meetup was last month, and it was basically a gathering to get to meet other people and talk a bit about organisation.
So this will be the first time for a technical session. Nigel Kelly will be talking about jQuery apps, and I will run a Kata session in JavaScript using Jasmine. I hope people will follow along. We will use the standalone version of Jasmine and the kata chosen for the session is Fizz Buzz.

I came up with the following 4 slides (yeah, want to keep it short!):



The slides will not make much sense on their own, so you better come to the meet up!


This means that I will miss the P2PU SICP study group session on IRC (freenode #sicp room) today at 7pm GTM, 3pm EST, but it's for a good cause, right? :)

Saturday, June 18, 2011

SICP -- Starting with the P2PU study group

We have finally started with the SICP study group and I'm delighted to put some time into it. For once, I will focus all my effort and free time to work through and enjoy this fantastic book.

The goal of the group is to finish one section every second week, which gives us 6 weeks for the first chapter. Some people might think that 6 weeks is a lot but to be honest, at least for me, with a full time job, a part time PhD to work on, and all the normal social commitments, it's not that much time. So let's get cracking!

I decided to go back a re-watch the first bunch of MIT SICP lectures as it's been a while since I got around to see them first. I always have this funny and a bit weird feeling when I start watching one because for a moment I feel like I am watching an 80's sitcom or something similar. I'm probably just being silly but it always makes me smile!

The lecture series starts with Harold Abelson ranting a bit about the term Computer Science not being a very good one when it's not a real science, or even about computers. I do agree with him but if you want to know more about the subject you will have to watch it for yourself.

More interesting are his comments about the distinction between declarative or descriptive knowledge and imperative or procedural knowledge. Procedural knowledge or 'Know-How' can be directly applied to a task, whilst declarative knowledge tells us about truth. His example for this is the fact that the square root of a number can be expressed in the form of a mathematic equation(descriptive), compared to a way or algorithm to finding that square root through approximation (imperative).

He also explains that although you can learn most of the LISP language (its rules anyway!) in a short lecture, that does not make you a good user of the language. He compares it to learning the rules of chess and being a good chess player; you need the rules to play, but the rules do not make you any good at it. So you need to embed yourself in the context and the experience, and the techniques to do so are the topic of the course.

In Abelson's words, programming is all about managing complexity, and the techniques in this course will allow you to do so.

The lectures are divided into three main topics which do not correspond to the five sections of my book (my edition is from 1996), but that can be easily correlated, or so I think.

The parts discussed in the lectures are:
    - Black-box Abstraction: I guess this will be chapters 1 and 2, building abstractions with procedures/data.
   - Conventional Interfaces: I'd say this is chapter 3: Modularity, Objects, and State.
   - Metalinguistic Abstractions: This is chapter 4, of the same title.

The fifth chapter of the book about Register Machines does not seem to be in the lectures, but I couldn't tell right now cause I have yet to watch them all.

And that is all for now. I will spend another couple of hours later this evening working through the book and preparing the meeting for tomorrow Sunday at 7pm GMT, 3pm EST. Meetings happen on the #sicp channel on freenode IRC and everybody is welcome!!!

Friday, June 17, 2011

learn, laugh and move on!

There's been a lot going on lately and as a professional procrastinator I couldn't let go the chance of putting off writing a new blog post, but with things going back to normal (hopefully!) it's about time for a bit of reflection.

It's been a very social few weeks, ending May with a double bill: The software craftsmanship conference in Bletchley Park, and a coding day with the chaps of codingday.org here in Dublin.

What can I say about scuk11? it was a great day with fantastic sessions and I got to meet a great bunch of Spaniards in red t-shirts. Happy faces all over... yeah, the bar was already open!

The Dublin event was also fantastic and although it was first thought as a coderetreat, the addition of scientists and their real problems changed the nature of the session itself and made of it a fantastic coding day. The group I was working with got a spinning cube in the browser, with three different lights and three particles lighting up the cube with different colours. Great fun using the Three.js library!

The month of June started with @silverspoon organising hack nights in a café near the city centre, that I sadly missed because I was in Barcelona for a conference. Spain was great, as usual, although it was raining most of the time, but that didn't really have an impact on things such as meeting old friends, the great conversations we had, and of course, the fantastic food!

On Tuesday the 14th we had the first meet up for the SICP study group at P2PU. You can see what happened in the new wiki. This is an open group which basically means that you can join in anytime that suits you. We will meet twice a week for the next couple of months, Tuesdays and Sundays at 7pm GMT, 3pm EST. We are hoping to finish a section every two weeks, including exercises. As chapter one of the book has 3 sections, we are hoping for a 6 week period to be done with it. Wish us luck!!! or even better, join in!!!

Last night the first Ruby Project Night happened in armworks. The space is absolutely great and I want to thank Alan for hosting it. We didn't really know what to expect at first, and after a bit of chat and trying to get the projector going, we started hacking away in a rails 3 gem, something that none of us had done before. We didn't get too far but at least we got it packing and installing fine. As soon as the @theirishpenguin pushes it publicly I will share the link here. It was great to meet a bunch of enthusiastic people and looking forward to meeting them again!

This morning I read this 'Help Wanted' message from @oisin in the ruby Ireland list. If you are looking for contract Ruby work you should definitely get in touch with him. His last talk at ruby Ireland was really interesting.
In the thread he mentions that they like egoless programming which brought me back to the this old post of mine. Weingberg's book is a very recommended read even if as myself, you were not even born when it was written!

An finally, more to look forward to as the first 'technical' meet up of the Javascript Dublin group will be next Tuesday 21st at 7pm. A presentation about jQuery for web apps and a kata with Jasmine are in the menu. Are you really going to miss that???

Thursday, May 19, 2011

Mutant-Java and the KataLonja

Another month and another Kata with the 12meses12katas crowd. This time the kata is in Spanish, and it was created by the agilismo.es guys for the professional track of XGN2011. If anyone needs/wants a translation, do get in touch and I'll produce one. You can find the original version in github: KataLonja.

The Kata is about a Galician chap who wants to make some money by selling Scalops, Octopus, and Spider Crabs in a hired van. We are given a series of prices that markets in different cities will pay for the goods, alongside with distances, transport costs, and depreciation rates for the food, and we need to provide the most interesting route to get a best sale for our intrepid entrepreneur.

As a Galician immigrant myself, this is the simplest kata ever: I would drive the van right into my garage and the goods straight into my fridge; as easy as that!

Sadly this is not going to happen so let's get back to the kata. I'm certainly nowhere near finishing it, I only gave it a first go last night before bed but some cool stuff is already coming up out of it.
As I mentioned in a previous post, I use Katas to refresh some concepts that I haven't seen in a while, or that although I might use them in my day job, I've never gone deeper at them than the old getting the job done.
Last month I choose JavaScript for the bowling kata, and because I started way too late (the last day of the month!), that was the only implementation that I practised on the day. I will try and get this one practised in both Java and JavaScript, starting with the former.

Java has no associative arrays and it's generally accepted that you will use Maps instead. Maps can be very straight forward if you are using an immutable object as the key for your pair, but can get tricky if you decide to use your own class. So that's exactly what I did. It might not be the best fit for the problem at hand, or yield the leaner and cleaner code possible, but no one will have to maintain this code and it's going to be thrown away anyway so better have a bit of fun with it!

So I have created an immutable class for Seafood that I will be using as a key for at least two maps I'm using in other classes. That means overriding equals() and hashcode(), and being careful with state and escaping references to this. But as I said above, the code is nowhere near written, so what's the point of the post you will be asking yourself? I just wanted to share 3 links that have been helpful in digging a bit deeper in the adventure so far. They are:


In them you will find good advice on stuff such as when to create immutable classes and how, uses of immutability including the flyweight pattern, overriding equals() and hashcode(), and a great discussion on how to keep the equals() contract on extended classes, adapted from the book Programming in Scala into Java.

I will be digging a bit more, hopefully in the next couple of days, in topics such as choosing the right map implementation and a couple more things that I want to try (I'd like to write my cucumber step definitions in Ruby instead of Java but I'm not sure I can do that, so will have to find out!).
I also intend to write another post if I ever get to practise the Kata in JavaScript. Comparing both implementations would be cool so let's hope for that!

Monday, April 25, 2011

SICP Study group at P2PU

As mentioned in a previous post, I have decided to learn JavaScript in a serious and deep way, and after following Douglas Crockford's advice on reading the little schemer, it's time for Structure and Interpretation of Computer Programs, also known as SICP.

Due to low numbers in the Anglo-Celt SICP Study Group, we have decided to open the group to the world through the Peer to Peer University (P2PU).

The course is still in draft but so far I've had great feedback from some of the core P2PU community members and I'm hoping that it will go ahead. You can see the draft of the course here: SICP Study group.

[UPDATE]: The course has been moved to the new P2PU site and it is now hosted here and open for application.

As usual, this is a peer to peer, community based effort, and everybody is welcome, even those of you that have read the book already. Assuming the role of mentor can be a fantastic experience, especially in terms of communication and other soft skills that are so important in our field.

To join the course all you need is the motivation to read the book and participate actively in the group, writing blog posts about what you are learning and experiencing, and be willing to share your solutions through github.

As in the previous course, I expect to use Open Wonderland for some of the meetings, but the course can be followed in an asynchronous manner too. If you are interested head to the course and apply (once it's open), or give us a shout if you have any questions!

Wednesday, April 13, 2011

Wonderland Wednesday -- Subsnapshot importer

We've been working on a new Open Wonderland module for exporting and importing parts of a world for the last couple of months. The idea is that when you have a world laid out, you might want to export bits and pieces, or even the whole space, to rebuild it at a later stage or in a different server, or simply as a backup of all your hard work.

Exporting is done by just right clicking in a model or container and choosing Export.
Importing is done by just dragging and dropping the exported file onto the Wonderland client. Easy peasy!

A couple of shots from today's session, in wich we are exporting and importing a bunch of the big fellas.

Anyone needs an army?

Well behaved big fellas

bit to the left... bit to the right... perfect!

The module is taking this long to be developed because we are writing all the code as a group, and we only meet about 1 hour a week, so things are moving slowly.

As a result, we are all learning a big deal from each other, especially from Jon, but all of us have worked on parts of the module, which is really cool.

We are even using JUnit to test bits and pieces of the code. The codebase was not written with automated testing in mind, but we are doing all we can to move towards that direction, even if it's just in small doses, and the results are great so far, cause although we are quite far from being able to TDD or test-first even, testing after writing is saving us a lot of time in deploys and server restarts.


Also we are not really pairing but 'grouping', and although communication can be harder than in the former, we are having a lot of fun, and that is what really counts!

These are a couple of shots of us working against netbeans and also the space we use, with the wallcard on the far end wall with all the stickies.


Close up of Netbeans in-world
The group writing code, live

The WallCard with all the stickies: we are almost there! ...almost!
Better quality pictures can be found on facebook.
These sessions happen most Wednesdays at 1p.m EST, 6p.m GMT, and everybody is welcome, so hope to see some of you quite soon!

Monday, April 11, 2011

about JavaScript, Scheme and History

I've been doing a bit of JavaScript lately and I am shockingly enjoying it. I thought it was going to be a nightmare and a lot of copy+paste but after a good amount of reading and watching talks, I started to like the language. I've been collating bits an pieces of information in the ossdev-ireland wiki, mainly focusing it towards developers that only have to deal with the language in small doses.

Ossdev.org is a place to share experiences that overlap the different open source groups in Ireland. JavaScript and MongoDB are the two topics that seem to be gathering more interest so far, but it's been less that one week since the wiki was installed, so hopefully more topics will start being worked on soon.
The Irish Penguin is the one to blame for all this sharing craziness, and I hope more people get on board in the next couple of weeks.

As usual, following on links and references in talks and tutorials takes you to a thousand other talks and tutorials that you will never have the time to read and watch. I would recommend the fantastic series on Javascript by Douglas Crockford. I especially enjoyed Part I: the early years, cause although it does not contain any code, it is a great lecture in history of computing, and I totally agree that that is an area that we don't handle very well in the profession.

During that talk, Crockford recommends the little schemer as a book that will change the way you think about programming, so I had to get my hands on a copy of it. I have to say that it was a bit difficult to get started with it, because although it seems to be a book targeting children, there is no explanation whatsoever on how to start with the language itself. A bit more digging on the net and I finally downloaded DrScheme, and got it running. Although the site points to a newer version, namely Racket, DrScheme still exists as a package in Ubuntu systems, so that's what I'm using for now.
So this is my first scheme listing ever:

(define atom?
  (lambda (x)
    (and  (not (pair? x)) (not (null? x)))))
(define lat?
    (lambda (l)
      (cond
        ((null? l) #t)
        ((atom? (car l)) (lat? (cdr l)))
        (else #f))))

(lat? '(chunky bacon))
(lat? '(chunky (bacon)))

The first call to lat? returns true, and the second false. Let's see how long I can keep up with the parenthesis madness... the plan is to follow on to SICP, but I will have to finish this one first!

Saturday, March 19, 2011

Talks at the Virtual Worlds Best Practices in Education 2011 Conference

In a couple of hours I will be talking about the Open Wonderland Development course that I organised through P2PU earlier this year. The time is 7a.m. PST or 2p.m. GMT and everybody is welcome!

This is the master schedule for the whole conference, which is finishing today.

Yesterday was the turn of Roland Sassen from Thinsia Research to talk about Wonderschool, their fantastic project that allows children in schools to use Alice through Open Wonderland. Roland also talked about some new research they are starting, to use Wonderland through thin clients and that sounds really exciting!

After that, Nicole and Jonathan from Open Wonderland Foundation and Wonderbuilders talked about the imminent preview 5 release that we are all waiting for!

As for today, I will be talking about the P2PU course and later on, at 1p.m. PST or 8p.m. GMT, Jon and Nicole will be joined by Kathryn Aten to tell us all about how to learn to program collaborative using Open Wonderland. This is a talk based on Wonderland Wednesdays which are our community weekly meetings in which we've been gathering together to write code collaboratively almost every Wednesday for the last 6 months. Can't wait!

Monday, March 14, 2011

Code retreat in Winchester

I had a quite big post written about the event in Winchester but as a proof of how much I learned in the space of just one day, I went into end of session mode and deleted it!

It was an intense day but very enjoyable. For me, my first code retreat and also my first time pairing with another person in the same room. All my previous pairing experience had been remotely, and I have to say that I did enjoy sitting side by side, but I could not do a fair comparison because I had never met any of these guys before, and shouldn't compare that with the familiarity of knowing the other person, even if only remotely.

Each session was surprisingly different from the previous one, not only due to the rules, but also due to personalities and languages. I must admit that by the end of the last iteration I had already lost a part of my brain. When someone said during the last retrospective that they needed a pint, I couldn't help but think that I'd rather have a bucket full to dunk my whole head in it!

Many thanks to everyone at Eden cause the organisation was excellent, and to all the participants for making it possible. It would've been cool to see @ecomba and @sermoa in a demo session of TDD as if you meant it; I'm sure I could have learned a lot from that. Also I have some concerns about retrospectives, mainly because only the more extroverted types participate more freely. A group of more than 20 people can be frightening for some. But such is life, right?

In any case, the event certainly surpassed all my (high) expectations and I can't wait to attend another one. If anyone is interested in facilitating one in Ireland, please get in touch and I could talk to local dev groups about it.

Sunday, March 6, 2011

Learning a new language through testing

I've come across this very interesting talk by Ola Bini on Adopting the JVM in which he talks, among other things, about learning a new language.
I've been trying to learn Ruby for months now, and although it's being quite a slow process, it is kinda working, but the fact that I don't write it often is a big drawback. Ola mentions that a good way to get started, if you happen to write your code in Java, is to test your code with some other language supported by the JVM such as Ruby through JRuby.

A couple of posts ago I recorded a kata in which I was using cucumber and cuke4duke to test my Java code but my step definitions were written in Java, and my unit tests used JUnit. I guess the best way to practice more Ruby would be to write the steps in Ruby, and to use RSpec to drive the design.

A quick search yields the missing piece in the puzzle; JtestR allows for just that, testing (or stretching) Java code using Ruby. I haven't tried it yet, but I certainly can't wait! and the fizzbuzz kata (March's kata in 12meses12katas) looks like the perfect ground to put it into practice. Let's see how it goes!

Sunday, February 27, 2011

Roman Numerals Kata

Last month I joined an initiative by a group of Spanish Agile followers called 12 meses 12 Katas. The idea is that each and every month during 2011, we will be practising a Kata, and sharing our code through github, and for those adventurous enough to record themselves, also through this vimeo channel.

There is a ton of resources in the net about what a Kata is and why are they important so I will not get into that, but I would like to stress the last bit of pragmatic Dave's definition:

"[...] remember that the point of the kata is not arriving at a correct answer. The point is the stuff you learn along the way."

After having practised the February Kata a bunch of times, I wanted to write a bit about the process and reflect on my own deliberate practice and learning journey during these last couple of weeks.


When I first saw the Kata, I thought it was going to be easy peasy. Yes, totally missed the point; it's not about the problem but about practising it, but in any case, I was so very wrong! It turned out to be a lot more complex than anticipated, and I even thought for a couple of days that I was having some type of programmers block. Sticking to strict TDD didn't help much either, when you are not as used to use it as you first thought!

I went through 3 different solutions:
The First solution was very complex and it was very influenced by Maths. I was tracking all this positions for different numbers, and had a ton of if branches and all that. Messy!

Then I saw a recursive solution to the Kata. YES, I SAW IT; call it cheating if you want to, I couldn't care less. When I saw the simple solution, it made me think...Why did I start coding without thinking a bit about the problem itself. I should have a look at the relations among numbers, which ones are the special cases, and so on. In a nutshell, the Domain is very important, even in small projects. That was Lesson one for me, hope it sticks!

I'd say it has to do with our nature or background as scientists. That initial thought of 'I can do this with a bit of math', yields an answer, but it is too complex, not so difficult to write, but long, and difficult to maintain. A quick but thorough look at the domain shows that the cases can be simplified if you play a bit with them. Special cases such as 4, 9, and all numbers terminating in any of the two, can be easily automated.

So I started working on a recursive solution. At first I wrote a recursion with a wonky base case, and it worked anyway on one direction (arabic to roman), but it did not for the opposite. There was a mix here of problems with copy by value in Java, and objects and primitives. If it hadn't been for the primitive case, I wouldn't have noticed the flaw in the recursion. Which leads me to think that test are great, but obviously not a silver bullet! You still have to get the algorithm right! Another example of this can be seen in my video, when I mix up L and D in the tests themselves! So Lesson two is: no silver bullets. 

Recursion can feel easy at times, but when it is easy to write, it makes you wonder if there is another way. And in fact there was. In this case a simple loop could yield the same results as the recursion, and that was my last solution.

I feel that I have a better understanding of what Katas are good for, after practising them deliberately for the last couple of months. When you are in the job, you just go to the point, and choose a collection, or refactor to an iterative process, but you don't get to dig out more information. Doing the kata in my own time, I consider that spending some of it in the details of how to choose that collection, or when to refactor is far more beneficial. This is something I had read about before, but never experienced by myself. Lesson three: deliberate practice is necessary.

What else did I learn/review this month?
- review of Maps in Java (mainly due to the fact that I needed order in my collection). Although I started the kata with arrays (some people will say that it was faster and all that), I decided to go for a map in the end, cause having two different arrays (one for arabic numbers and one for their roman counterparts) was not expressing the intent of the mapping. 

- review of recursion and refactorings applied to the recursion itself. Interesting to find out that most newish compilers will automatically substitute a tail recursion for an iteration for you, so if the intent of the algorithm is clearer with the recursion, I will definitely go with that form from now on.

- I wanted to use cucumber for acceptance testing so finally got to set up cuke4duke to run cucumber features on Java programs. It is so much fun!

- Writing cucumber features has reminded me (yet again) of my little knowledge of regular expressions. Also brings up the fact that writing features is a lot harder than reading somebody else's. Hopefully if I use them more, both things will stick in my brain, at least the basics anyway!

- Lastly, it has been quite strange to watch my kata after recording it. Does not feel like it is me (especially due to my supersonic typing up speed! Nah, it's fake, I've doubled up the speed cause the Kata was far too long!). It's definitely the case that what you think you are doing and what you actually do are two different things. The more I see it, the more I'd like to change things. But I think that that is good anyway!


As I mentioned earlier, the kata was a bit long for a video so I have sped it up! Generally katas are recorded with a piece of classical music as background. I've chosen a piece from my extensive collection, which pretty much means that it was the only 1 out of 6 classical tracks in my itunes that was long enough for the video!!! Hope you enjoy it!


Roman Numerals Java + cuke4duke (Double speed) from Josmas Flores on Vimeo.

Saturday, February 26, 2011

Refreshing is the word! The practice of programming

I am having a ball reading The practice of programming by Kernighan and Pike. I read some controversial opinions on the web about the book, ranging from praise to the most ferocious critiques, but I definitely situate myself with the former group.

The authors express their intent in the preface, and their goals are simplicity, clarity, generality, and automation, and in my opinion, they do a fantastic job of it. The book must be read from a historical perspective, as it was written in 1999, but the basics are there, and it is a fantastic refresher for topics such as data structures, algorithms, design, and implementation ideas.

I agree with some of the opponents that a few sections are very outdated (historical perspective, right?), and a lot has changed since then, especially in the realms of automated testing and replacing debugging (to a certain extent) with tests. Also, wouldn't be such a good idea to be building Java programs with Vectors and un-parameterised Hashtables. But I am thoroughly enjoying the book. Even the fact that most examples are written in C has made me go back and review what all those weird symbols such as * or & mean. Hadn't implicitly used a pointer in a while, let alone allocating or freeing up memory!

If you liked books such as Code Complete or Clean Code, you will definitely enjoy this one too!

Tuesday, February 15, 2011

The importance of Cell Messages in Open Wonderland

Last week at the P2PU Open Wonderland meeting I tried to explain why Cell Messages are important. I did not do a good job of it so for that reason I decided to record the following two screencasts. In the first one I explain how you can get two (or more) clients running on the same machine. That gives a good starting point for the second one, an overview of the importance of Cell Messages.

The cell used in the video was developed following the Developing a new Cell tutorials part 1 to 3. Part 4 is the one that deals with messages, and would make the shape update properly in all the clients connected.

How to launch more than 1 client in the same machine:



Cell Messages and its importance for client communication:

Saturday, February 12, 2011

Open Wonderland, High level Architecture - the story of the system

I would highly recommend Michael C. Feathers' 'Working effectively with legacy code' to anyone who cares about code, how it is written and how to deal with complex and (automated) untested systems.
Although the word legacy might evoke images of Fortran or COBOL procedures, the definition in the book refers to any kind of system that does not have an automated suite of test to rely on when making changes.

It was in this book where I read about the concept of telling the story of the system. According to the author, you need at least two people for this technique to be effective. One asks the other; What is the Architecture of the system?
The other will answer the question in just a couple of sentences, using only a few concepts, and targeting individuals with no prior knowledge on the system itself.

So I asked Jon Kaplan if he'd be so kind to put this into practice with Open Wonderland and this is the result:

Wednesday, February 9, 2011

Connecting Open Wonderland to external services

I've been working on a tutorial about how to connect Wonderland to (and from) services on the Internet (webservices).

I am a big fan of REST so that's what I chose for the first tutorial that can be found in the community wiki.
The  code for the module can be found in my github account: REST sample module, and this is a screencast showing what you can expect from the module:



As per the utility of this module, as it stands it is quite limited, but what I am trying to show here is that it is very simple to connect to external sources, and in the same way that this very simple module sends information to be stored in an external database, other REST communication could be as easily programmed, be it integration with services such as twitter or facebook, or learning management systems such as moodle or sakai.

You can see some similar examples by Bernard Horan in Wonderblog and his youtube channel.

Client communication is not the only way that Open Wonderland can communicate with external services and I have started documenting this topic in this page. Please feel free to contribute; help will be much appreciated.

Tuesday, February 1, 2011

Workarounds and Tutorials

I have been working a bit on the community wiki, adding content and some workarounds for problems that have been mentioned in the list. Here are a couple of links:

A tutorial to explain components, which is a work in progress, and I would really appreciate some help with it. It uses the tooltip component as source code.

A workaround for the scripting component editor window, that does not seem to get along well with Windows boxes. This is the ScriptingComponent module in modules/unstable.

I would quickly like to mention a new module that allows scripting in a different way that the already existing module does. EZScript is being written by Ryan, and it can also be found in modules/unstable. It's only a couple of weeks old, and in almost incubation phase, but looks really promising. Looking forward to playing with it a bit more!

Friday, January 28, 2011

Empty module for Open Wonderland development

I was going through the first part of the 4 part tutorial Developing a new Cell when I realised that the empty module that is available for download contains quite an outdated classpath for use with Netbeans. So I decided to create a new one an upload it to my github account, mainly because in this way it can be developed further if things change in the near future (this pretty much means: feedback very welcome!).

As it stands now, the module is just an updated copy of the one in the tutorial. With time, I'm planning to modify the build file to add testing libraries (probably JUnit and mockito). It would be really cool if these dependencies could be 'pushed down' in to the Wonderland building system so that they are available to all module developers out of the box. But for now, feel free to clone, fork, or download the code.

If your local copy of Wonderland source files follows the structure in the README file, then you should be ready to go with little changes to the module (just a couple of rename actions, and the cusotmisation of my.module.properties).

To make it even easier, I've recorded a screencast, and I've been working (in progress) on an update of the tutorial material.

Tuesday, January 25, 2011

Open Wonderland Development course starting tomorrow

I cannot believe it is already tomorrow!!! I am really excited and cannot wait to start working.

In the end a great bunch of people applied for the course, and although initially I was only offering 10 seats, it will be 12 of us starting the course. Hope it will also be 12 of us finishing it!

I am truly sorry to have had to deny several applications, but the pre-requisites were higher than an introductory course, and a good bunch of people did not complete the sign-up task, so I could not approve their applications.

If you are still interested, you can follow the course through the P2PU site, as all the content is openly available. Course link.

Looking forward to starting this collaborative project and I will be documenting several steps of the process in this blog, so stay tuned if you want to hear more!

Friday, January 14, 2011

sample sign-up task for the OWL development course

This is a sample of what I am expecting to see with applications for the course. The exercise is explained in the Sign-up task section at the main page of the OpenWonderland development course at P2PU.

Here is the screenshot of the bean-shell plugin working on my local Wonderland server:

Saying hi from beside the Beanshell Console





























To get it to work I had to compile and run the core server, and then, from the wonderland-modules unstable folder, cd into the beanshell-plugin directory and type:
ant deploy

That deployed the module to my server. To activate it, I just added it from the main Wonderland menu (tools --> Beanshell console).

Reflection: I did not run into any trouble doing this, but this was only because I had done it before! call it cheating if you like! ;-)


And this is all you need to finish the sign-up task. The last step would be to apply for the course and send me the link to your blog post.

Open Wonderland Development Course at P2PU

I am organising an 'Open Wonderland Development course' at P2PU. This is a course that follows a peer to peer approach, it is all community based, and totally free.

About P2PU
The Peer to Peer University is a bit different. All work is done through p2p collaboration. Courses generally run for 6 weeks (next batch starting on the 26th of January 2011). You do not need to be an expert to organise a course, mainly because of the fact that you will be a facilitator, as opposed to a teacher/lecturer. All you need is a collection of open accessible resources to run a course (you can also create your own).

I think this model fits perfectly the software profession, if you compare it with the individualised approaches of any 'normal' university. You will not get a degree after finishing a course, but you might get much more out of it...

About Open Wonderland
Open Wonderland is a toolkit to create virtual worlds. It is 100% Java, it has a relatively small core, but its extensibility through 'wonderland modules' makes of it a platform to do pretty much whatever you want within the 3D environment. Out of the box you can share X11 apps within the world (Open office, Chrome, Eclipse, or freemind work pretty well), communicate through text, voice, or even the telephone, and drag and drop all kinds of digital materials such as pdf files, images, etc.

You can also write your own modules. One of the available modules is an scripting engine based on "JSR 223: Scripting for the Java platform". Using this module you can script objects inside the virtual world using any language supported by the specification (Javascript, PHP, Ruby, and so on).

The project was initially born at Sun Microsystems in 2007, but support from Sun/Oracle stopped earlier last year(2010). It was an open source project from inception and although most people envisioned its death after Oracle laid off the team, it has been quite a different story since then. The community has taken control of the project through the creation of the Open Wonderland Foundation (non-profit), and all kinds of meetings inworld have been happening ever since. All Wednesdays at 1pm (EST) there are development meetings in which the community share an instance of Netbeans and hack on code as a group (every avatar can take control of the instance and start driving).
I do have to say that things are going a lot slower, no doubt of that, but there are more users now than ever before, and development continues at a steady pace.

Motivation
So, why am I doing this, what's in it for me? The experience really. I was not part of the initial wonderland team and my association has not been other than as a volunteer in the community for the last few months. I thought this would be a good way to give back to the community.
I am also a researcher in IT in Education, and this is just a way for me to experiment with ideas, mostly taken from Software Craftsmanship.

I see a few different ways that learning can be organised around the wonderland system (apart from development work which will also be covered).
Although it is a fairly big system (with a small core), test automation is almost inexistent. One of my goals would be to start inspecting the system by testing it from within, and see where that leads us. There is a test harness in place, but it hasn't been used much and it would be great to inspect that too.
Another course for experimenting is the building system. Ant scripts exist for the system but dependency management is not explicit. The build is also way too dependent on netbeans.

These are two scenarios that people are quite likely to find in their everyday job. So, what's in it for you? Well, the experience really! :)
Some people might find attractive the fact that some out of the office learning can being organised (to a point) by someone else. I say 'to a point' because, as mentioned earlier, this is a peer to peer experience, I am not an expert, and learning is ultimately the responsibility of the participants themselves.

This is a 'distance learning experience', and I do not expect people meeting face to face, but I do expect meetings avatar to avatar. It is definitely not the same (nowhere near!) but in my opinion is the closest experience to the real thing that I've had so far.

In a nutshell
So, as a summary, if you are interested in learning through technology, be it software development, testing automation, scm, and so on, and you want to do it within an existing system, and more importantly, in a collaboratively, community-based way, please have a look at the course.

Link to the course: http://www.p2pu.org/general/open-wonderland-development-java
Dates: starting on January the 26th (2011)
Pre-requisites: Please read through the sign-up task (main page of the course) before applying.