Skip to main content

Posts

Showing posts from 2012

nbnotify.com is back up

I forgot to publish this, but it's been a month since I uploaded a new version of nbnotify.com, the OSX notification plugin.
Based on Bootstrap, this new site is as simple as it gets: all static, a stark contract to the old PHP Wordpress.
I brought the old site down in August because the Wordpress I had there was too insecure.
Right now this plugin is looking a bit old. After all, it needs the original Growl, not the new commercial Growl. Also, OSX Mountain Lion has its own notification API which I do not support yet.

Everything takes time

I read somewhere that as you get older you don't necessarily get slower, you just trade speed for quality. This sounds about right.

Here is my time with an UI regression in the new version of a large Swing app:

I start investigating the problem manually and look at the code to see what might be the cause.

I find a quick way to duplicate it.

I deduce from the code what might be the cause but I'm wrong, it could be that, but it isn't, because there is extra code to check for that condition.

I start probing with a BTrace script to see the Swing events.

I finally find the actual cause and I'm stupefied - it's a failure of an underlying system and not of the UI.

I make an unit test that fails for the regression. I also find a possible fix.

Since I'm a bit surprised by how that system worked, I go and check the problem in the previous version of the Swing app. The problem is not there! It is a regression indeed.

Now I'm really surprised - what changed?

I start de…

A Swing window is just as transparent as a web page

I'm a fan of the web and I admire how powerful the browser has become. Since I'm almost always in a browser (even to type this blog) I would certainly love to see even more useful apps, like, perhaps, an online IDE. So, although I work with desktop apps I like this cloud and web app kool-aid a whole lot.

One of the advantages I see in web apps is how transparent they are. It's all text, with code in an easy scriptable language. It's easy to inspect and change. Easy to deploy.

But I don't work with web apps. I work with large desktop Swing applications, usually on top of the NetBeans Platform.

I routinely debug these Swing apps with the debugger, VisualVM, BTrace and simple apps or unit-tests that reproduce the issue.

And it occurred to me after a debugging session to me that Swing apps are quite transparent too! The fact that Java code is compiled is just a decoy. As a developer you have access to the source code anyhow but, even as an user, you have about the same…

Our own NetBeans Summer of Code

My company is having a Summer of Code for students.

We suggested a list of project that might interest students and we are offering them a paid summer internship to complete their favorite pick.

Since most of what we do touches NetBeans or the NetBeans Platform in some way, a big part of the list is a valid suggestion for the community too.

So, today, we are opening the projects for NetBeans community members too!

Let's see, excluding the items that don't apply, the list has:

#1. Swing based Git Repository Browser

We want this as a standalone app, but it could also be used to enhance NetBeans.

#2. UnQL interpreter

An ANTLR-based parser is needed and a simple UnQL interpreter. This could easily be integrated into NetBeans to provide syntax highlight and perhaps even completion. The interpreter might be just a simple executor or something that visually explores the database.

#5 NetBeans Linux notifications

Just as NBnotify.com displays OSX notifications using nati…

Apple, job creation and the App economy

The Apple job creation page is pure PR: they claim to have "created" or "supported" over 500.000 jobs.

It sounds like the kind of thing a politician would say. Because they even add transportation, health care and "the app economy"!

It's kind of like you claiming to be a job creator because you buy local and burn electricity.

Anyhow, what's interesting is that the App economy is estimated at 210,000 US jobs and Apple has paid over $4 billion to App developers world-wide, ever!

Assuming those $4 billion were all to US app developers in a single year, that ends up to about $19.000 / job in total or about $1600 / month / US developer if that amount is split over 12 months.

What this shows is quite interesting: the App economy isn't self-sustaining.

If the 210,000 US jobs are real then App Store sellers are burning cash.

Considering the money sellers make must follow some sort of distribution then most of those "app economy" jobs aren'…

Intellij needs to introduce the Lookup API

I'm looking today at the toolbar classes from IntelliJ IDEA and I'm surprised by the amount of instanceof I see.

For example, NavBarPresentation.getIcon looks like this:

public static Icon getIcon(final Object object, final boolean open) { if (!NavBarModel.isValid(object)) return null; if (object instanceof Project) return PROJECT_ICON; if (object instanceof Module) return ModuleType.get(((Module)object)).getNodeIcon(false); try { if (object instanceof PsiElement) { Icon icon = ApplicationManager.getApplication().runReadAction(new Computable() { public Icon compute() { return ((PsiElement)object).isValid() ? ((PsiElement)object) .getIcon(open ? Iconable.ICON_FLAG_OPEN : Iconable.ICON_FLAG_CLOSED) : null; } }); if (icon != null && (icon.getIconHeight() > 16 || icon.getIconWidth() > 16)) { icon = IconUtil.cropIcon(icon, 16, 16); } return ico…

Magic is just programming without knowledge

There is nothing more cringe-inducing than seeing somebody try to program something without actually knowing what's going on. With some exceptions, programming allows you to know precisely what's going on. Not knowing how something works should trigger some alarm bells.

Magic might be an ancient form of "programming" nature where most of knowledge has actually been lost. Without factual information, only rituals were kept and some basic notions.

I wouldn't be surprised if in 1000 years or so we have a high-priest class of programmers that need to take care of computerized systems so old they forgot the logic behind them. They will basically become magicians.

LTS means ancient?

I was surprised today to see that Ubuntu 10.04 LTS comes with Mercurial 1.4! The latest Mercurial release is 2.1

Mercurial 1.7 also introduced a repository change, the dotencode requirement. This means any repository created after November 2010 with 1.7 and dotencode will not be accessible by the Mercurial from the Ubuntu LTS. This error should be familiar:

abort: requirement 'dotencode' not supported!
One solution is to use the Mercurial PPA to get a newer release.

But, it doesn't make sense to use an LTS if you are going to use software from PPAs, no?

With sun-jdk being pruned from the repositories, I'm starting to get annoyed by Ubuntu. I'm starting more and more to manage dependencies by hand instead of relying on the system. Which, imho, means the system is broken.