learn2code
Slides from "Hacker 101/102" code4lib pre-conference
Monday I gave a whole-day pre-conference at code4lib 2010 in Asheville called "Hacker 101/102" and "Hacker 201/202". The morning ("Hacker 101/102") seemed to go well - the thirty or so people who attended seemed to move smoothly through the material, asked a lot of great questions, and offered a lot of positive feedback. Here are the slides (also attached as a pdf) from that part, which give a full tour of basic programming concepts using Processing:
Hacker 101 - Intro w/Processing
View more presentations from Dan Chudnov.
The afternoon session ("Hacker 201/202") started off poorly, as I'd not figured out the "what platform can we use to move a little further with this stuff" problem and we all stumbled around trying to get some stuff going on our desktops. Fortunately Mark Matienzo was there to give a tour of pymarc and Mike Giarlo was there to fix my crappy example code and many other people helped each other out when I was fumbling. The latter part of the afternoon was saved by dropping the "let's get this working" bit and instead opening discussion up to why unit testing is a good idea, with a tour of how pymarc unit testing works, and a walkthrough of the Kohana web framework by Eric Palmitesta and a similar discussion of what Django offers from me.
Surprisingly the room didn't empty in the afternoon, and I'm just sorry that I hadn't thought things through better. Running into problems getting language libraries installed and running on diverse platforms is, in a way, the kind of stuff that all of us deal with all the time, even very experienced folks. So it was kind of natural that that would happen. Unfortunately running into that kind of frustration is the kind of stuff that keeps newer developers from progressing past the basics, and before I attempt a session like that again I'd prefer to have a radically different strategy that builds up confidence in a more controlled way. I just don't know what that is yet. I hope that at least it was reassuring to the 50 or so attendees in the afternoon session that this kind of crap does really happen to all of us and the first thing you have to be willing to do is stop beating your head against the wall and ask somebody else for help. Many participants did exactly that and made progress getting things going, so I hope that small set of victories will help in some way.
In any case I'd like to think the morning was a full success and I'd like to give a Hacker 101/102 pre-conference session again for sure. We still have the list we set up for the pre-conf and I hope participants will share their thoughts on how it all went here or on the list. I also hope that everyone will consider asking for help when getting stuck on whatever folks get stuck on back at our regular jobs, either on the preconf list or on the code4lib list or whatever forum might be appropriate.
What questions do you have about learning programming?
In the spirit of nanowrimo I'm going to jumpstart writing a book today. The goal of the book is to help librarians learn how to program. I've talked with many people about this and don't know if I'm up for the task but it's time to give it a go or stop dreaming about it.
I have some thoughts about where to start and what ground to cover but I want to be sure it answers many typical questions new coders have along the way. I also hope to develop the text online as I go, using comments, questions, and suggestions for improvements as they come in to help ensure that the book addresses its readers' needs usefully.
So we might as well start now. What questions do you have about learning to code? What goals would you want to achieve by learning? What specific problems are you unable to solve on your own now that you might be able to solve on your own eventually if you had the right kind of support along the way?
There are many options available for doing this kind of thing online but I want to start by keeping it simple. Post your questions here in the comments, hit me @dchud on Twitter, over email, phone, in person, or whatever works for you.
Please let me know what you think and we'll see where it goes. Thanks!
learn2code lesson 1 - getting started
Welcome to my new project: learn2code!
In my 13ish years as a librarian I've met a lot of people who either wish they knew how to code or were somehow convinced they couldn't learn. The thing is, though, it's easier than ever before to learn programming, and there are more benefits than ever before in a librarian's professional life to know more about coding. Rather than spending any more time being frustrated about it, I figure maybe I should just help people learn.
The great thing is, now we have Processing. Processing is a programming environment created by artists and programmers to do programmable art. It's also fun, easy to get started with, and a really good way to get comfortable with the ideas behind and processes for writing code. I'm no expert in Processing, but I really enjoy using it, and I think you can too.
Everybody can learn to code, even if you're a complete beginner. Here's one way to get started.
learn2code - lesson 1 - getting started from Dan Chudnov on Vimeo.
A few quick notes:
- I've never done video production before. There's a lot to learn! Sorry about the rough edges (especially the sound). I'll get better after more practice.
- The first step is to download Processing. Get the right version for your computer, and install it. When you're done installing it, there should be a "Processing 0135" folder, and inside of that is the application "Processing 0135". That's what you run to get started!
-
In this lesson, you'll learn:
- How to write a program, run it, and stop it
- Setting up the display window and its grid with size()
- Drawing shapes with point(), line(), rect(), and ellipse()
- How to save your sketch code
- How to save your sketched image with save()
- Save your sketch to a location you'll remember. That'll create a folder and a file inside that with a name ending with ".pde". This means "Processing code", and it's just a text file.
- Then the filename you give to save() will be the name of the file that contains your image, which will be in the same directory as your .pde file.
- The code for my self-portrait is attached to this post. You can try my code for yourself if you want.
- My wife (a cataloger, and not a coder - yet!) watched this and then coded up her own face very quickly. It was totally different from and much better than mine!
- Questions or comments? Leave them here, or on the video at vimeo.com.
Give it a try for yourself. Watch it all once, then try it on your own, or watch a little and try everything yourself as you go, or whatever works for you.
When you're done, upload the picture to a site so the rest of us can see it! If you use a public image sharing site, tag your photo with both "learn2code" and "learn2codel1" so we can filter it into a big stream of photos and admire each others' work. Here are tag links for flickr:
I hope you enjoy this, and remember, this is only the start! Much more to follow. If you get tired of waiting, I'd recommend you look around the processing.org site to learn more about the cool things other people are doing with Processing.
Recent comments
12 weeks 6 days ago
14 weeks 1 day ago
24 weeks 4 days ago
24 weeks 4 days ago
25 weeks 4 days ago
26 weeks 4 days ago
26 weeks 5 days ago
26 weeks 6 days ago
27 weeks 7 hours ago
30 weeks 1 day ago