Archive for January, 2010

Google I/O 2010 early review!

Saturday, January 23rd, 2010

Google Checkout asked for my review of Google I/O, so here it is!

Thanks for your recent purchase from Google IO.

We’d really appreciate hearing about your experience. Please take a moment to tell us about it by filling out the form below. We will publish your review online so that others can learn from your experience.

	5 stars  Excellent: I would definitely buy from this store again.
	4 stars
	3 stars
	2 stars
 (*)	1 star   Poor: I would discourage others from this store.

How was your overall experience with this store?

Google I/O promised both the I and Ohhhhh’s. But so far Google I/O delivered only the ‘i’ (note the lower case) and delivered neither I’s nor Ohhhh’s ( of any case). Furthermore, Google I/O seems to be perpetually out of A’s ( needed for the best students), E (as in eeks!) and of course the all important U ( needed for assigning blame!). People looking to buy a vowel for their Wheel of Fortune appearance should go elsewhere.

I made the purchase and then discovered that Google I/O will ship May 19-20 (4 months from now!). Even with this long wait there is no promise that any quality Ohhhs will be in stock. There is no return policy if the promised Ohhh’s turn out to be disappointing oh’s. In spite of this Google I/O is promising to sell out. So Google I/O is suggesting that people arrive early – latecomers may find only damaged Ohhhs left in the bins.

With the promised sellout crowds and the potential scarcity of Ohhh’s Google I/O has shown little interest in increasing security or crowd control measures. San Francisco Police indicate that they have not been asked to assist. Currently, they regard Google I/O 2010 as just a normal event in the Moscone Center. It’s also my understanding that alcohol will be served. It is almost certain that there will be Oakland Raider fans in attendance!:

Any time the Oakland Raiders make their way south, San Diego gets nervous. Police officials call more meetings and re-check security plans. Home-team executives bring in extra guards and cut off beer sales early.

This year’s game is drawing special attention because it is being played on Halloween – and because a spate of bloody outbursts at sporting events in recent years has rekindled concern about spectator violence.

As well as some Manchester United fans:

Seven football fans have been arrested after trouble during Manchester United’s Premier League match at Birmingham.

West Midlands Police said there were two incidents of disorder Saturday, one just before the game at St. Andrews’ and one during half time.

All of this leaves me highly concerned that Google I/O 2010 will be a repeat of Walmart 2008’s Black Friday experience. I am sure the other Google I/O 2010 participants are aware of this. So in spite of Google I/O 2010 being billed as a family affair, I doubt that there will be many children in attendance. Since women lack the physical strength to compete for the mad rush to get the Ohhhs, I suspect women will also be underrepresented.

On the other hand, Microsoft has shown considerable effort in improved security. Microsoft TechEd Conference should be a safer experience. (Not withstanding that poor security in Microsoft IE was responsible for the Aurora attack)

(more…)

Funny article “Open Thread: There’s No Such Thing As Free Content”

Saturday, January 23rd, 2010

Hah, funny article. It’s the usual rant that “someone” has to pay for the content.

Someone, somewhere ends up putting out money for everything you do online, every piece of news you read, every Web app you use. It takes professionals and hardware across a gigantic industry to make these things work. In terms of overhead alone, content costs a lot. So why do some users always kick and scream at the first suggestion of paid content? Do you think content is worth paying for, and if so, what are you personally willing to pay?

I’m curious: What kinds of online content, if any, are you willing to pay for? And how much will you pay for them?

As usual for the stenographers they completely missed the point. They are no longer king of the data hill since the “journalists” do not provide information ( actionable data ) but merely (and usually inaccurate) data with no competent interpretation.

