Follow the $: Verizon iPhone != LTE

Posted July 19th, 2010 in Commentary by jayshao

The perennial Verizon iphone rumors keep ticking by, with speculation about contract dates, terms, projections, and the usual interview of some guy in line at the apple store who says “I’d switch today”.

A recent thread seems to be in a lot of these stories: “Verizon iPhone will use LTE (4G)”. While I have just as little actual information as most of these analysts, I think it’s unlikely based on Apple’s core competencies and past behavior, and market/situational facts.

Continue Reading »

Perf4j+Maven+AspectJ CTW

Posted June 29th, 2010 in Commentary by jayshao

Recently I’ve incorporated Perf4j for runtime performance statistics on a number of projects, combined with our in-house counters and other standard libs (actually I quite like the annotation-style logging of perf-stats, and the tag-name rollup conventions, and will probably retrofit both into our existing collection tools). I had a bit of difficulay initially getting AspectJ to do CTW for the collection (and in retrospect, very much want to investivate the agent-based LTW approach, since it’d give us the ability to flip on/off recording, while it should be basically just as fast except on object creation – which for Spring/Singleton instantiated services (most of our performance code) is not significant.

Anyhow, the meat, plugin config below:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
<plugin>
    <groupId>org.codehaus.mojo</groupId>
    <artifactId>aspectj-maven-plugin</artifactId>
    <version>1.3</version>
    <configuration>
        <showWeaveInfo>true</showWeaveInfo>
        <source>1.6</source>
        <weaveDependencies>
            <dependency>
                <groupId>org.perf4j</groupId>
                <artifactId>perf4j</artifactId>
            </dependency>
        </weaveDependencies>
    </configuration>
    <executions>
        <execution>
            <goals>
                <goal>compile</goal>
                <!-- use this goal to weave all your main classes -->
                <goal>test-compile</goal>
                <!-- use this goal to weave all your test classes -->
            </goals>
        </execution>
    </executions>
</plugin>

Also dependencies (we use Log4j, though we’re looking at Logback as well):

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
<dependency>
    <groupId>org.aspectj</groupId>
    <artifactId>aspectjrt</artifactId>
    <version>1.6.7</version>
</dependency>
<dependency>
    <groupId>org.perf4j</groupId>
    <artifactId>perf4j</artifactId>
    <version>0.9.13</version>
    <classifier>log4jonly</classifier>
</dependency>
<dependency>
    <groupId>commons-jexl</groupId>
    <artifactId>commons-jexl</artifactId>
    <version>1.1</version>
</dependency>

Performance note: We did some unit testing of methods which were instrumented/non-instrumented (our unit test basically spewed out a couple thousand garbage string+ints in a loop, which was instrumented or not)

We saw something like 3x the number of minor GCs (though GC was still fast) – no additional major GCs after adding Perf4j. Overall execution time was higher as well, though not by the same degree.

Facebook -> Chainletter NG

Posted June 29th, 2010 in Commentary by jayshao

Looking through my friends streams – I saw a big blurb for:

http://www.subwayfootlongspromo.com/ (notice the comment box isn’t real…)

Which convinces me – Facebook Like Pages are the new Chainletter. And, even better than Chainletter (costs a lot) or Chainletter 2.0 (fills up email boxes), Chainletter NG allows you to check the progression of your meme in real-time, using all the tooling provided by Facebook. As the Facebook comment and like boxes become even more recognizeable, I’d expect this situation will action only increase.

This does seem to help make the case for verifiable identity for widgets – e.g. how do I socially, recognizably mark my widget as genuine for users when they can’t just check the URL bar to see what site they’re on? Unfortunately, it’s hard to come up with some pattern that’s not going to involve browser support, though what the banks have been doing with personalized site access images, and the social networks w/gravatar/avatar style repetition might be helpful (e.g. train users to only submit if they see their picture, and if you don’t know what you look like ask the guy next to you…

Neat Intellij Tricks

Posted June 28th, 2010 in Commentary by jayshao
This entry is part 4 of 4 in the series Eclipse2Intellij

So, after a few months of working almost exclusively in Intellij, I have to say I think it is a better IDE, and I miss it when I go back to Eclipse. There’s significant talk about us adopting it, though the usual questions about retraining, etc. rear their ugly head. Neat tidbits that have come up:

  • Automatic, pre-commit static code-analysis – including your own bug definitions: http://jetbrains.dzone.com/articles/find-your-very-own-bugs
  • Great SVN change-list support for keeping multiple flows of changes sorted out – even shows up properly in svn status
  • One-click threadlocal refactor: http://blogs.jetbrains.com/idea/2009/10/threadlocal-in-one-click/
  • Settings sync online w/IDEA Server Plugin
  • Glassfish integration works, deploy & really nice console mapping (e.g. tail arbitrary log files) – have to leave username/password blank
  • Maven support: true main vs. test scope isolation, hierarchical module support
  • Language Injection: specify that certain methods take SQL, Groovy, REGEX, CSS, JS, and get working sytax completion, etc.

OutOfMemory PermGen Errors

Posted June 23rd, 2010 in Commentary by jayshao

In the past I’ve gone to the good old reliable “-XX:MaxPermSize=256m” (or 384m, 512m, etc.) to try to get redeploys in webapp containers like Tomcat and Glassfish to allow numerous hot-redeploys. I figured I’d invest a little time in sorting this out to see if there’s a better solution – unfortunately it doesn’t look like it.

http://www.jroller.com/agileanswers/entry/preventing_java_s_java_lang

had some useful sounding suggestions:

  • Move to JRockit – which is free for deployment (minus the nice management console) and does look very impressive, and seems to use a different memory scheme that doesn’t rely on PermGen, but could conceivably still suffer from class/memory leaks
  • Try these flags: -XX:+CMSClassUnloadingEnabled -XX:+CMSPermGenSweepingEnabled – this seems not to work, at least when tested against JDK 6, Glassfish 3, with a Spring-based application with a moderate amount of open-soruce tooling (Spring, Log4j, Drools, the like) – with PermGen set to 256m I still get out of Memory, and jvisualvm shows PermGen slowly filling up: permgen filling up

In the end, I have to agree with: http://my.opera.com/karmazilla/blog/2007/03/13/good-riddance-permgen-outofmemoryerror – it looks like we’re stuck with this, at least I haven’t found a sane solution beyond restarting between deploys. At least embedded servers like jetty or embedded glassfish startup quicker…

Juniper VPN Mac Setup

Posted April 23rd, 2010 in Commentary by jayshao

It took me almost an hour of troubleshooting before I found this KB entry describing how to fix the applet install for Juniper VPN on Mac OSX.

http://kb.juniper.net/index?page=content&id=KB16134&actp=LIST

Bad iPhone/Droid Sales Comparison

Posted March 17th, 2010 in Commentary by jayshao

A number of news sources seem to be publishing comparisons between initial sales numbers for the Apple iPhone, Motorola Droid, and Google Nexus One.

Some quick comparisons are being made trying to compare the DROID & iPhone numbers head on, but I’m surprised not to see any sidebars noting that the original iPhone launched at 499/599 – whereas the DROID has been fully subsidized from the get go.

Official Google Blog: Introducing Google Buzz

Posted February 10th, 2010 in Commentary by jayshao

Official Google Blog: Introducing Google Buzz: “We’ve relied on other services’ openness in order to build Buzz (you can connect Flickr and Twitter from Buzz in Gmail), and Buzz itself is not designed to be a closed system. Our goal is to make Buzz a fully open and distributed platform for conversations. We’re building on a suite of open protocols to create a complete read/write developer API, and we invite developers to join us on Google Code to see what is available today and to learn more about how to participate. “

(Via Google Blog.)

While this looks a lot like twitter/brightkite/facebook activities, I do wonder if the real game-changer is integrating with Email – e.g. making Lifestream activities mainstream (though Facebook has become pretty mainstream) – or mainstream for people who haven’t necessarily sought out social networks.

I also wonder how this fits in with Wave? Is wave a technology platform under/in parallel to this? Slightly different? Just 2 teams at Google doing slightly different things “let a thousand flowers bloom and all that”?

Combining jUnit’s @Ignore and @AfterClass

Posted January 26th, 2010 in Commentary by jayshao

Interesting – in jUnit 4.4 – combining @Ignore and @AfterClass (haven’t tried the other static’s like @BeforeClass) don’t seem to do what I’d expect – e.g. the @AfterClass annotated method seems to execute regardless.

[FIXED] Eclipse Issues with Clicking on Ubuntu/GNOME

Posted January 25th, 2010 in Commentary by jayshao

For the last few months, have moved most of my work programming from the Mac to Ubuntu (first convenience via VMs, recently because I switched jobs and at the new employer it was that or Windows) which has mostly gone will, though there were some issues around Eclipse UI gotchas, notably:

  • Sometimes buttons wouldn’t let you click them (though keyboard focus mostly worked find)
  • Sometimes windows wouldn’t paint properly – contents, toolbars, etc.

At first I thought it might have been Virtualbox’s mouse driver, but it looks like it’s a generic Eclipse/GTK issue, with some notes at http://blogs.gurulabs.com/dax/2009/10/what-gdk-native.html on the root cause, and how to fix it. For the time being I’ve created scripts to launch Eclipse (and STS) and before I fire off Eclipse, do a:

1
export GDK_NATIVE_WINDOWS=1

This seems to resolve the painting issues, though it feels a bit less smooth/fast (UBUNTU+GNOME+COMPIZ) – still usable, though admittedly have tried this on a pretty fast machine (recent 2xQuad-Core w/lots of RAM)