Monday, October 15, 2012

Women in IT


I have come to appreciate the unique perspective each of us brings to the job.  By "perspective" I am going beyond technical skills and programming acumen.  It is that intangible quality that determines our design decisions, the thought process that directs our problem-solving strategy, that dictates how we communicate with our team. 

I feel that unique secret sauce that makes us who we are is involuntarily seeded by our gender.  To get a full breadth of capabilities I think it best if projects have both men and women.  The most successful projects in which I have been involved included a mix of men and women.  I don't think it is simply a coincidence.  I know that it is a key reason for the project's success.  It is therefore regrettable that there aren't more women in our line of work.

I came across a thought-provoking blog post by Ted Neward on this very subject.  In case you aren't familiar with Ted, he is an outstanding technologist.  I got to know Ted back when I used to speak on the NoFluffJustStuff tour.  The thing about Ted is that not only does he have impeccable technical credentials (Java, .net, Android, etc etc) he is not shy to share his opinion.  His presentations are quite an experience -- just be prepared for a side-bar or two on unrelated topics :-)

Here's hoping more women join the IT workforce.

Saturday, January 29, 2011

Can't Git enough

Couple of weeks ago I attended the January offering of GitHub's online Git class taught by Matthew McCullough. I had been using Git for a little over a month and was starting to plateau off. I grokked the basics (at least so I thought) and stayed within the lines. The timing of the course was perfect for me. It helped solidify some concepts, explain the git idiom and presented several aha! moments. It was the kind of course that leaves you energized and exhausted at the same time. Energized because you learned something that you could apply immediately (like during the lunch break :-) and exhausted because you were facing a fire-hose of information for 7 hours!

The course material was well organized starting with just enough background information used to set the stage. Demonstrating Git's pedigree (been around for over 10 years) in the SCM space lent credence to those not impressed with its slavish following in the industry. The material was in resonance with what Matthew was saying -- amplifying his point where necessary, enumerating steps, screenshots where appropriate and links for additional information. Another sign of his thoroughness was demonstrating setup in all major platforms and not leaving the student high and dry having to connect the dots. Over the course of 7 hours (Six 50-min sessions with an hour for break) the class covered everything from setup to 3-stage thinking, branching, remote repos, with just the right amount of peek under-the-hood to explain how Git works.

The format of the course was as hands-on as you wanted it to be. The attendees were provided instructions in advance of the class on setting up their local environment. During the course Matthew helped us connect to the GitHub repository he was referencing. This allowed as to follow along with the steps he was doing as he was doing it! If that wasn't your style you could just watch and listen. It was very stimulating and engaging -- especially when several of us were simultaneously pushing our changes to the same remote repository!!


Matthew McCullough did a first rate job of the online class. It was conducted over WebEx and went over without any major hitch. I was impressed with how Matthew kept up with several stimuli vying for his attention. He addressed the questions being posed over WebEx, emails sent to him andeven tweets all the while staying on course! I wonder if he did a git clone matthew before the class! He answered questions and addressed issues seamlessly as if it were part of the course material.

Matthew belongs to a rare breed that is at the locus of knowledge of the subject, desire to teach and thoroughness of preparation. He set the bar very high at other fora at which I have watched him teach. This Git class did not disappoint. He did his homework and came prepared to teach. From attending several software symposia I can tell you that this is a rare trait. Presenters tend to lean heavily on the content. Yes, content is King. However one should know how to deliver it. Think: Otherwise I could just read the book. Matthew's passion not just for Git but for teaching shone through even at hour-7 of the class!

If you are new to Git you could not do any better than having Matthew as your teacher.

Friday, June 19, 2009

A rose by any other name...

Martin Odersky, Lex Spoon, and Bill Venners have collaborated to venture where everyone has gone before. Yes, I mean the age old story about right way to override the equals method in Java. I see you rolling your eyes with the "I know, I know I must override hashcode method as well" bored refrain.

Spare me a few more minutes and I will convince you that you must give the article a serious once over. I for one got a better appreciation of the complexity of the problem -- if you want it addressed fully.

The article warms up around the 3rd of the four pitfalls they identify
  1. Defining equals with the wrong signature
  2. Changing equals without also changing hashCode
  3. Defining equals in terms of mutable fields
  4. Failing to define equals as an equivalence relation
