people love Ruby… is that appropriate?

People love Ruby… “is that appropriate?” Dave Thomas asks, “is a software tool something that should be the object of our love?”

“programmers, like poets, constantly start with a blank piece of paper… so we have to love our tools, since otherwise we grow frustrated and that ends up showing in our work.”

I enjoyed Dave Thomas’ RubyConf 2008 keynote in which he challenged the Ruby enthusiasts in the audience to f**k Ruby (get  your mind out of the gutter, he meant *fork*) to show love for the language.  Perhaps this talk was the genesis of “fork is the new friend” or perhaps that idea is new for me but well known for community.

Dave’s talk sheds light on delightful corners of the Ruby Language and is worth checking out. I’m increasingly enamored of open source tools that I use in my daily work and find that spending a little time now and then to contribute a patch or edit a wiki will streamline my later work and brings a joy akin to gardening.

Posted in general | Leave a comment

glass box voting

Open Source Digital Voting is a digital public works project, pulling together a community of developers and designers to make it so we have software and hardware that we can trust to support all aspects of the voting process.

They have released this compelling video about the project:

I believe that open source is the most effective way to create software with appropriate security and privacy protections. It is a particularly great approach to creating software designed to protect democracy.

These are a bunch of dedicated folks doing great and important work, please spread the word.

Posted in general | Leave a comment

story about making a difference

Inspired by the SlideShare story contest, I created a presentation that tells the story of how we came to create a workshop to teach women ruby and how things have turned out so far.

Once Upon A Time

View more from Sarah Allen.

If you like the presentation, you can vote at SlideShare.

Read more about the workshop.

Posted in general | Leave a comment

open source workshop

I believe that open source provides a new model for changing the way things are. It is exciting to work with so many people who are experienced with working together in eclectic collections of motivated individuals. It is a new way of getting things done and it is neat to see it applied to social challenges as well as technical ones.

It all started with an idea of how to take a few baby steps toward increasing the number of women in the SF Ruby community.  Sarah Mei and I got to talking about putting a workshop together to teach women Ruby on Rails.  We envisioned teaching 10-20 women once per month, betting that over time a few would decide to stick around.  With just a few more women we could double or triple the number of women at the typical SF Ruby Meetup!  As we acted on our idea, we were joined by many individuals, organizations and companies who wanted to help.  With the force of the community behind us, the first workshop became a bold move with 62 attendees, 15 volunteers, and 7 simulataneous classes.

This workshop represents a breakthrough transformation in several ways:

  1. It is entirely open source and designed to be replicated by anyone to any audience (not just women).
  2. There seems to be a large potential audience of women.  The event filled up in less than 3 days with very little publicity.
  3. There are a large number of people and companies who want to see diversity amongst programmers, making it easy to find volunteers, space, food & drink, equipment and everything else needed to make such an event happen.
  4. The Ruby and Rails community in the SF Bay Area is still small, so just a few additional women will make a huge difference.  We don’t need to change all of society for this effort to have a significant and noticeable effect.

Every single person involved made a difference, just like in an open source software project.  This was facilitated by organizations that provided resources.  Some provided private space (server space and physical meeting space) and others, such as github, with a policy of supporting open source projects for free, provided public space.

People stepped in and did what was needed.  Orange Labs was an incredible host, letting us use every conference room as well as providing breakfast, lunch, and copies.  Vodpod who couldn’t make it in person contributed money for food & drink.  Volunteers arrived with USB keys that had software installs to save download time. Participants helped with registration, setting up and tearing down chairs and tables, arrived early and stayed late to do what needed doing.  Remote folks reviewed courseware. I don’t have a list of every volunteer, but I wanted to especially thank the additional teachers who made us able to open the even to such a large group and still keep the classes small:  Austin Putman, Bosco So, Carmen Diaz, Jen-Mei Wu, Seth Walker, Wolfram Arnold, Ivan Storck and Will Sargent.

If you are interested in volunteering at a future workshop, you can join our google group.

Here’s a list of the many organizations who helped:

Special thanks to Heroku for providing a free-tier, not just for this workshop, but for everyone.

Posted in general | 2 Comments

twitter in the classroom

