How to install Android Debug Bridge (ADB)

The lat­est Android SDK doesn’t ship with Android Debug Bridge (ADB) included.

Instead, you need to add it by installing the “Android SDK Platform-tools” pack­age via the Android SDK Manager.

Once you’ve done this, it will be avail­able under {path to Android}/android-sdk/platform-tools/ instead of its old loca­tion under android-sdk/tools/

Sim­ple!

# by Josh on November 9th, 2011 Tags: , ,
|
No Comments »

8 bit PNGs with alpha transparency

To some devel­op­ers, the title of this post might well read “Uni­corns exist! News at 11!”. Excit­ing stuff, but not widely known in my expe­ri­ence. Not that uni­corns exist in my expe­ri­ence. I digress.

The colours below are the palette gen­er­ated with indexed trans­parency (left) vs. true alpha trans­parency (right) in a 256 colour 8 bit PNG by a lovely piece of soft­ware called Fire­works. Let me explain.

I’ve joined a new UI devel­op­ment team this past week that require pretty broad-based browser sup­port for a bunch of sites (i.e. IE6 expe­ri­ence needs to not suck) and their process includes a PNG quan­ti­za­tion step before hit­ting a live envi­ron­ment. This is cool, but the IE6 sup­port neces­si­tates not using alpha. Or so I’m told.

This prompted me to look up some­thing that I dis­cov­ered prob­a­bly around a year ago but never got around to writ­ing it up, nor par­tic­u­larly practicing!

I can’t remem­ber where, exactly, though sus­pect Dave Shea might’ve had a pointer or an arti­cle that pre­sumed knowl­edge of the tech­nique. In the process of writ­ing this arti­cle, I’ve also redis­cov­ered a Site­Point arti­cle on the issue that’s quite helpful.

The bot­tom line is PNG-24 is great but imprac­ti­cal in older browsers for a host of rea­sons. While 8 bit PNG is not with­out its lim­i­ta­tions (c’mon, 256 colours ought to be enough for any­one!), it’s clear that for grace­ful degra­da­tion and mar­ginal improve­ments in file size it’s stil worth considering.

In terms of cre­at­ing images there are a few chal­lenges. First and fore­most, every­one uses Pho­to­shop but Pho­to­shop sucks at save-for-web’ing 8 bit PNGs: you just don’t get the options you need. Fire­works hands you this in spades. I’m no Fire­works pro inso­far as work­flows and just get­ting designs done goes, so typ­i­cally I’ll save for web to a 24bit PNG from Pho­to­shop and then open that in Fire­works to export the alpha 8 bit image.

The Site­point arti­cle linked above sug­gests that [some] quan­tiz­ers will give you the chance to do the same thing, but the issue is if you’re export­ing an 8 bit PNG in the first place you’ve already lost the chance to cre­ate an image with alpha. Most front end devs will want to pre­view things like dithers, colour band­ing, etc., so hand­ing con­trol over to a CLI tool just isn’t going to fly. I’d con­tend that Fire­works is really the only viable solu­tion in that it bal­ances image opti­mi­sa­tion and con­trol. Of course, you’re wel­come to run the PNG Fire­works out­puts through a quan­tiser: it’s already 8 bit so your palette is locked in, and the quan­tiser is unlikely to mess with the alpha if it pur­ports to sup­port this.

The rea­sons are broader than just browser sup­port: in my (lim­ited) test­ing, PNG24 files could eas­ily weigh in at twice the size of their RGBA 8 bit alter­na­tives. On a 500x500px test that gen­er­ated the paletts shown above, file sizes were as follows:

  • 8 bit PNG indexed: 7KB
  • 8 bit PNG trans­parency: 7.5KB
  • 24 bit PNG: 15KB

I’m going to make sure I actu­ally take advan­tage of this fea­ture in the future, as there are clear file­size ben­e­fits to be had as well as sup­port for crappy, dwin­dling browsers. Sorry, IE6.

# by Josh on August 24th, 2011 Tags: , , , , , , ,
|
No Comments »

Quicktime X into Final Cut Pro errors

If you’ve made a screen record­ing using Quick­time X, you’ll likely have dif­fi­culty import­ing it into Final Cut Pro 7 because of its vari­able framerate.

The eas­i­est way to resolve this is to take the file through Com­pres­sor first — ProRes 422 Pro­gres­sive will be great. Frus­trat­ing, but whatever.

# by Josh on June 10th, 2011 Tags: , , ,
|
No Comments »

RTA: Damned if you do, etc.

