Mastodon

Yearly Archives: 2011

Uncategorized

Kid-Zoom

Politics

The Would Be Rabbit Assassin

On April 20th 1979, President Jimmy Carter was attacked by a giant, swimming rabbit. Yes, this actually happened, and we have the pictures to prove it.

Uncategorized

NYC kills the 1 day MTA Fun Pass

If you live in New York City, people visit you. It’s not you, it’s the city, but hey, I’ll take it. Inevitably the question of the subway arises: How do I get from where you live to where I want to go? In the past, the answer was simple. Just buy the $4 one day funpass, and well, don’t worry about it. Just hop on the subway, and go! NYC is a daunting enough place for tourists, the funpass, introduced in 1999, helped make NYC a little bit friendlier and easier to navigate. I’ve personally walked a few random tourists through buying one.

 

Now it’s gone.

 

It’s a real shame, and I think it’s a bad move on the MTA’s part. I understand why they did it: the $4 fun pass would have been $20 cheaper for your average commuter than the increasingly dear monthly pass. ( Which at $104 a month makes a vespa seem very attractive)

Unlimited transportation within the City is, I believe, a tremendously freeing thing. The monthly pass means that I can stop off anywhere, at any time, en route to work or coming home without racking up another $2.50 in fees. It means I can peruse shops at leisure, pickup something from the farmers market, or go out to eat without worrying how much it’s going to cost me just to get there and get home. The same is true for tourists: unlimited subway passes turn the city into their playground. How many tourists now are going to hop off the subway in soho on their way to Times Square when it will cost them an extra $2.50?

I’d wager that the loss of the funpass, while probably earning the MTA a little bit of money in the short run, will be a huge net loss for the City as a whole. Especially for small businesses in areas that don’t traditionally get alot of tourist traffic, the tax on wanderlust will hurt. Less tangible, though perhaps even more damaging, is the effect on the world’s image of NYC. The magic of travel is the road less travelled, the serendipitous cafe, the joy of discovery. The fun pass gave tourists the excuse to indulge in an adventure. It’s loss means that the City is a less magical place. It’s glitter will fade, and that for more and more visitors, Bubba Gump’s in Times Square, The Empire State Building, and Ground Zero will be their New York.

Whatever benefit the MTA gets from killing the funpass, it’s not worth it.

Technology

Magic Regex Generator

txt2re.com: input the text you’d like to run a regex against, and then select the results you’d like returned, and presto! it provides the code in the language of your choice.

This system acts as a regular expression generator. Instead of trying to build the regular expression, you start off with the string that you want to search. You paste this into the site, click submit and the site finds recognisable patterns in your string. You then select the patterns that you are interested in and it writes a fully fledged program that extracts those patterns from that string. You then copy the program into your editor or IDE and play with it to integrate it into your program.

Amazing.

Technology

Glasses free 3d on the ipad 2

Using the forward facing camera to track the location of your eyes, the iPad2 can dynamically create a 3D environment that reorients itself as you and the iPad2 move.

Random Rants

Question Assumptions

So often the traditional methods and means of getting things done are built around assumptions that are either outdated, or don’t apply in a novel situation. Mark Wahlberg was able to shoot several fight scenes, which typically take 20 days each, for a movie whose entire shooting schedule was 35 days. How did he do it? He actually filmed real fights, the same way that HBO films live fights for pay per view.

From 37 signals:

Experts go with what they know. And they’ll often insist something needs to take a long time. But when you don’t have tons of resources, you need to ask if there’s a simpler, judo way to get the impact you desire. Sometimes there’s a better way than the “best” way.

The question becomes, then, how can you tell if there is a simpler way? That is the result of being honest with yourself about what it is you are trying to achieve.

The goal was to make the fights seem real. Not to make them look good. To seem real. Focusing on that changes the requirements.

It enables you to switch mental modes: We aren’t making a movie, we are shooting a fight. That happens all the time, in real time, on TV. When you re-examine your requirements, you can see where there are shortcuts to be made not only because restrictions that previously existed no longer do, but a clearer understanding of the goal enables you to step outside your current domain and re-examine other domains for best practices. In the case of “The Fighter”, the other domain was that of sports television: literally brimming with expertise and best practices around capturing live action in a compelling way.

The enemy isn’t best practices and acquired wisdom, it’s a failure to understand truly what it is your want to achieve, and from there search for expertise in other domains.

Technology

Nginx, WordPress Network, and Fastcgi Cache: The Ultimate Guide.

Update: new sections in the nginx config for handling the wordpress admin section!

Update: new upstart script.
Update Feb 9, 2016 No longer need ngx_cache_purge compiled in, Ubuntu 14.04+ specific.

