Friday, December 28, 2007

Big Thoughts About Little Drawings: You Idiot.

Today my three-and-a-half-year-old son came in and said to his sister, "You know what? We are imbeciles." I said, "Do you know what that means?" He replied, "It's another word for idiot." It's all about those cool new words when you are three I guess.
So in honor of the New Year, here's to all of us proud Idiots - Here's to those of you out there who just finished cutting the hair off the back of your kid's doll trying to get it out of the packaging after you gave it to her for Christmas, and everyone who found out the turkey does slide really easily off the counter, and everyone who discovered that their new Christmas lights only reach halfway across the front of the porch, and everyone who put their foot in their mouth at some holiday dinner or other, or got their spouse's boss' name wrong at the holiday party, or whatever other Idiot-type stuff you might have pulled off this year. Be proud. I know I am.
And, I'm going to try this funky mobile-posting thing while I'm out of town the next few days, so we'll see if that works -- otherwise, see you next week!

Thursday, December 27, 2007

Faiz Ahmed Faiz

moti ho keh sheesha, jaam keh dur
jo toot gaya, so toot gaya
kab ashko.n say jur sakta hai
jo toot gaya, so choot gaya

tum nahaq tukray chun chun kar
daman mai.n chupaye baithay ho
sheesho.n ka maseeha koi nahi
kiya aas lagaye baithay ho

shayad keh inhi.n tukro.n mai.n kahi.n
woh saghir-e-dil hai jis mai.n kabhi
sad naz say utara karti thi
sehbay-e-gham-e-jana.n ki pari

phir duniya walo.n nay tum say
yeh saghar lay kar phor diya
jo maiy thi, baha di mitti mai.n
mehma.n ka shehpar tor diya

yeh rangeen rezay hai.n shayad
un shokh bilori.n sapno.n kay
tum mast jawani mai.n jin say
khalwat ko sajya kartay thay

nadari, daftar bhook aur gham
in sapno.n say takratey rahey
be reham tha chomukh pathrao
yeh kaanch kay dhanchay kiya kartay

ya shayad in zarro.n mai.n kahi.n
moti hai tumhari izzat ka
woh jis say tumharay ijz par
shamshad qadro.n nay raksh kiya

is mal ki dhun mai.n phirtay thay
tajir bhi buhat, rehzun bhi kai
hai chor nagar, yaa.n muflis ki
gar jan bachi tou aan gai

yeh saghar sheeshay laal-o-guhr
salim hoo to qeemat patay hai.n
yu.n tukray tukray hoo to faqt
chubtay hai.n, lahoo rulwatay hai.n

tum nahaq tukray chun chun kar
daman mai.n chupaye baithay ho
sheesho.n ka maseeha koi nahi
kia aas lagaye baithay ho

yadoo.n kay garebano.n kay rafo
par dil ki guzr kab hoti hai
ik bakhia udhaira, aik siya
yu.n umr basr kab hoti hai

is kar geh hasti mai.n jaha.n
yeh saghar sheeshay dhaltay hai.n
har shay ka badal mil sakta hai
sub daman pur ho saktay hai.n

jo hath barhay yawar hai yeha.n
jo aankh uthay, wo bakhtawar
ya.n dhan dolat ka ant nahi
ho.n ghat mai.n lakh daku magar

kab loot jhapat say hasti ki
dukanai.n khali hoti hai.n
ya.n parbat parbat heeray hai.n
ya.n sagar sagar moti hai.n

kuch log hai.n jo is daulat par
parday lutkaye phirtay hai.n
har parbat ko, har sagar ko
neelam charhaye phirtay hai.n

kuch wo bhi hai.n jo lar bhar kar
yeh parday noch giratay hai.n
hasti ki uthai geero.n ki
har chal uljhaye jatey hai.n

in dono.n mai.n run parta hai
nit basti basti, nagar nagar
har basti ghar kay seenay mai.n
har chalti rah kay mathay par

yeh kalak bhartay phirtay hai.n
woh jot lagatay phirtay hai.n
yeh aag lagatay phirtay hai.n
woh aag bujhatay phirtay hai.n

