Skip to content

Eclipse Remote File Synchronization Plugins

I was talking to a friend about Eclipse and he was saying that one of the things keeping him from using Eclipse was the lack of a ssh synchronization plugin (so that he could edit locally and deploy to a remote server, a typical web application setup). I typically use CVS for that purpose, but sometimes it’s overkill.

I took it upon myself to find one, because I think it’d be useful too. I found a few (all open source):

Sftp Plugin: Not updated since 2003, didn’t work in Eclipse 3.2.1. CPL Licensed. Seemed like it had the nicest interface.

Deployer: Works, but only deployed one file at a time (that I could see). Not released since 2005. LGPL.

DeployerFTP: Looked to be FTP only (according to the documentation), released in 2006.

And finally, one that worked for me: Esftp. Last released in 2006, but works with Eclipse 3.2.1. LGPL 2.1. Weird install procedure (but if you read the README.txt in the distribution, it makes sense) so make sure to read the installation instructions.

Some of these were listed in the Eclipse Plugins directory, but others weren’t. Caveat emptor.

[tags]eclipse plugins[/tags]

Using Excel to ease Java i18n processes

Ah, the perils of reading Bloglines before going to sleep. (I’ll just catch up on one more blog…)
I gave a BJUG talk 18 months ago about large websites and internationalization (i18n). (Links and powerpoint here.) The talk was based on my experiences of a smooth operation, created and executed by Zia Consulting.

A crucial part of this i18n process was creating and moving around Excel files containing keys and translations. In addition, there was an Access database and a VB script that converted the keys and translations to properties files. The reason to do this is that the typical Java developer wants to use ResourceBundles for i18n, which typically involves properties files. And the typical translator is much more comfortable with Excel. So, Zia built a process which bridged that gap.

It looks like someone else solved the same problem with translators and Excel files, and open sourced the solution.

Via Rickard.

Updated 2/16, fixed typo and a small formatting change.

[tags]i18n,excelbundle[/tags]

Thunderbird tip of the day: Using the pipe operator in the search box.

If you’re searching in Thunderbird, use the pipe (|) operator to do an ‘or’ search. So, if you want to find mail from both Brian and Grady, search for ‘brian|grady’ (if you have the default ‘search subject and/or sender’ search criteria). I looked around the Thunderbird Help, which has a helpful list of shortcuts and tips and tricks, and didn’t see this tip mentioned. I tried other special characters (& and *), but neither worked.

This was with Thunderbird 1.5.0.9.

February Boulder Denver New Tech Meetup Notes

I went to the Boulder Denver New Tech meetup tonight and, boy was it a good time. I’ve been to a few Boulder Java Users Groups, and some more academic talks at CU, but this was different than both. At the BJUGs, it’s typically a bunch of geeks and a very technical topic. At the CU colloquia, it’s an academic crowd, with a lot of focus on academic questions, and an even more technical topic.This meetup, on the other hand, had, I felt, a nice mixture of technical folks and business folks. This was the sixth one held in Boulder–for more information check out their website. I believe the format is 5 minutes of presentation followed by questions eliminates a lot of fluff. The presenters tonight were:

* David Cohen: www.techstars.org

David talked about his new organization, which recently was in the local press. Techstars.org will select 10 teams with technology ideas and fund them for a summer (to the tune of $15k). During that time, they’ll be mentored by a wide variety of successful local entrepreneurs and, at the end, have a chance to pitch their idea to angel investors. The strength of the team will be a large factor in determining the winners, and applications are due on March 31 (they’ve already had over 100 teams apply).

* Russ Bryant: GoUrban.net

Russ talked about the website his company is building, which focuses on the urban lifestyle demographic (he mentioned blacks and latinos in particular). It’s particularly aimed a segment of the population that has bad or no credit, and a large part of the business plan depends on selling prepaid debit cards to that population. Such a debit card will allow users to participate in internet purchasing, as well as gain the other benefits of debit cards (users can charge up the cards at stores around the country). GoUrban.net will also be a drop ship ecommerce site, and has a long list of partnerships.

* Elliot Turner: Orchestr8.net

Elliot focused on mashups for the ordinary user. His application, Alchemy Point, is a Firefox toolbar that aims to provide some of the functionality of GreaseMonkey, but for normal users. He mentioned that mashups are a great way to create a user centric web, by allowing users to grab only what is interesting to them (as opposed to most websites, which have a distinctly larger audience). The toolbar comes with a number of preconfigured mashups (‘make this text bold’, ‘put a map next to this address’) that have been written by his company. Users also have the capability, with a simple XML syntax (with a graphical UI yet to come), to create their own, and to share them.

