|
|
Wednesday, August 20, 2003 |
Lots of talk about checked exceptions vs. unchecked exceptions this
week. Most of it is intertwined, and I believe it started with this Artima interview with Anders Hejlsberg of Microsoft. The interviewed spawned this discussion which references this LtU discussion.
I have ambivalent feelings about checked exceptions. Sometimes I
understand their utility, like when you need to report the file was not
found and this is a bad thing. Sometimes I find them very
cumbersome like when I want to write some code that throws an exception
in the constructor of a Java class.
One of the keys to living with checked exceptions is determining a
propegation strategy. You have to figure out how you are going to
propegate the exceptions up through the layers of your
application. You should figure out when is it important to see
individual exceptions and when is it OK to see a more coarse grained
exception.
In an application I was recently a part of, we built a web application
that had several application layers. The application had a
presentation layer, a service layer, and a data access layer. The
data access layer threw alot of very specific exceptions about what was
happening. The service layer caught those exceptions and took
appropriate action (if necessary) and wrapped that exception in a
higher level exception called ServiceFailureException. This
allowed the presentation layer to deal with a single type of exception
and understand that something failed, but present the user with a more
friendly error message.
10:19:33 PM
|
|
Knowing and Learning.
Some thoughts about knowing, learning, and software design, many of
which were thought or written down while watching baseball. (From Jim
Waldo's Weblog) [Jim Waldo's Weblog]
Great thoughts about the difference between knowing facts about
software engineering and knowing actually HOW to engineer
software. Jim wonders why there is no apprentiship process for
software engineering.
8:58:23 PM
|
|
© Copyright 2004 Tom Pierce.
|
|
|
|
|
Search
|
Emacs Sources
tsql-indent.el
This is an indentation function for SQL mode. It was written with Transact SQL in mind.
user-add-sql-folding-marks
This is a simple function that adds folding-mode marks to SQL sources. It is quick and dirty, but is fairly useful for me.
remove-line-boundary-in-region
This function removes all the line boundaries in a region. This, in effect, collapses all the lines in the region onto one line.
convert-camel-to-underscore
This function converts all the text that is camel cased in a particular region to underscore separated text.
My Subscriptions
|
|
|