Phil Toland
And many of us are hoping that all those in power fail, because those in power have a grating habit of being annoyingly self-righteous, hopelessly corrupt, resolutely incompetent and completely apathetic about the freedoms that they have sworn to protect.
But why is the Macalope thrilled by this news? He is thrilled because a Zune phone must, by the comic laws that govern our universe, be simply hysterical.
QLMarkdown 1.1
There is a new version of the QLMarkdown generator available. I didn’t have anything to do with the new release other than zipping up the final product. Michael Dominic K. added some nice new features. You can download the goodies here or grab the source from GitHub.
Keeping track of little things
I have been using GTD for a while now (1 year? 2? Has it really been that long?). By now I have mostly passed the “tinkering” phase and my system has become integrated with my daily routine. Having said that, I am still finding small ways to improve and optimize the whole process.
This morning I was looking over my Today list in Things and I realized that there were two tasks on my mind but not in the system. Safari bookmarks aren’t synching to my laptop properly and I have a memory upgrade for my daughter’s iMac that needs to be installed. I initially resisted adding those tasks to Things with the justification that they are little things and I would take care of them this evening. Of course, I have had the memory upgrade for over a week now and it has yet to be installed.
These “little things” were becoming a source of stress because every time I would walk past the iMac or log onto the laptop I would think: “Oh, yeah. I need to do something about this…but not right now.” And yet, I resisted adding them to my list in Things. Once I became aware of this I thought of several tasks that I had been holding in my head. Getting those tasks into things relieved some of the stress and gave me more confidence that they would eventually be done.
Now all I have to do is become more disciplined about doing the things on my list as opposed to just moving things around.
No one likes the transmission of power between generations—not the left or the right. But the market forces favored by the right turn out to be a better way of preventing it than the credentials the left are forced to fall back on.
Nitrogen
I have been using Erlang extensively for the last 6 months or so and it is a very nice language. While I have enjoyed working with the language, I wasn’t really impressed with the existing Erlang web frameworks. Mochiweb is nice enough, and I use it to power an application with an HTTP based ReSTful API, but it is too bare bones to use for building a full-featured site.
Then I ran across Nitrogen. The first thing that struck me about Nitrogen is how it (ab)uses the Erlang record syntax to create a passable DSL for HTML generation. Check out this snippet from the included sample application:
main() ->
Title = "Postbacks",
Body = #template { file=onecolumn, title=Title,
headline=Title, section1=[
#button { text="Press Me", postback=button_pressed },
#p{},
#link { text="Click Me", postback=link_clicked },
#p{},
#label { text="Press enter in the textbox." },
#textbox { text="This is a message...",
postback=textbox_enterkey },
#p{},
#checkbox { text="Toggle Me", postback=checkbox_clicked },
#p{},
#dropdown { postback=dropdown_changed, options=[
#option { text="Option 1" },
#option { text="Option 2" },
#option { text="Option 3" }
]},
#p{},
#span { text="Mouse Over Me",
actions=#event { type=mouseover,
postback=span_mousedover } },
#p{}
]},
wf:render(Body).
The second thing that caught my attention is the event model. The postback attribute on the elements in the above snippet cause the Erlang term that is assigned to it (in this case symbols) to be posted back to the server using AJAX. This example simply shows an alert box with the posted symbol. The code is very concise:
event(EventInfo) ->
wf:wire(#alert { text=wf:f("~p", [EventInfo]) }),
ok.
The nice thing about this model is that you can use Erlang’s pattern matching to catch events from different elements. If you have elements that look like this:
#button { text="Next", postback=next },
#button { text="Previous", postback=previous },
then you can handle the events using pattern matching:
event(next) ->
%% Go to the next item...
ok;
event(previous) ->
%% Go to the previous item...
ok.
This is clean and easy to understand.
I have not spent as much time as I would like with Nitrogen, but it certainly has my attention. It currently addresses two of the gripes I have had with other frameworks, but there are other issues that have not yet been addressed. For example, how easy is it to deploy or update a site built with Nitrogen? What does the performance and efficiency look like? Using Erlang gives Nitrogen a head start in both of these areas, so I am optimistic.
Forwarded to me by a friend:
In wine
There is wisdom;
In beer
There is freedom;
In water
There is bacteria.
Some of us learn by doing, while others learn by following a strict regimen of carefully-planned activities that build skills systematically from the ground up. While the latter probably spent time at school using Mavis Beacon Teaches Typing on an Apple IIGS, the former spent the same time dying of dysentery behind the teacher’s back.
Yet it was Mr. Sarkozy, speaking before Congress last November, who offered the most profound assessment of our nation’s gift to the world. “What made America great was her ability to transform her own dream into hope for all mankind,” he said. “America did not tell the millions of men and women who came from every country in the world and who — with their hands, their intelligence and their heart — built the greatest nation in the world: ‘Come, and everything will be given to you.’ She said: ‘Come, and the only limits to what you’ll be able to achieve will be your own courage and your own talent.’
app_version Updated
I have updated my app_version Rails plugin to support getting build numbers from Git. This is of necessity a little kludgy. The plugin allows you to specify either ‘git-revcount’ or ‘git-hash’ as the build. ‘git-revcount’ will set the build number to the number of commits on the current Git branch and ‘git-hash’ will set the build number to the first six digits of the Git HEAD hash. Neither method is really equivalent to the Subversion revision number, but either might be useful in certain contexts.
The source code for the plugin is available at http://github.com/toland/app_version.
QuickLook Preview for Markdown
I was curious about QuickLook generators and decided to write a quick generator for previewing Markdown files. QuickLook generators are pretty simple and it didn’t take me long to throw something together. This plugin creates an HTML preview from the Markdown source and renders that in the QuickLook window.
If you are interested you can download a binary or check out the source on Github.
Programming Language Nuclear Winter
One of the points that I’ve been trying to make since I’ve gotten back in to the languages space is that a lot of what is happening in languages now is unpausing the nuclear winter that Java imposed on the programming language space. If you haven’t been following this space for a while, you’d believe that all this dynamic language stuff was invented in the last 5 or 10 years or so.
(Via James Robertson.)
News flash: fast food is bad for you
New Yorkers try to swallow calorie sticker shock:
“I was blown away,” said Cara, a 27-year-old homemaker from Forest Hills in New York City. “I’m not a no-carb type of person, and I usually don’t even think about it. But you pick up a little muffin with your coffee, and it has 630 calories in it? That’s a bit extreme!”
I found this article incredibly amusing. It is full of mock surprise that fast food has tons of calories. I don’t think that the average person at Starbuck’s is really all that surprised that their favorite treats are loaded with calories. Maybe seeing the actual number of calories is a little surprising at first, but I doubt this will have any long-term affect on New Yorker’s eating habits.
Consider this quote later in the article:
“Some people actually tell us we should take off the labels, because it discourages them from ordering what they want,” he said. “But I think honesty is the best policy.”
People are going to do what they enjoy doing. Cigarettes and alcohol have carried health warnings for decades with almost no impact on consumption. Once the new wears off these calorie labels people will ignore them and eat what they want.