Some of the problems with the “content” MSM media produces:

  1. Inaccurate: It is extraordinarily rare to find a Main-stream Media outlet that can get the facts correct. I have seen articles confuse the term “Light-Rail” with “High-Speed Rail” ( equivalent to confusing “speed of sound” with “speed of light” ).
  2. Anonymous (gossip) sources: Reading anything about politics is equally painful “anonymous sources” are quoted, given reader no way to judge the quality of the information – so the article becomes disguised hearsay.
  3. Stenographers: Usually, a “journalist” lazily parrots a political party’s (usually Republican ) talking points or regurgitates a corporate press release. Witness the rah-rah-rahing of the Iraq War.
  4. Contrived controversies: There is the endless contrived controversies around settled issues ( global warming ) that confuse the lay man.
  5. False Balance: there is false “journalistic” balance where a scientist with a vast amount of data is “balanced” against the latest creationist whack-job.
  6. DWHC: Lastly come the endless pieces about the latest DWHC ( Dead white hot chick ) or rumors about Micheal Jackson’s death. Yes, people are interested in hearing about celebrity gossip, put it is mental cotton candy – low food value.
  7. Not unique: the article on the AP wire as little value. The same article can be gotten from a vast array of sources. Therefore its scarcity and value are non-existent to a given media outlet.
  8. Process-orientated: Case in point: Horse race mentality around what polls are saying about who is “in the lead”.

So why would I pay for “content” stenographic, celebrity gossip articles.

If journalists stopped being lazy and did more research than half-understood wikipedia articles and google-reading, it would be worth it to buy their content. But buy stenographic contact in advance, not a chance.

However, I would very much like to see a tip mechanism whereby I can tip a reporter after reading the article. But I ain’t paying for the crap fluff pieces. Hell you should pay ME that you wasted my time.

Empathic Developers?

Saturday, January 16th, 2010

Amazing! Someone else also recognizes the crying need for “soft”, people skills in the hard, rocket science techie community!

I ran into Ari Krupnik at the Hacker Dojo job fair. I have constantly beaten my head against the wall trying to get other developers to understand that most people are not interested in technology for technology’s sake. Most people outside Silicon Valley has a life that does not revolve around technology but rather uses technology as an expression of “self” (“iPhone gets me the girl”). Non-techie types are anti-RTFM. Developers as a rule don’t understand and think the users are eager to spend hours discovering how wonderful the program is.

Ari apparently does:

I notice that engineers who block specific emotions entrain drama that revolves around the very emotions they block. The drama seems to go away as soon as the engineer is willing to experience the feeling that he blocks. In the tribe, we help each other unblock feelings and experience them fully. The results seem to include better relationships with peers and customers, and improvements in code quality.

Pride before the fall?

Sunday, January 10th, 2010

Mark Z. (facebook) says everything should be public. Mark Z. does not know about Rebecca Schaeffer. Before she was murdered by a stalker, “no one” cared about the privacy issues around California selling driver license information to anyone.

Before identity theft became a huge problem, “no one” cared that every tom-dick-and-harry business was using social security numbers as account numbers.

Before 9/11, “no one” cared about terrorism at the deeply personal level.

The fundamental danger is that Mark Z. is completely unprepared for the reality that societies acceptance of what is o.k. can and does shift. Sometimes slowly, some times in one day.

Arrogance and indifference is blinding.

I won’t predicate the demise of Facebook. But if I was a facebook investor, this would be a little worrying. I sense a bit of an echo machine within Facebook.

If government law changes to demand privacy will facebook be able to respond?

… and I nailed the javadoc

Thursday, January 7th, 2010

Yesterday was a red letter day. I found multiple bugs in the javac and javadoc. (1.6.0_17)

This javadoc issue occurred when there is a class that has no package line ( it is in the default package). Annoyingly enough it occurred when I was trying to create a test case for this javac bug. I was running maven 2.2.1 at the time.

java.lang.NullPointerException
       at com.sun.tools.doclets.formats.html.PackageUseWriter.generatePackageUse(PackageUseWriter.java:180)
       at com.sun.tools.doclets.formats.html.PackageUseWriter.generatePackageList(PackageUseWriter.java:124)
       at com.sun.tools.doclets.formats.html.PackageUseWriter.generatePackageUse(PackageUseWriter.java:110)
       at com.sun.tools.doclets.formats.html.PackageUseWriter.generatePackageUseFile(PackageUseWriter.java:99)
       at com.sun.tools.doclets.formats.html.PackageUseWriter.generate(PackageUseWriter.java:78)
       at com.sun.tools.doclets.formats.html.ClassUseWriter.generate(ClassUseWriter.java:116)
       at com.sun.tools.doclets.formats.html.HtmlDoclet.generateOtherFiles(HtmlDoclet.java:92)
       at com.sun.tools.doclets.internal.toolkit.AbstractDoclet.startGeneration(AbstractDoclet.java:122)
       at com.sun.tools.doclets.internal.toolkit.AbstractDoclet.start(AbstractDoclet.java:64)
       at com.sun.tools.doclets.formats.html.HtmlDoclet.start(HtmlDoclet.java:42)
       at com.sun.tools.doclets.standard.Standard.start(Standard.java:23)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:597)
       at com.sun.tools.javadoc.DocletInvoker.invoke(DocletInvoker.java:269)
       at com.sun.tools.javadoc.DocletInvoker.start(DocletInvoker.java:143)
       at com.sun.tools.javadoc.Start.parseAndExecute(Start.java:340)
       at com.sun.tools.javadoc.Start.begin(Start.java:128)
       at com.sun.tools.javadoc.Main.execute(Main.java:41)
       at com.sun.tools.javadoc.Main.main(Main.java:31)

Solution was to put the java code into a package.

Woot! I crashed the javac

Thursday, January 7th, 2010

My javac crash:

