Ant, IntelliJ, and Eclipse

And it’s way in the future and here we are again arguing about which IDE is better: IntelliJ or Eclipse.  It never goes away.  And NetBeans is still the choice of newbs, and gets cast aside for enterprise work.  Personally I never look at it so it’s not in this discussion.  We are talking PRACTICE.

I use IntelliJ quite a bit.  I have to admit I do like the UX and the search is fabtastic.  Many would say that IntelliJ takes over those mundane low level things so you can code.  However I use IntelliJ more like a fancy task editor with terminal operations on the side.

I also use Eclipse.  I have to admit I like the way Eclipse integrates with very well with command line tools, servers, testing and it’s handling of class navigation.  In fact for many of the Java-specific tasks I would say I definitely prefer Eclipse.  And what is wrong with low-level control over code?  Nothing for a more guts-n-girder coder such as myself.

There is a social aspect I do not like about IntelliJ.  It crosses into an irrational  “Macs are the best” type of mentality.  This type of view skews the fact that there isn’t really a great tool and I like teams that have people doing any kind of tool so your project does not get strapped to the IDE.

Eclipse, with all it’s plugins, and workspace mechanic, test integrations — it can become a taskmaster making your life too much of a compliance hell.  I’ve seen whole projects strapped to Eclipse; in fact I think it lends itself more than IntelliJ to this due to *choices* — lots of choices.  Its roots with WebSphere are a testimony to this project dependency-ism.  I find it a little easier to exercise restraint in IntelliJ than Eclipse — probably due to the mundane management differences.

Recently working on some ant on a project I was new to, I was switching back and forth IDEs to decide what I’d like.  The project was ANT build based and I had to merge two huge branches.  A nasty merge.  So I used SourceTree/command line git as I usually do.

I resolved my conflicts in IntelliJ.  It was better.

I did my builds and ant management from Eclipse.  It was better.

Then after my first round of roughly 70 files merged I came back to do some optimization.  During that I decided to optimize the imports, and for kicks used IntelliJ (usually I use Eclipse for code quality).

IntelliJ messed up the imports.  It decided to take some of the necessary dependencies out . . . and broke my build. I went back to Eclipse to resolve these issues and decided to write this blog piece up; and here you are, one of the subtle issues between the IDEs; in this case Eclipse gets the nod.  (Also for import optimization — Eclipse didn’t mess it up.)

For this file, IntelliJ removed the IOException import directive.  I did an ant build, and you’ll notice a few things:

  1. The error in the code is not underlined.
  2. The ant output is not hyperlinked.
  3. If I want to fix the code there is no convenient highlight-and-fix.

View of erring class in IntelliJ with ant build output.

Now let’s compare this to the view of the same thing in Eclipse:

  1. The error in the code is underlined.
  2. The ant output is hyperlinked.
  3. If I want to fix the code there is a convenient highlight-and-fix.

View of erring class in Eclipse with ant build output.


Convenient highlight-and-fix in Eclipse.

So that really sums it up for me in this use case: Eclipse has better class navigation, class resolution and class tooling when doing these command line and refactor type tasks.  I find it a bit disturbing that IntelliJ removed this import during its optimization operation; but I keep learning not to trust my tools completely.

I will continue to use both IDEs of course.  Each has their merit.

Git Tags Local And Remote: Be. Careful.

If you are a daily developer like me, but not a release manager, getting called on to do release activities can be a frustrating thing.  One of those things can be believing your tool’s view.

Be careful – if you’ve updated your git tags – local SourceTree will show git tags at a spot that is not the same place as bitbucket if you do not do a discrete push to remove the tag first.

I learned this when I had tagged a release, but then two changes came in before we actually did the production deployment and it was requested that I move the tag before we deployed.  The moved tag was to be the build devops would pull.

So here’s how it went . . . (general scenario):

  • Code spot from our develop branch to merge into release branch at checkin #171.
  • Tag the code v4.5.0

To do this was relatively easy, using either SourceTree or command line:

$ git tag v4.5.0
$ git push

Then list them

$ git tag

Now we had a build.  But wait — the two changes came in:

  • checkin #170 to be reverted
  • checkin #172 hotfix due to something QA found

Now don’t ask me why in this process we jusst didn’t wait, but, some places follow this process. (The old days we build an artifact, these days on most systems we tag the repo and build, build, build).

The request comes in — move the tag past these changes!

So I merge these particular fixes into our release branch.  And the request to move the tag comes in; sounds simple enough.

$ git tag -d v4.5.0
$ git tag v4.5.0
$ git push

Bow SourceTree is reporting on BOTH REMOTE AND LOCAL release instances that the tag has been moved but you know what? When I go and look out on Bitbucket I see:

