Kenton Jacobsen's Blog http://www.brokentone.com The most recent posts from Kenton's Blog brokentone.com Sun, 11 Sep 2011 13:41:24 -0500 PHP: A question of how to quote http:/www.brokentone.com/blog/1788/ http:/www.brokentone.com/blog/1788/ This is my first really technical post on my blog here, so bear with me if you're not from the techie crowd (in fact, you may just want to skip this one, your brain cells don't need the stress). Single and double-quoted strings are an oft-argued entry PHP topic; however they are used so often that getting to the bottom of this issue could have significant performance improvements. Our goal in designing high performance websites is to optimize the common conditions and avoid the edge case gotchas. With that in mind, let's take a look at this issue.

When I started PHP 4, (which meant moving from the illustrious PERL) my good friend and ZCE Justin Beasley (@justbeez) was all about the single-quoted strings. I pretty much took his word and the documentation seemed to support them as a better go-to, but is it still that way in modern PHP? TL;DR is yes, but not by much. PHP has gotten a lot smarter in recent versions, but there still is overhead to variable embedding.

All of my loads of PHP Bench actually showed double-quoted strings performing slightly better than single (surprising!). Unfortunately he also does not note which version of PHP he is using. But, on the other side of the aisle, Micro Optimization notes that double quoted-strings are slower. Classy Llama (who also does not show which PHP version he's working on) shows a significant performance detriment to actually using an embedded variable over concatenation, and really if you aren't going to embed variables (other than avoiding escaping strings with lots of apostrophes) why would you want to use a double quoted string? As Classy Llama points out, there is a readability benefit as well to using concatenation and Zend.

Now, I'm thinking this is a version issue (yet another one who doesn't list his version), but this guy noticed that if you ever use a dollar sign that is unattached to a variable in a double-quoted string, there is a huge performance penalty. Even though this is an edge case, it's a great reason to use concatenated single-quoted strings. However Jeff Moore is suggesting that all the tests thus far are missing the boat because the actual embedding process will be done on interpretation which is not being considered in these processes. So, perhaps this is all meaningless. When it comes down to it, I think concatenated values are easier to read, and it's quite possible single-quoted strings perform better.

Permalink
Comments

]]>
Sat, 27 Aug 2011 21:44:09 -0500 Hurricane Irene Part 2 http:/www.brokentone.com/blog/1741/ http:/www.brokentone.com/blog/1741/ I went into Manhattan to see how things were going over there. My driver (since there is no subway service) said that he's worked every NYC disaster for the last 10 years and was excited to get some extra cash today from the storm rates.

Staples had a sign with all of the things that were out of stock.

Plywood covered a good deal of the historic Flatiron building.

Workers install plywood on the Flatiron building.

The great majority of stores in lower manhattan were closed for hurrican Irene.

SoHo Apple store closed, covered, and sandbagged. Some helpful individual added what appears to be an Apple friendly hurricane name.

Streets closed in the Battery Park City area--part of evacuation area A.

Very few cars were on the street, so bikers had plenty of space to ride.

Permalink
Comments

]]>
Sat, 27 Aug 2011 12:44:09 -0500 Hurricane Irene Preparation http:/www.brokentone.com/blog/1732/ http:/www.brokentone.com/blog/1732/

Permalink
Comments

]]>
Sun, 24 Jul 2011 22:05:48 -0500 Derek on the roof http:/www.brokentone.com/blog/1585/ http:/www.brokentone.com/blog/1585/

Got to take these photos a few weeks back of a new friend Derek Stusynski for his new book. This was the roof at the building of a friend of a friend of his, and I'll take a NYC roof whenever I can.

A parting shot of the view. Anyone want to sponsor me to live here?

Permalink
Comments

]]>
Mon, 04 Jul 2011 18:44:41 -0500 Nathan's Hot Dog Eating Contest http:/www.brokentone.com/blog/1508/ http:/www.brokentone.com/blog/1508/ There are few classic New York events that everyone knows about, the Macy's Thanksgiving Day Parade, the New York Marathon, Times Square New Years, and Nathan's Hot Dog Eating Contest. New Years is fun, but I really remember when Kobayashi was dethroned by Joey Chestnut (and last year arrested!) I've always wanted to see it, and this year, I got to see it with some special access. Anyway, without further ado, here are my best images from today.

As Joey enters with the mustard yellow belt, he passes a wall of his past accomplishments.

An 18-year-old member of the trampoline team "The Skywriters" entertains the crowd while they await the hot dog frenzy.

Kids are up first in the best manners contest.

Sonya Thomas won the women's competition with 35 hot dogs eaten.

Thousands of people jockeyed for a good view of the stage.

A member of the bull whip team the petals off the rose held securely in Nathan's CEO's. . . well.

Eaters prepare their beverages.

The Chinese team arrives. Unfortunately, none of them placed.

Joey is ready to begin as the crowd counts down.

