Code Dojo

1 view
Skip to first unread message

Robin Newton

unread,
Nov 9, 2009, 6:00:51 PM11/9/09
to Cambridge and East Anglian Python Users Group
Is anyone interested in doing a python code dojo ("public
collaborative coding with the aim of mutual learning based upon the
premise that acquiring coding skill should be a continuous process")
in the manner of http://ramblings.timgolden.me.uk/2009/09/18/ ?

Robin

David Reynolds

unread,
Nov 9, 2009, 6:08:59 PM11/9/09
to cam...@googlegroups.com

That sounds quite interesting - I hadn't really realised what a code
dojo was, but it sounds like a great way to learn and pick up tips.

I'd certainly be interested if you could organise something.

--
David Reynolds
da...@reynoldsfamily.org.uk

Stuart Turner

unread,
Nov 9, 2009, 6:12:25 PM11/9/09
to cam...@googlegroups.com
Ditto.

Robin Newton

unread,
Nov 10, 2009, 5:38:20 PM11/10/09
to Cambridge and East Anglian Python Users Group
> I'd certainly be interested if you could organise something.

Ah... I hadn't really thought that far ahead.

I guess the possibilities are either somehow to fit this in to a
normal monthly meeting, or to do it as something extra. Tibs can
comment as to whether he thinks the former makes sense. Otherwise
there'd need to be a venue and equipment. Depending on the number of
people interested the venue could, in principle, be my house.
Equipment might be trickier: as I understand it the whole thing
depends upon being able to project the desktop so that the 'audience'
can see whatever the people in the hot seats are doing. I don't have
that sort of kit. (My laptop is cranky anyway: I don't think anyone
would thank me for making them use it.)

All suggestions welcome.

Robin

Tibs

unread,
Nov 11, 2009, 3:04:16 PM11/11/09
to Cambridge and East Anglian Python Users Group
On Nov 10, 10:38 pm, Robin Newton <rnew...@fastmail.fm> wrote:
> David Reynolds wrote:
> > I'd certainly be interested if you could organise something.
>
> Ah... I hadn't really thought that far ahead.

That's how you get roped into things, you know...

(by the way, this is an excellent idea)

> I guess the possibilities are either somehow to fit this in to a
> normal monthly meeting, or to do it as something extra. Tibs can
> comment as to whether he thinks the former makes sense.

I don't see why it shouldn't be done as a normal meeting. Sounds like
exactly the sort of thing we're for.

Of course, if people want to do it as an extra meeting (perhaps
because of doing it at the weekend or something) then that would be OK
too.

> as I understand it the whole thing
> depends upon being able to project the desktop so that the 'audience'
> can see whatever the people in the hot seats are doing.

Which sounds like the normal setup for a talks meeting, to be honest
(I'm sure between us we can provide a good laptop, and a reasonable
external keyboard and mouse. With a good selection of editors...).

RealVNC have been very good to us so far, although if we're going to
have a lot of people we might be a bit cramped in the meeting room
we've been using. The other option we know of is the AngliaRuskin
Library, which would cost a small fee (maybe a couple of pounds per
person), but I'm sure that's not a problem.

Basically, venue and equipment we can work out. The main difficulty is
deciding what to work on, as always. This is what we've always stalled
on in the past - on the other hand, this is a good venue to discuss
such a thing.

Robin - do you have an idea of a project to do?

Tibs

Robin Newton

unread,
Nov 12, 2009, 2:44:43 PM11/12/09
to Cambridge and East Anglian Python Users Group
On Nov 11, 8:04 pm, Tibs <t...@tibsnjoan.co.uk> wrote:
> The main difficulty is deciding what to work on, as always.
> ...
> Robin - do you have an idea of a project to do?

As I understand it these things are more puzzles than projects, and if
it's not 'finished' by the end of play then that doesn't really
matter. For example, in London they tried to write a Noughts and
Crosses player: http://ntoll.org/article/london-python-code-dojo-2.

If I were feeling exceptionally lazy I could suggest doing the same
thing, using the starting point code that Nicholas Tollervey provided
for it. However, I'll see if I can't rustle up something myself.

Robin

Tom Lynn

unread,
Nov 12, 2009, 4:31:03 PM11/12/09
to Cambridge and East Anglian Python Users Group
First, could everyone please drop an email to campug-
do...@mailinator.com if you'd come to a code dojo on Dec 1st. My hunch
is that we won't get so many that it would be a problem to use the
RealVNC offices (I'll check that's an option), but it's worth
checking.

Now I've got that said, the question of what to work on is definitely
tricky. I prefer real-world problems to puzzles, since most puzzles
reward thinking hard more than they reward good coding style.

One real-world-ish thing that occurred to me was "Write a web browser
in Python". It may sound scarily impossible, but a) it's been done
before (<http://grail.sf.net>), b) I think actually you could do
something plausible relatively quickly and c) it demos lots of
actually useful libraries that people might not have come across.

Now email campu...@mailinator.com if you'd come to a dojo on that
or anything else.

Tom

Robin Newton

unread,
Nov 13, 2009, 3:39:49 AM11/13/09
to Cambridge and East Anglian Python Users Group, Tom Lynn
> I prefer real-world problems to puzzles, since most puzzles
> reward thinking hard more than they reward good coding style.

Yes, I wonder too about the use of toy problems. However, I'm happy
just to treat this as a rule of the game for now, and see how this
pans out before trying to change it.

[In case anyone is wondering why it's called a 'dojo', which is a
piece of karate terminology, it is bound up with Dave Thomas' coining
of the term 'code kata' for little coding exercises. See http://www.codekata.com/
and http://codingdojo.org/cgi-bin/wiki.pl?KataCatalogue.]

> One real-world-ish thing that occurred to me was "Write a web browser
> in Python".

Although, as I said previously, it doesn't matter that much if a
problem doesn't get finished, I think it is important that it could
plausibly be done in a single session. So - and bearing in mind that
only one person would be coding at once - I think that trying to write
a browser in an evening might be a bit ambitious.

I think it is also worth considering that people are unlikely to be at
their most productive in a dojo: I imagine it must be fairly off-
putting to code to a crowd, and talk about it whilst you're doing it.
Moreover, some people (e.g. me) may not have prior familiarity with
pair programming and test-driven development. This is part of the
reason why I don't currently mind the idea of having a toy problem.

As to puzzles being a bit too 'thinky', I assume that part of the
point is for people to be able to see how other people think about
things, which (I hope) could be quite illuminating.

Actually, I did have something in mind, but I was going to keep it
under my hat until nearer the time, to save people the temptation of
working on it in advance. My plan had been to provide the beginnings
of a unit test and an implementation that fails all its tests, to act
as a starting point.

Robin

Tom Lynn

unread,
Nov 13, 2009, 2:07:27 PM11/13/09
to Cambridge and East Anglian Python Users Group
Robin Newton wrote:
> > I prefer real-world problems to puzzles, since most puzzles
> > reward thinking hard more than they reward good coding style.
>
> Yes, I wonder too about the use of toy problems. However, I'm happy
> just to treat this as a rule of the game for now, and see how this
> pans out before trying to change it.

Fair enough.

> [In case anyone is wondering why it's called a 'dojo', which is a
> piece of karate terminology, it is bound up with Dave Thomas' coining
> of the term 'code kata' for little coding exercises. See http://www.codekata.com/
> and http://codingdojo.org/cgi-bin/wiki.pl?KataCatalogue.]
>
> > One real-world-ish thing that occurred to me was "Write a web browser
> > in Python".
>
> Although, as I said previously, it doesn't matter that much if a
> problem doesn't get finished, I think it is important that it could
> plausibly be done in a single session. So - and bearing in mind that
> only one person would be coding at once - I think that trying to write
> a browser in an evening might be a bit ambitious.

The thing I like about the "web browser" idea is that you can create
something that meets that description as a one-liner, after which
everything else is bonus. But it can certainly wait.

> I think it is also worth considering that people are unlikely to be at
> their most productive in a dojo: I imagine it must be fairly off-
> putting to code to a crowd, and talk about it whilst you're doing it.
> Moreover, some people (e.g. me) may not have prior familiarity with
> pair programming and test-driven development. This is part of the
> reason why I don't currently mind the idea of having a toy problem.
>
> As to puzzles being a bit too 'thinky', I assume that part of the
> point is for people to be able to see how other people think about
> things, which (I hope) could be quite illuminating.

I worry that those coming in later will be stuck with the dilemma of
sticking with whatever direction the first people took it or throwing
it all away, which might well be the best approach with some puzzles,
but would seem to be the height of rudeness.

> Actually, I did have something in mind, but I was going to keep it
> under my hat until nearer the time, to save people the temptation of
> working on it in advance. My plan had been to provide the beginnings
> of a unit test and an implementation that fails all its tests, to act
> as a starting point.

Sounds like a good starting point.

Re. numbers, either no-one has emailed the mailinator address or the
mailinator people have reset their servers. Either way, it turns out I
misused it anyway, so that's a good thing. If people who are planning
to come could reply to me directly or email the much less memorable
but more secure address:

M8R-9wx0b (at) mailinator.com

that would be helpful, thanks. (This made me think that altering the
Google App Engine guestbook tutorial to create a sign-up sheet web app
would make another nice code dojo exercise...)

Tom

* emailing the previous address might expose your address to very
zealous spammers, sorry

Safe Hammad

unread,
Nov 14, 2009, 10:52:48 AM11/14/09
to cam...@googlegroups.com
2009/11/13 Tom Lynn <tom....@gmail.com>:
> Robin Newton wrote:
>> > I prefer real-world problems to puzzles, since most puzzles
>> > reward thinking hard more than they reward good coding style.
>>
>> Yes, I wonder too about the use of toy problems. However, I'm happy
>> just to treat this as a rule of the game for now, and see how this
>> pans out before trying to change it.
>
> Fair enough.

At the Europython meeting in June, I attended the half-day "Coder's
Dojo" which I found both effective and enjoyable. We managed to fit
in a couple of puzzles in the the half day. Though I'm also a fan of
solving "real world" problems, the fact that we were solving puzzles
was entirely secondary to the process e.g. deciding what tests to
write ... what data structures to use ... arguing about using
generators rather than passing lists ... deciding whether sacrifice
some speed for a clearer implementation ... fixing buglets ... showing
off knowledge of an esoteric function in itertools which replaces 5
lines of code etc. etc.

Factors I feel contributed to the success of this session include: (a)
the puzzles weren't particularly difficult to solve; (b) we stuck to
simple console apps (c) the puzzles were really coding problems rather
than puzzles (we coded an app to keep track of a game of
reversi/othello and display valid moves); (d) the problems were very
well specified which helped keep the pace up and allowed us to get on
with coding rather than deciding what feature to implement.

Safe

Tom Lynn

unread,
Nov 14, 2009, 3:25:54 PM11/14/09
to Cambridge and East Anglian Python Users Group
On Nov 13, 7:07 pm, Tom Lynn <tom.l...@gmail.com> wrote:
> Re. numbers, either no-one has emailed the mailinator address or the
> mailinator people have reset their servers. Either way, it turns out I
> misused it anyway, so that's a good thing. If people who are planning
> to come could reply to me directly or email the much less memorable
> but more secure address:
>
> M8R-9wx0b (at) mailinator.com
>
> that would be helpful, thanks.  (This made me think that altering the
> Google App Engine guestbook tutorial to create a sign-up sheet web app
> would make another nice code dojo exercise...)

...but it turns out mailinator throw away all email after a couple of
hours, so it became a bit more urgent. Fortunately, the AppEngine
Guestbook code was indeed exactly what was required with basically no
changes, so please sign up here (apologies to those who have tried
multiple times already):

http://campug-guestbook.appspot.com/

Tom
Reply all
Reply to author
Forward
0 new messages