blog blog blog

Kelsey is a nerd.

How to Make an HTTP Call in Clojure When You Don’t Know Anything

| Comments

first: Download leiningen, or check to see that it’s still there from the time you said you were going to try Clojure 18 months ago (that’s lein --version, not -V or -s or whatever other gajillion things you’ll try first)

second: Download Light Table, which barely existed 18 months ago!

third: Run lein new i_am_a_golden_god to create a new project. Open Light Table & select View > Workspace then right-click in the left pane to add your newly created folder to the workspace. Skip the 4 minutes of bumbling around clicking aimlessly it took me to figure that out.

Throw Some Gouda at That Whine: Valleywag Post + Bay Area Charity Pairings

| Comments

I love the spiteful tingle I get from reading on Valleywag about the latest gross boomtown excess coming out of Silicon Valley or the most recent hateful tirade spewed publicly by a clueless startup douche. What better match for that warm hate-glow than the happy satisfaction of helping a worthy nonprofit? Here’s the 12 most recent posts on Valleywag as of 12/12/13, each paired with a relevant local organization that’s working to do good in the Bay Area and beyond. It’s a Choose Your Own Rage Gift Adventure!

Idiomatic Scala: The For-Comprehension

| Comments

If you’re new to functional programming, it may be hard to see the practical use of FP constructs in a real-world code base. This talk, originally delivered at LambdaJam and PNW Scala, aims to show you how you can get real, immediate benefits in safety & maintainability from introducing functional structures without throwing out all your current models & ways of thinking about them. I concentrate on the idiomatic Scala “for-yield” or “for comprehension” and go over several types of applications of for-yield statements.

Code examples from the talk:

Why I’m Glad for Lambda Ladies

| Comments

Earlier this week, an awesome group of women that I’m a part of started Lambda Ladies, a group for women interested in functional programming. I’m really excited about it, especially the email list which already has far more FP women than I would’ve even thought existed! The response so far has been pretty overwhelmingly positive, but I also saw some skepticism on Twitter about the need for such a group and I wanted to give a little background about why I think it’s a good idea.

Learning Functional Programming Without Growing a Neckbeard

| Comments

I gave a beginning functional programming talk called Learning Functional Programming without Growing a Neckbeard for the SF Scala meetup on December 13th. The slides are below and you can watch a video of the talk on Marakana’s website.

You can also view the JS version, including my notes. The notes are in the super-secret presenter view which you enter by clicking within the slides and hitting the “s” key on your keyboard.

If this presentation piqued your interest in Scala and functional programming, you may find this post of resources for getting started with Scala useful.

Box Cheat Sheet for Lift

| Comments

When you’re learning Scala, one of the first concepts that clicks is pattern matching. Once you get the “hammer” of pattern matching in your Scala toolbox, everything is a nail; you want to use it everywhere for everything. Pattern matching is very powerful and easy to use, but it turns out for many, many simple cases using a higher-order function is more concise and performant. I have Tony Morris’s Option Cheet Sheet bookmarked and use it almost every day.

In Lift, though, we generally use Box instead of Option. Box adds a third Failure state and a host of additional methods. I got tired of translating the Option methods to Box ones in my head so I wrote up this translation of Box methods to match statements.

Resources for Teaching Web Development to Kids

| Comments

I’m helping put together a web development workshop & longer class targeted at girls ages 7 to 16 for Black Girls Code this summer. If you’re in the Bay Area, we need volunteers for our June 30th workshop. There’ll be a training before the workshop so no worries if your coding skills are rusty/non-existent–if you’re willing, we want your help!

Here’s some resources I’ve found for teaching web development to kids:

Checking a Service’s Status in the Background in Lift Using Lazy-load

| Comments

At work we recently built an HTML5 & JavaScript hosting service that pulls files from GitHub. Of course, we managed to release this feature smack in the middle of GitHub’s recent DDOS woes.

Because GitHub’s outages were intermittent and other parts of our functionality worked, we wanted some way of letting our users know if we couldn’t reach GitHub. The outages sometimes manifested themselves as a timeout rather than a returned error, so I didn’t want to block the entire UI from loading while I waited to see if a request to GitHub would terminate or not. I was starting to look at Lift’s powerful Comet support when the lovely and helpful dpp (who we are lucky enough to share an office with!) suggested that I look at lazy_load.