Patrick Bertoletti's hands were stained red by his choice of beverage.

George Shea announces Joey Chestnut as winner with 62 hot dogs consumed.

Permalink
Comments

]]>
Mon, 21 Feb 2011 16:58:32 -0600 Worst Website and Customer Service http:/www.brokentone.com/blog/1151/ http:/www.brokentone.com/blog/1151/ I have recently gotten into the habit of sending feedback to companies when I have thoughts or find issues with a website. As a developer, I know it is easy to overlook an issue in interaction, or something renders differently in a browser, or a code update affects something you didn't expect, and being tipped off to a problem can be very helpful.

A few weeks back I gave Gilt (one of my favorite recent startups/companies/websites ever) some feedback on their Chrome Web App (in summary, very good), but the e-mail address included in the app bounced the message back. This gave me a second item of feedback. The customer service rep responded, helpfully suggesting that their website works best in FireFox. . . but in all they're great

Today I was looking for a particular type of suit. A Google result sent me to a site that sent me to "Men's USA." I almost immediately closed the website because I was overwhelmed at the incredibly terrible design.

In addition to making me want to gouge my eyes out, I am highly suspicious of the security considerations that websites that look like this would take. But rather than just passing by, I decided to give them a little hint for why their clicks may not be translating into sales. I really did not have anything positive to say, I mean. . . look at that website. Then they sent me a quick response and went from having just a terrible website to having horrible customer service.

In case I was ever considering returning to purchase something if there is ever a new website I now have my answer. In honor of this feat, I made them a little graphic that they can place next to their nameless reviews and testimonials that are on their own website:

Permalink
Comments

]]>
Sun, 24 Oct 2010 00:57:43 -0500 On Assignment: Editorial http:/www.brokentone.com/blog/1043/ http:/www.brokentone.com/blog/1043/ Sometimes it's good to be forced to concept, shoot, and edit photos. This semester I have a class when I'm able to work out some personal projects-ideas that have been in my head for a while-on a deadline.

This particular assignment was to do an editorial spread, with concepting, lookbook, editing and such. My lookbook consisted of some shots by Jeremy Cowart, Erik Almas, Joey Lawrence, Norman Jean Roy, Trever Hoehne, Annie Leibovitz, you know the big guys. I won't publish that here because I'm not sure of the copyright issues.

My idea was to take a well-dressed friend to the laundermat, and get a dramatic image of him looking intense in the ambience of the place.

This is my final image, which is pretty close to what I had in my head.

However, the chairs weren't there. . . I also had to use my superwide lens and later correct the distortion. I also had to climb into a washer to get enough distance between the subject and I.

Then here are the rest of the best from the shoot.

Permalink
Comments

]]>
Sun, 20 Jun 2010 22:06:50 -0500 My NY Haircut http:/www.brokentone.com/blog/669/ http:/www.brokentone.com/blog/669/ .offLeft { position:absolute; left:-31337px; }

Today I got a fade from a zombie-hair cutter. . . in Harlem. Now let me explain. I've had this idea for some years now that I needed to get my hair cut and a shave in a traditional barber shop. You know the type, a place with a red, white and blue spinning pole out front. Inside is an old barber who waves at his friends walking by and knows his way around a razor blade. I'm not sure why I've had this idea: perhaps it was an overdose of Sesame Street when I was a kid, but that is probably a story for another time.

So I decided this weekend that my hair had finally gotten completely out of control and I needed a cut. I figured, why not check this item off my "bucket list?" Now, here in NY, there are a lot of barbershops, so I decided to get a real authentic experience. I figured that the most authentic options would be either the Bronx or Harlem. After outlining my plan to Todd at lunch, he heavily encouraged me not to the Bronx, and slightly encouraged me not to go to Harlem. So, Harlem it was.

I caught the A train up to 125th street, up near the classic Apollo Theater, and put in my iPhone "barber." "Big D's Barber Shop" was a sure winner in my mind, but they were closed. Instead I quickly found "Jim's Barber Shop," and took a peek through the glass. Inside there was an older gentleman with no customers. This seemed like just the spot.

I went inside and asked for a haircut and a shave and the gentleman said sure so I sat down in the chair. He asked what I wanted so I said, "kinda spikey, kinda messy." He seemed to know what to do with that so he got out his tools then asked, "how do you want the sides, faded?" My last few haircutters have used words like "blended" when describing the sides, so I figured that it was about the same thing. I also knew that I probably didn't want a fade (although I wasn't exactly sure what a fade was), but I figured this was a different deal.

He threw a guard on a trimmer, and I took off my glasses to let him work. He turned my chair toward the street, and started working on my hair. Everything was going according to plan and I was smiling as my dream came true. Hair was falling all around me and I remembered just how much extra hair I had. I was glad to see it all go and have a clean new cut. I was thinking it was taking a while, but the guy (who called himself the Hair Doctor) let me know that he was taking his time to make it look real good since he didn't have any other customers.

