Skip to main content

Posts

Showing posts from 2010

NBnotify: NetBeans Growl notifications, now with its own website

http://nbnotify.com/ is live with the latest version of the NetBeans plugin which displays Growl notifications for builds (as well as everything else the IDE might need to notify you about).

It took about a week to get this up and running, but mostly because we had a weekend in between.

Andrei was paid to take care of the WordPress magic, I just provided the budget (yeap, open-source still costs money besides time), text, screenshots and the video.

Speaking of the video, it's surprisingly hard to find a tool that records plain .avi on OSX. Hard because Google is oblivious to the changes in Snow Leopard where I could just use QuickTime to do File | New Screen Recording. Of course, I've only seen this now, and fiddled with Camtasia, Snapz Pro X (which worked) and Jing.

Have fun with the plugin and let me know about it!

Linguistic musings

There are two notions that to me seem have been injected out of the blue into the mainstream.

First: systems programming (language)


This came for me out of nowhere. The first Wikipedia articles are from 2004 (and late 2003) but I've never heard it until Google Go was described as something good for systems programming.

If you look at the Google Trend for "system programming language, systems programmer, google go language" you should see something like this:


So basically all variations start showing up the same time as Google Go is introduced and even those that show up are basically job adds that just happen to have 'systems' and 'programmer' in them.

It's safe to say that Google Go brought the word systems programming into the mainstream.

If you are looking at Wikipedia, even the description of the C programming language is filled now with "system software" and "system programming" but go as far as the 2004 version and "syst…

Building an iOS project with Hudson

I'm mostly writing this here for archival purposes. This is how I used to build iOS projects via Hudson (I don't have any iOS projects ongoing).

First, since Hudson runs on a Linux machine, I need to add a new node then start the agent on an OSX machine from an account where I have all the digital keys set up properly.

Next, supposing I have an iOS app called Example,I just tell Hudson to poll the SCM then execute the script:

TIME=`date "+%Y-%m-%d_%H-%M-%S"`;


rm -r build || true;


xcodebuild -target Example -configuration Distribution -sdk iphoneos3.1.2 clean build


  && 


  (mkdir build/Distribution-iphoneos/Payload; mv build/Distribution-iphoneos/Example.app build/Distribution-iphoneos/Payload)

  && 

  (cd build/Distribution-iphoneos && zip -9 "example-$TIME.ipa" -r Payload)

