Archive for August, 2007

Music for Coders: August 25

Saturday, August 25th, 2007

I’ll be on vacation for the next week, and not blogging, but I wanted to leave you with this week’s notable music releases.

I don’t normally mention singles or live albums, but this time I can’t help myself. Rick Springfield has a new single out, “Who Killed Rock N’ Roll (Live)“. (Yes, that Rick Springfield.) I think it’s funny for a half-dozen reasons. First, it’s a live track before there’s even been a studio track. Second, you gotta figure this crowd wasn’t exactly arena-sized—can he even draw a crowd? Third, the songs asks “who killed rock and roll?” which presumes that rock and roll is in fact dead and also that the guy who gave us “Jesse’s Girl” and “Love Somebody” is somehow a supreme example of that lost art and heir to Led Zeppelin.

But most of all… and you have to listen to it yourself to appreciate it fully… In just the 30 second sample clip on iTunes, Springfield’s bland rock nostalgia features both a (badly) sampled police siren and a break to a few notes from The Who’s “Baba O’Reilly”. (Can you even picture Rick Springfield smashing a guitar Pete Townshend style?) And the lyrics include gems such as “50 million kids knocking on the door, everybody’s horny but nobody can score.” I shudder to imagine what the rest of the track holds.

I’m going to have to dub this piece of kitsch the “Rubberneck Song of the Week”—you know it’s a wreck but you have to slow down and look anyway.

I know there are many who will disagree with me. The iTunes user reviews are slobbering all over it. They add extra kitsch value if for any reason you haven’t gotten your fill yet. Rick, if you are their pied piper then please lead these children far, far away…

New and Notable This Week

  • The New Pornographers: Challengers
    Another solid album by a great band. Not that different from their last album but I’m not complaining.
  • Josh Ritter: The Historical Conquests of Josh Ritter
    I hadn’t heard Josh Ritter before. I like it. Enough that I bought it on the way out the door for vacation. Singer/songwriter type stuff, but there’s something that keeps it from being like every other singer/songwriter out there. I can’t put it into words yet but I’m sure I’ll have more of an opinion after a few listens.
  • Rilo Kiley: Under the Blacklight
    I like Rilo Kiley. I would recommend their previous two albums. But this one is a wrong turn. A few tracks might still be worthwhile, especially if you are a fan.
  • The Waterboys: Book of Lightning
  • Architecture in Helsinki: Places Like This

PHP with MySQL Essential Training on CD-ROM

Friday, August 24th, 2007

PHP with MySQL Essential Training

I already announced the online release of PHP with MySQL Essential Training. I’m really happy that it’s been getting tons positive user feedback. It seems to be helping a lot of people understand PHP as well as web development in general and that’s very gratifying.

Now you can also purchase the CD-ROM version. It’s $149.95 for 10.75 hours of training on 2 CDs. You can purchase it from lynda.com’s store or from Amazon.com.

The nice thing about the online version is that you can access it anytime, anywhere and you’ll also get access to all the other great lynda.com titles (including my Ruby on Rails Essential Training).

Why might the CD-ROM be right for you? A few reasons come to mind: No internet connection is required so you can watch offline or even when you travel. You’ll have speedier access to higher-quality video and sound. It includes the tutorial files so you can work along with me. You’ll have it on your shelf to refer to anytime, even if you don’t maintain your lynda.com subscription (but why wouldn’t you want do that?). You can share copies around your office or school. For large organizations, lynda.com can work out multiple-copy, site license deals too. And some people like having both the offline and online versions—one for the office, one for home or on the road.

If you’ve already watched either the PHP or Ruby on Rails training found it helpful, I hope you’ll consider taking a minute to write a review on Amazon.com with your opinion. Amazon.com shoppers don’t always know Lynda.com’s great reputation and your review will help them trust that the training can be helpful to them too.

PHP 5.2.4 Errors Will Be 500 Errors