An exception has occurred in the compiler (1.6.0_17). Please file a bug at the Java Developer Connection (http://java.sun.com/webapps/bugreport) after checking the Bug Parade for duplicates. Include your program and the following diagnostic in your report. Thank you.

java.lang.AssertionError: isSubtype 15 ( 15 = TypeTags.WILDCARD )
	at com.sun.tools.javac.code.Types$5.visitType(Types.java:347)
	at com.sun.tools.javac.code.Types$5.visitType(Types.java:328)
	at com.sun.tools.javac.code.Types$DefaultTypeVisitor.visitWildcardType(Types.java:3163)
	at com.sun.tools.javac.code.Type$WildcardType.accept(Type.java:416)
	at com.sun.tools.javac.code.Types$DefaultTypeVisitor.visit(Types.java:3161)
	at com.sun.tools.javac.code.Types.isSubtype(Types.java:324)
	at com.sun.tools.javac.code.Types.isSubtype(Types.java:308)
	at com.sun.tools.javac.code.Types.isSubtypeUnchecked(Types.java:288)
	at com.sun.tools.javac.code.Types.isSubtypeUnchecked(Types.java:460)
	at com.sun.tools.javac.comp.Infer.checkWithinBounds(Infer.java:388)
	at com.sun.tools.javac.comp.Infer.instantiateExpr(Infer.java:241)
	at com.sun.tools.javac.comp.Check.instantiatePoly(Check.java:356)
	at com.sun.tools.javac.comp.Check.checkType(Check.java:324)
	at com.sun.tools.javac.comp.Attr.check(Attr.java:160)
	at com.sun.tools.javac.comp.Attr.visitApply(Attr.java:1276)
	at com.sun.tools.javac.tree.JCTree$JCMethodInvocation.accept(JCTree.java:1210)
	at com.sun.tools.javac.comp.Attr.attribTree(Attr.java:360)
	at com.sun.tools.javac.comp.Attr.attribExpr(Attr.java:377)
	at com.sun.tools.javac.comp.Attr.visitAssign(Attr.java:1550)
	at com.sun.tools.javac.tree.JCTree$JCAssign.accept(JCTree.java:1342)
	at com.sun.tools.javac.comp.Attr.attribTree(Attr.java:360)
	at com.sun.tools.javac.comp.Attr.attribExpr(Attr.java:384)
	at com.sun.tools.javac.comp.Attr.visitExec(Attr.java:1017)
	at com.sun.tools.javac.tree.JCTree$JCExpressionStatement.accept(JCTree.java:1074)
	at com.sun.tools.javac.comp.Attr.attribTree(Attr.java:360)
	at com.sun.tools.javac.comp.Attr.attribStat(Attr.java:397)
	at com.sun.tools.javac.comp.Attr.attribStats(Attr.java:413)
	at com.sun.tools.javac.comp.Attr.visitBlock(Attr.java:715)
	at com.sun.tools.javac.tree.JCTree$JCBlock.accept(JCTree.java:739)
	at com.sun.tools.javac.comp.Attr.attribTree(Attr.java:360)
	at com.sun.tools.javac.comp.Attr.attribStat(Attr.java:397)
	at com.sun.tools.javac.comp.Attr.visitIf(Attr.java:1009)
	at com.sun.tools.javac.tree.JCTree$JCIf.accept(JCTree.java:1050)
	at com.sun.tools.javac.comp.Attr.attribTree(Attr.java:360)
	at com.sun.tools.javac.comp.Attr.attribStat(Attr.java:397)
	at com.sun.tools.javac.comp.Attr.attribStats(Attr.java:413)
	at com.sun.tools.javac.comp.Attr.visitBlock(Attr.java:715)
	at com.sun.tools.javac.tree.JCTree$JCBlock.accept(JCTree.java:739)
	at com.sun.tools.javac.comp.Attr.attribTree(Attr.java:360)
	at com.sun.tools.javac.comp.Attr.attribStat(Attr.java:397)
	at com.sun.tools.javac.comp.Attr.visitForLoop(Attr.java:740)
	at com.sun.tools.javac.tree.JCTree$JCForLoop.accept(JCTree.java:818)
	at com.sun.tools.javac.comp.Attr.attribTree(Attr.java:360)
	at com.sun.tools.javac.comp.Attr.attribStat(Attr.java:397)
	at com.sun.tools.javac.comp.Attr.attribStats(Attr.java:413)
	at com.sun.tools.javac.comp.Attr.visitBlock(Attr.java:715)
	at com.sun.tools.javac.tree.JCTree$JCBlock.accept(JCTree.java:739)
	at com.sun.tools.javac.comp.Attr.attribTree(Attr.java:360)
	at com.sun.tools.javac.comp.Attr.attribStat(Attr.java:397)
	at com.sun.tools.javac.comp.Attr.visitIf(Attr.java:1009)
	at com.sun.tools.javac.tree.JCTree$JCIf.accept(JCTree.java:1050)
	at com.sun.tools.javac.comp.Attr.attribTree(Attr.java:360)
	at com.sun.tools.javac.comp.Attr.attribStat(Attr.java:397)
	at com.sun.tools.javac.comp.Attr.attribStats(Attr.java:413)
	at com.sun.tools.javac.comp.Attr.visitBlock(Attr.java:715)
	at com.sun.tools.javac.tree.JCTree$JCBlock.accept(JCTree.java:739)
	at com.sun.tools.javac.comp.Attr.attribTree(Attr.java:360)
	at com.sun.tools.javac.comp.Attr.attribStat(Attr.java:397)
	at com.sun.tools.javac.comp.Attr.visitIf(Attr.java:1009)
	at com.sun.tools.javac.tree.JCTree$JCIf.accept(JCTree.java:1050)
	at com.sun.tools.javac.comp.Attr.attribTree(Attr.java:360)
	at com.sun.tools.javac.comp.Attr.attribStat(Attr.java:397)
	at com.sun.tools.javac.comp.Attr.attribStats(Attr.java:413)
	at com.sun.tools.javac.comp.Attr.visitBlock(Attr.java:715)
	at com.sun.tools.javac.tree.JCTree$JCBlock.accept(JCTree.java:739)
	at com.sun.tools.javac.comp.Attr.attribTree(Attr.java:360)
	at com.sun.tools.javac.comp.Attr.attribStat(Attr.java:397)
	at com.sun.tools.javac.comp.Attr.visitMethodDef(Attr.java:634)
	at com.sun.tools.javac.tree.JCTree$JCMethodDecl.accept(JCTree.java:639)
	at com.sun.tools.javac.comp.Attr.attribTree(Attr.java:360)
	at com.sun.tools.javac.comp.Attr.attribStat(Attr.java:397)
	at com.sun.tools.javac.comp.Attr.attribClassBody(Attr.java:2697)
	at com.sun.tools.javac.comp.Attr.attribClass(Attr.java:2628)
	at com.sun.tools.javac.comp.Attr.attribClass(Attr.java:2564)
	at com.sun.tools.javac.main.JavaCompiler.attribute(JavaCompiler.java:1036)
	at com.sun.tools.javac.main.JavaCompiler.compile2(JavaCompiler.java:765)
	at com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:730)
	at com.sun.tools.javac.main.Main.compile(Main.java:353)
	at com.sun.tools.javac.main.Main.compile(Main.java:279)
	at com.sun.tools.javac.main.Main.compile(Main.java:270)
	at com.sun.tools.javac.Main.compile(Main.java:69)
	at com.sun.tools.javac.Main.main(Main.java:54)