Afterwards Hudson just needs to "Archive the artifacts" from build/Distribution-iphoneos/*.ipa


Obviously you need to tweak the sdk version a bit as this script…

NetBeans Slowness detector with Growl

Got surprised today when I saw the slowness notification on Growl:


I rarely get this message but it's nice to see it published via Growl, using my OSX Notifications module which is a Growl bridge for NetBeans Platform notifications.
Clicking on the notification


gets you this:



I'm not entirely satisfied with the way this message is presented because I would need a "Close" button, not an "OK" button. Also -- clicking on that hyperlink seems to open a new window behind this dialog.
Anyhow, there isn't much I can control since we have a lot of native components due to the broken OpenIDE AWT NotificationDisplayer API which encourages custom JComponents.
This particular notification for example should use no custom component. It should just say: "Slowness detected: Not responsive for 5 s" and then clicking on the (Growl) notification should open the "Report Problem" dialog.

Java (NetBeans) antialias issues

NetBeans Growl notifications

Demo time



This plugin provides Growl integration with NetBeans. If you are using NetBeans on OSX and you have Growl, download my plugin.

As a proof of concept builds are shown but all other notifications that usually would have appeared using the default implementation are now posted via Growl.

Complex UIs trigger just a simple notification and then display a dialog when clicked with the actual custom components (obviously one can't publish custom Swing components in a Growl popup).



Speaking of complex UIs, some custom components are just JLabels that simulate hyperlinks so I would say those might be migrated to a normal text and ActionListener.

Background

One thing that NetBeans needs is OS-aware notifications and my two focused OSes are Ubuntu and OSX.

On Linux we have the Desktop Notifications Specification, which is a very clean, D-BUS based specification for desktop-wide notifications.

Ubuntu extends and modified the specification a bit as well as define a quite nice design gu…

MySQL as the first NoSQL database

I was watching yesterday a presentation at GeekMeet Timisoara about how to scale your websites and all the MySQL-related advices were as expected, but upon thinking about it, entirely agains normal database mantras:

You should de-normalize the database (copies are easier to access and cheap)You should disable transactions (ie. use a MySQL storage engine that isn't transactional).MySQL Master-Slave replication (which is asynchronous!)
This made me realize that MySQL is successful precisely because of all the things I discredited it for.

You see, in my book MySQL was never a real database because, initially, it wasn't transactional. For the project where I could choose the database, I picked PostgreSQL and I always used MySQL knowing in the back of my head that, in fact, it was a bit of a sham.

But this might just be MySQL's good fortune: by providing a simple storage engine with some SQL front-end, they proved that most people don't need ACID compliance.

Furthermore, as …

NetBeans Ideas

Auto update must become OS-aware

This means that on Linux auto update is entirely apt-get based (or whatever mechanism the distro has).

On OSX we might use something like Sparkle.

The NetBeans specific auto update implementation should be just a fallback plan. Having it use BitTorrent too would be nice (see my experiment regarding this).

OS-aware notifications

The custom notification mechanism and popup should be replaced by the OS notification, if available. This means using Growl on OSX and whatever Ubuntu has nowadays.

Versioning

Git support should be part of the official release: help these guys make it happen!

Mercurial Queues and 3 way diff would also be a nice thing.

BTrace

Btrace should be bundled with NetBeans and integrated with the existing debugger and profiler. I want to either use the manual debugger/profiler, run normal BTrace scripts or control the debugger or profiler via BTrace scripts! This means a Debugger/Profiler dedicated BTrace API.

Out of process indexing

Indexing …

Why don't you have personal projects ?

I've been reading a lot of CVs and did some interviews with young folks that are either about to finish University or just did (and some are already preparing for their Masters' degree) as I'm trying to fill a position at Joseki Bold SRL.

What strikes me as unusual is how few personal projects do most of them have. And I'm not talking here about A students that barely have enough time to learn for school and do the teacher's projects. I'm talking about normal students that don't seem to have very high grades, nor work to earn a living and yet they also don't have any personal projects to talk about.

Computer programmers are lucky. Unlike other professions, we can easily afford to buy the top-level tools and have free access to a lot of information to learn about our trade. A physics student can't really buy his own particle accelerator but by all means any student already has everything the best computer programmer in the world has: a PC and access …

Magical moments

Noticing after I've read Douglas Adams' The Hitchhiker's Guide to the Galaxy that on a furniture in the kitchen lies the answer to the ultimate question:


Sitting one day in the almost empty 700 Coffee & Lounge and hearing the eerie Twin Peaks Theme by Angelo Badalamenti:





Cleaning up yesterday the same old closet with 42 and finding a bottle of Suntory Gold whisky. Lost in Translation is my favorite movie and Suntory is the brand of whisky Bill Murray was endorsing in it:

Source code hosting sets pricing all wrong

Where's the love?
The way GitHub structured their pricing plan looks like a way to punish long-term customers.

They don't charge based on how much value they are providing: they just charge based on how much you must be willing to pay after your data starts gathering there. And they are not alone -- most other do the same wrong customer segmentation tricks.

Many small projects
It's good form to have separate repositories for separate projects, so with each new project hosted on GitHub you would create a new private repository.

Well -- pretty soon you will run out of private repositories so you'll need to upgrade to a new plan.

If you look at their pricing plans they are for 5, 10 and 20 private repositories, and then you get into the over $100/month business plans.

Am I silver business or micro ?
If I look at my own server, I have 34 mercurial repositories dating 2 years back alone. Of course, some are big, some are small, some represent my own ideas while other are repo…

Compiling is such a chore

I'm using Hudson as my build server and I would love to patch some things about it, especially the JUnit reports and charts.

Well, one of the reasons I dislike getting to this small change is that I would first:
need to checkout Hudson,
then figure out how to build it,
then do the patch,
then compile it and finally
start using the changed Hudson.Thus, there are quite a few things that stop you from doing the smallest changes, and I would say the biggest culprit is that you have to compile the code. In a scripting language:
I would not need to checkout anything as the installed sources are everything I need.
There would be no "build" rules.
The patch would be done in-place.
There would be no "compilation" step and
There would be no "deploy" step so I can start using the new Hudson right away.So while I dislike PHP, for example, as it seems too easy to break anything, having a strong typed, compiled language does hinder the desire to do small changes.

Imagine ho…

Forget the removable battery, what about the easily removable hard drive? (Get well soon, trusty mac!)

Get well soon, trusty Mac

Last Wednesday my MacBook Pro's display stopped working. Actually, it might be the logic board since the fans do seem to start but nothing else happens: it needs to be sent to an Apple Service. (It could also be that wide-spread NVidia problem MacBook Pros had, who knows).

Anyhow, I had to migrate some data to a new machine I received this morning.

I have bought about a month ago an Intel SSD hard drive so I already knew how to dismantle the laptop. This time I just had to swap the hard drive of the replacement machine with my own SSD drive and I was back to work. Well, one hour later anyhow.

User serviceable

This whole experience made me think how convenient it really is to have user-serviceable components. As laptops basically replace desktops, it's important to be able to access hardware in your laptop.

Actually, not everything is important, there are 2 big things that matter: RAM and hard drive. RAM access is just a nice to have feature since add…

Re: How Could the NetBeans Team Make Money from the NetBeans Platform?

This is a reply to Geertjan's blog which wonders how could Oracle monetize the Platform: How Could the NetBeans Team Make Money from the NetBeans Platform?  .

The first thing I would like to see is the NetBeans Foundation which would be a central authority that cares about the future of the NetBeans Platform (and IDE, actually -- it makes no sense to have the Foundation just for the Platform).

Because when NetBeans was under Sun, the Platform wasn't seen as something worth monetizing. Under Oracle, we worried weather they will pull the plug or not (given Oracle has their own IDE and supports Eclipse too).

So, the first thing would be to have an actual entity in charge of this -- something legal, not some website or imaginary construct. This entity would want to get our money and will support itself in various forms: donations, support, stakeholder fees or various subscriptions.

Of course, we need some actual backing so we would still need actual companies on board: stakeholder…

EC2 as a build server

I've been using for the past year or so a Slicehost virtual private server running Ubuntu Linux to run a build server.

Due to the inherent IO-bound nature of some of my builds and the RAM starved nature of the servers sold, I've been forced to upgrade from the 256MB to the 512MB and then to the 768MB slice. Not sure if it's a marketing ploy but you cannot use the server otherwise.

Starting last week, I'm running experiments on migrating the builds on top of EC2 (and S3 for storage). Using EC2 for a build server, especially for a small company is a perfect fit:

EC2 machines are way more powerful

The smallest EC2 machine has 1.7GB of RAM and the next one 7GB. These are serios machines.

Builds are finite

This might not apply for your projects or your company, but I generally do a few operations per day that would trigger a build.

This means that I actually only need the server for, let's say, 5 builds per day or less. Over 20 work days, I would actually use the build ser…

Fremen gear

Ever since I've been working for my own company, I've discovered that working from a single place gets pretty boring after a while. Actually, there are a few phases you go through, but suffice to say at some point you'll want to also work in coffee shops at least for the change of scenery.

Let's talk now about the gear I happen to use:


A Swissgear notebook backpack (Thanks Tora!)My 15" MacBook Pro (it has 4GB of RAM compared to the base model). I also happen to be selling it after I've seen the specs of the new ones. Then, a whole lot of other items I was a bit surprised to find when I unloaded the backpack yesterday to wash it:

Let's see (right to left):

My Orange 3G modem. I rarely need it while in Timisoara. While visiting my parent though it's almost useless since it goes over EDGE, meaning it's slower than dialup.  Handy as a last resort but I won't renew the subscription with Orange when it expires.My 8G iPod Touch, USB cable and iPhone hea…

iPhone OS notes

Apple news flooded the Internet during Easter. After having watched the iPhone OS 4 keynote I have a few remarks and questions. Feel free to comment if you have anything to clear up for me.

iAd

Jobs sells the penalty of clicking ads since that closes the app and launches Safari. But since he just introduced multitasking, this penalty is greatly reduced or non-existent. After all, if the user doesn't know how to return to the app after clicking an ad there is something really wrong with the multitasking user interface.

Push services

Things that make you go hmm: apparently Apple has a direct link to each iPhone via push services. I never used this API but I can't but wonder how does this thing really work (expecially via 3G-only).

Also, I assume that notifications aren't encrypted. That should be another data-mining opportunity for  Apple for iAd.

Wireless sync ?

iBooks bookmarks sync wirelessly. What does that mean ? Is there some Apple server that gets this data no matter wha…

Bread and circuses

Yesterday while zapping the TV shows I've observed what the true purpose of all the political talk shows and talk show hosts is: they are the modern day circus presided by a modern day jester.

For you see, the jester has a very important role: it diffuses the public negativity.

As a ruler or ruling party that also does questionable social or economical decisions you don't really want people on the streets. You don't want resentment to grow within people. So - the jester is actually something you need. Of course, they may sting a little but remember: sticks and stones...

The default NetBeans IDE java source template is polluting the web

People will never bother to do anything manual unless absolutely necessary. This is why I believe the current NetBeans "empty" java file template is fundamentally broken.

It tries to "teach" people how to change the template by inserting in the file header something like:

/*  * To change this template, choose Tools | Templates  * and open the template in the editor.  */
This might sound like a great idea in practice but it's broken since most people won't change it. So it just becomes line-noise that will get published, committed to VCS, etc.

