Much ado about scripting, Linux & Eclipse: card subject to change

2009-01-30

Do you wanna be open source?



I've got a plan to make code free and open,
Lucky for me, for you it's a cause you can join,
The world is slowly changing,
FLOSS is so contagious

Chorus
I'm willing to code my way to the top,
I wanna be o-pen source,
I don't wanna stick with vendor lock-in,
I wanna be open source

I must confess,
Lin's got too many distros,
Been sleepin around,
Talk of the town,
My name is...

E-clipseCon will beckon,
E-veryone will listen,
Play my vimeo
Check me out on ohloh,
Browsin' through the source, yo
No one ever says no

Chorus

I'm willing to code my way to the top,
I'm a contributor
I'll submit patches, write docs, and test stuff
Make me a committer

My friends... are all... sans Windows
My friends... they all... pronounce the 'g'

I just fixed a bug!

Play my vimeo
Check me out on ohloh,
Browsin' through the source, yo
no one ever says no

Chorus

I'll collaborate my way to the top,
I'm a beta-tester
I'll report problems and suggest features
Help to make better software

Freedom... comes when... the source is free
Freedom... thanks to... community

Play my vimeo, check me out on ohloh
I'm willing to code my way to the top
Browsin' through the source, yo, no one ever says no
I wanna be o-pen source
x2

Are you willing to code your way to the top?
Do you want to be o-pen source?

Darren Hayes - Popular

2009-01-29

HOWTO Create a Seam Web Project with JBoss Tools 2.0.0.CR2 or Developer Studio 3.0.0.CR2

As Max announced earlier today, JBoss Tools (JBT) 3.0.0.CR2 is now available.

In my continuing effort to automate - or at least document! - everything I do, here's a quick slideshow showing how to install and run JBoss Developer Studio (JBDS) 2.0.0.CR2 to quickly create a Seam Web Project. JBDS includes most of JBT, plus a few extra goodies.


view larger images

What else can you do with JBoss Developer Studio or JBoss Tools? Lots. Here's a list of the individual plugins, and the reference guides. There's even a jBPM/BPMN diagram editor, which I used recently to sketch out my Blackberry data sync flows:


click to enlarge

JBDS is available for Linux (gtk x86_32 and x86_64), Mac OS X (carbon), and Windows (32-bit). JBT is available for any platform that can run Eclipse 3.4.x. On Fedora, JBDS and JBT both run great with IcedTea (OpenJDK 6) and Fedora Eclipse 3.4.1.

If you're curious, the software involved here is: Virtual Box 2.1.0 running in Fedora 10, hosting a Windows XP Home guest, HyperSnap 6 to grab snapshots (works in Windows guest and through WINE - though not as well - in Linux host), Sun Java 6.0 to run JBDS (or Eclipse + JBoss Tools), Picasa 3 For Linux to crop, resize and upload images, then create the slideshow.

2009-01-27

EclipseCon 2009 T-shirt Design Contest, Part 7: The Envelope Please...

The winning design, by Yohanes Sandy:

Other notable entries.

2009-01-25

Capturing Screenshots Made Easy: Scripting With xfce4-screenshooter

Since moving to Fedora 10 and casting off my old ties to Kubuntu, I've been rather frustrated with the available options for capturing screenshots under Gnome.

I've tried the gnome-screenshot tool, docked as a panel applet, but it only allows me to capture the desktop or selected window. No click-and-drag region select?

When I've needed to capture only a part of my screen or overlapping windows (eg., Eclipse dialogs) I've been forced to capture the whole screen then crop it down w/ GIMP. Or, launch GIMP first and let it do the region capture - but GIMP never remembers my settings from last time, so to capture a region after a 2-second delay, it's 8 clicks every time I start GIMP. Lame.

In both cases, it's cumbersome, and I always have to select the directory where I want to save, and then name the file.

This weekend, I discovered xfce4-screenshooter, which is significantly better in that I can capture an area of the screen and auto-save to a file without needing to specify a filename each time.

It can even redirect the capture to an application or the clipboard rather than a file, and provides all the dialog options as commandline flags so it can be scripted, too.

So, now, I simply wrap that application with a bash script that runs the screenshooter then opens my snapshot folder with Thunar, so I can preview the result with Ristretto or edit it with GIMP if necessary. One click to start the process, one click-and-drag to create the image. And no unnecessary dialog configuration, file system browsing, or clicking!