checkin #172
checkin revert #170
checkin #171 v4.5.6 

Right. The tag didn’t move!  Notably, the gui was *probably* reporting an interesting error about the tag already existing but I did a command line push, and the branches looked tagged properly.  However I forgot to do one thing — push the delete first, then retag, then push again.

$ git tag -d v4.5.0
$ git push
$ git tag v4.5.0
$ git push

Now Bitbucket shows this, correctly:

checkin #172 v4.5.0
checkin revert #170
checkin #171 


  1. Don’t believe your GUI tool — always check the target repo to make sure.
  2. There may be errors being reported by your gui — take them seriously and fix them.
  3. Get another developer eyes on it just to make sure.
  4. If you do not do this regularly — as many of us do not — be very very meticulous and be very atomic.

Git tags are an interesting beast. They are very flexible. And are subject to not obeying compound changes (delete, recreate) in a single action so be careful.

Further Reading

Agile . . . Ceremonies


After the Agile Ceremony there will be sheet cake and Diet Coke!
And . . . your macaroni art is due Tuesday.


Yes ceremony.  I really hate it when that term is used, it implies that an agile meeting is of a level of importance equal to the big things in life.  NO IT IS NOT.  This is just code.

This definition is from Atlassian:

Meetings, or “ceremonies” are an important part of agile development. But they are one of many important elements, and shouldn’t be conducted in a vacuum. (It’s tempting to add some ceremonies to a waterfall project and call it “agile”, but this will get you nowhere.)

Let’s take a look at each of the agile ceremonies, and understand how they empower the team and drive agile development.

Note: A number of these ceremonies come from the practice of scrum which is an iterative, time-boxed approach to implementing agile. The concepts behind these ceremonies can be applied to other forms of agile like kanban or lean. “Sprint” is a scrum-specific term. Other forms of agile use the more generic term “iteration” to indicate a time-boxed period of development.

That’s one definition.

The content you are trying to access is only available to members. Sorry.

Tooling for localstorage

Localstorage is a newer way to store data locally in a browser, kind of like a cookie.  It is supposed to have a much easier interface than cookies and can do JSON.  Another developer I know was using this and she was using localstorage to track local data  for some dynamic web interactions.  Nothing will get sent back to the server — you’d still have to use cookies for that (example – a JSESSIONID).  But considering that much of the javascript I’ve written in my life was managing browser data by doing “single page websites” or passing form data with hidden fields back and forth, or passing data via query parameters — the localstorage idea is very compelling.

I did a little searching and this succinct post on HTML Dog has a nice example.

My interest for this post is in the tooling around localstorage.

What I want to do is create a localstorage entry and then see it in a tool like Firebug or a web development tool much like a cookie.  I’ve chosen Firefox built in web developer tools for now.

First, I have to create some localstorage.  I navigate to this blog site and open up Firefox’s  developer and toggle the toolbar

Screen Shot 2016-06-16 at 2.01.43 PM

Click on the Toolbox Options and then check Storage.

Screen Shot 2016-06-16 at 2.03.20 PM

Create a localstorage value, I’ll just use HTML Dog’s JSON Example, and include a println to show I can try out the setter/getter functionality.

