The Artima Developer Community
Sponsored Link

Ruby Buzz Forum
What Good Error Messages Look Like

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Paolo Perrotta

Posts: 37
Nickname: pperrotta
Registered: Sep, 2009

Paolo Perrotta is a freelance agile coach and the author of "Metaprogramming Ruby" for the Prags
What Good Error Messages Look Like Posted: Aug 11, 2012 7:07 AM
Reply to this message Reply

This post originated from an RSS feed registered with Ruby Buzz by Paolo Perrotta.
Original Post: What Good Error Messages Look Like
Feed Title: Duck Typo
Feed URL: http://ducktypo.blogspot.com/feeds/posts/default
Feed Description: This is your brain on software.
Latest Ruby Buzz Posts
Latest Ruby Buzz Posts by Paolo Perrotta
Latest Posts From Duck Typo

Advertisement
Good error messages do three things:
  1. They tell me what's wrong and how to fix it.
  2. They stand out.
  3. They soothe my soul.
A teammate just sent me some output from Maven, a popular package manager/project manager/kitchen sink for Java. She spotted a warning, well-concealed near the top of hundreds of lines of infodump. I had to format it to make it readable.

[WARNING] Some problems were encountered while building the effective
model for [our_project]
[WARNING] 'dependencyManagement.dependencies.dependency.(groupId:
artifactId:type:classifier)' must be unique: org.jboss.resteasy
:resteasy-jackson-provider:jar -> version 2.3.2.Final vs 2.3
.0.GA @ com.[my_customer].
[our_project]:[our_project]
:0.17.Beta-SNAPSHOT, /Volumes/Workarea/trunk/pom.xml, line 272,
column 16
[WARNING]
[WARNING] It is highly recommended to fix these problems because they
threaten the stability of your build.
[WARNING]
[WARNING] For this reason, future Maven versions might no longer support
building such malformed projects.

Gotta love the "come with us, citizen" tone of those last few lines. I'll tell you what, Maven: either the stability of my build is really being threatened, and then you shouldn't hide this information so carefully - or it's not, and then you shouldn't be such a picky jerk. And by the way, your mother is way more malformed than my project. Sheesh.

Compare that to Homebrew, a package manager for OS X. After an operating system upgrade, I ask it whether there are any problems with my setup:

~$ brew doctor

Instead of dumping the Library of Congress to my terminal as Maven would, Homebrew gives me a clear screen with three well-formatted warnings. First one:

Warning: Some keg-only formula are linked into the Cellar.
Linking a keg-only formula, such as gettext, into the cellar with
`brew link f` will cause other formulae to detect them during the
`./configure` step. This may cause problems when compiling those
other formulae.

Binaries provided by keg-only formulae may override system binaries
with other strange results.

You may wish to `brew unlink` these brews:

libxml2
libxslt

I brew unlink the two libraries as instructed. Fixed. Second warning:

Warning: Some installed formula are missing dependencies.
You should `brew install` the missing dependencies:

brew install autoconf automake libtool

Run `brew missing` for more details.

Command copy-pasted, libraries installed, problem fixed. Third warning:

Warning: /usr/bin occurs before /usr/local/bin
This means that system-provided programs will be used instead of those
provided by Homebrew. The following tools exist at both paths:

bashbug
clusterdb
[more stuff]

Consider amending your PATH so that /usr/local/bin
occurs before /usr/bin in your PATH.

I spend a few minutes fixing the PATH. Let's try again:

~$ brew doctor
Your system is raring to brew.

That's why Maven fills my soul with darkness and desperation, while Homebrew overflows my heart with love and unicorns.

Read: What Good Error Messages Look Like

Topic: Five Interesting Things You Can Do with Heroku Buildpacks Previous Topic   Next Topic Topic: Computer And Also Why You Need To Be Informed

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use