How to find the best names: an intro to python (December 3, 7:30-10pm)

Description
In this workshop we will learn
the basics of python by coding a program that will figure out awesome names for new babies or characters for a book/movie/game.We will use python, since it’s an easy programming language to learn, works well on most computers, and can be used for many different things. We will learn how to easily extract information from large data files, and combine it into useful information. In the process we will learn about some useful data structures in python: lists, sets and dictionaries.

Background
We recently had babies, and coming up with names for them was very complicated. My spouse is French, I am from Mexico, and we live in english-speaking Canada; ideally we wanted something that would work in all three languages. It’s easy to find long lists of names for practically any language, so all we needed to do was find a way to find the names that worked best in french, english, and spanish. Figuring out what exactly is “works best” is the fun part.

Bonus
If time permits, we will also look for cabalistic properties in the names (convert name to numbers: A-1, B-2,…), like checking which names are prime numbers, how far into the decimals of Pi can you find the name,
etc.

Who
This is an intro to coding course, so anyone is welcome, particularly if you’ve never coded and want to learn. Join us. People younger than 16 will need to bring a guardian.

When
December 3, 2015, from 7:30 to 10pm at the Vancouver Hackspace.

Requirements
We need everyone to have a laptop with python (and ipython) installed. The easiest way is to download the free version of Canopy on a Windows, Mac, or Linux computer (I’m not sure if it works on ChromeOS). I have a couple of laptops I can lend if anyone has trouble finding one. A donation of $5 for VHS members and $10 for non members is recommended. 100% of donations will go the hackspace.

Sign up here: Coding for everyday life Tickets, Thu, Dec 3, 2015 at 7:30 PM | Eventbrite

4 Likes

Sounds like an amazing workshop.
Is there a facebook link for this workshop? Would you like me to create one?

I’m not very good with facebook, but sure, go ahead!

Done: How to find the best names: an intro to python
I will PM you directly if any questions come in via Facebook.

For anybody planning to come tomorrow to the python workshop, the plan is
to work on the name-finder project, and along the way learn some of the ins
and outs of python. It’s not going to be exhaustive by any means, or even a
full introduction, I hope to give you guys a taste of the kind of things
you can do in python (and programming in general), and how to go about it.

It would be great if we could minimize faff at the beginning, please try to
have a laptop with python installed ahead of time, ideally via the
suggested canopy package (the free version). Bandwidth at VHS can be a
precious resource, and it’s a relatively heavy package. It should be a one
click install, but if you have any issues please email me (rozada@gmail.com)

1 Like

Could this be put onto the google calendar?

Remember to take a group picture at the end of this workshop.
Thank you for running this workshop, I hope it goes we well.

Postmortem:

Starting up
It took us a bit of time to get the laptops of the people that showed up up and running. Unfortunately nobody read my too long message which had a link at the bottom on how to install ipython, so it took us a bit of time to set it up. We were three people and of course there was one linux, one mac, and one windows.
The projector worked well, I came prepared with an old thinkpad. We couldn’t turn off the lights as it shuts half of the space, I thought about climbing up to remove the lights but the text was quite readable on the screen.

Content
I struggled to prepare a proper presentation because I wasn’t sure how much experience people would have coming in, the workshop would have worked with total beginners, but it turned out both people had at least some experience in other languages. I ended up doing a lot of live coding, which is a bit sketchy and sucks getting stuck in front of other people, but it went surprisingly well. By around 9:30 I thought they were a bit saturated so I offered to stop there, but they were super keen and we kept on going until close to 11.
The actual material I covered was what are and when to use lists, sets, and dictionaries, as well as for loops and if statements.

Stuff we learned
We played with long lists of names, turned each name into numbers (a=1, b=2, etc), and then looked for the names that showed up in the decimals of pi, and found the ones that appear closest to the start.
The winning names (for names at least 4 letters long) were Hiedi and Chad. Really Chad.
We also looked at the 3 letter prefixes that have the most names, ‘MAR’ won by a lot.

Stuff I learned
I started the workshop introducing concepts from scratch (this is a list, etc), it was boring as hell. It was much more efficient to run a bit of code that did something fun, and from there discuss lists/sets, etc. I learned that live coding is ok as long as I stick to chunks of 3 lines of code at most. I also learned that nobody reads the workshop requirements, so I’ll have to rethink my approach for next time, and try to find something more straightforward.

Feedback from the people that attended
When asked about what they would be interested in doing with code, the common theme was web scraping, or data mining which sounds cooler. A workshop on how to run code that checks amazon or kayak for the price of something every few minutes and alerts you if it drops beyond some threshold would be pretty popular I think. Or one on how to use APIs, and some cool APIs to play with. I’d take it…

I gathered the code we ran in the workshop and put it up on github with the rest of the material here:

edit: I forgot to take a picture, it would have been cool, thanks for the suggestion funvill. Every few minutes they would look at me funny and ask me if the space was burning down. I guess I don’t notice those things anymore.

1 Like

That’s awesome. Python is a pretty great language for data manipulation.

For web scraping, I’ve seen a couple places (including @rsim) mention
BeautifulSoup. I haven’t had a chance to use it yet, but it looks like a
great, well-thought-out library.

For installation, @funvill has noted that most people don’t install the
prereqs before arriving, too. He’s suggested putting everything on a public
Google Drive folder for small files, or handing out flashdrives for larger
files. Seems legit.

Totally awesome that everyone opted to stay late, that means you’re doing
good :slight_smile: