Programming is Easy (part 1)

Check out this great call to programming for women, minorities, and everyone by one of our esteemed Hamptons Hackers, Marianne Bellotti @fspublishing. 


Recipe for discussion about diversity in Tech: take one historically disenfranchised group, pull statistics on number of CS or engineer majors for said group, season to taste with calls for 1) more money 2) more formal education 3) thinly veiled accusations of discrimination in the Tech establishment.

Shake well.

And it might very well be true that if there were more formal programs and more money specifically for women and minorities we might actually have a tech industry that is not almost entirely homogenous. It might be true that if we had more girls receiving formal instruction in programming, we’d have more women programmers and a stronger technical presence in the startup scene. There might be some truth to starting girls young to cultivate life long love of tech.

On the other hand, the emphasis on formal education says to millions of women who want to get into tech but are past their college years that they’ve missed their shot. It reenforces the notion that writing code takes years of study in math and sciences. It sets people up for failure by making them think only super geniuses can teach themselves.

And that is definitely dead wrong. Programming is easy, everyone should do it.

 

Lots of Programmers Suck at Math

Here’s what you need to know in order to be able to program. You need to understand basic arithmetic (addition, subtraction, multiplication, division) and you need to be able to read on a 5th grade level. Everything else is just vocabulary and experience.

Granted there are many specializations in tech where an engineering degree will serve you well, but when it comes to building apps, websites and even full blown downloadable programs you can skip the refresher in multivariable calculus, because you won’t need it.

I’ve never taken a computer science class, and you know what? I’m not alone. The Tech industry is filled with former Art History majors and on the lam marketing professionals. Teenagers routinely hang a digital shingle out on the internet and start freelancing before they can drive. We can’t all be geniuses.

There Are Only Two Type of Code: Code that Works and Code That Doesn’t

Getting started is scary. You ask programmers for advice and get all these confusing answers about ‘scalability’, ‘security’, and ‘elegance’. One programmer will swear by one language, another programmer will gasp in horror and tell you anything written in that language is sure to be taken over by Russian hackers and used to spread destruction across the internet.

One of the most important skills a would-be programmer can develop is mentally removing 90% of the superlatives and snobbery that overload the opinions of other programmers. Passionate programmers will spew long rants about compiled -vs- interpreted code the same way musicians will spew long rants about the merits of vinyl -vs- digital. The trick is being able to figure out when a controversy is a serious issue and when it’s mostly show.

Is clean, elegant, scalable code important? Yes. Is it something that you need to worry about right now? Probably not. Cleanness, elegance and scalability become concerns when your project grows. If you have millions of people using the same website at once you want to make sure that you’re not wasting resources asking the computer to do repetitive or unnecessary tasks. If you’re working in a team you want to make sure other people can read and make sense of what your code does.

There are people who believe that enforcing standards of clean code from the beginning will instill career long good programming habits. They might have a point there, but you wouldn’t criticize a child for not using MLA style on his “What I did on my summer vacation” essay … so I don’t really believe as new programmers you should stress out about all the conflicting opinions on code style.

Don’t be intimidated by programmer rants. Try to absorb as much as you can, keep them in the back of your mind as considerations to be mindful of, but don’t freak out. In the beginning your code will be sloppy; it will be flawed; you will probably write twenty lines of code to do what could be done in two. That’s part of the learning process.

Picking Your First Language

Every language when written well can be scalable, clean and elegant. Every language when written poorly can be a nightmare. The secret about picking your first language is finding the right fit for you and your learning style. Each language has its own community and its own network of learning resources.

If you are the type of person who learns by doing and experimenting, PHP is your best bet. Although PHP and its main rival Ruby were first released around the same time, Ruby didn’t start gaining traction until 2005. Almost two decades of being the top dog among web programming languages means there is a free PHP example for just about anything you might want to do waiting to be downloaded and played with.

Where to start: Zend PHP for an Absolute Beginner

If you are the type of person who learns best from books, Python or Ruby might be a good fit. These languages are structured to be pretty easy to read and understand for beginners. There’s also not a big difference between the code samples written in books and code that people actually use, which cannot always be said for PHP

Where to start: How to Think Like A Computer Scientist  (for Python, older editions can be downloaded for free)

TryRuby followed by Why’s (Poignant) Guide to Ruby

If you are a person that demands instant gratification: check out Javascript. Although it started out as a language that gave us everything truly annoying on the web (pop-up ads, flashing text, ugh…) it has since grown into a very powerful and versatile language. Best of all there is nothing to set up in order to use it. Unlike PHP and Ruby which require a server environment, javascript is run by your web browser.

Where to start: Eloquent Javascript or Simply Javascript

Another thing to consider is what you actually want to do with your new language. Python can be used both on the web and as a stand alone application people can download and run on their computers. Javascript and HTML are quickly finding a new niche in building mobile apps that work on all smart phones. PHP and Ruby are like the programming version of Marsha and Jan Brady— always competing, always complaining that the other gets more attention— but both are good languages for websites that need to store and access data.

Deciding On Your First Program

Once you’ve found a language you want to play with the big question becomes: what do I build? I always find the example projects in programming books incredibly boring. I don’t want to write a program someone has already written! I want to do something cool and unique. Probably you’re like me: you’ve come to programming with a specific dream you want to build. You don’t want to spend hours building a boring old calendar or a customer order system.

Yet it’s easy to make a stupid mistake when your project is ambitious, so you want to find smaller projects where if you write a bit of insecure or resource-hungry code it isn’t the end of the world.

Here are some good first projects:

  • Web bots: Bots are tiny programs (or scripts) that can be written in virtually any web language. They access websites, capture some data and do something with it. Twitter is the best place to start because the web is filled with excellent Twitter bots tutorials, just google.
  • Fun With APIs: Requesting something from an API is as simple as typing in a URL. Most APIs have a few read-only functions that don’t require a developer’s key or any complicated authentication. For example typing in http://fspublishing.tumblr.com/api/read will pull up all the blog posts for F.S. Publishing via Tumblr’s API. With a few good APIs it’s easy to build one page data mash ups. Check out Programmable Web  for listings and documentation.
  • Video games: The nice thing about getting started with a game is that it can be as simple or as complicated as you feel comfortable with. Python developers should check out Ren’Py specifically. This tool for building visual novels is written entirely in Python and produces games entirely in Python. It’s incredibly easy to hack and has a whole community of game makers building new features for it.

Make Your Life Easier

Now that you’ve gotten started you need resources to handle the angst of things not working the way you expect them to (it will happen). Here are some of my favorite tools.

Stack Overflow every problem you could possibly have some one has asked about on Stack Overflow and gotten a whole slew of helpful answers.

JsFiddle for testing and fine tuning javascript code.

CodePad

TextMate

CSSEdit for the moments when CSS wants to make me cry.

A side-by-side reference sheet for scripting languages: PHP, Perl, Python and Ruby

Recommended Reading

Still not enough to get you started? Here are some more books that come highly recommended

Learn Python the Hard Way by Zed Shaw

JavaScript: the Good Parts

Intro to Programming with Ruby by Pragmatic Programmers

Marianne Bellotti is founder of F.S. Publishing and a self-taught programmer. During coding-breaks she naps through episodes of House Hunters International.

72 Responses to “Programming is Easy (part 1)”

  1. hotels frankfurt oder

    hotels frankfurt oder…

    You made various nice points there. I did a search on the matter and found a good number of people will agree with your blog….

×

Comments are closed.