sab saghar sheeshy, laal-o-guhr
is bazi mai.n bid jatay hai.n
utho sab khali hatho.n
us ran say bulawey atay hai.n

java

Initialization of Classes and Interfaces

Initialization of a class consists of executing its static initializers and the initializers for static fields (class variables) declared in the class. Initialization of an interface consists of executing the initializers for fields (constants) declared there.

Before a class is initialized, its superclass must be initialized, but interfaces implemented by the class are not initialized. Similarly, the superinterfaces of an interface are not initialized before the interface is initialized.

When Initialization Occurs

Initialization of a class consists of executing its static initializers and the initializers for static fields declared in the class. Initialization of an interface consists of executing the initializers for fields declared in the interface.

Before a class is initialized, its direct superclass must be initialized, but interfaces implemented by the class need not be initialized. Similarly, the superinterfaces of an interface need not be initialized before the interface is initialized.

A class or interface type T will be initialized immediately before the first occurrence of any one of the following:

  • T is a class and an instance of T is created.
  • T is a class and a static method declared by T is invoked.
  • A static field declared by T is assigned.
  • A static field declared by T is used and the reference to the field is not a compile-time constant. References to compile-time constants must be resolved at compile time to a copy of the compile-time constant value, so uses of such a field never cause initialization.

Invocation of certain reflective methods in class Class and in package java.lang.reflect also causes class or interface initialization. A class or interface will not be initialized under any other circumstance.

The intent here is that a class or interface type has a set of initializers that put it in a consistent state, and that this state is the first state that is observed by other classes. The static initializers and class variable initializers are executed in textual order, and may not refer to class variables declared in the class whose declarations appear textually after the use, even though these class variables are in scope . This restriction is designed to detect, at compile time, most circular or otherwise malformed initializations.