Thursday, August 23rd, 2007

Considering how old and popular PHP is, it’s hard to believe that this issue hasn’t been addressed before now…

Gregory Szorc just noticed that one of the changes to PHP 5.2.4 is that PHP errors, which used to result in an unhelpful blank page with an HTTP 200 status code, will now send an HTTP 500 status code instead. Then your web server can handle the 500 error with a default “Sorry, a server error occured” page. It’s not only much cleaner but it is the way HTTP status codes are meant to be used.

PHP 5.2.4 isn’t out just yet, but should be very soon. It’s currently being tested as a final release candidate.

Namespaces Come to PHP

Monday, August 20th, 2007

Back in July, I wrote that the PHP internals team was discussing implementing namespaces in PHP 6. Though still subject to change, the results have been commited to the official version.

Dmitry Stogov and Stanislav Malyshev’s idea is still the leading candidate (because they stepped up and fully implemented it) and but there’s been some discussion over a) whether it’s the right way to go, b) whether it is a “namespace” or actually a “package”. I don’t want to walk into the firing line of either discussion, but as I noted before I’ll cast my vote for any implementation that allows namespaces to envelope blocks of code with curly-braces. (Theirs doesn’t currently.)

If you want to better understand where namespaces may be headed there are two blog posts that can help. The first is “PHP Namespaces (Part 1: Basic usage & gotchas)” by David Coallier. The second is “Namespaces FAQ” by Stanislav Malyshev himself. I suggest reading Coallier’s first to get the basic idea.

The Zend/PHP Conference & Expo is October 8-11 in San Francisco. Both Stogov and Malyshev will be speaking. Even though there isn’t a session about it, I’d expect namespaces to be a major and lively topic of discussion at the event. Maybe a consensus and resolution will come out of it.

Music for Coders: August 18

Saturday, August 18th, 2007

New and Notable This Week

  • Junior Senior: Hey Hey My My Yo Yo
    The hit “Move Your Feet” from Junior Senior’s previous album, D-D-Don’t Don’t Stop the Beat, was great because it was impossible to listen to it and not want to dance and be in a good mood. Party music is what they do best. Europop, funky electronic dance music and psychedelic disco grooves that remind you of an updated The B-52s, Pet Shop Boys, Devo and The Sugarcubes. (”Take My Time” features Kate Pierson and Cindy Wilson from The B-52’s.) If you love Scissor Sisters, LCD Soundsystem, Datarock or HBO’s “Flight of the Concords”, then I highly recommend it.
  • Eisley: Combinations
    An eclectic set of songs with spooky vocals like Radiohead and sweet harmonies reminiscent of Belly and Sixpence None the Richer. Also reminds me of Travis. (And they have geek cred—their name comes from the town of Mos Eisley in Star Wars.)
  • Matt Nathanson: Some Mad Hope
    Nathanson’s a singer-songwriter in the David Gray, Damien Rice, Ari Hest mold. It’s a little sugary for my taste but if it isn’t for yours then this could be good music to code by.
  • Linda Thompson: Versatile Heart
    Folk in the style of Joni Mitchell and Joan Baez with overtones of country.
  • Blaqk Audio: CexCells
    A side project by two members of the punk rock band AFI. Only it’s not punk, it’s a throw back to dark electronica/synth pop like Joy Division, Depeche Mode, New Order and 808 State. My criticism is that it may be too authentic and that they don’t take the sound anywhere new. But if you’ve been jonesing for the 80’s…
  • Dave Matthews & Tim Reynolds: Live At Radio City
    A must for Dave Matthews fans, skippable for everyone else.
  • Paul Van Dyk: In Between
    Two hours of dance/trance music by the 20-year veteran German DJ for $9.99. There was a time when that would have seemed like a great offer to me.