Here's the scriptlet, which I've set up as a Gnome panel shortcut to run /home/nboldt/bin/snap.sh:

#!/bin/bash
/usr/bin/xfce4-screenshooter -s /home/nboldt/Screenshots/ -h -r && \
  thunar /home/nboldt/Screenshots/ &

And here's my desktop, captured with only 2 clicks:

One might argue that it's too bad that these three tools can't just be merged into one. I'd argue that it's great that if you don't like one tool, you can find two others, each incrementally better than the next. Screenshot integration in GIMP is very handy, as is automatic capture to file (with incremental file naming). And, unlike in the Windows and Mac worlds, if the best tool for the job isn't available for one window system, I can simply cherry pick from another.

Still, nothing beats the feature set and usability of HyperSnap, but that's sadly a closed-source Windows application, and far from free. Proving that in this world, ultimately, you get what you pay for -- but there are some excellent free & open source alternatives.

Delicious Wordle


My del.icio.us Wordle

2009-01-16

Branding is reality.


I've been saying this for years
-- Diesel Sweeties #2194
(c) R Stevens 2009. Used Without Permission.

2009-01-13

EclipseCon 2009 T-shirt Design Contest, Part 6: Choose Your Finalists

As you've probably heard, the Eclipse Foundation is holding a contest to select a new and improved committer t-shirt to give away at EclipseCon. Entries were submitted through bug 256495. Finalists will be chosen by a community vote and the winning shirt will be selected by the Eclipse Foundation.

Voting is open now through January 26, 2009.

Help us make the Eclipse community a better-dressed place by voting for your favourite(s) today!

2009-01-09

EclipseCon 2009 T-shirt Design Contest, Part 5: Submission Deadline Approaching

So, it's January. It's cold. Or at least colder, if you're in the south. Or warmer, if you're in the Southern Hemisphere. Anyway...

If you hibernate like I do when it's -10oC outside, this weekend is a perfect time to get in your submission(s) for the EclipseCon Committer Shirt Contest.

We've had lots of great submissions recently, my fave being this one - for obvious reasons - from kartben:


Neither shall you break the build

Deadline is 4pm GMT-5, Monday Jan 12. C'mon, GIMP Stars (not PimpStars), time's almost up!

2009-01-08

Division par zéro


Division par zéro

2009-01-06

Blackberry Linux Mail, Calendar, Tasks & Contact Sync, Part 2

Things have improved since my last post, despite the fact that I managed to kill Thunderbird along the way and lost a good chunk of today figuring out to restore it. Luckily I can read French, or I may never have found the solution to the elusive -203 problem.

Aside:

To recover from a corrupt Thunderbird profile, create a new profile using thunderbird -ProfileManager, then transfer your data to the new profile. Easy-peasy.

Next, reinstall all your extensions. I use these 15 extensions.

I've also managed to get barry to work for backing up my Blackberry on Fedora. Turns out the problem is that it simply needs root privileges.

Here's how the data flows, drawn with JBoss Tools' jBPM Graphical Process Designer:


click to enlarge

I don't yet have a solution for Zimbra contacts & calendar being accessible on the Blackberry, short of manually duplicating entries from one repo to the other. Still, 5 out of 7 data sources synched is pretty decent.

The EMF Bible, New Testament

As you may have heard last month from Ed, the book EMF: Eclipse Modeling Framework, 2nd Edition is out now. Order now and get free shipping and an online copy too.

warning label generator

2009-01-05

15 Thunderbird Must-Have Plugins