As shown in an example in, the fact that initialization code is unrestricted allows examples to be constructed where the value of a class variable can be observed when it still has its initial default value, before its initializing expression is evaluated, but such examples are rare in practice. (Such examples can also be constructed for instance variable initialization. The full power of the language is available in these initializers; programmers must exercise some care. This power places an extra burden on code generators, but this burden would arise in any case because the language is concurrent

Before a class is initialized, its superclasses are initialized, if they have not previously been initialized.

Thus, the test program:

class Super {
        static { System.out.print("Super "); }
}
class One {
        static { System.out.print("One "); }
}
class Two extends Super {
        static { System.out.print("Two "); }
}
class Test {
        public static void main(String[] args) {
               One o = null;
               Two t = new Two();
               System.out.println((Object)o == (Object)t);
        }
}

prints:

Super Two false

The class One is never initialized, because it not used actively and therefore is never linked to. The class Two is initialized only after its superclass Super has been initialized.

A reference to a class field causes initialization of only the class or interface that actually declares it, even though it might be referred to through the name of a subclass, a subinterface, or a class that implements an interface.

The test program:

class Super { static int taxi = 1729; }
class Sub extends Super {
        static { System.out.print("Sub "); }
}
class Test {
        public static void main(String[] args) {
               System.out.println(Sub.taxi);
        }
}

prints only:

1729

because the class Sub is never initialized; the reference to Sub.taxi is a reference to a field actually declared in class Super and does not trigger initialization of the class Sub.

Initialization of an interface does not, of itself, cause initialization of any of its superinterfaces.

Thus, the test program:

interface I {
        int i = 1, ii = Test.out("ii", 2);
}
interface J extends I {
        int j = Test.out("j", 3), jj = Test.out("jj", 4);
}
interface K extends J {
        int k = Test.out("k", 5);
}
class Test {
        public static void main(String[] args) {
               System.out.println(J.i);
               System.out.println(K.j);
        }
        static int out(String s, int i) {
               System.out.println(s + "=" + i);
               return i;
        }
}

produces the output:

1
j=3
jj=4
3
 

The reference to J.i is to a field that is a compile-time constant; therefore, it does not cause I to be initialized. The reference to K.j is a reference to a field actually declared in interface J that is not a compile-time constant; this causes initialization of the fields of interface J, but not those of its superinterface I, nor those of interface K. Despite the fact that the name K is used to refer to field j of interface J, interface K is not initialized.

Politics

ONE PICTURE BETTER THAN THOUSAND WORDS




17th December 2007
Outside Chief Justice House
Islamabad Pakistan

Cricket


Bradman Batting Technique




Bradman’s early development was shaped by the high bounce of the ball on matting over concrete pitches. He favored "horizontal-bat" shots (such as the hook, pull and cut) to deal with the bounce and devised a unique grip on the bat handle that would accommodate these strokes without compromising his ability to defend. Employing a side-on stance at the wicket, Bradman kept perfectly still as the bowler ran in. His backswing had a "crooked" look that troubled his early critics, but he resisted entreaties to change.

His backswing kept his hands in close to the body, leaving him perfectly balanced and able to change his stroke mid-swing, if need be. Another telling factor was the decisiveness of Bradman’s footwork. He “used the crease” by either coming metres down the wicket to drive, or playing so far back that his feet ended up level with the stumps when playing the cut, hook or pull.

Bradman’s game evolved with experience. He temporarily adapted his technique during the Bodyline series, deliberately moving around the crease in an attempt to score from the short-pitched deliveries. He had an ability to switch between a defensive or attacking innings as the occasion demanded, during the peak of his career in the mid-1930s. After the war, he readjusted to bat within the limitations set by his age, becoming a steady “accumulator” of runs.

However, Bradman never truly mastered batting on sticky wickets. Wisden commented, "if there really is a blemish on his amazing record it is... the absence of a significant innings on one of those 'sticky dogs' of old".

Wednesday, December 26, 2007

Big Thoughts About Little Drawings: National Parking Day

I think December 26th should be National Parking Day, since the greatest thing you can accomplish on this day is to find a parking place at some mall or shopping center. Then you can go forth and buy lots of stuff that you don't need simply because it is on sale, and getting a discount is a way of winning some sort of shopper-versus-retailer power struggle.
I went forth today with the idea of buying a really cool new pan. I know, lots of people think household stuff makes a crappy Christmas gift, but I actually think that using something fabulous in your everyday life, and appreciating how fabulous it is, is totally worth it.
So, I went to Macys where you could get a fabulous pan, along with a ten-pan set with some things that I couldn't even identify, plus a bonus Dutch oven thing with an oven mitt and a spatula and a "double bonus" other pan thing that I couldn't really tell what it was. You basically had to be an idiot to buy an individual pan, since in the ten-pan set the items were less than half the price. Even though you were spending more money overall -- you'd look like you were throwing money away. Go figure.
I became overwhelmed by the giant pan displays and the bonus items and the double bonus items so we left and bought some socks. Oh, and pretzels for the kids.
But we did find a lovely parking spot. You know, within a couple blocks of where we were going, not being smooshed in from both sides by ginormous truck-like things, a good spot. So from that perspective I'd say our National Parking Day was indeed a success.

Thursday, December 20, 2007

Big Thoughts About Little Drawings: Urban Kid Myths

I always used to wonder as a kid: What would happen if I didn't step off the escalator? Could you really get sucked down in there? Or would it work like a big shredder?
It's sort of like wondering if you could go down the bathtub drain if you didn't get out. Or, fall into one of those storm drains in the street like that flat kid in the book.
It's as if when you're a kid, you and your imagination are pretty much the same thing. So if you can imagine falling into the heater vent, maybe you can really do it. Could I lay down between those train tracks and have the train go over me? Are those buildings close enough that you could jump from one to the other?
I wonder if it's partly because when you're a kid, your size is changing all the time. Where you fit is changing all the time. So, your idea of what size you are in relation to the world is a really elastic thing. So, you really do wonder where you can and can't go.
My daughter has a camera and I love looking at her pictures because they show the actual view of a 6-year-old. There are a lot of nostrils.
These days when I ride an escalator I still have that little moment before I get off where I imagine going right down into some upside down world or something. I bet I always will.







Tuesday, December 18, 2007

Displaying Images as a Thumbnails on wireless devices in J2ME

You can display your image as a thumbnail on your mobile device. The process is simple you just have to specify the width and height of your thumbnail and the code below will create a thumbnail of your image for you

public static Image getThumbnail (Image src, int dstW, int dstH)
{
int srcW = src.getWidth();
int srcH = src.getHeight();

Image tmp = Image.createImage(dstW, srcH);
Graphics g = tmp.getGraphics();

int delta = (srcW << pos =" delta/2;" x =" 0;">> 16), 0, Graphics.LEFT |
Graphics.TOP );
pos += delta;
}