New to iTunes

  • John Lennon: Working Class Hero - The Definitive Lennon
    The whole John Lennon catalog was added to iTunes. (Another small step towards offering The Beatles catalog…) This is a 2-CD/38-song greatest hits collection from his solo career. It’s also from EMI so it’s iTunes Plus (no DRM and better sound quality for $.30/song extra).

Two Interesting Books

Thursday, August 16th, 2007

Two recent books caught my attention. I’d love to hear thoughts from anyone who’s read either of them. Both of them are “big picture” programming books and both are from O’Reilly.

The first book is “Beautiful Code” edited by Andy Oram and Greg Wilson. Each chapter is a case study on code design with 33 chapters total. The chapters span many programming languages (Perl, Python, Ruby, Java, Haskell, Scheme and more) and many are by heavy-hitters in the programming world like Tim Bray (XML, Atom), Douglas Crockford (JSON), Simon Peyton Jones (Haskell), Brian Kernighan (Unix, C, AWK), and Yukihiro Matsumoto (Ruby). It just came out in June but has been getting great reviews.

O’Reilly describes it like this:

“How do the experts solve difficult problems in software development? In this unique and insightful book, leading computer scientists offer case studies that reveal how they found unusual, carefully designed solutions to high-profile projects. You will be able to look over the shoulder of major coding and design experts as they work through their project’s architecture, the tradeoffs made in its construction, and when it was important to break rules.”

Safari Books Online has posted an interview with Oram and Wilson about the book. O’Reilly has also launched a related web site which is for further discussing the projects in Beautiful Code and other similar projects.

The second book is “Programming Collective Intelligence” by Toby Segaran. It was just released this month.

O’Reilly describes it like this:

“Want to tap the power behind search rankings, product recommendations, social bookmarking, and online matchmaking? This fascinating book demonstrates how you can build Web 2.0 applications to mine the enormous amount of data created by people on the Internet. With the sophisticated algorithms in this book, you can write smart programs to access interesting datasets from other web sites, collect data from users of your own applications, and analyze and understand the data once you’ve found it.”

Tim O’Reilly wrote a thought-provoking blog post in support of the book where he asserts that the power of the “Web 2.0 revolution” doesn’t lie in user-submitted content or Ajax-powered interfaces but in the ability to “harness collective intelligence”. (I’d argue that it’s all three, but his point is well-taken.) He defines “Web 2.0″ as: “the design of systems that harness network effects to get better the more people use them.” To do that programmers have to extract meaning from mountains of data. They have to shape it using their own intelligence—take the noise and make it signal. “Programming Collective Intelligence” attempts to teach the techniques and algorithms to get started.

I just ordered them both. I’m not sure if they will make for good vacation reading, but I’m sure they will be good airplane-on-the-way-to-vacation reading. (If they arrive in time, both of them aren’t shipping immediately.) If you order them direct from O’Reilly, they are offering a “Buy 2 Get 1 Free” special (I picked “Mastering Regular Expressions”) and orders over $30 get free shipping. (And don’t forget that it might be considered a business expense…)

Maker Faire Austin

Thursday, August 16th, 2007

Austin Maker Faire

Maker Faire, the two-day family-friendly event celebrating crafts and engineering sponsored by Make Magazine, is coming to The Travis County Fairgrounds in Austin, Texas on October 20-21, 2007. Adult tickets are $20/day and there are discounts for students and anyone under 21 years old.

If you want to know what it’s like, you can review pictures and video coverage of the May event in the Bay area.

Lessons from the Facebook Leak

Tuesday, August 14th, 2007

Facebook Logo

If you haven’t heard already, a few pages of PHP source code for Facebook were leaked online. The site wasn’t hacked so much as a back door was left open.

Here’s what Facebook had to say:

“A small fraction of the code that displays Facebook web pages was exposed to a small number of users due to a single misconfigured web server that was fixed immediately. It was not a security breach and did not compromise user data in any way. Because the code that was released only powers the Facebook user interface, it offers no useful insight into the inner workings of Facebook. The reprinting of this code violates several laws and we ask that people not distribute it further.”