Here are my top 15 Thunderbird 2.0.0 productivity plugins. Except for the Funambol plugin, these are all available from addons.mozilla.org.

    Data Synch & Connectivity

  1. funambol-pim-plugin-linux-v0.8.xpi - synch contacts, notes, tasks, and calendar with my.funambol.com server. Then synch those with Blackberry or other smartphone device.
  2. lightning-0.9-tb-linux.xpi - enables integrated calendar(s) & tasks (local or IMAP)
  3. provider_for_google_calendar-0.5.1-tb+sb.xpi - provides Google Calendar support
  4. zindus-0.8.4-tb.xpi - sync address book with Zimbra and/or Google contacts

    Overall UI Tweaks

  5. additional_folders_view-0.2.3-tb.xpi - adds a second Mail Folders view to the mail perspective
  6. mark_all_read_button-0.2-tb.xpi - adds button to mark all messages in a folder read
  7. threadbubble-0.8-tb.xpi - resorts views by date when new messages arrive
  8. tag_toolbar-0.7.80-tb.xpi - toolbar for mouse- or key-based message tagging

    Key Bindings

  9. tag_toolbar-0.7.80-tb.xpi - toolbar for mouse- or key-based message tagging
  10. gmailui-0.6-tb.xpi - keyboard bindings for gmail (eg., y for archive, j/k for previous/next)
  11. nostalgy-0.2.16-tb.xpi - handy shortcuts for (G)o, (S)ave and (C)opy, to open a folder or move/copy message(s) to a folder
  12. threadkey-0.4-tb.xpi - adds toggle keys for show (un)sorted by thread
  13. headers_toggle-0.5.2.2-tb.xpi - using h key, toggle long headers, short headers, no headers on messages - great for newsgroup posts!

    Message View Tweaks

  14. headers_toggle-0.5.2.2-tb.xpi - using h key, toggle long headers, short headers, no headers on messages - great for newsgroup posts!
  15. quotecollapse-0.7-mz+tb.xpi - collapse quoted text to make messages show less
  16. header_scroll_extension-0.3.2-tb.xpi - scroll long message headers area
  17. show_fixed-width_temporarily-0.6-tb.xpi - temporarily show messages in fixed-width font

If you'd like a copy of all of the above, you can download all 3M of them here.

The Group Of Seven

Seven things about me, as inspired by Roy's tag:

  1. In just under 3 weeks I've become utterly obsessed with my Blackberry. My wife, who at first was apprehensive of hers (along with all new technology), has been using it non-stop as well. It's been a good text'mas. :)

  2. My wife and I live with two American Pointers, two horses*, three laptops, two smartphones, and many, many usb peripherals. The office is the warmest room in the house.

  3. My day job consists of maintaining and improving the build systems for JBoss Tools and JBoss Developer Studio. My night job involves numerous Eclipse projects, including Modeling and Dash. Basically, I hibernate in the winter in front of the computer.

  4. My parents - divorced - are of Jewish/American (dad) and German/Canadian (mom) decent. They've now been separated longer than they've been together. With the subprime mortgage crisis in the US, he recently moved back to Canada to seek more gainful employment. Unfortunately, he chose Calgary which isn't faring much better, now that gas prices are finally coming back down. My mom now lives in Scaborough near us, having returned from her self-imposed escape to Vancouver, and is more or less retired.

  5. I graduated from the University of Waterloo back in '99 with a BASc in Chemical Engineering, having spent the balance of my last two years learning about programming, workflow design, process control, and optimization. In retrospect, it seems I was always headed for release engineering.

  6. Much like Andi Gutmans, I too hate shaving... but as I work from home, I can get away with not doing so for days at stretch. I love my 30-second commute to work, which offsets my 8-to-10-hour workdays quite nicely. Why commute 2-plus-hours a day when you can use that time to get real work (or at least email) done? Thankfully, more and more companies are realizing this and are letting us work remotely.

  7. I try to find time - when not working or hacking - to walk my dogs, hike, cycle, kayak & swim: sometimes several in series. One favourite route involves cycling from my house to the beach at maximum speed, swimming in the lake to cool off, then portaging the bike up the side of Bellamy ravine and home. This past season I rode over 750KM and kayaked over 75KM, mostly in and around Toronto, Scarborough and Pickering.

So, then, here are 7 more in this chain, in no particular order...

  1. Opal Aristizabal, tech writer and Insight driver
  2. Jamie Callingham, one of the few teacher-types I know who actually has time to maintain a blog
  3. Alain Cloutier, graphic designer with a slightly insane blog, two great kids, and horse-addicted wife. He and I share a similar pain -- horsefolk are a special (wonderful) breed of crazy. :)
  4. Kenn Hussey, IBM ex-pat and blogger with great frequency, especially this past Blaugust.
  5. Wassim Melhem, overworked - but always well-dressed - project manager
  6. Julia Raphael Morgan, opera singer sans blog at the moment...
  7. Andrew Overholt, Linux evangelist and fellow cyclist

And here are the rules I'm supposed to pass on to the above bloggers:

  • Link your original tagger(s), and list these rules on your blog.
  • Share seven facts about yourself in the post - some random, some weird.
  • Tag seven people at the end of your post by leaving their names and the links to their blogs.
  • Let them know they've been tagged by leaving a comment on their blogs and/or Twitter.

* - The horses don't live with us, thankfully -- it's someone else's job to feed and muck them.

