Log in

No account? Create an account
latest entries related journals calendar about the author My life in pictures older entries older entries more recent entries more recent entries
How much code is too much? - My Thoughts Today
An ill-used association of words and pictures
How much code is too much?
So RailsConf Europe is once more upon us, and a fortnight from now spikyblackcat and I will be reprising last year's mind-boggling sensation: mind-boggling to our unexpecting audience, and sensational in the sense that some lunatic is willing to let us do it all again!

Anyway this year's event is sponsored by O'Reilly Media who seem to have a more organised take on the whole proceedings than our friends at Skills Matter. They were supposed to have our presentation slides by last Friday, a tall order considering some of the esoteric byways we intend to address, but thanks to the Labor Day holiday in the US they've given us an extension until today. Yay!! Just like being an undergrad again ;p

We're fairly content with the overall presentation we've developed, but as most of our work involves DNS and crypto and dynamic networking technologies I want to include useful code samples illustrating how all of this is relevant to both the Ruby and Rails communities. But how much code to include?

So far I have a working UDP client/server example, I'm debugging a TCP client/server app as I write, and spikyblackcat is finishing off a hybrid crypto example: that will be a total of five slides in a 45-minute run-time and I'm wondering if that's the limit of what we can practically get away with. I'd really like to also include a BackgrounDRb example that talks to UDP and TCP servers, that way anyone viewing the slides online can figure out how to write an end-to-end Rails application that accesses encrypted data over an arbitrary network connection.

I also intended to include an example of doing this directly with AJAX as part of our push towards real-time web applications (well, near real-time) but that looks like too tall an order for the duration of presentation. Thinking about it, we should really have agreed to do a half-day seminar/tutorial, but hindsight's always 20:20 - and when I wrote the original proposal back in April we weren't sure we'd even have enough of our research completed to fill 45 minutes!

Back to the digital grindstone...

Tags: , ,
today I am mostly: procrastinating

8 opinions or participate
vorpal_t From: vorpal_t Date: September 4th, 2007 01:53 pm (UTC) (permanent link)
Sounds like the perfect training for debugging my WebForms application. Its driving me nuts, lets hope its just the order PATHs are defefined....

My compiled stand alone version is fine, grrr

feyeleanor From: feyeleanor Date: September 4th, 2007 02:09 pm (UTC) (permanent link)
I feel your pain ;)
For some (to me) completely inexplicable reason my TCP server is missing the first connection it receives on launch. I've written dozens of these things in the past so either I'm overlooking something so blindingly obvious that a total noob would spot it, or else my Mac's having a good laugh at my expense: I'd rate it as evens either way...
vorpal_t From: vorpal_t Date: September 4th, 2007 02:21 pm (UTC) (permanent link)
as Dud (or was it Pete) said - "Feel it, feel it".

How about preloading your buffers with garbage/known localhost and then looking for a change on start up.

Once you have the change, you are up and running.

Always have this problem unless I bang the buffer, even in Assembler.

The answer to 'how low can you go', isn't 'feck off', sometimes its good to see the bits.

feyeleanor From: feyeleanor Date: September 4th, 2007 02:53 pm (UTC) (permanent link)
Nice idea, although I probably shouldn't be heading down rabbit holes this late in the day. Mind you, a bit of buffer pr0n may be jut what the doctor ordered lol
From: ext_62212 Date: September 5th, 2007 11:23 pm (UTC) (permanent link)

It Depends

Interesting question: "How much code is too much?" I think it depends on the concepts you're trying to teach. What knowledge do you want them to walk away with? They won't walk away with all the code memorized so they can reuse it.

Instead of simply showing code, it's more valuable to present the techniques behind the code. How did you know to write it that way? What libraries and references did you use? What does this code actually do? This way they will have the knowledge to write the code themselves, customize it, and add to it.

I guess a better answer is: use as little code as necessary to teach the concept/technique.
feyeleanor From: feyeleanor Date: September 6th, 2007 01:26 am (UTC) (permanent link)

Re: It Depends

Well I think I've managed to do that with my examples, but I guess only time will tell...
jaobedoza From: jaobedoza Date: March 17th, 2008 03:47 pm (UTC) (permanent link)

Re: It Depends

it is better to teach the principles and concepts behind the codes. in my opinion, if these concepts are mastered, the codes will follow.
feyeleanor From: feyeleanor Date: March 17th, 2008 05:46 pm (UTC) (permanent link)

Re: It Depends

Well I must admit that during sessions I tend to flip past the code and concentrate on the underlying principles as I firmly believe a good programmer needs both knowledge and insight. However it always seems mawkish not to include concrete examples that people can play with on their own time.
8 opinions or participate