Blog

Paper Protoyping

November 10, 2011

I'm doing some good, old-fashined paper prototyping for an app I'm developing. As you can see, I'm doing mobile-first design. The app has an big smartphone component and it's almost more important for that part to be right than the regular non-mobile version, so I'm starting there. I'm also looking forward to making my first foray into responsive design. This should be a fun project.

Tagged with: , , .

There are 0 comments for this post.

A little guide to the big bands: part 1

October 29, 2011

Swing isn't usually the kind of jazz I listen to, but a friend aked me to put together a playlist on spotify. I thought I'd throw in a few comments on what's in there. Like I said, I'm not a huge expert in this genre, so take this stuff as a layman's intro. This playlist covers the big  band era, which effectively spaned the 20s, 30s and 40s. By the end of WWII, big bands were starting to die out. I'll try to cover some fo the more transitional folks (e.g. Stan Kenton) and the Big Band revival figures in the next post.

read more »
Tagged with: , , .

There are 0 comments for this post.

Django-scaffold hits 1.0

May 16, 2011

Scaffold is a little open-source Django app I built to provide a, "[r]eusable application for a generic section/subsection hierarchy in Django.  It aims to solve a common problem: you're building a site that needs sections and subsections and you not only need to be able to manage that hierarchy, but also hang other content off of it." Today, I've decided to bump it up to version 1.0. You can grab it from github or install it with pip/easy_install.

Scaffold is now in use in a couple of production sites, has a full test suite, and an API that is more-or-less stable; taken together all of this seemed to warrant giving it a 1.0 release. I owe special thanks to my colleague, Chuck Harmston for updating Scaffold to maintain Django 3.1 compatibility while I was off exploring the beaches of the Phillipines.

Tagged with: , .

There are 0 comments for this post.

Scenes from a presentation

November 9, 2010

Slides from a presentation on functional programming

Here are a couple of slides from a presentation I'm preparing to give to developers at work. It's on the topic of functional programming and right now I'm struggling through how to wrap it up. It took me a couple of years to finally get my head around functional programming, so even though I'm fortunate enough to be speaking to a bunch of folks who are smarter than me, it's still a rather mindbending topic to grasp in a one hour presentation. Getting into the declarative mindset is tough, particularly when your mental mapping of human/computer interaction is warped by the lens of imperative programming. (And whoops, putting that collage together made me realize my examples of a fold are not consistent about direction.)

There are 0 comments for this post.

Making space on the camera

May 26, 2010

Just in time for my trip to Peru, I finally got the last batch of photos from my trip to the Southwest off my camera and up on Flickr.

Abandoned ranch on pleasant creek

I'll try to post pictures from Peru as I go, but I've only got a netbook with me. So unless the photos are coming out of the camera near-perfect, I might have to wait until I get back.

Tagged with: .

There are 0 comments for this post.

Flickr Latency

April 22, 2010

Delicate Arch, Arches National Park, UT

How sad is it that I still haven't posted all the photos from a trip out west that happened six months ago?

Tagged with: .

There are 0 comments for this post.

Soba Noodle Soup

February 6, 2010

I made a pretty good soba noodle soup the other day. It was simple, light, and easy to make. The first step is to make a Japanese seafood stock, a pretty traditional recipe:

Japanese seafood stock


Just throw in some carrots, onions, green onions, ginger, konbu (kelp) and hijiki (another kind of seaweed). Simmer that for 45 minutes, until the vegetables are soft:

Veggies are all simmered

Then strain the stock and try to squeeze as much liquid out of the vegetables as possible. Once that's done, put the stock back in the pot and bring it to a simmer. Now you're ready to finish the stock with a few other ingredients:

Finishing ingredients

You add a little dashi to taste (the tan-colored granules on the left). It's a kind of fish stock and you can make your own, but most Japanese just use the granules; that's what I did. Then add a few tablespoons of a 50/50 mixture of shoyu (soy sauce) and mirin (rice wine), which is the dark colored liquid in the center. Finally add some sliced carrots and spring onions. Keep those over a very low heat, and boil the soba noodles (bottom) in another pot of water. When they're all done, just combine the ingredients and enjoy.

Tagged with: .

There are 0 comments for this post.

Quo vadis, classical music?

February 3, 2010

An interesting, disheartening blog post by Anne Midgette in the WP. The key graf:

Many of us who love music share a vague idea that audiences should be open to new things, and that they should be convinced to give them a try. But is this true? I’ve observed before that classical music, particularly opera companies and orchestras, are unusual in that they repeatedly try to force things on its audience that its audience doesn’t necessarily want. Someone who comes to the movie theater to see “Avatar” is not necessarily going to be thrilled if I show him “Pan’s Labyrinth” instead, even if I’m convinced that he would really love it if only he would watch it. And yet this is what’s going on in classical music, all the time: audiences are being asked to pay lots of money in order to be taken out of their comfort zone.