2009-01-03

Blackberry Linux Calendar & Contact Sync

Ugh, what a nightmare. Skip to solution. See also Part 2.


PocketMac for Blackberry, Linux Edition

Unfortunately, I missed the deadline to be a beta tester for this new app. Comes highly recommended by a Macolyte friend of mine; unfortunately until it's released I won't be able to come anywhere near it. :(

Blackberry Desktop Manager in VirtualBox

First, I tried to install Blackberry Desktop Manager into a VirtualBox 2.1 Win XP Home guest OS, running on xubuntu 8.04. Problem there was that OOTB the VB guest couldn't see my USB devices (ie., the mounted Blackberry). Solved [1], [2].

Unfortunately, while the Windows guest could see the Blackberry, it couldn't sync with it. I keep getting prompted for my password to enter "mass storage mode", then ultimately the backup failed, as the connection was dropped midway through.

Hoping that the story would be better on my newer x200 Thinkpad, I tried again -- same result. Additionally, though the VirtualBox Windows guest found my bluetooth adapter, I couldn't make it work under Windows to connect to the BB.


barry

I tried installing barry, the Blackberry Desktop For Linux project. I installed 0.14-4.fc10 and 0.14-6.fc11, but it didn't work - perhaps the Bold is too new?

(-1, error sending control message: Operation
not permitted): Probe: GetConfiguration failed

So, for now, the only way to backup/restore is via my wife's WinXP laptop.

UPDATE, 2009/01/05: Turns out you have to run barry w/ root privileges. I can now backup on linux. W00t!

But surely there's another way to sync?


OpenSync

Next, I tried OpenSync. This didn't work either. I tried 0.22 on xubuntu 8.04, with KitchenSync 0.1, but it couldn't connect to the device. Then I tried 0.36 on the x200 Fedora 10 box with msynctool, but it too couldn't connect to the device (even though I'd already paired the BB with the Thinkpad over bluetooth), perhaps because my settings were incorrect? Either way, both front ends left a lot to be desired for a total noob user. XML config files are fine, but better in-file documentation would be nice.
msynctool 
msynctool --listplugins
msynctool --addgroup BB
msynctool --enable-objtype BB syncml-obex-client
msynctool --addmember BB syncml-obex-client
msynctool --enable-objtype BB google-calendar
msynctool --addmember BB google-calendar
msynctool --enable-objtype BB file-sync
msynctool --addmember BB file-sync
msynctool --showgroup BB
msynctool --configure BB 1
msynctool --configure BB 2
msynctool --configure BB 3
msynctool --sync BB

