Showing posts with label coding. Show all posts
Showing posts with label coding. Show all posts

Thursday, January 19, 2012

Drawing Connections

You know which two dissimilar things I've lately come to think are actually kind of similar?

Knitting and coding.

Both have a sort of obscure language and process for how you have to do things (wind the yarn around the needles this way, enclose these things in this type of brackets), and then you get a finished product that doesn't actually resemble the written pattern or code, but that derives directly from what stitches you made, or what things you put in which brackets.

Also, if you get one little thing wrong, it can totally mess up your entire afghan square/web page.

There's this similarity because you're trying to follow (or make up) instructions that come in a fairly unintuitive form, and with time and practice you gradually start to be able to work out what's going to happen as a result of which steps (ah, if I knit-purl-slip-knit here, it will come out like so in the finished square). But at first, you're really just sort of fumbling your way following directions because they're written down.

Code is in some ways easier to fix, since you can quickly make changes and then reload the page to see if it works, where you have to tear out and reknit everything back to the mistake in your square. I guess one could say that knitting patterns are in fact code, and fingers with yarn is just a fairly inefficient means of running it.

Anyway, that's my thought for the day. Now I must attempt to complete my weekly Codecademy lesson.




Thursday, January 5, 2012

Latest Exciting Challenge

I'm thoroughly engrossed in the richly rewarding pastime of translating our library website's current Cold Fusion pages into PHP. (We have our own website, because we don't want to cede control of our pages to a centralized institutional Web Office, to which we'd have to submit requests to get anything done. As a result, any of the librarians can make important updates, and also could completely wreck the site at any moment, on a whim! That's power.)

It's a project that was begun some time ago by a departed web librarian whose shoes have not been filled (I tried, but my feet are bigger than hers!), so the code is basically all written, it's just a matter of plugging the right information in in the right places. Thankfully, since otherwise we would be pretty much be left looking at the current version of the site forever.

So there's a lot of copying and pasting and refreshing to make sure it looks right. And if I can't figure out how to replicate some effect, I go find a completed page that does the same thing, and copy the code from there.

There's no plagiarism in web development!

I have to remind myself that even though it takes a stupidly long time to get the simplest thing done, I shouldn't worry about it. Take the time, figure it out, and gradually it starts to take a less long time, and I'll remember how x problem was solved and can go right to the solution next time instead of spending an hour on it, and eventually I may even sort of know what I'm doing.

It's kind of fun, and keeps the ol' brain on its figurative toes.Which is good, since it wouldn't do to have that slippery deceptive organ getting all complacent and having time to make up false memories or anything.

On this topic, I recommend the much-recommended Code Year (I saw it all over Twitter, so I can't salute any one person), from Codecademy: sign up and get free lessons emailed to you every week in 2012!

So far they're doing JavaScript, which is not immediately relevant to my thoroughly engrossing task, but from what little I've observed, coding languages tend to work in similar ways, even if they use different terms or symbols to do things, so it's good background.

Farhad Manjoo on Slate makes a strong argument for why people should learn to code, and also recommends Code Year, so it's not just me and some people I can't name on Twitter. You should totally check it out.

Remember: If your brain isn't busy learning, it's probably busy plotting against you. Because brains cannot be trusted.

.