Marshall Kirkpatrick at ReadWriteWeb writes about twitter in the classroom (via Koichi C, thanks @wolframarnold). He leads with a detailed story about University of Texas at Dallas History Professor, Monica Rankin, who uses twitter to create a dynamic and vibrant discussion in a large class of 90 students. She projects TweetDeck in the front of the class and students twitter via laptop, phone or hand-written notes to the TA.  A graduated student created a video about the experiment (below) and Rankin wrote about her perspective.

How did it work? One class session per week was set aside for discussion and the “twitter experiment.”  Students were separated into groups of 3-5 and given topics to discuss and tweet.  Before taking this approach, it was impossible to involve more than a few students in the wider classroom discussion, and only the very assertive and articulate students would participate.  This innovative method of discussion gives voice to many more students and the discussion reaches outside of the classroom — students post observations after class has ended, some refer back to the twitter conversation for study notes, and once the teacher participated remotely when out of town.

Is 140 characters adequate for discussion? The twitter limit is really too small for much reasoned argument, but Rankin notes that it does require students to get to the point.  In the art of the tweet, Rands notes that the characters limit causes him to “to reduce the idea to the basics.”

The Elements of Style has advice here. They suggest: “Avoid fancy words”. Why utilize when you can use? My advice is similarly confusing: “Drop words to give them room to think”.

In my head, I’m cutting words from my tweet to give you room to mentally add your own:

BEFORE: If it’s 4am, I know how stressed I am.
AFTER: Stress is how well I know 4am.

Is it a distraction? The Chronicle of Higher Education reports on another experiment. Cole W. Camplese, director of education-technology services at Pennsylvania State University at University Park teaches a class with two screens: one for his slides and one for twitter. He encourages students to “pass notes” via twitter during class. However, with the public nature of twitter this is very different from passing notes between students, instead it enriches the learning experience for everyone as students post links to relevant web sites, along with their own observations.

Does it lead to better learning? Camplese hopes that this “second layer of conversation” will disrupt the old model of classroom learning, allowing students to play a greater role in their own learning and incorporate information from sources beyond the classroom. Rankin concludes her synopsis by saying that “the twitter experiment was successful primarily because it encouraged students to engage who otherwise would not.”  JSOnline reports on a social media class at Marquette University where Dr Gee Ekachai teaches “live tweeting” of guest lectures. Students learn to assimilate what they are listening to and capture the essence of key points in real time.  This exercise helps students develop key skills of listening, information-gathering, and succinct writing that are useful beyond social media and PR.

