I got an iPhone 5 right after getting a Hyundai Genesis and to my dismay the new phone and new car did not work together. I assume other car manufacturers are in the same boat because Apple did not provide any heads up on the new Lightning connector. The Genesis has an auxiliary input as well as a USB input and Hyundai actually included a 30-pin connector cable that oddly fits into both ports. This worked great with any previous iOS device, you get a digital signal right into the head unit and can control playback through the steering wheel and everything else you would expect.
The iPhone 5 does away with the venerable 30-pin connector in favor of the smaller Lightning connector. A Lightning to USB cable is provided in the box for charging and plugging that into my Hyundai Genesis sent the phone into a repeating loop of trying to connect but never making it. Frustrating to say the least, but at least Bluetooth still worked fine so I had music (but no control, over Bluetooth you have to change the songs on the phone and not from the car which is not safe).
I ordered the iPhone 5 along with the $29 Lightning to 30-pin Adapter at the same time, but Apple apparently put more focus on the phone and didn’t start shipping the adapters until last week. It’s now at a 2-3 week shipping time which I assume means they’re selling like hot cakes (no surprise since at this time there are exactly 0 accessories that are compatible with the Lightning connector…) I have finally received the adapter and am happy to report that there appears to be full functionality with my car–the phone shows it has power and playback is controlled through the vehicle. Success. Your mileage may very, all iPod integrations are not the same and it may only be a certain variety that are compatible. All I know is that whatever is in the 2012 Hyundai Genesis is indeed compatible with the new Lightning to 30-pin Adapter Oddly enough, apparently even Hyundai had no idea if it would work or not and were similarly waiting to get their hands on an adapter to find out. Apple really could have made this transition a lot smoother.
Spoiler: the Lightning to 30-pin Adapter is compatibile with the Hyundai Genesis (and likely other models)
Despite the phone now working with my car, I still think I’m just going to go with an iPod Classic and keep it in the center console. 160GB fits my whole music collection and I don’t have to bother with plugging or unplugging anything when using the vehicle. It’s also nice that with the direct connection music starts where I left off and as soon as I start the car (with Bluetooth it defaults back to the radio and if I have to plug in my phone there’s obviously a delay there too).
Have you noticed a large amount of direct traffic from Inktomi Corporation in your Google Analytics reports? In my case the traffic was all coming from Bethesda, Maryland though I have read reports with the same issue form different cities. The visits are all direct and are one page per visit (or very close to it). The browser is “Mozilla Compatible Agent” and it is version 5.0. I have thousands of these visits (see screenshot below).
After installing Mac OS X Mountain Lion you may find that your Python virtualenv setup has broken. I saw a traceback ending in “IOError: [Errno 2] No such file or directory: ‘/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/__init__.py’”
Another error was being produced by virtualenvwrapper when trying to use the workon command: “ImportError: No module named virtualenvwrapper.hook_loader”
Fixing my virtualenv setup was pretty simple:
- Installed the XCode 4.4 Command Line Tools.
- Re-installed pip: sudo easy_install pip
- Re-installed virtualenv and virtualenvwrapper: sudo pip install virtualenv virtualenvwrapper
No other changes were needed and everything was running smoothly.
I keep looking up the resources sizes for iOS web apps (for when users save to their home screen). This is complicated by the sizes changing from time to time, so there is a lot of misinformation. Here is what’s current and what works:
||Home screen icon
|iPhone 3Gs / iPod Touch
||57 x 57
||320 x 480
|iPhone 4/4s / iPod Touch
||114 x 114
||640 x 960
|iPad / iPad 2
||72 x 72
||768 x 1004 (portrait) 1024 x 748 (landscape)
||144 x 144
||1536 x 2008 (portrait) 2048 x 1496 (landscape)
I live in downtown Tampa and the 2012 Republican National Convention is taking place here this August. The city has seen a lot of public works project in advance, mostly beautification , but also some infrastructure. Good infrastructure like improved cell networks (LTE here is fast), but also bad infrastructure like a mesh network of spy cameras (or CCTV if you’re working for the man). I have seen the installation happen and it started by mounting antennas all over the downtown area. Seeing workers isn’t unusual here, but each of these installations was conspicuous because of a Tampa Police Department car parked by the cherry picker. Very strange to need a cop to watch someone mount an antenna, let alone dozens of antennas.
It’s a Saturday today and I was out for a walk and saw the familiar seen of someone in a cherry picker and a TPD cruiser looking over. This particular corner had an antenna installed weeks before (and I had taken pictures then too, curious about the specifics of the antennas), so I figured the camera portion was getting added today. I watched for about 15 seconds and noticed that the worker at the top was looking back at me. Strange, but there’s not much to distract yourself with up there so I didn’t think much of it. Then I took out my phone and snapped a picture. This set the worker off, he started yelling at me and then yelling “he took a picture, go get him!” to the cop. It’s a hot day and the deputy was inside his car, so I assume it took a bit for him to respond because I continued walking and was not interrupted. During my walk I made sure to upload the photo just in case I got in contact with an officer who had a less than perfect legal mind.
I grabbed a drink and then on my walk back decided to get another look, this time from across a fenced and barricaded street from another unrelated beautification project. He caught on quickly and yelled again, saying that I was a “piece of trash” and then yelling to the cop who was now out and about. The worker’s perch let him give updates to the cop, but again I was able to walk away without being interrupted.
I want to know what’s going on. We all know there will be spy cameras in downtown Tampa because of the RNC. We all have eyes and can see where they are. The antennas are large and noticeable, even an untrained eye can spot them. This was a public street and there was no way to know that photography was prohibited, even though the law there is dubious at best (I was in public, surrounded by people and taking a picture of a light pole which will remain fully visible for years).
When citizens complain about spy cameras, the response is frequently if you’re not doing anything to hide, you have nothing to fear. Or that they will just be used to solve crimes. It’s not very encouraging that they are already suppressing freedoms during the installation of these private eyes in the sky. The city has given millions of dollars to Aware Digital for apparent goons to install cameras that invade all of our privacy. Even St Petersburg has paid hundreds of thousands of dollars for CCTV during the RNC even though they aren’t hosting it. Governments use things like this as an excuse to get the toys they could never justify previously. The RNC is in and out in a week, we’re stuck with big brother for ever.
When they began installing the equipment, I took these photos. I didn’t know they would come in handy later.
Finally, since they apparently have something to hide, here’s a little bit about what cameras are being installe. The main contract is to Aware Digital, a creepy sounding Miami based company with nearly no web presence (coming soon, @2006) and Orwellian employment practices. They’re wireless and run on a custom built wireless mesh network. Officers can access the live video from mobile devices, ensuring future citizens will have to walk faster than I did. The contract is for about 60 cameras, which should cover a large amount of downtown. Their contract stated it needed to be up by July 1, which would explain why they were working today (June 30). Exact specifications of the cameras are hard to pin down, with people saying different things. City council types love to think they have classified intelligence and both boast and understate. Aware Digital spoke a little more about the system they had for Superbowl XLIV in Miami. That was two and a half years ago, so we’re likely a lot more sophisticated but they had HD pan/tilt/zoom cameras with 10x optical zoom. Not too shabby.
Update: It’s Monday and I was walking by the county courthouse and saw the familiar scene of a squad car and cherry picker. Low and behold it was the same Aware Digital goon. Unbelievably, out of the mass of people at lunch time around the busy courthouse he spotted me before I took a photo. I then snapped a picture as he yelled to a cop, “I knew it, there he is!”. What is going on?
Update 2: I have started a Google Map to track the locations of all these CCTV cameras. If you have spotted a camera that isn’t on the map, please get in touch.
Update 3: I got bored and made this data into a mobile friendly web app for use around Downtown during the convention: RNCCTV.
By default Django renders templates from disk on each request, which means if you edit a template file the changes will be reflected instantly on the site. That’s intuitive and all, but since code is kept in memory and thus code changes are not reflected until server processes are restarted, it’s easy to get yourself out of sync. I recently deployed a code/template change that depended on each other (the existing templates were incompatible with the new code) and between the time Mercurial synced files and the Apache processes were restarted I received dozens of emails about 500 errors. It was only a couple of seconds and I could not have done it any faster, but at the end of the day seeing dozens of errors is unacceptable.
django.template.loaders.cached.Loader. It’s a template loader introduced in Django 1.2 that keeps template files in memory. I’m not sure how I missed this until now. Using the cached loader will increase your memory footprint a bit, but it will keep them in sync with the code so all your changes deploy at the same time. If you have a lot of templates the memory footprint may be more significant, but it was very minor in my case.
To use it you wrap
django.template.loaders.cached.Loader with the other template loaders you want it to cache. Since I wasn’t doing anything unusual I was able to get away with it wrapping the default loaders like so in
TEMPLATE_LOADERS = (
With that one change I can now deploy code and template changes and have them reflect at the same time. I am not sure why this isn’t the default, having your code update separately from your templates is illogical. Keeping it all in sync seems like common sense.
This change can be somewhat annoying while using the development web server since it automatically reloads when you change code but not when you change templates. To get around this you can either set TEMPLATE_LOADERS differently based on the value of DEBUG or override TEMPLATE_LOADERS in your local settings file(s) (assuming you have one). I’m overriding and it works fine.
This is more for me in the future, but it’s public just in case anyone else has the same question. I have a KitchenAid Artisan Series 5-Quart Mixer (it’s great, I’ve had mine since 2007) and often bake with a digital scale. On multiple occasions I have wanted to subtract the weight of the mixing bowl, but only deciding this after adding things to it and forgetting to notate its starting weight or taring the scale. It’s a pain to figure this out after the fact and I had previously managed to not write down its weight. So for me and whoever else, here it is:
The weight of KitchenAid’s standard 5-quart mixing bowl is 793 grams (28 ounces)
I have a rooftop garden in downtown Tampa and thanks to the lack of an outside spigot have to manually transport water from inside. Well had to, now there’s a rain barrel that is fed by the AC unit. Being in humid Florida and for cooling a couple thousand square feet, the unit puts out a lot of water per day (at least five gallons) and was previously emptying onto the roof and simply going down the drain.
I searched Amazon for a rain barrel and got a model from Algreen. After it was delivered I went to Home Depot and bought 3/8″ tubing and a 3/8″ hose barb splicer to connect the existing tubing and my extension. The rain barrel I bought (like almost all) is meant to tap into a gutter system, but has spaces to drill holes for tubing to connect multiple barrels together and/or for diversion when the barrel is full. I drilled a 3/8″ hole in one of these and inserted the extended AC drain tube and drilled out the other to divert into the drain. The photo is after the first portion, the hose shown is coming from the AC that is on the building’s roof. The building has 10′ ceilings and about a 4′ crawl space above that, but there’s a half height portion where the door out to the deck is and that’s what the barrel is on. It’s convenient in that the water is coming from basically a story above the barrel and the barrel is feeding a garden about a story below–gravity is easy to harness.
It almost immediately started to fill with water and so far is providing more water than I need for the garden (time to get new plants!). It has not filled completely yet so I haven’t had time to perfect the overflow. For now it’s just a hose out and into a drain.
This is a great way to use a rain barrel for when you don’t have a gutter system in place or don’t want to use water that has been exposed to your roof. For the most part we have a flat commercial roof without gutters, not to mention all the tar and associated materials that roofs contain. This clean water was previously being thrown away. I’ll have to figure something out in the winter when the AC is not running, but for now it has the added benefit that it generates the most water on the hottest days which is exactly when the garden needs the most water. It’s a simple hack and took remarkably little time. The barrel itself even shipped overnight with Amazon Prime so the most time consuming process was probably hunting around Home Depot.
Since 2004 I have provided a mobile optimized version of the Drudge Report. I was a bit early on the mobile curve and back in 2004 browsers weren’t nearly as sophisticated (or data access as fast), so it was a huge time saver. Even today having one column makes things a ton faster to read, so it has continued to draw an audience.
After some slowdowns on my server I noticed a very large amount of iPhone users (north of 100,000 unique monthly) using the site, which I thought strange because on my other sites mobile usage is pretty evenly split across lines according to market share. There were no referrers, so I had no further insight into where the traffic was coming from. I updated it to use memcached which helped reduce load on my server and then didn’t put a whole lot of thought into it other than fixing it when Matt would change his formatting a bit and a user would email me letting me know (I rarely if ever use it myself).
Flash forward to this week when in the comments of a post on Hacker News I mentioned this mysteriously popular web service and measure2xcut1x piped in saying they have an iPhone app for the Drudge Report that uses my URL. It all clicked–that explains iOS traffic dwarfing all other mobile OS’s and the lack of referrers. I quickly got the app name and downloaded both the free and paid ($.99 at the time of download) versions to confirm. Sure enough, the app is a webkit view around my site with either iAds or the $.99 purchase price. All the while I’m funding the millions of hits monthly that the site receives. I was happy to provide free hosting/reformatting as a sort of public service, but not happy that someone else was profiting off it.
I emailed the app’s listed developer, James Leung of Smartest Apple and asked to talk. After some back and forth (and disagreements) I ended up shutting the app down by changing the URL of the service, 301 redirecting anyone not on an iPhone and providing a note for iPhone users telling them of the situation. Drudge’s humorous siren graphic was also used, which made it pretty apparent something was wrong. This didn’t endear me to James much (or his superiors who control the money), but since I knew an update to the app to cut me out was coming ASAP and I had limited time with leverage.
I then had an idea, instead of sending me the money it could instead be donated to charity. With the current earthquake/tsunami/nuclear situation in Japan this seemed like a perfect idea and while I could find many ways to waste the money, the Red Cross could actually put it to good use. James wrote back right away saying he was in for his (small) cut of the revenue, but would have to get back to me for the bulk of it from his company. He wrote back again quickly saying that his employers would donate $5,000 if I would immediately return the functionality of my site so the app continued to work (negative reviews were pouring in). Almost directly afterwards I got another reply saying a matching $5,000 donation would also be made by the parent company. $10,000 to the Red Cross for Japan relief isn’t something to sneeze at, so I returned full functionality and thanked them for their generous donation. This morning he posted a video on YouTube of the first $5,000 donation while the matching donation is still in progress (at the end it says on behalf of 715 Franklin, which is the shared office I’m a part of in Tampa).
Considering how my first thoughts of what to do were incredibly immature (goatse?), I’m very happy of how this turned out.
tl;dr a couple days after a Hacker News comment I was able to help secure $10,000 for the Red Cross. The Smartest Apple and James deserve credit for turning around a bad situation into a big win for people in need.
Now that Google has an official extension to block domains from search engine results, I thought it would be handy to list the largest and most prevalent content farms. Google’s Personal Blocklist works well, but doesn’t let you access a shared block list so it’s up to you to have a good list. It also makes you add sites from Google search result pages, so you’ll have to search for these domains and use the new block links that get injected by the extension. It’s a few more hoops to jump through than I’d like, but well worth it for less spammy SERPs going forward.
Update: Google has now made this an official feature of their web search, so there’s no longer a Chrome extension required. It’s a bit more of a hassle to block sites with, but having cross browser support is a big win (I was already bugging out seeing spam results in my mobile searches).
Update on March 23rd 2013: Google has removed the Blocked Sites feature and is suggesting everyone use the extension. The list below should still be a good starting place.
List of content farms and general spammy user generated content sites:
Note: The links go to a Google search for the associated domain, which lets you easily add it to your block list.
Further note: while it should go without saying, the below list of content farms is entirely of my own opinion. If you disagree, don’t block them (and feel free to comment and tell me why).
I’ll keep this list updated as I go. Please leave a comment if you see any I missed.