Image dst = Image.createImage(dstW, dstH);
g = dst.getGraphics();

delta = (srcH << pos =" delta/2;" y =" 0;">> 16), Graphics.LEFT |
Graphics.TOP );
pos += delta;
}

return dst;
}

Anee queztyunzzz?


I went waaaaay back in the archives for this one (you can tell by the funky signature and lack of a border). I dedicate this to everyone out there who is trying to act normal while being really out of it, either because A. You took cold medicine or B. You didn't take cold medicine. Let's face it - modern life does not allow the common cold. There isn't time for it.
So here's to everybody out there who's just kind of making it through the day, doing whatever you're supposed to be doing, hearing the thud-thud of your feet hitting the ground from some echo chamber inside your head, ignoring the ringing in your ears, or hoping you brought enough tissue for the commute home. Hang in there.

Friday, December 14, 2007

One-Frame Movies

One of the things that makes single panel cartoons interesting is, even though it looks like only one drawing, a single-panel cartoon has a past, present and future. The cool part is where you choose to drop into the story. Take this one for example:

Okay, it's a dog. And he's not wanting his person to leave. But the fun part is what you think is going to happen after this panel, like the guy attempting to walk out the door while shuffling his foot with a dog sitting on it. Kind of like the scene in "The Jerk" where Steve Martin drags his dog down the street.
So, I kind of think of myself as a maker of one-frame movies. They've got a plot, they've got characters, they've even got dialogue. They're just really, really short. Like my thought processes.

Sunday, December 9, 2007

Big Thoughts About Little Drawings: Regular Price

Long ago I worked at an art supply store where everything was on sale, all the time. Every time we put any new merchandise out, we stuck 10% off stickers on everything. We did this every month of the year, every day of the week. There were no "sales."
The idea was to convince people that the picture frames and photo albums and stuff were discounted from some mythical, lurking, terrible "regular" price.
I think it worked pretty well. They sold a lot of picture frames and photo albums and stuff.
Anyway, good luck with your shopping this holiday season. And remember, something is a good price if it means that you'll have money left over after you buy it. Or, after you get up at 4 am and stand in line to buy it. Or whatever crazy stuff you're planning to do.

Friday, December 7, 2007

Brainwaves Goes To The Movies... Sort Of

Alright, people. It's a brave new world for these little one-panel stories - okay, maybe I'm being dramatic - but I think these little drawings have been wanting to come to life for some time -- the key is keeping them as dumb as they are in print. That shouldn't be too hard.

Wednesday, December 5, 2007

Peace: Take Some, Pass It On.

Here's my holiday image for this year -- and I'd love for you to share it with your friends and family.
Feel free to copy/paste it, or email this posting to people. I'd love to send as much Peace around as possible. I'm hoping that each time this illustration goes to somebody, it'll carry a little bit of good karma with it.
So, have at it! And enjoy. And, peace.

Sunday, December 2, 2007

Big Thoughts About Little Drawings: Put Your Arm Down.

I've noticed something weird: Whenever I'm walking down the street in some busy urban setting, there are tons of people walking around with phones up to their ears.
That's not weird.
What's weird is, the vast majority of the time, none of them seem to be saying anything. Now, either we're a nation of just amazing listeners (not), or there's something else going on.
Seriously. Even when I walk past a person who I've been observing for, say, the better part of a block, often I will not hear that person utter a single word into their phone.
Which makes me think, are we all just walking around holding up our phones because it makes us feel secure? Or keeps derelicts from coming up and accosting us on the street? Let's face it: holding up your phone sends the message, "I'm not really here and I'm not paying attention to you. I've got something better to pay attention to."
But next time you're out, watch the Phone People. Lots of them aren't saying anything.
Maybe soon I'll get up the gumption to start asking people what they're doing. Listening to immensely long voicemails? Being controlled by alien voice commands? Unable to lower their arms? Hoping someone will call? Who knows.

Blog Archive