* Dennis Yu: www.thesocialcorp.com

Dennis talked about search engine marketing, which is the business of building campaigns on the major search engine sites. He said a campaign consists of keyword + ad copy + bid for the keyword. He showed an example of a campaign his company built for a New Year’s Eve ticket seller and said for every 9 cents the company spent on SEM, they got one dollar in sales. He also mentioned that there are a ton of MFA (made for AdSense) sites out there, and as an advertiser, you need to be aware of sites sending you worthless referrals and block them as soon as possible, as the click fraud happening is tremendous. Oh yeah, they’re also looking to help nonprofits use SEM.

* Fernando Cardenas: appventure.com

Fernando discussed the application his company is building to combat software failure. First, the cost of software failure is $60 billion a year, and 25% of all software projects are just plain abandoned. The reason for that is the disconnect between the developers and business folks. His solution is to put better tools in the hands of business folks, and have the tools create a set of business rules and a UI that the business people are happy with. Then, with the app 60-80% done, the business users can hand it off to the developers for fine tuning. I’m a bit skeptical, because I think there’s no silver bullet and the hard parts of any development conversation are the grinding out of requirements. Plus, I’ve seen one too many scary Access applications (and built a scary Paradox application myself)–not sure how the maintainability of the code generated by the tool will be. But I hope that his application succeeds as there’s a ton of places where simple applications could save a lot of scutwork. Thingamy is in the same space, I think.

All in all it was quite a nice night, and well worth attending. A lot of exciting energy in the air–it reminded me a bit of 1999 (I even saw a fellow with a Netscape fleece on!).

MolhadoRef: A refactoring-aware version control system

This past Thursday, I went to one of the CU Comp Sci Colloquia. The speaker was Danny Dig, and he discussed Refactoring-Aware Software Merging and Version Control for Object-Oriented Programs, in particular, MolhadoRef. Mr Dig billed this several times as the first refactoring aware source control system ‘that we are aware of’.

Being relatively new to IDEs in general and Eclipse in particular, I find that the automatic refactoring is one of the largest productivity enhancements that I’ve discovered. The ability to almost effortlessly change a variable name to more accurately reflect its purpose, and to know that such a change will propagate everywhere it is used, lets you update variable names more often. I was recently editing a piece of PHP code and one of the variables had changed slightly in purpose. I could have done a search and replace, but I wouldn’t be positive that the changes hadn’t broken something subtle. With Eclipse, there’s no such hesitation.

This is almost worth the cost of having to use the mouse and not being able to use vi keystrokes (at least, without the vi plugin). But when you throw in the other refactorings, including move method and rename method, well, refactoring becomes invaluable.

What follows are my notes from the talk.

Mr Dig discussed how refactoring is becoming more prevalent in todays development environments, and how this is challenging text based version control systems such as CVS and SVN. The main issues are that refactoring causes global changes, while version control systems excel at tracking local changes. In addition, refactoring impacts program elements, while version control systems focus on files. In short, refactorings are more likely than normal edits to create conflicts and/or merge errors–due to refactoring tools, changes are regularly no longer limited to files.

In addition, when you move members between classes, you can lose version history–the only connection back to the original location is a commit comment, which is neither dependable nor robust.

MolhadoRef aims to change this, by making the version control system become refactoring aware. Currently MolhadoRef exists in ‘research project’ form as an Eclipse plugin, and is part of Mr Dig’s PhD thesis work. (By ‘research form’, I think he means not ready for prime time. For example, in his demo, when you checked changes in, there was no support for a commit message.) There are plans to release it as an open source project, but it is currently not so available. MolhadoRef is based on Molhado, which is an SCM system with support for OO software, on the backend, and Eclipse and a refactoring engine on the front end.

Basically, MolhadoRef can handle API level merging, where ‘API level’ means any member declarations. It also supports normal text edits in the same manner as CVS or SVN. It also tracks compile time as well as runtime merge conflicts.

