hacking

♫ Hello strange Marillion, it's been a while since I made the heads of this old music hdd spin. 5 hours 21 min ago

Google turn-by-turn navigation finally works on my G1!

As I am looking at my ugly G1 phone, I have positive and negative feelings about it, especially in light of two of my friends having purchased Verizon Motorola DROID and three of my other friends having purchased T-Mobile Motorola Cliq. Certainly one of the good things about G1 is that there are many various solutions and hacks available for my phone; among many is the fantastic turn-by-turn Google Maps.apk. I spelt out the .apk package on purpose. Many people get confused and think that Google Maps with turn-by-turn comes/created exclusively on Verizon's DROID phone. This is not so, this is a fully native evolved Google Maps app that will be, sooner or later, available on all devices that currently run Google Maps native app (with some exceptions like hardware restrictions or legal issues such as iTunes store prohibition).

Nevertheless, I was convinced that I don't need my stand-alone GPS navigator anymore (which at this very moment is listed for sale on craigslist) and I was thus determined to make this Google turn-by-turn run on my G1 using a solution from xda-developers forum. There, I found even simpler way to go about it, with a simple bash script:

#### Begin Script ####
echo "Mounting /system read write..."
mount -o rw,remount -t yaffs2 /dev/block/mtdblock3
 
echo "Cleaning out old Map software from /system for"
echo "installation of Google Navigation" 
find /system -iname "*Maps.apk*" -exec rm -vf {} \;
 
echo "Copying MyFaves and new Google Maps to /system/app"
cd /sdcard/apks
#cp MyFaves.apk Maps.apk /system/app/
cp Maps.apk /system/app/
 
echo "Modifying /system/build.trout.prop for Google Navigation"
sed -i 's/tmobile\/kila\/dream/=verizon\/voles\/sholes/g' /system/build.trout.prop
 
echo "Mounting /system back to read only..."
mount -o ro,remount -t yaffs2 /dev/block/mtdblock3
#### End Script ####

If you dare to do this, make sure you go to xde-developers forum for full instruction and pre-requisites.

Show images in print mode with media="print" attribute

First, I was going to write an entire blog post about how to force images in browser in print mode, but decided to be brief. So print mode, that is when you click CTRL+P or APPLE+P and enter preview mode, then proceed with sending the document to a printer. Many may already know that most newer browsers, when in print mode, do use .css file with media="print" attribute like this: <link rel="stylesheet" rev="stylesheet" href="file.css" media="print">

Cool little hack, an author of which is unknown [to me] allows you to achieve this in the following manner:

.cssClass {
        display: list-item !important;
        list-style-position: inside !important;
        letter-spacing: -1000em !important;
	text-indent:0 !important;
	list-style-image: url(/images/someimage.gif) !important;
}

You may need to mask/hide text that will pop up on top of this picture, but that is an easy part. This is a good starting point. An example of how I am using it on slashdot.org, for forcing logo and topic icons into print version, could be seen directly from a.fsdn.com/sd/print.css.

Tuning your voice mail (cont.)

It's been a while since I gave some insight to tuning your voice mail with regular phone using GSM MMI codes. Very useful for people annoyed by voice mail, yet unable to afford losing it just yet.

One of the biggest updates is that GrandCentral is now called Google Voice. Although still closed for general registration, you can sign up for an invite, which you will get in about one or two weeks. I tried.

Another cool thing I learnt was that Android interface allows you to setup alternative voice mail without having to hack with MMI codes (Menu > Settings >Call Settings). See screenshot below:

Among other new things you can do with Google Voice is be ability to easily look for a number that translate into some phrase (Settings > Phones > Your Google Voice Number > Change), also called phone vanity phrase. Check screenshot below:

Just type your word and it'll search for available numbers for you, very cool. Existing Google Voice account holders will have to pay one time $10 fee to change the number. But I think it's worth it.

Worth mentioning that Google Voice now transcribes your voice mails. Supremely useful feature. You can glance at it and see if a voice mail is worthless and pointless, you can just delete it without having to listen to it. On the other side, people who have accent shouldn't expect their voice mail to be transcribed correctly at all. Or if you someone has a name that isn't common, most likely, that name won't be resolved correctly. For instance, my name — Vlad — usually resolves to Bob, Blob, or Void.