... still failed to connect to device :(

Funambol

Then I discovered the Funambol web-based sync option, and signed up. This worked, and I now have my contacts and BB calendar synched with their server. OK, that's great, but what I really wanted was to sync w/ my desktop apps and/or with Google Calendar. So, I tried the Funambol Mozilla Plugin 0.8 for synching contacts and calendar with Sunbird 0.9 (or Thunderbird 2.0 with Lightning 0.9). It worked on my home xubuntu 8.04 machine (one email address, no calendars) but failed to install on my work Fedora 10 machine (two email addresses, two calendars, RSS feeds & newgroup subscriptions). Bummer.

UPDATE, 2009/01/05: My Thunderbird profile had been corrupted. Creating a new one, importing from the old one, and reinstalling all extensions fixed this problem. But because I can use Google Sync for Contacts and Calendar, I'm only using Funambol for Tasks now. Details here.


Google Sync

Finally, checking my Google Calendar online I noticed a new "Sync" link in the top right. I found that Google has released an early Xmas present: Google Sync for your BlackBerry. Finally, a solution!

BBToday

If you would like to have a snapshot of your mail, calendar, tasks, calls and optionally, battery status & weather in one convenient portal page, try BBToday 1.6.


Captured with CaptureIt

UPDATE, 2009/01/29: I've found a better Today screen, but it's not free. BOLD CrossBar Plus Xtreme - BOLD OS 4.6 by JC Designs / Gadgetbean. Combine this with WeatherEye from The Weather Network, and you've got weather, mail, messages, calendar... all on one attractive screen! Best. Seven Bucks. Ever.

Continued in Part 2...

2009-01-02

ext3 vs. fat32: fsck benchmark

It's been ages since I fsck'd my two Western Digital MyBook USB drives. I was amazed just how much longer it takes to check fat32 drives compared to ext3 ones. sdb is a 250G drive; sdc is a 320G drive. Both contain a mix of file types and sizes, and both have two partitions - one fat32, one ext3. My original reason for this split was that at the time I was dual-booting Windows/Linux, and support for writing to NTFS in Linux and to ext3 from Windows was at the time less that optimal. My next drive will be ext3, or perhaps something even newer (ext4? reiserfs?).

Here's the data from this semi-scientific comparison, which says that ext3 is faster by at least an order of magnitude:

Partition, Type Fsck Time (hour) Free Space (G) Used Space (%) Used Space (G) Size (G)
sdc1, fat32 43.1 22 87 138 159
sdb1, fat32 10.9 4.7 89 35 40






sdb2, ext3 2.2 6.8 97 171 188
sdc3, ext3 0.9 17 88 115 138

And here's the `fsck` & `df -h` output:

/dev/sdb1: 40G 35G 4.7G 89%
/dev/sdb1: 18367 files, 4567286/5181919 clusters
Elapsed: 10.9 hours
/dev/sdc1: 159G 138G 22G 87%
/dev/sdc1: 1032 files, 8992148/10370914 clusters
Elapsed: 43.1 hours
/dev/sdb2: 188G 171G 6.8G 97%
/dev/sdb2: 223588/50692096 files (2.4% non-contiguous), 46338930/50675034 blocks
Elapsed: 2.2 hours
/dev/sdc3: 138G 115G 17G 88%
/dev/sdc3: 8946/18333696 files (29.8% non-contiguous), 30330767/36638240 blocks
Elapsed: 0.9 hours

Blackberry Bold + MidpSSH + Mutt = Mail Over VPN

Got a new Blackberry Bold 9000 for Xmas. Typical of Rogers, I was overcharged for it, and all the freebies I had quoted to me on the phone have yet to arrive. I'm told I'll be credited back the surcharge, but I won't see that until February.

Anyway, customer service infractions aside, setting up Gmail, TwitterBerry, Facebook, Google Talk, Windows Live Messenger, Yahoo! Messenger, and of course Blackberry Messenger was a snap. Tried to use the internal mail client for Gmail but it doesn't respect my filters so I get the flashing light notification for every bit of spam, rather than just the interesting mail I want to see.

Setting up IRC was a little tricky, but thanks to Opera Mini and mibbit.com, I can more or less check Freenode channels on the go. Not ideal, but tolerable.

But the real challenge was getting access to my corporate mail, since we're not running a BES server, and thanks to all the supported options, there are over 5,000 possible ways to configure Cisco VPN access on a Blackberry. I'm not that patient.

Instead, I decided to try using MidpSSH 1.7.3 to connect into my laptop (which is already connected to the VPN), then use Mutt 1.5.18 to connect over IMAP to the mail server. Because I'm connecting to a local IP within my home LAN, I set the SSH session's Connection Type to WiFi, rather than Default, BES, or TCP/IP. In order to avoid having to key in a password every time I connect to the laptop, I set up an SSH key and shared that with my laptop.

If I want to have this solution work when I'm not at home, I'll have to expose my laptop to the outside world, and connect using Connection Type = Default to that public IP address instead of my more secure internal one. Still, it's a step in the right direction.

Incidentally, this tip might help, if you're having network access problems:

Options > Advanced Options > TCP > APN: "internet.com" (no username or password) [1], [2]

Now I just have to teach myself all the keyboard commands for Mutt. I tried using MidpSSH on my previous phone, a SonyEricsson W810i, but it's nearly impossible to do anything without a full keyboard.

If you're thinking of doing something like this, here are some handy links for setting up Mutt to connect to IMAP and to send mail via SMTP.

Is there a better way to VPN over BIS for IMAP mail? If so, feel free to share your solution here or via email with nickboldt(at)rogers(dot)blackberry(dot)net.

Clarifying Our All-In-Ones

In order to make it clearer what's in the various flavours of all-in-one zips provided in Modeling, GEF, and PDT, I've concocted some new icons to better differentiate them.

This is actually moving in the opposite direction from what I'd proposed in bug 240223 regarding Simplified EMF Downloads as we're now providing more, not less... but IMHO that's okay as long as the community is well served. If you have an opinion on update site vs. update zips vs. SDK zips vs. EPP bundles, please feel free to weigh in on bug 240223.

And if you hate the new icons, please let me know. Better still, design me a replacement. Thanks to iconeden.com for the source pixels.