Clojure Makes Me Feel Stupid

…but I’m kinda in love with it. Thanks to a friend/coworker I’m cautiously dipping my toe into the world of “functional programming”. I’m still not 100% certain I get the full gist of functional programming but, to my newb mind, I’d explain it as programming without consequences. Functions only depend on their inputs and external forces/state cannot muck with your function.

Apparently this makes it easier to predict what’s going on, but I still have issues reading what I just wrote. Parenthesis all the way down dudes. Also prefix notation is technically useful, but warping my poor little brain.

So 1 + 1 in Clojure is actually written as (+ 1 1). Makes sense, right? Sorta, except for the years and years of basic math classes that NEVER LOOKED LIKE THIS. Oh my brain. But it’s kinda cool that instead of 1 + 2 + 3 + 4 I only need to write (+ 1 2 3 4).

But seriously. This is a function in Clojure:

1
2
3
4
5
(defn adder 
  [x y]
  (+ x y))
 
(adder 3 4) ;; 7

Wat? So the first line defines the function name. The second line is the parameters that you give to the function and then the last line adds those two parameters together. I then call the function on line 5 with the arguments 3 and 4 and then the semicolons denote comments and I use that do show what the output of the function is… 7.

As a super ridiculous aside. Parameters vs arguments? Parameters are the things that you define with the function. So x and y on line 2 are parameters. Arguments are what you pass to the function when you want to actually use it. So 3 and 4 on line 5 are arguments. Now go forth and be awesome!

So how do you be Clojure learners too? Currently I’m running through the clojurebridge curriculum on my own. Clojure in 15 minutes looks like a decent-y rundown of most of my syntax options. If you don’t want to put anything on your system yet, or just want to mess around with the syntax, there’s always Try Clojure which lets you program from your browser. And I’ve bookmarked Clojure for the Brave and True mostly for the title, but I haven’t really read any of it yet.

Bored Again – Time to Create

On Repeat

Tomorrow is my three-month reunion for Hack Reactor. I’ve done some cool things since I graduated, but I’m still not doing everything I wanted to. I want to be the change I want to see in the world, or however that goes. I just became a mentor for Hackbright Academy so I feel a little less adrift without a social purpose, but I’m still itching to create things.

I’ve started knitting again, but it’s not solving the itch. I have half-finished things on the needles again, but I’m still bored. I think there is no hope for me. I just need to be coding.

About a year ago. I was sitting in a crappy gelato shop in downtown Burlingame with two of my best friends who already lived in California. I was still living and working in Oregon, but I knew I needed to be moving on soon. I was getting restless. That day we made a pact, all of us before this crazy thing called a dream turned us into a software engineer, a software engineer, and a novel writer. We were The Clever Girls and we were going to create something amazing together eventually. Part of that dream is how I ended up down here and now I’m realizing I need to start doing my share.

So I’m going to dive back into programming completely solo, completely public, with my work, as shitty as a lot of it probably is, committed for all to see on Github. I hope soon the three of us can get back on the same page and actually make something amazing. For now I’ll just leave you with the copy I wrote for a fake starter page a year ago when The Clever Girls were still fresh in my mind:

“Computing is too important to be left to men.”
Karen Spärck Jones

Women are underrepresented in computing not because they aren’t good with computers but because they are never given the opportunity to fall in love with them. The Code Girls‘ goal is to create fun, educational games geared toward younger girls that will teach them the basics of how programs work. Using an easily readable language like Python, girls will code their way through the platform challenges and create fully functioning programs as they progress.

Code Girls present Octavia and the Clockwork Code is the first game in the series. It tells the tale of 12-year-old Octavia, a precocious tween who sets out to win a mechanical competition. Along the way she codes her way through puzzles and helps out friends and competition alike.

The Code Girls is a fledgling startup created by three women who are passionate about women in computing.

Lindsey – The Creator

Founder, primary coder and herder of cats. Lindsey always wanted a game like this when she was growing up. Now that she’s technically grown up, she decided to take the idea into her own hands.

Ava – The Teacher

Our resident little girl expert. Ava has a Masters in Education and a passion for teaching children using methods that create a deeper understanding.

Alyssa – The Storyteller

World builder and character flaw creator. Alyssa creates and drives the stories we tell. She lives and breathes the Code Girl worlds.

Home – For Now

The updates got away from me. Life has just been flowing one day to the next. A mix of sun and California and coding. Days will go by where I forget how I got here. It feels like I’ve always been here and then I see or hear something so stereotypically Bay Area-ish that I have to shake my head and realize I don’t know if I ever want to be completely sucked into this candy coated, rose-colored-glasses kinda world.

Life is pretty amazing now. I’m happy and working and finally have my cats and my car. I could never live in San Francisco proper for the sheer joy I get in sitting in my car, driving on a long stretch of road with my music blaring. I drove from Portland home to Burlingame and the views were breathtaking and I felt so much at peace as I curved around the mountains of Northern California.

Oh yeah, cats:

I was terrified they would hate it here and then I’d be the horrible person who drove them 14 hours away from Oregon. I haven’t lived with my cats for 7 months and it’s been excruciating. Thankfully they seem to be enjoying themselves. There are windows that I can actually keep open all the time and floors to stretch out on in the warm, warm sun. And of course I’m here to know Isaac really likes his head scratched and Jack likes to hold your hand with his paw. So yeah, I’m pretty happy. I do have more nerdery and tech blogging to do (I’m trying to learn Swift! and hopefully tech mentoring! and maybe even public speaking?!) and I plan to get to it, but I first had to get the reintroduction out of the way.

Also, this post (and maybe many posts to come) has a theme song: