best work of electronic art I've ever seen: "Bright Nights" 3

Posted by Jason Yanowitz Tue, 26 Dec 2006 05:33:00 GMT

It’s a work of art by Tord Boontje (and probably other uncredited people). It also happens to be a product placement for Target. This article has a good picture of the piece. Just in case that goes away, here’s what the picture looks like:

Here’s some video. That gives you a better sense of it. We’re staying in NYC for the week and in Union Square, there is this magnificent piece. It’s like crack for kids. Amira could spend hours just wandering around, delighted by the lights, stunned by the crowds, amazed at the spectacle.

If I had a touch screen, it would be neat to clone this app for the Mac. Perhaps you could do it with the mouse or gestures with an iSight. But that still wouldn’t be as cool.

Part of the joy of it is the collective experience of a crowd of people exploring this bit o’ magic in the midst of the city. Watching children lose their minds is also fun. And then there’s the fact that the interface just works—it’s up to you to figure out what it does. You walk through one of the squares, the piece reacts to you, and your (well, at least, my) initial reaction if just silly happiness. Then you start to wonder how it works, what makes each square different, etc. And it works on many layers. But the social aspect of it, in all its “brick and mortar” glory, is the best part.

Unfortunately, tomorrow is its last day. Perhaps it’ll move elsewhere or be back next year.

rosehosting sucks 8

Posted by Jason Yanowitz Wed, 29 Nov 2006 04:52:00 GMT

Update:
After reading this article, make sure you check out the followup.

Before purchasing major products or online services, I often google for “foobar sucks” first. Although it’s not decisive, I throw the results into the decision mix. This post is a brief contribution to that effort.

To wit, rosehosting.com is a very very very bad choice for those shopping for a Linux virtual private server. You may be tempted to use them because of their low prices. In this case, you definitely get what you pay for.

Purchasing and set up were a breeze. Run-time performance was abysmal. The VPS regularly (at least once a day) stops responding and your web sites are unavailable.

They provide no out of the box services for monitoring the health of your system. We were hosting a few sites on a vps (slideshowr.org, photocastr.com, etc.). We set up monitoring using HostTracker (which works very well for free).

For the first month or so, everything was good. Then we started getting pages every couple of days that showed downtimes ranging from 3 minutes to 2 hours.

So we installed sar to track what was going on. sar has some limitations inside a vps, but those turned out no to matter for our purposes. We had sar write out a snapshot of system activity every 30 seconds.

Then we got another page. Hazah! We checked out the sar output. At the time of the page, the sar log entries had stopped. (And the sar output file was mildly corrupted at that point!). sar output resumed at the same time the web servers became available again.

In other words, our VPS was getting no CPU time from the host system for minutes (or hours) at a time. At this point, we turn to rosehosting tech support. Wackiness ensues.

We send this email (incidentally, rosehosting has a very strong SLA for uptime—well, it’s strongly worded):

Hi Guys,

We are seeing some serious downtime that is happening with disturbing frequency. Here are three samples of our sar output from the last week where we have a grand total of 82 minutes of downtime.

A. What is causing the downtime?

B. What can be done to make it stop?

C. Doesn’t this trigger a refund to us?

Thanks!

Sar output
9/12/06 ( Downtime between 14:00:46 – 14:34:26 or ~34 minutes )

14:00:16 all 22.03 12.17 7.85 39.99 0.00 17.96
14:00:46 all 10.54 1.52 5.23 60.21 0.00 22.50
14:06:15 all 0.33 0.01 0.54 98.92 0.00 0.21
14:07:35 all 11.29 0.07 4.62 83.92 0.00 0.09
14:18:55 all 0.56 0.02 1.09 93.56 0.00 4.77
14:21:57 all 1.56 0.02 4.94 80.26 0.00 13.21
14:32:18 all 7.87 0.08 2.53 5.95 0.00 93.94
14:34:26 all 11.75 0.87 5.39 76.44 0.00 5.55
14:34:56 all 14.12 0.59 6.18 46.20 0.00 32.90
14:35:02 all 3.13 0.72 7.15 37.99 0.00 51.02


9/10/06 (Downtime between 15:24:06 – 15:53:38 or ~29 minutes )
15:23:36 all 5.06 0.62 2.94 58.43 0.00 32.94
15:24:06 all 2.57 0.04 1.65 26.77 0.00 68.97
15:36:19 all 0.48 0.00 0.76 96.47 0.00 2.29
16:26:27 all 1362.23 1458.30 1428.11 11602.42 14592.95 0.00
15:50:50 all 7.14 0.07 2.29 461053591055.50 461053590835.50 24.82 15:53:38 all 8.16 0.03 3.22 88.59 0.00 0.00
15:54:08 all 14.69 0.25 4.38 72.30 0.00 8.38
15:54:38 all 15.96 0.02 3.80 60.05 0.00 20.16
15:55:01 all 11.77 0.00 5.21 68.92 0.00 14.10
15:55:08 all 4.44 0.00 12.31 38.87 0.00 44.37


9/07/06 (Downtime between 06:15:18 – 06:39:00 or ~19 minutes )

06:14:48 all 4.01 0.57 5.54 40.34 0.00 49.54
06:15:18 all 1.19 0.10 4.61 79.13 0.00 14.97
06:19:33 all 0.44 0.00 0.82 98.71 0.00 0.03
02:30:04 all 976.49 1043.46 1022.46 8304.21 10441.30 0.00
06:37:22 all 7.16 0.07 2.29 474935742649.19 474935742422.85 24.98
06:39:00 all 17.15 0.03 4.80 68.88 0.00 9.14
06:39:30 all 4.78 0.07 3.63 67.03 0.00 24.49

Since we were emailing sysadmins, we didn’t want to insult them by explaining the data. Our mistake. We got back this response:

We did not have any downtime lately. You should not be using sar as it will always produce incorrect results in a virtualized environment and is putting strain on your CPU utilization needlessly.

A. There was no downtime as far as we know.

B. There was no downtime so I am not sure what can be done.

C. No. We guarantee 99.5% uptime which in a month comes down to about a little more than 3.5 hours of downtime.

Admin RoseHosting.com

Okay, fair enough, we didn’t give the full context for the sar output, the fact that we had independent evidence of a problem (host-tracker results, etc.). But at this point, we assumed they would take one look at our email, check their own logs, and say, “Oops, we do have a problem.” So we regrouped and sent this:

Hi,

I’m sorry, I neglected to mention before that the reason we started looking at the sar output was because we are using host-tracker.com and it has been reporting downtime at various intervals. So, we started up sar to see what the machine was doing when our websites were unreachable. I agree that sar is not a perfect medium, but the fact that it is reporting exactly the same phenomena at exactly the same time as host-tracker seems to indicate that YES THERE IS A PROBLEM.

Do you run system monitoring software on the box that looks across all the VMs? Is someone’s VM going crazy at times that correspond with the sar output included below? Can you guys take a look at the various IP interfaces to our machine and see if they are passing a strange amount of traffic at the times I have mentioned. In general, is there anything you can do to help debug this?

Thanks for your help,

Four hours later we got a reply. To shorten this post a bit, I will include it along with our reply:

On Sep 13, 2006, at 12:29 PM, RH Helpdesk wrote:
We will investigate this problem further.

Thanks!

Yes, we have internal system monitoring software, but that is not available to the end user.

Cool. Can you dump info about our machine for those periods of time?

We have absolutely no known issues on our network. Please do a traceroute and let us know where the packets are being dropped. If it’s not on our network, there is pretty much nothing we can do.

Yes, if there is packet loss outside your network, we certainly don’t expect you guys to fix it by yourselves.

Thankfully, it looks like the problem is not a networking problem. host-tracker.com uses many machines over many networks to check for outages. It is reporting a complete loss of connectivity which seems to indicate that the machine has gone brain dead.

The sar output also looks as if the machine went totally brain dead for that period of time. If there was a networking problem, I would expect to see the sar output idle time go to 100% instead of reporting close to 0% idle and that it would have a very easy time dumping info into the /var/sysstat file instead of not having enough cycles to even dump a sar line every 30 seconds.

What exactly are you suggesting we should do? The situation on our network is perfectly normal. Your complaint is the only one in the queue. We have had 0 (zero) complaints in the past few weeks for the physical server hosting your virtual server.

I’m not sure what you are asking. If I were you guys, I would have system status information on each of these machines similar to the sar output so that you could tell when one of the virtual machines was using the whole computer. Are you saying that you don’t have the ability to tell if one of our virtual machine neighbors has taken over the whole computer and if so, which neighbor?

I can’t speak to the lack of complaints. I don’t know how many other virtual machines are on the same computer as us and I don’t know what their applications are or if they are even monitoring their own uptime. We have two separate data points describing a brain dead machine. One of them is from a completely independent source: host-tracker.com. The events we are describing haven’t happened just once. They are a common occurrence on our machine. In fact, we installed sar in order to get better insight into what was going on.

Is the QOS you guys have signed up to only applicable to network availability or does it also apply to some minimal number of computer cycles?

Thanks again for looking into this,

Now, at this point, if I was rosehosting, I’d actually be concerned that something odd was happening on our systems and we weren’t capturing that information. Or at least I’d have put together a scenario to explain why host-tracker.com and sar register simulatenous problems but in reality everything was fine. Instead, we got another response explaining that they don’t share their monitoring data, an offer to switch us to another machine (why would that one be better run?) and a bogus technical explanation for what’s occuring:

There could have been an extreme situation or two where the IO was so high that the CPU was in “wait state” waiting on read or write to the hard drives. This means that even though there are plenty of CPU cycles available, the CPUs are unable to do anything and are idling waiting to go out of the “wait state”.

(This is bogus because it doesn’t explain the frequent occurence of the problem, the uniformity of our system behavior, the brain dead nature of the sar output, and so on…)

Our solution: switch providers. I suspect this was a good solution for rosehosting too—we were eating up more in tech support time then our service cost. I am guessing their pricing structure assumes a near 0 cost-of-support.

We went with Linode instead. They cost more, but they work. They appear to take steps to prevent over-subscription of their services. And the web UI for controlling your machine is fantastic. So, in summary: rosehosting drools, linode rules.

[The main source of traffic to this blog is from my friend Bijan but on the off chance you are reading this and using it to make a purchasing decision, I’d be grateful if you left a comment. And yes, I am aware of how rigorous and scientific this approach to polling is.]

Creating a Higher Resolution Life Poster 2

Posted by Jason Yanowitz Sat, 25 Nov 2006 01:45:00 GMT

Last year, after reading Life Poster, I tried making my own. I wanted to change it in a few ways:

  1. Higher resolution print
  2. More poster dimensions flexibility than iPhoto gives you
  3. Less expensive
  4. Different photo sizes (not just a grid of photos) in the poster.

I ended up with a 22×32 inch poster. The picture size is 20×30, with a 1 inch border all the way around. This has the advantage that it looks great even without matting. I just have it dry mounted to foam core and a simple frame put on it.

I found a place (Perfect Posters) that is about half the price of Apple’s Kodak fullfillment, and it’s 300 DPI (instead of 200 DPI). Standard disclaimer: I have no connection to Perfect Posters other than finding their service great.

Here’s what I did. I used iPhoto v6.2 and Photoshop CS 2. I also looked at Posterino but found I didn’t like its interface.

  1. Choose your dimensions (I went with 20×30), how many photos you want across and down (I went with 8 and 16), which means I can have up to 128 photo “slots” and the photos should be cropped to a 4×3 ratio. (20 inches across / 8 = 2.5 inches across. 30 inches down / 16 = 1.875. 2.5 / 1.875 = 4×3.)
  2. Choose your photos. I create a new album in iPhoto cleverly named “My Poster.” In this case, I need about 128 photos. I actually picked a little less than that, because some of them I am going to make bigger than 1 slot (more on that below). I recommend trying to use photos with a mix of colors (and as many from nicely lit places as possible).
  3. Lay them out. Once I’ve picked all my photos, I make the iPhoto window as big as possible and then set the thumbnails to a size that allows me to see them 8 across [you can use the slider on the lower right of the window].
    • Making a photo extra large. In order to break up the grid and to highlight photos I really like, I make some of them larger. In the above poster, I have 2 photos which take up 4 “slots” in the poster. To aid layout, I make 3 duplicates of the photo and then place them in 4 spaces I want the photo to use. Later, in Photoshop, I’ll make it one larger photo.
    • Including portrait (3×4) photos. I use a similar approach for photos that are longer in the vertical direction. I use two slots for these and crop the photos to 4×6. I duplicate the photo once so that I can place it in the two slots it will use.
    • Going crazy Broadway style. You could have a photo take up a 3×3 grid, or crop a photo 8×3 and have it take up two slots side-by-side (I did that in the upper right with a picture of Amira trying to stand).
  4. Export them. Once you’ve picked all your photos and laid them out, you have to export them from iPhoto. Select all the photos in the album (Command-A). Go to File->Export. Click on the “File Export” tab in the dialog box. Select Format: Original, Full Size Images, and Use Album Name. Click Export. Then create a new folder and the images should all get saved into them. In my case, I had 128 images, named “my poster – 001.jpg” through “my poster – 128.jpg” If you don’t end up with as many images as you were expecting, you probably only had a subset of the photos in your album selected when you went to do the export.
  5. Import them in Photoshop (I used CS 2). Select File->Automate->Contact Sheet II. In the dialog box, select the folder you saved all the photos in, choose 20×30 for the image size, 300 DPI, RGB, Flatten Layers, Place Across First, Columns 8, Rows 16, Use Auto-Spacing. After you hit OK, Photoshop will begin doing its magic. Several minutes later, you will have a contact sheet.
  6. Resize your canvas. Image->Canvas Size Width: 22, Height: 32. This will give you a one inch border all the way around. Save your project (File->Save)
  7. Adjust for your larger photos. This part takes the longest. If you have a photo you want to take up 4 slots, open it up (you can use some simple math to figure out which of your 128 files it was) in Photoshop. Then select Image->Image Size and enter the new width and height. In this case, if I want it to use 2×2 slots (4 total), and a slot is 750 pixels across (20/8*300), then I want this photo to be 1500 pixels across. After the resize, do Select->All (Command-A) and Edit->Copy (Command-C)
  8. . Now in your life poster, zoom way in. You are going to want to select the full area that you want to paste this poster into. There’s probably a better way to do this, but I just zoom in super far and draw a box around the four photos I had laid out as a marker for the one big version that I want to insert. Once I’ve selected the area (and you want this to be pixel-perfect so everything lines up), you do Edit->Paste Into and zoom back out to make sure it looks good. I am inept, so it takes me several tried to get the area selected properly. I am guessing there’s a way to just paste into a specific area of a poster, which would be a lot better, but I am a Photoshope neophyte.
  9. Save as a jpg. File->Save As->[select jpg] On the next screen, I use a quality of “10” which produces about a 16 megabyte file.
  10. Upload and print. If you use Perfect Posters, make sure you select “cut to exact size” during the checkout process if you are using my approach of a one-inch white border.

Tools I need to write: Logrolling Review Explorer 2

Posted by Jason Yanowitz Wed, 01 Nov 2006 02:56:00 GMT

