Tag Archives: Coding

Going geek

Q1 of 2012 down, and my list of  completed ‘new somethings’ is looking quite impressive already: fitness boot camps, yoga classes, attending trendy launch parties, jewellery making, becoming an organ donor, even mentoring someone in running! Phew! It’s no wonder my posts have been getting few and far between; I’m too busy doing stuff to be writing about the stuff that I’m doing. Oops! Some balance is required in this respect I think… Anyway, it’s all been great fun and, without wanting to sound smug, not too taxing (although some of the yoga positions I’ve attempted defy gravity!). But all this was about to change. It was time to take things to a new level. It was time to engage my brain. That’s right people; I was gonna go geek.

I have the right genetic make-up to be a nerd. I’m whiter than Casper the Friendly Ghost. Dressed as a sheep. In a snowfall. Covered in talcum powder. And at the first hint of sunlight I burn redder than the sun. I can’t even sit under a 60 watt bulb without my factor 120 on. I’m as blind as a bat without my geek-chic specs on. And I was always hopeless at sport. Except running, which I’m quite good at. But that makes sense. Nerds should be adept at this, you know, from all the running away from bullies and stuff. Anyway, I digress.

Last week I made good on a threat I’d been holding in reserving for a few years, by popping along to a course of unadulterated geekery run by my friend Seb Lee-Delisle. I’ve been wanting to attend one of his courses for a while – they always sound so cool – but the content has always been way too advanced for my teeny little brain to comprehend. So when I found out he was putting together a creative JavaScript course for complete noobs, and realising this would fit in rather nicely with my ‘ new somethings’ plan, I signed up. Two birds, one stone. Nice.

I was apprehensive in the days leading up to this nerd-fest, being that my only attempts at anything vaguely like coding were the two frenetic weeks I spent teaching myself basic HTML and CSS last year, to get my website up and running. And this didn’t really give me an edge. It’d be like attending a course to learn Spanish and saying “well, I kinda know some French”. Yeah, really not very helpful. The ‘creative’ element – given top billing in the course title – was giving me the heebie-jeebies too, cos I’m about as creative as a stick. So the prospect of spending 2 days blinding tapping away at my hefty laptop, employing my patented ‘nod-and-smile’ technique every time something was said that I didn’t understand (I anticipated having a major case of neck ache and face freeze by the end of the course!) and trying to cover up my lack of creative prowess by using the brightest colours I could code up, to cause temporary blindness, was a little unnerving. But as I’m always being told, particularly by said teacher of this course, “Feel the fear and do it anyway”. Ok fine. I’ll feel the fear and do it anyway. Times 100! Bring it!

The dates rolled round, and suddenly here it was, Geekment Day. Or Geekment Days; it was a 2 day course after all. And what a fun couple of days it was! The class were a lovely bunch of fellow noobs from all sorts of backgrounds, all eager to learn this weird JavaScript stuff. The girls outnumbered the boys 4:1, which I hadn’t expected, and it was pretty cool to see so many girls interested in learning programming :). Day 1 kicked off with Seb showing us some basic drawing commands, and how we could use these to make shapes, dictate colours and even move stuff around the canvas! Cool! Check out some of the pretty stuff I made:

This slideshow requires JavaScript.

After we had these basic commands down, and we’d stopped sniggering at the slightly rude sounding terms we’d been learning all morning –  “Now remember, it’s really important that you stroke your Rects before you fill your Rects…” (snigger) – we were tasked with creating a little critter with wobbly bits and everything! Here’s my offering: click on the bunny then watch him wobble as you move your mouse across the canvas!

Kinda cute, right? And I almost understand how I put him together, which is pretty cool!  The rest of the class made awesome creations too, from wobbly aliens to grinning faces to a hilariously rude body part. I won’t mention exactly what it was (where would be the fun in that), but will say that, when it came to Day 2 and particle systems, the owner of the anatomical graphic wasted no time in working on an eruption of particles to ‘finish off’ her work. Nuff said. Needless to say, immature as we quite clearly were, we all had to have a sneaky look at her laptop, laughed like naughty school kids and collaboratively decided that her offering won the entire course.

Day 1 completed, pretty stuffs coded by yours truly, so onto Day 2, with gusto! Well, I started with gusto. It soon petered out when Seb started schooling us in while loops and for loops and arrays… What the flip?! Queue all manner of confusion and brain-frying and frustration, admittedly mostly from my corner of the room. We were now into scary territory. The bit I’d been dreading. The moment where I’d found myself staring at my screen, fixated with wide-eyed gormlessness and not understanding even a hint of what I was looking at! Oh how I longed to go back to stroking and filling my rects. Reassuringly though, this stuff seemed to be a bit of a stumbling block for everyone. But we were lucky. Seb is an excellent teacher, and talked us through this terrifying world of unfamiliar terminology, happily answering all our “um, I may be being really dumb here, but…” questions. And it started to sink in. Well, for the others perhaps. As for me, I was still clueless! But I bluffed my way through until the afternoon, chomping at the bit for the exciting culmination of our 2 days of coding – PARTICLE SYSTEMS! Ooo particles, you’re so pretty. And so impressive looking. Shapes that appear from nowhere in an explosion of awesomeness. Aahhhhhhhh! Ones that are glued to your mouse and whizz across the screen, following your every whimsical move. Weeeeeeeee! Who knew that after such a short space of time, complete JavaScript novices could be creating such visually stunning effects. What a brilliant way to end 48 hours of nerdy wizardry :D. It’d be rude not to share some of my particle examples, so here you go. Click on the images to see them get animated…

       