About this time, he excused himself for a quick bathroom break. I threw on my glasses and took a glance at the mirror across from me. Were I a swearing man, I would have I released a string of profanity. I could see skin on the side of my head. I've never seen skin on the side of my head before. I was in the final stages of a fade. Worse than that, I still had a lot of hair on the top and looked like K-Fed.

He came back and I attempted to contain my despair. He began telling me how he had been cutting hair for 30 years and there wasn't anyone's hair he couldn't cut. He had my head and hair all figured out now, and this was a good haircut. "You can just feel it when you have a good haircut, you know?" he said. He reminded me that he came to the right place. Then he said this particular shop had been there since 1945 and was the oldest in Harlem.

Apparently when they filmed I Am Legend out here, they enlisted the help of the Hair Doctor and another guy to cut the zombie actor's hair. He said he got $600 a pop and bagged it all up for Locks of Love just because. About this time, he finished up and styled it up. Shortest hair I have ever had. . . particularly on the sides.

In all, I met a nice guy and had a quality haircut. . . just not what I was looking for. I also learned that sometimes you can safely remove items from your bucket list without doing them. Some things just aren't meant to be done. Luckily, my hair grows fast, and Macy's is having a sale on Ben Sherman hats (those go with a suit for work, right?)

Permalink
Comments

]]>
Tue, 01 Jun 2010 23:57:12 -0500 Coney Island - Memorial Day http:/www.brokentone.com/blog/571/ http:/www.brokentone.com/blog/571/ ul.left { float:left; width:325px; padding-left:25px; } ul.right { float:right; width:350px; } ul a:link,ul a:visited,ul a:hover,ul a:active { color:#EEEEEE; font-size:1.2em; text-decoration:none; } ul a:hover,ul a:active { text-decoration:underline; }

On Memorial Day I got to go down and explore Coney Island. While it really isn't all that amazing (but is absolutely packed with people), it was worth a picture or 30.

Also, I decided to be a nice guy and give away a desktop background.

Click to download the appropriate size for your monitor. If your size is not listed, try a larger image.

Permalink
Comments

]]>
Sun, 30 May 2010 20:20:22 -0500 Keelin Senior http:/www.brokentone.com/blog/556/ http:/www.brokentone.com/blog/556/ I had the chance to take some photos of my brother, Keelin, for his highschool graduation announcements and such. We went downtown and had some fun.

He thought I was a little crazy, but I put a flash inside an elevator in the parking garage and triggered it from outside. The flash also triggered the doors to reopen for our next take.

Thank you Trever Hoehne for inventing Bokeh, muted tones and textures.

Permalink
Comments

]]>
Thu, 21 Jan 2010 23:20:33 -0600 Nathan's Senior Photos http:/www.brokentone.com/blog/268/ http:/www.brokentone.com/blog/268/ Okay, so I have been a little off my game lately. I finally figured out a new way to get rid of spam, and I'm gonna start updating more often. For my first new update, may I present Nathan.

Nathan asked me last semester to take his senior portraits before his hair was affected by chemo. I was excited to provide him with great images in this time of his life and I knew that he would be down with making some creative images.

These next photos are before and after Photoshop. I saw this concept while I was out shooting and took it, planning to edit my assistant out later. Now after hours of cloning bricks in, I know realize I should have fixed it in camera. Lesson learned, but I think the photos still came out pretty good.

Permalink
Comments

]]>
Fri, 24 Jul 2009 01:35:45 -0500 Roadtrip to Nor Cal - Part 2 http:/www.brokentone.com/blog/184/ http:/www.brokentone.com/blog/184/ So here is the next batch of photos from my trip. Living large in Sacramento and San Francisco.

Permalink
Comments

]]>
Wed, 22 Jul 2009 01:22:22 -0500 Roadtrip to Nor Cal http:/www.brokentone.com/blog/177/ http:/www.brokentone.com/blog/177/ I took a trip this past weekend up to Sacramento and back. Here is the first installation of my experience.

Permalink
Comments

]]>
Tue, 30 Jun 2009 01:11:11 -0500 Inspiration: Shinichi Maruyama http:/www.brokentone.com/blog/152/ http:/www.brokentone.com/blog/152/ I have a certain fascination with crisp organic-type lines, whether it's vector work with curvy lines or well focused and composed ink drops. Shinichi Maruyama from Japan just rocked my world with his water and ink airborne photography.

Check out more of his work.

Found via Josh Spear. Check out a photo of how he does it after the jump.

Insane, incredible work.

Permalink
Comments

]]>
Mon, 22 Jun 2009 01:17:15 -0500 From the Archive: The Cemetery http:/www.brokentone.com/blog/146/ http:/www.brokentone.com/blog/146/ A friend and I went to a local cemetery a few months ago now to take some cool photos, and here they are.

Permalink
Comments

]]>