Django, Permalinks and The Onion

Here’s something a little baddass from The Onion. It strikes me as a bit daring, and out-of-the-box in thinking. (Who knew their developers were as creative as their writers?) To see what I’m talking about, try this before you read on. Go to Click on a link to an article, any article. Look at the URL, I’ll use this one from today as an example:,37957/

The part of the url we are interested in is between the second to last forward slash and before the comma.

Take all of those words and delete them. Replace them with a letter, or a word, you have to have something there but it doesn’t really matter what. Just leave the comma and the number. What do you notice?

I learned about it from this wellfire blog.

What The Onion did was create a permalink structure that ignores the article name itself and only looks at the number, the ID of the article. This is brilliant because a search engine and human eyes are going to look to the words. They have SEO value. But the number is what The Onion’s web server (which runs on Python and Django), uses to look up the article. It is the ID of the article, which in Database time is essentially instant look up time. Compare this to WordPress which has a whole stack of lookups it has to perform before coming up with your article, as it has to disambiguate whether you are providing say, a category, or a tag, a page id or a slug.

The other thing I found interesting was that when you delete words from the url, you get redirected to the correct url. This protects the consistency of the url discouraging people from linking incorrectly across the web to these articles, and it protects from the risk of a search engine seeing a particular site of existing in a thousand (or infinite) number of locations.

So I’m pushing forward with Django. I’ve had some discouraging moments, as I’ve made a lot of rapid progress but as I look forward into what I still have to learn, it is starting to look like a mountain rather than a large hill. Yesterday I played around with Django CMS which is a neat tool for building websites rapidly and has a neat structure for plugging in apps. It’s also helping me to really dissect Django and helping me to understand its power. Sticking with the mountain climbing analogy, it’s like somebody left a helicopter lying around about halfway up the thing with the keys in the ignition (is that how helicopters work?). I can use the helicopter to view my climb better, but it will tempt me to bypass my climb altogether if I’m not careful.

Exploring Django

I’ve been getting really tired lately of the weight of WordPress websites. The more time I spend with WordPress, the more I appreciate the features it provides, from versioning, to the plugin system that works so well. While it’s not as simple as just install it and go for most people, anyone can learn to use it. But I just find, particularly the admin areas, such a pain to work with. Requests can be so slow. The simpler the task you want to complete, the more grueling the wait. So I started exploring other alternatives.Read More

Cripple Creek on Guitar

I’ve been learning a lot on my guitar lately and I was playing around and recorded Cripple Creek, an old bluegrass song. Today I discovered SoundCloud and decided to put it up. I’m thinking about using it to chart my progress. In the meantime, enjoy!

(By default it was going to put my facebook picture next to the player, so I almost randomly picked that one of the rock, doesn’t really apply to anything)

Trying Out Google’s New Music Service And a Renewed Appreciation for Bob Dylan

Those who know me personally or who follow me on social media are probably aware of my recent interest in Bluegrass music. I started going to weekly jams at “Today’s Pizza & Salad” in Encinitas. It’s a bit of a drive for me but it’s worth it.

Naturally the group plays a lot of the same songs, although last night was pretty different. Among the repertoire two songs have stood out to me. One being “You Ain’t Going Nowhere”, the other “Wagon Wheel.” It turns out the writing credit for both of these songs belongs to Bob Dylan, but neither were originally commercially released by him. “You Ain’t Going Nowhere” was first sold as a Byrds song, although Dylan had already done a recording of it, he did not release his version for another 3 years. “Wagon Wheel” has an even stranger story, because Dylan didn’t release it, or even finish it at all. The Old Crow Medicine Show heard a sketch of this song Dylan had started on a bootleg and decided to finish and record it, thirty years after Dylan apparently gave up on it.

Reading about all of that, especially the Wagon Wheel thing, just got me thinking on how tremendous of an impact this one guy had on the history of American music. Even a song he once threw away became a hit. I’ve always had an appreciation for Bob Dylan, especially his more classic albums like “Blonde on Blonde,” but when you lay out a list of his work it’s truly amazing. Here’s just a short list of his greatest songs that I threw together (therefore I’m undoubtedly missing some obvious ones), I’ll put some covers in brackets:

  • One More Cup of Coffee [The White Stripes]
  • Tambourine Man [The Byrds]
  • Like a Rolling Stone
  • All Along the Watchtower [Jimi Hendrix]
  • Maggie’s Farm [Rage Against the Machine]
  • Girl From the North Country
  • Lay Lady Lay
  • Don’t Think Twice It’s Alright
  • Blowing in the Wind
  • Masters of War
  • Forever Young
  • Just Like a Woman
  • You Ain’t Goin’ Nowhere [The Byrds, Nitty Gritty Dirt Band]
  • Knockin on Heaven’s Door [Guns ‘n Roses]
  • The Time’s They Are a Changing
  • It’s Alright Ma (I’m Only Bleeding)
  • Wagon Wheel [Old Crow Medicine Show]