Pitfall #3 discusses what happens when the state of an object that has been placed in a collection is modified. Typical equalsmethod implementation will result in it disappearing from the collection.

public class Point {
private int x, y;
public Point(int i, int j) { x = i; y = j; }
public int getX() { return x; }
public void setX(int i) { x = i; }
public int getY() { return y; }
public void setY(int i) { y = i; }
@Override public int hashCode() { return 41 * (41 + getX()) + getY(); }
@Override public boolean equals(Object other) {
boolean result = false;
if (other instanceof Point) {
Point that = (Point) other;
result = (this.getX() == that.getX() && this.getY() == that.getY());
}
return result;
}

}
..
HashSet hashSet = new HashSet();
Point p = new Point(1, 2);
hashSet.add(p);
p.setX(12);
System.out.println(hashSet.contains(p)); // <-- Prints false!!

Yep! A forehead smacking moment alright. The article suggests a way around this problem. Which leads us to the 4th pitfall -- that of equivalence. This means that for non-null values, the following is true about the equals method:
  • Reflexivity: x.equals(x)
  • Symmetry: x.equals(y) => y.equals(x)
  • Transitivity:x.equals(y) and y.equals(z) => x.equals(z)
  • Consistence: x.equals(y) always returns the same result
  • x.equals(null) is always false
With clear and concise examples, the article explains the complications of these contracts and how to implement them.

Tuesday, April 07, 2009

Run a single JUnit test method in Eclipse

Goes to show you, that you can teach an old dog new tricks. After years of using Eclipse I stumbled across a feature I am sure has existed since the glory days of Visual Age.

I had added yet another test method to a large JUnit TestCase class. I wanted to just run and re-run the new method 'til I had it just right without having to run all the other methods as well.

Yes of course, I could comment out all the other methods or just remove the @Test annotation. Back in the JUnit 3 days we have all -- at one time or another -- disabled tests by changing the "test" prefix of the test methods.

Somehow today, all these seemed abhorrent.

I wondered what would happen if I simply highlighted the method I wanted to test, and selected Run As > JUnit Test from the context menu.

Voila! That was the ticket!! It ran just the test I had wanted run.

As a bonus it even added TestCase.method_name as a "Run Configuration" for ease of future use.

FTW!

Friday, February 27, 2009

Mockito: Most helpful stacktrace

One of the things I have admired about the Spring framework is its helpful error messages. Yeah, of all the things I could point to, I picked that....However, work with me here. What I mean is that when things go wrong when using Spring, it spits out error messages that are full sentences that make sense and point the developer in the proper direction. None of the NoClassDefFoundError but not telling who which freaking class.

Now, I think Mockito -- the Java mocking framework -- has taken over the mantle of "King of error messages". Earlier today I had a new unit test I had just written fail. I didn't have to dig too much to find the error because Mockito pointed the way with the following stacktrace.

org.mockito.exceptions.misusing.UnfinishedStubbingException:
Unifinished stubbing detected!
E.g. toReturn() may be missing.
Examples of correct stubbing:
when(mock.isOk()).thenReturn(true);
when(mock.isOk()).thenThrow(exception);
doThrow(exception).when(mock).someVoidMethod();
Also make sure the method is not final - you cannot stub final methods.
at
etc. etc.

How cool is that! Hats off, Mockito-team. This developer appreciates the extra few minutes you took to put together that message. It helped me immensely.

Wednesday, February 18, 2009

Tab navigating the Mac UI

It was driving me nuts when I got my MacBook that I could not use the tab button to navigate across a form. Let alone forms, on a browser page, I could only tab between the address bar and the search field. To go anywhere else, I had to reach for the mouse. Aaargh!!

Surely the operating system that was God's gift to humanity could do better than that! It took a fair amount of Googling for me to find the obscure setting that controls it.

Here's what you need to do in order to be able to tab away across the entire screen.

Bring up the System Preferences window and select Keyboard & Mouse from the Hardware Category.



From the "Keyboard & Mouse" panel, select the "Keyboard Shortcuts" tab. The magical setting is at the bottom of that tab. Allow "Full keyboard access" by selecting the "All controls" radio button.



As this panel shows, you can impress your colleagues by toggling this setting using CTRL+Fn+F7.

