Below you will find pages that utilize the taxonomy term “Programming”
Post
Python Patterns: kwargs helper method
Writing usable, functioning code can be hard enough. Now imagine writing code that you need to make extensible enough that other developers can extend without simply copy-n-pasting your source code and making their own modifications. That can be rough. There are some patterns that you occasionally find in frameworks like Django, however, that I haven’t seen documented. This morning, I contributed a bugfix to werkzeug based on a pattern I’ve seen before.
Post
Rethinking Web Frameworks in Python
Listening to @pragdave talk about Exlir’s pipes he was talking about how these two styles, while fundamentally the same, have vastly different readability:
"".join(sorted(list("cat"))) Try to explain that line of code to someone who doesn’t program. You start by telling them to just skip over everything until they hit the center, that’s the starting point. Then, you work you way back out, with each new function adding one more layer of functionality.
Post
Timeless Way of Coding
… we must begin by understanding that every place is given its character by certain patterns of events that keep on happening there.
The above quote is in the opening chapter of one of my favorite books of all time, The Timeless Way of Building by Christopher Alexander. Alexander is famed in programming circles as the author of A Pattern Language which set the stage for programming design patterns some 40 years before the Gang of Four wrote the book.
Post
Importance of Context
Today I discovered the 99% Invisible podcast on architecture and design. Their latest podcast, Pruitt–Igoe Myth, tackles the problems associated with the Pruitt–Igoe housing project which was built in the 1950s in St. Louis to provide affordable housing in the St. Louis urban core. Due to a variety of reasons, which the podcast explores, it was torn down in the 1970s. From Wikipedia:
[Pruitt-Igoe’s] 33 buildings were torn down in the mid-1970s, and the project has become an icon of urban renewal and public-policy planning failure.
Post
Travis and Python
Today I took my name back and got Armstrong tests running on Travis CI. Travis CI is the distributed, community run continuous integration server that the Ruby community has put together. It lets you do all manner of fun things, like testing in dozens of different Ruby version configurations.
You’re probably wondering what Armstrong is doing there with all of this talk of Ruby. No, I didn’t rewrite Armstrong in Rails last night.
Post
Elegantly Simple
JavaScript catches a lot of flack for it’s “ugliness,” but I’m rather fond of the language. It’s first-class functions make up for any quirks you have to deal with in the language. Consider this test case:
{% gist 1308316 output.js %}
It generates this output when run with --spec:
{% gist 1308316 output.txt %}
I’m using test cases like this throughout my upcoming Programming Node.js book to test output of some of the simple scripts.
Post
Twitter Timeout
A few weeks ago, I got a lot of responses to the following tweet:
As I write this post, Twitter’s ever-unreliable updates counter is showing that I have 9,999 tweets. It’s time for a Twitter Timeout.
Why? I’ve found myself thinking too quickly, without depth, mostly in the form of 140 characters. I want to get back to my place, my blog.
I’m tired of playing in other people’s backyards, as it were.