In honor of Antirez’ fantastic post here: On the web server scalability and speed are almost the same thing, I’m sharing my Nginx configuration for WordPress Network (previously WordPress-Mu).

I’m assuming you are running ubuntu and you know the basics of system administration. I’m also assuming you’re using some sort of fastcgi backend. I suggest this excellent howto from interfacelab as an excellent starting point.

First, go get the nginx mainline PPA. Might need to install common-software-properties first.

Next,in your nginx.conf, add this line in the http section:

This creates a cache of 64MB. It’s stored in memory, so be sure you’ve got overhead. If you’re running a blog, unless you’ve got HUGE files, it’s unlikely you’ll need this much cache, and you can probably safely pare this down further to save memory.

And the final piece, the server configuration for nginx. Note the usage of the variable $nocache, and also the purge location.

Be sure to install the nginx_proxy_cache_purge plugin, and activate it network wide. And that’s it!

Just for kicks, try:

Post your results in the comments!

If you happen to be using a recent ubuntu, try this out for your upstart script

Random

Our Lives Are Spent Trying To Pixellate A Fractal.

via b.aking.ca

Uncategorized

Art Of Matt Moore

Via the always excellent Datachurch

Technology

Mod_Pagespeed & Smush.it for jpegs: don’t use them

Don’t use mod_pagespeed (with the default settings! see below for more info) or Smush it if you care at all about how your pictures look.

So, in looking around at some nifty solutions to speed up page rendering and web serving in general, I came across mod_pagespeed and smush.it, both claiming to provide all sorts of wonderful optimizations, specifically, losslessly compressing images. All of their other claims aside, the particular claim regarding lossless image optimization is a lie. A damned lie. The “optimized” images look like washed out crap, at least using the default optimization settings for both systems.

Smush.it claims it’s optimization is lossless, which is clearly not true. Mod_pagespeed lists lossy compression as a risk in their documentation. Points off for me for failing to RTFM.

Mouse over the images below to see just how bad the optimized versions are.

from mod_pagespeed

From Smush It:

Update from @jmarantz: Try ‘ModPagespeedDisableFilters rewrite_images’ or ‘ModPagespeedDisallow *.jp*g’ to turn off lossy compression.

Will do. Thanks for the note.

Random

Chess Without Turns

Reminds me of playing speed chess in Washington Square: Chess Without Turns.

Essentially the strategy against newbs is get the queen in action as soon as possible and go on the offensive. Against more advanced players, you have to play defense, attempting to take out their powerful players until all they have is pawns.

Technology

Electric Bikes Are Here.

I’m an ardent futurist. I believe that prodigious improvements that technology has provided humanity over the course of our existence will continue indefinitely into the future, much like the inevitability of evolution and entropy.

That said, I’m a pragmatist as well. “If it ain’t broke, don’t fix it” are wise words to live by.

So, when I see an old standard, the preferred method of long distance locomotion for billions of human beings supplanted by new technology I start to take notice.

For the past year, after having moved out to brooklyn, I’ve noticed a trend among the deliverymen of our neighborhood: one by one they are moving to electric bicycles. At first, I thought it was a fad. Someone figured out that by spending a little bit more on their bike, they wouldn’t have to peddle all night long. I thought, surely this new technology, when faced with the rigors of delivery service would soon succumb to the more robust traditional human powered bike, with it’s easily repaired mechanical systems. But the fleet of electric bikes has only grown and surprisingly one model seems to have won out the in the selection of the fittest: the green power classic bike, which can be purchased for something on the order of 4 to 5 times the street value of a huffy.

Essentially, the benefits of an electric bike outweigh the total costs of ownership for delivering food, perhaps the most rigorous use case for a bike. This is a watershed moment for electric personal transportation revolution.

Here they are, in action:

Politics Technology

Grepping for Gaddafi

How do you programmatically find someone’s name in text if there is no generally agreed upon spelling? Moamer Kaddafi present a unique challenge for those of us who like to parse our news before reading it. Several solutions are presented at StackOverflow

The regex, which basically brute forces several well known spellings:

\b(Kh?|Gh?|Qu?)[aeu](d['dt]?|t|zz|dhd)h?aff?[iy]\b

This solution, though, is my favorite though. It uses Soundex which searches for any set of sounds in a given set of english text that approximate the basic phonetics of Gaddafi’s name:

G310, K310, Q310

Technology

What the Hell is a Microsievert?

Handy chart explaining radiation exposure from xkcd.

Technology

Navigational Aids for the Visually Impaired

NAVI – Navigational Aids for the Visually Impaired: Hacking together the Kinect, a vibrotactile waist belt, and a blue helmet to help blind people navigate. Also Vibrotactile is my new favorite word.

Mastodon