The question remains, who in their right mind thought that the default setting was to be "Text boxes and lists only"!!

Friday, February 13, 2009

JUnit 3 & JUnit 4: Oil & water

Version 4 of the popular JUnit test framework has been available for use for quite some time (In fact, it is up to version 4.5). However, many projects have a wealth of JUnit 3-style tests and developers may choose to continue using it. If, on the other hand, you decide to dip your toes in JUnit 4 waters, make it a complete immersion. Don't try to mix and match.

As you may be aware, couple of the touted "benefits" of JUnit 4 are the obviation of extending the TestCase class and the identification of test and lifecycle methods (setUp and tearDown) using Java 5 annotations. For example, the following is a valid JUnit 4-style test case (minus the necessary imports):

public class BusinessLogicTests {
  @Before
  public void do_this_before_every_test() {
    // set up logic goes here
  }

  @After
  public void clean_up_after_a_test() {
    // teardown logic goes here
  }

  @Test
  public void addition() {
    assertEquals("Invalid addition", 2, 1+1);
  }
}

Observe how

  • The class does not extend TestCase

  • The "setup" and "tearDown" methods are identified by annotations

  • The test method does not require a "test" prefix and is also annotated


I'll let you be the judge of whether this is an improvement on JUnit 3. What I want to alert you to are the perils of subconciously mixing JUnit-3 and JUnit-4 style programming. Consider the following test case:

public class BusinessLogicTests extends TestCase {
  @Before
  public void do_this_before_every_test() {
    // set up logic goes here
  }

  @After
  public void clean_up_after_a_test() {
    // teardown logic goes here
  }

  @Test
  public void testAddition() {
    assertEquals("Invalid addition", 2, 1+1);
  }

  @Test
  public void subtraction() {
    assertEquals("Invalid subtraction", 1, 1-1);
  }
}

This will result in a green-bar even though there is an error in the test of subtraction. Can you guess why?

It was that pesky little extends TestCase that I added from force of habit. The flips the switch to JUnit-3, which knows nothing about annotations, ignores my setup and teardown methods and looks for methods prefixed by test. It completely ignores the method named subtraction!

And of course, conversely, the following is just a plain old Java class that won't be acknowledged by either JUnit-3 or JUnit-4.

public class BusinessLogicTests {
  public void testAddition() {
    assertEquals("Invalid addition", 2, 1+1);
  }
}

Final word of advice, if you are using Struts Test Case, you have no choice but to write JUnit-3 style tests since the parent class of the framework (MockStrutsTestCase) extends Junit-3's TestCase.

Friday, January 09, 2009

Oh! Dash it...

I spent half a day cursing and spewing bile at JavaScript when after all was said and done, it was doing the right thing. The ignominy of it all...My writing here is part penance for casting aspersion at JavaScript and part hoping that you don't have to go through this agony.

I have a typical Java Server Page (JSP) with its share of HTML, scriptlets (gasp) and JavaScript. Much of the HTML is neatly organized in <div> tags. The JavaScript controlled the toggling the visibility of some of the divs.

When I tested the page and invoked the script, I didn't see the expected behavior. Firebug even told me that there was an error when the JavaScript was invoked. It went so far as to tell me that

document.getElementById(a_div_id) is null

By setting breakpoints in the script I quickly determined that, not surprisingly, the variable a_div_id referred to the id of a div on the page. It was there in the code -- clear as daylight. Here is about where the JavaScript cursing began. When that didn't help -- for the record, it never has -- I pulled out my trusty JS shell tool. Still muttering under my breath "I'll show you how it's done", I pounded the command

document.getElementById("line_items").style.display = 'block';

fully expecting to see the div with id=line_items to pop up.

Nope! Nothing but silence. The next port of call was the HTML source of the page in question. Sure enough, I was able to locate the div in question. However, the syntax highlighting showed that the entire div was commented out!!!! So, my script was correct in saying that there was no such element in the document.

Turns out that culprit was the use of textual em-dashes1 in my comments. Typically em-dashes are represented in text as two consecutive hyphens thusly

--

WYSIWYG editors (such as MS Word) are wont to convert that into a single em-dash



However, there is no such implicit conversion in a JSP or HTML page. So there it was smack in the middle of the comment.