localStorage.setItem('user', JSON.stringify({
    username: 'htmldog',
    api_key: 'abc123xyz789'
var user = JSON.parse(localStorage.getItem('user'));

Execute it in the console of the developer’s tool.

Screen Shot 2016-06-16 at 2.14.28 PMAnd after.

Screen Shot 2016-06-16 at 2.16.06 PMWe received the data back correctly for “user” object . . .


Look in Storage.  Wow!  that’s a lot of cookies.

Screen Shot 2016-06-16 at 2.19.19 PM

And here is the localstorage data for “user”:

Screen Shot 2016-06-16 at 2.20.30 PMYou probably see the other two storage entries:

  • IndexedDB is a low-level API for client-side storage of significant amounts of structured data, including files/blobs.
  • Session Storage  – The sessionStorage property allows you to access a session Storage object. sessionStorage is similar to Window.localStorage, the only difference is while data stored in localStorage has no expiration set, data stored in sessionStorage gets cleared when the page session ends.

Persistence differences! Well that’s really good to know about local vs session.  Browser support as of this date:

Screen Shot 2016-06-16 at 2.24.55 PM

Disk Solutions 2016

My brother is a teacher and he sent me a text and a pic of a broken 500gb external drive he uses for simple backups.  He was asking the questions a lot of us are asking these days: how to store all of our data, short term/accessible and long term.

When I think about the question, for me, the big issues are:

  • Accessibility — slow or fast, always up, bandwidth, how do you get the data there/back, reliability
  • Security — safe from hacking/encrypted?
  • Cost — the balance between a local drive vs. cloud storage
  • Reliability — local drives break, clouds can break even more disastrously but less often (this just happened at work to our Azure firewall servers
  • Interaction — will you use it for time machine/real time backups? As an extended drive, media streaming etc?

Here is my reply as a developer:

I use a few solutions and its not there yet.  It’s complicated for me because of my needs.

Google Drive and DropBox; I use these for all my local daily stuff — up to date bills/finance, scanning (my scanner goes directly to google), sharing.  Both dropbox and google require local cache/storage. I might be storing 10 gigs max on these — also I have accounts on a few others (i.e. that server I uploaded business vids on).  I don’t do big storage on these because network isn’t there — its slow — THEY are slow.  Even over cable.  These services like them or Carbonite recommend sending in large data drives.  With 500 gb you probably could just put it up there yourself.

I have a lot of data.  I have two NAS servers, and old on that had a total of 3 TB accessible (6 terrabytes of drives raid 1 mirroring over 4 drives) — this device is 10 years old so bought a new one:.   5 TBs mirrored (10 tb total) on two drives.  I use these for long term storage and media streaming.   I have all of my extensive music collection, my movies, and digital photos, finances, important docs all digitized dating back to the late 1990’s.  Total data I actually have is probably about 3 tb but will grow with photos/media.  I also have old software libraries and work files, that take up a ton of space.  Will probably archive these on old external drives and dump over time. The data is too large to stream up and back at times for today’s services.

I keep several old hard drives around, enclosures and cables. These are good for small tasks — bare metal backups, moving larger files between work/home ‘puter; you just never know. For the 5 TB raided NAS I have a matching external drive I backup to.  Mirroring isn’t a total backup because rive errors get propogated; the other I keep in a fire case.  Also I have acronis that I keep live on my Win machine that backs up in real time when the NAS are on, automatically.  A licence is super cheap.

You can probably pop out that drive and buy new enclosure or a mutli-drive cable, I have one something like this for a while — good in a pinch, not for travel though:

But, with that much data (which isn’t too much), I would look at cloud storage (Google, Drop Box) — check the costs.  Still not cost effective enough for me.  Also, have to be aware of security — are your files password protected?  Check the services, many differ.

Also you’d have to check how you interact with the service.  Needing files/service all the time different than “backup”/intermittent use.  In which case, a google/dropbox for daily and a long term backup – Carbonite etc. — good idea.

What do we all want?  Terabytes of secure space accessible in real time on the cloud.  It’s just not there yet . . . or at least not at a good price.

OSX- Relocate your applications bar on multiple monitors

Here’s a trick.  To relocate your applications bar on multiple monitors just move your mouse to the middle of the screen of whichever monitor you are using and then stright to the bottom.  BAM.  App bar.

This drove me crazy for a while and I’d use the System settings in a kluge, embarrassing way to do this thinking it was a non-Mac monitor problem; but it’s actually a feature.

Playing The Planning Poker King

Oh Estimate my Estimate!

“KEATING:  . . . Now, we all have a great need for acceptance. But you must trust that your beliefs are unique, your own, even though others may think them odd or unpopular, even though the herd may go, “That’s baaaaad.” Robert Frost said, “Two roads diverged in a wood and I, I took the one less traveled by, and that has made all the difference.” Now, I want you to find your own walk right now. Your own way of striding, pacing. Any direction. Anything you want. Whether it’s proud, whether it’s silly, anything. Gentlemen, the courtyard is yours.

The students begin walking about, some walking casually, others making up silly walks. Keating notices that Charlie is still leaning up against one of the pillars.

KEATING: You don’t have to perform. Just make it for yourself. Mr. Dalton? You be joining us?

CHARLIE: Exercising the right not to walk.

KEATING: Thank you, Mr. Dalton. You just illustrated the point. Swim against the stream.”

-Dead Poets Society

The content you are trying to access is only available to members. Sorry.

The Modern Agile Manifesto

Changing Memory for IntelliJ On OSX

I noticed my package scans were really slow in IntelliJ when starting/stopping my J2EE engines.  Real slow.  So I upped the memory and it helped a great deal.

This was done for IntelliJ 15 Community Edition on OSX El Capitan (10.11.3).

  • First, close IntelliJ of course.
  • Right click the application and choose “Show Package Contents.”

  • Open the file “idea.vmoptions” (I used TextWrangler).

  • Update your settings and save.

Two Year Anniversary for Code I Never Use

This hearkens to those Joel Spolsky code-tests — Tower of Annoy, Code Rolfing, etc.  And I was looking back in my posted articles and realized I had just passed a two-year anniversary for one of the strangest interviews I had ever done in my life which also involved a test on code I have never used before nor used since the interview.

The content you are trying to access is only available to members. Sorry.