Introducing Open Source to high school kids 0

Posted by timgoh
on Monday, March 17

I had the chance two weeks ago to give a talk to kids at my alma mater. These aren’t ordinary kids—they’re precocious kids in the Computer Elective Program which means they do C++ in 9th grade1 and PHP+MySQL in 10th grade.

In this post I’ll be outlining the motivation and content of my talk, and also what I’ve learned about talking to that age group, in the hope that other people with a similar opportunity can benefit.

Although it was titled otherwise, my talk was essentially “What I wished someone had told me when I was in high school”. Back then I was pretty much a Microsoft and Borland fanboy due to complete ignorance of open source. I had started with Basic and Pascal and the switch to Windows had really thrown me for a loop. All of a sudden coding had become so much more difficult. Visual Basic 1.0 eased the pain for a while, but ultimately I did not enjoy developing with it.

With just about all apps going the Windows route, I got disillusioned with coding for a while due to the tediousness of the Windows API and stopped for a while. I did use Turbo Pascal to train for algorithm coding competitions but didn’t do any small app development.

If someone had told me about open source back then… gotten me to take up Python or some other high-level dynamic language and mess around with the code of high quality open source projects… I don’t think my coding would have stagnated for that period of time. I just wish someone had told me there was an alternative that would make programming fun, and most importantly, responsive! A teenager does not enjoy the endless boilerplate that was the original Windows 3.0 and 3.1 API.

Since I can’t change my past, I decided to talk to these students and let them know more about open source. The state of OSS presently is much less hostile to newbies than it used to be. There’s easy-to-use distributions like Ubuntu, lots of advances in hardware compatibility, and very viable alternatives to PC software that didn’t exist during my time.

“During my time”. That’s one phrase I consciously avoided during my talk. I’m already more than a decade older than my audience—why separate myself even further? When I was in school, any similar phrase always alienated me from the speaker. It emphasizes the age gap even further. Don’t use that phrase.

Here’s a brief outline of what I talked about. I’m not providing slides because it’d be pretty pointless—a lot of them have just one word or picture. I’m not a run-of-the-mill Powerpoint bullet point abuser!

  • who am i
  • why be a software developer
  • brainteasers
  • why open source
  • fun projects to look at
  • why school projects are unrealistic
  • how to improve your coding skills
  • starting an open source career while still in school

Ok, so here’s my little self-evaluation

What went well:

  • I was able to hold the attention of most of my audience. A couple were sleeping, but everyone else pretty much paid attention. Since my primary goal was simply awareness of open source, I am pretty satisfied with this. A couple of them had even tried Ubuntu already but no one used it as a primary OS.
  • The brainteasers near the beginning of the talk got people thinking, and involved in the subsequent talk. (Get your audience to think through something at the beginning of a talk, and they’ll be more committed to the rest of your session than if you had just kept speaking throughout). I had two “what does this do” type questions – one which was a long series of piped shell commands, and another a Ruby fragment.
  • I managed to emphasize how cool it is to go through the applications and see what’s going on. I did a quick run-through of Amarok and then opened up its code in KDevelop. That was pretty exciting.

What didn’t go so well:

  • I may have been able to hold their attention during the talk, but there hasn’t been much response since then. I deliberately chose not to list any resources. I simply made my e-mail available and told them to contact me with specific requests and interest, so that I could cater my recommendations accordingly. Only 3 people came to talk to me after my session in search of pointers, and I have not heard from anyone since.
  • I did not go into detail about any topic. While time constraint did have something to do with this, in retrospect I think a “let’s code a scraper on the spot right now” would have been more interesting, and I could have just trimmed certain details from other parts of the presentation.

So the final verdict is, I did what I set out to do, but I could have done it better.

I found the entire process very rewarding. I really urge people to give it a shot—it doesn’t have to be the high school you went to. Find a high school with a computer club, and try and arrange to give a talk there. Contributing to Open Source isn’t about coding. Make a small time investment in winning the minds of future coders to Open Source.


1 I highly highly disagree with this curriculum. A language like Python, Ruby, or heck even C# would be much better at teaching concepts. C++ is inferior as a language to be taught because students will have to spend more time on syntax rules than learning algorithms.

Colorize your shell

Posted by timgoh
on Tuesday, January 22

We all love syntax highlighting, but often don’t bring that love with us to our shell. Here’s a couple tips to have a useful multi-colored shell session

Shell Prompt

Add

export PS1='\[\033[1;34m\]\h\[\033[0;33m\] \w\[\033[00m\]: '

to your bashrc.

This will give you your host in blue and working directory in brown. One excellent thing to do with this is to color-code each of the servers you log in to regularly differently. That way you have an instant, easy to understand indicator of which server you are currently accessing, so that you don’t ‘rm -rf’ from the wrong shell.