Some geeks were elated, some horrified, and some just shrugged. I fall into the third category.

It did offer a glimpse behind the wall of one of the most hyped companies of the moment and it’s always interesting to see how the industry leaders are doing things. While the code could provide details that might compromise the security of their other servers and pages, I’m guessing they are already re-engineering their setup to make any clues useless.

But this leak doesn’t mean that PHP is flawed. It doesn’t mean that any server hardware/software choice was to blame. It was misconfigured. It was human error. (“This sort of thing has cropped up before and it has always been due to human error.”)

Instead it is a cautionary tale about being thorough and vigilant. It should remind web developers and users not to assume sites are secure just because the code is good or the company is reputable. A website is only as secure as it’s weakest link. You can only take a limited amount of security for granted.

If you want to try to improve some of those weak links on your site… Nik Cubrilovic offers four tips to help prevent your server from doing the same thing. (Though a lot of people have blasted his assertion that PHP is known to sometimes return source code…) Vidyut Luther lists three more tips that can help.

Let’s Get Ready to RailsRumble!

Monday, August 13th, 2007

RailsRumble Badge

The First Annual Rails Rumble Championship has been announced.

Rails Rumble is a competition to test your Ruby on Rails hacking skills by building a brand new web application over two days—September 8-9, 2007. Your team, consisting of up to four people, gets just 48 hours to design, develop, and deploy a web application from scratch. The winners of the Rumble will be judged by the Rails community. There will be prizes and Ruby East will showcase some of winners at their conference.

Not only does it sound like fun, but this could be a good opportunity to dig up those back-of-the-envelope and cocktail-napkin ideas that you’ve been saving and turn them into a real web applications (while getting great exposure). I’ve definitely got a few of those lying around, but unfortunately I’m booked that weekend.

I think it would be cool to see coders who don’t know each other collaborate. I also think it would be sweet to have teams grouped around a common idea: maybe four women coders willing to show up the boys, or four coders interested in applications for charaties or non-profits, or coders from four countries putting together an international application, or four college kids improving the student loan experience… You get the idea.

Don’t have a team of four? You can probably find other solo-programmers by posting in the comments to this post or via the Ruby on Rails list.

Who knows? Maybe your quartet will become the founders of the next killer web app.

Music for Coders: August 11

Saturday, August 11th, 2007

New and Notable This Week

  • Public Enemy: How You Sell Soul to a Soulless People Who Sold Their Soul?
    It’s been nineteen years since It Takes a Nation of Millions to Hold Us Back was released. Now Public Enemy is back with an album bearing an even longer title. And while it’s hard to ever live up to that first legendary album, this album actually comes amazingly close in quality, even if not in influence. It’s amusing to see them show back up on the scene and show everyone else how it’s supposed to be done. Their musical style hasn’t changed much but the 21st Century studio production values give their sound everything it needs in the way of an update. In my opinion, “Harder Than You Think” and “Black is Back” are the stand-out tracks.
  • Grace Potter & the Nocturnals: This Is Somewhere
    Bluesy, folksy, country, soul, rock. If that sounds all over the place: think Bonnie Raitt, think Nora Jones, think Edie Brickell, think Lucinda Williams, think Patti Smith, think Joan Osborne.
  • Carla Bruni: No Promises
    The second album by the Italian/French model/singer has a few nice songs, but overall it’s not as good as her first effort. Her first was all in French; this one’s in English and has been out in the UK since January. Still I think she easily takes the trophy for most beautiful singer of the year…
  • The Budos Band: The Budos Band II
    Afro-beat with a heavy dose of funk—merging Fela Kuti and The Meters.
  • 1990s: Cookies
    I don’t think it’s nearly as good or catchy as Kings of Leon, The Fratellis, OK Go or Louis XIV, but if you like that up-tempo, fun-pop sound you might like it.