A good UI would display that message differently, like a floating non-modal dialog, or some notification in the New File Wizard, but it shouldn't produce actual text that is part of the source code file.

Google seems to say about the same: there are 321.000 instances of files indexed by the search engine containing that header. And this is only on the public web, I bet there are many more closed-source code reposito…

Reading poetry is hard

I have this book with all the poems of a great Romanian poet, Nichita Stanescu and I've started reading about a poem every day.

I like his poems because they are very imaginative and visual in an unexpected way. I see them as surrealist descriptions, as if someone would put a Dali painting in words and add some more emotions to the mix. Of course, this is just how I see them, I never bothered to read the actual critics review of the poet.

The other day I was reading a nice poem called "Rain in the month of March"  ("Ploaie in luna lui Marte" in original). I can't find a proper translation but this is the first one a search returns.

Well, this poem also became the lyrics of a famous Romanian song by Paula Seling: listen it, it's quite nice.

Now, reading this poem made me realize two things.

First, I couldn't separate the song in my head from the poem. I couldn't read the poem, I was always hearing the tune of the song. The song taught me the only…

Nobody reads the fine print (for mobile widgets anyhow)

I've gotten used to skim the legalese things that you agree to upon any account creation, etc. You know, those things that have a textbox next to them and the submit button is disables until you check them.