To customize, the Red Hat Knowledgebase lists more options for colors, and will come in handy for the rest of this post as well.

If you want to make sense of that command, Linux.com has a quick tutorial

Searches

Came across this tip from scie.nti.st

Add

export GREP_OPTIONS='--color=auto'
export GREP_COLOR='1;33'

to your bashrc, and have matches highlighted.

Or of course you could use tools like ack or rak which have colorization built-in and are more efficient than the venerable ‘grep’.

Man pages

Get the ‘most’ command1. On Debian and derivatives it would be a straightforward

sudo apt-get install most
.

You should already have a

export PAGER=less
or similar line in your bashrc file. Change that to
export PAGER=most
Now ‘man’ a command, and find out what you’ve been missing.

Background

One of the new things I’ll be doing with ProgProg this year is writing on various practices I have accumulated over the years. I wouldn’t go so far to call them “best practices”—they are just things that work for me.

My previous company had a great habit of not ever sitting on its laurels when it came to process. We were constantly tweaking, and occasionally making significant changes to our process in an attempt to improve. I have adopted this concept for myself, and once a week I examine my work habits and pick out something I can do in a better way. I’m not promising a weekly ‘process’ post, but will be presenting anything I find extremely useful.


1 “Most” is a misnomer though. Given that thanks to geek humor “less” is better than “more”, the command should really be called “least”.

An Ode To BasKet 0

Posted by timgoh
on Saturday, June 16

It is very sad news when a project you like has been abandoned/orphaned. This hasn’t been confirmed for BasKet yet, but it’s the current situation:

BasKet Note Pads has no developer anymore. Without new developers, I’m afraid the project will have to be stopped (and unavailable on KDE 4).

I am a big fan of BasKet—it is excellent for free form note-taking. Amongst other things I use it for my highly bastardized version of GTD.

Tangent

I skimmed through the GTD book (despite my distaste for self-help books) and found the process too heavy for my tastes—I am no high-powered executive with hundreds of reports. I extracted two things from the book:

  1. have multiple to-do lists which are updated regularly
  2. only put time-sensitive tasks on a calendar, and have reminders for them
I use BasKet for the former, and Google Calendar with e-mail notifications for the latter. It works for me.

I’d love to help out, but my C++ is really rusty (crummy excuse, I know).

My current plan is to pick up C++ again, and if by the time I get somewhat decent at it no one has picked BasKet up, I will see if I have the C++ moxie and enough time to do what I can for an excellent piece of software I’ve come to love.

Amarok, Magnatune, and saying no to iPiT 1

Posted by timgoh
on Friday, November 03

So, the new version of Amarok is out1. It’s an incremental release, so not so many new groundbreaking features. What is cool though is the addition of a music store. Now, Magnatune’s selection of music may not be too vast, but the store has a lot of things going for it:

For fans:

  • No DRM. While not named so, this is the kind of digital music that deserves names like “PlaysForSure” or “FairPlay”.
  • Offers lossless formats. Even to the extent of bandwidth-sapping WAV, which is sort of redundant since they offer my favorite (lossless) codec: FLAC
  • You can listen to the complete albums in MP3 format before you buy
  • 128k mp3s are distributed under the Attribution-NonCommercial-ShareAlike Creative Commons license, which allows sharing and derivative works, so things like sampling the songs or remixing them are perfectly legal, as long as it’s not for commercial benefit.

For the artists, it gets even better:

  • 50/50 revenue split
  • Non-exclusive relationship

I want Magnatunes to take off. I really do. And hopefully exposure through Amarok will get them more customers. Anything that provides a viable, free as in libre alternative to iTunes.


Warning: rant starts here

I hate the iPod/iTunes2. Its success has essentially proven that there is a huge market for music that is DRM encumbered. For music that is lossily compressed (true, this does not affect most popular music because they are engineered to sound good on the radio). For a device that can’t even play music gaplessly.

So the tactile feedback of the clickwheel is brilliant, the smooth exterior is very slick, the combination of iPiT creates an unparalleled user experience, yada yada. But you are talking about a digital audio player and a music store. The issues I point out about are flaws with what should be its core competency, its primary function.

Okay, truth be told, the iPiT hardware can handle gapless, as the Rockbox project proved. And if I am not wrong, iTunes 7 can finally do gapless playback. But all this just goes to show that the listening experience is not the main priority. But gee whiz, ya sure can choose the songs to listen to darn well, can’t ya?

Worse still, with the iPiT, artists find themselves making even less than before.

Check out other insider viewpoints on how the major labels work:

If growth in major label digital music sales continues to outstrip growth (if that) in CD sales, there will be a time in the not-so-far future when the Red Book audio standard may simply be phased out. While the weedy speech of EMI chairman Alain Levy is premature, it does describe a terrible future—one where music is neither DRM-free nor CD quality.

