Help me OWN this shiny box.
May 2, 2010 6:37 AM   Subscribe

I want to become a little more badass at using my computer and dip my toes into the command line and eventually a little programming. I've identified some benchmarks / goals. Any advice on how to start?

I am a moderately advanced computer user and have enough knowledge to be able to accomplish basic things with HTML and CSS, but I have no programming knowledge. I can usually (by trial and error) make Wordpress do what I want and I am the default tech support for my friends and family when they have computer problems.

Having said that there are a number of additional skills that I would like to learn. There seems to be a consensus in other askmefi posts that python is a great first language to start with but I’m not sure that jumping right in to learning python is the appropriate place for me to start. I’ve outlined some learning goals for myself based on practical tasks that would make my life easier. They are:

1. Become proficient with regular expressions and text wrangling.
2. Learn how to use the command line on OS X (no idea what I’m doing in there at all)
3. Understand how to create and use simple databases (preferably open source over proprietary)
4. Learn some programing language well enough to write “data scraping” programs to create local databases of info found on the web. (Like the Sunlight Foundation does with its data scraping projects)
5. Eventually become proficient enough with programming to be able to interface with popular internet API’s (Google, Facebook, twitter etc)

These items are roughly in order of what I want to learn, but I am flexible. Ideally I would like to identify a few good resources and a clear path to build up this knowledge base and VERY slowly chip away at it, perhaps conquering one tiny task every day between other work projects.

Any guidance? Any recommended resources?
posted by jlowen to Computers & Internet (13 answers total) 34 users marked this as a favorite
For regex, this is what I've been recommended and recommended to others. Trying to learn regular expressions in one big block is liable to put you at major risk of a brain implosion though. I'd suggest just learning the very basics, and then expanding your knowledge as and when you need to.
posted by muteh at 6:55 AM on May 2, 2010

I'm a fan of this website/book, which walks you through an introduction to Python with game creation in mind. It's sort of geared toward kids, but still totally worth checking out as a beginner.
posted by Menthol at 7:01 AM on May 2, 2010 [3 favorites]

Best answer: If you already know HTML and CSS you might want to start with Javascript. You'll be working in an environment you're familiar with and you don't have to learn any new programs, just use whatever text editor you're doing your HTML with and go. It would work perfectly well for learning the basics like loops, functions, and string manipulation.

You can move on to python once you get those down. It shouldn't take too long.

For trying out regexes, This online flash regex tester Would probably be pretty helpful. I found it when I was testing a regex for an askme answer, actually.
posted by delmoi at 7:09 AM on May 2, 2010 [1 favorite]

Learning the command line for OSX means learning UNIX. You could go though any online UNIX tutorial to get you familiar with basic directory structures and navigation.
posted by pjenks at 7:38 AM on May 2, 2010

The most important thing to learn is tinkering, experimenting and in general suck up any knowledge you can find on the subjects you're interested in. I've learned the most from trying to fix things i broke, making things do what they're not supposed to do, twiddling on knobs and see what happens.

For example, if you want to learn about web api's you could use a standard library that deals with the Twitter API, but you could also try to program your own. On the way you'll learn a lot about HTTP, JSON, XML, REST and lots of other acronyms and web technologies (for general information about those acronyms Wikipedia is of course a great resource).

Of course, it helps if you're surrounded with people that can help you with that. Try to find a local programming group, or a group that organizes regular meetings where people get together, eat pizza, and try to program something.

A nice resource to start is Eric S. Raymond's essay How To Become a Hacker.
posted by husky at 8:00 AM on May 2, 2010

I'll repost my advice from this thread, which you might find useful:

Find an itch and scratch it.

Learning programming languages from a book is boring. Sure, you can do the contrived examples and pick up the basics, but you won't be having fun, and isn't that the point?

You will be much more motivated to learn when you're immediately applying what you learn to a problem at hand. So pick something that sounds cool.

Does it sound neat to write a little chess program? Could you use a to-do list that syncs online with Remember the Milk? How about a twenty questions game that learns the more you play it? Maybe you munge a lot of excel data every day and want to write some little scripts that simplify things and display pretty graphs.

Pick something that solves a problem or stimulates you intellectually, and then build it. You'll see how much fun programming can be.
posted by chrisamiller at 8:57 AM on May 2, 2010 [4 favorites]