That’s some pretty awesome stuff right there!  And after only two days. Amazing!!! So I’d like to say a huge thanks to Seb for running a brilliant course for us coding virgins. I’m always blown away by the stuff Seb does, so getting to see the mechanics of how he can create visually beautiful things with code was really eye-opening. Understanding it (for the most part anyway…) was even more amazing! But being able to type some gobbledygook that can barely count as English into the notepad, and instantly see it come to life in the canvas – wow. That was so cool it almost hurt a little. As expected, the anticipation was way more painful than the actual act, but we’ve all come away, Javascript cherries popped, feeling nicely sated thank you very much ;).

And that’s it, my first Creative JS course completed, and I’m actually feeling a little impressed with myself – yay! So am I now a fully fledged geek? Um, probably not. But this has definitely gotten me a few steps closer. And seeing as I’ve now become inseparable from my laptop, playing with the variables in my examples from dusk till dawn, I think it’d be acceptable to declare my status as nerd-in-training. I’m now the proud owner of a big orange book, which professes to be able to learn me in the ways of processing. Hmm. We’ll see… I’m still tweaking the stuff I created in class, and if any of my random changes result in something mind-blowingly gorgeous (it could happen, right?) I’ll definitely be posting them. But for now, it’s glasses on, curtains drawn, laptop launched, and brain engaged. All systems code!

Code Runner

A few months back I completed my first marathon.  Technically, that now makes me a marathoner.  Hmm.  That sounds very odd to me.  Because I’m not really a runner.  Well. Ok. I am.  Sort of.  Maybe it’s best to say that I’m not a natural runner.  I’m not graceful.  My gait is awkward.  My stamina levels aren’t great.  And I’ve never quite gotten to grips with breathing correctly – there’s a proper technique to maximise your intake of oxygen don’t you know.  At best, my running can only really be described as jogging.  Ugly jogging.  And I don’t really like it.  Based on the state of my feet after a run, it’s pretty obvious that it’s not that keen on me either.  But it’s exercise.  It keeps me fit (kinda), and gets me out of the house for a while.  And it does have one redeeming quality; it gives me a chance to show off my sprint finish.  And I have a MEAN sprint finish :D.

So, as I’m clearly the advert for the anti-runner, how the hell did I end up completing a marathon?  It’s a long story, one I won’t bore you with now.  I’ll save that for a future post. But here’s the abridged version: turned 25, stuck in a rut, had a mid mid-life crisis, decided to run a marathon before my 30th.  You know, that old chestnut.  Since then, I’ve applied for a place in the London Marathon FIVE times.  And how many times have I received the virtual slap in the face that is the official “Commiserations” magazine?  Yup.  You guessed it.  FIVE flippin’ times!  So this year I changed tactics and signed up for a power-walking marathon event as well (how’d you like me now London Marathon!?).  I got in, did my training, took part, and completed the 42k course bang on my target time of 7 hours, one month after turning 30.  Mid mid-life crisis goal achieved.  Awesome.

Or was it awesome?  To be honest, it felt like a bit of an anti-climax.  Yeah, I’d completed a marathon.  I’d crossed the finish line.  I’d been given the very cool medal.  But I didn’t feel any different.  I’ve been waiting for the “sense of achievement” moment – the one I’d been promised by countless marathoner friends – but it never came.  In fact, I’m still waiting.  Helloooo?  Moment?  I’m waiting here!  No.  Nothing.  Sigh.  Maybe I did it wrong…

Anyways, after Marathongate, I decided to retire my trainers for a bit.  Partly because my feet had been ruined (they are so messed up it’s not even funny) but mostly because I was disheartened by the post-event blues.  And after months of training, and seriously disgusting blister related atrocities, I was more than happy with this arrangement.  It soon became apparent though that my time of non-activity was not going down so well with others.  From the moment I hung up my trainers, I’ve been hassled, poked, prodded and threatened by my twitter based “coach” @jjbowie and my run club chum Rachel, to put them right back on again!  I’ve been happily ignoring their requests for the most part, inviting them to enjoy their early morning runs and late night interval sessions, whilst I stay at home, snuggled up in my duvet.  But for the past month, I’ve been considering dusting off the Brooks, donning the Lycra, and hitting the streets again after I stumbled across @themarcothon on Twitter.  “Run every day in December, for 3 miles or 25 minutes, whichever comes first.  Challenge yourself, and get fit too”.   3 miles or 25 minutes every day, huh?  Sounded doable I thought.  So I decided I’ll give it a go.  If nothing else, it’d get my coach and my friend off my case for a while.  Challenge accepted :).