The experiments continue. I enjoyed reading further about 25 interesting ways to use twitter in the classroom.  (My favorite is #17 “Communicate with experts.”)  Initially I had a negative gut reaction to hearing about twitter in the classroom, but after reading these stories about innovative teaching methods, I find it exciting and intriguing.  I hope to hear about more of such experiments.

In the video above, Rankin reflects on dealing with such an experiment in the classroom.  She notes: “it’s going to be messy, but messy doesn’t mean that it is going to be bad.” It reminds me of the internet as a whole, which is quite messy, yet many wonderful parts of the web also seem to be a direct result of that mess. Tim Berners-Lee, credited with inventing the World Wide Web, is reported to have said that the web will always be a little bit broken and how that is part of the design. Because the web is a little bit broken, the technology relies on human resilience and intelligence to fill in the gaps whether it be moving past a “404 not found error” or mentally filling in words beyond twitter’s 140 character limit.

Posted in general | Leave a comment

google waves mixes in realtime

It is not a new idea to mix synchronous and asynchronous communication, in other words, mixing real-time, like chat, and store & forward, like email. I have always felt that Internet communications application are oddly modal, where the UI is largely driven by the protocol. It was one of the things that led me to join Jonathan Gay in creating the Flash Media Server. The primary use case of Flash video has, of course, been simple broadcast, but we built in flexible APIs that allowed Tivo-like behavior for video and a seamless mix of real-time and persisted data with Shared Objects.

Google Waves seems to have a quite nice implementation of a new model of communication, allowing people to seamlessly move between real-time chat and email-like messaging. Some of the social interactions are very experimental and may or may not fly, but it was fun to see what they came up with and the joy with which it was demonstrated by one of its creators, Lars Rasmussen.

I agree with Lars when he said “UI changes the way you think. He notes how you think of written communucation as a document or as a message, but waves doesn’t make that distinction. I actually think that distinction is healthy. I experience a conversation. I craft a document. I’ve also noticed that I find myself subverting the intention of the UI in various applications that I use, most notably email. I’ll use my drafts folder for initial drafts of documents and notes that I never intend to send as an email message. I think it more likely that the UI paradigm that will catch on will be an evolution of today’s ubiquitous applications rather than something that feels as different as Waves. We are already seeing the mix of real-time with email with presence indicators alongside the sender’s name in Apple Mail and collaboration features invading the staid Microsoft desktop applications.

Nonetheless, I found the shared editing with interspersed conversation intriguing and its magical transformation into a finished document appealing. With live concurrent editing in Waves, people can edit separate parts of the document at the same time. They’ve done a nice job in supporting languages that require IME (Input Method Editor), like Chinese, and right to left languages, like Hebrew.

The spell-checker component was impressive independent of the communications framework it plugs into. Lars demonstrated that it could find mistakes that could only be detected in context “I like been soup. How have you bean?” The live spellchecker is an extension. It can “watch” a document and then make live edits and act as a collaborator just like a human would. Yes-No-Maybe gadget is another example, allowing people to vote as part as a conversation. At the very end they demonstrated live translation that appeared to work much better than the current Google translate. An agent, nicknamed “Rosie” does live translation between any pair of 40 languages while you type. The visual feedback is distracting, but the technology is impressive. I wonder when that magic will be accessible outside of Waves…. or maybe Google Translate has seen an upgrade since I last used it a few weeks ago.

Google is betting that in making Waves an open system (providing a reference implementation, documenting the protocol and making available a free production-ready system) they will gain adoption — certainly they are aggressively removing barriers. Federation allows someone to independently deploy a different server that uses the Wave protocol. Analogous to different email servers all implementing the same protocol.

The main barrier is whether people will adopt a different paradigm when the old ones are good enough. I don’t have access to the software since I missed Google I/O, but they seem to be offering a nice set of UI widgets for embedding along with web APIs. They went so far as to say that by embedding these widgets, “your users get to use a familiar UI.” I thought that an interesting assumption of success where such revolutionary (as opposed to evolutionary) new interaction models don’t typically gain traction.

Nonetheless, I plan to fill out their web form and see if they will let me play in their sandbox.

Posted in general | 1 Comment

teaching kids to code: lesson #3

On the third (and final) class in my series of teaching Shoes and Ruby to 4th/5th graders, I decided to teach them to create a game. I met with my two fifth grade helpers the afternoon before the day of the class. I taught them how to create text and buttons and add a click method and showed them the Shoes manual, then let them experiment. This was a good experience for them, but we ended the day with a more complicated program than I felt we could do with the class and it incorporated internet images which wouldn’t work in the classroom since Internet connectivity isn’t working right now. I also ended up getting beyond my Shoes experience and had to ask help of the Shoes list. After some help from some kind souls, this was the app the kids wrote:

class OurApp < Shoes
 url '/',  :index

 def index
   clear
   para "Which is correct?"
   stack {
     @correct = button "A bed of clams"
     @wrong1 =button "A coalition of cheetahs"
     @wrong2 =button "A gulp of swallows"
   }

   @correct.click {
     clear
     para "Correct"
     image "http://upload.wikimedia.org/wikipedia/commons/thumb/a/ae/Balloons-aj.svg/550px-Balloons-aj.svg.png"
     button "Go Back" do
       visit "/"
     end

   }
   @wrong1.click {
     clear
     para "Wrong!"
     image "http://icanhascheezburger.files.wordpress.com/2007/05/cheez_doing_it_wrong.jpg"
     button "Go Back" do
       visit "/"
     end
   }
   @wrong2.click {
     clear
     para "Wrong, your consolation prize is..."
     image "http://farm2.static.flickr.com/1166/1230713908_083d7f6c53_o.jpg",
     :width => 500
     button "Go Back" do
       visit "/"
     end
   }

 end  # this is the end of the index method, which lays out the "/" page

end # this is the end of the subclass, which contains all the pages (well, one page)

Shoes.app

I ended up teaching the class a much more simplified version. I think the initial session with two students worked well as a great approach to developing a lesson plan. I improved it even more in my live coding session where I built up the app in stages (with compile and demo between each of the steps below):

  1. Shoes app with para “Which is correct?”
  2. Add three buttons
  3. Add stack around the buttons
  4. Move the app into Game subclass, show that it has the same behavior
  5. Add ‘/correct’ url, button click action, and show_correct method
  6. Add ‘/wrong’ url, button click action, and show_correct method

Then a student asked how to ask another question if after someone got the right answer. I just made another url and added a button with a visit action to the show_correct method.

After the demonstration, I gave them a copy of the program for reference and told them not to copy it — they had to come up with their own questions and answers. Of course, then they typed in the whole program verbatim only substituting different editorial and ended up with dozens of syntax errors.  I wish I had instructed them to do it just like I had and build up their app in several steps, and I did tell them to do that, after they started, but at first they were somehow convinced that all they needed to do was type it in to complete the assignment. Another approach would be to get them to follow along with me and get the whole class to complete each step before moving on the the next; however, once they have their hands on the keyboard it is really hard to get their attention.  I also forgot to accidentally on-purpose type things wrong and demonstrate debugging.   In any case, the students were engaged and reported having fun, even if most did not finish the game.

Here’s my revised version of the app (improvements were to name the url and the method differently to make it clear that they were different things and to create just one “wrong” url and method to show reusing a method).

class Game < Shoes
  url '/',  :index
  url '/correct',  :show_correct
  url '/wrong',  :show_wrong

  def index
    clear
    para "Which is correct?"
    stack {
      @correct = button "A bed of clams" do
        visit "/correct"
      end 

      @wrong1 =button "A coalition of cheetahs" do
        visit "/wrong"
      end

      @wrong2 =button "A gulp of swallows"  do
        visit "/wrong"
      end
    }
  end  # this is the end of the index method, which lays out the "/" page

  def show_correct
    para "Correct"
  end  # of the "correct" method, which lays out the "/correct" page

  def show_wrong
    para "Sorry, try again."
  end  # of the "wrong" method, which lays out the "/wrong2" page

end # this is the end of the "Game" subclass, which contains all pages

Shoes.app 
Posted in general | 1 Comment

teaching kids to code: lesson #2

Report from the field on my ongoing adventure teaching Ruby and Shoes to a 4th/5th grade class of 28 students. Here’s a summary of last week’s class:

I started with a demonstration of red, green, blue color: 3 flashlights with colored gels over the front, mixing red + green to get yellow , then add blue to get white. I talked about how last week we made Shoes draw a colored rectangle on the screen. The screen is made up of lots of little dots. Does any one know what they are called? one hand, correct answer: pixels. Then I described how each pixel is a little light. A pixel was a single light in the old days when all monitors were black and white. Color screens, which are on most computers today, have pixels which each have three little lights. When we make colors on the computer, we are making colors with light, which is quite different than making colors with paint. Then we turned out all the lights and it got really fun.

I showed the flashlight with the blue gel covering the front and splashed a blue light on the ceiling. Then I took the cover off and showed how the flashlight emits white light, but it comes comes out blue when I put the blue gel over it. I asked them first what did they think happened that made a white light come out as a blue light when I put the blue plastic over the front of the flashlight? (lots of theories of magical color transformation and after a few tries, I supplied to correct answer which is that white light contains all of the colors and when it hits the blue plastic every color except blue bounces off and blue is the only color that gets through.)

When you mix red + green paint, what do you get? (several tries before one of them got the right answer: brown) I told them that light mixes differently than paint. We call mixing light “additive” and when you you add the colors together they get brighter, as opposed to subtractive color with paint where mixing them makes the colors darker. Then with the help of my two assistants we demonstrated color mixing with light (See on understanding rgb color for complete details.) It was way cool.

Then we moved on to the programming exercise which was about “computer generated art” making a loop with shapes that have random color, position and size. Fewer setup problems this time. I had 3 extra computers set up and still ended short one and ended up once again abandoning my idea of a coding demo yet again since I gave the “teacher” computer to a pair of students. I ended up writing code snippets on the board and spending more time with each group of 2-3 kids helping debug syntax errors and giving little impromptu explanations of what was going on.

I’m torn between how much time to spend explaining concepts (since they are always antsy to get onto the computers) and how much to let them wing it (which then is frustrating to them because they don’t know the rules. I would welcome suggestions from anyone on the right balance here. I suspect different people just learn differently, but what’s the best way to manage that in a classroom full of kids?

At the end of the class I asked them to raise hands to answer: who thought it was fun? (about 2/3s of the class) who thought it was frustrating? (maybe 40%) who thought it was fun even though it was frustrating (about 1/3). I really don’t know what impact these classes are having, but I will forge ahead nonetheless. The teacher seems to think the lessons are great and the kids report having more fun than it looks like they are having. I do feel like about half the class is starting to “get it.” Not sure if that is a lot or very few after 1.5 hours of programming experience.

I was still following my original lesson plan. Even though most of the kids haven’t gotten through the final exercise, I think I’ll switch it up next week to add some interactivity.

The Shoes list and whytheluckystiff himself have been very responsive in answering my technical questions, and everyone on those lists and Railsbridge have provided encouragement that really makes a difference.

Someone from the lists gave me the very awesome advice of training some of the kids to help with the lessons. I did this after school the day before the class with two of the fifth graders and it made a huge difference. They ran around and helped other kids debug their apps and I was freed up to spend more time on impromptu theory lessons and writing additional examples on the whiteboard. It was a great experience for the two TAs, and made the whole class more fun for me and the other kids.

Posted in general | Leave a comment

on understanding rgb color

Last week I wanted to teach the kids how to create a randomly colored shape, which (in Shoes) would use a fill color like this:

fill rgb(0..255.rand, 0..255.rand, 0..255.rand)

I figured they could easily grasp the random number syntax, but creating colors as a mix of red, green, and blue? They are used to primary colors of red, yellow and blue. It is totally weird that green and red make yellow, and downright amazing that red, green and blue make white. You have to be an old school graphics geek like me or someone who does stage lighting to have gained any intuition about how these kinds of colors mix. Most folks, elementary school students included, only have experience mixing colors with paint or dye, where red and green make brown. That is called “subtractive” color mixing. When we mix light (and pixel values), it is called additive color mixing.

To explain this, I put together a neat physical demonstration with the help of my friends, Paul & Glen, from Emotion Studios, and Janet from JCX Expendibles. (As a side note, I must say that if you live in San Francisco, enjoy this article and periodically need random materials for your crazy projects you must visit JCX on Harrison Street. It is awesome.)

My goal was to create three spots of color (red, green, and blue), then mix them to create white where they overlap. This looks much cooler in real life…

I ended up finding it could work using three Mini Maglight flashlights (about $14 each, which adds up but I figured I could use them for camping later). The front of each light is covered by a gel. I used the following colors from Lee Filters (the big sheets are $6 each, but I bet if you called them up they would send you a sampler). I used these colors:

  • Primary Green 139
  • Primary Red 106
  • Just Blue 079

I highly recommend this demonstration when teaching anyone about rgb color. This would even make a fun early physics experiment for first graders.

Posted in general | 3 Comments

wiki philosophy, reflections on the future

I enjoyed Ward Cunnigham’s video tour of his office “wiki space,” which is reconfigurable by the people who work there with all desks on rollers.  At the end he describes wiki as a phillosophy rather than the technology it is today… maybe wikis need to transform into something that will enable a community to develop software.

I’m seeing some trends that I expect will meet in the middle in the next twenty years or so.  Dynamic languages are becoming fast enough that they can be widely used for practical and sophisticated programming, most notably javascript and ruby.  The facility of these programming languages to enable fast development of applications is made even faster by the move toward open source — more often we can avoid rewriting the well-understood, and can focus on the innovative.  Additionally, web application are commonly publishing APIs that edge us closer to the semantic web that folks have been talking about since before HTTP was invented.

Today we’re seeing hints of what is to come with Yahoo Pipes, Dabble DB and the recently released Wolfram Alpha — these are tools that let you piece together disparate data sources to answer a question without developing a traditional software application. Brian Boyer writes about scholarships available to coders who want to go to jouralism school.  He notes that just recently, software won a Pulitzer Prize: PolitiFact is a form of news that could exist only recently.

Computers are only now getting fast enough and smart enough and interconnected enough so that we can use them as effective tools for gaining wisdom, not just collecting data.  It will take a while for such tools to become ubiquitous, and even longer for a generation to grow up who feels entitled to answers to their questions, and who are adept at using these tools that feel tangible, yet act like programming languages.  I love watching it happen.

Posted in general | Leave a comment