I was not successful at reducing this crash to a simple test case.

However, the line that triggered the crash was:

ProxyMapperImplementor<?,?> childProxy = this;

Some points:

  • Once again (and again) the eclipse compiler is more robust than the sun javac
  • ProxyMapperImplementor is defined as:

    interface ProxyMapperImplementor<I, O extends I>

  • Removing the wildcards so the line looks like solved the problem:

    ProxyMapperImplementor childProxy = this;

    Update (email from sun):

    This issue is related to Bug ID: 6738538. You can review this bug at:

    http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6738538

    This problem has been fixed in Java SE 7.0. Consider downloading a free copy at http://download.java.net/jdk7/binaries/ and checking if the problem persists. If the problem persists do let us know and we shall investigate this furthur.

    We greatly appreciate your efforts in identifying areas in the Java Standard Edition where we can improve upon and I would request you to continue doing so.

Generic annoyances in java

Wednesday, January 6th, 2010

For some reason, the type variable <O> cannot flow through from an external caller through a callee to another called method.

This compiles just fine in eclipse, but once again sun’s javac is temperamental.

The three solutions seem to be:

  1. pass an object of type <O> to the subcallee method (m0(), p0() )
  2. use wildcard instead of <O> – which is o.k. if O is not needed in the body of the method
  3. assign to a variable with no generic information (universal backup solution to java generic wierdness)

I filed a bug with Sun.

(Technical details: javac 1.6.0_17 )

public class Foo {
    public > I m(I i) {
/*line3*/        R r = (R) p(i);
        return i;
    }
    public > R p(I i) {
        return null;
    }

    public > I m0(O o) {
        K r= (K) p0(o);
        return o;
    }
    public > K p0(O o) {
        return null;
    }

    public > I m1(I i) {
        K r= (K) p1(i);
        return i;
    }
    public > K p1(I i) {
        return null;
    }

    public > I m2(I i) {
/*line 27*/        K r= (K) p2(i);
        return i;
    }
    public > K p2(I i) {
        return null;
    }
    interface FooInterface {

    }
}

Foo.java:3: incompatible types; inferred type argument(s) I,java.lang.Object do not conform to bounds of type variable(s) O,R
found : R
required: java.lang.Object
/*line3*/ R r = (R) p(i);
^
Foo.java:27: incompatible types; inferred type argument(s) I,java.lang.Object do not conform to bounds of type variable(s) O,K
found : K
required: java.lang.Object
K r= (K) p2(i);
^