The mere mention of Android is not allowed in Apple’s App Store? http://bit.ly/dkF1j7 13 hours 44 min ago

Drupal problem with HMTL5 support

First little disappointment with Drupal is that it does not allow HTML5 specific input types. This is how I tried to modify one input box in my contact form replacing attribute type="text" with type="email":

<?php
function f1init_form_alter(&$form$form_state$form_id) {
switch (
$form_id) {
    case 
'contact_mail_page':
        
//print_r($form);
        
$form['name']['#type'] = 'email';
    break;
}
?>

Unfortunately, result is bad. The object completely disappears from the page. Little investigation lands me in ~/includes/form.inc. Basically, there is now no way to override type="". Even less encouraging is the fact that Drupal 7 has the same issue, I am hopeful that will be fixed though; in the meantime, I will try to think of a solution.

First Yokohama W4S test on snow

Today I finally got a chance to take it for a spin on the snow on my all-season Yokohama W4S tyres. Overall, my confidence level has definitely dropped after driving on these (compared to driving on snow-rated tyres). The car slides easily on the turns and locks tyres on breaking. I forced it few times in into the drift, just to feel the control. Luckily they are sort of predictible for now, perhaps because they're almost brand new. We'll see how they behave in a heavier snow storm.

This site has moved from YUI grids to Blueprint

This site has now moved from YUI grids to Blueprint.

The only reason to bother was mainly work-related, for practice. I don't really have anything bad to say about YUI grids, in fact I've grown to like it a lot. Equally, nothing bad to say about Blueprint, yet. Easy to understand and quite flexible.

There are some proprietary pages such as subaru/sparow, travel, rss madness and others that will stay YUI for now.

30,000 mile service (Level D)

Today, I finally got around to drop off my car for 30,000 miles, or so called Level D service. One of the reason I sped this process up was because I started to experience strange behaviors on first gear. It's quite common for Subaru manual gear box that first gear is not smooth. But after my Stage 2 reflash, it became fine. For some reason lately, first gear became very "unfriendly", car jerks, stalls etc, it's quite noticeable. Someone recommended that I change gear box fluid. Well I figured why not just go ahead and do this 30,000 service.

A portion of 30,000 miles service receipt.

After this service, the "unfriendly" behavior is gone, so I am quite happy, I guess my buddy was right.

As for bad news they noticed bad rear sway bar end-links. They suggest new links, because OEM links were too weak for aftermarket swaybar, and thus they are probably trashed. Also they said that power steering fluid is dark, they recommend flushing.

PNG-8 Alpha Transparency

Part of my job duties is to always strive for optimization. Lately I got even more encouraged as I read through the optimization book that my boss gave me, which I highly recommend to anyone interested in the subject.

Thus, the majority of graphic elements we use on slashdot interface today is css sprites. We split it further into two css sprite images, one is for chrome elements, another is exclusively for gradients.

PNG-8

By definition, I thought, PNG-8 is a format of a binary transparency; that is a pixel is either fully transparent or filled with colour. So after reading the aforementioned book and running into this screencast, nothing could stop me from trying PNG-8 alpha transparency.

Adobe Photoshop (CS3) cannot save your image as PNG-8 with alpha transparency. And since I don't have Adobe Fireworks, I had my co-worker convert my PNG-24 file saved from Photoshop CS3 to PNG-8 with alpha transparency. At first, I was disappointed, because I opened the file that my co-worker sent, in Photoshop. It looked messed up, it appeared to be converted to binary transparency. I then tried opening the file in Firefox and it appeared normal. That's when I recalled that Photoshop cannot read PNG-8.

Encouraged, I committed my file to main repo and decided to test. Surprisingly, visually, I saw no visual difference, which was fantastic news. But what's the point of it all? What benefit doesn't PNG-8 bring over PNG-24? Let's look at the size of our css sprite PNG-24 file on live site vs. our new PNG-8 file:

((a43f4aa...))$ git checkout live
Switched to branch 'live'
(live)$ ls -l | grep cs_s
-rw-r--r--    1 vladkulchitski  staff  26461 Nov 24 12:45 cs_sic_controls_new.png
(live)$ git checkout master
Switched to branch 'master'
(master)$ ls -l | grep cs_s
-rw-r--r--    1 vladkulchitski  staff   9534 Nov 24 12:46 cs_sic_controls_new.png
(master)$

So we're looking at two files, original is 26461 bytes, new one is 9534 bytes! That is an amazing saving for high traffic website. Thus, I shaved 16927 bytes (that is 36%) from the file without losing the quality.

As for Adobe Fireworks, don't be sad if you don't have it. You could use pngnq free command line tool:

$ pngnq -n 128 -v -s 1 -g 1.0 -f cs_sic_controls_new.png
$ ls -l
13:14:27 vladkulchitski@f1vladmbp:optimization$ ls -l
total 160
-rw-r--r--  1 vladkulchitski  staff   9704 Nov 24 13:12 cs_sic_controls_new-nq8.png
-rw-r--r--  1 vladkulchitski  staff  26461 Nov 24 13:07 cs_sic_controls_new.png
$

It appears that PNG-8 alpha transparency is definitely a way to go for some design elements. We couldn't however use it for gradients css sprite because of the posterization depth.

p.s. Another advantage of using PNG-8 alpha transparency, which many may not care about anymore, is that it will display properly in IE6. It will recognize binary transparency, instead of ugly gray color.

Twitter new retweet feature has a tiny bug

Twitter introduced a fantastic new feature. Today, I was included in another batch of people that they migrated to this new feature. As I tested it I loved it more and more.

Not only it allows you to easily retweet, but also shows you the actual tweets that your friends retweeted, instead of showing an ugly "RT @blabla bla" format. Quite cool and useful in terms of discovering new cool people to follow.

While testing, for some reason I decided to check something in a Firebug and discovered a bug with their UI, below is the illustration. In short, every time you click "Retweet" a new duplicate div will be added to the DOM. Probably not a big concern, but I figured it would be useful to submit this bug to them.

Illustration of twitter `inline-form retweat-dlg` div been added indefinitely with each new click

I just submitted this issue to their tracker. Otherwise thanks twitter for this feature, very useful!

Android is an operating system

"Android is an operating system." Pretty stupid statement, is it?

Android LogoWell, I keep finding myself saying this over and over again to friends of mine who have bought either Motorola Cliq or Motorola Droid, both of which are Android devices. Folks never seem to stop being amazed that my G1 device has same menu system and tons of other interface elements.

Here are some of the the questions and statements I've seen, with their corresponding explanations in parenthesis:

  • You have Verizon phone? Interface looks just like my Droid. (No, this is G1 phone that only works on T-Mobile GSM network. Verizon is CDMA. The reason it looks the same is because your phone and mine have the same operating system.)
  • This phone has cube navigation, not sure I like this phone. (It's Samsung Behold II, it's Android operating system phone, you can get rid of the cube.)
  • You have G1, but Cliq has so many apps! You should look into it. (Cliq and G1 are both using Android operating system, hence same apps will work on both devices.)
  • There are not many apps for Droid, perhaps because it's brand new phone. (Phone is brand new, but operating system is not.)
  • I'll take Droid and use it on T-Mobile. (No, Droid is a phone for CDMA networks, T-Mobile is GSM network. Android is an operating system that runs on the phone. Because T-Mobile has Android phones, doesn't mean you can take Verizon or Sprint phones and just use them on T-Mobile network.)
  • I hear Android nowadays, what is this an application? (No, Android is an operating system.)

