Oct 06 2024Oct 06 2024 Rust has two main string types: Rust has two main string types: StringString and and &str&str. Sometimes, people argue that these two types make Rust code difficult to write, because you have to think about which one you should be using in a given situation. My experience of writing Rust is that I don’t really think about this very much, and this post is about some rules of thumb that you can use to be like me.. Sometimes, people argue that these two types make Rust code difficult to write, because you have to think about which one you should be using in a given situation. My experience of writing Rust is that I don’t really think about this very much, and this post is about some rules of thumb that you can use to be like me. Level 1: Don’t...Level 1: Don’t...
Aug 12 2024 There’s an old saying: There are only two hard things in Computer Science: cache invalidation and naming things. ― Phil Karlton I also appreciate the joke version that adds “and off by one errors.” Lately, I’ve been thinking about this saying, combined with another old joke: “The patient says, “Doctor, it hurts when I do this.” The doctor says, “Then don’t do that!” ― Henny...
Feb 24 2024 One of the reasons I am enthusiastic about BlueSky is because of the way that it works. So in this post, I am going to lay out some of the design and the principles behind this design, as I understand them. I am not on the BlueSky team, so these are my takes only. Let’s begin. Why does BlueSky exist? Here’s what the BlueSky Website says right...
Feb 17 2024 A very, very long time ago, I was introduced to Gerrit. To be honest, I hated it. However, lately I have become interested in divesting from git and GitHub, and so have decided to re-visit various “forges” to see what’s out there. The “why” for this will come later, and I’m not leaving them just yet, just, you know, doing some exploring. Anyway, in order to play...
Dec 21 2023 TL;DR: I think that a focus on memory safe languages (MSLs) versus non memory-safe languages is a bit of a red herring. The actual distinction is slightly bigger than that: languages which have defined behavior by default, with a superset where undefined behavior is possible, vs languages which allow for undefined behavior anywhere in your program. Memory safety is an important aspect of this, but it is necessary, not sufficient. Rust’s marketing has...
May 08 2023 Hey there! A shorter post today, but I wanted to continue my series on Buck by going over some things that have changed since this series started. A series This post is part of a series: Using buck to build Rust projects
Apr 27 2023 In a previous post, I laid out the basics of building a Rust project with buck2. We compared and contrasted it with Cargo. But what about one of the biggest and best features that Cargo has to offer, the ability to use other Rust packages from crates.io? They don’t use buck, so how can we...
Apr 13 2023 A few days ago, Facebook/Meta/idk announced that buck2 is now open source. Buck2 is an extensible and performant build system written in Rust and designed to make your build experience faster and more efficient. As it just so happens, I have taken an increasing interest in build systems lately. I...
Mar 27 2023 I find myself thinking about a particular design principle of Rust today. I’m not sure I’ve ever seen it named specifically before, but it gets referred to from time to time, and I think it’s an under-rated but very important aspect of why Rust works so well. I was going to refer to it as “the signature is the contract” today, but then I ended up changing it. Regardless of that, if someone else has already written this out somewhere, and used a different name,...
Jan 27 2023 I first heard this adage in the Rails space. I don’t know who to attribute this to, but I also never wrote it down. So, time to write it down, and if you know of the origin of this aphorism, let me know and I’d love to put it here! I think that the first formulation of this sentiment goes something like this: Rails is like a soap opera. You’re getting started with it in a later season. The cast of characters has already been...
Jan 03 2023 There’s a famous quote by Eleanor Roosevelt: great minds discuss semantics, average minds discuss syntax and small minds discuss syntax of comments (Apologies, Phil Wadler.) I’d like to preface this post that I do not consider this to be an actual proposal to change Rust, even a pre-RFC. I don’t think that making changes like this has enough benefits once a language is as established as Rust is....
Dec 21 2022 December 21 is the anniversary of when I first heard about Rust way back in 2012. I used to write yearly posts about it; the last time I did was in 2018. That makes today ten years. I thought I’d have something big to say here, but… I just don’t. Part of that is because I haven’t written a blog post since late 2020. Part of that is well, gestures wildly at...
Oct 16 2020 There is a pretty straightforward design pattern called “out parameters” that you may have heard of before. In short, the question is, does your function wear pants… err, I mean, does your function modify data like this: fn foo() -> i32 { // body elided } let...
Aug 22 2020 Let’s talk about safe and unsafe in Rust. To review, Rust has a concept of “unsafe code.” Unsafe Rust is a superset of safe Rust, letting you do some extra things that are dangerous. It’s your job as a programmer to verify that your code is playing by the rules, because the compiler cannot check them for you. Imagine we have a C program, add.c that looks like this: #include...
Jun 15 2020 Today is my first day at Oxide Computer Company, where I will be doing engineering work. When Oxide introduced themselves to the world, I saw a lot of folks who were pretty confused. At its core, what Oxide is doing is very straightforward: you give Oxide money, and Oxide gives you a computer. This company...
Jun 08 2020 I’ve had a few different blogs over the years. Every so often, I change things. One of the nice things about having your own site is that you can do whatever you want! So, I’m folding my old blogs’ content into my main website. I’m sick of adding new subdomains, and it all feels better in one place these days. The old URLs will redirect to posts on steveklabnik.com, but I wanted to record what they looked like at the time. My oldest blog that’s...
Apr 11 2020 I’ve been thinking a lot lately about how often Rust changes. There are some people that assert that Rust stays fairly static these days, and there are some people who say Rust is still changing far too much. In this blog post, I want to make a data driven analysis of this question. First, I will present my hypothesis. Next, my methodology. Then, we’ll talk about the results. Afterward, we’ll discuss possible methodological issues, and possible...
Mar 31 2020 A long time ago, I wrote “Should you learn C to “learn how the computer works”?“. This was part 1 in a three part series. A year later, I got around to part 2, ““C is not how the computer works” can lead to inefficient...
Jan 17 2020 actix-web is dead. This situation is bad, from all sides. When Rust was a tiny, tiny community, I thought to myself, “wow, I wonder how long this will last? Probably 1.0 will kill it.” Sort of playing off of Eternal September, I assumed that over time, the community would grow, and we’d encounter problems. Today is the first day where I say to myself, okay,...
Oct 25 2019 A little over a year ago, I wrote “Should you learn C to ‘learn how the computer works’”. It was a bit controversial. I had promised two follow-up posts. It’s taken me a year, but here’s the first one. In that post, I argued that C doesn’t “work like the computer”, but rather, by a concept called the “C abstract machine.” It happens to be...
Sep 26 2019 One fun thing about having a personal domain is that you can keep the contents the same forever, but take a few days every so often to port it to some new stack you want to try out. A while back, I had my site on GitHub Pages using Jekyll. This has long been the sort of default, go-to stack for me. At some point, I decided to simplify even...
May 26 2019 There’s a war going on. When isn’t there a war going on? But I’m not talking about a physical war here: I’m talking about a war over meaning. This particular war is a fight over what “open source” means. Let’s take a few steps back. The Free Software Foundation People organize into groups for many reasons. This story starts with the story of an organization called the “GNU Project.” It was started in...
Apr 05 2019 Yesterday, I signed an offer letter from Cloudflare. I’ll be the product manager of Storage, which is the part of the company that’s working on data storage products for the Cloudflare Workers platform. I’ll be...
Apr 02 2019 In a previous post, I discussed the history of open source, and ended with this claim: Today’s developers have never learned about this history, or don’t care about it, or actively think it’s irrelevant. … For the same reasons that “open source” came up with a new name, I think the movement that will arise from today’s developers will...
Mar 29 2019 Today is a very interesting day. It’s giving me a lot of feels. Today is Rust Latam, a Rust conference in Montevideo. And I’m not there. This is significant because, as far as we know, I’m the only person who has been to every Rust conference in existence so far. I went to RustCamp, all three RustConfs, all five RustFests so far, all three Rust Belt Rusts. One RustRush. Am I forgetting any?...
Mar 26 2019 I decided to try and learn Ada. I love programming languages. This post documents my attempt, and explains what I learned. This is pretty stream of consciousness and basically is a bunch of random notes, so if you hate that, better close the tab. I typed my thoughts up pretty raw, so I may be incorrect in places too. Let me know if you know the answer to something I don’t!
The first step, of course, is to google:
Feb 11 2019 On December 18, 20091, the Semantic Versioning specification was announced. More commonly known as SemVer, it provided guidance for developers regarding software versions: I propose a simple set of rules and requirements that dictate how version numbers are assigned and incremented. For this system to work, you first need to declare a public API. This may consist of documentation or be enforced by the code itself. Regardless, it is...
Jan 06 2019 I started working at 15, when I took a job as a pizza cook. Over the next seven years, I moved up the ranks, to a driver, shift manager, and then as part of the “new store opening team.” The franchise was growing, and we needed to help new franchisees open their new stores. I’d travel to where the new store was a week before they would open, help train the new staff, and then work their opening weekend. It was really fulfilling work; if pizza paid as well as...
Dec 27 2018 Each year, we ask the community to write blog posts about what they want to see on Rust’s roadmap for the next year. This is my post for Rust in 2019. Rust 2021: Maturity This year is also a bit special; in 2018, we introduced “editions” to Rust, on a roughly three-year schedule. So now is not just a good time to...
Dec 21 2018 Today is six years since I first heard of Rust. I wrote a post last year about it. This past year was… intense. Rust 1.31 was basically Rust 2.0, at least in the marketing sense. I burned myself out getting the first edition of the book together for Rust 1.0, and I burned myself out getting the edition shipped. Let’s talk about the bad and the good. Bad first so we...
Dec 18 2018 There’s been some Programming Language Discourse lately, and I have some thoughts. It’s mostly centered around a comment on the orange website: I would put it simply: Clojure was designed by a thinker, who creates when he is away from the keyboard, not in front of it. When one releases and breaks the code in his head first, very few breaking changes are left for the...
Oct 10 2018 There’s a fairly common argument that pops up on programming forums, and it’s about the nature of what “garbage collection” means. In the research world, this is what GC means: Garbage collection (GC), also known as automatic memory management, is the automatic recycling of dynamically allocated memory(2). Garbage collection is performed by...
Oct 02 2018 I’ve often seen people suggest that you should learn C in order to learn how computers work. Is this a good idea? Is this accurate? I’m going to start with my conclusion right upfront, just to be crystal clear about what I’m saying here: C is not “how the computer works.” I don’t think most people mean this phrase literally, so that is sort of irrelevant. Understanding the context means that learning C for this reason may still...
Sep 14 2018 Every once in a while, someone will talk about unsafe in Rust, and how it “turns off the borrow checker.” I think this framing leads to misconceptions about unsafe and how it interacts with safe code. Here’s some code that causes a borrow checker error: fn main() { let mut x = 5; let y =...
Jul 25 2018 In my last post on WebAssembly, I made the following claim: Some have compared WebAssembly to Java applets; in some ways, they’re very right, but in some ways, they’re very wrong. Eventually I’ll write a post about the wrong, but for now, the right: in some sense, WebAssembly is a different way of accomplishing what the JVM set out to do: it’s...
Jul 13 2018 While WebAssembly was given its name for good reason, I also think it’s quite the misnomer. When you hear about WebAssembly, don’t just think of the web: think bigger. Many programmers know that WebAssembly is a technology that lets you run non-JavaScript code in the browser. That is true, but there’s a lot more to it. You see, the spec is written in a very interesting way: there’s the core, what WebAssembly actually is. Here’s
Feb 14 2018 In October of last year, I wrote a post, “The Expressive C++17 Coding Challenge (in Rust)”. For various reasons, it got brought up again in the D world, and seb has written a new post. It’s good, you should check it out! However, it links to my...
Jan 25 2018 As someone who has significantly different beliefs than Peter Thiel, today is likely my second-to-last power of two years alive. Two years ago, I wrote a post about turning 30, and I pretty much feel the same way. Never enough time, tick tock, tick tock. I have today off (thanks...
Jan 09 2018 A careful reader will note the date of this post; it’s fundamentally in response to this call for blog posts, with a rhetorical device of looking backwards as if my personal plans for Rust came true. If you’re reading this in 2019 or beyond, this may be a work of fiction. It’s been an exciting year for Rust. Well, it depends on what you mean by “exciting”, exactly. In a word, this year has been about polish. I find...
Dec 21 2017 Today is five years since I first heard of Rust. I wrote a post last year about it. This year, I have something slightly different in mind. Five years is a long time in tech. It’s also a long time for me to be focused on one specific thing; other than the pizza job I held in high school and college, I’ve never stayed in a single job for five years. (This is true today as...
Dec 12 2017 Every six months, Mozilla gets all of its employees from around the world together in one place, for a week. This morning was the plenary session, with Mozilla leadership talking about our successes this year, as well as plans for the future. I noticed a theme that, while not super overt, I find very interesting, and bodes well for Mozilla’s future. The words “user agent” kept coming up in various aspects of the plenary. The User-Agent...
Oct 25 2017 A few weeks ago, two C++ bloggers initiated a challenge (here and here): use the shiny new features of C++17 to write a small program that manipulates CSV files. The link is to the results; you can see the examples people came up with. I’ve...
Mar 24 2017 One of Rust’s major goals this year is to provide mentoring at all levels of the project. This is a goal I’m very on-board with. There’s lots of ways to get involved with Rust, but I’d like to talk about the bit I’m most involved in: documentation. There’s many ways to contribute to Rust’s docs. Some people contribute occasional PRs, some people end up contributing a lot....
Jan 24 2017 Rust has had a lot of stuff going on with “macros”. There are a few, interconnected aspects of these features, many different names for the same thing, and a lot of development work going on. This post will give an overview of the past, present, and future of macros in Rust. Ultimately, macros allow you to write things like this: let map = hashmap!{ "a" => 1, "b"...
Jan 12 2017 When I was working with Ruby on Rails, someone once sent me this link: http://contributors.rubyonrails.org/ In some ways, this link changed my life. You see, I respond really strongly to integers going upwards. I am a sucker for points, hits, whatever. That web page, however, puts that integer towards something useful: open source contributions. It’s fairly well known...
Dec 29 2016 My post yesterday got a lot of great responses. Two of them are from people I greatly respect, Dave Herman and Graydon Hoare. You should go read those two posts; this one is in response to them. I’m going to respond to...
Dec 28 2016 Rust is most well-known for its features around writing low-level code in a safer way than its predecessors. But it’s also a lot more than that. The Rust community is slowly evolving the way that we talk about Rust to people who haven’t yet given Rust a try, but it can take time. But how did we get here? In Rust’s initial release announcement, Graydon used a phrase that is amazing: [Rust is] Technology from the past come to save the...
Dec 21 2016 Today is four years since I first learned about the existence of Rust. I know this because Rust 0.5 was the first release I used. Rust has changed a lot in that time. For a brief overview of its history, watch this talk of mine. But for today, I thought it would be fun to check out the release...
Aug 15 2016 It’s been a while since I’ve mentioned my work on “The Rust Programming Language”, and I wanted to give you all an update. Before we get into the news, though, I’d like to take a moment to reflect on where the book has been, and then we’ll talk about it’s future. I previously wrote about my history with Rust and docs. As I said back...
Jul 26 2016 Learning the basics of a language and its syntax is easy. Learning how all those bits fit together is a bit harder. There’s a neat intersection between three of Rust’s features that I’ve seen people use, but never seen written down. I was explaining this technique to someone in #rust-beginners the other day, and thought I’d write it down in case it helps you, too. A small review: If you have a struct in Rust, like...
Jan 24 2016 Today is the last day of my 29th year of existence. I’ve been thinking about it a lot, which is extra strange because I don’t generally care about birthdays. I’m not much of one for holidays in general. So why do I care about this one? My 20s have been an extreme period of growth. At the start of it, I thought that I was going to live in my little farming town, get married to The Girl, go to mass every Sunday, and pretty much do exactly what everyone...
Dec 01 2015 There are few things I appreciate more than using software projects that have good documentation. When I’m new to the project, documentation is invaluable for helping me get going. When I’m not new, good documentation helps me get the information I need to :shipit:. We say programming is hard, and we hate bad code. So we practice writing code. We say writing docs is hard, and hate bad docs… — Some(@steveklabnik)...
Oct 28 2015 A long time ago, there was a big open source project, which was a huge part of the Rails world, but had almost no maintenance. This project was Resque, the go-to way to write background jobs for your Rails application. I attended a talk where the current maintainer was clearly getting burned out, and so, offered to help. The problem is, things have...
Sep 08 2015 I’m happy to bring you some news: “The Rust Programming Language” is going to be published, in physical form, by No Starch Press. I am really excited to work with No Starch on this: they’ve published some of my favorite programming books, like “If Hemingway Wrote...
Aug 23 2015 Rust has been through a lot of changes in recent years. As such, tutorials get out of date. We’ve occasionally said that including rustc -v in your blog posts would be helpful, but today, I saw this tweet go by: Tired of guessing what versions of Ember work with a given blog post? Check out
Jul 05 2015 I’m doing a little Ember app, and if there’s one thing I’ve learned from writing software, it’s to blog about error messages. Two-years-later me has ended up finding my own posts when searching for help! So today, when getting started with Ember Data 1.13, I was trying to use the new JSONAPIAdapter. I saw this code snippet: App.ApplicationAdapter =...
Jun 26 2015 I’ve always loved programming languages. I’ve spent plenty of times with many of them, and am fortunate enough that language design is now part of my job. In discussions about building Rust, I’ve noticed myself making a particular kind of argument often in design discussions. I like to call it ‘the language strangeness budget’. When building anything, it’s important to...
May 18 2015 One of the things that I love about open source is its ability to send improvements across projects. Sometimes, an improvement in one project ends up improving its upstream. This kind of network effect really gets to the core of it for me: steady, constant improvement.
I saw an example of this today that makes me smile. Before Rust’s 1.0 release, I wrote a
May 08 2015 “The people are unstoppable / Another world is possible” This has long been my favorite protest chant. For me, it gets to the heart of the matter: another world is possible. If I’m honest with myself, most days, I don’t really believe that the world will get better. We often present history as a kind of positive progression: the world has only been getting better, more tolerant, and less poor as the years go by. I don’t feel that,...
Mar 10 2015 The dismal science a difficult one. Many people have strong opinions about economics, and it determines many of their other political beliefs. As someone who has significantly different thoughts on this topic than many of my peers, I’m writing this post out to give a basic explanation as I see it. That doesn’t mean I’m inventing something here, just explaining the model that I currently prefer. I’ll give sources at the end, if you want to dig deeper....
Feb 27 2015 Lately, I’ve been giving a lot of thought to first impressions of Rust. On May 15, we’re going to have a lot of them. And you only get one chance at a first impression. So I’ve been wondering if our Intro and Basics are putting our best...
Dec 16 2014 Ever wanted to have your project automatically update Pages when you have a successful build? I have a demo repository here: https://github.com/steveklabnik/automatically_update_github_pages_with_travis_example It, of course, uses Travis to update its own Github Pages, which is here:
Sep 03 2014 This is something I’ve been joking about for a while, but I’ve decided for the near future, I’m just going to be posting things to Twitter, and not reading replies or anything. So, if you don’t get a fav or a reply or something, it’s nothing personal. There’s a lot going into this decision, but basically, I haven’t been actually doing a lot of things that I want to do because I’m super stressed out. Turns out Twitter is also a huge cause of...
Jun 16 2014 Historically, Rust has had a tough time with documentation. Such a young programming language changes a lot, which means that documentation can quickly be out of date. However, Rust is nearing a 1.0 release, and so that’s about to change. I’ve just signed a contract with Mozilla, and starting Monday, June 23rd, I will be devoting forty hours per week of my time to ensuring that Rust has wonderful...
May 20 2014 @steveklabnik including you? — Nick Quaranto (@qrush) March 5, 2014 I was always not quite sure about moving to San Francisco. I’ve heard about this place for my entire life: back in high school, during the first bubble, I would read Slashdot and wonder about life out west. But San Francisco is like a vortex for software developers. It’s got this gravitational pull that’s hard...
May 02 2014 I read a really great blog post last week: Solving FizzBuzz with Hypermedia. In it, Stephen Mizell builds a FizzBuzz service using Siren, and then shows how client code evolves. I wanted to explain exactly why I think this example is amazing, because I’m not sure it’s exactly obvious.
Apr 14 2014 I do a lot of work on open source, but my most valuable contributions haven’t been code. Writing a patch is the easiest part of open source. The truly hard stuff is all of the rest: bug trackers, mailing lists, documentation, and other management tasks. Here’s some things I’ve learned along the way. It was RailsConf 2012. I sat in on a panel discussion, and the number of issues open on
Feb 12 2014 Yesterday, npm, Inc. announced that it had closed a $2.6MM round of funding. This was met with a bunch of derision on Twitter. I feel this is not only unwarranted, but backwards: I think this investment signals a nascent trend within the VC community, and a more honest view of how open source actually works. Further disclaimer: I work for a company which has...
Feb 10 2014 A long time ago, I wanted an emoji gem. So I set out to make one. Turns out, emoji are damn complex. Emoji Licensing was one of the results. Who’d have guessed the hard part of making a gem was the legal part! Next up was that the ‘emoji’ gem was waaaay out of date: it was a library for converting between Japanese telecoms’ emoji, which was important years ago, but not now that they’re...
Jan 11 2014 I recently gave a proposal for Rust’s documentation. An important component of my overall proposal is a short, simple introduction for people who may have heard of Rust, so that they can figure out if Rust is right for them. The other day, I saw this excellent presentation, and thought it might serve as a...
Dec 31 2013 Every year I try to do a “year in Review” blog post, and every year I realize I didn’t keep good notes. Sigh. Overall, this was a pretty… meh year, to be honest. :/ Don’t get me wrong, a lot of really, really good things happened, but as far as my grand strategic life goals go, this year was pretty much treading water, and in some cases, regressive. Oh well. So instead of doing as much of a review, I’m going to instead discuss what I’d like 2014...
Dec 28 2013 Do you remember the first time you saw Rails’ ActiveSupport library? I do: it totally blew my mind. The only dynamic language I had used up to that point was Perl, and it had a similarly mind-blowing effect on my young self. I thought that dynamic typing was mostly a requirement towards making this kind of expressiveness possible, but it turns out Rust can be just as expressive, while retaining type safety and static dispatch. There was a time in the...
Dec 21 2013 I have long been a Bitcoin hater, for many reasons. But then, a fortnight ago, something happened. Dogecoin came into existence, and for some reason, I just couldn’t get mad about it. After some thoughtful self-evaluation this week, I’ve realized that Dogecoin has actually reversed my position on cryptocurrency. Here’s why: basically, I’ve come to see Dogecoin as an absurdist art project, mocking the entire...
Nov 30 2013 There has been a recent kerfuffle over a pull request to libuv: it was rejected, applied, reverted, and re-applied. There was some question as to the authorship of that commit, and I wanted to show you why that was, because it illustrates how git handles history. At first, the pull request was closed. Then, it was committed in
Nov 21 2013 My next venture will be joining up with Balanced, an API for marketplace payments, and I’m really excited about it. To the tax man, of course, the title of this post is “Why I’m going to be an employee of Balanced,” but I like to think about it as a partnership. Why I Balanced I first heard of Balanced almost exactly a year ago. You see, my friend Chad had...
Nov 18 2013 There used to be a post here: https://web.archive.org/web/20131118145002/http://words.steveklabnik.com/on-leftist-infighting After having some conversations on Twitter, I was made aware of some context around ‘infighting’ that made it problematic. I decided that the post was unworkable, as I certainly didn’t mean some of the...
Nov 14 2013 When I talk to people about systemic inequalities, one of the hardest things for them to understand is the concrete nature of how these relations affect the day-to-day lives of others. For many, this topic is an abstract discussion. For many others, this is life, day to day. In the interest of helping bridge this gap, I want to share a story with you from a few weeks ago. The setting: the West Village, Manhattan. The night: Halloween. In the early...
Oct 18 2013 Rust’s pointers are one of its more unique and compelling features. Pointers are also one of the more confusing topics for newcomers to Rust. They can also be confusing for people coming from other languages that support pointers, such as C++. This tutorial will help you understand this important topic. You don’t actually need pointers I have good news for you: you probably don’t need to care about pointers,...
Oct 01 2013 TL;DR: WANTED: Proletarian/petite bourgeoisie looking for capitalist/industrialist/haute bourgeoisie. I’ve got the labor power, you’ve got the money commodity. Let’s exchange commodities at full market value in accordance with the Law of Value; I know you’ll extract some surplus and alienate my species-being, but I really need to regenerate and reproduce myself so that I can be around to labor tomorrow. Yes, that’s...
Sep 28 2013 There are obviously a lot of factors that have contributed to my career as a programmer, but I think the most important one can be summed up in this sentence: Keep Saturdays sacred. You see, in college, my friends and I were moderately obsessed with writing software. We sorta stumbled onto a tradition of making sure that every Saturday, we got together and wrote code. At some point, we realized that this was the formula: If none of us set...
Sep 24 2013 I recently attended GoGaRuCo, which was a great conference. My favorite part, however, wasn’t directly attatched to the conf itself: it was a few moments of thankfulness. A lot of what I’ve been experiencing lately has been profoundly negative. That is what it is; there’s a lot of realy negative things in the world. But I’ve been a bit… overloaded lately. The two moments tie into each other: I’m at the speaker dinner. I bumped into someone...
Sep 19 2013 Today is the fourth _why day. So I thought I’d say a few words about his final gift to the rest of us, CLOSURE. Be Skeptical First, a few words about the words I’m about to write. Software developers (though you don’t have to be one to read this) love meta, so surely you’ll indulge me for these next few...
Sep 16 2013 I’ve just released Resque 1.25.0! Resque is the most stable, widely-used job queue for Ruby. It uses Redis as its backing store. This release is thanks to adelcambre, who took the time to get it over the finish line! <3. A total of 19 contributors helped out with this release, with 77 commits. Thank you to everyone! This release contains no changes from the 1.25.0.pre release...
Sep 10 2013 Every once in a while, I unfollow EVERYONE on Twitter. I did it again last night. Feels good, like a fresh start. Part of the problem is that I feel like I should be following everyone who I know in real life. This causes Twitter to be absolutely unmanageable, as I’m following far too many. So then I just dip into the stream every so often, but then I miss some people’s tweets entirely. So why follow them all in the first place? So, if I’ve...
Aug 06 2013 I recently decided to make an emoji gem. Of course, as with any project, I first look into the relevant licensing issues. What I found made me :cry:. Here’s the low-down on emoji and intellectual property law. A history So what are emoji, anyway? The Japanese spelling is 絵文字: 絵 (e) means ‘picture’ and 文字 (moji) means ‘letter.’ Picture letters. Simple. Back in the day, three different Japanese phone...
Aug 03 2013 TL;DR: if you use redis-namespace and you use send, Kernel#exec may get called. Please upgrade to 1.0.4, 1.1.1, 1.2.2, or 1.3.1 immediately. Link to the fix:
Jul 24 2013 TL;DR: Subclassing core classes in Ruby can lead to unexpected side effects. I suggest composition over inheritance in all these cases. Subclassing Review If you’re familiar with the concept of subclassing, skip down to “The Problem.” In Ruby, you can make your own classes: class List end You can also make...
Jul 23 2013 I’ve just released Resque 1.25.0.pre! Resque is the most stable, widely-used job queue for Ruby. It uses Redis as its backing store. This release is thanks to adelcambre, who took the time to get it over the finish line! <3 A total of 19 contributors helped out with this release, with 77 commits. Thank you to everyone! CHANGES You can see the full...
Home Blog Jun 25 2013 If you don’t want to use Turbolinks with your Rails 4 application, it’s easy! Just do this: Remove the gem 'turbolinks' line from your Gemfile. Remove the //= require turbolinks from your app/assets/javascripts/application.js. Remove the two...
Jun 22 2013 I’ve been thinking about death more than usual lately; my father died just before Father’s Day a year ago, and so I remembered, then was constantly reminded again on that day. But there’s another death that’s recently happened that really bothers me. The Internet is a really strange place. A few days ago, I was reading Twitter as I often do, and I saw a tweet that mentioned a death. I don’t remember which one it was, specifically, but I didn’t think a...
Jun 15 2013 A month or two ago, I made a conscious decision that I would return to using as much Free Software as possible. The PRISM debacle of the last week confirmed my fears and reasoning, and so I made the decision to accelerate the schedule. Here’s what I did, and how you can, too. My GNU/Linux Background The first computer I ever used was an Apple machine, and at various times in my life I’ve used GNU/Linux as my...
May 30 2013 This blog post works with Rust v 0.6, and may change in the future :). A common need in various algorithms is to iterate with some sort of step. A simple way to do this in Rust is with unit::range_step: let nums = [1,2,3,4,5,6,7]; for uint::range_step(0, bytes.len() - 1, 2) |i| { println(fmt!("%d & %d",...
May 21 2013 I’m writing Rails 4 in Action along with Ryan Bigg and Yehuda Katz. In updating the book to Rails 4, I started early: the sample app (ticketee) was done with 4.0.0.beta1. Then 4.0.0.rc1 came out. I didn’t upgrade immediately, but last night, I took the plunge. There were only three errors, and the...
May 16 2013 Last week, I decided that it was time to migrate one of my services away from Google: XMPP for IM. The nice thing about XMPP is that you don’t have to totally drop support for your old identity: since Google still uses it (for now), you can get online with both. Here’s how: I set mine up with
May 06 2013 I was quite pleased when RFC 6906 was finalized. It’s a really useful pattern that people are using to enhance documentation of their APIs. Let’s start with an example. I tweet something like this: “Oh man, the example.com API is super awesome. You should check it out!” - @steveklabnik seconds ago from...
Apr 19 2013 I spent six weeks of last December/January in my hometown. It was the first Christmas without my father, and it was cheap to stay, so I went back. It was my first time back in Pittsburgh since I’d moved away from the only place I’d ever lived. The trip was incredibly emotional for many reasons, but one of the best was when I decided to walk down the street to get a pizza. I had to wait ten minutes for it to cook, and so I decided to open up my web...
Apr 07 2013 Here are some error messages that I got when updating Rust for Rubyists from Rust 0.5 to the new 0.6, and how to fix those errors. Error: rust.rs:1:4: 1:16 error: unresolved name rust.rs:1 use task::spawn; ^~~~~~~~~~~~ rust.rs:1:4: 1:16 error: failed to resolve import:...
Mar 14 2013 If you truly want to understand technology today, then you should at least be familiar with the philosophy of Gilles Deleuze. Unfortunately for technologists, Deleuze is rooted firmly in a philosophical tradition and a writing style that they probably find opaque. In this blog series, I plan on explaining Deleuze’s philosophy in terms that programmers can understand. This is the third in the series. You can find the first
Mar 10 2013 Do you have a gem that needs to test against multiple versions of Rails? Doing it all can be complex, and while I have lots to say about this topic, but here’s one of the pieces: Travis build matrix. Here’s what you want: language: ruby rvm: - 1.8.7 -...
Mar 08 2013 Security is hard. One of the skills any OSS maintainer needs is how to do releases, and security releases are a special kind of release that needs special git-fu to make it work. I’ve created a repository so that you can practice this particular skill. It’s called ‘security_release_practice’. The problem ‘security_release_practice’ provides a binary, omg_insecure, which has a security issue. Basically, the...
Mar 06 2013 I’m going vim-gan. Basically, I don’t want to consume any source code which doesn’t come from vim, or products that contain non-vim source code. While I won’t, some people I’ve talked to will also consume code produced in Eclipse, since recent scientific studies show that Eclipse users can’t actually feel pain. This is enough of an ethical gray area that I’m staying away from it, but I can see that perspective. I just can’t stay silent while the...
Feb 24 2013 I’m a big fan of Puma these days. Today, I converted my blog over to use Puma, and I figured I’d share how I did it. This blog uses Sinatra. If you want to look ahead, here is the commit. Gemfile Installing Puma is really easy: just add gem 'puma' to...
Feb 13 2013 Last night, I took a big step forward in my writing career: I’ll be building upon the work Ryan Bigg was doing to take “Rails 3 in Action” and move it to Rails 4. I signed the contract a few weeks ago, but last night I actually did the first bit of editing, and successfully got everything through the system. Here’s the early access edition link, where you can check out what I’m doing. Of...
Feb 12 2013 I sent out an email today to everyone who’d previously purchased Designing Hypermedia APIs. Here’s the text: Hey there, First of all, I want to apologize for sending you an email. I try to keep these to a minimum. But this one is...
Feb 11 2013 Recently, the Rails team has committed to a specific policy related to release maintenance. Due to the rapid pace of recent releases, it’s good to understand how your apps relate to this policy. The policy was originally posted on Google Groups, here:
Feb 07 2013 Hey everyone! I made a video today about Ember.js and accessibility. I had always been repeating what I’d heard about screen readers: they can’t work with JavaScript. Turns out that’s not exactly true. The video is the best way to show you: VoiceOver, Ember.js, and WAI-ARIA from Steve Klabnik on
Jan 31 2013 Due to the recent situation with Rubygems.org, a lot of people noticed that they rely on Rubygems.org when deploying. A lot of people advocate “vendor everything”, and while that’s one approach, I actually don’t think it’s necessary. I think a lot of people think they rely on...
Jan 23 2013 Soooo there’s this thing: http://harthur.wordpress.com/2013/01/24/771/ First of all, unequivocally, I said it before, and I’ll say it again: I’m sorry, and feel terrible that I made someone feel terrible. @harthur, I felt bad yesterday, and I’m feeling bad again. Not that it helps you that I feel bad. But I don’t like making other people feel bad. I am sorry.
Jan 16 2013 http://whytheluckystiff.net/ has re-ignited a discussion about _why, and while I have tons and tons and tons of things to say on the subject, this is all I can give you for now: _why is a role, not a person. For a long time, I was talking about a separation between _why and the person who played him. I still have not yet figured out how to refer to that person, and so for now, I’ve settled on...
Jan 14 2013 Rails’ greatest strength is “Convention over Configuration.” Basically, Rails makes a ton of default choices for you about how things should be named, where they should go, and other things. This is why working with Rails is so productive for an experienced developer: just follow the Golden Path and everything comes together quickly. It’s second greatest strength is its ‘full stack’ nature: Rails includes everything that you need to get going. It does not...
Jan 14 2013 Today, I released Draper 1.0.0! Draper is a gem that gives you decorators/view models for Rails. Rubygems: https://rubygems.org/gems/draper GitHub: https://github.com/drapergem/draper README:
Dec 29 2012 I always enjoy reading patio11’s year in review posts, and while I didn’t take enough notes for this year to do a GOOD one, I figure that I should at least leave some notes so that when I do one next year, I’ll have something to benchmark against. Ruby This has been a whirlwind year for my career. My work with...
Dec 28 2012 I work on a lot of different things. Sometimes I get asked how I find the time, but there’s another aspect not related to time management: most of my projects build off of each other. Draper and RequestStore This issue got filed in Draper. What...
Dec 21 2012 Long long ago, I got an internship in college. Back then, I didn’t know anything about web development. My college professor said “GET and POST are the same thing, it’s just that GET requests show parameters in the URL bar.” But a friend of mine was working at this post-acquisition startup. They still operated as an autonomous unit within the parent company, so they were still pretty fun to work for. People would upload us MP3s and we’d give them a podcast....
Dec 19 2012 Normally, I’m a bit of a grinch. I’ll admit it, I really hate Christmas. It reminds me of all of the worst parts of America: You know, how the baby Jesus commands us to literally shop until we kill each other… Anyway, today, I was teaching a bunch of brand new Rails devs, and I had to explain the mysterious hidden input that...
Dec 17 2012 Last night I had some insomnia, so I wrote a gem. Here it is: https://github.com/steveklabnik/request_store. TL;DR: If you’re using Thread.current in your Rails app to store global-ish data, don’t do it! If you use Thin or Puma or a threaded web server, it won’t get reset between requests, and you’ll end up with subtle bugs. So do this...
Dec 13 2012 If you’re looking for crazy simplicity in your ‘switch between multiple Rubies’ life, you may want to check out chruby. Written by Postmodern, it’s basically the simplest possible thing that can work. As in, 76 lines of shell script. For that, you get:
Dec 07 2012 If you truly want to understand technology today, then you should at least be familiar with the philosophy of Gilles Deleuze. Unfortunately for technologists, Deleuze is rooted firmly in a philosophical tradition and a writing style that they probably find opaque. In this blog series, I plan on explaining Deleuze’s philosophy in terms that programmers can understand. This is the second in the series. You can find the first
Dec 03 2012 I’ve relased the second beta for Draper 1.0.0! Many thanks to all of you who gave the first beta a shot. We’ve fixed some issues, and I’d apprecaite you giving this one a try. This solves all known issues with Draper, including every one we’ve found in 1.0.0.beta1. You can get it by installing it from Rubygems: $ gem install draper --pre or by putting it in your...
Dec 03 2012 If you truly want to understand technology today, then you should at least be familiar with the philosophy of Gilles Deleuze. Unfortunately for technologists, Deleuze is rooted firmly in a philosophical tradition and a writing style that they probably find opaque. In this blog series, I plan on explaining Deleuze’s philosophy in terms that programmers can understand. This is the first in the series. Enjoy. The ancient Greeks thought that...
Nov 30 2012 I’m happy to announce the release of Draper 1.0.0.beta1 today. If you use Draper, I’d appreciate you checking out the beta release in your app, kicking the tires, and letting me know what’s up. You can get it by installing it from Rubygems: $ gem install draper --pre or by putting it in your Gemfile: gem "draper",...
Nov 22 2012 Ruby on Rails is a great tool to build websites incredibly quickly and easily. But what about applications that aren’t websites? Rails is still a first-class choice for this use-case, but why settle for good when you could be the best? That’s why I’m happy to introduce Rails API: a set of tools to build excellent APIs for both heavy Javascript applications as well as non-Web API clients. What Rails’ greatest feature is making...
Nov 18 2012 Occasionally in this big wide world, things happen. When things happen, we like to tell each other about it. When you take a bunch of connected events and tell someone about it, you’ve formed a narrative. Narratives are important, because they tell the story! The details of the account that one presents can really shape how others view those events later. Due to our lived experiences, we often have our own ‘internal narratives.’ You can think...
Nov 08 2012 So you’ve contributed some code to an open source project, say, Rails. And they’d like you to squash all of the commits in your pull request. But you’re not a git wizard; how do you make this happen? Normally, you’d do something like this. I’m assuming upstream is a git remote that is pointing at the official project repository, and that your changes are in your ‘omgpull’ branch: $ git fetch...
Nov 06 2012 purity There is always a tension between Theory and Practice. These two separate realms are connected through a process of abstraction and application. To explain this relationship by way of theory, Theory deterritorializes Practice, and Practice reterritorializes Theory: a Theory which is a becoming-Practice and a Practice which is a...
Oct 25 2012 “Humans are really squishy, messy, complicated, and contradictory. That’s what makes life interesting.” Veggie Grill is damn delicious, but it’s hard to talk and eat at the same time. I’m usually trying to shovel my Santa Fe Chickin’ sandwich into my face as hard as possible. Today, though, there was a screw-up, and I didn’t get my food for a while. So I talked instead. “Do you know anything about Hegelian dialectics?” My friends are the...
Oct 12 2012 Music has always been very important to me. Throughout most of my life, I’ve listened to a lot of music, and it’s played a huge role in defining my personality at the time I listened to it. In many ways, the history of the music I’ve listened to is a history of me. Here’s a look at where I’ve been, and where I’m at now. Country My parents essentially listen exclusively to country music, and so it’s basically all I listened...
Oct 04 2012 I often see comments like this in the Rails bugtracker. Generally, someone is running an older version of Rails, and some bug they face has been fixed on edge. But they may be running a version that’s too old to recieve fixes, or need a fix that has yet to be included in an actual release. What to do? Luckily,
Sep 27 2012 Turbolinks test from Steve Klabnik on Vimeo. If you don’t feel like watching… https://github.com/steveklabnik/turbolinks_test Results with 1000 pages: Blank Rails...
Sep 27 2012 I’m often asked the question, “How do you find the time?” Mostly, it’s around open source, sometimes it’s about books, and occasionally, on other things. I’ve generally deflected the question with something like “I don’t know, man, I just do it.” But that answer isn’t very helpful. And I’ve been wondering if I can do even better. So I’ve done some reflection this week, and here’s how I find the time:
Min/max
Sep 22 2012 If you’ve ever done background job stuff with Rails, you’ve probably used Resque. Resque is “Yet Another GitHub Project They’ve Open Sourced and Then Abandoned.” But Resque is super awesome: it builds a job queue on top of Redis, which is a totally awesome piece of software. Anyway, Resque has been psuedo-abandonware for a while now. In January,
Sep 18 2012 “Are you sure you’re not vegan? You look like a vegan.” Chad Fowler made me laugh pretty hard that day. We were in Austin, at a Ruby conference, and getting some very non-vegan food at the excellent Iron Works BBQ. I had only talked to Chad a few times before, and while chowing down on some excellent ribs, we talked about something that we’d discussed in a previous conversation: “the Ruby community.” I gave a talk at Lone Star Ruby last year...
Sep 09 2012 If you didn’t know, classes are first-class objects in Ruby: 1.9.3p194 :001 > String.class => Class 1.9.3p194 :002 > Class.class => Class How is this useful, though? Inheritance You may create very simple classes at times. This often happens when...
Sep 03 2012 This is the second part of my series on protocol. The first part contained a lot of background information, but now we’re ready to get into what Protocol actually is. I live in a pretty unique place, the Farmhouse. It’s a psuedo-public space in which we live, others work, and everybody has a...
Sep 01 2012 One of my favorite classes in Ruby is Struct, but I feel like many Rubyists don’t know when to take advantage of it. The standard library has a lot of junk in it, but Struct and OStruct are super awesome. Struct If you haven’t used Struct before, here’s the documentation of Struct from the Ruby standard...
Aug 31 2012 I’ve started a new blog: Words. You may have noticed that it’s a part of the Svbtle blogging network. I’m super excited about this, but you may be confused. Let me explain. My relationship with writing I’ve been involved in Internet communities for most of my life. One of the nice things about...
Aug 13 2012 “I finished by pointing out that, like scientists, people in the web development community had to be ethically and morally aware of what they were doing. I thought this might be construed as a bit out of line by the geek side, but the people present were the ones now creating the Web, and therefore were the only ones who could be sure that what the systems produced would be appropriate to a reasonable and fair society.”Tim Berners-Lee, “Weaving...
Jul 25 2012 I’ve recently come across one of the most addicting, interesting experiences I’ve ever had online: DayZ. I hesitate to call it a ‘video game,’ because while it is a mod for a first person shooter game, it basically ignores all common wisdom about what makes for a good game. I think that the broader implications are also interesting across other domains: ‘common wisdom’ isn’t always correct. Sometimes...
Jul 21 2012 I purchased Sparrow back when it was $9, and didn’t find it particularly amazing. I did like it, but ended up using the web interface more. I certainly got my $9 of value out of it, though, even though I used it for a short time. However. There’s been a lot of complaining about Sparrow’s acquisition, and a lot of complaining about complaining. Most of the complaining about the complaining argues that...
Jul 14 2012 Once upon a time, I was building my First Serious Rails App. I was drawn to Rails in the first place because of automated testing and ActiveRecord; I felt the pain of not using an ORM and spending about a week on every deploy making sure that things were still okay in production. So of course, I tried to write a pretty reasonable suite of tests for the app. To gloss over some details to protect the innocent, this app was a marketplace: some people owned...
Jul 05 2012 After RailsConf this year, I joined the Rails Issue Team. This means that I help triage issues that people have filed, try to reproduce errors, and point core team members at ones that are most important. Since doing that, a few people have asked me how to get started, so I decided to draw up my thoughts here. Note that there is also an official Rails Guide on...
Jun 29 2012 Ever had an issue on GitHub, and then you fixed the bug? Opened a brand new pull request, which becomes a new issue, and then you have to remember to link the two via a comment, or manually go back and close the issue as well? Turns out that GitHub has the power to turn Issues into Pull Requests in the API, but not in the web UI. So I wrote a tiny web app that lets you use the API call yourself:
May 31 2012 I found this on a flyer in my neighborhood. On may 19th, three people associated with the Occupy movement were arrested in Chicago, just before the anti-NATO protest. Two infiltrators had been working with them for months, trying to persuade them to escalate their tactics – just as in the recent Cleveland bomb scare. Whether the infiltrators would have succeeded in pushing them further than they wanted to go, we’ll never know. Desperate to make...
May 30 2012 This morning, my mother woke up and found that my father had passed away in the night. Thanks for all the love and support you all have shown me over the last two months. It’s been hard, but you all have made it easier. Don’t be worried if you don’t see me around a lot for the next few days. Just trying to take some time off from the hustle to help my family heal. And to just play video games and be a bit mindless. No, seriously. Thank...
May 25 2012 As you know, I’ve been doing a lot of work over the last few years to keep _why’s Shoes project going. A few other intrepid individuals have been doing a lot as well. We’re starting to work on Shoes 4, and we’d love your help. A little about Shoes If you didn’t know, Shoes is a GUI toolkit for Ruby. It uses blocks...
May 07 2012 I spend an unusually large amount of time thinking about interactions between what I call ‘past me’ and ‘future me.’ It seems that my life changes significantly every few years, and I like to ground myself by imagining how odd it would be if ‘current me’ could tell ‘past me’ things like ‘Someday, you’ll be speaking at OSCON.’ It’s not always general life stuff,...
Apr 30 2012 Walking down the street, a woman cries for help. She’s blind, and the curb is large, and she’s unsure of herself. Knowing it’s not safe, she seeks the help of a stranger to guide her on her way. Three or four people pass by, but then someone stops, gives her their arm, and guides her safely to her destination. HOOOONK!!! A large truck is blocked from going down the street. A Lexus with out-of-state-plates is in the way, and the driver...
Apr 22 2012 Hey everyone! It’s been a few weeks, and I wanted to update you guys on the card situation. First of all, thank you so much. Every single one of you who sent cards, thank you! It was truly amazing to see so much support. I was even more surprised that I basically put my address on the internet and nothing particularly bad happened. Zero trolls. Restored some of my faith in humanity. We ended up with about 500 cards. My dad is well enough to stay...
Home Blog Apr 05 2012 So I said I was gonna build antisocialne.ws. But I’m changing gears instead: I’d rather do this project, which has a better spec and needs a reference implementation. Building StoreEngine from Steve...
Mar 31 2012 People are often surprised to find out that I identify as an anti-capitalist. At least in America, many people see capitalism as inevitable, or even as the way things always were. Unfortunately, there’s so much rhetoric and confusion around this topic that it always takes a long time to break it down. I’d been meaning to write something about this topic, but then I found this really great work called
Mar 26 2012 Hey everyone. If you follow me on Twitter, you’ll know that I’ve been a bit absent lately. Basically, my dad has angiosarcoma. It’s a really rare cancer of the blood vessels. A city the size of Pittsburgh sees two cases every ten years, roughly. It’s certainly terminal, while he had some chemotherapy a few days ago, we won’t know if it’s helped at all for another week or so, and if it...
Mar 08 2012 I’m so very close to releasing the beta of Get Some REST. However, I’m about to get on a plane to Poland, and that’s a bad time to launch things. ;) wroc_love.rb, here I come! Anyway, I figured I’d give you a preview of some of the content that I’ve been working on. This particular article is short, but it’s also a public response to...
Feb 27 2012 Originally, this post was titled “A RESTful Reading List,” but please note that REST is over. Hypermedia API is the new nomenclature. I’ve been doing an intense amount of research on Hypermedia APIs over the last few months, and while I didn’t save every resource I found, I’ve made a list here of the most important. I’ll be updating this post as I get new...
Feb 23 2012 REST is Yep. Sorry to have to inform you. REST is totally over. The cool kids are moving on. We’re building “Hypermedia APIs” now. Such is life. A lesson from the anti-globalization movement Way back in the day,
Feb 13 2012 NOTE: The alpha of my book on APIs is out! Check it out at http://designinghypermediaapis.com. As I’ve done research on APIs for Designing Hypermedia APIs, I’ve become increasingly interested in different styles of API. I currently see most real-world deployed APIs fit into a few different categories. All...
Jan 23 2012 Because I don’t have enough gems made already, I made another one last night: metadown. This blog originally used Jekyll. When I moved it to my own personal blog implementation, I noticed something: Markdown doesn’t actually have support for adding YAML at the top of your files, like Jekyll does. I always knew this, I just didn’t think about it before. And I love using Markdown,...
Jan 17 2012 I love both Sinatra and Rails, for different reasons. I’ve heard a few different heuristics for which framework would be better for your application, but I’m not sure the answer is all that simple, really. Regardless of which is correct for your application, I haven’t seen a lot of people discussing how to move between the two frameworks. Step One: Evaluate your test coverage In
Jan 06 2012 I’m a big fan of using the presenter pattern to help separate logic from presentation. There’s a great gem named Draper that can help facilitate this pattern in your Rails apps. When doing research for my book about REST, I realized that the presenter pattern is a great way to create responses that comply with the hypermedia...
Dec 30 2011 It is practically impossible to teach OO design to students that have had a prior exposure to Rails: as potential programmers they are mentally mutilated beyond hope of regeneration.Edsger W. Dijkstra (paraphrased) I love ActiveRecord. It was the first ORM I’d ever interacted with. My first technical employer had commissioned a DBA, and so of course, we wrote all our own queries. Which was fine; I know my way around a JOIN or...
Dec 22 2011 Just a quick note about Devise, and its RESTful implications. I ran across this error today, and thought I’d share. I was trying to log out, so I hit the normal route for such things with my browser. Here’s the error: Devise: ActionController::RoutingError (No Route Matches [GET] /users/sign_out) Uhhhhh what? I run rake routes… $ rake routes |...
Dec 21 2011 It’s true. If you haven’t used it yet, Redcarpet is the Markdown parser that GitHub uses to work all that magic on their site. So of course, it’s awesome. You can use it and abuse it What makes it really awesome is the custom renderers feature....
Dec 20 2011 The other day, I was working on some Cucumber features for a project, and I discovered a neat technique that helps you to write better Cucumber steps. Nobody wants to be cuking it wrong, but what does that really mean? Here’s Jonas’ prescription: A step description should never contain regexen, CSS or XPath selectors, any kind of code or data structure. It...
Dec 15 2011 An aside for software devs You might not care about anarchism, and I can almost guarantee that you don’t care about Marx, but please bear with me. I think my point is best made by putting the web stuff at the end, so please, just read it. ;) It’ll be good for you, I swear. I’ll explain better at the end. Domain Specific Languages and information...
Dec 12 2011 If you haven’t used it, CanCan is a great library for Rails that handles authorization for you. Its calling card is simplicity; just do this: class Ability include CanCan::Ability def...
Nov 28 2011 Disclaimer: I do have a small credit in this book. A long time ago, the author mentioned that he was looking for people to help out, so I stepped up. It was only participating in discussions like “What do you think about version control’s use in industry?”; I didn’t help with any actual writing, and yesterday was my first time reading virtually all the final content. No monetary interest, of course. Lots of new books...
Nov 17 2011 I have a confession to make: Other than one little stint at RubyC, I haven’t really written code in almost a month. And I haven’t really written a ‘real’ blog post in almost six weeks. It happens. I was hitting it really hard there for a while, and the combination of stresses from travel, speaking, writing, conference parties, and everything else was really getting to me. I don’t think that I was burned out yet, but I decided to explicitly take...
Oct 25 2011 No, seriously. This is a public service announcment to all MBAs who want to do startups: ‘platform’ does not mean ‘web site.’ I know that ‘platform’ is a hot thing right now. But seriously, the term has become basically useless. It’s almost to the point that I just pretend you don’t even say it. A platform is primarily a B2B play. It can be B2C too, maybe, but largely, to have a platform, you need to enable other people to build something....
Oct 19 2011 Rubyists have a saying, or at least, we used to. “Matz is nice so we are nice.” This has sort of been lost over the years… some people who have been around Ruby for a long time still say this, but it’s something that’s gone in and out of popularity. Nice should be the default Most of being nice, in a software context, is about being considerate. Not unnecessarily trash talking other people’s stuff. Not going out...
Oct 19 2011 Yep. Doin’ it. This morning I swung by the Sprint store and picked up a 4G hotspot. Gonna transfer my number to Google Voice this evening. lolwhut? Yep. I’m terribly addicted to my phone right now. This is fine, but I’m always interested in improving myself. I have a few friends who’ve done similar things, and really enjoyed it. So I’m giving it a solid 6 months. Sometimes, experiments work, and sometimes they don’t. I’m doing this...
Oct 04 2011 You walk into work tomorrow morning, and your boss says this: Boss: Hey, we’re gonna need to go ahead and have you implement require_relative in rubinius. We have some new servers coming in, and we’ll be running it in production, but we use some 1.9.2 features of MRI that haven’t been implemented yet. So if you could just go ahead and get to implementing that, that would be terrific, OK? Wat do? (Disregard that...
Oct 01 2011 I finally got to see Zach Holman give his talk, How GitHub Uses GitHub to Build GitHub. It was awesome. Zach is a great speaker, and the slides don’t do it justice. I highly recommend catching it on video or in person sometime. Anyway, there’s something that I found really interesting about GitHub’s ‘process’: it’s basically anarchism, applied to...
Sep 28 2011 I came across a blog post the other day titled Modern Ruby Development. While it’s a perfectly fine blog post (other than the digs at rvm…) it really should have been titled something more along the lines of “My default tooling to build a Rails application.” I thought of this yesterday, as I was invited to show up at
Sep 26 2011 Well, it’s the end of the web as we know it. I’d already been thinking about this all weekend, and last night, I decided. I just can’t deal with Facebook’s crazy privacy stuff anymore. I mean, I already basically forked Twitter over their ToS, and Facebook has been a lot more evil for a lot longer. Frictionless...
Sep 23 2011 Hey everyone! I just wanted to share One More Thing with you about this rstat.us refactoring. The main thrust of the last article I posted was to show you a technique for extracting a class, getting it under some kind of test, and then refactoring it a bit. Refactoring is always an iterative process, and Ryan Bates from the always awesome Railscasts asked me why I made the Salmon class into a module,...
Sep 22 2011 Hey everyone! We’ve been doing a lot of refactoring on rstat.us lately, and I wanted to share with you a refactoring that I did. It’s a real-world example of doing the domain models concept that I’ve been talking about lately. Step one: check the tests I don’t know how much more emphasized step 1 of refactoring could be: don’t touch anything that doesn’t have coverage. Otherwise, you’re not...
Sep 12 2011 Programmers like to think that software is the purest form of meritocracy. We like to consider ourselves scientists; what we do is entirely impersonal. I’m at Lone Star Ruby right now, and the first two talks are entirely about software as a science. But this is a fallacy. There’s a human element to open source that’s often totally forgotten, and it drives people away. Software Celebrity and Hero...
Sep 09 2011 My last blog post caused a bit of a stir in some circles. I got a bunch of emails. Apparently, I need to expand on a few things. So here we go. Let’s rap about the Presenter pattern, shall we? No seriously, helpers suck In Ruby, everything is an object. Every bit of information and code can be given...
Sep 06 2011 UPDATE: I also have a follow-up here. I often tell people that I learned Ruby via Rails. This is pretty much the worst way to do it, but I’d learned so many programming languages by then that it didn’t hinder me too much. The one thing that it did do, however, was give me a slightly twisted sense of how to properly design the classes needed in a Rails app....
Sep 04 2011 By now, the pomodoro technique is pretty well-known amongst programmers. I forget where I heard of it first, but if you haven’t, here it is: Break your day up into 30 minute chunks. Work for 25 minutes, break for 5. Repeat. It’s easy to stay concentrated when you know a break is coming up soon, the fact that you can fit two in an hour fits with my natural sense of order in the world, and once you...
Aug 22 2011 Okay! So, if you’d read my previous article on this, you’d know how easy it is to contribute to Ruby’s Documentaiton. But Steve, I’m still kinda scared. Okay, so here we go: I’m making it even easier on you. Send me what you want changed, and how, and I’ll make a patch and submit it on your...
Aug 07 2011 This is a follow-up post to my post here. You probably want to read that first. UPDATE: Please note that ‘REST is over’. ’Hypermedia API’ is the proper term now. A few words on standards versus...
Jul 24 2011 When I spoke on a panel at RTLM NY ’11, I got a little rise out of the crowd when I said “Twitter is too important to be owned by Twitter.” This is still absolutely true, and yesterday was a great example of that: the #fuckyouwashington debacle. If you haven’t heard, Jeff Jarvis started something on Twitter last night:...
Jul 03 2011 HI HN, PLEASE READ THIS!!! Since I’ve posted this, I’ve refined a few of my positions on things. Everyone learns and grows, and while I still stand by most of what I said, I specifically don’t agree that versioning the media type is how to properly version APIs. Hypermedia APIs should not actually use explicit versioning, but I’d...
May 21 2011 Hey everyone. Here’s a draft of an essay I’ve been working on. I’d love to hear your feedback. The word ‘engineering’ has a deep connection to the word ‘trade-offs’ in my mind. Most engineering decisions come down to evaluating a few differing alternatives, and often multiple factors end up being negatively correlated. You can make something stronger, but then it will be heavier. It can be made faster, but then it’s significantly more expensive. A good...
May 20 2011 Update! I’m now making it even easier than this: Read my new post about how I’ll do this for you. That said, if you want to do it yourself, the following will tell you how. Original Article Ruby 1.9.3 is coming out soon!
May 12 2011 Well well well, some things never change. Long ago, I hosted my own blog, and here we are again. I’ve moved everything over to Jekyll, if that means anything to you. You can now look at my blog on GitHub. Big thanks to this article for lots of help and pointers with final deployment stuff, and
Mar 30 2011 Hey everyone. A lot of people have been asking me about rstat.us lately, so I figured I’d tell a little bit of the story as it’s gone down so far. Stats First, here’s some numbers: Users: 4553 Uniques: 25,000 Pageviews: 119,385 Pages/visit: 4.77 Statuses posted: 9387 Here’s some fun info: stats on statuses by...
Mar 23 2011 Whew. If you’ve been following me on Twitter at all lately, you’ll know that I’ve been working hard on a new project lately. Tonight, even though it’s late, I’m finally getting it out there. Please welcome http://rstat.us/ to the world! (as soon as the DNS updates. ;) ) rstat.us is a...
Mar 18 2011 I’ve heard Ruby Mendicant University (also known as RMU, not to confuse you Robert Morris alums!) described as “the best kept secret of the Ruby community.” High praise, indeed. If you haven’t heard about RMU before, check out this presentation by Andrew Cox: TL;DR: RMU is a free, online ‘unversity’ from Gregory Brown, author of ‘Ruby Best Practices.’ You enter an intermediate Rubyist,...
Mar 03 2011 I’ve been thinking about this post for a while. I freaking love Hacker News. It’s my favorite place on the Internet. It’s incredibly valuable. I have learned so much from my time there. With that said, I feel like it’s taken up too much of my time. I’m trying to accomplish things. I got accepted to grad school. I’m trying to rebuild Shoes. I’m working on improving Hackety. I’m finding that I don’t have enough hours in the day to accomplish the...
Feb 24 2011 I’ve been joking for a while that I’d like to “move to the Internet.” Generally I cite my familiarity and love with online culture as opposed to American culture. I don’t really care what’s going on in “the real world,” as I feel it’s kind of played out. The whole cycle of “fight wars, reduce freedoms, sit in front of your TV” has gotten really boring quickly. I find Internet culture to be more complex, entertaining, and useful. But I’m getting way off topic,...
Jan 22 2011 I’ve almost always been in a habit of reading. When I was younger, I spent a lot of time in the library. I’d just grab an entire series of novels, and read them all, right in a row. Sometimes I’d end up reading non-fiction too. I ended up with a lot of books on software. Then my local library got Internet access. Slowly, I started to spend less time in the stacks and more in front of a terminal. This wasn’t a bad thing; I still kept reading. What’s...
Jan 02 2011 This year I’m happy to report that I have much more upbeat plans than last year’s kind of sad post. With that said, here’s my 2011 goals: I want to work for other people 2 days per week on average for the year. I want to write something every day I want to keep building on the initial success that Hackety Hack’s 1.0 launch has brought. I’d like to get a new release out every month or so, with a 2.0 for Christmas 2011. I...
Home Blog Dec 25 2010 It’s been a long journey. I have a lot to say about this, but it’ll have to wait until I’m not in the middle of nowhere spending some time with Maria’s family. I just wanted to tell you all Merry Christmas, and point you at the
Nov 17 2010 I’ll cut to the chase: I’ve stepped down as CTO of CloudFab. I don’t want to discuss details, but life is too short to not be doing what you want with it. And, after a period of careful thought and consideration, it’s no longer the right thing for me. It was an amicable parting, and my replacements are already in place, and doing cool things. I’m happy with what I’ve accomplished, but it’s time for me to move on. This raises the question: what am I...
Sep 24 2010 I find it incredibly hard not to be judgmental. I’m not sure what part of my personality makes this happen, but even when I try to curb tearing down other people, I end up doing it anyway. I’m not sure if it’s just me, but I think part of the problem is that these kinds of things are rewarded. One of the reasons that I use my real name everywhere is to try to improve the civility of my discourse. When you’re anonymous, it’s really easy to be...
Sep 21 2010 It’s funny how true this quote is. There are three people that I really admire: _why, Zed Shaw, and Yehuda Katz. And to simplify my tenses a bit, I’ll speak of _why in the present tense. What do these three guys have in common? They all churn out badass software like nobody’s business. _why started so many projects that it just adds to his mythical qualities; Zed has been cranking out software and blogs left and right, and Yehuda’s “
Sep 17 2010 So, Wednesday, Diaspora was released. If you’re not familiar, a few months ago everyone was up in arms about the latest Facebook privacy change. So four college kids started a Kickstarter project with a dream: let’s make a distributed, private Facebook. They asked for $10,000. They got about $200,000. They worked on the...
Aug 19 2010 Today is Whyday. A programmer’s holiday. Today is the day that we don’t forget that programming isn’t all Agile and driven by behavior and Serious Business. Inside each cubicle, the hacker spirit is trying to burst free. Today, it will. Today, I’m also releasing a prerelease version of Hackety Hack 1.0. It’s been a long time coming. The announcement of Whyday got me thinking about the past year of a world without _why, and the ‘your domain is about to...
Jul 24 2010 Sometimes, insight comes from very unlikely places. I’m keenly interested in the music industry, and how it will evolve, or possibly die. I care deeply about music; it’s had a profound effect on my life over the years. Even though the entire industry has been screaming that they’re dying, I truly believe that music will never die. It’s bigger than money. I’m not exactly sure about the details, even though I have some ideas. In any case, I was...
Jun 30 2010 The images in this post have been lost to time. Oh well. Original post below, images removed. The other day I wrote a post about being excellent to each other. Today, I’ve got a great example of that for you: Divvy. What would you do if you received an email like this? Here’s what happened: Here’s a
Jun 08 2010 Right now, I’m having a bit of a ‘darkness before the dawn’ kind of moment. I feel like I might soon start to become productive again. It’s sort of strange, how these things travel in waves. Just a month or two ago, I was super-ultra-crazy productive. I was working on Hackety, coding Bindlr, writing three days a week on the blog, and more. This doesn’t even count the more-than-a-full-time CloudFab. But lately, all I’ve wanted to do was hang out and play...
Apr 27 2010 Pretty soon, Twitter is going to turn off Basic Authentication and switch entirely to OAuth. People are upset. It’s natural. If apps aren’t updated, they’ll stop working, entirely. This could be bad. But in the long run, it won’t be. In any sort of long-term endeavor, things can go sour,...
Mar 10 2010 I’ve been waiting for this book for a while. “Rework” is the new book by Jason Fried and David Heinemeier Hansson from 37signals. It hit stores on Tuesday. Here’s a (non-affiliate) link to Rework on Amazon. For those of you who...
Mar 08 2010 Ever wonder why some websites are so addictive? Certain sites always keep you going back, time after time after time. Well, I can’t speak for all of them, but there’s a subtle reason that some sites draw your attention on such a repeated basis: They’re actually games. Wait, games? Try a little thought experiment: If I say, “Yeah, he’s a ______ addict,” what are the first few things that pop into your mind? For me, top two are...
Mar 05 2010 Sometimes, when responding to a support request, it’s nice to see what your users see. At the same time, you don’t want to ask your users for their passwords, out of respect for their privacy. So what do you do? Well, *NIX systems have a program called su. Here’s what man su has to say: NAME su - run a shell with substitute user and group...
Mar 01 2010 I bet social psychologists are having a field day with the Internet. I know nothing about the field, so I don’t know if there are thousands of papers about it already written or not, but there should be. I can’t image that we’ve ever had a period in history when more communities are being formed; they’re also being formed out in the open. I’ve been involved in many different online communities over the years. I’ve already written before about the...
Dec 31 2009 For those of you that don’t know, I’ve taken over a project by someone named _why. He dropped off of the face of the Internet back in March, and the community has picked up his works. Because I’ll be writing about the project in the future, and because I feel these words are still relevant, I’m reprinting the two of his essays that led up to the creation of the project, Hackety Hack, here on my blog. Here’s the second one. Enjoy.
Dec 28 2009 For those of you that don’t know, I’ve taken over a project by someone named _why. He dropped off of the face of the Internet back in March, and the community has picked up his works. Because I’ll be writing about the project in the future, and because I feel these words are still relevant, I’m reprinting the two of his essays that led up to the creation of the project, Hackety Hack, here on my blog. Enjoy. The...
Dec 02 2009 A short time ago, the G20 came right here to Pittsburgh. With an event of such worldwide importance happening in our backyards, several people decided to document it via social media. The Mattress Factory did a site called “MyG20” and it did pretty well. Some smaller groups did their own thing. But IndyMedia did one better: http://indypgh.org/g20/ The