ShIt MoThErFuCkIn YeAh My WiCkEd MoThErFuCkEr!
posted by chip on 2010-09-05 03:07:55
AT: iN THE MEANTIME, sHALL i,
AT: cUE UP THE,
AT: sTRICT BEATS????? }:D
TC: AwWwWw BrOtHeR nOw YoU aLl FuCk AnD uP aNd DoNe It.
TC: yOu ArE fUcKiN wHeEl DeEp In A bIg SlOpPy MaSsAcRe PiE tOpPeD wItH mOtHeRfUcKiN wHiPpEd RhYmE.
TC: HoW sTrIcT aRe ThOsE bEaTs At, MoThErFuCkEr?
AT: wELL, i,
AT: tURNED UP THOSE BITCHES TO PRETTY STERN,
AT: sET BEATS TO LECTURE, aND, i'M KIND OF GOING HOG WILD ON THE CURMUDGEON KNOB,
AT: wHICH, i HAD RECENTLY INSTALLED,
TC: gOd DaMn!!!
New Saturday Night Mix is up. :)
0 comments reply permalink
A Simpler Fix for Mobile Stylesheets
posted by chip on 2010-08-31 21:50:10
If you have a smartphone, you probably really like it when a website has a mobile version. Too often, though, sites don't bother because it's a pain in the ass. Ironically, modern smartphones have actually made this problem
worse by ignoring a lot of work that went into HTML 4 and CSS 2 — work that allows style to be dynamically applied depending on the intended medium.
In the beginning, there were no smartphones. As cell phones were taking off, you more than likely had a Palm Pilot if you wanted to keep track of calendars and appointments. What web you could get on phones was limited to WAP or some subset of HTML. Phones and PDAs simply couldn't handle what desktop browsers were doing (which, at the time, was mostly animated .GIFs and MIDI background music). As a web designer, you were pretty much required to create a separate website if you wanted a mobile version; most sites didn't bother.
Web design began to mature, and people started using CSS to style their websites. The advantages of CSS were clear — sites could be consistently styled in a way that kept style separate from content. One of the innovative features put into HTML 4 (which, I should remind you, became a W3C recommendation in 1998) was the use of media descriptors to allow browsers to selectively apply certain CSS styles for different media. One of those media types defined in HTML 4 was the 'handheld' type, for portable devices with small screens. With this feature, it was easy to make the same webpage look good on both the big screen and the small screen simply by creating two different stylesheets.
To be fair, the handheld media descriptor has never been implemented very consistently. Opera was always a good supporter, and Mobile IE supported it in a way (by enabling both handheld and screen styles). My last phone's built-in browser supported it beautifully, but a lot of phone browsers didn't.
Fast forward to 2007 — the iPhone comes out and takes the US smartphone market by storm. It packages a slimmed-down version of a desktop browser engine, WebKit, which would become a trend in smartphones. Frustratingly, WebKit on the iPhone paid no attention to the handheld media descriptor, most likely so that the "full web" could be experienced (This is, of course, a ridiculous idea — phones have only just now caught up with resolutions popular on PCs in the early 90's, and even infinite pixel density won't help you read three point text).
The popularity of the iPhone and Apple's intial unwillingness to support native applications on the platform led to a lot of mobile versions of sites that worked merely by detecting the iPhone's version string. Even today, you can find sites that assume any phone with "Mobile" and "WebKit" in the user agent string must be an iPhone, and will render the page at a fixed 320 pixels wide. Suddenly, we've taken a step back. Nowadays, if you want to make a mobile site, you make a completely new site and use user agent sniffing to switch to it. Witness the rise of m.whatever.com. So now we're worse off than we were with WAP, using fragile heuristic approaches and needlessly duplicating effort.
Well, Apple also gave us a useful tool to help sort out this mess. First seen in Mobile Safari, the viewport meta tag allows your webpage to tell the phone how wide its viewport is — which is to say, it changes how wide the phone's viewport pretends to be. It's admittedly a hack, but the upshot is if I say my viewport is 640 pixels wide, the page will be scaled as though it's 640 pixels wide even if it's rendered on a larger or smaller screen. By default, mobile WebKit based browsers tend to report that they're quite a bit larger than they are. My Pixi, for example, pretends that the screen is 960 pixels wide (If you're curious about yours, test here). If you want the page to act as though it is at whatever the native resolution of your screen is, just use "device-width" for your width.
So now that we have a way of un-fucking the browser zoom, how do we get our mobile style in place? Well, I came up with a sneaky solution. I wrote a JavaScript function which iterates over the page's stylesheets (via DOM Level 2 Style) and rewrites the media descriptors to change 'handheld' to 'screen' and 'screen' to 'unknown.' Then I simply detect the viewport width as the page loads, and enable the handheld styles if it's small enough. I currently specify my viewport as 480px wide and enable the handheld mode if the viewport is <= 480px. It's certainly a hack, but it works. And if you want to get fancy, you can remove the server-side user agent detection, put that logic in the javascript, and dump the m. site. Nice, huh?
The code in question is in force_handheld.js, the relevant functions are enableMobile() and disableMobile(). Don't use the whole file, it's designed around my site. For some reason, the technique doesn't work in Firefox. The data is properly mangled, but it seems that after the page is loaded, Gecko ignores any changes to the stylesheets' media descriptors. I'm sure all three Maemo users will be terribly disappointed.
I've already applied this hack to my site, which should make it much more usable on mobile browsers. I'm also using the hack in the case where a desktop browser is too narrow to fit the content column, which I think works a little better than the previous solution.
0 comments reply permalink
Hello, Party People
posted by chip on 2010-08-30 02:09:23
Don't feel obligated to put your hands in the air or wave them around as though you just don't care — I don't care that much, either.
I've been shirking responsibilities at work busy lately and have some cool stuff to show you. Firstly, there's a new Saturday Night Mix that prominently features Celldweller, a favorite of mine and my brother Tim's. It's not really dance-able like the last one, and to be honest, there's one really bad transition in there, but it's all good music, I swear. :)
On a more visual note, I have two new Hacks. The first was inspired by some extras on Jeph Jacques' Tumblr, and features everyone's favorite neurotic blonde, Hanners. The picture is, of course, a full-blown wallpaper-size version of panel 3 of QC #1696, and the music is "Cyclops," one of Jeph's many Deathmøle releases. No, the zooming never stops.
The second hack is one I found mostly finished but unpublished, spiro. I'm honestly not sure why I didn't publish it. It looked complete to me, so I dusted it off and threw it up there with the rest. The cool thing about spiro is that it's built on a small graphics library I built called Phosphor. It aims to emulate the electron-beam-on-phosphor graphics of the 70's. View the source, it's really simple.
That's all, party's over. Goodnight.
0 comments reply permalink
Words cannot convey this feeling
posted by chip on 2010-08-27 01:28:08
Hey Mike, remember when you laughingly said we should make a Twitter post shortener? I just stumbled upon
Twitlonger. From their site:
Twitlonger is an easy way to post long messages to Twitter without the need to write a blog post. Write what you need here and we post the link to Twitter for you.
2 comments reply permalink
I made you a mixtape
posted by chip on 2010-08-24 17:09:42
For a long time I've been a wannabe DJ. Whenever I'm in a club, I want to be the guy playing the music. I've indulged in Beatmania IIDX, which despite having a turntable on the controller, is really more about micro-motor skills than DJing. I even have a pair of over-ear studio headphones (which are fucking excellent besides).
In the past year or so, I've been working on actual DJ skills. I started by toying with Mixxx, which is a pretty decent two-deck DJ mixer. Alex got a DJ controller that came with a copy of Traktor, which made things easier. Then I started playing with Ableton Live, which is powerful beyond compare. I got a KORG PadKONTROL to help with sequencing in Live. And last year, I co-DJ'd a party at our house with Alex. I crossed that line from wannabe to amateur. :)
I do a lot of playing around in Live, practicing mixing things that no one ever hears. I decided to take that a step further and produce some mixes for the web. It's a little practice, a little performance, and a lot of fun.
It is the Saturday Night Mix.
I threw in a number of advanced HTML tricks to make that page snazzy, including the use of two webfonts and the audio tag. Fun fact: The audio playing in the audio tag is Ogg Vorbis, which has become the de facto format for HTML5 audio. I tried a MP3 in Opera, and it wouldn't play.
The first mix is mostly things I've found on Too Many Sebastians, which is mostly House. It starts off with a song of questionable legality. It was done by Shinichi Osawa and Patrick Alavi, but couldn't be cleared for release because it samples Toto's Hold the Line. (Man, everything's just coming up Toto lately...) NEVERTHELESS, I have brought it to you, because in the Dominion of Awesome, awesome trumps copyright every time.
I also have plans for a mix next Saturday. The theme was suggested by my brother Tim, and it's going to be a little more... industrial/trance-ish. I'm looking forward to it. :)
3 comments reply permalink
Loving Love Hina
posted by chip on 2010-08-24 02:47:49
Lately, I've been both re-reading the Love Hina manga, and re-watching the anime adaptation. I've found, somewhat to my surprise, that my feelings about the series have changed. I still like it, but I didn't really understand
why I still like it. Let's rewind.
It was over ten years ago when I first watched Love Hina, and I immediately identified with the protagonist, Keitaro. Keitaro is a loser, plain and simple. He's not too bright, not good looking, and his only hobby is taking photo booth pictures by himself. He's failed his college entrance exams twice already, and worse, he's 20 years old and has never had a girlfriend. The only girl who ever paid any attention to him was a playground friend whose name and face he can no longer remember and with whom he made a promise to get into Tokyo University together — an impossible dream with Keitaro's skills. He is pretty much the embodiment of low self-esteem, and as a young, hapless nerd in high school who was girl-repellent, I thought "Wow, this guy is me!"
In the intervening years, I'm both proud and surprised to say that I've matured a lot. When I look at Keitaro now, I can't help but think, "Wow, what a goober." I can't really relate anymore. It seems that a similar thing happened to Ken Akamatsu, the author. His first two stories revolved around the same kind of nerdy guy who was terrible with women; it's pretty clear Akamatsu was writing a lot of himself into these stories. His latest series, by contrast, involves a young boy who is very intelligent and confident (albeit inexperienced). Analysis of the fact that it also has 31 high-school girls, one of which is a robot, is left as an exercise to the reader.
"Well, why do I still like this?" I asked myself. Well, firstly, the stories in it are just plain fun. It has a great cast of characters, and it's never boring. But mainly, It's Naru. I realized something important about her.
She's a Right Proper Bastard.
Naru is sharp, and she never misses an opportunity to use the truth to cut people down to size. She has this really great expression you see when she's unamused with someone's bullshit. It looks like this:
In one instance, she even does a pretty good rendition of another great Bastard, House, M.D.
It doesn't hurt that she's also beautiful. Naru is an archetype for the kind of woman I'd like to meet but would probably despise after a few days. It's unsettling to find too much of yourself in someone else.
So I'll continue reading and maybe finally buy the rest of the series and give Akamatsu-sensei the money I should have paid years ago. :)
2 comments reply permalink
MIND = BLOWN
posted by chip on 2010-08-23 00:27:16
Sometimes you find something that shakes your understanding of the world so completely that you are left wondering what is real and what is not. Today, I found that in Forza 3.
Buried within the upgrades menu are several fundamental modifications you can do to a car: engine swaps, drivetrain swaps, and aspiration change. I bought a CRX SiR for a specific championship, and much to my surprise, drivetrain swaps were available. At the cost of a couple hundred extra pounds, I could turn my FWD CRX into a RWD car.
The transformation is pretty radical. You start with a car that already has really good handling and a 62/38 weight distribution, and you wind up with excellent handling and a 51/49 weight distribution. As an added bonus, you get a close ratio six-speed transmission, which probably means that the donor driveline was from a S2000. What goes into the shop is one of the best of the hot hatches. What comes out can only be described as ballistic.
But curiously, even with radical weight reduction down to ~2150 lbs, suspension enhancements, and a power boost to 171HP, Forza still considers it an E class car. To get some perspective, let's pick on the Mitsubishi Lancer Evo X, a car most people associate with "quick and nimble," and a car Forza considers to be considerably better — class C.
| Honda CRX SiR modified | Mitsubishi Lancer Evo X GSR |
| Power | 171 HP | 295 HP |
| Weight | 2150 lbs | 3585 lbs |
| Weight dist | 52/48 | 56/44 |
| Weight/power ratio | 12.6 lb/hp | 12.2 lb/hp |
| Wheelbase | 90.6 in | 104.3 in |
Certainly, there are still some unknowns in there, like tire size and aerodynamics, but I'd say that on paper, it looks pretty close. Strangely, the Evo is the heavyweight, having the advantage on power, but the CRX definitely looks like it will handle better with its shorter wheelbase, lighter weight, and better weight distribution. Why did the CRX's weight distribution change to 52/48? Weight loss in the rear from a sport exhaust system. I will admit, I did cheat a little. An Evo X is not as fast as an Evo IX. :)
So how ridiculous is this? Well, swapping in a whole S2000 driveline into a civic is not unheard of (but IMO kind of pointless). And at least one person has taken the idea way too far and created a RWD civic with a Corvette engine in it (which just further supports the theory that you can, and people will, drop a Chevy small-block into anything). So maybe, with a lot of money, and a lot of work, this sort of thing could be a reality.
One can dream, anyway. :)
0 comments reply permalink
Adventures in Chicagoland
posted by chip on 2010-08-15 23:01:48
A couple of weeks ago, we had our yearly SpiderOak meet-up. Since all of us work and coordinate over the Internet, we periodically get together for some "face time." We usually don't get a whole lot of actual work done, but the collaboration typically results in an explosion of activity once we return home. It's also good to see the other guys — we had a lot of fun, too.
Last weekend I went up to Chicago for Erickson's housewarming party. I drove in the CRX, which is an experience not unlike riding a chainsaw. By the time I got to Erickson's, my hands were tingling from the vibration in the steering wheel. The party was good. Alex decided to go, despite his protestations. James drove in from Rockford, and Allie and Luke from Atmos showed up, too. There was beer, muppets, racist drawings, and some creative reinterpretation of Harry Potter. All in all, a good night.
The following day, we took the L out to the Goose Island brewpub and had some beer for breakfast. If you wind up there, I can say that the food is good, but expensive. The beer, however, is both reasonably priced and excellent. We couldn't get a tour, though, because you must reserve a place in advance. Apparently, it will fill up weeks ahead of time. The perils of a small brewery in a large city, I suppose.
After returning to Erickson's neck of the woods, we hit up a used bookstore. There I found a steal of a deal on some manga nearly sitting on the floor — the first three volumes of Love Hina for $3.99 each. :D I also got "A World Out of Time," a small novel by Larry Niven.
I was rather weary on the drive home, but it didn't stop me from playing a few hours of Forza 2 when I got to my parents' house. :) I'm back home in Urbana, now, reading through my books and catching up on work I've neglected this weekend. It's good to be back.
0 comments reply permalink
The Changing of the Guard
posted by chip on 2010-07-23 01:56:01
Well, it's finally happened. My rough-and-tumble Sony Ericcson K510a has finally started flaking out. Yeah, the D-pad has been flaky for a while, but now important things like the * and delete keys are going, making it about as fun to use as a Windows CE phone (zing!). It's time to take the old girl out back and put 'er out of her misery.
As for a replacement, you'll probably recall that I'm pretty picky. I thought I had it figured out a few months ago, and I was completely ready to plunk down a few hundred bucks on an unlocked Nokia E52, but I could find no one selling the US version. I wanted something "smarter" than the K510a, but I was universally turned off by that classic failing of smartphones: their batteries can't keep up with their features. iPhone, Android, Palm, Windows Mobile... they will all leave you stranded after a day of hard use.
It was a tough search, but ultimately, it came down to price. See, AT&T has a deal where you can get a Palm Pixi Plus for free after instant rebate with a two year contract. The only downside? It comes in a rather hideous blue color. But my good friend Alex made a rather valid point — for the $50 it saves over the black version, I can buy a case.
Alex has a Pixi, and he's pretty satisfied with it, even though his original one had the touch screen go screwy (he got it replaced under warranty). The software is certainly very attractive — Palm has always been top notch at usability. And behind the scenes, Palm has gone full-bore open with it. Any webOS phone can be dropped into developer mode where you have access to a root shell. In addition, the webOS community has developed some very nice applications that allow you to browse and install hundreds of homebrew apps. Unlike Android, webOS looks like a Linux system on the inside, using such modern amenities as dbus and upstart to tie things together. It's hacktackular.
As for the battery life, there's a simple solution — get a bigger battery. Several companies sell replacement batteries with upgraded capacity and performance. I'll be well worth it to get one of those, since I'm sure I'll be pushing the phone rather hard with all the hacks I'll be putting into it. :)
2 comments reply permalink
IT'S A NEW RECORD!
posted by chip on 2010-07-14 00:57:44
I signed the lease for my next year's living arrangement with only two days to spare. This blows away my previous record, when I
signed a lease one week before handing over my keys. I think it bears repeating for the kids at home that you should not try this — I'm a
professional procrastinator.
My new place is not too far away in the same area of Urbana. I'll be living with a fourth year vet student, a dog, two cats, and a roommate who has yet to be found. I should be clear — the roommate hasn't been misplaced, it's just that no one has shown interest in the second room, yet. ARE YOU A BAD ENOUGH DUDE TO LIVE WITH ME, A VET STUDENT, A DOG, AND TWO CATS? Inquire within.
The new place is quite a bit smaller (it would be nearly impossible for this to not be the case), so I've been jettisoning things I don't need via the ever-handy Craigslist. I even get money in return, isn't that great?
At the old place, we're now in FINAL CLEANUP MODE. I was panicking for a while because I had so much leftover trash from building computers, and it seemed to be an insurmountable problem. Mom, Tim, and my little cousin Scott came over to help, and we got quite a lot cleaned up. I'm pretty confident we'll get everything out in the final remaining day.
Here we go, one last push. :)
0 comments reply permalink