On Amazon, I’ve noticed the occasional review by A Real Author of someone else’s book. Spy Magazine had a “Logrolling in our time” column where they would print pairs of cover blurbs:

  • “Greatest Book Ever!” Dan Brown on Tom Clancy’s latest
  • “The writing was… FANTASTIC!” Tom Clancy on Dan Brown’s latest

Anyway, there have to be some of these amongst all the Amazon reviews. Perhaps even a “social network explorer tool” of authors. If they are an author and have written reviews, they have a “link” to that author. If the link is bidirectional, you could color it green. And do one of those fancy-shmancy flash apps the kids are all raving about. And then wrap links to everything with an affiliate id so you could make just enough money to cover its bandwidth costs :)

I haven’t look enough at the amazon API interface to see how easy it would be to construct this. Perhaps someone else has done it?

The difficulties of detecting missing images with flickr and javascript.

Posted by Jason Yanowitz Thu, 17 Aug 2006 23:18:00 GMT

So, we put up a new website, slideshowr for viewing your flickr slideshows. There are a number of things I don’t like about the existing flickr slideshows, in particular, the lack of photo titles, the size of the photos, and the lack of music. So we fixed all that. The resolution I most often want to view my photos in is “large”. Flickr only makes “large” photos if the resolution exceeds certain limits. The only way to find this out ahead of time (via the api) is to request the size info for every photo. That can take awhile.