<!-- This is bad news –– if you ask me. -->

It colluded with other such comments on the page to make a mess of what divs were actually there. I know HTML wonks out there are going to chime-in in unison with a "Well, D'uuuuh! Don't you know that that's improper HTML syntax". OK, for the rest of us, the Web Design group provides a pithy maxim to code by

An HTML comment begins with "<!--", ends with "-->" and does not contain "--" or ">" anywhere in the comment.

The formal definition of an HTML comment can be found at W3C.

My peeve now is that you would think that a self-respecting IDE like Eclipse2 would point that out for you. Now that I think back, even a puny little editor like VIM would flag this error. Heck, Eclipse doesn't even acknowledge <!> as a valid comment. If Eclipse had shown the code correctly as being in a comment, I would not have wasted time down the JavaScript rabbit hole in the first place.

All this is coming at the end of what has been a long week of futzing with Eclipse's sloppy handling of JSPs in general. Yes, this is with an Eclipse that is souped up to use the Eclipse Web Tools Project (WTP) "goodness".



1 em-dashes (—) Denotes a pause in thought, a parenthetical statement, or — more casually — an afterthought. For more on this subject, see What’s the Difference Between an Em Dash, En Dash & Hyphen?. BTW, did you know that an em-dash is called that because it is the width of a an 'm' in the current font? Useless trivia.
2 For the record, I am using the latest version 3.4.x (Ganymede).

Monday, November 24, 2008

Getting Hudson going on a Windows server

After getting all giddy about the ease of running Hudson (java -jar Hudson.war), I ran into rough weather pretty quickly. The main problems:
  1. Running under Tomcat
  2. Accessing our CVS server
As the saga unfolded the two issues got inexorably intertwined. After the Winstone experiment worked swimmingly, I cranked up Tomcat and dropped the Hudson WAR into the Tomcat webapps directory and it dutifully deployed up the application. I then configured Tomcat to run as a service.

Here was the first sign of trouble. When I ran a project build from Hudson, it reported a problem accessing CVS. It gave the vanilla CVS response to login first. Login as whom? The trouble was that the Tomcat service was running as the Windows system account. However, the system account is not authorized on the CVS server. Hmm...

Methinks I'll run Tomcat under the credentials of the account that does have access to CVS. I restart the service after this change and try to start another build.....however....I can't access Hudson. The Tomcat admin console reported that Hudson was running. Yet, when I accessed its URL, I didn't get a response. Uh oh!

To recap,
  1. If I ran Tomcat under the Windows system account, I cannot access CVS
  2. If I ran Tomcat with an account that could access CVS, Hudson's pages weren't being delivered....and let me throw in to the mix
  3. To make matters a little more intractable, CVS passwords when using CVSNT (the common CVS client on Windows servers) is stored in the registry and not in a .cvspass file.