In addition, cell phone companies in USA aren't helping Android cause either. For example, Sprint calls their phones "Google phone", they do not mention "Android" in the ads.

The problem is clearly observed. A while ago, my friend said that he's worried for lack of identity/direction of Android. I dismissed that notion then, but now I am starting to have some thoughts about that as well.

I reckon it would be proper to mention this once again for closing — Android is an operating system.

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.

What is a big deal about no-Google-Voice-number?

I don't really understand all the attention to today's news about not having to pick Google Voice number with Google Voice service.
There existed a number of solutions to achieve exactly the same. Sure one had to pick Google Voice number. But its usage could be completely transparent and actual Google Voice number would never show up anywhere.

One such solution, I covered in details on how to setup with GSM-based phone.

Облако Рай

Облако Рай — фильм шедевр. Трагикомедия, которая так отражает текущее состояние души так, что кажется что фильм снят про меня.


Скучная, тусклая однообразность провинциального городка. Чтобы обратить на себя внимание, молодой парень Николай "ляпнул", что уезжает к другу на Дальний восток. Что тут началось! И смех, и грех. Весь город принимает участие в сборах. Да с каким грандиозным размахом, словно едут всем городом. И даже чистосердечное признание Николая, что все это вранье, да и друга-то нет, не могут никого остановить в торжественной обстановке, Николая с музыкой выпроваживают из города…

Фильм можно скачать торентом. Есть так же и продолжение (Коля-перекати поле, 2005 г.) снято 15 лет спустя.

Scammers

I don't know how scammers found out my phone number, but just now received a phone call from someone with American accent saying that the call is from overseas.

He proceeded saying something along the lines that my credit card number that had been entered into sweepstakes, was chosen to be among the finalist winners of some unnamed lottery. I guess for the ordeal to sound genuine he asked if I indeed have a Visa or Master card. I said "No." He went ahead reasoning with me that perhaps it must have been my debit card number then. I was silent. "Do you have debit card?" he proceeded. "No," I quickly replied.

Things suddenly became clear as water to him and myself. "Have a good day," he quickly hung up.

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.

Syndicate content