programming

You are currently browsing articles tagged programming.

Misc Never Knows

I’m up relatively early this morning. I can hear rain outside the window of the office. Leah acquired some of the lovely All Natural Cola by Whole Foods and I’m having one of those. I feel a tickle in my nose and I think I might be getting a cold. That’s not optimal.

I have a backlog of Misc and here it goes, helpfully organized by vague category!

Programming

I’m very impressed by DateJS—it provides functionality like PHP’s function strtotime() but in JavaScript. This is a tool I’ll be using. I found this via the excellent Ajaxian blog.

The Amazon Kindle has been getting nothing but hate on the net, but it feels like a different class of product to me. These two reviews in particular make me wonder if this device might be something I’d use: Andy Ihnatko and Don MacAskill.

Douglas Crockford wants to fix HTML. I think Crockford is the smartest programmer in JavaScript-land, but I think he’s late to that party. I do like some of his ideas though. Crockford also points out how crazy the expectations are on programming for the web, when talking about Unobtrusive JavaScript he says:


It also calls for Graceful Degradation, which means that a page should do something useful even if the JavaScript assets fail to run. This is bizarre. No other programming environment threatens to pull the rug out from under the programmer the way the web does. If you are writing applications in Java, you do not have to be prepared for having Java turned off. But because of the browser’s long and tragic history of security screwups, JavaScript does get turned off. It is ultimately the only security control given to users that works. So not only does the programmer have to be prepared for failure, the program is expected to fail gracefully.

And he adds: Madness.

Yup.

Speaking of madness, The Web Standards Project points to the Email Standards Project. I end up with responsibility to debug and test HTML mail sometimes and it’s a mess dealing with the various email clients. This a good development. As one of the original members of what would become the WSP, I am all for this. I’m glad to see momentum here.

I’d like to see JavaScript Beautify added to either/both of Firebug and the Web Developer Toolbar.

Comics and Animation

This image of a Teenage Mutant Ninja Turtle toy posted by Slashfilm reminds me of two of my cousins. I got into (back) into comics at age 13 and while I didn’t get into TMNT, the art style was cool. This figure really seems to hit the aesthetic of those black and white indie comics well.

One of the funnier blogs about comics Again With The Comics, did a series called Thanksgiving Turkeys, featuring terrible supervillains from comics past that made me laugh.

Not funny, but aesthetically beautiful is the work of illustrator Julienne Hsu, on startdrawing.org. Spare, impressionistic, but a turns precise. I find it very inspiring. Her website is www.juliennehsu.com

Marlo Meekins is a cartoonist from the John K. posse who has a way with markers I envy. She says of her work, anticipating the question, this about marker choice: “To answer a super common question about marker brand: I use most brands of markers and only a few select shades. But, all and even the best brands make gross colors and plenty of them. Never buy marker sets. It’s decisions about color combinations, line and application not brand.”

Also from the John K. posse is Uncle Eddy, on Underlight.

Terminus is a short film that spans animation and culture. It’s a disturbing but perfectly executed short film about a man and a looming concrete figure. via jwz.

Culture

Ads from the past might have been demeaning to women.

The estimable ze frank has two Christmas songs out: Listen and Buy, if you want! I particularly like Santa Ain’t Fat.

This interview with the Coen Brothers on Charlie Rose makes me want to see No Country For Old Men more. Open Culture has a few more links.

Anil Dash points out what’s interesting about memes and net culture, and points out ROFLcon, which looks seriously fascinating, bizarre, and potentially educational and entertaining.

Undercover Black Man points out some silliness by one Tay Zonday—a Dr. Pepper promotional song called Cherry Chocolate Rain. It’s fun, it’s silly, it’s a, well, I suppose it’s a parody of hip-hop videos, sort of, but it also uses the conventions of the genre, but funny. So fine, it’s cute, it’s funny—but this feels like a “forced” viral meme, and the production values are way too high to be homegrown. Then I zipped over to the young man’s YouTube Page and check out Internet Dream and I found myself inexplicably laughing. Well, maybe explicable. The dude is funny and talented. Sort of They Might Be Giants meet Biz Markie. Just watch Internet Dream:

And to complete this series of Misc items, I’ll make this a loop—this post on O’ Reilly Radar is about the confusion between Bill O’Reilly (right wing windbag) and O’Reilly (the publisher, mostly known for programming books).

And with that, I’ll start my day.

Tags: , , , ,

Game with jQuery

As you may have seen previously, I’ve been experimenting with building a game with jQuery as the infrastructure over on joecrawford.com. This is a screenshot. The super-cute illustrations were created by Dug. The concept of a game with sheep was suggested by a few people, including MAS. Ping said cats and mice, but I quite like the sheep.

I’m just building this in stolen moments away from real work or real life, and this is a gas. I added scoring, though I have not been able to set clickability once I’ve clicked it. I created a recursive error by trying to assign $(this).click(null). I need to understand the object model better, and really, re-re-read the documentation, which is actually quite good.. :-)

Tags: , ,

Playing with jQuery

One of my goals in the new year is to create some kind of simple online game in JavaScript. I’m almost at a point where I have free time, which is so awesome.

Also, I’m learning some of the libraries and frameworks for JavaScript—to that end I’m experimenting with some of the frameworks—this weekend it was jQuery—and I managed to rough a simple “the objects run away from your mouse” exercise.

jQuery is really powerful. It also seems to be really heavy as a download, and I’ve not tweaked that, but the syntax is just “pretty”—I was IMing a bud about the syntax and he found it ugly as sin, but I think it’s really beautiful.

So at http://joecrawford.com/ there’s a simple little exercise. Everything is in the source for the page, only jQuery itself is in a separate file.

Comments, suggestions, ideas about making games in JavaScript, about jQuery, about thinking about game programming are welcome.

Tags: , ,

I’m pleased with how things are arranged right now. Usually being content means I am blogging much more. So much wonderful stuff to say!

I’ve been pleasantly busy. This pleasantness has manifested itself in steady work, side projects finishing finally, and things at my dayjob going relatively well.

Herein I will try and communicate some datapoints which evidence some of this good feeling. Perhaps in expiating these exhibits we’ll actually find that my good feeling is unjustified. That would be quite something! Suppose a person has a generalized good feeling about the world, but when the circumstances of their life are detailed things are not so rosy. Actually, as I think about it I bet that’s quite common. Everything feels hunky dory, but things are really on the cusp of doom. It’s heartening to think that if that’s true, then the inverse state of being can be true as well. One can feel nothing but dread but in reality things are just fine, better than fine even! I think, actually that this is the more common feeling for me. The word I heard from a therapist several years ago was “catastrophisizing”—the tendency to make any event the basis for the feeling that only the worst can happen.

So what are the datapoints in my mind these days?

Last weekend I attended BarCamp LA 4, and had a terrific time. I talked about that before of course.

Last week I went and saw Blade Runner with my friend Chris Greazel. Chris and I have been friends for over twenty years, and Blade Runner is a huge part of our friendship. I remember him borrowing a videocassette copy of Blade Runner from our favorite short story teacher in High School and both of us being not quite sure where we’d watch it. We had to go to my grandparent’s house to watch it because neither his nor my parents had a VHS machine.

Blade Runner was stunning. The modifications to make this cut Ridley Scott’s “The Final Cut” were subtle and welcome. There’s still a bit with the Egyptian that feels wobbly, but the effects were beautiful as they ever were. Joanna Cassidy’s death scene is improved in a way that Chris scarcely noticed the changes. Sean Young is as beautiful as ever, and has terrific hairdos. I wonder if some of my appreciation for the photography in some of Bebe ads has to do with many of them having a neo-noir sensibility? The movie is dated in some ways of course, where are the cell phones, for example? Where is the internet? But Being made 25 years ago, how could it not be a product of its’ time?

A digression: cell phones in movies. A pet thing I’ve been noticing lately is in any older movie whose plot is based on information being known or unknown, or being able to alert authorities to get help—most of them simply fall over if one tries to consider their realism as contemporary movies. I think that the Bourne Movies handle cell phone ubiquity very well. Bourne Ultimatum featured text messages prominently at key plot points, for example.