So, I thought, why not try to load the photo and if that fails, rewrite the URL so we grab the original sized one. Well, that would be all well and good, EXCEPT that there is no way to get at the HTTP return code in Javascript (to see a 302 redirect) nor does the Image object get updated with the actual src used to load the image (in the instance of a redirect to http://www.flickr.com/images/photo_unavailable.gif).

The solution? The Image object does get the height and width of the photo_unavailable gif (375×500) and we can look for that, that the src ended in _b.jpg, and then try to get _o.jpg instead. The nice thing is that a flickr “large” image will never be 375×500, so this will Just Work (until they change the dimensions of their unavailable gif)

Kludgey, but it works. Sometimes the corner case limitations of javascript amaze me.

Tab-completion in IRB

Posted by Jason Yanowitz Tue, 15 Aug 2006 19:34:00 GMT

I came across this while poking around programming is hard which led me to the rails wiki

Make this your ~/.irbrc and enjoy tab completion:

IRB.conf[:AUTO_INDENT] = true
IRB.conf[:USE_READLINE] = true
IRB.conf[:LOAD_MODULES] = [] unless
IRB.conf.key?(:LOAD_MODULES)
unless IRB.conf[:LOAD_MODULES].include?(‘irb/completion’)
  IRB.conf[:LOAD_MODULES] << ‘irb/completion’
end

Aaah. Sweet, sweet laziness.

On the importance of RTFM

Posted by Jason Yanowitz Mon, 14 Aug 2006 16:16:00 GMT

So, many moons ago, we “Ferberized” our baby and life was good. Our ability to make decisions rationally returned (albeit slowly) and our child was incredibly happy. She would go to sleep at 6:30 and sleep until 7 or 8 the next morning. Cut forward a year.

Over the past few months, her bedtime slowly slipped to 7-7:30. Her nap time at daycare was different than her naptime at home. And she began getting up at 5:00am.

There’s a new edition of Richard Ferber’s Solve Your Child’s Sleep Problems and it’s fantastic. (Although I’m sure money was also a factor, he says he wrote the book because of updates in sleep science in the last 20 years and to correct all the mischaracterizations of his work—he wrote it originally to counter the “let them cry” approach to sleep problems.)

Anyway, it turns out that by the time you are two, you only need about 10 hours of sleep a night. I whipped out by calculator. It turns out that you put your two year old down to sleep at 7pm, she’s going to wake up at 5am (I double checked the math).

So, starting last night, we are doing a new bed time—8:30 to 9:00. She went down at 8:45 last night and woke up at 6:40 (I am willing to except an error of 5 minutes). So with one data point (datum), the results are in: Woo hoo!

(Oh yeah—we are also going to have nap time the same every day.)

Remember parents—always RTFM.

Upgrading Typo 1

Posted by Jason Yanowitz Fri, 11 Aug 2006 18:21:00 GMT

At the risk of becoming a blog about maintaining a blog, I just wanted to make a quick note on how easy it is to keep this software up-to-date (which is important given the security holes found in Rails this week.)

  1. sudo gem update -y
  2. typo install TYPO_INSTALL_LOCATION

Now, perhaps it would be nice if “install” had an alias like “upgrade” so you didn’t have to get that sinking-feeling-in-the-stomach for even a moment, but in the end, no biggee.

Soon, I shall blog about something other than blog software.

Committing files in bitkeeper from the commandline shell

Posted by Jason Yanowitz Fri, 11 Aug 2006 01:12:00 GMT

(Now, if you’re like me, you’re only finding yourself commiting a file via the commandline because you’re working on a remote machine. Which probably means that you are taking part in a Bad Programming Practice, because Thou Shalt Always Test Locally And Only Then Release. But let’s set that aside. Sometimes, shit happens.)

If you are really like me, you probably made a change in an account named something like “mrbuild” or somesuch. IOW, not a real user. So before you commit files in that account, set BK_USER to your username, so the cset gets the correct name (and blame) and so the bk licensing doesn’t get confused.

Step 1. Figure out what’s changed.

bk sfiles -cp

If that looks right…

Step 2. Tell bitkeeper to add them to a changeset

bk sfiles -cp | bk ci -

(add comments as instructed)

Step 3. Commit the changes

bk commit

Step 4. Push the changes

bk push


(If you’ve been really bad and added a bunch of files in this account, you can run:

bk sfiles -x

to make sure the new files are what you expect, and then

bk sfiles -x | bk add -

Enjoy. And I hope you can learn to live with your shame.

Getting typo installed under debian

Posted by Jason Yanowitz Thu, 10 Aug 2006 21:26:00 GMT

Installing typo on my OS X box was a breeze (assuming one already had rails installed, etc. etc.).

However, when I went to install it on my linux vhost running Debian 3.1, I ran into a few issues.

First, I had to sudo gem install mkmf.

Then I got this error

checking for sqlite3.h... no

And then a bunch of banging-head-against-the-wall ensued because after googling and discovering I need to do:

sudo apt-get install sqlite3 libsqlite3-dev

I then got this error:

checking for sqlite3_open() in -lsqlite3... no

So I looked in the logs:

less /usr/lib/ruby/gems/1.8/gems/sqlite3-ruby-1.1.0/ext/sqlite3_api/mkmf.log)

for more detail. It seemed to indicate that the sqlite3 lib didn’t have sqlite3_open in it. An objdump of the lib revealed that to be untrue. The actual errors of note in the file were:

conftest.c: In function `t': conftest.c:4: warning: implicit declaration of function `sqlite3_open' /usr/lib/libc_nonshared.a(elf-init.oS) (.gnu.linkonce.t.__i686.get_pc_thunk.bx+0x0): In function `__i686.get_pc_thunk.bx': : multiple definition of `__i686.get_pc_thunk.bx' /tmp/cci4MfWc.o (.gnu.linkonce.t.__i686.get_pc_thunk.bx+0x0): /tmp/sqlite3-ruby-1.1.0/conftest.c:3: first defined here collect2: ld returned 1 exit status

After typing a bunch of stuff by hand, I realized that my rbconfig.rb was gashmongled. Specifically, -fPIC was declared too many times and that was producing another error (too many thunks), which was the actual error to care about in the log.

sudo vim /usr/lib/ruby/1.8/i486-linux/rbconfig.rb

look for -fPIC on the cflags line and remove it.

Then, and only then, does

sudo gem install typo

actually run to completion. Ahhhhh…

(As an aside, during this process, I ended up installing my own version of sqlite3, but I don’t know if that was necessary).

Older posts: 1 ... 5 6 7