You might find some good general principles on learning programming here: Learn Programming in 10 Years
posted by cmccormick at 8:58 AM on May 2, 2010

Best answer: You may also want to look at Peepcode (note: not free). They are very professionally produced screencasts that also come with code samples, and there are videos on a range of topics, including two on the Mac OS X command line (1) (2).

There are many sites with free screencasts as well, but the code samples Peepcode provides have always been helpful to me.

In general, I find it helps when learning something new to have a specific task or project. For example, to learn regular expressions, is there some text that you need to update or modify? Even something like redacting bank account numbers from old financial records can be a great place to use regular expressions.

The skills you've described are part of a virtuous cycle. The more you learn and explore one, the more you'll use all of them. Good luck, it'll be a great and exciting time.
posted by heliostatic at 9:38 AM on May 2, 2010

Best answer: Congrats on having a goal (or actually, a set of goals).

Your goals of 1, 3, 4 and 5 are all very learn-able together with something like python. Or at the very least it is things that you can learn along with python. For example, there are lots of tools out there that will help you test regular expressions against sample blocks of text. This is definitely the way to go when developing a regular expression. As you can probably guess, regexs get really finicky as their complexity increases. Once you have a few regexs that work well against your sample data, you can most certainly use python to execute these regular expressions.

The same applies to databases. You'll start off with a database like MySQL or sqlite and you will be merely creating tables and columns and learning the SQL necessary to insert, update, delete and find items in your tables. Once you are comfortable with that, it is a pretty easy step to do these kinds of things with python executing the SQL.

Finally, with a little bit of networking code (i.e. fetch the contents of a url) you can then parse it with your regex knowledge and then insert it into a database. It is all nice and useful and builds upon itself. Granted you might be doing things the hard way or an "un-proper" way vis-a-vis what a formal computer science education would have taught you but part of the learning process is doing things the hard way first.

Good luck.
posted by mmascolino at 10:34 AM on May 2, 2010

You might want to take a look at Drupal. It has a community to join where you can contribute back the things you've learned. I've learned PHP and MySQL this way. It also interfaces with third party apps, the most exciting recently is mobile apps, and Google where you can create a RDFa site (RDFa standard in Drupal 7) where your data automatically gets listed in Google search results with thumbnails, 5-star reviews, statistics, whatever data you'd like.

There's a new module called Drush which helps you administrate Drupal from the command line. It's a lot of Linux and Mac. Lullabot is a good place to start.

The community is also moving toward Git, a distributed code versioning system, easier than the traditional SVN, where you can learn code repository and there are tutorials for setting up your development environment to connect to it.

Planet Drupal is a stream from community members' blogs and is a good place to see what the Drupal community is up to.
posted by Honkshu at 10:49 AM on May 2, 2010

Best answer: Plus on sqlite, which in addition to being a good database engine is essentially costless to administrate (your database = 1 file), and gives you insight on how it works internally (the EXPLAIN statement expands your SQL code into a program which "does" what the SQL means).

Data scraping is indeed a nice area to scratch itches from. There are many ways to go, some "classical" cases I use for teaching:

- how many words in English contain the sequence of letters "itch" within their orthography? -- answer: grab an English word list, e.g. /usr/share/dict/words, and apply a regexp; alternatively use grep

- how to get notified when an arbitrary web page on the net is updated with information about a topic you're interested in? (e.g. when is your favorite game released) -- answer: set up a cron job with an appropriate combination of curl, grep and growlnotify (on the mac)

- what are the oldest, largest files on your computer that may need cleaning up? -- answer: combine du, sort, head and ls with a for loop on your command line.

The possibilities are endless. For the command line, please learn to use the commands man and apropos ASAP, and use them a lot. :) (hint: start with man man)
posted by knz at 10:56 AM on May 2, 2010

Response by poster: So much good advice here from everyone. Thank you all. I have a better idea of which direction to go.
posted by jlowen at 7:14 PM on May 4, 2010

For both your regex and cli goal, learning "grep" (from your Mac CLI) can be a good "dip your toes" exercise. grep is among the Unix Power tools available right at your fingertips! There are tons of "basic unix commands" tutorials and pages out there. Most of the Unix Way (tm) stuff is most useful for dealing with plain text. YMMV :)
posted by gregglind at 4:02 PM on May 29, 2010

« Older Diagnosis by meds   |   Expat wedding gift registry - Alternatives? Newer »
This thread is closed to new comments.