Lastly, there's a fantastic native Google Voice App for Android that makes things very transparent. There is one that was released for iPhone, but was pulled from iTunes App Store shortly; but that is an issue to cover some other time.

And finally, some people told me that they'd never use Google Voice or Google Mail, or anything google for that matter for privacy reasons. Well to those I have one thing to say — You are mistaken if you think you will find privacy in Verizon Wireless or Comcast when it comes to your phone or email address. Privacy is like Santa Claus, people just _conveniently_ pretend that it exists when needed. Got something to hide? Barricade in your house and don't use anything. On a serious note however, if you're that paranoid, check youmail service as a parcial alternative to Google Voice.

Tuning your voice mail

When I moved to America, I discovered voice mail. At first cool, eventually [mostly] huge waste of time.

For instance: "hey this is me, bye", "why are you not answering your phone?", "call me!", "this me, I have nothing to do so I decided to call you", and so on. The only argument one can make here is that, yes, some of these short messages could be helpful if there is no "no missed calls" message on your phone or otherwise when a phone has been out of network, out of battery power, or simply turned off.

On the other hand, there definitely are meaningful voice mails; for example: "Hi, this is your insurance agent, we wanted to remind you to come to our office tonight to renew your policy".

So where exactly is time wasted? I will tell you. Time is wasted not only listening to meaningless voice mails, but also retrieving them, here is general rough scenario of retrieving one message:

  1. dial voice mail;
  2. enter pin code/password;
  3. listen to "you have 2 new messages and 1000 old messages, click 1 to listen to new message, click 2 to listen to old messages";
  4. listen to "message number one, received on February 3rd, at 5 o'clock, to listen to the message click 1, to delete this message click 2".

killie6

Everyone keeps talking about Chrome these days and how great it is. I checked it out and I loved it too. But why don't developers keep talking about Internet Explorer 6? USA Today the other day had a huge article on Internet Explorer 8. But why didn't they try to explain to readers why IE6 should be abandoned? That is what is frustrating.

And I am convinced I am not alone wondering about when we (developers) will stop creating separate stylesheets for IE6 and forget it as a nightmare.

iPhone cable continuation

Foreword: it isn't obvious in the context — this cable is to used in the car, hooked up to car amplifier RCA cable, so it's thickness isn't a big deal.

After last time I split cable apart and soldered back together, it lasted a couple of days only if that. So I ordered a new one and opened up old one again. Changed a bit how I do old one and keep brand new two dollar one as a backup.

Brainwashing ie6 to use min-width

This code snippet will force your ie6 clients to understand min-width, pretty cool hack.

element.style{
_width:expression(((document.compatMode && document.compatMode=='CSS1Compat') ? document.documentElement.clientWidth : document.body.clientWidth) < 660 ? "660px" : "auto");
}

Note that I prepend '_' before 'width', that ensures that only ie6 will bother to try to interpret that command, other normal browsers will ignore that.

position:relative

If you have to hack your CSS for IE6, no doubt you faced with a lot of frustrations. One of the annoying things is when you set some element on the website and it all seems to be okay and finally problem solved. But as soon as you resize the browser, some elements jump to other seemingly random places.  But I wasn't smiling when trying to get this to work.

iThemer

I decided to write this remark after I overcame one challenge during one of my work tasks. This may seem trivial to some. It wasn't for me. Could be useful to someone else out there.

With my previous projects I had full access to css, html, js, etc. At my new job I have access only to css. At my new job I don't have access and cannot modify html structure. I can request html structure modification, but it will not be so quick.

*+html (StarHtmlHack)

Today I found a cool css hack called StarHtmlHack. Interesting problem. Pretty much for normal browsers I needed to add left: 0pt and for Internet Explorer 5--6, I had to add right:0pt. Yes I know, problem seems weird, but for consistent look of the div on my page in this case, that has to be the definition in the style sheet.

First solution was to include separate .css via <!--[if ie]>foobar<![endif]-->.

Syndicate content