A subdigression: I’ve ranted several times to people with whom I discuss movies lately that I think the Jason Bourne movies have taken over from James Bond movies in the realm of spy thrillers. I think James Bond, a cold war product if ever there was one, has become as quaintly baroque as tailfins on cars. He’s simply irrelevant. The truth of the matter is that a thriller set today is far too relentless, and the government agencies far too terrifying to take time out for the Required Sexy Scene With Bond Babe. Sure, the last Bond movie did a better job, but compared with the last Bourne movie, I think it was left wanting.

Next datapoint: on Saturday I bought an 80GB iPod. This was a $300 purchase (I also got a protective rubber housing and of course the State of California wants its’ sales tax). I’ve had it all of 3 days and it’s changed my aural life immensely. I’ve talked about my commute before; I’ve talked about my likings of music, audiobooks, and podcasts; but I’ve not talked about the technology involved.

I used to be a major mix-tape maker. Like, very major. My uncle taught me how to check the levels on an audio source and set counters and how to use the levels on a cassette deck to manipulate and simulate a crossfade a mix tape. So the arrangement of sound has mattered to me since I was about 13 years old.

Having nothing but a 1GB iPod required me to ruthlessly edit my music and Podcasts such that I would maximize the use of my iPod for both purposes. I would use the “Only Update Checked Items” feature of iPod synchronization to assure that I was using a balance of music I liked, and a good mix of music, plus the podcasts I had not yet listened to. I got into the habit of using iTunes’ “star” feature to set how much or little I liked songs, I assured that music had Genre set, and then I could use the very powerful “Smart Playlist” feature to get a mix of songs that were really good. I would vary the selection of music I added to my iPod sometimes based on different criteria. Sometimes I used “highly rated, least listened to;” and sometimes “highest rated, most recently added to library” and then other times by “highest rated, order by random.” I learned that how I set this up and how I rated things mattered a great deal. When I set all my Beck recordings and Devo recordings to all have at least one star, I ended up with much more Beck and Devo than I wanted. I love both artists, but there’s nothing worse in a mixtape than to have an artist be disproportionately represented. I can’t help but think of a playlist as a kind of mixtape.

Now, the iPod Classic I bought subverts this whole process entirely. I can have the whole damn library in my pocket now. I can listen to all my Zappa. I can have all my Talking Heads records, including the live recordings and obscura, in my ears in seconds. I don’t have 80 GB of music at this point, and it’s wonderful to have the freedom.

The funny thing I realized though, is I don’t want to put everything on it. In the past I think I’d gladly put every single thing in my iTunes library in it – spoken word, holiday songs, podcasts, videos, one off radio interviews. No, what I learned from my shuffle is that editing rocks. And so I am using criteria to assure that I have all the music I want, but I can leave the dross at home. I still have several weeks of music if I were to listen to it all, but I have a more representative mix of music I like.

Also, video! I was re-watching the Douglas Crockford JavaScript videos from YUI Theater over the weekend. It’s made me start wondering what other educational type videos and presentations on programming I can put on this thing. I’ve got 30GB free and I’m looking to fill it. It’s an extravagance, but a necessary one I feel. Also, it felt great to buy the thing cash. Prior to buying the Classic, my Shuffle has had problems syncing and I think it’s very nearly going to die. I stopped being able to sync with Windows and I was having to use the iPod Reset Utility every other day.

The next datapoint in the cavalcade of good feeling is financial certainty. Invoices from my dayjob have been paid with a better and increased regularity. Over the past months it’s varied a great deal. Sometimes a NET-30 invoice would be paid 2 weeks earlier than NET-30, sometimes it would be arrive exactly at NET-30. This made it really hard to budget things like, oh, rent and bills! And sadly, we ended up bouncing checks a few times in the past months. I’m glad of the compensation to me as a contractor, but this kind of uncertainty and unpredictability was rather stressful. “Can we pay that bill? Should we send off that payment? We’ll have the payment for that invoice by then”—then when the due date rolls around, no check, then BLAMMO! the bank gets to charge us for the overdraft, as well as charge us for having a negative balance. Leah and I have spent hundreds of dollars on stupid fees like this this year. Some we’ve gotten reversed, but it certainly falls into the realm of “stupid tax.” Mostly our stupidity. But who wants to tell their landlord that they’re gonna be late? And our current landlord is one of those faceless management companies that basically has no interest in our problems. Our prior landlord would work with us when we were a little late, but the current one, no way. We’re getting caught up with all our debts, piece by piece, and there’s really no other word for it than “blessing” as far as I’m concerned.

