What is Toluu?
Toluu is a free service for sharing the feeds you read and discovering new ones.
Get Invite

Coding Horror

programming and human factors - Jeff Atwood


The Problem With URLsOctober 30

URLs are simple things. Or so you'd think. Let's say you wanted to detect an URL in a block of text and convert it into a bona fide hyperlink. No problem, right?

Visit my website at http://www.example.com, it's awesome!

To locate the URL in the above text, a simple regular expression should suffice -- we'll look for a string at a word boundary beginning with http:// , followed by one or more non-space characters:

\bhttp://[^\s]+

Piece of cake. This seems to work. There's plenty of forum and discussion software out there which auto-links using exactly this approach. Although it mostly works, it's far from perfect. What if the text block looked like this?

My website (http://www.example.com) is awesome.

This URL will be incorrectly encoded with the final paren. This, by the way, is an extremely common way average everyday users include URLs in their text.

What's truly aggravating is that parens in URLs are perfectly legal. They're part of the spec and everything:

only alphanumerics, the special characters

"$-_.+!*'(),", and reserved characters used for their reserved purposes may be used unencoded within a URL.

Certain sites, most notably Wikipedia and MSDN, love to generate URLs with parens. The sites are lousy with the

The Web Browser is the New LaptopOctober 26

I've been reading a lot of good things about the emerging "netbook" category of subnotebooks:

The term netbook refers to a category of small to medium sized, light-weight, low-cost, energy-efficient, Internet-centric laptops, generally optimized for Web surfing and e-mailing.

Like any self-respecting nerd, I already own a laptop, of course, but my wife has taken to surfing the internet at night and doing her Java-based New York Times crosswords in bed. Plus there's the whole pregnancy thing, so it'd be nice for her to have her own "space" laptop-wise. So I pulled the trigger on an Acer Aspire One netbook.

acer aspire one, in pink

The specs are indeeed modest, but not bad at all for the $369 sticker price:

  • Intel Atom 1.6 Ghz CPU
  • 802.11 b/g wireless
  • 1 GB ram
  • 120 GB hard drive
  • 8.9" 1024x600 display
  • Windows XP Home
You're Reading The World's Most Dangerous Programming BlogOctober 24

Have you ever noticed that blogs are full of misinformation and lies? In particular, I'm referring to this blog. The one you're reading right now. For example, yesterday's post was so bad that it is conclusive proof that I've jumped the shark.

Again.

Apparently, according to one Reddit commenter, the information presented here is downright dangerous:

Jeff Atwood has always held the distinction of having the most dangerous programming blog, in that some young or aspiring developers may actually listen to some of his "advice", but now he's somehow managed to snag the achievement of having the most inane programming blog as well.

To put it in more frank terms Jeff: What you've just written is one of the most insanely idiotic things I have ever heard. At no point in your rambling, incoherent response were you even close to anything that could be considered a rational thought. Everyone in this room is now dumber for having read this post. I award you no points, and may God have mercy on your soul.

I enjoyed the Happy Gimore quote, but I'm not sure my blog has earned that particular distinction yet. If this blog is the most dangerous content that young, inexperi

The One Thing Every Software Engineer Should KnowOctober 23

I'm a huge Steve Yegge fan, so It was a great honor to have Steve Yegge on a recent Stack Overflow podcast. One thing I couldn't have predicted, however, was one particular theme of Steve's experience at Google and Amazon that kept coming up time and time again:

If there was one thing I could teach every engineer, it would be

how to market.

Not how to type, not how to write, not how to design a programming language, but marketing.

This is painful for developers to hear, because we love code. But all that brilliant code is totally irrelevant until:

  1. people understand what you're doing
  2. people become interested in what you're doing
  3. people get excited about what you're doing

That, in a nutshell, is marketing. Just because you're a marketer doesn't necessarily mean you're a marketing weasel. Sure, the two things are highly correlated -- but at its core, marketing is little more than an intermediate level course on

Obscenity Filters: Bad Idea, or Incredibly Intercoursing Bad Idea?October 21

I'm not a huge fan of The Daily WTF for reasons I've previously outlined. There is, however, the occasional gem -- such as this one posted by ezrec:

Browsing through a web archive of some old computer club conversations, I ran across this sentence:

"Apple made the clbuttic mistake of forcing out their visionary - I mean, look at what NeXT has been up to!"

Hmm. "clbuttic".

Google "clbuttic" - thousands of hits!

There's a someone who call his car 'clbuttic'.

There are "Clbuttic Steam Engine" message boards.

Webster's dictionary - no help.

Hmm. What can this be?

As programmers, this isn't much of a mystery to us; it seems every day a brand new software developer is born and immediately begins repeating all the same mistakes we made years ago. I can't resist linking to Language Log again on this topic, where a commenter disputes whether or not this is an actual real world problem:

The "clbuttics" story may be a little exaggerated if not actually a web-legend. Sure, Google returns 4,000 hitsbut by the time one reaches page 2 (in search of a page that isn't reporting on the silliness, or reporting on t