I  think it’s worth unpacking this statement.  I’m troubled for instance by the way in which she talks about the audience for classical music as though it’s a monolithic entity; it’s not. In fact, one of the biggest challenges classical music faces is that there is a substantial rift running right down the middle of it’s listeners. Go to the symphony on any given night and it’s easy enough to see: on the one hand you have the older, wealthier segment of the audience. These are the folks who occupy the box seats, the folks who can afford to shell out for season tickets, the folks who show up on the donors list in the program. And by and large, they want to hear the operas and symphonies and concertos they’ve always heard: the classical warhorses. For them, Ravel and Debussy are as adventurous as they like to get. Because these audiences financial influence is high, one often finds their impact  on programming is frequently disproportionate to their numbers.

The other audience for classical music is just as likely to show up at a matinee concert: they’re younger, more open to new music, but don’t wield the purse strings of the  organization. And keeping them coming—in fact, attracting more like them—is the only hope classical music has if it wants to survive, at least in the US. The older audience might be supplying the bread and butter now, but they are dying off and no one is replacing them. This issue is somewhat orthogonal to the old vs. new music debate, but the fact is, new music can spectacularly engage younger, new-to-the-scene audiences; I’ve seen it happen. For these audiences, new music doesn’t have to be an occasional event, leavened with heavy doses of Beethoven and Brahms to make it go down. It can be a vital part of how they define classical music.

It’s also worth looking at this statement: “audiences are being asked to pay lots of money in order to be taken out of their comfort zone” because wittingly or not, it gets at a huge problem in the classical industry. Symphony and especially opera tickets are insanely expensive. If I want to get even halfway-decent seats at a WNO performance, I can expect to pay $100 - $250 per ticket. Big organizations spending lots of money on top-flight talent are going to tend to be risk-averse, but this is happening precisely at a time when the industry needs to take some risks to survive. That’s a likely reason why smaller venues, chamber and solo concerts tend to be more welcoming of new music. But orchestras can do it too. Right here in Baltimore, Marin Alsop and the BSO are a good example.

Update: Alex Ross has more on the state of current classcal audiences, with breakdowns by generation. Good read, albeit depressing.

Tagged with: .

There are 0 comments for this post.

Getting the government we deserve, I guess

January 16, 2010

The Coakley loss was not surprising and there's blame aplenty to go around for what Josh Marshal has aptly termed an unforced error. This election was the Dems' to lose, and they lost it. Par for the course, depressingly. But seeing any prospect for health care reform now falling apart is shocking.So far I count Anthony Weiner, Jerrold Nadler, Evan Bayh, Jim Webb, and Barney Frank (!!!!) all coming out against getting this legislation through reconciliation by passing the Senate bill wholesale. Some folks (like Bayh) never wanted it in the first place. And I understand why progressives like Nadler or Weiner prefer the House bill to the watered down Senate bill, but they can't seriously believe that thery're going to get another shot at this. There will not be another, more progressive bill later on: there will be either an even more compromised bill or, more likely, nothing at all. I don't think the Senate bill is even close to what it should have been, but for goodness sake, it's better than nothing.

And Barney Frank's role in this is extrodinarily disheartening. Here's his statement post-Brown-victory statement which Rachel Maddow read tonight:

"I have two reactions to the election in Massachusetts. One, I am disappointed. Two, I feel strongly that the Democratic majority in congress must respect the process and make no effort to bypass the electoral results. If Martha Coakley had won, I believe we could have worked out a reasonable compromise between the House and Senate health care bills. But since Scott Brown has won and the Republicans now have 41 votes in the senate, that approach is no longer appropriate. I am hopeful that some Republican senators will be willing to discuss a revised version of health care reform. Because I do not think that the country would be well served by the health care status quo. But our respect for democratic procedures must rule out any effort to pass a health care bill as if the Massachusetts election had not happened. Going forward, I hope there will be a serious effort to change the senate rule which means that 59 are not enough to pass major legislation, but those are the rules by which the health care bill was considered, and it would be wrong to change them in the middle of this process."

He says, "I am hopeful some Republican senators will be willing to discuss a revised version of health care reform"...?!?! Name one. That's an insult to the intelligence of everyone who has supported you.

