We will meetup and split up in groups and work on a simple code problem together and learn from each other.
Join or login to comment.
Did anyone forget a pair of white urban ears earphones at our office?
0 · October 24, 2012
Yes! I did not read this until now, but I left them and have been procrastinating to ask. Are they safe? =)
0 · November 7, 2012
I will check tomorrow :)
Thanks for a well-organized meetup.
Reflecting on the event, it bothered me that nobody (hope I remember correctly here) was able to solve the problem in 2x30 mins. It cannot have been for lack of skills - the task did not seem too hard.
I decided to do the exercise at home. I had a first version in about 30 mins, passing all but the last test case, which thrashed until it ran out of memory. I then put some work into a more efficient representation, and a final optimization which brought the runtime down to a few seconds.
The code is at https://github.com/marcusb/kata_potterbut what I really would like to discuss is this: how did I and others fail to solve the problem at the meetup?
1 · October 30, 2012
Very nice work. I should really take the time to write a working implementation myself ;). I think a lot of the problems we faced were due to being in a situation where we were under a lot of pressure, time wise, paired with people we didn't know, facing a problem we didn't have time to think about. Imo, stress is the killer of all creative thought.
0 · October 30, 2012
Here is my solution, which takes another approach: https://docs.google.co...
0 · November 2, 2012
This solution was born out of the tests, it's not a general as Marcuses, but it's probably faster. It took quite a while to implement. (more than 30 minutes... )
Continuing the previous comment...
I would suggest that the TDD-inspired approach of the kata format is not a good fit for problems of this sort, which are all about designing a non-trivial algorithm.
Following a TDD method, we would try to make the first simple test cases succeed, and then successively try to implement the more complex ones. But this is just silly - we will not get any closer to a full algorithm by solving a trivial case.
Instead, finding the solution requires thinking "globally" about the entire problem, choosing among possible types of solutions, techniques, known algorithms etc... usually best done using a whiteboard, or pencil and paper.
Note that some proponents of TDD claim that TDD is a good methodology for algorithm design: http://blog.objectmentor.com/articles/2009/10/06/echoes-from-the-stone-ageFor me, this claim is clearly disproved by our experience.
The tests we had certainly helped, imo. I'm not at all religious about the first D in TDD though, so I agree, in this case thinking about the problem as a whole as opposed to taking incremental steps is a better path.I think for all the dogma, it's easy to forget that TDD is a tool, and that it works well or less well in different solutions.
… (accidental post). I think that most people who have extensive experience with TDD will tend to move in and out of TDD-mode depending on the type and scope of the problem they are trying to solve.
It's easy to take an experience like this and turn it into an argument against TDD as a whole. Not to say that you, Marcus, did that in this case. TDD can have immense value in my opinion, but in this case it clearly didn't.
I still think that we derived a lot of value from having the tests written upfront and from having tests in the first place. There are definitely situations where not having tests is the better choice as well, but I think those are far rarer than occasions where strict application of the TDD pattern isn't optimal.
Well, I personally found the test-cases valuable.
On the first 30-min we misunderstood an important part, so we failed miserable. But by the time we realized our mistake, it was already to late.
On the second round we were just about to implement the last test-case when the time ran out. Without the test-case we wouldn't even have had any idea what to code.
If you manually calculate a few examples this would take more time. In essence you are hand-coding a test-case then....
I personally learned a lot and it was nice meeting you all!
0 · October 31, 2012
Link to the kata?
0 · October 23, 2012
Here you go: https://github.com/got...
Nearly solved it on the second go ...
1 · October 23, 2012
all in english ?
1 · October 22, 2012
There aren't going to be any presentation and I'm sure no one will mind speaking English. So you're very welcome even if you don't speak any swedish.
0 · October 22, 2012
Next: Invite friends
Providing venue, food and drinks
Food and a place to be at
791 Java coders
Meetup members, Log in