But the story doesn’t end there.  Oh no.  I like an extra side of challenge with my challenge…!  So I thought it’d be fun to share my @themarcothon progress; the good runs, the bad runs, the oh-my-poor-feet-are-so-ugly-after-31-days-or-running runs.  Twitter would seem the obvious choice.  But where’s the challenge there?  Besides, 140 characters is too restrictive.  I want to be able to ramble on if the mood takes me.  Posting weekly blogs seemed like a much better option.  Small problem though.  I didn’t have a blog.  Or a website for that matter.  And I had no idea where to start with that stuff.  So I did the natural thing.  I decided I’d create a webpage myself.  From scratch.  With code and everything.  Obvious really, you know, when you think about it…  Two important things I should stress at this point:

  1. I have no knowledge or skills in this sort of thing whatsoever.  I’m not a programmer, or a website designer.  I’m an administrator.  A purveyor of all things organised and logical and perpendicular.  I don’t know code.  Code doesn’t know me.  I’ve never even looked at code before this.  Um… yeah… great idea Cups!
  2. The shiny website you are on right now was not created entirely by myself.  Of course it wasn’t.  That would be absurd.  You think I could have made all of this from scratch?!  With no prior experience?!  In two weeks?!  Are you crazy?!

I should also take this oppotunity to apologise to a few super nerdy friends of mine, who know how to do this stuff properly, with mind-blowingly awesome results.  My little project will probably reduce them to shivering wrecks, cowed in a corner, hugging their knees and muttering nonsensicals under their breath.  Honestly guys, it’s my first go, so don’t judge what you see too harshly, and maybe to save yourselves further meltdown, look away… now!  Ok, I think they’re gone.  So here we go.  After one week of web-based-self-taughty-tied-to-my-laptop-why-did-i-think-this-was-a-good-idea madness, TA-DAH, my very first attempt at an HTML-based webpage:

And the code, typed by me (yes, really!) that brought it to life: My code.

Now, to the expert eye, I’m sure my first time with coding looks messy, cumbersome, and over complicated.  I may have unnecessarily repeated attributes or gone overboard with tags.   There’s probably too much whitespace.  Or not enough whitespace.  Maybe I’ve put the wigwams up the seesaws, and hidden the broccoli in the tree stump (ok, ok,  I might have made up those last bits…).  I’ve probably committed about a million coding sins.  But I don’t care.  Alright, I care a little.  But regardless of how much I may have broken the understood conventions or the dictated “norm” of coding, no matter how much it stinks of newbie to the web elite, I did it, all by myselfWith little more than a weekend spent reading up on HTML (credit to W3Schools for a great online resource) and a week of trial and error on my trusty laptop notepad.  It may be extremely basic, but honestly, I’m pretty pleased with it :).  One HTML webpage down, time for stage two – getting it on the web.  This is where doing it myself came to a bit of a full stop.  I’d navigated my way through creating something with HTML, basic as it was, but it was far from being a bona fide website.  And I didn’t have the first clue about how to host a site myself on the internet.  So I cheated.  Off I went to the lovely folk at WordPress, newly purchased domain name in hand, and signed up to their hosting service.  I picked a site theme and started changing the default styles to something a bit more me.  It was taking shape, but not yet created.  No problem. I had a little something extra up my sleeve…

During sign up, my curiosity had been tickled by WordPress’ premium packages, with talk of “custom designing” and “cascading style sheets”.  I had no idea what a “cascading style sheet” was.  I’d only just gotten comfortable with basic HTML at this point, and my brief peak at CSS (mid HTML learning) had scared the frick out of me!  And I rightly hadn’t looked at CSS since.  But there was something about “custom designing” that sounded magical.  Well, that, and I have some control issues.  Nothing major you understand.  Insignificant really.  Barely worth mentioning.  But I do like things how I like things.  So I found myself being lured once more into unfamiliar territory.  “One premium please, Mr WordPress…”.

And that’s how I found myself – just over a week after first teaching myself a bit of HTML – tapping away at a CSS editor, using my scarily basic 2-day old grasp of CSS to personalise my site to within an inch of its life.  In fact, when I asked the WordPress wizards how it was looking, Mr Wizard told me he hadn’t recognised the original theme due to all the edits I had made.  I took that as a compliment :).  And it’s turned out pretty well I think .  So now I’m here, posting my first blogs, on my first self-styled CSS edited website, with a link to my first hand created HTML webpage, about to go for my first post-marathon run.  From unlikely marathoner to unlikelier coder in two weeks.  Wow.  That’s some fortnight.

Right then, nothing left to do now but pull on my trainers, get running, and start posting my @themarcothon tales.  And maybe some other random stuff too; I do enjoy a bit of random.   Oh, and to hope there’s someone other than my mum reading this.  That’d be cool.  If not, hi mum :).  Challenge accepted.