Dear RTA, I know you just spent a lot of money find­ing out exactly how unpop­u­lar you are — now I’m telling you why. This one’s on the house.

Think of this as an (il)logic puz­zle. Want to renew? Go get a green slip. Got a greenslip? Go get another safety check. Want to just give us money and do the oth­ers out of order? Nope, sorry, you can’t do that.

N/A in the Safety Check col­umn actu­ally means “you’re cov­ered for now, don’t sweat it” — but you wouldn’t know it from the form. There’s a vicious red X if you’re not cov­ered, but nary a tick if you are. Also, what’s with the grotesquely antialiased “i” rollovers?

# by Josh on May 31st, 2011 Tags: , , , , , ,
|
No Comments »

Apply for a DUNS number? Nah.

DUNS num­bers (Duns and Brad­street) are needed for a few things business-related but you run your own busi­ness you’ve prob­a­bly never got around to apply­ing for one.

If you’ve reg­is­tered a com­pany in Aus­tralia, chances are you’ve already got a DUNS num­ber. Sur­pris­ing, huh?

Search for your busi­ness and a DUNS num­ber will be avail­able top left, just above the com­pany name or ABN.

DUNS search

I dis­cov­ered this while try­ing to reg­is­ter for Apple’s iOS Enter­prise pro­gram, which requires a DUNS num­ber as part of the appli­ca­tion process. You can sign up for the devel­oper pro­gram with­out one (and it’s cheaper), but to pri­vately man­age and dis­trib­ute apps you need enter­prise access.

As we pre­pare to launch our Equip Mobile pro­gram into schools, the abil­ity to roll out soft­ware to all users in an organ­i­sa­tion is some­thing we need to be across!

Equip iOS Screenshot

# by Josh on May 23rd, 2011 | No Comments »

MAMP’s MySQL status red & not starting

MAMP is a good way to setup a low-maintenance dev envi­ron­ment for OS X in very lit­tle time, but its han­dling of MySQL is quite annoying.

When you suspend/sleep a com­puter, often when you resume MAMP has lost track of the MySQL instance it started and can no longer con­nect to it. Not sure if this is a prob­lem with the MySQL build being used, but as the prob­lem has existed since 2009, I don’t have high hopes for it being fixed any­time soon.

The quick­est solu­tion is to kill off the process it had started pre­vi­ously and then hit “Start Servers” again — it just takes one line on the terminal.

killall -9 mysqld

Be aware that this will kill all run­ning MySQL processes (includ­ing those out­side of MAMP’s control) — this is nor­mally fine, as no-one actu­ally hosts web­sites on OS X!

# by Josh on May 9th, 2011 Tags: , , ,
|
2 Comments »

ClubsAustralia and AHA: you’re not GetUp.

Club­sAus­tralia and the AHA want to apply pres­sure to the fed­eral gov­ern­ment not to pass leg­is­la­tion restrict­ing access to gam­bling. They reckon there’s sup­port for the mad­ness that is gambling-funded “com­mu­nity activ­i­ties” in this coun­try, and have setup a GetUp!-esque “mes­sage your MP” form.

Instead, use their form to send the gov­ern­ment the OPPOSITE message!

Here’s what I said (more or less edit­ing their mes­sage to the reverse effect):

“I am writ­ing to say that I WHOLEHEARTEDLY SUPPORT the Government’s plan to intro­duce a licence to punt.

Prob­lem gam­bling is an area of con­cern for the com­mu­nity and needs to be addressed by government.

A licence to punt on the pok­ies MAY drive prob­lem gam­blers to other forms of gam­bling, includ­ing online —  where pos­si­ble, it is, of course, impor­tant that these too are reg­u­lated appro­pri­ately — through fund­ing com­mu­nity level sup­port for prob­lem gam­blers, as well as domes­tic reg­u­la­tion (not Inter­net fil­ter­ing). The clubs and pubs will be impacted by this leg­is­la­tion, of course, but the net ben­e­fit to the com­mu­nity stands to be tremendous.

Gam­bling destroys many fam­i­lies and imposes sig­nif­i­cant pres­sures on the finan­cial secu­rity and emo­tional sta­bil­ity of indi­vid­u­als: within rea­son, this trumps the “pri­vacy, rights and the impor­tance of local clubs and pubs” that Club­sAus­tralia and the AHA so desire you to consider.”

There are other ways to con­tact your MPs, of course, but there’s some­thing deeply sat­is­fy­ing about using tools pro­vided by some of the largest indus­try lob­by­ing groups in the coun­try against their own purposes.

# by Josh on April 11th, 2011 | No Comments »