MIT female learning to code

14 points by Female-hacker ↗ HN
I'm currently a junior taking intro to computer science and programming. After working on my first startup and realizing how slow my programmers were, I decided I'd be better off learning to program.

Class is good right now but I want to learn more.

My question: What is the best literature for beginners that I can get my hands on? Beneficial websites? I've only played with python so far...what else do you recommend?

Thank You

41 comments

[ 3.0 ms ] story [ 88.6 ms ] thread
For hands-on practice, try this: http://projecteuler.net/ An HN-er recommended this in an article last night.

Also, as ugly and difficult as it will seem at first, invest the time to learn how to use an efficient text editor. I prefer vim.

Thank you for your response. I'll check it out.
Text editor preference seems to be as personal (and perhaps, perverse) as religion or sexual preference.

Last Monday I got the chance to ask (even though I'd read it before) James Gosling (the Father of Java, wrote first Emacs-y editor for Unix) if he still uses emacs, at least sometimes. The answer was: No. He uses NetBeans. Seems he writes no more lisp, having worked through his lifetime's quota of parentheses while working on his Ph.D [sic].

The only way to learn how to program is to just do it. Pick a language. Start with small programs. Learn the features and syntax of the language. When you feel you know the language well enough to write a program that uses most of its features, then pick an open source program and learn its code. Make some modifications to it. When you feel you're pretty comfortable in one language, pick a new language.

Rinse repeat. You'll find that once you have one language down, the process will go much faster with the second. The features and syntax of most languages are pretty similar.

You can pick any language you like to start with, but personally I'd recommend starting with a hard typed compiled language rather than a dynamic language. Dynamic languages are easy to learn, but its easy to be a lazy and bad programmer in them. They let you get away with too much. Hard typed compiled languages are a) much better at catching your errors and b) much harder to be a lazy programmer in. They don't let you get away with things nearly as much.

I'd recommend Java, seems to be the language a lot of people start with. It will also give you a good founding in open source programming. I started with C/C++ and I'm glad I did. But that was more of a challenge - had to learn pointers and memory management in my first language. And after that I took a little while to learn the open source mindset, since I'd started in a procedural language.

Once you have a good grasp of an object oriented language like Java (or Python) and what object oriented programming means, then I'd recommend reading the Gang of Four book on Design Patterns (http://www.amazon.com/Design-Patterns-Elements-Reusable-Obje...) and Martin Fowler's book on Refactoring (http://www.amazon.com/Refactoring-Improving-Design-Existing-...). Those will give you a pretty good basis in software design and maintenance.

In terms of recommended reading for learning a language, the O'Reilly books are nearly always good in my experience. Here's one for Java (Learning Java: http://www.amazon.com/Learning-Java-Patrick-Niemeyer/dp/0596...) and here's one for Python (Learning Python: http://www.amazon.com/Learning-Python-Powerful-Object-Orient...)

Amazing. No Google search led me to an answer this helpful. Thank you for your input on languages also...it seems there is quite a debate between Java and Python.
Python's a good language, but it's a soft-typed interpreted language. Which means it will let you get away with certain things.

It is also has some differences in syntax from a lot of other languages that might give you some trouble when you switch. C/C++, Java, PHP, Perl, Javascript and many other languages share a lot of common syntax. Python's still really similar, but it deviates in some key ways.

It also tends to have really hard core adherents who will swear by it above and over anything else, which is why there is something of a debate. It really doesn't matter that much what language you start with.

One of the keys to being a good programmer is knowing your toolbox. And that includes knowing multiple languages. The best programmers don't have one favorite language. Rather they have a toolbox of a half a dozen or more, and they pick the best language for the task at hand.

"...it will let you get away with certain things..."

...like reading what she just typed in? Yes. Python will let her "get away" with reading her code. ;-)

Here's a link to the Beginners Guide to Python...

http://wiki.python.org/moin/BeginnersGuide

I disagree with starting with Java. Rather I second coffeemug's advice in the following comment, focus on C, Lisp, and Haskell:

http://news.ycombinator.com/item?id=1747713

My first manager taught me something college had failed to (or that I failed to learn there), which is that programming languages come and go in trends, but they are all based on recurring fundamental concepts, which endure beyond any single language.

Most new programming languages are a remix or mashup of some or all of these concepts, so if you master those concepts you'll be able to easily pick up any other language.

It's like learning Latin as your first foreign language, and being able to quickly pick up any Latin-based language after that. C, Lisp, and Haskell are the Latin of the CS world.

Since you're at MIT, take the famous Structure & Interpretation of Computer Programs (used to be 6.001, not sure if it still is). http://groups.csail.mit.edu/mac/classes/6.001/abelson-sussma.... That'll get you started with Lisp (specifically the Scheme dialect).

For C, start with K&R (http://en.wikipedia.org/wiki/The_C_Programming_Language_(boo...).

For Haskell, Real World Haskell is good, and the e-version is free. (http://book.realworldhaskell.org/)

Joel Spolsky has an article worth reading on why not Java:

http://www.joelonsoftware.com/articles/ThePerilsofJavaSchool...

And of course PG's essays on Lisp are a must read:

http://www.paulgraham.com/lisp.html

Since it sounds like you're running a business you may feel pressured to learn Java or whatever your coders are currently using to get your business off the ground. But I heartily recommend resisting that pressure, doing it right, and mastering the enduring fundamentals first. It may cost you something in immediacy and expedience, but that's what school is for, especially one such as MIT. You should carefully weigh how you spend your time there, and unless you think you've got the next Facebook, focus on mastering the enduring concepts, not the trends. You'll be glad you did the rest of your life and career.

PS - there's little to nothing that Clojure (a Lisp dialect on the JVM) and Haskell can't do in the web space, so the cost in immediacy and expedience is slim to none anyway.

PPS - it didn't register till just now that you're an Econ Major not going into CS or Software Engineering as a career. If you just want a tried-and-true, versatile, easy-to-get-started-with language with tons of libraries and frameworks (reusable code) to hack in, huge and helpful community go with Python. Java is too bureaucratic a language for this purpose.

Start with Zed Shaw's excellent introduction, Learn Python the Hard Way (hard way = by doing lots of follow-along examples until it gets into your brain muscle memory), then go from there.

http://learnpythonthehardway.org/index

Seems like you were starved for attention and couldn't answer your own questions, so you decided to waive your female bait, twice, to see if you can sucker any of the dorks into helping you with your homework.

Congrats on nailing two suckers so far!!!111oneoneone~~

A (supposedly) smart (MIT) girl like you should already know all the programming (manipulation) instruction you need can be found in the pages of Cosmo.

You're probably an overweight male sitting in his dirty underware thinking he can socially engineer HN. If so, you're pathetic, but if not, you're still pathetic.

so much for my karma...

Well aren't you lovely. A starved for attention (supposedly) smart (MIT) girl? Overweight pathetic "Cosmo" reading male? Please make up your mind.

Or..I'm an Econ major taking my FIRST course in computer science with ZERO background experience in this space at all. I'm looking for advice and guidance as a humble beginner.

If you were looking for literature and daily publications on Austrian Economics or other heterodox schools of economic thought, I would have a list to give you.. I'm just looking for the equivalent in programming.

Sheesh, there's one in every thread...

Thanks for starting this topic, ladydude. I've been looking for the same sort of advice/extracurricular materials, myself.

This one's on my wishlist. As in, I wish I had the time/cognitive tenacity to read it: http://www.amazon.com/Computer-Programming-Volumes-1-4A-Boxe...

(Fuck my karma, but I just need to say this) I just hated how he presented the point. But that does not change the fact that leading the question with her gender and institute is actually pathetic. Have you ever seen a post like "Male Stanford philosophy major wants to learn neural networks"?

This is what I don't get about women, they rally for women empowerment, equal rights and this and that, then you go about flaunting your female charm (not specifically talking about the thread).

That's a silly thing to say, not all women rally for women empowerment and not all women go about flaunting their female charm (whatever you may mean by that).

What I'm trying to get at - there's no point looking for contradictions in a group that doesn't abide by a single idealism. Now if the OP tells you that equal treatment is of the foremost importance to her, then feel free to rub the contradiction in her username in her face.

It would be awesome if you could post that eco-related list someplace. I am a programmer who's always struggled with that stuff.

If you do post such list, please let me know.

Definitely give C and Scheme a try. Both are simple, compact languages with strong philosophy and history. I think that most of the languages we have today compromise between C style and Lisp style.

One of my favourite books is called, "Write Great Code: Volume 1: Understanding the Machine". This book gave me a real intuition for why the computer behaves the way it does given a piece of code. If like that kind of stuff, you might also take compiler design to see what happens on the low level.

On the higher level, "Code Complete" is a classic. Once you've started, the "Dive Into" series is pretty good for picking up more languages.

I think the best way to really learn a language is to do something weird with it. I once tried to use Python in as purely functional a style as it would allow. I got far better at C by learning GPGPU and CUDA. I learned the motivations for C++ by implementing vtables in C. Doing odd things that push the limits of a language can reveal deep truths about how the pieces really fit together.

Is there a benefit to learning multiple languages? Or would you recommend trying to truly "master" one of the starting (Java or Python) and then branching out after completely comfortable in one? Should I learn them in a specific order?

I just picked up Code Complete at the lib today but will start with "Write Great Code" as you suggested. Thanks!

if you are a manager or business owner (which it sounds like you are? "my programmers") a broad but shallow education may serve you better than one that is deep but narrow.

Even if you do decide to focus primarily on one language, I think there is a lot of value to learning several languages. (also, after your second or third, picking up another becomes really easy.)

Also +1 on "Code Complete"

I'd advise branching out in the beginning. I learned too much Java in the beginning and wish I'd tried Python earlier. I also think that some languages (especially Lisp) will teach you things about other languages.
I think doing odd things that push the boundaries of a language is a great way to become a great programmer, but isn't something to try when you are just learning your first language. That's someone you do once you understand where those boundaries are.
What makes you think your (wow) programmers are slow? Are they inexperienced, like yourself? They may be poorly guided or have no clear definition of goals. Or a lot of other things.

But by all means, get a hold of a compiler and a text editor. You don't need no literature. Yet.

(comment deleted)
Not necessarily. What worked for me will probably (definitely) not work for you. Especially since you don't mention:

a) any short- or long-term goals of yours b) any preference on language, or what language(s) your project is using c) any preference on teaching style, or even habits

If you did, I might be able to relate, or even suggest something. But any advice basically boils down to getting a basic development environment going, and learn by trial and error.

Not sure what is the nature of your startup. But if you are building;

1. Web-based App Decide on the programming language, the more popular languages are Java, PHP, Python, Rails, etc. Start by going through their Getting Started guide and make the 'Hello World' app. Once you are familiar with the programming language, seek out the related framework. Most of these web-based application already have a few established framework to help you speed up the development work.

2. iPhone App/Android App Start going through the iOS SDK 4 docs or start by going through the Android SDK Dev Guide. I am still going through these myself. Can't provide more details here. Maybe the more experienced folks can chip in a bit.

These will get you started on the programming part. But working in a startup, you probably need to work as a team. So you will need to know a bit of the tools used in a team environment; version control tools like SVN or CVS, testing tools like junit, grinder, hudson, etc. The number of tools really depends on how your startup operate. The real way to get an idea what you will need is to Contribute To An Open Source Project; help to code, test, etc. Nothing beat experience gain from there.. Wish someone told me that when I was started out, then I won't have unlearn all my mistakes.

Save the websites for after you graduate -- right now, take advantage of the resources available to you as an MIT student. See if you can get some real-life experience with a UROP. Ask your CS professors (or even TAs) questions during their office hours. Go to some SIPB events.
What do you mean by "how slow my programmers were?"

Three possibilities:

-- Possibly good or bad programmers, but slow as you imply

-- Good programmers, taking their time to build the system properly by writing unit tests and functional tests

-- Possibly good or bad programmers, but hindered by legacy code and/or a lack of tests for previous code

Communication was poor and they (two grad students) could only commit a few hours per week...more than anything it ignited an interest to learn that of which I knew nothing about.
Do something you enjoy. Personally I learnt to program because I wanted to know how computer graphics worked, that led to games and eventually a career. Some things I think are fun to play with:

* Logo / turtle graphics (Python has this built in IIRC)

* Fractals, random generation (Mandelbrot blows my mind)

* Learning how games were made (E.g. http://www.bluesnews.com/abrash/)

* Old style graphics engines (SDL, Allegro etc)

* JavaScript / HTML (E.g. a recent experiment: http://www.dpod.com/Canvas/02/)

* Exploring new languages (Scheme, Python, Assembly... recently Clojure)

As you can see some of this is new, some old, some useful, some just interesting. Explore, enjoy, learn programming as a side effect!

Your query and responses seem earnest, but leading with your gender in the submission title and handle is suspicious. Is this an A/B test?
I don't think it's suspicious, it's just very sad (to me, I mean). The OP says they are an economics major - they probably would never think to post a question on economics entitles "MIT female economist seeks OECD data".

sigh

Anyway as to the question, the best way of learning to code is (a) by doing and (b) by exposing yourself to those who do it well. If you have your own project to work on already that's great, otherwise find an open source project and cut your teeth onto that. Most languages have standard libraries or modules, take a look under the hood and try to understand how they work. Since you specifically ask for websites, try hanging out on stackoverflow.com and try and answer some questions before looking at the answers.

Contrary to others, I probably wouldn't recommend C - please let's not start a language war, but for someone who may or may not decide to focus on programming it's probably better to focus on a higher level language like perl, python or ruby in the beginning.

Also, I don't know if/how MIT supports co-ops/internships, but try and get a short (3-4 month) programming placement, there's nothing like having to do it "for real".

Choose something you feel needs to be created/invented, and do it in the language you want to learn. This is a time tested methodology, why follow line for line a movie rental service for BlockMuster when you can have fun and learn more doing your own project.

Get creative, get inventive and just jump in.

How can you judge the speed of "your"[1] programmers if you know nothing about programming?

Are you perhaps being misled by the frequent "I did X in a weekend" submissions? Those are mostly hyperbole.

[1] A little word of advice: Don't talk like a manager already. If your story is legit, the two grad students are quite likely to read it here.

I recommend you start a side project of your own and learn by doing. start small, maybe some extra tools for your blog or a simple widget you've been wanting for your desktop. python is a good intro language, you'll find it useful for a wide variety of projects and can go lower level for your next language
On campus, you'll find that tons of people know python. Use this to your advantage.
Try Scratch! http://scratch.mit.edu/

Saw a great demonstration of this system at JAOO this year, by John Maloney of the MIT Media Lab :) [http://gotocon.com/aarhus-2010/speaker/John+Maloney]. Dan Ingalls and Rob Pike were in the audience.

The whole system really looks very nice and well thought out. Wish I had Scratch to learn with when I was young, instead of puttering around with Turbo C++ 3.0. Few "real", "man-size" programming languages/environments are so coherent.

If you want to be productive soon, try Scala. Martin Odersky (the creator) is a brilliant, level headed guy who is committed to keeping this language pragmatic. It's complex, but just like C++, you don't have to inhale the whole thing in one go to get things done :) So don't worry about all the people with blogs who denounce Scala for complexity.

stick with python, you're starting off in a great direction.

the best thing is to come up with an idea for a web application and start trying to build it. that'll help you formulate the questions that'll lead you to the online resources you need.

you can also pick an existing web site to make a simple copy of.

or pick an open source project to dive into and try to understand (e.g. an online forum or blog app)

Realise that you will never be as good as some other people. Then act like this is the case; follow those that are excellent coders; read what they write about and read their code. Emulate.

Don't just pick the easy route when you have to solve a problem, try to pick the 'best' way and see if you can follow through. That is the way you learn.

i´d say this strongly depends on what language you want to proram and which software you wanna write. a very good basis (though not really programming) is html and css. these languages are the basis for many software related projects. and for the "real" programming thing it´s very important to learn the principles of object oriented programming. (the language is rather unimportant for this). and to get an understanding what this object oriented thing is all about i recommend you diving into the model view controller (mvc) architecture, which is a way of organizing code using classes,... if you start learning those things you got something to do for a while :) have fun
This question has been asked so many times, on so many different programming forums. The only reason this is getting any traction is "MIT female"... ugh.

EDIT: I should add that we are definitely a welcoming bunch, but I'd try starting over with a new username that doesn't loudly announce your gender. It's not the fact that you're female, it's the fact that you're announcing you're female, as if to imply that you should be treated differently because of it. Apologies if this sounds harsh.

What? If you're at MIT everyone there belongs to the cult of the lambda calculus. The /only/ answer to that question for MIT kids is SICP.
Programming can take awhile sometimes, especially when you're working without a spec and have to figure out all the details as you go along. Don't expect to be able to crank out new programs every day, unless you want to be cranking out horrible crap, and there's no need for any more of that. Learn C, C++, Java, PHP, Rails (if you want to do a lot of web apps), and Objective-C. Here's a link to a great list of books on a diverse range of subjects, including top programming books in a variety of languages: http://news.ycombinator.com/item?id=1755422 Good luck