Given all these facts, we decide to hack the registry by copying the CVS-authorized user's password into the profile of the system account. We had to go to some Microsoft web site to find out the arcane SID for the System account. Once we located the account, we created a cvspass entry for it and copied the password from the authorized user's account. Then, we reverted the Tomcat service to use the system account account and triggered a project build. No dice :-(

It became clear that the solution had to be found while running Tomcat as the CVS-authorized user. However, why wouldn't Tomcat serve the Hudson pages?

It turned out the reason was that Tomcat had been installed by the administrator to a location that the CVS-authorized user did not have write-access. However Hudson required write-access to the logs directory! Once we gave this account the necessary permission, everything was hunky dory.

Phew! That was quite a workout. I am not sure how typical/atypical is our user and environment set up. For sure it highlighted several of the moving parts and many of the things that can go wrong.

Here's hoping you aren't here because you ran into similar problems!

Tuesday, April 24, 2007

DBUnit + Sequence numbers + Foreign keys = Nightmare!

Setting up my unit tests with reliable fixtures is turning out to be quite a headache.

Sparing you arcane application-speak let me use the classic simple EMPLOYEE-DEPARTMENT example to illustrate my problem.

Facts:
  • We have the typical EMPLOYEE table and the DEPARTMENT table
  • Both use database-generated ids (sequence numbers) as primary keys.
  • An EMPLOYEE belongs to a DEPARMENT.
  • The DEPT_ID field in the EMPLOYEE table is a foreign key into the ID field of the DEPARTMENT table.
So far, so good.

Now, consider a method in the EmploymentDao class that returns all known employments. In SQL speak, it executes

Select e.emp_name, d.dept_name
From employee e, department d
Where e.dept_id=d.id

In order to test this method I need to set up the database with necessary data. I would like to be able to use something like DBUnit to set up my fixtures. However, I have to populate the DEPARTMENT table with at least one department record. Then, I need to get the ID field of that record to insert a record into the EMPLOYEE table. How does one do that ? This is crucial for a test such as

public void testGettingAllEmployments() {
List employments = employmentDao.getAllEmployments();
assertNotNull("Empty list of employments", employments);
}

Even with a simplification of suppressing foreign key constraints, I will have to do something like:
  • Insert a record into the DEPARTMENT table with a DBUnit fixture.
  • Insert a record in the EMPLOYEE table (with a bogus dept_id)
  • Then read the record, from the DEPARTMENT table to get at its id
  • Update the record in theEMPLOYEE table to set the dept_id
Wow! That's a lot of preamble -- not to mention using of the very DAO methods I want to test!!

Wednesday, February 21, 2007

Hello Google Reader. Goodbye Bloglines

I have been a longtime user of Bloglines. Sometime last year when Google introduced the Google Reader (GR) I took a looksee and was severely underwhelmed and so I stayed with Bloglines. One of my primary reasons was that GR did not work with my reading style. You see I like the blog posts grouped by feed -- all Slashdot posts together, all Javablogs together -- separated from the Slashdot posts.

Of course, the choice of Bloglines over over a locally installed reader was a no-brainer; I did not want to have to maintain a copy of my blogroll on each machine that I used during a typical day.

I recently peeked over to Google-land and lo and behold, this one feature that had been the deal-breaker for me had been added. In addition, were some very useful features that won me over. Here are the things that clinched the deal for me:

  • List view -- This allows me to glance at about 50-60 posts in a group at a time. If I am interested, I click on it to expand it and read a synopsis.
  • Ability to "star an item"
  • Keyboard shortcuts -- Boy! Do they ever have shortcuts. I haven't mastered them all yet
  • Ease of renaming feeds
  • Ability to selectively mark items as having been read -- Bloglines has a severe problem in that when you select a blog, every unread article in the blog is displayed and (this is the problem) they are all immediately marked as "read". Very often I start looking at feeds from a blog and before I can finish scanning all the unread posts, I am called away. With GR, I know where I left off
  • Progressive loading -- The reader doesn't attempt to load every article in the selected grouping in one fell swoop
  • Configurable start page -- I like my starred items to be displayed when I bring up the reader since well, I starred the item for a reason -- so that I can read them later!
Of course there is always a wishlist. Here's mine:

  • Ability to choose the order of display in the list view
    • [UPDATE] Anonymous commenter has shown me how! However I wish this wouldn't be a per-feed setting. OK, have a per-feed setting if you must but the one must be able to customize the default at a blogroll level.
  • Ability to mark an item as unread (I wouldn't at all be surprised if this feature is already there and that I just haven't figured out the keyboard shortcut)
    • [UPDATE] Thank you, Anonymous commenter for showing me the way!
  • Speed it up, please! Were it not for the features, GR's sluggishness would've be a deal-breaker!





powered by performancing firefox

Monday, May 15, 2006

JBoss Rules...Well, not quite!

I have been attempting to work with JBoss Rules (nee Drools) and have mostly met with frustration.

With the acquisition by JBoss, the Drools site (www.drools.org) pointed me to JBoss for v3 of the API. In fact, today, I can't even get to drools.org any more. Now cleverly annointed "JBoss Rules", I downloaded the version 3.0 RC2 of both the binary and the IDE.

No joy, however (several errors reading the DRL files). Tried various alternatives including recommendations on their mailing list by some of the project's leading lights that one use Eclipse 3.2 M6 and not 3.2 M5 as indicated by their docs. Still no joy.

Finally, I decided to download the source and built v3.0. Pay dirt! Actually, you don't need Eclipse 3.2 M6 -- the docs were right it works just fine on M5.

On the subject of docs, they are mere shells. The original Drools site used to have a plethora of documented examples, and usage documentation. Not any more. What is the syntax for the new DRL files? I see "duration" is a long, but what is it? About the DSLs? Why get rid of perfectly good documentation of the concepts?

OK, since the docs aren't there yet, I decided to join the mailing list. Again, I followed the instructions and tried to subscribe by sending email to user-subscribe@drools.codehaus.org. Again, no joy. I got an automated response that read

Hi. This is the qmail-send program at codehaus.org.
I'm afraid I wasn't able to deliver your message to the following addresses.
This is a permanent error; I've given up. Sorry it didn't work out.

:
Sorry, no mailbox here by that name.

So, what next?

JBoss Rules...I don't think so.

Friday, February 03, 2006

RailsConf: If you announce it, they will come...

The RailsConf has been getting a lot of press. So methinks let's see what the hullabaloo is all about.

Q: What are the sessions going to be?
Silly me, that's not been decided yet. Don't worry they have over 80 proposals.

Q:Where is it going to be held?
The web site says: Chicago, Venue TBA. TBA!!? What kind of amateurish prank is this? Oh, well, drill down a few pages further and you figure it's at a Wyndham hotel. Phew! At least I know where I'll be staying!

Important details aren't fleshed but they want you to register.... Do they ever! Better get there soon if you want to catch the "super early bird" blue light special. What gall!

That's not all, Mike Clark, Dave Thomas and cohorts (from the NFJS circuit) are drumming up the support on their blogs.

I am sure -- given the track record of the names named -- it will be a great conference. However I did not expect such premature promotion from so far east of Redmond. The Ajax Conf (or Experience or whatever they call it) is another example of a conference that was announced, much hyped before any details were available.

Is this to be the trend? Announce a conference, announce keynote speakers, build up clientele on the shoulders of the blogosphere an then work out the details?

Sunday, January 01, 2006

Wisdom of Amazon crowds?

I often find myself relying on the wisdom of crowds to guide my purchasing decision. How so? I go check out the customer reviews at Amazon. This has been a very a very good barometer for my purchase.

Analyzing my habit a little further, I realized that I don't just pick out the majority opinion. BTW, is there a way to get a summary of the customer reviews for an item? Such as,

Acme's New Super duper toaster ratings:
95% -- 4+ stars
2% -- 3 stars
2% -- other

probably could using Amazon web services. Anyway, what I seek out is the not-so-silent minority. I want to see why, while the page is filled with 5-star or 4-star reviews, there are a discordant few. I do read (some of) the majority opinions. However, you tend to get the drift after the first few. Have you noticed that the majority opinion cites similar reasons? However, the minority seem to have more variety -- or maybe its just a matter of numbers.

It is the gripes I pay close attention to: is the review just a sore rant or do the complaints seem to have merit. Are these reasons something that I feel is important to me -- or do I not care that the toaster doesn't have a mirror-like sheen?

Such an analysis has held me in good stead over the past few years of major and minor purchases. In retrospect, this seems to weight the few heavier than the many -- contrary to Surowiecki's contention.

Monday, December 26, 2005

AJAX Experience...Yet another boondoggle

A colleague of mine upon hearing of the Spring experience, said "what a boondoggle". That captured exactly how I felt about it.

Now, I don't object to one man's opinion of enterprise. I know Jay Zimmerman and I applaud him for putting up a fabulous show time and time again with his No Fluff Just Stuff series. However a symposium just on Spring? C'mon. If you are new to Spring, a symposium isn't a way to learn to use it. If you already using Spring, you may get something out of 10-20% of the sessions. How do I figure? Due to many level 101 sessions, and others that you can't attend due to conflicts.

Hard on its heels comes the AJAX experience. A symposium essentially on one Javascript API call! Do we really need a conference on AJAX? Aren't there enough online articles, blogs, and books (don't get me started) on the subject?

