Metadata-Based Validation

This Artima article links to an IBM developer works article which details how validation in
one place in an application can extend throughout different parts of the
application.  I’ve wanted something like this ever since I played with
Modula-3 in college.  Modula-3 made it so easy to create new constrained
types that I finally saw the power of such constraints.

My dream of a system would work something like this:

1.  Define your data objects and include something which contrains this
data.  In Java this could be annotations.  In .NET this could be
attributes.  In other languages, or pre-annotations Java, it could be
something else, it doesn’t matter, but annotations/attributes definitely make
things easier and nicer.

2.  If I am mapping to a database, the ORM should read these attributes
and contrain the data at the database level.

3.  If I create a UI (web, console, windows, gnome, applet, it should
not matter) certain control types should be infered and other control types
should be validated.  For example, if I have a data member which is an
enum of three values, a textbox is probably not the best input control.  A
drop down with three values, or three option boxes may be better.

4.  If I create a non-U-I (a non-user Interface) (web service?) the
contraints should be enforced, preferably at the service layer.

I would really love this.  Scaffolding would be far more useful with
this type of Metadata in my objects.  People directly accessing underlying
databases have less chance of inserting or modifying data to “garbage”. 
Contraints were pushed down to the database level.  Of course, ideally no
one would connect to the database directly, but the real world is not ideal.

http://www.artima.com/forums/flat.jsp?forum=276&thread=175992&start=0&msRange=15

http://www-128.ibm.com/developerworks/java/library/j-hibval.html

AADND – Ann Arbor Dot Net Developers meeting September 13th at SPARK

Please join us on Wednesday, September 13th at SPARK for the 8th Ann Arbor Dot Net Developers meeting.  The meeting starts at 6pm and usually lasts until about 8:30pm.

Jay R. Wren (me) will be presenting Mono.

Mono yields some great opportunities to propel Open Source and Linux even
further into the mainstream. Mono is an Open Source implementation of a
runtime environment and libraries designed and created by Microsoft known as
the .NET Framework. There has been much controversy and misinformation about
its performance and licensing issues in the Open Source community. Some of
these issues will be dispelled and others will be displayed in a new light.
Some of the best desktop application available today are written in C# and
run in Mono. Mono has some excellent tools available, some of them are
better than tools available for systems which have been around much longer.
Mono supports nearly all of the protocols and libraries with which Open
Source developers are familiar. In this session, we will introduce Mono.

Jay R. Wren learned to program at age 8 on an Atari 800XL. Two years later
the family got an Amiga 1000. He learned to program structured procedural
basic. Amiga Basic 1.3+ didn’t have line numbers! This background helped
immensely when he moved to programming PASCAL and C and later C++, Java,
Python, PHP, Perl, Pike, and finally C#. He started using Linux as a desktop
operating system in 1995. He put himself through Oakland University for
eight and a half years and obtained a bachelors and masters degree while
working, usually full time. After seven years of working as a Systems
Administrator and a Network Administrator, Jay decided to switch direction
slightly and put the computer science degrees to work by entering the field
of Computer Programming and Software Engineering. After trying to teach
himself the whole J2EE thing, frustration with the XML configuration files
and overall system lead him to try this Microsoft .NET thing. Very shortly
he was hooked and diving into the open source implementation of it, called
Mono. He has been using Mono and .NET since fall of 2004.

We will have our usual format including valuable news about local .NET technology, opportunity and jobs.  Pizza will be privided.

This meeting is open to the public and is free to attend.

For more information see our website:  http://www.aadnd.org/

Domain Driven Design (DDD) and Service Oriented Architecture (SOA) are both important

Alex Hoffman gets it!

DDD and SOA Are Unrelated.

I don’t think I would use the word unrelated, but the are definitely NOT two different ways of thinking. I guess this is a pet peeve of mine. DDD is also not a replacement for Object Oriented Design. Rather, DDD “is a way of thinking and a set of priorities…” according to http://domaindrivendesign.org/.

Domain Driven Design as the primary driver to solving a problem. SOA is simply a set of guidelines for best exposing this solution. I wouldn’t say that they are orthogonal. I might say that they are parallel. I wouldn’t say that they are totally unrelated, but I would say that they are independant of one another. However, the ease of exposing your design as a service would be a reflection on the design of your domain so there is some intrinsic relation there.

Both of these items should be on the checklist of “good software” when designing a new application or system. It is fine to simply say “no, we won’t ues that” to each of these items when going down the checklist, but in my opinion they should at least be considered for each and every project.

digg vs. slashdot, Sean Kelly me too

Sean Kelly was more systematic in his trial of digg, and he gave up reading /. entirely.

http://seankelly.tv/blog/blogentry.2006-08-28.9543029912

I hate to say “me too” but yup.  Me too.