Google just launched a music service (May 15th), and they are offering a 30-day free trial as well as a discounted price to anyone who signs up before May 30th. So I jumped on it. This couldn’t have happened at a better time since I’ve been going crazy at the library checking out bluegrass cds to try to soak up as much about the genre as I can. I love the service. It’s supposed to be an answer to Spotify. It seems to offer about the same service as the premium plan for spotify for a couple of dollars less, but I haven’t explored Spotify so I can’t really compare.

So far I’m really liking it. I haven’t come across any missing artists, just a few missing albums. Of course I don’t listen to I have a few issues with the usability of it. I haven’t quite figured out how to control what songs go on my cell phone. The first day I streamed a bunch of music and used about 250mb, which is unacceptable with my data plan, so getting this download thing figured out is going to be the deal breaker after the 30 day trial is up.

Okay, I just did a test I knew expected to fail. I found a major artist who isn’t on there, Tool. On the plus side, there are a lot of comedy albums on there, I can finally hear these albums Marc Maron keeps referring to on WTF.

Post PC World?

Google recently announced a new parting of ways with Apple on an open source project controlled by Apple called WebKit. WebKit is the rendering part of a web browser, the piece that reads all of the code behind a web page and draws it on your screen. As you can imagine, this is a pretty massive piece of the web browser. A massive piece that was shared by Apple’s Safari, Google’s Chrome (and Chromium) as well as other browsers such as Opera, and perhaps most significantly, browsers found in devices from Kindle to Blackberry.

Google will now fork WebKit, spawning a version they control called Blink.

“Having multiple rendering engines will no doubt lead to more innovation,” says Adrian Kingsley-Hughes at ZDNet. But “The reason Google wants Blink is down to one thing — the post-PC era.” (source)

One thing Google has said about this project is that it will remove millions of lines of code from WebKit. Blink will be smaller and ostensibly more efficient than WebKit. Google’s goal is to make it run faster and with a smaller footprint for the purpose of tablets and other devices.

This concerns me for two reasons. 1. Google is making a heavy investments in the idea that the PC is going away. 2. Google does not predict the computing power of tablets in the near future will approach that of PCs.

In other words we will be sacrificing the computing power of a PC for the convenience of handheld devices. Our devices will no longer augment our PCs but replace them.

It’s a prediction that has been around for a long while, no doubt many people would say no kidding. But to me it’s a sad day. PCs are vastly different than tablets in the openness and power they provide to the user. Where PCs strive to be general and useful, to be a tool in our exploration of the world about us, devices are about convenience, attempting to solve our problems for us even before we know that we have them. PCs can be ripped apart, upgraded, replaced piece by piece. Devices now seal in the battery. The battery. Devices are of a world in which we have to throw out the lamp when the bulb burns out.

My first operating system was DOS. I used to write batch files to get things to work the way I wanted them to. Networking was fickle and as a kid I had to jigger and hack software to play the games I wanted to play. Working with the file system meant typing commands (dir, tree, mkdir, rmdir, erase, format, ok my memory is failing me here, some of those may only be the linux commands). When a hard drive went bad, or a video card, I replaced it. It was a valuable learning experience without even having the intention at the time to learn, I just wanted to play. The things I learned as a kid shaped the way I understood and approached computers through the years. By the time I was taking Computer Science courses, I already had a very solid understanding of the inner-workings of computers. I believe most of my peers did as well. I have a hard time seeing how a child today would build a foundation like that from these devices given their closed in nature.

But more selfishly and practically, I worry about trade-off between portability and power. I sometimes sit in awe at all of the things I do at the computer. Not at myself and my work, but at the ability of this one machine in front of me that gives me the power to do all of these things. To edit photos with more power than an entire darkroom once gave a photographer. To edit video, music. To have a movie or TV show streaming on the other monitor as I work on these things.

Or am I’m just an old man who doesn’t understand the new world and dislikes the new thing? The future will tell.

Why So Many Programming Languages?

Not that long ago my wife asked me why there are so many programming languages. I gave her an answer, but that question has been bouncing around in my head because there are so many different answers, yet of all of the many I’ve been kicking around, none of them really seem complete.

Before college I had already studied a few programming languages (ignoring markup): basic, visual basic, C/C++ and the one in my TI-81 calculator, TI-Basic. (The TI was the weakest but had been most useful in high school math classes). BASIC was cool because for a time it came in every PC, packaged with MS-DOS, and as a kid I thought it was really cool to get these adventure books from the library that came with little Q-Basic programs that you would type in to see something that went alongside the story.Read More

Photoshop Sunday

I spent the day on Photoshop, learning basic techniques as they are supposed to be done. Every once in a while you just have to sit down with the latest version of Photoshop and re-learn the basics. It’s a real timesaver.