My prediction: Coming soon shall be a Ruby Experience -- which actually is a topic worthy of an "experience". I guess what I really envy is Jay's entrepreneurial spirit. You go Jay!

Thursday, July 21, 2005

Maven catch-22 with multiproject builds

Maven's multiproject plug-in is a very useful tool on a large project that's been organized into several sub-projects. Using the dependencies the reactor figures out the correct order in which to build the entire project. However Maven gets in its own way when doing such builds. Here's how:

Consider a multiproject with sibling sub-projects that are interdependent. Having been bitten one too many times for not doing so, I have become fastidious about maven cleaning before every build. Just as with any other plugin, when you invoke clean, Maven checks the dependencies. However, when this happens the first time the multiproject is being built, the dependencies cannot satisfied and so the build quits with a failed dependency.

If you are wondering why get so anal about cleaning and that it isn't needed before the first-ever build, consider setting up your builds to be managed by CruiseControl. That's an automated process and needs to be given the goal(s) that must be executed at every build cycle.

So, the only solution I know is to perform a one-off build manually without a clean and then let CruiseControl loose. Can you suggest a better alternative?

Speaking of cleaning and multiprojects, why doesn't multiproject:clean clean the root directory? Why do I have to maven clean multiproject:clean?

Monday, June 13, 2005