Anyhow -- here is a nice piece from jil.org, a developer portal for mobile widgets. I used to do Konfabulator (now Yahoo) widgets long ago and I though I should see what's with these new "mobile" widgets. (The terms PDF is here ).
   7.  JIL’s right to use User Content
         1. With the exception of personal information, you hereby grant JIL a perpetual, unlimited, royalty-free, worldwide, non-exclusive, irrevocable, transferable license to run, display, copy, reproduce, publish, bundle, distribute, market, create derivative works of, adapt, translate, transmit, arrange, modify, sub-license, export, merge, transfer, loan, rent, lease, assign, share, outsource, host, make available to any person or otherwise use, any widgets or other content you provide on or thr…

OSGi has won

Although NetBeans' module system was on-par with OSGi, greater industrial support meant OSGi always looked like a better pick to outsiders.

Starting a while back I saw OSGi as the clear winner. Especially when Glassfish 3, an major Sun project picked OSGi instead of the NetBeans Module system, it was obvious OSGi was winning even inside Sun (although they were reluctant towards giving OSGi a too big stake in the upcoming Java 7 module system).

In the meantime NetBeans is getting native support to run OSGi bundles as well as getting ready to run inside an OSGi container.

Oracle wanted a common IDE extension API starting at least 2002 when they sumitted JSR 198.

Now, owning Java and NetBeans itself, they have it really easy to define the roadmap for both.

I estimate that NetBeans will be able to run inside an OSGi container by the end of 2010. We'll also see official NetBeans plugins distributed as OSGi bundles instead of NetBeans modules. In the end the NetBeans module system …