And that’s the direction the labels want to head. Selling digital music crippled with DRM is a wet dream for them now that they’ve overcome their initial technophobia. It is a product with no marginal physical cost of production that can be sold again and again (you have to buy the same song for each DRM platform you use if you switch, new firmware may not be backward-compatible, etc etc).

Every purchase of an iPod is a X-hundred dollar vote for DRM. Every purchase of a song through iTunes is a dollar vote for DRM. By casting your ballot this way, you are supporting the wrong side in our downhill battle.

The ever-increasing flood of dollar votes for DRM has to stop now before it is too late.


1 So I’m a couple days late with this, but give me a break – work is busy and I usually only get to catch up with news on weekends.

2 I will constantly refer to the hardware DAP and the store as a single entity. They go together like Microsoft Windows and Microsoft Office go together, ie a symbiotic relationship of mediocre components.

Edgy Release Party! 0

Posted by timgoh
on Thursday, November 02

So, Mark Shuttleworth was in my part of the world1 yesterday, and how could I pass up the chance to meet a fellow geek, and a pretty damn successful one at that?

The event was the Edgy Eft release party, and it was a blast. Maybe 400 people cramped into a small conference room, standing room only. Mark started off by giving a quick speech on why FOSS is better than the proprietary alternative, and then gave a brief introduction of new features in Edgy. All this was old hat to me, but it was definitely an experience to hear him speaking about it in person—hearing the passion and drive in his voice.

It was interesting for me to compare Mark’s presentation to the last FOSS leader I got to see live – rms. Both are very charismatic, persuasive speakers. But where Mark appeals more to your brain and your sense of logic, rms appeals more to your heart and principles – your sense of what is just.

The subsequent Q&A had lots of interesting questions, which I shan’t go into too much detail about here. Some of them resulted in answers I knew already, ie how Mark got rich, etc, but I enjoyed listening to his delivery anyway. He can tell a story pretty well.

One blight on the session – someone abused his shot at a question to launch into an edict of what he wanted fixed in Ubuntu right now. Reading from a prepared list, at that. What a jackass.

As time went on, I was worried I wasn’t going to get my own question in – I was all the way at the back of the room, and deemed it undignified to wave my hand around wildly or jump up and down each time the chance came up. So when I finally got my chance, I projected my voice across the room to ask, “Suppose you have 3 years to turn someone into a core Ubuntu developer at Canonical. What would your training plan be?”

His tripartite answer (coincidence, or did he mishear my question as “3 steps”, I don’t know) was:

  1. Get a job in a company which uses Linux.
  2. Explore forums, wikis, IRC, etc and learn how the community works
  3. Decide on a small project for yourself, and implement it, getting help from the community if necessary

Straightforward enough. I think a series of broad goals is much better than a road map of details like “Spend 3 months reading kernel source, then write a device driver, followed by…”. Often journeys are more fun when they aren’t planned and you’re feeling your way as you go along.

The evening ended, sadly, with many fanbois asking for and getting photo opportunities with Mark. I saw this as rather pointless, although the starstruck people with autograph books and camera-phones in tow probably waited all night for this chance. My take on this: the guy is not famous for his face2, he is famous for the gray matter behind it. If it was Jessica Alba I’d ask for a photo – not attempt an intellectual conversation. Conversely, I spurned the chance at a photo with Mr Shuttleworth to engage in a quick back-and-forth instead. Nothing too brainy, just a short conversation on Canonical and Ubuntu which drifted into music at one point. Unfortunately, it couldn’t be any longer, lest the autograph hunters behind me in line had to go home with their dreams shattered .

I had actually planned to write about Edgy and my experience with it thus far earlier, but decided that this would make an excellent precursor to it. Definitely one helluva night for me. More on Edgy Eft to follow!


1 39°54′20″N, 116°23′29″E

2 No insult intended of course

Ian on Debian vs Mozilla 0

Posted by timgoh
on Sunday, October 15

Who better to comment on the current controversy than Ian Murdock himself?

He agrees with a suggestion made in a comment on his page:

I think Debian’s stance should have been to distribute epiphany and move Firefox to the appropriate *verse repository.

Ian’s reasoning is as follows:

Best of all, it maximizes freedom—namely, the freedom of users to decide whether or not this is an issue worth switching over.

I agree with this – it is the most practical choice. Both groups of developers got too focused1 on their own project and failed to consider the bigger picture and ask themselves “What is best for open source?” And while disagreements take place frequently in the open source world, I don’t think they are a bad thing – as long as they are resolved with a net gain for the community as a whole. I’d rather have passionate developers arguing for projects they believe in than a bunch of yes-men constantly trying to please everybody.


1 I can never remember whether to spell “focused” with one ’s’ or two, so I put it on GoogleFight to check. Results were overwhelmingly in favor of one ’s’, which I personally favor because it is more aesthetically pleasing.