Reasons to attend a NoFluffJustStuff conference

I just spent the last three days at my third NoFluffJustStuff conference -- the Research Triangle Software Symposium. My brain is full and I am wiped and extremely invigorated!! It is my annual shot-in-the-arm booster that makes me look forward to going to work! Here are some of my reasons why you shouldn't miss the next opportunity. (Of course you can also see their top-10 reasons):

The speakers: The speakers are uniformly exceptional. They not only know what they are talking about, they want to be on the stage and are good at it. Further, they don't mind answering questions -- and not just during the session. Speakers are routinely found mingling with the attendees at lunch and breaks.

Constant innovations: In the three years that I've been attending these conferences, it has constantly been evolving, never leaving well enough alone. First it was end-of-day keynotes, then it was the introduction of .Net topics, then it was BOFs, web-site with speaker blogs, etc etc.

Timely topics:At any given time there are invariably 5 active sessions. The topics being discussed at these session are not only of high quality, they are timely. Let's take the latest conference. There were sessions on AJAX, Tapestry, Spring, Hibernate, Ruby, Rails, the list goes on.

Doesn't cut corners: The high quality doesn't stop with the speakers and the sessions, it includes the other amenities. You get all the session materials on CD, with binders, in a nice laptop carrying case (another innovation for this year). Meals (read: breakfasts, lunches, snacks and opening night dinner) during the conference are provided. Jay Zimmerman (the organizer) could very easily have just thrown in the "continental breakfast" fare. But meals here would put most restaurants to shame. There is of course the obligatory raffle during the conference. Even there this one outshines. There are two raffles. At the recent conference, up for grabs were books, an iPod and the new Sony PSP.

I think there are about 28 events over the course of the year at different locations across the US. So, if you are in the country, chances are, there is one in your neighborhood. Don't miss it.

Thursday, May 12, 2005

Freeware installer recommendation?

I have been using Null Soft's product and frankly, I just don't get the NSI scripting language. It just seems too arcane and doesn't seem to flow right -- if you know what I mean. I spend more time digging through the help docs and Googling to figure out how to get something going.

I would welcome any alternative tool recommendation -- freeware of, course :) My target environment is Windows and so the tool doesn't have to be cross-platform capable.

Tuesday, May 10, 2005

Visualizing Web Logic's domain configuration

Web Logic's config.xml is the center of WL universe. This is what WL uses to keep track of all servers, deployments, services etc and is one gnarly XML file. Yes it isn't for human consumption but it helps to be able to read it when diagnosing problems. Now you have a handy-dandy XSL stylesheet that'll present this file in HTML. Element names are hyperlinks. Following these links takes you to the appropriate reference documentation page. Now, why didn't I think of that? This works with IE and Firefox although with the latter it doesn't work for a file:// URL. Any ideas why?

Attributes: I can't place the actual blog where I came across this tip. So thank you, anonymous.

Wednesday, April 20, 2005

StrutsTestCase and Tokens

How does one get around the usage of Struts tokens when unit testing using StrutsTestCase? If the action class under tests for duplicate submissions using tokens,

if(isTokenValid(request) == false) {
// don't perform the action and route the user
// to an appropriate location
}

it'll always fail. This is because, the token is set in the request by the tag and of course when running a StrutsTestCase, the JSP isn't involved.

The application functions correctly, however, I cannot run my unit tests :(

Tweety thoughts

    follow me on Twitter