John_Maxwell_IV comments on PSA: Learn to code - Less Wrong

34 Post author: John_Maxwell_IV 25 May 2012 06:50PM

You are viewing a comment permalink. View the original post to see all comments and the full post content.

Comments (77)

You are viewing a single comment's thread. Show more comments above.

Comment author: Curiouskid 26 May 2012 05:34:55PM *  1 point [-]

Long comment here.

Short comment:

I just graduated a year early from high school and I'm doing a CS major in the Fall. I took AP computer science at my high school and loved it. I'd love to learn more, but I feel like the links you post above help me learn bits and pieces (trees), but I don't really know where that's leading (forest). In essence, I want to learn about coding before I learn more coding, so that I can direct my studies in the directions I want to take them.

I think you should elaborate on this. This seems to be the first project I would want to apply my coding skills to. "Productivity software. Writing your own is much nicer than using stuff made by other people. The reason there are so many to-do list applications is because everyone's needs are different. If you use the terminal as your interface, it doesn't take much effort to write this stuff; you'll spend most of your time figuring out what you want it to do. (Terminal + cron on Linux with JSON log files is a very flexible productivity app platform in my experience.)"

Comment author: John_Maxwell_IV 26 May 2012 09:13:25PM *  1 point [-]

I don't know of any good resources for learning what the forest is like. As far as I can tell, everyone who knows what the forest is like learned by learning about more and more trees.

Assuming your AP computer science class used Java, a good next step is to learn Python (probably using some resource like Dive into Python written for people who already know how to program) and learn the command line (using the Hard Way book on the topic or http://code.google.com/edu/tools101/linux/basics.html or something).

Then you can take a shot at following the instructions in the rest of this comment.

Using cron:

http://lesswrong.com/lw/2dg/applying_behavioral_psychology_on_myself/267c

Note that it assumes you're on Linux. I don't know the best way to duplicate my results on Windows.

If you're on Ubuntu, a good next step is to type "man gnome-terminal" from the command line and figure out how to use flags to cause gnome terminal to run an arbitrary program when it starts. Then you can substitute the command you construct for the Firefox command in the original cron example.

With lots of Google searches and persistence and trial and error, it should be possible to set things up so that you get a window popping up every hour with a random item from your to do list. You can complicate things from there as you desire. For example, figure out how to input some number of minutes that the window should wait before popping up again. There's tons of stuff you could try out.

Persistence example: if you get gnome terminal to start running a command, the terminal will close as soon as the command terminates. So you'll need to ask the user for input in the last line of your script. (In user experience terms, this will translate into you pressing enter to close the terminal window that pops up.) This is one of those things that could take an hour or so to figure out.

In general, you want to start by getting extremely simple examples to work and gradually modify them, making sure they still work after each modification.

You should probably ignore the JSON bit for now and craft your own log file formats; it will be more educational.

Feel free to respond to this comment with more questions. I'm counting on you to figure out a lot of stuff for yourself here. You're going to have to do this anyway if you're going to be a coder; you'll need a decently high tolerance for frustration. But I can help you out some in the early stages.