Installer Androgyny
Presenting the Visual Studio 2008 installer and this guy.

Programming, Drumming, Cooking, Cars, Mozilla, and the Trials & Tribulations of a Geek from New Jersey.
Presenting the Visual Studio 2008 installer and this guy.

While Andy ran into this 2 years ago on *nix, I recently ran into pngcrush’s lack of built-in recursion on Windows.
So on the off chance that this helps out someone else, here’s a 1-line batch for cygwin-less Windows users:
FOR /F %%Z IN ('dir /b /s ..\your\path\*.png') DO pngcrush -brute %%~fZ tmp_img_file.png && MOVE /Y tmp_img_file.png %%~fZ
Thanks to Andy for the original *nix script, it has come in handy.
I was reading this wonderful article by Johann Hari on the fashion industry, and wanted to send a short blurb (specifically “twenty-stone James Corden”) to a friend over IM. So I did what I always do, I highlighted the text and hit Ctrl+C.
When I went to paste it, however, I was confronted with this on my clipboard:
twenty-stone James Corden
Read more at: http://www.huffingtonpost.com/johann-hari/why-have-we-stopped-ragin_b_287915.html
NO. No no no no no. Stop right there, Huffington Post.
There are certain behaviors that websites shouldn’t have the ability to change. Disabling context menus is one of them. Resizing your browser upon page load is another. Hiding the status bar is yet another. And automatically adding promotional text to my clipboard is very near the top of that list.
One of the reasons Firefox originally became so popular among the tech crowd is that it allowed the user to disable those obnoxious behaviors. It’s your browser, not the website’s, and you should have ultimate control over it. That means the site has no right to alter your browser appearance, take away browser functionality, or otherwise hijack your experience (I’m looking at you, NYTimes…).
If this annoys you as much as it annoys me, I highly suggest you contact them and let them know. In the meantime, if you’re lucky enough to be using a proxy or filtering software (hello, Adblock Plus), add this path to your block list:
http://www.huffingtonpost.com/include/lib/copy_paste.js
Problem solved.
Philly Car Share is a non-profit car sharing service that operates throughout Philadelphia; seems obvious by the name, really. Either way, there’s a blue Mazda 3 in a PCS pod that I pass by when I’m in the city, and I noticed yesterday morning when I drove by that someone left the lights on in it. When I drove past it again on my way home from work, I noticed the lights were still on, but this time almost completely out, which meant they were draining the battery and would soon be dead.
When I passed by it again today, the lights were out completely. I walked up to the car to look at the light switch stalk, and it was still set to on, which means no one had used it and the battery was completely drained. Trying to help out, I called 411, got the number for PCS, and gave them a call to let them know.
I was greeted by a series of menu options. The two that were relevant to me were as follows:
Or if you are a member experiencing an emergency, please press 1. [..]
To speak with an associate, please press 3.
Since I wasn’t a member and just wanted to speak to someone (and pressing 0 repeatedly didn’t jump dump me to an operator like on most systems), I hit 3. Shortly thereafter I was transferred to a rep who asked me for my membership ID. I told her that I wasn’t a member, but I saw a PCS car that was now surely dead, and I wanted to let them know.
Instead of thanking me or trying to get any information from me, the woman on the other end said, “Yeah, that’s an emergency, try pressing 1, then listen.” I was then promptly dumped back to the main menu.
Upon pressing 1, I heard another menu. After listening to that, I got to another rep who immediately demanded a membership ID number. I told I wasn’t a member, gave her the location of the car and that it had to be dead at this point. Instead of saying thank you, she asked for the license plate info. I said, “I don’t know, I didn’t write it down…do you want me to go back and get it?” She gave me an attitude, then told me not to bother, because it was the only car at that location. Then she hung up on me.
I’m not saying that I wanted a damned key to the city for calling in a dead car, but I potentially saved someone a lot of trouble by letting them know preemptively that the car was not in a usable state. A simple “thank you, sir” would have gone a long way. Instead, I was berated for apparently making the wrong choice on the decision tree.
Here are some ways that they could have made this experience better:
Following any number of these suggestions would have likely made for a better experience. But when you insult the Good Samaritans, you do yourself a world of trouble. Remember, it’s the people who experience bad customer service who are likely to talk about it. After all, I took the time to type this out, I surely wouldn’t have done a similar-lengthed article to talk about a normal transaction.
So to sum up, I’m not a member of their service, and you can rest assured that I won’t ever be now.
A few weeks ago, Google made a subtle change to their search results that most people probably didn’t notice. They implemented a max-width of 80em to their results div.
For the large majority of users, this is just fine, it forces the search results into a size that is proper for most monitors. However, I’m browsing on a 76 cm / 30 in monitor at home, and a 58 cm / 23 in monitor at the office. The pagination bar at the bottom and the results bar with the definition link in it used to appear right-aligned. I tend to browse full-screen, so if I needed to hit the definition link, it was a simple matter to just flick my mouse to the right of the screen. Then max-width was implemented, and now the link is hovering awkwardly in the middle of my screen.
Check out the before & after:
What I find particularly odd about this is that they didn’t implement a max-width for the Search Settings / Sign In section in the top right, that is still right-aligned regardless of browser width.
After a few days of using it, I found myself getting frustrated with the new change. So I fixed it.
It’s a simple, one-line change, available as a Greasemonkey Script or a Firefox Extension. Now results are a lot less annoying (for me at least).
Feel free to download either:
Enjoy!
Tomcat seems to eat slashes, though the only reference I can find to it is from 7 years ago.
I recently ran into an issue with a regex inside of a JSP file, with Tomcat in front of it. The JavaScript looked like this:
var regex = /^\\$|,/g;
The goal of it is to globally strip out all commas and dollar signs from a string, for display purposes only (no round-trip to the server here). It worked perfectly in all test & production environments.
Fast-forward several months since that code went live, and I’m splitting all the js out of the JSP. Suddenly that regex is broken; it strips out the commas, but not the dollar sign.
I went back over my steps, making sure I didn’t break anything along the way, but I didn’t. I inserted breakpoints, started logging everything in Firebug…yep, everything is fine beyond the call to the regex, but for some reason the regex isn’t working. I remove the extra slash, and everything is fine again.
But why?
I look at the code in QA & Production, and we have two slashes in the JSP. Then I view the source of the page in Firefox, and there’s only one slash in the source. Thinking my eyes are playing tricks on me, I hop over to Chrome, which does the same. Ditto IE, Safari, and Opera.
Turns out Tomcat is eating that extra slash in the JSP, resulting in the code we wanted to use all along, var regex = /^\$|,/g;, being sent to the browser. Once I split the code out of the JSP, Tomcat stopped chowing down and the extra slash was being interpreted by the browser, resulting in a non-functional regex. A quick tweak to the JavaScript, and all was right with the world.
This is highly annoying and seemingly undocumented behavior though. I shouldn’t need to worry that Tomcat is going to mangle my JavaScript before it hits the browser. Several months ago, I must have coded around the issue, not even realizing what was going on. If anyone finds an answer as to why Tomcat is doing this (besides it just being a bug), I’d love to hear it.
Before MySQL 5.0.60, the index_type option can be given only before the ON tbl_name clause. Use of the option in this position is deprecated as of 5.0.60; support for it is to be dropped in a future MySQL release. As of 5.0.60, the option should be given following the index column list. If an index_type option is given in both the earlier and later positions, the final option applies.
Translation: Did you download a version of MySQL >= 5.0.6? (i.e. have you downloaded MySQL at all in the past 9 months?) Yes? Then every create table statement with indexes in it will fail on an earlier version, even 5.0.x installations. Particularly annoying when the production servers are on 5.0.x versions, and your local dev kit is on 5.1.x.
For my birthday back in April, a friend purchased me a starter speed bag platform from Everlast.
It came with the platform, an upgraded metal S-hook swivel (the one shown on Everlast’s site is plastic), and a vinyl speed bag with bladder.
In addition, the aforementioned friend also bought me a pair of speed bag gloves.
I didn’t bother setting the bag up until the 4th of July weekend. Basic math tells you that It’s been less than three weeks of use for the entire product. In that time period, the entire kit has basically fallen apart from top to bottom.
First, the gloves…they come with a metal rod in the palm area, for you to curl your fingers around when you make a fist. The rod on the right glove ripped out after only 2 weeks of use.
It’s easy to see why if you look at the photos below, the metal rod inside the right glove has an end on it that is as sharp as a razor blade. It cut itself out of the glove, and nearly cut me.
Next up was the swivel, which was rife with problems. The swivel is a circular ball with a rod inserted into it, held in place by a hex screw. The screw stripped out almost immediately, causing the rod to slip out while in use. Additionally, the entire swivel would unscrew itself from the platform during use.
When the rod slips during use, it means that the bag, the S-hook, and the support rod all come rocketing off the base at a fairly strong velocity. Considering that the bag is used very close to the face, this could pose an immediate threat to the facial features, particularly the eyes. For me, the bag flew off, hit the wall in front of me, and then ricocheted back at me, striking me in the leg and tearing a small chunk of skin open. It was a very minor injury, but that’s really beside the point here.
The last straw was the bag itself, which fractured and finally ripped in half at the mounting point. You can see how badly frayed it is after only two and a half weeks worth of use.
The pictures speak for themselves:
I am furious right now. Not only could I have been seriously hurt by Everlast’s shoddy equipment, but it makes me feel terrible for my friend who thought she was getting me a really nice present. All told, she spent over $100 on it, and everything but the wooden platform fell apart.
Not too long ago, I wrote about some problems I was having with trying to watch my collection of DVDs which were ripped onto my hard drives. I wrote about how Boxee didn’t replicate the features I was expecting to find in a DVD player, and how it wasn’t really worth it.
Well, I take it all back.
Sort of.
I was tipped off in the Boxee forums the other day that for some inexplicable reason, Boxee doesn’t play VIDEO_TS folder rips properly, but, if you simply convert those folders into individual ISOs, then suddenly, all will be right with the world.
It seemed silly and rather ridiculous, I mean, why on earth would that be the case? But figuring there could be no harm in trying, I grabbed a copy of ImgTool Classic, picked out my rip of The Shawshank Redemption, and gave it a whirl. A few minutes later, I had a shiny 8 gig ISO sitting on my drive. I made a share for it, went upstairs, and opened up my Movies list on Boxee.
It recognized it, so that was a good start. I hit play, and lo and behold, I couldn’t believe what I was seeing. It was like I was using a completely different piece of software. All the Boxee menus changed, I could suddenly access DVD menus and properly set my audio preferences for the entire film, not just for individual VOBs. Subtitles come on or stay off at my request, not whenever they damn well feel like it. It displays the length of the entire film, not just 25 minute VOB intervals. Chapters even work!
Now, mind you, it’s not perfect. There are one or two small bugs. Changing subtitles during playback is clunky at best, the menu covers 3/4 of the screen, so you can’t discreetly turn them on or off. Speaking of which, the main option for subtitles (the one not in the settings window) takes you to open subtitles, where it attempts to download a set. Why? Why not use the DVD-included titles first? Skipping around is a bit buggy too, sometimes it will display video in slow motion before catching it up, but that could just be a result of the slightly underpowered ATV hardware. And the DVD recognition could use some tweaking too; 12 Monkeys came back as Disney’s 1967 feature, Monkeys Go Home, and despite correcting it, An Inconvenient Truth returns as both that and An Inconvenient Tax, both of which point to the same ISO. Very odd.
So now, the only issue I really have is actually a question. Why? Why on earth would Boxee handle a VIDEO_TS folder differently from an ISO? They’re the exact same contents, Boxee figures out which VOBs to play in which order, so why can’t it just do the same thing for both? It makes absolutely no sense whatsoever. I’m happy to have found a solution, but I shouldn’t need to.
In the meantime, however, I am rapidly encoding all of my VIDEO_TS folders to ISOs, and I’m delighted to say that I am now just a short step away from my goal of having all of my DVD collection available on demand in any television in the house.
| S | M | T | W | T | F | S |
|---|---|---|---|---|---|---|
| « Feb | ||||||
| 1 | 2 | 3 | 4 | 5 | 6 | |
| 7 | 8 | 9 | 10 | 11 | 12 | 13 |
| 14 | 15 | 16 | 17 | 18 | 19 | 20 |
| 21 | 22 | 23 | 24 | 25 | 26 | 27 |
| 28 | 29 | 30 | 31 | |||