With Obama, History Repeats itself

The phrase "history repeats itself" deserves a place of prominence in the book of cliches. Like most cliches, it describes a big idea, but leaves out a crucial detail. The truth is that history repeats itself, but the effects are magnified at every iteration. Another way you could put it, is that "each time, it costs more and more." But clearly, these effects could be good, bad or neutral.

The phrase certainly rings true with the rise of Barack Obama. Consider this New York Times Article from over 3 years ago.

Stupid Simple Web Scraping with SimpleXML


The other day, I was tasked with building a data scraper. Having never built such a contraption, I naturally turned to the Internets for preexisting code. I was horrified with what I found.

The “free” PHP scripts (that’s “free” as in “free baby vomit”) were all infested with the worst sorts of newfangled regex, and PHP 4 era DOM traversing.

Super Tuesday

"Leaked" exit polls suggest Obama will have a very good night. Not quite celebrating yet, as the last 8 years have conditioned me to expect heartbreak everytime I feel a glimmer of hope in the political arena. Who knows, though: maybe the exit polls are right, and there might be a glimmer of hope for the USA. Or, perhaps the democrats will do what they've always done, and shoot themselves in the foot by nominating HRC. Lord knows the Dems do nothing better than sabotage theirselves. THey are perhaps the only party in the world that could lose even THIS presidential election.

WWYUIGD? Two Guidelines for Writing Hell's Best CSS

WWYUIGD (What would Yahoo User Interface Grids Do?)  is defined as two things:

  1. Exaggerating a good idea to such ridiculous proportions that it becomes a bad idea.
  2. The duel guidelines that anyone can use to write hell's best CSS

Guideline One: Meaningless numbers are great

The .yui-t(x) set of classes offer powerful control over sidebar widths, and positions. Indeed, so powerful that the classes themselves offer neither clue, nor an understandable pattern. 

  1. .yui-t1: 160 on left
  2. .yui-t2: 180 on left
  3. .yui-t3: 300 on left
  4. .yui-t4: 180 on right
  5. .yui-t5: 240 on right
  6. .yui-t6: 300 on right
  7. .yui-t7: One full width column 

If Yahoo was full of sissies, they would have made this system semi easy to remember by using this pattern:

Enabling/Installing New Modules via Update.php: The Complete Solution

In our last episode of enabling new modules via update.php, Steve McKenzie pointed me to a better method: module_enable(). A quick test found, however, that it didn't run the install files, and didn't rebuild the module files cache. So after spending 5 minutes in system.module, I found all the missing pieces. The example update function below will install and enable the new module, as well as rebuild all the css, node type, and menu caches.

Enabling New Modules Via Update.php

UPDATE: There's a better way.

I work with 3 other developers, all of whom have their own local sandbox of our site. Since we're constantly adding new modules, I found a simple way to enable a new module via another module's .install file. That way, all we have to do is run update.php when we update our source tree.

Here's a simple example update function:


Six Conditions that Form Online Communities


Like a tornado, online communities only form under certain conditions. If you're looking to build an online community, understand that they are very difficult to build artificially. They seem to only emerge from natural conditions. Indeed, you can help them emerge, but you can't *create* them in my experience.

The Five Lessons of the Last Internet Bubble

Journalists warn us that "it feels like we're partying in 1999"... "Watch out for bubble 2.0.", they scream. They never elaborate on why, beyond a few token indicators like "crazy silicon valley parties", and stupid companies with stupid names, selling stupid products (if any products at all..) getting venture capitol from stupid VCs. The more educated of these whistleblowers points out that Microsoft gave facebook a ridiculous valuation. I'd give them a+ if I was grading their freshman rhetoric paper. Good support....  Yet, at same time, I have to ask, "You think of the people that built Vista, and IE6 as a canary in the mine of public sanity?"

The Stupid Filter

Anyone who works a lot online will agree that this project is a godsend.:

The concept behind the StupidFilter Project originated during a conversation between Gabriel Ortiz and Paul Starr. StupidFilter was conceived out of necessity. Too long have we suffered in silence under the tyranny of idiocy. In the beginning, the internet was a place where one could communicate intelligently with similarly erudite people. Then, Eternal September hit and we were lost in the noise. The advent of user-driven web content has compounded the matter yet further, straining our tolerance to the breaking point.


Subscribe to Nick Lewis: The Blog RSS