As to this: "But our respect for democratic procedures must rule out any effort to pass a health care bill as if the Massachusetts election had not happened," your party still has solid majorities in both houses. The election results in Massachusets (which, by the way, has something very like the bill you're are ready to throw out) is not a referendum on national policies, no matter how much idiotic pundits like to say it. Josh Marshall again, hits the nail on the head: "[the] statement he put out tonight that is just an embodiment of fecklessness, resignation, defeatism and just plan (sic) folly." I'm happy that Frank doesn't like the filibuster, but it's not going anywhere anytime soon, so either dems work within those constraints, or they accomplish nothing. Those are the options on the table.

Voters are amivalent about HCR, but I can gurantee these idiots that throwing in the towl like this will win them no votes. Not one.

Update: a couple of constituents were able to talk to Bareny Frank personally, and he layed out his reasoning to them in greater detail. He may or may not be correct that the votes for this just aren't there in the House (himself included), but I totally disagree with his assessment about the likely outcome of November elections if HCR fails: it will be a disaster. And while I don't like the Senate bill any more than he does, it really is better than nothing, not just politically, but in the lives it will save.

Tagged with: , .

There are 0 comments for this post.

Scenes from a snowy day

December 19, 2009

Taken while walking through Wyman park.

Wyman park in the snow.

 

Wyman Park in the snow

Tagged with: , .

There are 0 comments for this post.

More blog entries »

Tumblelog

A Mathematician’s Lament

November 28, 2011

A really beautiful little essay by Paul Lockhart about how we learn math now, and how we could do so, so much better. 

 

[M]athematics is an art form done by human beings for pleasure! Alright, yes, it would be nice if people knew a few basic things about numbers and shapes, for instance. But this will never come from rote memorization, drills,lectures, and exercises. You learn things by doing them and you remember what matters to you.

Tagged with: .

A brief rant...

November 10, 2011

on the future of interaction design. Well worth a read.

Tagged with: .

Geohash

March 10, 2011

David Troy has created a very cool visualization of how geohashing works. If you wanted to create your own geohashes (for example, to speed up proximity searches) there's an excellent python implementation of it.

Tagged with: , , .

Evaluating CSS3 & HTML 5 features

December 26, 2010

When Can I Use... is a fantastic site to use when you need to decide whether or not to use some of the new CSS3 and HTML5 hotness. It offers comprehensive compatibility tables for relevant versions of all browsers, mobile and immobile, and even links to workarounds so you can just squeak by on using that one feature you just have to have. I'm planning on redesigning this site soon, and It's going to be a big help. Also, IE users, things here will still be readable after that, but otherwise, you're on you own until IE9 is ready for primetime.

Tagged with: , , .

Learning Haskell

December 19, 2010

In the process of putting together a presentation on functional programming, I've begun getting into Haskell a bit. It's a bit of a mindbender at first, but I'm enjoying it. For certain types of programming, it's an extrodinarily expressive language. Project Euler is a good example: I've started working through each of the problems, first in Python (a language I know) and then in Haskell. These kinds of math problems are places where a functional language can really shine, and I'm finding that even when judged against an imperative language that I think is particularly elegant like Python, the Haskell solutions often seem more, well...aesthetically beautiful. Fodder for a future blogpost, maybe.

Tagged with: .

Apropos of absolutely nothing...

December 10, 2010

Did you know Art Garfunkel keeps a list of every book he's read since 1968 on his website?

Tagged with: .

What is Wikileaks Up To?

December 6, 2010

One of the most thoughtful, nuanced, and distinctive pieces I've seen about Wikileaks: 3 Quarks Daily: What is Julian Assange Up to? Contrast this with a fairly dissapointing essay by Umberto Eco on the subject which manages not only to get details about technology and state secrets wrong, but also doesn't really say anything interesting.

Tagged with: .

django-belleville moved to github

September 16, 2010

Belleville (the blogging engine I wrote, which powers this site) used to be on google code, now it's on github.

Tagged with: , .

What Classical Music Needs

August 30, 2010

From Unblocking classical music's arteries on the blog On An Overgrown Path:

...[G]reat music making only happens when creative energy can flow freely between composer, performer and listener. Yet almost all of the current efforts to reach new audiences involve building the very barriers that block the vital energy flow. Classical music does not need a celebrity culture, it does not need inane presentation, it does not need to be markeketed like cornflakes by PR agencies, it does not need note perfect performances, it does not need national flags on the platform and it does not need the other brands of consultant created snake oil currently doing the rounds.

Tagged with: .

How to save the news

June 8, 2010

Excellent article by James Fallows about how Google's involvment in the future of journalism.

“Nothing that I see suggests the ‘death of newspapers,’” [Google CEO] Eric Schmidt told me. The problem was the high cost and plummeting popularity of their print versions. “Today you have a subscription to a print newspaper,” he said. “In the future model, you’ll have subscriptions to information sources that will have advertisements embedded in them, like a newspaper. You’ll just leave out the print part. I am quite sure that this will happen.”

Tagged with: .

Back from Peru

June 6, 2010

Started putting photos up from Peru on my Flickr acount.

Tagged with: , .

Next stop...Lima

May 26, 2010

Peru trip starts tomorrow. I have some notion of blogging and/or photoblogging my trip through the country, but it's an open questin whether I'll have the time.

Tagged with: .

Update on an open source project of mine

May 24, 2010

Django-scaffold is now feature-complete. Test coverage is good—somewhere in the neighborhood of 85%—but needs to be closer to complete. Docs are also needed. Once those are done, I'll feel ready to call it 1.0. Well....maybe 1.0 RC 1. It would be nice to get it into production to really see where the bugs are, which I hope to do soon.

Tagged with: , , .

A further reason to quit facebook

May 14, 2010

Nice post by Michael Zimmer on the fact that Facebook's Mark Zuckerberg really doesn't get it when it comes to privacy.

Tagged with: , .

Nice little Bistro in Richmond, VA

May 10, 2010

Had a very nice meal at Bistro Bouchon this past Saturday. If you happen to be in Richmond, give it a try.

Tagged with: .

Time to disengage from Facebook?

May 9, 2010

There's plenty of evidence that Facebook is more than willing to sell its customers out:

...and ongoing security holes and exploits are a further cause for concern:

I hardly even bother signing in any more. I've been thinking of just closing my account.

Tagged with: , .

A bike shed (any colour will do) on greener grass...

April 22, 2010

 Some of Poul-Henning Kamp's words of wisdom have been floating around in my head lately. Here's a snippet:

I wish we could reduce the amount of noise in our lists and I wish we could let people build a bike shed every so often, and I don't really care what colour they paint it.

Reading this and thinking "Bikeshed? Huh?" Aquaint yourself with Parkinson's Law of Triviality.

Tagged with: , .

Announcing Django scaffold

April 20, 2010

I've been working on a new, reuseable Django app calld scaffold. It aims to solve what I see as a common problem: you're building a site that needs sections and subsections. You not only need to be able to manage that hierarchy, but also hang other content off of it. More details on the project page. Suffice to say it builds off of Gustavo Picón's django-treebeard app and has, what I think are some pretty cool features. It's very alpha, but I hope to get a release candidate within a month. (This is also the first time I've worked with git, and I have to say, I'm really loving it.)

Tagged with: , .

Correction re: Django caching

March 2, 2010

OK, so after reading the Django source code a little more closely, I found I was wrong. It absolutely is possible to invalidate the per-view caching. Here's a function I wrote to do it:

def expire_view_cache(view_name, args=[], namespace=None, key_prefix=None):
    """
    This function allows you to invalidate any view-level cache.
        view_name: view function you wish to invalidate or it's named url pattern
        args: any arguments passed to the view function
        namepace: if an application namespace is used, pass that
        key prefix: for the @cache_page decorator for the function (if any)
    """
    from django.core.urlresolvers import reverse
    from django.http import HttpRequest
    from django.utils.cache import get_cache_key
    from django.core.cache import cache
    # create a fake request object
    request = HttpRequest()
    # Loookup the request path:
    if namespace:
        view_name = namespace + ":" + view_name
    request.path = reverse(view_name, args=args)
    # get cache key, expire if the cached item exists:
    key = get_cache_key(request, key_prefix=key_prefix)
    if key:
        if cache.get(key):
            cache.set(key, None, 0)
        return True
    return False    

You can use it like this:

from project_utils import expire_view_cache

def invalidate_blog_index(sender, **kwargs):
    """Invalidate the view-level cache for the blog:index page"""   
    expire_view_cache("index", namespace="blog")   

post_save.connect(invalidate_blog_index, sender=Entry)

The is a pretty naive example, but basically whenever a blog entry is saved, the view-level cache for the blog index page is invalidated. Obviously you could be much more sophisticated with this. Per-view caching aside, I am quite sure that template fragment caching can only be invalidated when the TTL expires. That's a shame, but the per-view caching is far more useful anyway in my opinon.

Tagged with: , .

Don't get me wrong about Django's caching framework...

March 2, 2010

...it's hugely useful. But some of those tools that make life so easy, like per-view caching or template fragement caching are hampered by the fact that they don't offer any way to handle invalidation. The process by which they generate cache keys is not exposed to the user, and if you don't know they key, you can't invalidate the cache. It would be nice to provide some hooks so that a function which recieves a model update signal could expire all instances where that model may have been cached. The only workaround? Roll your own with the low-level framework (which means more LOC in your project) or just don't invalidate and let things expire on their own. Neither approach is optimal.

Tagged with: , .
More tumbleblog entries »