On checkin, it follows the following algorithm:

  1. Detect API change operations, using a 3 way comparison. They are also tracked with tools such as Catchup or RefactoringCrawler
  2. Detect and resolve conflicts. It attempts to do so in an automated fashion, but sometimes requires user input.
  3. Undo refactorings. Sometimes this is not entirely possible, but if it fails, MolhadoRef is intelligent enough to fall back to a text merge.
  4. Merge text changes. This happens on a method level, not on a file level.
  5. Replay refactorings. This can be hard, because you need to serialize what may have been two parallel series of refactorings. He went into some things I didn’t understand right here, including using graph theory to reorder the refactoring, or making a refactoring into an enhanced refactoring (which not only changes code, but future refactorings in the chain).

Mr Dig conducted a case study and an experiment to prove the effectiveness of MolhadoRef. In the case study, he and a partner developed MolhadoRef separately for 3 weeks, and then merged the changes using both MolhadoRef and CVS. With 1267 lines of changed code, CVS had 36 conflicts, 41 compile errors, 7 runtime errors (determined by unit test coverage), and it took 105 minutes (including human time) to merge the two trees. In contrast, MolhadoRef had 1 conflict, 0 compile and runtime errors, and it took 1 minute to merge. Pretty impressive.

The experiment was to split 10 students (fairly experienced with Eclipse and java) into two groups. Each group had a common task. At the end, the changes made by each person in the first group were merged with the changes made by each person in the second group, producing 25 merge sessions. Using these episodes, using MolhadoRef led to 3.6 times fewer conflicts, 11.6 times fewer compiler errors, and 1.5 fewer runtime errors. In addition, the time to merge was 3.5 times faster with MolhadoRef.

The larger picture that Mr Dig is pursuing is to perform automated upgrades of component based applications (pdf). If you’ve ever upgraded from one version of a java web framework to another, you’ll know how painful it can be, especially if the API has changed. According to Mr Dig, 80% of the API changes in 5 projects he’s examined so far (4 open source, 1 proprietary) were due to refactorings. He told us why MolhadoRef fits into this picture, but I didn’t note it. Bummer.

He did say that both Microsoft and IBM were interested in his work. He also mentioned, I think, that Eclipse has already accepted some of his refactoring code.

/Notes

What does that mean for us developers who don’t use build version control systems? well, not much right now, but if some of the bigger providers start to use this, it means that bigger, longer lived projects can be better managed; that code history won’t be lost as often, and that merge conflicts will decrease in severity and number. I for one can’t wait for that day.

[tags]refactoring, version control systems[/tags]

Initialize your GWT widgets

I’m a big fan of using GWT to increase web application usability in an incremental fashion. It may be fine to use GWT to build a whole-blown application, but I’ve never done that. When you go the widget approach, often you want to configure the widget, perhaps based on the page it is on. Kevin Jansz talks about how to give a GWT module init params (very much like init-param elements in web.xml). He suggests using the Dictionary class, which is in the i18n module. For a sweet example (that is not even related to i18n), read the Dictionary doc linked to above.There are some caveats. From the aforementioned documentation:

…the Dictionary class is fully dynamic. As a result, a variety of error conditions (particularly those involving key mismatches) cannot be caught until runtime. Similarly, the GWT compiler is unable discard unused dictionary values since the structure cannot be statically analyzed.

To me, using a Dictionary is a better way of getting configuration information from a host page than what I’ve done in the past: write a value to a hidden span and use the DOM GWT class to access it. Much clearer and no unneeded DOM elements. In fact, if you wanted to get fancy, you could generate the javascript object properties dynamically (this is conjecture, I’ve not tested this).

Nice find Kevin!

Is the tech contractor to salaried employee ratio a sign of the tech business cycle?

Nat Torkington seems to think so: “…when the clever contractors head for salaried positions then bad times are coming.” (The last paragraph is cut off due to an HTML error, but basically asks if a shortage of engineering talent affects this indicator in one way or another.)

It is a complicated problem because there are a lot of other factors influencing whether being a contractor or an employee is a better fit for a person’s situation: need for income stability, contacts in the industry, demand for a given skill set, even preference for new situations. Even so, it’d be interesting to look back and see what the ratio was over the last, say, 20 years.

I took a look at the BLS web site, but couldn’t find any reports delineating contract employees and salaried employees.
Via Infectious Greed.

[tags]contracting, business cycle indicators[/tags]

Article on information security

This article views the software insecurity problem from an economics perspective. Makes sense to me, except he totally ignores the other costs that come along with liability–lawyers, lost productivity, insurance costs. However, these costs seem reasonable. I have a friend who is a general contractor and builds houses. He was astonished to find that computer consultants don’t have to carry liability insurance. Perhaps it’s time for that.

[tags]security, software liability[/tags]