Lastly (for this post) I’ve been enjoying work very much. A few weeks ago we released some code that was a rather epic project for me, the FreeStyle Leaderboards. It’s a very nice AJAX application that allows players of the game to vew the top 10,000 players for all the ranked categories. It’s a rather nifty implementation of YUI, and it’s not the last of my AJAXery. I have many ideas bubbling around in my head and I am looking forward to working on at work and perhaps even in weekend projects and experiments in the new year.

Tags: , ,

Don’t use oxygen and smoke, please.

Thomas PM Barnett, a great Powerpointer, mentions that Al Gore has his Nobel Prize because of his PPTs (actually Keynote, but same difference, presentation software).

Read/Write Web has good thoughts on Microsoft’s playing catch-up with Google on a number of web tools. I like competitor for Google. It means we’ll keep getting innovation. And don’t count our Yahoo. They are building a lot of stuff these days.

The cartoon where Jesus, Mohammed, and the unseen Barmaid talk are usually good. Like this one: Snake.

Free To Play notes a study that says of the time kids ages 2 to 17 play games, 91% of it is on free games.

WebKit now has an implementation of a local SQL database (via John Gruber). That’s odd, and cool. It seems to be what Google Gears is trying to do, or what Flash does with its Local Shared Objects. All of these kick the butt of mere cookies for storage. The real thing they allow is to allow web applications to work without an internet connection. What’s WebKit? It’s the engine inside Safari and KDE browsers. This local storage thing is being discussed with great enthusiasm these days seems like. It’s still a great time to be working on web stuff.

Last night Leah and I visited a bookstore after dinner and I looked at a book called Beautiful Code. It’s got a chapter by Douglas Crockford. I’ve not bought it yet, but it’s been added to my “to read” list. I’ve been trying to write my JavaScript according to his code conventions.

Tags: , , , , ,

Flowchart of the Day

Over on Worse than Failure, there’s a thoughtful essay about the usual software is impossible: Avoiding Development Disasters. The graphic looks right to me. A dozen paths to failure. Success rare.

Code to Ruin

Tags:

Thoughtful thinking from DVD Jon who knows about this stuff.

Think Closed
Has Nokia or Sony Ericsson ever bricked or refused service on an unlocked phone? Not that I’ve heard of, and if they did, they would have been quickly sued in several countries where consumer rights are more strongly protected.

Did Sony ever brick PSPs over homebrew software? Did Microsoft ever overwrite someone’s BIOS with garbage because they detected an illegitimate Windows installation?

In light of other things Apple has done lately, such as adding an encrypted hash to the iPod database to lock out non-Apple software and disabling TV-out on the iPod unless the 3rd party accessory you’re using has an Apple authentication chip, it’s evident that Apple is well on its way to become one of the most consumer hostile tech companies.

Tags: ,

I really like that Steve Yegge fellow. He’s funny and smart and he builds stuff with computers. That’s my kind of people.

Stevey’s Blog Rants: Ten Tips for a (Slightly) Less Awful Resume

Face it: all the traditional advice about trying to convince the hiring manager that you’re a plucky, scrappy young individual from a farm in Alabama who’s destined for greatness on account of your Uncle Ted having given you that pep talk after you fell off your horse when you were a kid — that advice may as well have come from the back end of your horse, because the hiring manager just wants to profile your current skill set. Mr. Plucky goes into the Round File.

Don’t get all depressed about this tip. People will start caring more about you as a person in later phases of the recruiting process, particularly if you’re one of those candidates who doesn’t really like showering.

Tags: ,