I’ll still browse digg, like I browse slashdot.  I read headlines only, if that sounds interesting I read a summary.  In the case of both I rarely go further.  If I do go further I’m always more pleased by the result if the source was slashdot.  Most of what is on digg is absolute garbage.  I’m consistently let down by what other people find interesting.  I’m disappointed in my fellow man.  Oh well, I shouldn’t be wasting my time on such sites anyway.  I should be coding.

Nick Malik is right on – SOA is really just OO applied to distributed systems

http://blogs.msdn.com/nickmalik/archive/2006/08/18/705685.aspx

Nick writes a little bit about OO design, mentions some patterns and an IoC
framework and then basically says that all of this stuff is here just to help us
do good design.  I agree.  Much like any tool at your disposal, all of
these things can be misused, but that doesn’t make them bad.  They key is
to learn to use the tools well. 

I just really liked when he wrote “SOA is really just OO applied to
distributed systems”.  Yes yes yes!  Thank you!  Unlike what
others read and think about SOA, Nick got it right.  I still say that Yogi
got it wrong.  SOA is not a replacement for OO.

I also like that Nick comes right out and says “So we are doing what we
always do…”  That is what I’ve been saying for a while now. 
Unfortunately, many people see Web Services and SOAP and they don’t see
SOA.  They do see a one size fits all way for RPC.  I guess that is
ok, but it is typically because they didn’t spend enough time on a good
design.

 

Whiz kids, hackers, crackers, and security professionals

Whiz kids, hackers, crackers, and security
professionals, my company consideres you insignificant.

I was taking one of those corporate quizes.  If you
have ever worked in a larger corporation, you will know what this is, but
if you haven’t, it is a way that corporations try to train their employees on corporate
conduct policies.  It is usually things like “Lock your PC when
you walk away from your desk” or “What should you do with paper that
has sensitive customer information on it”  with answers like “burn all paper evidence”,
“put a sticky on my monitor with the password attached”, “post social
security numbers and names to as many websites as possible”, and “place
confidential date in locked up place, or in the shredder”.

Well I just scored VERY low on a 5 question test at work.  40%.  2
of 5!  I’m dumb founded.  I’m even more dumbfounded over this
question:

A significant network/application
security threat to most organizations comes from:






So I guess this means that I don’t have to worry
about whiz kids, nice hackers, mean hackers, or security professionals? 
Yes, I checked all 5 and I got it wrong!

Other questions which I got wrong include “What should you do in the event you see someone without a
badge?”  I didn’t see an option for “kick their ass” so I picked the
“ignore them” option.  I mean, if i can’t inconvenience someone with an ass
kicking, why would I do something like escort them to security, or tell
security?  Well, OK, I’d probably tell security, but that option was B and
everyone knows never to answer B.

Also incorrect was “You receive a virus alert from a
friend in another company with all various warnings (e.g. “Pass this along!”,
“This is critical”, “This virus could blow up your computer!”) “  
said “delete it without worrying about it”.  I’ve been in the computer
industry for well over 10 years now.  I’ve seen the rise of the internet,
the rise of network travelling viruses.  I remember floppy disk
viruses.  I don’t run virus protection software and I don’t open email
attachments.  I’m not stupid, so I don’t get viruses.  When I get an
email that says something like that, the first thing I think is JUNK MAIL. 
Options which I did not consider were: “send to everyone in outlook list”, “send
to my office friends”, and “send to my help desk”.  Well of course I was
not considering that the target of this “Quiz” is jane and joe office computer
user.  They aren’t qualified to make decisions about what is safe and what
isn’t.  While I consider myself technically qualified to make that
decision, it is not my role at my job, and thus my job probably does not want me
to make that decision.  Why can’t I be a good drone?

 

current music: Rhapsody of Fire – Son of Pain

missing the general excitement

John P. over at personalwireless.org
has an interesting piece which talks a bit about missing the
general excitement in working in the IT industry. 

Its actually something I think about often, but often dwelling on such
thoughts will surface new ideas.  This is what I came up with:

 

Maybe it is because now it is a JOB, where you have to make MONEY doing it,
which often means doing what others want instead of doing what you want.  I
think if you were to quit your job, take a month off, away from technology
entirely, preferably on sandy beaches some place, then you could find your
“buzz”.  I just call it the love.  Some computer folks have the love,
and others just do it because it is a job.  Unforntunately sometimes those
of us with the love loose the love when our jobs slowly derail us from the
things we really love.

The environment is definitely still there, its just that jobs in that
environment are not high paying.  Jobs supporting hobbyists are often not
high paying.  You could make a living at it, but it would not be the same
kind of salary as working corporate IT.  Corporate IT and even Corporate
systems programming does typically not involve fun with “cheap 3D video cards,
commodity parts, and the malleability of most open source projects”. 
Instead, most businesses buy Dell, HP or IBM for their desktops and replace
entire PCs, not components, when something goes wrong.  Most businesses
don’t have the time or money it takes to pay an administrator or programmer to
deal with open source anything unless a business case can be made, and even then
in many environments there is an illogical fear of the lack of accountability
that comes with using open source software.