So it was appropriate I would run across this blog post, Was That Photoshopped? It Doesn’t Matter! by Rick Berk. What I love about it is he compares digital “darkroom” techniques to an Ansel Adams. Ansel Adams taught me to use the darkroom. Not literally, I’m neither that old nor that lucky. But his were the first photography books I read, when I was in high school and had access to an actual projectors and chemicals darkroom.

Ansel Adams was a technical master. He approached photography in such a methodical, technical way that most people would never have considered possible before digital. And he was also a realism purist. He did not like photographs that abstracted from the original subject. His goal was always to catch the feeling of being in a place at a particular time while being 100% literal. He co-founded the famous photography group, Group f/64, named after a very tiny aperture setting (the lens on my camera now only goes to f/32). At f/64 everything in your frame is going to be in focus, which implies being absolutely faithful to what is in front of the lens.

But he wrote extensively about darkroom techniques such as dodging and burning which allow you to selectively darken or lighten an image. He also talked about how if you tilted the bellows on the projector or the easel your print was resting on, you could distort horizontal and vertical lines. This might be done to correct distortions on the film, but anti-Photoshop “purists” would probably still object. I don’t remember if he talked about retouching, but I remember in my high school photography class we were taught how to remove unwanted spots and lines on our prints with India Ink and a fine-tipped paintbrush.

One thing that sticks with me that Ansel Adams talked about, was how as he got older his images became more theatrical. He was still making prints from some of his old negatives, and a print made in his later years might have more dramatic contrast, clouds and shadows. I think about this often when I’m working on my photos. It encourages me to be a little more dramatic than my instinct, to bump up that contrast and saturation just a hair more than I otherwise would have.

Before edit (only a crop is applied)

Before edit (only a crop is applied)

Book on Digital Black and White Photography

I just got a book from the library called Advanced Digital Black and White Photography by John Beardsworth. Apparently it’s his second book on the subject. I’ve already read about all the books on photography my library has to offer, but this one was new and it should be no secret I’m big on the subject.

Skimming through it I picked up a couple of tricks here and there. The book pretty much describes my workflow, Lightroom to Nik Silver Efex Pro. One piece of technical info I wanted to share here (and keep for myself as reference) is about sharpening. Sharpening is a technically difficult thing that we rarely want to have to think about (most of the time I just let Lightroom take care of it and cross my fingers). But Beardsworth nails the problem very succinctly:

…sharpening is like a rim or halo around the edges within the picture, and remains effective yet imperceptible if it is around 1/100 of an inch (.25mm) on the final output. If you correctly sharpened a picture and printed it at Letter or A4 size on a 300 DPI inkject printer, that sharpening rim would be too small to be effective if you then decided to resize the picture and make a smaller print.

Anyway, if you’re getting interested in B&W digital photography I would recommend this book. If you’ve already read a bunch of photography books though, I wouldn’t pay for it (try to do what I do and get it from the library), it’s totally worth the skim but as you would already know these books cover a lot of the same material over and over again. I really like that it reserved a whole section for photographic presentation.

Camping at Lake Cuyamaca

In Rancho Cucamonga, where I grew up, you can drive 45 miles south, east or west and barely feel like you left the place. Driving north is the rare exception as it takes you up over the Cajon Pass, into a portal to that very different, high desert world.

Here in San Diego we are surrounded by these “portals.” The cliffs of Torrey Pines and a walk along Black’s Beach are certainly transportive, the coastal drive up the 5 freeway is other-worldly as you reach the barely touched expanse of Camp Pendleton, or of course down south into Mexico, but none so striking a change happens until you drive east. My wife, Puja, and I got our first taste of this about a month ago when drove out to hike Mt. Woodson. The urban effects of the city rapidly drop off as you pass El Cajon, into Lakeside and find yourself in the rising elevations of the Cleveland National Forest.


Read More

My Badass 1895 Business Card

Amazing how such a simple item can lead you to so many questions. What is the business card for today? What role does it play? Do we even need one? Should it be simple and to the point or should it be attention grabbing? Fun? Classy? Chic?

And while you are trying to cram all of your personality into your card, what about information? Today we have more information to put onto a business card than ever, yet most of it is so much less important than it used to be. Look at these choices: Business Address, personal address, mailing address, name, cell phone number, fax number (maybe, not me), business phone number, personal phone number, e-mail address (which one?), website url, facebook url, twitter handle, or a billion other social networks, the list goes on.

To me, ideally my card would have my website address and that would be all. Somebody would have my card, go to my website address and get all the information they needed there. I mean, everyone carries a smartphone these days, right? They can do it before we’ve even shaken hands to part.

And the worst part of all of this is, how often am I even going to hand my card out? I’ve never been very good about that, and I feel less and less guilty about it every day because lets face it, the art of exchanging business cards has pretty much gone the way of the pager. When a person leaves a conversation with me I want them to know one specific thing about me: Read More