Slicehost as a build server

I'm using a Slicehost server for over an year now to host my build server and my slice seems to be getting slower.

Here is the graph for one of the projects:


The build initially took about 30 minutes, then I had a period where I jumped to about 70 minutes. This lag was entirely my unit-test and after some refactorings I took is down again to about 30 minutes, which is decent.

Now take a look at another project:


The difference is that the project took all long about 40 minutes, and now I have spikes of 3-4 hours !

What's the catch: well, the first project is taking so long during unit tests since I have a lot of GUI tests, where the code has to sleep and give the interface time to repaint, etc. So, although the time is 30 minutes, it's mostly waiting for the GUI (inside an Xvnc instance) to paint.

The second project though does a massive build where I just produce JARs and don't run any unit tests. It's massively IO-bound.

So, the way I see it, in the past 2 months…

Oracle and Java

Since using Google is faster compared to loading the saved Javadoc, I always read the JDK Javadoc online. There was something odd today - the favicon (what's a favicon?) looked a bit off: it's a red square with a white O in the middle.

Heading off to http://java.sun.com/ I see that the header is different. It says "ORACLE: Sun Developer Network (SDN)". So that's where the red favicon comes from !

Well, I guess it will take some getting used to. I don't really know anything about Oracle, but I really liked Sun's logo much more.

Linux: The last 10% will take another 10 years

Note: The blog post bellow was written on the 6th of December 2007, but I never published it. It seems to still be valid today and given that the laptop I'm talking about went dead and was sent for repairs last week (but most likely they won't be able to fix such an old model), I'm finally publishing it now as a remainder of what that little machine had to endure :-)



Everybody in the Linux world will tell you that Linux has GoodEnoughTM hardware support. Meaning of course that all the good stuff is missing but that your system is fairly functional.

Which is fine ! I mean, as a programmer why would I want to squeeze 100% of my machine ? We can always buy another one which will be even faster but, due to the "LackOfLinuxDriver compensating factor", will fell just like the old machine would have felt with proper drivers.

That is, bad hardware support makes you feel on today's hardware as if you are using a refurbished machine.

Ok, enough ranting. The reason I…

I wonder how much does AllegroGraph cost

Although I'm not a big RDF user, I did notice that some SPARQL queries take some time on my machine so I cannot but ask myself how much faster would it run using AllegroGraph ?

Franz Inc does provide a free edition that's limited on how many triples you may store so at some point it should be easy to run some benchmarks.

But -- how much would the AllegroGraph enterprise license really cost to get rid of the triples limitation ?

Like any company that is (or thinks it is) selling an expensive item, the price is not listed, all you are given is a phone number.

I wonder how many customers are they losing this way because people assume the product is way more expensive then it actually is. Because I won't pay 0.5 million dollars to get the enterprise license. Then again, what do I know, it might be 5 mil plus  :-)

Personal growth a purpose in itself ?

2 or 3 years ago I used to read some of an internet-famous person's blog posts. They were mostly economical and entrepreneurship related and I liked the way they were written.

Ever since, I stopped reading his blog since his personal growth "road" has taken him into some strange areas I don't really care to follow.

For example, there were some traces of some kind of mysticism, and then he decided he should separate from his wife, then try polyamory and this year he's going into BDSM !

I know the last part since I re-open once in a while his link to see if something interesting might pop-up. Imagine my surprise when I read his latest blog post...

Of course, it could also be some cultural blocks that deny me to see the "value" in what he's is trying to achieve, but I think at some point personal growth might be able to turn malign.

Humans aren't really built for infinite growth given the simple limitation that people die. So, it might be that tryi…

Go see Avatar

Yesterday I watched Avatar in a proper cinema with 3D glasses. The experience was almost surreal and while I had already read the book long ago, the adaptation was decent.

But really -- the 3D part of the movie is where all the magic is. Well worth the ticket price !

No such thing as a bad technology

The human race will adapt to the tools and technologies it has developed. That's why the cell phone companies for example just have to play a long term game and wait: in time fewer people will be sensitive to their cell phone radiation.

It's just another level in the "adapting to the environment" game. Even if this time the environment is man-made.