This is the 4th Grade/Office Space career test.  If you had one million
dollars, then what would you do?  Lets update the question, because one
million just isn’t that much these days, so instead lets say, if you had one
billion dollars, what would you do?  Not with the money, with
yourself.  What would you do?  I certainly wouldn’t be working this
job.  I’d probably take some time off and reaccess myself.  But I know
myself well enough to know that I wouldn’t leave the computer world.  I’d
probably start a software company and practice all the things that I love. 
I’d practice good software engineering and use open source.  I’d sell
software product, services, and support.  I’d hire young programmers and
shape them into great software engineers.  We would score very high on the
Joel Test.

Now the point of the exercise is that this is what I’m supposed to do NOW,
even without one billion dollars.  Quite frankly, I don’t have the
guts.  An unfortunately working in this life sucking cube all day just
makes me more bitter and more disgusted with the computing world that it is
possible that when or if I do decide to make the jump and try my hand at
starting a software company, I’ll fail.  I’ll fail for all the reasons I
would have failed anyway, but I will also fail, and maybe faster, because I
carried with me something which I should not have.  I lost the love by
working the life sucking cube for too long.  This is my ultimate
fear.  The only solution is to quit my job and start now, but fear tells me
that I won’t make mortgage payments and that beans and rice aren’t as fun as
going out with friends on the weekend.  I need to be strong and make the
jump!

If you could do anything you want, what would you do?


Nilotpal and me

Nilotpal writes about Smart People.  I’ve been feeling that way about my
current job for months.  I don’t so much consider myself /Smart/ as I
consider many of the people with whom I work stupid.  Or as Nilopat says
far more PC “below par”.

All I ask that my team have a few things.  I’d like to score at least a
2 (but a 6 or more would really make me happy) on The Joel Test.  If I have to know anything about someone else’s
code, I’d also like them to have a distant clue about what Object Oriented
Programming and Design is.  Programmers please, heed my plea, stop using OO
Languages as procedural.  Classes are for classifying
objects.  Objects are for grouping similar things into classes
(polymorphism anyone?  WHAT IS THAT???)

If you don’t already know everything that uncle bob says about Object Oriented
Design
, then you aren’t an object-oriented anything and you shouldn’t be
programming with object oriented tools.  Like with most tools you are more
dangerous using them when you are untrained than you are simply not touching
them.  Get trained to use these tools first.  You would wave a razor
sharp katana around aimlessly would you?  You would?  Well, then you
get what you deserve.  I hope you loose a limb, or better yet, part of your
skull and your brain chops in half immediately saving the rest of the world from
you.

In the same vein of just deserts, you deserve what you
get by using programming tools which you don’t understand.  That shoe
string of classes which group unrelated data and methods into meaningless
modules WILL become unmanageable.  You WILL suffer compared to your skilled
competitors.  Your bosses and team leads get what they deserve when you
leave to torture someone else, because they allowed you to waste your time and
theirs by writing unmaintainable code.  Or less pessimistic, you deserve
what you get when you are let go by your boss when they and your team lead
realize that since you haven’t trained yourself to use these tools which you are
misusing, that you must be dumber than they had thought when hiring you. 
Have fun drifting from job to job, I’m sure you can find a group that doesn’t
realize that you are “below par” where the boss is also “below par” and you can
fit right in.  Fill business needs for 10 times the cost of a good
programmer.  I hope said company which you found is highly profitable.

I know there are many good programmers out there.  What is so hard about good design?  I’d like your input.  My only thought is
that much of the time no time is spent in thought
about design at all.  The “below par” programmer just sits down
and starts writing code.  Does anyone have any thoughts?


Tester or Noisemaker

Nick
Malik
has an intersting post about Testers and Noisemakers.

 

I like this post because it really hits home for
me.  In my tiny development group, we don’t have any testers. 
Therefore I am the perpetual noisemaker.  I challenge every bad design
(which is most of them).  I challenge every line of source code I see
(which is very few of them).  I drive my team lead crazy.  I try to
make our software “better”.  But in my eyes, no one else sees the benefit
of writing better software and using better designs.  The team has the
unfortunate property of cowboy style development being OK.

In this case I don’t view any such challenges to
the “bad things” as being CLM.  Rather if it does limit my carreer, then I
am better off for it, as this is not an environment in which I wish to
work.  Of course, I am not working at Microsoft like Nick.  Keep
fighting the good fight Nick.  Make Microsoft’s software better!  God
knows there is plent of need and room to do that.