<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss'><id>tag:blogger.com,1999:blog-956064359108114628</id><updated>2009-11-04T15:41:16.006+02:00</updated><title type='text'>MY(a)ware</title><subtitle type='html'>"By all means, do not use a hammer."
– IBM Manual, 1925</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://jalexoid.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/956064359108114628/posts/default'/><link rel='alternate' type='text/html' href='http://jalexoid.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/956064359108114628/posts/default?start-index=26&amp;max-results=25'/><author><name>JAlexoid</name><uri>http://www.blogger.com/profile/11226547359996333148</uri><email>noreply@blogger.com</email></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>30</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-956064359108114628.post-4631213891055145263</id><published>2009-11-04T15:41:00.000+02:00</published><updated>2009-11-04T15:41:16.013+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Testing'/><category scheme='http://www.blogger.com/atom/ns#' term='Selenium'/><title type='text'>Selenium the joy and horror - Cached page data, fails verification</title><content type='html'>Up until Selenium IDE was created, manual testing was such a PITA. Now we have Selenium, bus as all new technologies and tools, there are a few quirks there...&lt;br /&gt;&lt;br /&gt;If your tests are run very fast, and to save time you need them to be very fast, you will have issues with data verification.&lt;br /&gt;&lt;br /&gt;Firefox sometimes displays cached version of a page, even though all the possible parameters and headers have been set not to cache the page.&lt;br /&gt;I found that doing two &lt;b&gt;open&lt;/b&gt; commands in a row helps this problem most of the time.&lt;br /&gt;If, that does not help, then adding &lt;b&gt;pause 500&lt;/b&gt;&amp;nbsp; in between the &lt;b&gt;open&lt;/b&gt; commands helps.&lt;br /&gt;&lt;br /&gt;&lt;i&gt;&lt;b&gt;D&lt;/b&gt;efinitely turn off all panels of &lt;b&gt;F&lt;/b&gt;irebug!&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;Do not forget to set "Pragma: no-cache", "Expires: [right now]", "Last-modified: [two days ago]", "Cache-control" and other headers.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/956064359108114628-4631213891055145263?l=jalexoid.blogspot.com'/&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jalexoid.blogspot.com/feeds/4631213891055145263/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=956064359108114628&amp;postID=4631213891055145263' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/956064359108114628/posts/default/4631213891055145263'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/956064359108114628/posts/default/4631213891055145263'/><link rel='alternate' type='text/html' href='http://jalexoid.blogspot.com/2009/11/selenium-joy-and-horror-cached-page.html' title='Selenium the joy and horror - Cached page data, fails verification'/><author><name>JAlexoid</name><uri>http://www.blogger.com/profile/11226547359996333148</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='02183104841401283685'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-956064359108114628.post-3212554398587649293</id><published>2009-06-11T00:59:00.005+03:00</published><updated>2009-06-11T01:42:15.214+03:00</updated><title type='text'>The definitive guide of connecting Apache via LDAP SSL to ActiveDirectory + Subversion</title><content type='html'>&lt;span style="font-size:85%;"&gt;Being taken though hell I of configuring the damn authentication mechanism.&lt;br /&gt;I needed to integrate Apache with ActiveDirectory via LDAP SSL. The manual SUCKS! It does not say anything useful, except for the syntax of the directives.&lt;br /&gt;&lt;a href="http://www.jejik.com/articles/2007/06/apache_and_subversion_authentication_with_microsoft_active_directory/"&gt;This article&lt;/a&gt; was the most definitive of configuring the integration. But lacks the information about how to make the SSL work correctly.&lt;br /&gt;&lt;br /&gt;Here's the kicker, it is as simple as the following several elements(this is in the top of /etc/apache2/sites-available/default):&lt;br /&gt;# Make sure ve don't care about the server's certificate, because we don't&lt;br /&gt;LDAPVerifyServerCert off&lt;br /&gt;LDAPTrustedMode SSL&lt;br /&gt;# The server's client cert information: the cert and the matching private key&lt;br /&gt;LDAPTrustedGlobalCert CERT_BASE64 /etc/apache2/sites-available/cert1.pem&lt;br /&gt;LDAPTrustedGlobalCert KEY_BASE64 /etc/apache2/sites-available/key1.pem&lt;br /&gt;&lt;br /&gt;These go into the ROOT. Do not try to put them in the Location, nor Directory, nor VirtualHost.&lt;br /&gt;&lt;br /&gt;And the main change to enable the SSL transport:&lt;br /&gt;AuthLDAPURL "ldaps://adserver.example:636/DC=adserver,DC=example?sAMAccountName?sub?(objectClass=*)" SSL&lt;br /&gt;&lt;br /&gt;These are the steps:&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-weight: bold;font-size:85%;" &gt;1. Create the client Key and Certificate&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;br /&gt;&lt;br /&gt;The cert1.pem and key1.pem are created like &lt;a href="http://sial.org/howto/openssl/self-signed/"&gt;described here&lt;/a&gt;:&lt;br /&gt;&lt;br /&gt;&lt;kbd&gt;openssl genrsa 1024 &gt; &lt;/kbd&gt;key1.pem&lt;br /&gt;openssl req -new -x509 -nodes -sha1 -days 365 -key key1.pem &gt; cert1.pem&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-style: italic;font-size:85%;" &gt;For an additional configuration reduction bonus you can have it in one single file:&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-style: italic;font-size:85%;" &gt;cat cert1.pem key1.pem &gt; pcert.pem&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-style: italic;font-size:85%;" &gt;LDAPTrustedGlobalCert CERT_BASE64 /etc/apache2/sites-available/pcert.pem&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-weight: bold;font-size:85%;" &gt;2. Enable the correct modules on Apache HTTP Server 2.2.&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;br /&gt;&lt;br /&gt;On my Ubuntu system the module enabling is done like this:&lt;br /&gt;&lt;/span&gt;&lt;div class="de1"&gt;&lt;span style="font-size:85%;"&gt;sudo a2enmod alias&lt;/span&gt;&lt;/div&gt;&lt;div class="de1"&gt;&lt;span style="font-size:85%;"&gt;sudo &lt;/span&gt;&lt;span style="font-size:85%;"&gt;a2enmod auth_basic&lt;/span&gt;&lt;/div&gt;&lt;div class="de1"&gt;&lt;span style="font-size:85%;"&gt;sudo &lt;/span&gt;&lt;span style="font-size:85%;"&gt;a2enmod authnz_ldap&lt;/span&gt;&lt;/div&gt;&lt;div class="de1"&gt;&lt;span style="font-size:85%;"&gt;sudo &lt;/span&gt;&lt;span style="font-size:85%;"&gt;a2enmod authz_default&lt;/span&gt;&lt;/div&gt;&lt;div class="de1"&gt;&lt;span style="font-size:85%;"&gt;sudo &lt;/span&gt;&lt;span style="font-size:85%;"&gt;a2enmod authz_user&lt;/span&gt;&lt;/div&gt;&lt;div class="de1"&gt;&lt;span style="font-size:85%;"&gt;sudo &lt;/span&gt;&lt;span style="font-size:85%;"&gt;a2enmod dav&lt;/span&gt;&lt;/div&gt;&lt;div class="de1"&gt;&lt;span style="font-size:85%;"&gt;sudo &lt;/span&gt;&lt;span style="font-size:85%;"&gt;a2enmod dav_svn&lt;/span&gt;&lt;/div&gt;&lt;div class="de1"&gt;&lt;span style="font-size:85%;"&gt;sudo &lt;/span&gt;&lt;span style="font-size:85%;"&gt;a2enmod ldap&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;span style="font-size:85%;"&gt;&lt;br /&gt;Or uncomment these elements in the httpd.conf:&lt;br /&gt;LoadModule actions_module modules/mod_actions.so&lt;br /&gt;LoadModule auth_basic_module modules/mod_auth_basic.so&lt;br /&gt;LoadModule authn_default_module modules/mod_authn_default.so&lt;br /&gt;LoadModule authnz_ldap_module modules/mod_authnz_ldap.so&lt;br /&gt;LoadModule authz_host_module modules/mod_authz_host.so&lt;br /&gt;LoadModule authz_user_module modules/mod_authz_user.so&lt;br /&gt;LoadModule ldap_module modules/mod_ldap.so&lt;br /&gt;&lt;br /&gt;And the modules that are prescribed by the Subversion.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-weight: bold;font-size:85%;" &gt;3. The access restrictions&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-style: italic;"&gt; and Subversion&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The short info for configuring the access restrictions.&lt;br /&gt;This will allow people in the users in SVN Writers to commit and SVN Readers will be able to checkout and connect.&lt;br /&gt;&lt;br /&gt;&amp;lt;Location&amp;gt;&lt;br /&gt; # This enables Subversion&lt;br /&gt;DAV svn&lt;br /&gt;# Location of the Subversion repository&lt;br /&gt; SVNPath /home/ldaptest/&lt;br /&gt;&lt;br /&gt;# How we are going to get authenticated&lt;br /&gt;     AuthBasicProvider ldap&lt;br /&gt;     AuthType Basic&lt;br /&gt;     AuthzLDAPAuthoritative on&lt;br /&gt;     AuthName "My Subversion server"&lt;br /&gt;#The URL of the ActiveDirectory server&lt;br /&gt;     AuthLDAPURL "ldaps://adserver.example:636/DC=adserver,DC=example?sAMAccountName?sub?(objectClass=*)" SSL&lt;br /&gt;# Credentials for the Apache HTTP to connect to the A/D to issue queries&lt;br /&gt;     AuthLDAPBindDN "subversion@adserver.example"&lt;br /&gt;     AuthLDAPBindPassword 555&lt;br /&gt;&lt;br /&gt;# Limit all write operations to users within SVN Writers group&lt;br /&gt; &amp;lt;LimitExcept&amp;gt;&lt;br /&gt;     require ldap-group CN=SVN Writers,CN=Users,DC=adserver,DC=example&lt;br /&gt; &amp;lt;/LimitExcept&amp;gt;&lt;br /&gt;# Limit logon and reading to only users in SVN Readers group&lt;br /&gt; require ldap-group CN=SVN Readers,CN=Users,DC=adserver,DC=example&lt;br /&gt;&amp;lt;/Location&amp;gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-weight: bold;font-size:85%;" &gt;4. Add the following to the default site on Apache HTTP&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;br /&gt;&lt;br /&gt;The file is&lt;/span&gt;&lt;span style="font-style: italic;font-size:85%;" &gt; /etc/apache2/sites-available/default&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;br /&gt;Right at the TOP.&lt;br /&gt;&lt;br /&gt;# Make sure ve don't care about the server's certificate, because we don't&lt;br /&gt;LDAPVerifyServerCert off&lt;br /&gt;LDAPTrustedMode SSL&lt;br /&gt;# The server's client cert information: the cert and the matching private key&lt;br /&gt;LDAPTrustedGlobalCert CERT_BASE64 /etc/apache2/sites-available/cert1.pem&lt;br /&gt;LDAPTrustedGlobalCert KEY_BASE64 /etc/apache2/sites-available/key1.pem&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/956064359108114628-3212554398587649293?l=jalexoid.blogspot.com'/&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jalexoid.blogspot.com/feeds/3212554398587649293/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=956064359108114628&amp;postID=3212554398587649293' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/956064359108114628/posts/default/3212554398587649293'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/956064359108114628/posts/default/3212554398587649293'/><link rel='alternate' type='text/html' href='http://jalexoid.blogspot.com/2009/06/definitive-guide-of-connecting-apache.html' title='The definitive guide of connecting Apache via LDAP SSL to ActiveDirectory + Subversion'/><author><name>JAlexoid</name><uri>http://www.blogger.com/profile/11226547359996333148</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='02183104841401283685'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-956064359108114628.post-3976655605718722301</id><published>2009-06-02T11:16:00.006+03:00</published><updated>2009-06-02T11:21:47.440+03:00</updated><title type='text'>Be careful how you truncate...</title><content type='html'>Here's one example how truncation has made the entry look like it's a conspiracy theorists' website:&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_ezkkvgwuhpQ/SiTgPSyFusI/AAAAAAAAAAM/vl0tbZBGIgI/s1600-h/Instructables-I.did.not.post.it.gif"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://1.bp.blogspot.com/_ezkkvgwuhpQ/SiTgPSyFusI/AAAAAAAAAAM/vl0tbZBGIgI/s320/Instructables-I.did.not.post.it.gif" alt="" id="BLOGGER_PHOTO_ID_5342641611312839362" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;The text below reads:"...See the video at the end for the Test Results!   NOT...posted by Kipay".&lt;br /&gt;&lt;br /&gt;This one is from &lt;a href="http://www.instructables.com/id/Computer_Recycling_and_Repurposing/"&gt;Instructibles&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/956064359108114628-3976655605718722301?l=jalexoid.blogspot.com'/&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jalexoid.blogspot.com/feeds/3976655605718722301/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=956064359108114628&amp;postID=3976655605718722301' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/956064359108114628/posts/default/3976655605718722301'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/956064359108114628/posts/default/3976655605718722301'/><link rel='alternate' type='text/html' href='http://jalexoid.blogspot.com/2009/06/be-careful-how-you-truncate.html' title='Be careful how you truncate...'/><author><name>JAlexoid</name><uri>http://www.blogger.com/profile/11226547359996333148</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='02183104841401283685'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_ezkkvgwuhpQ/SiTgPSyFusI/AAAAAAAAAAM/vl0tbZBGIgI/s72-c/Instructables-I.did.not.post.it.gif' height='72' width='72'/><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-956064359108114628.post-7853136957451377277</id><published>2009-05-24T22:30:00.006+03:00</published><updated>2009-05-24T23:17:44.259+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Business Analysis'/><title type='text'>5 signs of a hijacked client</title><content type='html'>&lt;span style="font-weight: bold;"&gt;The context rant&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;While doing my main line of work, I never shy away from doing some consultancy work for clients. And I mean no programming, I mean business operation consultancy. Though I am a application development consultant and application developer, I do have enough experience to identify when a company has issues with overhead in work. I mean premature optimization is what a lot of programmers are all about and sometimes the business side benefits from that very well.&lt;br /&gt;&lt;br /&gt;For the topic at hand. I had this good friend nagging me for a long amount of time for a consult. He is a successful businessman and no one in their right mind would call his business a failure. It's a nice Anonymous LTD that manages to turn over a few million euros per year with 12 people. So I signed up. I do not consider charging my friends for any non technical work. Since I follow the ideology of having a lot of friends at the expense of quick income.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;The "motherload&lt;/span&gt;"&lt;br /&gt;&lt;br /&gt;So I started rather quickly on analyzing Anonymous LTD. The analysis part was quite fun and easy. I liked talking to people and they gladly shared all of the positives and negatives of their work. Some even had suggestions :) And that is where I started to suspect that something was wrong.&lt;br /&gt;&lt;ol&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;The employees are de facto subordinate non management staff.&lt;/span&gt;&lt;br /&gt;The sales people were "afraid"(read subordinate) of not the management, but to the accounting. Yeah, that is when I had the first WTF moment.&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;There is a department that everyone tries to please, and not the management.&lt;/span&gt;&lt;br /&gt;The sales and other employees felt that they were somehow more dependent on accounting rather then the strategical management. Remember, accounting is a support operation in non accounting related companies.&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;The management displays uncertainty and consults some department on business matters.&lt;/span&gt;(Legal and purely technical are different stories)&lt;br /&gt;Really, when I went on to ask why the hell was there no CEO in the company, my friend, the director called up head of accounting to ask!!!!&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;You present a solution that improves managerial oversight and operations visibility and it's shot down by management.&lt;/span&gt;&lt;br /&gt;I proposed a new reporting tool/function, that was integrated into the stock tracking and order system. The director and top sales manager said: "Wow! Great! We really want it!". And two days later, they cut out the functionality, because it had not enough financial data(the stock tracking and order system, was not suppose to have any financial info).&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;The management's position changes whenever the company gets new, non management level,  people on board.&lt;/span&gt;&lt;br /&gt;I already had the contract secured and signed. The company that was suppose to perform the work was selected and already analyzing requirements. Great! I thought. Then a new person is hired into the sales team. The contract is cancelled, because of hudge requirements changes.&lt;/li&gt;&lt;/ol&gt; The company had an issue with their &lt;span style="font-style: italic;"&gt;stock to quote to order to delivery&lt;/span&gt; operation. It is unreliable and overburdened by out of date data. They still don't have any automation of warehouse stock information. Why? Because the new head sales-person wants to see a dashboard with all the client's information orders, payment statuses, credit and in real time and the accounting do not want to let that information out of their hands.&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;span style="font-style: italic;"&gt;That is what I call a hijacked company:&lt;/span&gt;&lt;br /&gt;   &lt;span style="font-weight: bold;"&gt;A company that is taken over by a nonessential department and weak, collaborating, management.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;    Be very, very careful, it's a trap of uncertainty.&lt;/span&gt;&lt;br /&gt;&lt;/blockquote&gt;&lt;span style="font-weight: bold;"&gt;Aftermath&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;I managed to push trough a CEO for the company, because the managing director was and is my friend and a little too soft. And last time I checked, he still keeps accounting at bay and the director is non managing.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/956064359108114628-7853136957451377277?l=jalexoid.blogspot.com'/&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jalexoid.blogspot.com/feeds/7853136957451377277/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=956064359108114628&amp;postID=7853136957451377277' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/956064359108114628/posts/default/7853136957451377277'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/956064359108114628/posts/default/7853136957451377277'/><link rel='alternate' type='text/html' href='http://jalexoid.blogspot.com/2009/05/5-signs-of-hijacked-client.html' title='5 signs of a hijacked client'/><author><name>JAlexoid</name><uri>http://www.blogger.com/profile/11226547359996333148</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='02183104841401283685'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-956064359108114628.post-8873306676854379085</id><published>2009-03-22T23:38:00.010+02:00</published><updated>2009-03-23T07:32:41.939+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Concurrency'/><category scheme='http://www.blogger.com/atom/ns#' term='architecture'/><category scheme='http://www.blogger.com/atom/ns#' term='rants'/><title type='text'>Why is software not that scalable?</title><content type='html'>&lt;span style="font-weight: bold;font-size:85%;" &gt;(FYI: This is a 3 AM rant, so don't take it too hard, if anyone reads this at all)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Most software out there relies so much on shared data, that it does not easily scale.&lt;br /&gt;&lt;br /&gt;The problem with that is, that somehow developers don't understand that most of the time the data may be allowed to be stale(though still relevant) - see how Amazon Dynamo's clients handle it. Or that most data is accessed only by one process at a time.&lt;br /&gt;In fact, when looking at human interaction systems we see that most of the data is stale when people perform a certain task.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Here are some point that I describe below&lt;/span&gt;:&lt;ul&gt;&lt;li&gt;Allow data to be stale, there is very little reason of making sure everything is always up to date all the time, spread the data as much as possible&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Check out the data access patterns, most data is access&lt;/li&gt;&lt;li&gt;Understand that need for data does not involve one process/thread being hung up on one resource&lt;/li&gt;&lt;li&gt;If you need stuff to be up-to-date in real time, share the responsibility - aggregating data is faster and easier&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;On the freshness of data. &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Sample from most of the governmental institutions: laws and regulations have a time of activation that is shared in advance. A lot of decisions are made at a low level without checking the central(at a national level) legal repository every time. That is when data is stale, but still very much relevant.&lt;br /&gt;&lt;br /&gt;Sample from most businesses: business rules are much more dynamic than at the governmental institution, but still we see that most of them change very little. Sure you can change it at once, but you would never expect any of you own businesses employees to act on the changed rules, until the employee gets the message about a change in the rules.&lt;br /&gt;&lt;br /&gt;Sample from every society that has laws that change or may be changed: when a law is passed, you don't know that is has changes some other law or made something illegal or legal instantly. It has a date of coming into force. Up until then every person will know most important laws that are in effect and when the new law comes into effect.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Then there is the access to data.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Sample from banking: chances are that there will be no more than ONE "process" using an account data at a time. In fact, I bet that, the absolute majority of operations are performed by one process accessing ONE account. The reality is, that the only part that the bank needs to be absolutely sure about is the "credit" operation(Say bye to "credit-&gt;debit|undo transaction"). The debit operation can be reasonably fast in asynchronous mode and can send notification of a failure.&lt;br /&gt;&lt;br /&gt;Sample from real life: if you don't find your personal mug in the cupboard you don't just stand at the cupboard until someone returns it! You go and look around. The mug is the data here and the person is the process. Standing and waiting for it ti be returned is equivalent of locking a resource.&lt;br /&gt;As this sample shows, locking and waiting is not always the best option. The reality is, that it's not the process that has taken the resource that locks, it's the waiting resource that locks and waits.&lt;br /&gt;&lt;br /&gt;My proposed strategy, is &lt;span style="font-style: italic;"&gt;acquire ownership of the data and leave a note stating who knows it's whereabouts&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;span style="font-weight: bold;"&gt;So the morale is don't lock, but take. Don't wait, but look around.&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;Now. I can't really comment on systems where real time data is essential. But in medicine real time means means the difference between life and death. But those systems are embarrassingly parallelizable.&lt;br /&gt;&lt;br /&gt;Remember, our world works on &lt;span style="font-weight: bold;"&gt;Eventually Consistent Model&lt;/span&gt;, &lt;span style="font-style: italic;"&gt;not&lt;/span&gt; the, &lt;span style="font-style: italic;"&gt;ironically fatally named&lt;/span&gt;, &lt;span style="font-weight: bold;"&gt;ACID&lt;/span&gt; one.&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: center; font-weight: bold;"&gt;Just look around, the world is already massively parallel, why create new ideas when mother nature has provided us with a lot of the answers.&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/956064359108114628-8873306676854379085?l=jalexoid.blogspot.com'/&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jalexoid.blogspot.com/feeds/8873306676854379085/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=956064359108114628&amp;postID=8873306676854379085' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/956064359108114628/posts/default/8873306676854379085'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/956064359108114628/posts/default/8873306676854379085'/><link rel='alternate' type='text/html' href='http://jalexoid.blogspot.com/2009/03/why-is-software-not-that-scalable.html' title='Why is software not that scalable?'/><author><name>JAlexoid</name><uri>http://www.blogger.com/profile/11226547359996333148</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='02183104841401283685'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-956064359108114628.post-8952808728052379296</id><published>2009-03-07T12:59:00.001+02:00</published><updated>2009-03-07T13:00:43.324+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Wow moments in technology'/><title type='text'>WOW! Moment</title><content type='html'>Rarely do I go "Wow!". But this is something incredible!&lt;br /&gt;Check out &lt;a href="http://adaptivepath.com/aurora/"&gt;Aurora Concept&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/956064359108114628-8952808728052379296?l=jalexoid.blogspot.com'/&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jalexoid.blogspot.com/feeds/8952808728052379296/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=956064359108114628&amp;postID=8952808728052379296' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/956064359108114628/posts/default/8952808728052379296'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/956064359108114628/posts/default/8952808728052379296'/><link rel='alternate' type='text/html' href='http://jalexoid.blogspot.com/2009/03/wow-moment.html' title='WOW! Moment'/><author><name>JAlexoid</name><uri>http://www.blogger.com/profile/11226547359996333148</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='02183104841401283685'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-956064359108114628.post-8552361519917852908</id><published>2008-12-25T14:43:00.003+02:00</published><updated>2008-12-25T16:09:24.087+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='JSF'/><category scheme='http://www.blogger.com/atom/ns#' term='Techniques'/><category scheme='http://www.blogger.com/atom/ns#' term='Hibernate'/><title type='text'>Make your Hibernate data objects smart?</title><content type='html'>In a race to learn Hibernate and create products for my former job, I have found a simple way to make my Hibernate data objects smarter.&lt;br /&gt;We all know th standard way to access the Hibernate session using the SessionHolder*.&lt;br /&gt;&lt;br /&gt;This is a basic abstract class(shown below) that will add the .add(), .update() and .delete() methods to your data objects.&lt;br /&gt;&lt;br /&gt;Just extend this class by your Hibernate DTO like this:&lt;br /&gt;  public class Address extends BaseData&lt;br /&gt;&lt;br /&gt;And then just after populating the new Address object, you write address.add().&lt;br /&gt;&lt;div style="overflow: auto;"&gt;&lt;br /&gt;&lt;pre class="java"&gt;&lt;ol&gt;&lt;li style="background: rgb(240, 240, 240) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;div  style="font-weight: normal;font-family:'Courier New',Courier,monospace;"&gt;&lt;span style="color: rgb(0, 0, 0); font-weight: bold;"&gt;public&lt;/span&gt; &lt;span style="color: rgb(0, 0, 0); font-weight: bold;"&gt;abstract&lt;/span&gt; &lt;span style="color: rgb(0, 0, 0); font-weight: bold;"&gt;class&lt;/span&gt; BaseData &lt;span style="color: rgb(0, 0, 0); font-weight: bold;"&gt;implements&lt;/span&gt; &lt;a href="http://www.google.com/search?hl=en&amp;amp;q=allinurl%3ASerializable+java.sun.com&amp;amp;bntI=I%27m%20Feeling%20Lucky"&gt;&lt;span style="color: rgb(170, 170, 221); font-weight: bold;"&gt;Serializable&lt;/span&gt;&lt;/a&gt; &lt;span style="color: rgb(102, 204, 102);"&gt;{&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style="background: rgb(252, 252, 252) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;div  style="font-weight: normal;font-family:'Courier New',Courier,monospace;"&gt; &lt;/div&gt;&lt;/li&gt;&lt;li style="background: rgb(240, 240, 240) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;div  style="font-weight: normal;font-family:'Courier New',Courier,monospace;"&gt;    &lt;span style="color: rgb(0, 0, 0); font-weight: bold;"&gt;public&lt;/span&gt; &lt;a href="http://www.google.com/search?hl=en&amp;amp;q=allinurl%3AString+java.sun.com&amp;amp;bntI=I%27m%20Feeling%20Lucky"&gt;&lt;span style="color: rgb(170, 170, 221); font-weight: bold;"&gt;String&lt;/span&gt;&lt;/a&gt; add&lt;span style="color: rgb(102, 204, 102);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;{&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style="background: rgb(252, 252, 252) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;div  style="font-weight: normal;font-family:'Courier New',Courier,monospace;"&gt; &lt;/div&gt;&lt;/li&gt;&lt;li style="background: rgb(240, 240, 240) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;div  style="font-weight: normal;font-family:'Courier New',Courier,monospace;"&gt;        &lt;span style="color: rgb(0, 0, 0); font-weight: bold;"&gt;try&lt;/span&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;{&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style="background: rgb(252, 252, 252) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;div  style="font-weight: normal;font-family:'Courier New',Courier,monospace;"&gt; &lt;/div&gt;&lt;/li&gt;&lt;li style="background: rgb(240, 240, 240) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;div  style="font-weight: normal;font-family:'Courier New',Courier,monospace;"&gt;            SessionHolder.&lt;span style="color: rgb(0, 102, 0);"&gt;currentSession&lt;/span&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;)&lt;/span&gt;.&lt;span style="color: rgb(0, 102, 0);"&gt;getSess&lt;/span&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;)&lt;/span&gt;.&lt;span style="color: rgb(0, 102, 0);"&gt;save&lt;/span&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0); font-weight: bold;"&gt;this&lt;/span&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;)&lt;/span&gt;;&lt;/div&gt;&lt;/li&gt;&lt;li style="background: rgb(252, 252, 252) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;div  style="font-weight: normal;font-family:'Courier New',Courier,monospace;"&gt; &lt;/div&gt;&lt;/li&gt;&lt;li style="background: rgb(240, 240, 240) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;div  style="font-weight: normal;font-family:'Courier New',Courier,monospace;"&gt;            SessionHolder.&lt;span style="color: rgb(0, 102, 0);"&gt;currentSession&lt;/span&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;)&lt;/span&gt;.&lt;span style="color: rgb(0, 102, 0);"&gt;getSess&lt;/span&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;)&lt;/span&gt;.&lt;span style="color: rgb(0, 102, 0);"&gt;flush&lt;/span&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;)&lt;/span&gt;;&lt;/div&gt;&lt;/li&gt;&lt;li style="background: rgb(252, 252, 252) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;div  style="font-weight: normal;font-family:'Courier New',Courier,monospace;"&gt; &lt;/div&gt;&lt;/li&gt;&lt;li style="background: rgb(240, 240, 240) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;div  style="font-weight: normal;font-family:'Courier New',Courier,monospace;"&gt;        &lt;span style="color: rgb(102, 204, 102);"&gt;}&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0); font-weight: bold;"&gt;catch&lt;/span&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;(&lt;/span&gt;&lt;a href="http://www.google.com/search?hl=en&amp;amp;q=allinurl%3AException+java.sun.com&amp;amp;bntI=I%27m%20Feeling%20Lucky"&gt;&lt;span style="color: rgb(170, 170, 221); font-weight: bold;"&gt;Exception&lt;/span&gt;&lt;/a&gt; ex&lt;span style="color: rgb(102, 204, 102);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;{&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style="background: rgb(252, 252, 252) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;div  style="font-weight: normal;font-family:'Courier New',Courier,monospace;"&gt; &lt;/div&gt;&lt;/li&gt;&lt;li style="background: rgb(240, 240, 240) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;div  style="font-weight: normal;font-family:'Courier New',Courier,monospace;"&gt;            SessionHolder.&lt;span style="color: rgb(0, 102, 0);"&gt;endSession&lt;/span&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;)&lt;/span&gt;;&lt;/div&gt;&lt;/li&gt;&lt;li style="background: rgb(252, 252, 252) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;div  style="font-weight: normal;font-family:'Courier New',Courier,monospace;"&gt; &lt;/div&gt;&lt;/li&gt;&lt;li style="background: rgb(240, 240, 240) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;div  style="font-weight: normal;font-family:'Courier New',Courier,monospace;"&gt;            ex.&lt;span style="color: rgb(0, 102, 0);"&gt;printStackTrace&lt;/span&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;)&lt;/span&gt;;&lt;/div&gt;&lt;/li&gt;&lt;li style="background: rgb(252, 252, 252) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;div  style="font-weight: normal;font-family:'Courier New',Courier,monospace;"&gt; &lt;/div&gt;&lt;/li&gt;&lt;li style="background: rgb(240, 240, 240) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;div  style="font-weight: normal;font-family:'Courier New',Courier,monospace;"&gt;            Messenger.&lt;span style="color: rgb(0, 102, 0);"&gt;addFatalMessage&lt;/span&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;(&lt;/span&gt;ex.&lt;span style="color: rgb(0, 102, 0);"&gt;getMessage&lt;/span&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;)&lt;/span&gt;,ex.&lt;span style="color: rgb(0, 102, 0);"&gt;getMessage&lt;/span&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;)&lt;/span&gt;;&lt;/div&gt;&lt;/li&gt;&lt;li style="background: rgb(252, 252, 252) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;div  style="font-weight: normal;font-family:'Courier New',Courier,monospace;"&gt; &lt;/div&gt;&lt;/li&gt;&lt;li style="background: rgb(240, 240, 240) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;div  style="font-weight: normal;font-family:'Courier New',Courier,monospace;"&gt;            &lt;span style="color: rgb(0, 0, 0); font-weight: bold;"&gt;return&lt;/span&gt; StandardResults.&lt;span style="color: rgb(0, 102, 0);"&gt;FAIL&lt;/span&gt;;&lt;/div&gt;&lt;/li&gt;&lt;li style="background: rgb(252, 252, 252) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;div face="'Courier New',Courier,monospace" style="font-weight: normal;"&gt; &lt;/div&gt;&lt;/li&gt;&lt;li style="background: rgb(240, 240, 240) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;div face="'Courier New',Courier,monospace" style="font-weight: normal;"&gt;        &lt;span style="color: rgb(102, 204, 102);"&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style="background: rgb(252, 252, 252) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;div face="'Courier New',Courier,monospace" style="font-weight: normal;"&gt; &lt;/div&gt;&lt;/li&gt;&lt;li style="background: rgb(240, 240, 240) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;div face="'Courier New',Courier,monospace" style="font-weight: normal;"&gt;        &lt;span style="color: rgb(0, 0, 0); font-weight: bold;"&gt;return&lt;/span&gt; StandartResults.&lt;span style="color: rgb(0, 102, 0);"&gt;SUCCESS&lt;/span&gt;;&lt;/div&gt;&lt;/li&gt;&lt;li style="background: rgb(252, 252, 252) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;div face="'Courier New',Courier,monospace" style="font-weight: normal;"&gt; &lt;/div&gt;&lt;/li&gt;&lt;li style="background: rgb(240, 240, 240) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;div face="'Courier New',Courier,monospace" style="font-weight: normal;"&gt;    &lt;span style="color: rgb(102, 204, 102);"&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style="background: rgb(252, 252, 252) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;div face="'Courier New',Courier,monospace" style="font-weight: normal;"&gt; &lt;/div&gt;&lt;/li&gt;&lt;li style="background: rgb(240, 240, 240) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;div face="'Courier New',Courier,monospace" style="font-weight: normal;"&gt;    &lt;span style="color: rgb(0, 0, 0); font-weight: bold;"&gt;public&lt;/span&gt; &lt;a href="http://www.google.com/search?hl=en&amp;amp;q=allinurl%3AString+java.sun.com&amp;amp;bntI=I%27m%20Feeling%20Lucky"&gt;&lt;span style="color: rgb(170, 170, 221); font-weight: bold;"&gt;String&lt;/span&gt;&lt;/a&gt; update&lt;span style="color: rgb(102, 204, 102);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;{&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style="background: rgb(252, 252, 252) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;div face="'Courier New',Courier,monospace" style="font-weight: normal;"&gt; &lt;/div&gt;&lt;/li&gt;&lt;li style="background: rgb(240, 240, 240) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;div face="'Courier New',Courier,monospace" style="font-weight: normal;"&gt;        &lt;span style="color: rgb(0, 0, 0); font-weight: bold;"&gt;try&lt;/span&gt; &lt;span style="color: rgb(102, 204, 102);"&gt;{&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style="background: rgb(252, 252, 252) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;div face="'Courier New',Courier,monospace" style="font-weight: normal;"&gt; &lt;/div&gt;&lt;/li&gt;&lt;li style="background: rgb(240, 240, 240) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;div face="'Courier New',Courier,monospace" style="font-weight: normal;"&gt;            SessionHolder.&lt;span style="color: rgb(0, 102, 0);"&gt;currentSession&lt;/span&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;)&lt;/span&gt;.&lt;span style="color: rgb(0, 102, 0);"&gt;getSess&lt;/span&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;)&lt;/span&gt;.&lt;span style="color: rgb(0, 102, 0);"&gt;update&lt;/span&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0); font-weight: bold;"&gt;this&lt;/span&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;)&lt;/span&gt;;&lt;/div&gt;&lt;/li&gt;&lt;li style="background: rgb(252, 252, 252) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;div face="'Courier New',Courier,monospace" style="font-weight: normal;"&gt; &lt;/div&gt;&lt;/li&gt;&lt;li style="background: rgb(240, 240, 240) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;div face="'Courier New',Courier,monospace" style="font-weight: normal;"&gt;            SessionHolder.&lt;span style="color: rgb(0, 102, 0);"&gt;currentSession&lt;/span&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;)&lt;/span&gt;.&lt;span style="color: rgb(0, 102, 0);"&gt;getSess&lt;/span&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;)&lt;/span&gt;.&lt;span style="color: rgb(0, 102, 0);"&gt;flush&lt;/span&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;)&lt;/span&gt;;&lt;/div&gt;&lt;/li&gt;&lt;li style="background: rgb(252, 252, 252) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;div face="'Courier New',Courier,monospace" style="font-weight: normal;"&gt; &lt;/div&gt;&lt;/li&gt;&lt;li style="background: rgb(240, 240, 240) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;div face="'Courier New',Courier,monospace" style="font-weight: normal;"&gt;            &lt;span style="color: rgb(0, 0, 0); font-weight: bold;"&gt;return&lt;/span&gt; StandartResults.&lt;span style="color: rgb(0, 102, 0);"&gt;SUCCESS&lt;/span&gt;;&lt;/div&gt;&lt;/li&gt;&lt;li style="background: rgb(252, 252, 252) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;div face="'Courier New',Courier,monospace" style="font-weight: normal;"&gt; &lt;/div&gt;&lt;/li&gt;&lt;li style="background: rgb(240, 240, 240) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;div face="'Courier New',Courier,monospace" style="font-weight: normal;"&gt;        &lt;span style="color: rgb(102, 204, 102);"&gt;}&lt;/span&gt; &lt;span style="color: rgb(0, 0, 0); font-weight: bold;"&gt;catch&lt;/span&gt; &lt;span style="color: rgb(102, 204, 102);"&gt;(&lt;/span&gt;&lt;a href="http://www.google.com/search?hl=en&amp;amp;q=allinurl%3AException+java.sun.com&amp;amp;bntI=I%27m%20Feeling%20Lucky"&gt;&lt;span style="color: rgb(170, 170, 221); font-weight: bold;"&gt;Exception&lt;/span&gt;&lt;/a&gt; ex&lt;span style="color: rgb(102, 204, 102);"&gt;)&lt;/span&gt; &lt;span style="color: rgb(102, 204, 102);"&gt;{&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style="background: rgb(252, 252, 252) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;div face="'Courier New',Courier,monospace" style="font-weight: normal;"&gt; &lt;/div&gt;&lt;/li&gt;&lt;li style="background: rgb(240, 240, 240) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"&gt;            SessionHolder.&lt;span style="color: rgb(0, 102, 0);"&gt;endSession&lt;/span&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;)&lt;/span&gt;;&lt;/div&gt;&lt;/li&gt;&lt;li style="background: rgb(252, 252, 252) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"&gt; &lt;/div&gt;&lt;/li&gt;&lt;li style="background: rgb(240, 240, 240) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"&gt;            ex.&lt;span style="color: rgb(0, 102, 0);"&gt;printStackTrace&lt;/span&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;)&lt;/span&gt;;&lt;/div&gt;&lt;/li&gt;&lt;li style="background: rgb(252, 252, 252) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"&gt; &lt;/div&gt;&lt;/li&gt;&lt;li style="background: rgb(240, 240, 240) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"&gt;            Messenger.&lt;span style="color: rgb(0, 102, 0);"&gt;addFatalMessage&lt;/span&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;(&lt;/span&gt;ex.&lt;span style="color: rgb(0, 102, 0);"&gt;getMessage&lt;/span&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;)&lt;/span&gt;,ex.&lt;span style="color: rgb(0, 102, 0);"&gt;getMessage&lt;/span&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;)&lt;/span&gt;;&lt;/div&gt;&lt;/li&gt;&lt;li style="background: rgb(252, 252, 252) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"&gt; &lt;/div&gt;&lt;/li&gt;&lt;li style="background: rgb(240, 240, 240) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"&gt;            &lt;span style="color: rgb(0, 0, 0); font-weight: bold;"&gt;return&lt;/span&gt; StandardResults.&lt;span style="color: rgb(0, 102, 0);"&gt;FAIL&lt;/span&gt;;&lt;/div&gt;&lt;/li&gt;&lt;li style="background: rgb(252, 252, 252) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"&gt; &lt;/div&gt;&lt;/li&gt;&lt;li style="background: rgb(240, 240, 240) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"&gt;        &lt;span style="color: rgb(102, 204, 102);"&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style="background: rgb(252, 252, 252) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"&gt; &lt;/div&gt;&lt;/li&gt;&lt;li style="background: rgb(240, 240, 240) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"&gt;    &lt;span style="color: rgb(102, 204, 102);"&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style="background: rgb(252, 252, 252) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"&gt; &lt;/div&gt;&lt;/li&gt;&lt;li style="background: rgb(240, 240, 240) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"&gt;    &lt;span style="color: rgb(0, 0, 0); font-weight: bold;"&gt;public&lt;/span&gt; &lt;a href="http://www.google.com/search?hl=en&amp;amp;q=allinurl%3AString+java.sun.com&amp;amp;bntI=I%27m%20Feeling%20Lucky"&gt;&lt;span style="color: rgb(170, 170, 221); font-weight: bold;"&gt;String&lt;/span&gt;&lt;/a&gt; delete&lt;span style="color: rgb(102, 204, 102);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;{&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style="background: rgb(252, 252, 252) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"&gt; &lt;/div&gt;&lt;/li&gt;&lt;li style="background: rgb(240, 240, 240) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"&gt;        &lt;span style="color: rgb(0, 0, 0); font-weight: bold;"&gt;try&lt;/span&gt; &lt;span style="color: rgb(102, 204, 102);"&gt;{&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style="background: rgb(252, 252, 252) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"&gt; &lt;/div&gt;&lt;/li&gt;&lt;li style="background: rgb(240, 240, 240) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"&gt;            SessionHolder.&lt;span style="color: rgb(0, 102, 0);"&gt;currentSession&lt;/span&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;)&lt;/span&gt;.&lt;span style="color: rgb(0, 102, 0);"&gt;getSess&lt;/span&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;)&lt;/span&gt;.&lt;span style="color: rgb(0, 102, 0);"&gt;delete&lt;/span&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0); font-weight: bold;"&gt;this&lt;/span&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;)&lt;/span&gt;;&lt;/div&gt;&lt;/li&gt;&lt;li style="background: rgb(252, 252, 252) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"&gt; &lt;/div&gt;&lt;/li&gt;&lt;li style="background: rgb(240, 240, 240) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"&gt;            SessionHolder.&lt;span style="color: rgb(0, 102, 0);"&gt;currentSession&lt;/span&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;)&lt;/span&gt;.&lt;span style="color: rgb(0, 102, 0);"&gt;getSess&lt;/span&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;)&lt;/span&gt;.&lt;span style="color: rgb(0, 102, 0);"&gt;flush&lt;/span&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;)&lt;/span&gt;;&lt;/div&gt;&lt;/li&gt;&lt;li style="background: rgb(252, 252, 252) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"&gt; &lt;/div&gt;&lt;/li&gt;&lt;li style="background: rgb(240, 240, 240) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"&gt;            &lt;span style="color: rgb(0, 0, 0); font-weight: bold;"&gt;return&lt;/span&gt; StandartResults.&lt;span style="color: rgb(0, 102, 0);"&gt;SUCCESS&lt;/span&gt;;&lt;/div&gt;&lt;/li&gt;&lt;li style="background: rgb(252, 252, 252) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"&gt; &lt;/div&gt;&lt;/li&gt;&lt;li style="background: rgb(240, 240, 240) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"&gt;        &lt;span style="color: rgb(102, 204, 102);"&gt;}&lt;/span&gt; &lt;span style="color: rgb(0, 0, 0); font-weight: bold;"&gt;catch&lt;/span&gt; &lt;span style="color: rgb(102, 204, 102);"&gt;(&lt;/span&gt;HibernateException ex&lt;span style="color: rgb(102, 204, 102);"&gt;)&lt;/span&gt; &lt;span style="color: rgb(102, 204, 102);"&gt;{&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style="background: rgb(252, 252, 252) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"&gt; &lt;/div&gt;&lt;/li&gt;&lt;li style="background: rgb(240, 240, 240) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"&gt;            SessionHolder.&lt;span style="color: rgb(0, 102, 0);"&gt;endSession&lt;/span&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;)&lt;/span&gt;;&lt;/div&gt;&lt;/li&gt;&lt;li style="background: rgb(252, 252, 252) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"&gt; &lt;/div&gt;&lt;/li&gt;&lt;li style="background: rgb(240, 240, 240) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"&gt;            ex.&lt;span style="color: rgb(0, 102, 0);"&gt;printStackTrace&lt;/span&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;)&lt;/span&gt;;&lt;/div&gt;&lt;/li&gt;&lt;li style="background: rgb(252, 252, 252) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"&gt; &lt;/div&gt;&lt;/li&gt;&lt;li style="background: rgb(240, 240, 240) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"&gt;            Messenger.&lt;span style="color: rgb(0, 102, 0);"&gt;addFatalMessage&lt;/span&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;(&lt;/span&gt;ex.&lt;span style="color: rgb(0, 102, 0);"&gt;getMessage&lt;/span&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;)&lt;/span&gt;,ex.&lt;span style="color: rgb(0, 102, 0);"&gt;getMessage&lt;/span&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;)&lt;/span&gt;;&lt;/div&gt;&lt;/li&gt;&lt;li style="background: rgb(252, 252, 252) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"&gt; &lt;/div&gt;&lt;/li&gt;&lt;li style="background: rgb(240, 240, 240) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"&gt;            &lt;span style="color: rgb(0, 0, 0); font-weight: bold;"&gt;return&lt;/span&gt; StandardResults.&lt;span style="color: rgb(0, 102, 0);"&gt;FAIL&lt;/span&gt;;&lt;/div&gt;&lt;/li&gt;&lt;li style="background: rgb(252, 252, 252) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"&gt; &lt;/div&gt;&lt;/li&gt;&lt;li style="background: rgb(240, 240, 240) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"&gt;        &lt;span style="color: rgb(102, 204, 102);"&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style="background: rgb(252, 252, 252) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"&gt; &lt;/div&gt;&lt;/li&gt;&lt;li style="background: rgb(240, 240, 240) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"&gt;    &lt;span style="color: rgb(102, 204, 102);"&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style="background: rgb(252, 252, 252) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"&gt;   &lt;/div&gt;&lt;/li&gt;&lt;li style="background: rgb(240, 240, 240) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"&gt; &lt;/div&gt;&lt;/li&gt;&lt;li style="background: rgb(252, 252, 252) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/pre&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;This particular class was designed to be used in a JSF web application. Hence, the return types for methods are String's and there is a reference to StandardResults and Messenger class.&lt;br /&gt;Messenger class is a generic class to present the user with a message.&lt;br /&gt;StandardResults is what it's name stands for.&lt;br /&gt;&lt;br /&gt;Please note, this may be used in JSF tables and lists only in places where the data is changed rarely or not concurrently.&lt;br /&gt;But placing this element in a column in a h:dataTable will work as intended:&lt;br /&gt;  &lt;h:commandlink action="#{item.delete}" onclick="if(!confirm('?')){ return;}"&gt;&lt;br /&gt;      &lt;h:outputtext value="X"&gt;&lt;br /&gt;  &lt;/h:outputtext&gt;&lt;br /&gt;&lt;br /&gt;Also on your edit form page, you may use it without any potential problems, like this:&lt;br /&gt;   &lt;h:commandbutton action="#{dtoThatIsBeingEdited.update}" value="Save changes"&gt;&lt;br /&gt;&lt;br /&gt;And on your new entry form page similarly:&lt;br /&gt;  &lt;h:commandbutton action="#{dtoThatIsBeingCreated.add}" value="Create entry"&gt;&lt;br /&gt;&lt;br /&gt;In the end this technique saves a lot of time, by removing the need to create add, update and remove mehtods in your JSF  managed-beans for those simple and boring CRUD operations.&lt;br /&gt;&lt;br /&gt;* - For those who don't: see &lt;a href="http://www.hibernate.org/hib_docs/v3/reference/en-US/html/tutorial-firstapp.html#tutorial-firstapp-helpers"&gt;here&lt;/a&gt; or in simple terms this thing holds the session for the current thread and context - in the example, the call SessionHolder.currentSession() is translated to HibernateUtil.getSessionFactory().getCurrentSession().&lt;/h:commandbutton&gt;&lt;/h:commandbutton&gt;&lt;/h:commandlink&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/956064359108114628-8552361519917852908?l=jalexoid.blogspot.com'/&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jalexoid.blogspot.com/feeds/8552361519917852908/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=956064359108114628&amp;postID=8552361519917852908' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/956064359108114628/posts/default/8552361519917852908'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/956064359108114628/posts/default/8552361519917852908'/><link rel='alternate' type='text/html' href='http://jalexoid.blogspot.com/2008/12/make-your-hibernate-data-objects-smart.html' title='Make your Hibernate data objects smart?'/><author><name>JAlexoid</name><uri>http://www.blogger.com/profile/11226547359996333148</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='02183104841401283685'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-956064359108114628.post-82128858870094930</id><published>2008-12-15T01:21:00.004+02:00</published><updated>2008-12-15T01:36:36.395+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='DB'/><category scheme='http://www.blogger.com/atom/ns#' term='Development'/><title type='text'>How about a nice future for DBMS query languages?</title><content type='html'>Now thinking of SQL, it is a perfectly good language, but it is old. It is being pushed now to something that was not really intended for it.&lt;br /&gt;&lt;br /&gt;We start needing to have more complex structures returned from our databases. See emergence of Amazon's SimpleDB, CouchDB and such.&lt;br /&gt;&lt;br /&gt;What about a database where we talk to it in something more familiar? Even JavaScript seems nice... Well, the nice thing is that it's OOP model is basically tuples, the thing that most RDBMS'es understand perfectly well...&lt;br /&gt;The problem at hand is the relation, but that is for another "pondering night".&lt;br /&gt;&lt;br /&gt;Imagine this SQL query:&lt;br /&gt;&lt;br /&gt;SELECT * FROM table_a WHERE id &gt; 5 and name = 'Test'&lt;br /&gt;&lt;br /&gt;In JavaScript form:&lt;br /&gt;&lt;br /&gt;table_a.filter( {id:gt(5),name:"Test"} ).all()&lt;br /&gt;(gt(5) here is a function returning a function that compares input so that it's greater than 5)&lt;br /&gt;&lt;br /&gt;Readable? Not too much. Flexible? Definitely. Can it be improved? Absolutely!&lt;br /&gt;&lt;br /&gt;There are more readable languages there... Like Python or Ruby.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/956064359108114628-82128858870094930?l=jalexoid.blogspot.com'/&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jalexoid.blogspot.com/feeds/82128858870094930/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=956064359108114628&amp;postID=82128858870094930' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/956064359108114628/posts/default/82128858870094930'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/956064359108114628/posts/default/82128858870094930'/><link rel='alternate' type='text/html' href='http://jalexoid.blogspot.com/2008/12/hopw-about-nice-future-for-dbms-query.html' title='How about a nice future for DBMS query languages?'/><author><name>JAlexoid</name><uri>http://www.blogger.com/profile/11226547359996333148</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='02183104841401283685'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-956064359108114628.post-1040495731395501715</id><published>2008-12-12T16:08:00.003+02:00</published><updated>2008-12-12T16:10:31.379+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Development'/><category scheme='http://www.blogger.com/atom/ns#' term='Philosophy'/><category scheme='http://www.blogger.com/atom/ns#' term='programming'/><title type='text'>How imperfect can you be to be good enough?</title><content type='html'>How imperfect can you be to be good enough?&lt;br /&gt;&lt;br /&gt;This is so true for software development and much more than just software development. There is no 100% reliability, no 100% testability.&lt;br /&gt;&lt;br /&gt;Nothing is absolute, and absolute is nothing.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/956064359108114628-1040495731395501715?l=jalexoid.blogspot.com'/&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jalexoid.blogspot.com/feeds/1040495731395501715/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=956064359108114628&amp;postID=1040495731395501715' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/956064359108114628/posts/default/1040495731395501715'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/956064359108114628/posts/default/1040495731395501715'/><link rel='alternate' type='text/html' href='http://jalexoid.blogspot.com/2008/12/how-imperfect-can-you-be-to-be-good.html' title='How imperfect can you be to be good enough?'/><author><name>JAlexoid</name><uri>http://www.blogger.com/profile/11226547359996333148</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='02183104841401283685'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-956064359108114628.post-1297301218386392112</id><published>2008-12-10T23:50:00.002+02:00</published><updated>2008-12-11T00:00:14.728+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Java'/><category scheme='http://www.blogger.com/atom/ns#' term='Dynamic'/><title type='text'>Quack my class: A lil' bit more dinamicity in Java</title><content type='html'>&lt;p align="left"&gt;Java is criticized for being too rigid due to static typing. But what do we know about type dynamicity in Java:&lt;/p&gt; &lt;ol&gt;&lt;li&gt;&lt;p align="left"&gt;Reflection and bean introspection&lt;br /&gt;In theory  you can write statically untraceable code using only refection API,  that would constitute dynamicity.&lt;/p&gt;  &lt;/li&gt;&lt;li&gt;&lt;p align="left"&gt;Java 1.4 Proxy API&lt;br /&gt;Need to have a stub for an  interface? This is the tool for you. Supply an interface and  InvocationHandler and you will get an Object that implements the  Interface and will forward the method calls to your  InvocationHandler.&lt;/p&gt;  &lt;/li&gt;&lt;li&gt;&lt;p align="left"&gt;ClassLoading is on demand&lt;br /&gt; You may load  classes from different locations on demand and invoke them thus  adding new functionality on the fly. This leads to ability to  generate code, compile it and load without intervention of a  developer.&lt;/p&gt;  &lt;/li&gt;&lt;li&gt;&lt;p align="left"&gt;Java 5 introduced the instrumentation API&lt;br /&gt;  Java 5 gave us something new. From this version we can redefine  classes via a standard interface – java agents.&lt;/p&gt;  &lt;/li&gt;&lt;li&gt;&lt;p align="left"&gt;The upcoming invokedynamic JVM isntruction&lt;br /&gt; invokedynamic is less about Java as a language, but more to  introduce more languages to JVM, specially the dynamic ones.&lt;/p&gt; &lt;/li&gt;&lt;/ol&gt; &lt;p align="left"&gt;On the scene we have OO “dynamic” languages that follow something called duck typing.&lt;br /&gt;&lt;b&gt;Duck typing&lt;/b&gt; - “if it walks like a duck and quacks like a duck, therefore it must be a duck”, the languages that have that scheme only determine if the variable will accept the method call or have a particular property/instance variable with corresponding name. But they will “complain” if the call was made incorrectly.&lt;/p&gt; &lt;p align="left"&gt;In essence if you provide any object that has a method walk, to code that expects object of type Human, it will execute without any problems.&lt;/p&gt; &lt;p align="left"&gt;Duck typing in Java&lt;/p&gt; &lt;p align="left"&gt;True duck typing in Java is not really possible. But, there is always a “but”.&lt;br /&gt;Say there are 2 classes that are identical in their method signature, duck typing would allow those to be “interchangeable”. In Java you would need both of them to implement same interface to do it “correctly”.&lt;/p&gt; &lt;p align="left"&gt;We can also do some hacking and create an interface and use that. As for the classes we could create an InvocationHandler and a Proxy, witch would forward the method calls to the classes.[(2) in the list above].&lt;/p&gt; &lt;p align="left"&gt;The code would be like the following:&lt;/p&gt; &lt;p align="left"&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0in;" align="left"&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;span style="font-family:Courier New,monospace;"&gt;&lt;span style="font-size:85%;"&gt;  HashMap&lt;string,&gt; anything = &lt;span style="color: rgb(127, 0, 85);"&gt;&lt;b&gt;new&lt;/b&gt;&lt;/span&gt; HashMap&lt;string,&gt;();&lt;/string,&gt;&lt;/string,&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0in;" align="left"&gt;&lt;span style="font-family:Courier New,monospace;"&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;  DuckInvocationHandler dih = &lt;/span&gt;&lt;span style="color: rgb(127, 0, 85);"&gt;&lt;b&gt;new&lt;/b&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; DuckInvocationHandler(anything);&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0in;" align="left"&gt;&lt;span style="font-family:Courier New,monospace;"&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;  anything.put(&lt;/span&gt;&lt;span style="color: rgb(42, 0, 255);"&gt;"test"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;, &lt;/span&gt;&lt;span style="color: rgb(42, 0, 255);"&gt;"Congratulations, it WORKS!"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;);&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0in;" align="left"&gt;&lt;span style="font-family:Courier New,monospace;"&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;  MyMap duck = (MyMap)Proxy.&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;i&gt;newProxyInstance&lt;/i&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;(Thread.&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;i&gt;currentThread&lt;/i&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;().getContextClassLoader(), &lt;/span&gt;&lt;span style="color: rgb(127, 0, 85);"&gt;&lt;b&gt;new&lt;/b&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; Class[]{MyMap.&lt;/span&gt;&lt;span style="color: rgb(127, 0, 85);"&gt;&lt;b&gt;class&lt;/b&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;}, dih);&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0in;" align="left"&gt;&lt;span style="font-family:Courier New,monospace;"&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;  System.&lt;/span&gt;&lt;span style="color: rgb(0, 0, 192);"&gt;&lt;i&gt;out&lt;/i&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;.println(&lt;/span&gt;&lt;span style="color: rgb(42, 0, 255);"&gt;"Out: "&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;+ duck.get(&lt;/span&gt;&lt;span style="color: rgb(42, 0, 255);"&gt;"test"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;));&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;p align="left"&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt; &lt;p align="left"&gt;The interface to represent what the result we want:&lt;/p&gt; &lt;p style="margin-bottom: 0in;" align="left"&gt;&lt;span style="font-family:Courier New,monospace;"&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="color: rgb(127, 0, 85);"&gt;&lt;b&gt;public&lt;/b&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(127, 0, 85);"&gt;&lt;b&gt;interface&lt;/b&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; MyMap {&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0in;" align="left"&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;span style="font-family:Courier New,monospace;"&gt;&lt;span style="font-size:85%;"&gt; Object get(Object i);&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0in;" align="left"&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;span style="font-family:Courier New,monospace;"&gt;&lt;span style="font-size:85%;"&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;p align="left"&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt; &lt;p align="left"&gt;The InvocationHandler implementation:&lt;/p&gt; &lt;p style="margin-bottom: 0in;" align="left"&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;span style="font-family:Courier New,monospace;"&gt;&lt;span style="font-size:85%;"&gt;java.lang.reflect.InvocationHandler has only one method to override.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0in;" align="left"&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0in;" align="left"&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;span style="font-family:Courier New,monospace;"&gt;&lt;span style="font-size:85%;"&gt; &lt;span style="color: rgb(100, 100, 100);"&gt;@Override&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0in;" align="left"&gt;&lt;span style="font-family:Courier New,monospace;"&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(127, 0, 85);"&gt;&lt;b&gt;public&lt;/b&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; Object invoke(Object proxy, Method method, Object[] args) &lt;/span&gt;&lt;span style="color: rgb(127, 0, 85);"&gt;&lt;b&gt;throws&lt;/b&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; Throwable {&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0in;" align="left"&gt;&lt;span style="font-family:Courier New,monospace;"&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;  Method mth = &lt;/span&gt;&lt;span style="color: rgb(0, 0, 192);"&gt;nonDuckClass&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;.getMethod(method.getName(), method.getParameterTypes());&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0in;" align="left"&gt;&lt;span style="font-family:Courier New,monospace;"&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;  &lt;/span&gt;&lt;span style="color: rgb(127, 0, 85);"&gt;&lt;b&gt;return&lt;/b&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; mth.invoke(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 192);"&gt;nonDuck&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;, args);&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0in;" align="left"&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;span style="font-family:Courier New,monospace;"&gt;&lt;span style="font-size:85%;"&gt; }&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0in;" align="left"&gt;&lt;br /&gt;&lt;/p&gt; &lt;p align="left"&gt;This approach:&lt;/p&gt; &lt;ul&gt;&lt;li&gt;&lt;p align="left"&gt;Is standards based&lt;/p&gt;  &lt;/li&gt;&lt;li&gt;&lt;p align="left"&gt;Will work only with interfaces&lt;/p&gt; &lt;/li&gt;&lt;/ul&gt; &lt;p align="left"&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt; &lt;p align="left"&gt;There is another way. A popular library for class manipulation is CGLib. It features the ability to Proxy a class, by creating a subclass of it at runtime.&lt;/p&gt; &lt;p align="left"&gt;How will the code look? CGLib also has an InvocationHandler, and it also has only one method invoke. So just replace java.lang.reflect.InvocationHandler with net.sf.cglib.proxy.InvocationHandler, and the conversion process is done for the handler.&lt;/p&gt; &lt;p align="left"&gt;The proxy creation process is a bit longer, but does have it's own advantages. The code:&lt;/p&gt; &lt;p style="margin-bottom: 0in;" align="left"&gt;&lt;span style="font-family:Courier New,monospace;"&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;  &lt;/span&gt;&lt;span style="color: rgb(63, 127, 95);"&gt;// Use caching &lt;/span&gt;&lt;span style="color: rgb(63, 127, 95);"&gt;&lt;u&gt;Enhancer&lt;/u&gt;&lt;/span&gt;&lt;span style="color: rgb(63, 127, 95);"&gt; object&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0in;" align="left"&gt;&lt;span style="font-family:Courier New,monospace;"&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;  Enhancer e = &lt;/span&gt;&lt;span style="color: rgb(127, 0, 85);"&gt;&lt;b&gt;new&lt;/b&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; Enhancer();&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0in;" align="left"&gt;&lt;span style="font-family:Courier New,monospace;"&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;  e.setUseCache(&lt;/span&gt;&lt;span style="color: rgb(127, 0, 85);"&gt;&lt;b&gt;true&lt;/b&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;);&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0in;" align="left"&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;span style="font-family:Courier New,monospace;"&gt;&lt;span style="font-size:85%;"&gt;  e.setCallback(duckInvocationHandlerInstance);&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0in;" align="left"&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;span style="font-family:Courier New,monospace;"&gt;&lt;span style="font-size:85%;"&gt;  e.setClassLoader(o.getClass().getClassLoader());&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0in;" align="left"&gt;&lt;span style="font-family:Courier New,monospace;"&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;  e.setInterceptDuringConstruction(&lt;/span&gt;&lt;span style="color: rgb(127, 0, 85);"&gt;&lt;b&gt;false&lt;/b&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;);&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0in;" align="left"&gt;&lt;span style="font-family:Courier New,monospace;"&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;  &lt;/span&gt;&lt;span style="color: rgb(127, 0, 85);"&gt;&lt;b&gt;if&lt;/b&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; (asType.isInterface())&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0in;" align="left"&gt;&lt;span style="font-family:Courier New,monospace;"&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;   e.setInterfaces(&lt;/span&gt;&lt;span style="color: rgb(127, 0, 85);"&gt;&lt;b&gt;new&lt;/b&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; Class[] { asType });&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0in;" align="left"&gt;&lt;span style="font-family:Courier New,monospace;"&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;  &lt;/span&gt;&lt;span style="color: rgb(127, 0, 85);"&gt;&lt;b&gt;else&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0in;" align="left"&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;span style="font-family:Courier New,monospace;"&gt;&lt;span style="font-size:85%;"&gt;   e.setSuperclass(asType);&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0in;" align="left"&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;span style="font-family:Courier New,monospace;"&gt;&lt;span style="font-size:85%;"&gt;  Object output = e.create();&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0in;" align="left"&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0in;" align="left"&gt;This approach:&lt;/p&gt; &lt;ul&gt;&lt;li&gt;&lt;p style="margin-bottom: 0in;" align="left"&gt;Caching : As you can  see on line 3 we set the Enhancer to use cache.&lt;/p&gt;  &lt;/li&gt;&lt;li&gt;&lt;p style="margin-bottom: 0in;" align="left"&gt;Works with both classes  and interfaces   &lt;/p&gt; &lt;/li&gt;&lt;/ul&gt; &lt;p style="margin-bottom: 0in;" align="left"&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0in;" align="left"&gt;What are we missing? Type safety.&lt;br /&gt;For this to work correctly before you make the class quack as you wish, you need to check if the type and return type classes are compatible. For this I have created a small library, ready to use, but still a bit limited.&lt;/p&gt; &lt;p style="margin-bottom: 0in;" align="left"&gt;The limitation is, that return and parameters values are not proxied. Therefore parameters have to of the same type and return type has to be either same type or subtype.&lt;/p&gt; &lt;p align="left"&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style="font-weight: bold;" align="left"&gt;The result&lt;/p&gt; &lt;p align="left"&gt;We may or may not want anything to do with duck typing. The reasons against is that Java was built to be strict. It violates the core Java philosophy – more checks during compile time. Although, this way is much better then totally blind duck typing, since you have to specify the interface.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;p align="left"&gt;Where might we use it?&lt;br /&gt;&lt;br /&gt;The main reason for using it, is to be able to practically alias some APIs and possibly use different versions of one API in the same code.&lt;br /&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/956064359108114628-1297301218386392112?l=jalexoid.blogspot.com'/&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jalexoid.blogspot.com/feeds/1297301218386392112/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=956064359108114628&amp;postID=1297301218386392112' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/956064359108114628/posts/default/1297301218386392112'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/956064359108114628/posts/default/1297301218386392112'/><link rel='alternate' type='text/html' href='http://jalexoid.blogspot.com/2008/12/quack-my-class-lil-bit-more-dinamicity.html' title='Quack my class: A lil&apos; bit more dinamicity in Java'/><author><name>JAlexoid</name><uri>http://www.blogger.com/profile/11226547359996333148</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='02183104841401283685'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-956064359108114628.post-537036639640957793</id><published>2008-12-02T17:11:00.007+02:00</published><updated>2008-12-02T18:42:26.789+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Java'/><category scheme='http://www.blogger.com/atom/ns#' term='Guice'/><category scheme='http://www.blogger.com/atom/ns#' term='DI'/><category scheme='http://www.blogger.com/atom/ns#' term='Seam'/><category scheme='http://www.blogger.com/atom/ns#' term='Spring'/><title type='text'>Dynamic Dependency Injection</title><content type='html'>&lt;span style="font-weight: bold;"&gt;Dynamic Dependency Injection, Context Aware Injection or "on the fly" configuration.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Something that should be real easy, though is not thought of in &lt;a href="http://www.springframework.org/"&gt;Spring &lt;/a&gt;nor in &lt;a href="http://code.google.com/p/google-guice/"&gt;Guice&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;What is DDI?&lt;br /&gt;&lt;br /&gt;The challenges that &lt;a href="http://en.wikipedia.org/wiki/Dependency_injection"&gt;DI&lt;/a&gt; meets are well defined. And are already met. This is the next thing, in removing more glue code from you application code.&lt;br /&gt;The target of DDI is to to remove as much as possible of non value bearing code. Value bearing code is the pure logic. Like &lt;a href="http://seamframework.org/"&gt;Seam&lt;/a&gt; removes the need to get the data from the &lt;a href="http://java.sun.com/javaee/javaserverfaces/"&gt;JSF&lt;/a&gt; forms and places them in the &lt;a href="http://docs.jboss.org/seam/latest/api/org/jboss/seam/annotations/In.html"&gt;@In&lt;/a&gt; annotated field. And you are left only with the need to do actual value bearing logic.&lt;br /&gt;Sample from &lt;a href="http://docs.jboss.com/seam/latest/reference/en-US/html/tutorial.html#d0e582"&gt;here&lt;/a&gt;:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;  public String register()&lt;br /&gt;  {&lt;br /&gt;    List existing = em.createQuery("select username from User where username=#{user.username}")&lt;br /&gt;      .getResultList();&lt;br /&gt;&lt;br /&gt;    if (existing.size()==0)&lt;br /&gt;    {&lt;br /&gt;      em.persist(user);&lt;br /&gt;      log.info("Registered new user #{user.username}");&lt;br /&gt;      return "/registered.xhtml";&lt;br /&gt;    }&lt;br /&gt;    else&lt;br /&gt;    {&lt;br /&gt;      FacesMessages.instance().add("User #{user.username} already exists");&lt;br /&gt;      return null;&lt;br /&gt;    }&lt;br /&gt;  }&lt;br /&gt;&lt;/pre&gt;In the sample above your job as a developer is to do checks and proceed with the right branch of operation.&lt;br /&gt;That is 100% value bearing code, since it does exactly what it's intention is:&lt;br /&gt;&lt;a name="targets" href="http://beta.blogger.com/post-create.g?blogID=956064359108114628#"&gt;&lt;/a&gt;&lt;ul&gt;&lt;li&gt;Check the data store for duplicate values&lt;/li&gt;&lt;li&gt;Save the data if not exists&lt;/li&gt;&lt;li&gt;Report error if exists&lt;/li&gt;&lt;/ul&gt;The &lt;a href="http://docs.jboss.org/seam/latest/api/org/jboss/seam/annotations/In.html"&gt;@In&lt;/a&gt; annotated field is populated based on the context in witch the &lt;a href="http://en.wikipedia.org/wiki/Session_Beans"&gt;EJB&lt;/a&gt; was run. In &lt;a href="http://www.springframework.org/"&gt;Spring &lt;/a&gt;and &lt;a href="http://code.google.com/p/google-guice/"&gt;Guice&lt;/a&gt;, it is awkward when doing the same. Mostly the beans are configured once and relations are more dynamic.&lt;br /&gt;&lt;br /&gt;Now DDI is another step forward. I say: Why remove only the setting and basic configuration? Let us remove the data fetching code and "script it".&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.springframework.org/"&gt;Spring&lt;/a&gt; DI code would be:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;  @Autowired&lt;br /&gt;  private WarehouseQuantityDAO dao;&lt;br /&gt;&lt;br /&gt;  @Autowired&lt;br /&gt;  private OrderItemTO oi;&lt;br /&gt;&lt;br /&gt;  public boolean checkAvailableQuantity(){&lt;br /&gt;    int availableQuantity = dao.getQuantity(oi.getProductCode());&lt;br /&gt;    return availableQuantity &gt; oi.getOrderedQuantity();&lt;br /&gt;  }&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;While DDI code would be something similar:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;  @Autowired&lt;br /&gt;  @Bound(name="JPAEntity_named_query",bind="orderItem.productCode")&lt;br /&gt;  private int availableQuantity;&lt;br /&gt;&lt;br /&gt;  @Autowired&lt;br /&gt;  private OrderItemTO orderItem;&lt;br /&gt;&lt;br /&gt;  public boolean checkAvailableQuantity(){&lt;br /&gt;    return availableQuantity &gt; oi.getOrderedQuantity();&lt;br /&gt;  }&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Though the end code seems similar, we did get rid of the &lt;a href="http://en.wikipedia.org/wiki/Data_Access_Object"&gt;DAO&lt;/a&gt; class.&lt;br /&gt;The @Bound annotation takes the value of &lt;span style="font-style: italic;"&gt;orderItem.productCode&lt;/span&gt; property and sets the parameter in the &lt;a href="http://java.sun.com/javaee/overview/faq/persistence.jsp"&gt;JPA&lt;/a&gt; named query. The &lt;a href="http://java.sun.com/javaee/overview/faq/persistence.jsp"&gt;JPA&lt;/a&gt; query returns an &lt;a href="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Integer.html"&gt;Integer&lt;/a&gt;, so we just set the value just prior to the calling of the method.&lt;br /&gt;&lt;br /&gt;In this way we can remove a lot of code that deals with data storage, when the essence of the logic is not data store.&lt;br /&gt;&lt;br /&gt;Meaning that if we change the &lt;span style="font-style: italic;"&gt;register()&lt;/span&gt; method code from &lt;a href="http://seamframework.org/"&gt;Seam&lt;/a&gt; sample, it might be not as obvious that the whole idea of the code is to check the data store. Though it would make the code shorter:&lt;br /&gt;&lt;pre&gt;@Autowired&lt;br /&gt;@Bound(name="JPAEntity_named_query",bind="user.username")&lt;br /&gt;private List existing;&lt;br /&gt;&lt;br /&gt;public String register()&lt;br /&gt;{&lt;br /&gt;  if (existing.size()==0)&lt;br /&gt;  {&lt;br /&gt;      em.persist(user);&lt;br /&gt;      log.info("Registered new user #{user.username}");&lt;br /&gt;      return "/registered.xhtml";&lt;br /&gt;  }&lt;br /&gt;  else&lt;br /&gt;  {&lt;br /&gt;    FacesMessages.instance().add("User #{user.username} already exists");&lt;br /&gt;    return null;&lt;br /&gt;  }&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;But the logic is the &lt;a href="http://beta.blogger.com/post-create.g?blogID=956064359108114628#targets"&gt;same&lt;/a&gt;.&lt;br /&gt;This could be done via &lt;a href="http://en.wikipedia.org/wiki/Aspect-oriented_programming"&gt;AOP&lt;/a&gt; in &lt;a href="http://www.springframework.org/"&gt;Spring&lt;/a&gt; and maybe in &lt;a href="http://code.google.com/p/google-guice/"&gt;Guice&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Referenced material:&lt;br /&gt;&lt;a href="http://www.springframework.org/"&gt;http://www.springframework.org/&lt;/a&gt;&lt;br /&gt;&lt;a href="http://code.google.com/p/google-guice/"&gt;http://code.google.com/p/google-guice/&lt;/a&gt;&lt;br /&gt;&lt;a href="http://seamframework.org/"&gt;http://seamframework.org/&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/956064359108114628-537036639640957793?l=jalexoid.blogspot.com'/&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jalexoid.blogspot.com/feeds/537036639640957793/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=956064359108114628&amp;postID=537036639640957793' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/956064359108114628/posts/default/537036639640957793'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/956064359108114628/posts/default/537036639640957793'/><link rel='alternate' type='text/html' href='http://jalexoid.blogspot.com/2008/12/dynamic-dependency-injection.html' title='Dynamic Dependency Injection'/><author><name>JAlexoid</name><uri>http://www.blogger.com/profile/11226547359996333148</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='02183104841401283685'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-956064359108114628.post-1383806146728828950</id><published>2008-12-01T18:22:00.000+02:00</published><updated>2008-12-01T18:23:02.827+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Project Management'/><category scheme='http://www.blogger.com/atom/ns#' term='Business Analysis'/><title type='text'>Requirements Weight Matrix</title><content type='html'>&lt;span style="font-weight: bold;"&gt;Histories&lt;/span&gt;&lt;br/&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;The weight matrix came into being after a business analysis project at one medium sized company. During their business analysis we discovered that most of their unproductive time is spent on looking up the information on the products in stock.&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;The salesmen communicated with clients mostly by phone, after initial cooperation contract was signed. So informing the clients weather their order could be fulfilled the same day or in a month was not an easy task.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;What I ended up with&lt;/span&gt;&lt;br/&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;So while doing simple feature mapping I ended up with the following matrix:&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;span style="font-size:100%;"&gt;This is only a sample&lt;/span&gt; &lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;style&gt;   &lt;!--    BODY,DIV,TABLE,THEAD,TBODY,TFOOT,TR,TH,TD,P { font-family:"Arial"; font-size:x-small }    --&gt;  &lt;/style&gt;    &lt;table rules="none" frame="void" border="0" cellspacing="0" cols="5"&gt;  &lt;colgroup&gt;&lt;col width="249"&gt;&lt;col width="90"&gt;&lt;col width="75"&gt;&lt;col width="80"&gt;&lt;col width="86"&gt;&lt;/colgroup&gt;  &lt;tbody&gt;   &lt;tr&gt;    &lt;td height="17" align="center" width="249"&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/td&gt;    &lt;td align="center" width="90"&gt;&lt;b&gt;Management&lt;/b&gt;&lt;/td&gt;    &lt;td align="center" width="75"&gt;&lt;b&gt;Sales&lt;/b&gt;&lt;/td&gt;    &lt;td align="center" width="80"&gt;&lt;b&gt;Accounting&lt;/b&gt;&lt;/td&gt;    &lt;td align="center" width="86"&gt;&lt;b&gt;Weight&lt;/b&gt;&lt;/td&gt;   &lt;/tr&gt;   &lt;tr&gt;    &lt;td height="17" align="right"&gt;&lt;b&gt;(Features/Group Modifiers)&lt;/b&gt;&lt;/td&gt;    &lt;td sdval="1.5" sdnum="1033;" align="center"&gt;&lt;i&gt;1.5&lt;/i&gt;&lt;/td&gt;    &lt;td sdval="1" sdnum="1033;" align="center"&gt;&lt;i&gt;1&lt;/i&gt;&lt;/td&gt;    &lt;td sdval="0.9" sdnum="1033;" align="center"&gt;&lt;i&gt;0.9&lt;/i&gt;&lt;/td&gt;    &lt;td align="center"&gt;&lt;b&gt;Total&lt;/b&gt;&lt;/td&gt;   &lt;/tr&gt;   &lt;tr&gt;    &lt;td height="17" align="left"&gt;&lt;b&gt;Show items in warehouses&lt;/b&gt;&lt;/td&gt;    &lt;td align="center"&gt;O&lt;/td&gt;    &lt;td align="center"&gt;ET&lt;/td&gt;    &lt;td align="center"&gt;R&lt;/td&gt;    &lt;td sdval="3.575" sdnum="1033;" align="right"&gt;3.58&lt;/td&gt;   &lt;/tr&gt;   &lt;tr&gt;    &lt;td height="17" align="left"&gt;&lt;b&gt;Send notification emails&lt;/b&gt;&lt;/td&gt;    &lt;td align="center"&gt;ED&lt;/td&gt;    &lt;td align="center"&gt;ED&lt;/td&gt;    &lt;td align="center"&gt;ED&lt;/td&gt;    &lt;td sdval="2.55" sdnum="1033;" align="right"&gt;2.55&lt;/td&gt;   &lt;/tr&gt;   &lt;tr&gt;    &lt;td height="17" align="left"&gt;&lt;b&gt;Remove item reservation&lt;/b&gt;&lt;/td&gt;    &lt;td align="center"&gt;R&lt;/td&gt;    &lt;td align="center"&gt;O&lt;/td&gt;    &lt;td align="center"&gt;RC&lt;/td&gt;    &lt;td sdval="2.175" sdnum="1033;" align="right"&gt;2.18&lt;/td&gt;   &lt;/tr&gt;   &lt;tr&gt;    &lt;td height="17" align="left"&gt;&lt;b&gt;Reserve items in warehouses&lt;/b&gt;&lt;/td&gt;    &lt;td align="center"&gt;N&lt;/td&gt;    &lt;td align="center"&gt;EC&lt;/td&gt;    &lt;td align="center"&gt;R&lt;/td&gt;    &lt;td sdval="1.95" sdnum="1033;" align="right"&gt;1.95&lt;/td&gt;   &lt;/tr&gt;   &lt;tr&gt;    &lt;td height="17" align="left"&gt;&lt;b&gt;Pending shipment packages&lt;/b&gt;&lt;/td&gt;    &lt;td align="center"&gt;O&lt;/td&gt;    &lt;td align="center"&gt;N&lt;/td&gt;    &lt;td align="center"&gt;O&lt;/td&gt;    &lt;td sdval="1.8" sdnum="1033;" align="right"&gt;1.8&lt;/td&gt;   &lt;/tr&gt;   &lt;tr&gt;    &lt;td height="17" align="left"&gt;&lt;b&gt;Order edit&lt;/b&gt;&lt;/td&gt;    &lt;td align="center"&gt;N&lt;/td&gt;    &lt;td align="center"&gt;E&lt;/td&gt;    &lt;td align="center"&gt;N&lt;/td&gt;    &lt;td sdval="1.5" sdnum="1033;" align="right"&gt;1.5&lt;/td&gt;   &lt;/tr&gt;   &lt;tr&gt;    &lt;td height="17" align="left"&gt;&lt;b&gt;Order entry&lt;/b&gt;&lt;/td&gt;    &lt;td align="center"&gt;N&lt;/td&gt;    &lt;td align="center"&gt;EC&lt;/td&gt;    &lt;td align="center"&gt;N&lt;/td&gt;    &lt;td sdval="1.5" sdnum="1033;" align="right"&gt;1.5&lt;/td&gt;   &lt;/tr&gt;   &lt;tr&gt;    &lt;td height="17" align="left"&gt;&lt;b&gt;Salesman report&lt;/b&gt;&lt;/td&gt;    &lt;td align="center"&gt;R&lt;/td&gt;    &lt;td align="center"&gt;N&lt;/td&gt;    &lt;td align="center"&gt;RC&lt;/td&gt;    &lt;td sdval="1.425" sdnum="1033;" align="right"&gt;1.43&lt;/td&gt;   &lt;/tr&gt;   &lt;tr&gt;    &lt;td height="17" align="left"&gt;&lt;b&gt;Warehouse item movement report&lt;/b&gt;&lt;/td&gt;    &lt;td align="center"&gt;N&lt;/td&gt;    &lt;td align="center"&gt;N&lt;/td&gt;    &lt;td align="center"&gt;EC&lt;/td&gt;    &lt;td sdval="1.35" sdnum="1033;" align="right"&gt;1.35&lt;/td&gt;   &lt;/tr&gt;   &lt;tr&gt;    &lt;td height="17" align="left"&gt;&lt;b&gt;Order cancel&lt;/b&gt;&lt;/td&gt;    &lt;td align="center"&gt;N&lt;/td&gt;    &lt;td align="center"&gt;EC&lt;/td&gt;    &lt;td align="center"&gt;N&lt;/td&gt;    &lt;td sdval="1" sdnum="1033;" align="right"&gt;1&lt;/td&gt;   &lt;/tr&gt;   &lt;tr&gt;    &lt;td height="17" align="left"&gt;&lt;b&gt;Shipment package info&lt;/b&gt;&lt;/td&gt;    &lt;td align="center"&gt;N&lt;/td&gt;    &lt;td align="center"&gt;N&lt;/td&gt;    &lt;td align="center"&gt;R&lt;/td&gt;    &lt;td sdval="0.45" sdnum="1033;" align="right"&gt;0.45&lt;/td&gt;   &lt;/tr&gt;   &lt;tr&gt;    &lt;td height="17" align="left"&gt;&lt;br /&gt;&lt;/td&gt;    &lt;td align="left"&gt;&lt;br /&gt;&lt;/td&gt;    &lt;td align="left"&gt;&lt;br /&gt;&lt;/td&gt;    &lt;td align="left"&gt;&lt;br /&gt;&lt;/td&gt;    &lt;td align="left"&gt;&lt;br /&gt;&lt;/td&gt;   &lt;/tr&gt;   &lt;tr&gt;    &lt;td height="17" align="left"&gt;&lt;b&gt;Modifiers&lt;/b&gt;&lt;/td&gt;    &lt;td align="left"&gt;&lt;br /&gt;&lt;/td&gt;    &lt;td align="left"&gt;&lt;br /&gt;&lt;/td&gt;    &lt;td align="left"&gt;&lt;br /&gt;&lt;/td&gt;    &lt;td align="left"&gt;&lt;br /&gt;&lt;/td&gt;   &lt;/tr&gt;   &lt;tr&gt;    &lt;td height="17" align="left"&gt;C - critical or core business(job role)&lt;/td&gt;    &lt;td sdval="1.5" sdnum="1033;" align="right"&gt;&lt;i&gt;1.5&lt;/i&gt;&lt;/td&gt;    &lt;td align="left"&gt;&lt;br /&gt;&lt;/td&gt;    &lt;td align="left"&gt;&lt;br /&gt;&lt;/td&gt;    &lt;td align="left"&gt;&lt;br /&gt;&lt;/td&gt;   &lt;/tr&gt;   &lt;tr&gt;    &lt;td height="17" align="left"&gt;T - client critical&lt;/td&gt;    &lt;td sdval="2" sdnum="1033;" align="right"&gt;&lt;i&gt;2&lt;/i&gt;&lt;/td&gt;    &lt;td align="left"&gt;&lt;br /&gt;&lt;/td&gt;    &lt;td align="left"&gt;&lt;br /&gt;&lt;/td&gt;    &lt;td align="left"&gt;&lt;br /&gt;&lt;/td&gt;   &lt;/tr&gt;   &lt;tr&gt;    &lt;td height="17" align="left"&gt;D - downtime possible.&lt;/td&gt;    &lt;td sdval="0.75" sdnum="1033;" align="right"&gt;&lt;i&gt;0.75&lt;/i&gt;&lt;/td&gt;    &lt;td align="left"&gt;&lt;br /&gt;&lt;/td&gt;    &lt;td align="left"&gt;&lt;br /&gt;&lt;/td&gt;    &lt;td align="left"&gt;&lt;br /&gt;&lt;/td&gt;   &lt;/tr&gt;   &lt;tr&gt;    &lt;td height="17" align="left"&gt;&lt;br /&gt;&lt;/td&gt;    &lt;td align="left"&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/td&gt;    &lt;td align="left"&gt;&lt;br /&gt;&lt;/td&gt;    &lt;td align="left"&gt;&lt;br /&gt;&lt;/td&gt;    &lt;td align="left"&gt;&lt;br /&gt;&lt;/td&gt;   &lt;/tr&gt;   &lt;tr&gt;    &lt;td height="17" align="left"&gt;&lt;b&gt;Marks&lt;/b&gt;&lt;/td&gt;    &lt;td align="left"&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/td&gt;    &lt;td align="left"&gt;&lt;br /&gt;&lt;/td&gt;    &lt;td align="left"&gt;&lt;br /&gt;&lt;/td&gt;    &lt;td align="left"&gt;&lt;br /&gt;&lt;/td&gt;   &lt;/tr&gt;   &lt;tr&gt;    &lt;td height="17" align="left"&gt;E - everyday use&lt;/td&gt;    &lt;td sdval="1" sdnum="1033;" align="right"&gt;&lt;i&gt;1&lt;/i&gt;&lt;/td&gt;    &lt;td align="left"&gt;&lt;br /&gt;&lt;/td&gt;    &lt;td align="left"&gt;&lt;br /&gt;&lt;/td&gt;    &lt;td align="left"&gt;&lt;br /&gt;&lt;/td&gt;   &lt;/tr&gt;   &lt;tr&gt;    &lt;td height="17" align="left"&gt;O - occasional use(once per week)&lt;/td&gt;    &lt;td sdval="0.75" sdnum="1033;" align="right"&gt;&lt;i&gt;0.75&lt;/i&gt;&lt;/td&gt;    &lt;td align="left"&gt;&lt;br /&gt;&lt;/td&gt;    &lt;td align="left"&gt;&lt;br /&gt;&lt;/td&gt;    &lt;td align="left"&gt;&lt;br /&gt;&lt;/td&gt;   &lt;/tr&gt;   &lt;tr&gt;    &lt;td height="17" align="left"&gt;R - rare use(once per month and rarer)&lt;/td&gt;    &lt;td sdval="0.5" sdnum="1033;" align="right"&gt;&lt;i&gt;0.5&lt;/i&gt;&lt;/td&gt;    &lt;td align="left"&gt;&lt;br /&gt;&lt;/td&gt;    &lt;td align="left"&gt;&lt;br /&gt;&lt;/td&gt;    &lt;td align="left"&gt;&lt;br /&gt;&lt;/td&gt;   &lt;/tr&gt;   &lt;tr&gt;    &lt;td height="17" align="left"&gt;N - never used or unknown functionality&lt;/td&gt;    &lt;td sdval="0" sdnum="1033;" align="right"&gt;&lt;i&gt;0&lt;/i&gt;&lt;/td&gt;    &lt;td align="left"&gt;&lt;br /&gt;&lt;/td&gt;    &lt;td align="left"&gt;&lt;br /&gt;&lt;/td&gt;    &lt;td align="left"&gt;&lt;br /&gt;&lt;/td&gt;   &lt;/tr&gt;  &lt;/tbody&gt; &lt;/table&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;The matrix has to be filled out by each group separately. Anonymously and personally.&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;To aggregate, you need to get the &lt;a href="http://en.wikipedia.org/wiki/Median"&gt;median point&lt;/a&gt; from each group, but it should not be too far from the &lt;a href="http://en.wikipedia.org/wiki/Mean"&gt;mean&lt;/a&gt;. (Substitute marks and modifiers with the actual values)&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;The weight matrix is constructed of the most basic functionality against user groups and marked with importance to each user group.&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Each feature is a functionality that is expressed by up to 4 words(each noun acronym is one word) , so XYZ process start is a valid function descriptor.&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;A functionality does not imply a UI button or action. Better, yet, UI functionality should be separated from actual functionality(reports are pure UI, no matter how much processing is done in the backend, except when reports are auto-generated)&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Each user group marks each functionality with marks and modifiers.&lt;br /&gt;&lt;br /&gt;Marks:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;E - everyday use&lt;/li&gt;&lt;li&gt;O - occasional use(at least once per week or 2 times per month)&lt;/li&gt;&lt;li&gt;R - rare use(once per month)&lt;/li&gt;&lt;li&gt;N - never used or unknown functionality or not relevant to job role&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;Modifiers:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;C - critical or core business&lt;br /&gt;    will loose time/revenue as a result of failure, possibility of loosing clients&lt;br /&gt;&lt;/li&gt;&lt;li&gt;T - client critical&lt;br /&gt;    will loose clients as a result of failure or equatable to loosing clients&lt;br /&gt;&lt;/li&gt;&lt;li&gt;D - downtime possible&lt;br /&gt;    has little or no everyday impact on operations&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Each of these marks have their weight, each modifier is a multiplier and each users group has it's own multiplier.&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;In the sample group multipliers Management - 1.25, Sales - 1 and Accounting - 0.9. And mark and modifier values are listed below.&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;It is not impossible for all to have the same multiplier.&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;There are basic rules to the values though:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Highest value is ET - Everyday - Client Critical&lt;/li&gt;&lt;li&gt;EC - Everyday Core Business is the second highest value and greater or equal to OT Occasional Client Critical&lt;br /&gt;    EC &gt; E and EC &gt;= OT&lt;br /&gt;&lt;/li&gt;&lt;li&gt;OC - Occasional and Critical to business should have greater value than Everyday use&lt;br /&gt;   OC &gt; E and OC &lt;&gt;&lt;/li&gt;&lt;li&gt;E - Everyday should have the nominal value like 1 and should be greater of  equal to RT - Rare Client Critical&lt;br /&gt;    E &gt;= RT&lt;br /&gt;&lt;/li&gt;&lt;li&gt;... and so on, the common equation is(please feel free to modify it):&lt;br /&gt;      N &lt;&gt;&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;To have the most important functions, all the responses are converted to numbers, all the multipliers are applied and each functionality's values are summed up.&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;The result is that you have real representation of the value of the functionalities across whole business and with points of interest of each group of users/stake holders/beneficiaries.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;The end result&lt;/span&gt;&lt;br/&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;From the business side the example demonstrates that in fact for that company to see the warehouse stock in real time was the most important feature and indeed that was the fact.&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;As you can see that the order related activities are not at the top, this is because the company being analyzed was a wholesale company, where the amount of orders was easily manageable and had a distinct paper trail.&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;This matrix made it simple in prioritizing features to be implemented, witch lead to a well accepted project delivery. And the project did not get tangled up in the management's view of how things were actually working.*&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;It was a win-win situation, because the sales people got their information in real time and the management got a good view from above. All in all, increased productivity never hurt anyone.&lt;br /&gt;&lt;br /&gt;This maybe new or not so new idea, so I will not rush to claim that I invented it.&lt;br /&gt;&lt;br /&gt;* - Note, none of the team were stupid, and there are a lot of acceptable controls over the business for the management. And the system ended up quite flexible and usable.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/956064359108114628-1383806146728828950?l=jalexoid.blogspot.com'/&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jalexoid.blogspot.com/feeds/1383806146728828950/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=956064359108114628&amp;postID=1383806146728828950' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/956064359108114628/posts/default/1383806146728828950'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/956064359108114628/posts/default/1383806146728828950'/><link rel='alternate' type='text/html' href='http://jalexoid.blogspot.com/2008/11/requirements-weight-matrix.html' title='Requirements Weight Matrix'/><author><name>JAlexoid</name><uri>http://www.blogger.com/profile/11226547359996333148</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='02183104841401283685'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-956064359108114628.post-6819732464577002643</id><published>2008-11-02T16:19:00.004+02:00</published><updated>2008-11-02T17:01:01.789+02:00</updated><title type='text'>NetBeans 6.5 vs Eclipse 3.4 Ganymede on Java Coding</title><content type='html'>&lt;a href="http://www.netbeans.info/"&gt;Netbeans&lt;/a&gt; IDE and &lt;a href="http://www.eclipse.org/"&gt;Eclipse&lt;/a&gt; IDE&lt;br /&gt;I like and use both of these IDE's for different reasons. Netbeans is perfect for non Java development and mixed language development. Eclipse is the best option for Java coding. Why? Here is my reasoning.&lt;br /&gt;&lt;br /&gt;Netbeans:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Great technology integration&lt;br /&gt;       the level of integration of assisting technologies as well as frameworks is much better than Eclipse.&lt;/li&gt;&lt;li&gt;Added ability to support a lot of other technologies&lt;br /&gt;       Ruby with Ruby on Rails, PHP, JavaScript and Groovy are supported and integrated&lt;/li&gt;&lt;li&gt;Out of the box usable&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;Eclipse:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Huge community&lt;br /&gt;      gives access to various plugins, though their quality depends on the developer&lt;/li&gt;&lt;li&gt;Incredible flexibility&lt;br /&gt;     Basically everything may be tweaked and configured&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;Now why is Netbeans falling behind on Java coding? (IMHO)&lt;br /&gt;Some will say that incremental compilation is the point of weakness, but I really see it a lesser issue in productivity.&lt;br /&gt;The code assist is the main problem. And some defaults are enforced.&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Code complete: Netbeans has been improved incredibly. Eclipse has groups of code completion. Each code completion group has it's own popup. Each popup is opened(switched to) by pressing Crtl+Space repeatedly.&lt;/li&gt;&lt;li&gt;Code complete: Eclipse has not only classes and code generation elements in the code completion popup, but the code templates. Such as typing main and pressing Ctrl+Space in Eclipse will give you an option to create a main method. Netbeans way is write psvm and hit code expansion button(CEB, mine is TAB).&lt;/li&gt;&lt;li&gt;Code complete: Intrusive template expansion in Netbeans. Just write in pst and hit CEB in Netbeans and, even though you just wanted a variable name for your PreparedStatement, you will get "printStackTrace();" in place of your "pst". And nothing warns you into what the template will be expanded...&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Code expansion button = CEB, is a horrible thing if it's mapped to SPACE!&lt;/li&gt;&lt;li&gt;Custom Run configurations are a good idea in Eclipse. Though I still like the button to run the Application in Netbeans.&lt;/li&gt;&lt;li&gt;Netbeans enforces some defaults. The one that I hate the most is that everything in "Test Packages" has to be a jUnit test. Why? Tests may be simple classes with main methods! But you don't have an option to run it using something else other than jUnit.&lt;br /&gt;&lt;/li&gt;&lt;/ol&gt;Basically those are few simple reasons why I don't use Netbeans for Java coding.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/956064359108114628-6819732464577002643?l=jalexoid.blogspot.com'/&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jalexoid.blogspot.com/feeds/6819732464577002643/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=956064359108114628&amp;postID=6819732464577002643' title='8 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/956064359108114628/posts/default/6819732464577002643'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/956064359108114628/posts/default/6819732464577002643'/><link rel='alternate' type='text/html' href='http://jalexoid.blogspot.com/2008/11/netbeans-65-vs-eclipse-34-ganymede-on.html' title='NetBeans 6.5 vs Eclipse 3.4 Ganymede on Java Coding'/><author><name>JAlexoid</name><uri>http://www.blogger.com/profile/11226547359996333148</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='02183104841401283685'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>8</thr:total></entry><entry><id>tag:blogger.com,1999:blog-956064359108114628.post-6636512838508755099</id><published>2008-04-16T04:48:00.002+03:00</published><updated>2008-04-16T04:58:22.820+03:00</updated><title type='text'>Java ClassLoading</title><content type='html'>&lt;p&gt;  The essential part of the java world, but why is it so rigid and cumbersome?&lt;/p&gt;&lt;p&gt;  Every time we start Java the class loader is the essential part that drives the startup process.&lt;br /&gt; Every single piece of code that you have ever written for java is handled by some ClassLoader.&lt;br /&gt; Because it's not that easy. When a developer can develop an application that effectively uses ClassLoaders, I consider that person to have advanced level of knowledge of Java.&lt;br /&gt;&lt;br /&gt; ClassLoader is essential in defining a Class. Basically a class lives attached to a class loader. That is both a good and a bad thing.&lt;/p&gt;&lt;ul&gt;&lt;li&gt;The main positive thing is that we can have multiple versions of the same class without conflicts&lt;/li&gt;&lt;li&gt;The main negative thing(in current state) is that we need to remove the whole ClassLoader(with it's children) to reload our changes.&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;  The basic fact is that these 2 points are not mutually exclusive.&lt;br /&gt; But this way is mature. It's been with us for a very long time. We are actually used to it in it's current state.&lt;br /&gt; &lt;br /&gt; That is where tools like &lt;a href="http://www.zeroturnaround.com/javarebel/" mce_href="http://www.zeroturnaround.com/javarebel/"&gt;ZeroTurnaround's JavaRebel&lt;/a&gt; comes in our view. The idea is nice, it's executed well, and it definitely shows that there is a need for it.&lt;/p&gt;&lt;p&gt;  They use the new Instrumentation API.&lt;br /&gt; Instrumentation API is great, but it does have a little problem: &lt;a href="http://download.java.net/jdk7/docs/api/java/lang/instrument/Instrumentation.html#redefineClasses%28java.lang.instrument.ClassDefinition...%29" mce_href="http://download.java.net/jdk7/docs/api/java/lang/instrument/Instrumentation.html#redefineClasses(java.lang.instrument.ClassDefinition...)" target="_blank"&gt;no schema changes are allowed&lt;/a&gt;.&lt;br /&gt; That means that most of your changes will need the old process.&lt;br /&gt;&lt;br /&gt; Is it time we had a new method in ClassLoader that would unload a class(ClassLoader.undefineClass)? Or reload it, at least?&lt;br /&gt; I mean, the dynamic languages had that forever. PHP is a language that has a lot of inexperienced developers, and they still rarely manage to shoot themselves with that "feature". Does everyone consider everyone in java land an idiot that has to be constricted in every possible way?&lt;br /&gt;&lt;br /&gt; Java(and Java EE) deployment lifecycle is criticized a lot. It's long. Very long. And the compile time is not the main factor here, it's the deployment itself. With the current need to trash the whole ClassLoader hierarchy we are definitely taking too much time and memory consumption(resource usage) does suffer.&lt;br /&gt; Every single (re-)deploy goes through the same procedure on the lowest level:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;Application specific operations&lt;/li&gt;&lt;li&gt;Remove any references to the ClassLoader(s) of the application&lt;/li&gt;&lt;li&gt;Create a new ClassLoader&lt;/li&gt;&lt;li&gt;Link the ClassLoader to the deployed code&lt;/li&gt;&lt;li&gt;Application specific operations&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;  And this is an example where I just added a new logging method and a few statements to a class! As you look at it you might think what a sad state we are in!&lt;br /&gt; And if you have a thread there, guess you will have to restart the JVM to get rid of the old code from the memory.&lt;br /&gt;&lt;br /&gt; Now, I am NOT an expert in JVM internals, but how hard is it to change the piece of data in memory? Java classes are just data in the memory, like everything else.&lt;br /&gt;&lt;br /&gt; So what do you think? Is it time we have an ability to change the bytecode more dynamically?&lt;br /&gt; To have the classes reloaded through ClassLoader? Or, at least, the Instrumentation API would have the restriction on schema changes removed?&lt;/p&gt;&lt;p&gt;  What are your opinions?  &lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/956064359108114628-6636512838508755099?l=jalexoid.blogspot.com'/&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jalexoid.blogspot.com/feeds/6636512838508755099/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=956064359108114628&amp;postID=6636512838508755099' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/956064359108114628/posts/default/6636512838508755099'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/956064359108114628/posts/default/6636512838508755099'/><link rel='alternate' type='text/html' href='http://jalexoid.blogspot.com/2008/04/java-classloading.html' title='Java ClassLoading'/><author><name>JAlexoid</name><uri>http://www.blogger.com/profile/11226547359996333148</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='02183104841401283685'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-956064359108114628.post-4527537155672346347</id><published>2008-04-09T06:33:00.009+03:00</published><updated>2008-04-09T07:10:45.232+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Development'/><category scheme='http://www.blogger.com/atom/ns#' term='Life'/><category scheme='http://www.blogger.com/atom/ns#' term='Morals'/><category scheme='http://www.blogger.com/atom/ns#' term='Coding Future'/><category scheme='http://www.blogger.com/atom/ns#' term='programming'/><title type='text'>Do you have a backout profession?</title><content type='html'>We are living in a world where needs for professionals often rise and fall.&lt;br /&gt;Since the US is in a rough patch right now, we are seeing a decline of developer positions. Some are due to outsourcing to India. Others just because there is less Financing and projects are stopped.&lt;br /&gt;Europe is much the same, just the condition is generally a bit better. But hey, US is a major trading partner for us. And since I see little of American made goods on the shelves(and a lot of EU goods on American shelves), I expect that EU is mainly exporting to US a ton of products.&lt;br /&gt;So we in EU WILL be starting to feel the problems over the Atlantic some time in the near future.&lt;br /&gt;&lt;br /&gt;Software developer is a really volatile profession.&lt;br /&gt;&lt;ul&gt;&lt;li&gt;We rarely need to be at the client's side.&lt;/li&gt;&lt;li&gt;We may be successfully outsourced to another continent,&lt;br /&gt;     maybe the moon would be a possible destination if there would be enough population :)&lt;/li&gt;&lt;li&gt;Most developers are closed off people, at least during the crunch hours. That leads to indifference of the management towards employees they don't "see".&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;    I mean if the cleaning person would be sick for a week you would notice it. Even the office administrator, office manager are more visible professions than a software developer.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;So basically professions which services can be acquired via telecommunication technologies are really volatile by now.&lt;/span&gt; And those professions are usually the ones that are not really "visible".&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;span style="font-weight: bold;"&gt;So when you are planning your future DO you have a backout profession?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: left;"&gt;I do. I was thinking of it for quite some time. For some reason it was obvois you cannot rely on a single profession where you are dependant on single technology. Specially where it, in theory, may be able to automate itself in the future.(AI making AI, Robots making Robots)&lt;br /&gt;My filosophy had always been: &lt;span style="font-weight: bold;"&gt;Do not put all eggs in a single basket.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;My profession of nessecity* is &lt;span style="font-weight: bold;"&gt;a cook&lt;/span&gt;. A backout profession as I think of it.&lt;br /&gt;(Don't get me wrong, I LOVE cooking)&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Why? &lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Simple.&lt;/span&gt;&lt;br /&gt;There are some really basic professions, that cannot be outsourced:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;a cook&lt;/li&gt;&lt;li&gt;a healer&lt;/li&gt;&lt;li&gt;a barber&lt;/li&gt;&lt;li&gt;etc...&lt;/li&gt;&lt;/ul&gt;        The simple stuff will always be here.&lt;br /&gt;      These professions are the ones that satisfy our basic life needs. So I would never expect them tho disappear any time in the future, unless the huamn species are wiped out or the earth blows up.&lt;br /&gt;&lt;br /&gt;And in the end I will still do coding and development for fun. No matter where I end up.&lt;br /&gt;It's not about the money or stability, it's about doing what I enjoy.&lt;br /&gt;And by a coincidence my second thing that I enjoy is one of the most basic professions of all - cooking.&lt;br /&gt;&lt;br /&gt;(I do filosphy when I'm sleepy... Can't help myself...)&lt;br /&gt;&lt;br /&gt;* - both sides in this word: others need for; my need for.&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/956064359108114628-4527537155672346347?l=jalexoid.blogspot.com'/&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jalexoid.blogspot.com/feeds/4527537155672346347/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=956064359108114628&amp;postID=4527537155672346347' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/956064359108114628/posts/default/4527537155672346347'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/956064359108114628/posts/default/4527537155672346347'/><link rel='alternate' type='text/html' href='http://jalexoid.blogspot.com/2008/04/do-you-have-backout-profession.html' title='Do you have a backout profession?'/><author><name>JAlexoid</name><uri>http://www.blogger.com/profile/11226547359996333148</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='02183104841401283685'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-956064359108114628.post-718124705596381255</id><published>2007-09-24T16:13:00.000+03:00</published><updated>2007-09-24T16:17:42.012+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Morals'/><title type='text'>GOOD vs BAD? Hugh....</title><content type='html'>I have 2 morals to life that cover everything:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Life is all about HARD choices between BAD and equally BAD&lt;/li&gt;&lt;li&gt;"Ignore it and it will go away" DOES NOT WORK!&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;Like it or not there is NO right answer to anything that impacts our life. The choices that you have to make are never GOOD VS BAD, its rather what you think is good VS what you think is bad or even worse what is GOOD for you VS what is GOOD for someone else.&lt;br /&gt;&lt;br /&gt;Trying to ignore problems makes them pile up and they will crush you eventually.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/956064359108114628-718124705596381255?l=jalexoid.blogspot.com'/&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jalexoid.blogspot.com/feeds/718124705596381255/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=956064359108114628&amp;postID=718124705596381255' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/956064359108114628/posts/default/718124705596381255'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/956064359108114628/posts/default/718124705596381255'/><link rel='alternate' type='text/html' href='http://jalexoid.blogspot.com/2007/09/good-vs-bag-hugh.html' title='GOOD vs BAD? Hugh....'/><author><name>JAlexoid</name><uri>http://www.blogger.com/profile/11226547359996333148</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='02183104841401283685'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-956064359108114628.post-1472565865490650952</id><published>2007-09-06T15:09:00.000+03:00</published><updated>2007-09-06T15:31:50.171+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='programming'/><title type='text'>Perspecitves by expereince</title><content type='html'>With all our experiences we tend to have a biased view. That is how smart people operate. To get to wise level we need to understand that time changes everything.&lt;br /&gt;&lt;br /&gt;Same goes for programming...&lt;br /&gt;When you first need to evaluate frameworks, methods and other stuff. You must not jump to conclusions due to last bad experience. I was burnt a lot of times due to selecting the framework that was "cool" last time I used it, and was nowhere as good for a new project. Now I can say that I will not throw out a method or framework just because it's was not as good as I expected last project.&lt;br /&gt;At one time I was angry with RoR for not supporting PostgreSQL, that led to dumping it on next project as a candidate, at the end we dumped all our work and rewrote it in RoR and still made the deadline, just because I "saw the light" and tried it once more. And unfortunately I did the same mistake on next project, but it was the other way around.... RoR was selected just because it was fast... We got in a lot of trouble(mostly due to ACID-icity) and had to switch to Java EE and .NET combo...(I will not give any technical specifics of both projects)&lt;br /&gt;After those 2 project I now have a mind that is more open to possibilities, thus giving me the edge over people that see only one solution to any problem...&lt;br /&gt;&lt;br /&gt;So the moral is biblical: Don't judge and you will not be judged....&lt;br /&gt;&lt;br /&gt;When approaching any problem you have to let the "old bad" stuff be on the same plank as new and cool.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/956064359108114628-1472565865490650952?l=jalexoid.blogspot.com'/&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jalexoid.blogspot.com/feeds/1472565865490650952/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=956064359108114628&amp;postID=1472565865490650952' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/956064359108114628/posts/default/1472565865490650952'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/956064359108114628/posts/default/1472565865490650952'/><link rel='alternate' type='text/html' href='http://jalexoid.blogspot.com/2007/09/perspecitves-by-expereince.html' title='Perspecitves by expereince'/><author><name>JAlexoid</name><uri>http://www.blogger.com/profile/11226547359996333148</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='02183104841401283685'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-956064359108114628.post-9143617993220158461</id><published>2007-08-17T15:03:00.000+03:00</published><updated>2007-08-21T20:35:29.956+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Java'/><category scheme='http://www.blogger.com/atom/ns#' term='Testing'/><title type='text'>Testing paralell code(the way YOU want)</title><content type='html'>In my quest for coding nirvana I came across the need to test parallel code correctly.&lt;br /&gt;&lt;br /&gt;Current testing toolkits are rather scarce on this front. There is no thread management included with them.&lt;br /&gt;Once I needed that all code would be tested under 2 conditions: threaded and serial.&lt;br /&gt;I had to create a new revision with a lot of code changes. The way I wanted it to be would be through an implicit thread manager, that can be told to force the code to be serial.&lt;br /&gt;&lt;br /&gt;So far I thought up a simple technique of enhancing Thread class by adding callbacks to constructors and start method. This technique actually works. All you need is to define a transformer by the means of Java 6.0 instrumentation functionality. And using ASM from Objectweb  you can add hooks to Thread object, otherwise it is not allowed to redefine java.lang.* classes.&lt;br /&gt;&lt;br /&gt;And I expect that someone will sometime find a way of adding more manageability to Threads during testing.&lt;br /&gt;Therefore we could catch thread related bugs like race conditions etc...&lt;br /&gt;Unfortunately wait method on Object is native, so it would be hard to control waiting aspect of testing...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/956064359108114628-9143617993220158461?l=jalexoid.blogspot.com'/&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jalexoid.blogspot.com/feeds/9143617993220158461/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=956064359108114628&amp;postID=9143617993220158461' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/956064359108114628/posts/default/9143617993220158461'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/956064359108114628/posts/default/9143617993220158461'/><link rel='alternate' type='text/html' href='http://jalexoid.blogspot.com/2007/08/testing-paralell-codethe-way-you-want.html' title='Testing paralell code(the way YOU want)'/><author><name>JAlexoid</name><uri>http://www.blogger.com/profile/11226547359996333148</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='02183104841401283685'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-956064359108114628.post-1167437956550067742</id><published>2007-07-20T12:31:00.000+03:00</published><updated>2007-08-21T20:24:09.650+03:00</updated><title type='text'>The price and value of software</title><content type='html'>I am a person that likes to compare alternatives.&lt;br /&gt;Software space is not excluded from the comparison space.&lt;br /&gt;&lt;br /&gt;I have some strict moral rules on illegaly using software. If you're using some software that generates revenue or lowers costs, you MUST pay for it. I agree that MS Office is a good product and I can pay 800 euros(with Windows) to use it when needed, but enabling software like Windows, brining NO value by itself, gives me 0 reasons to buy it. Windows wins out ONLY on games, nothing else would keep me with Windows.&lt;br /&gt;&lt;br /&gt;Entertainment software(games and such) are different species, but I follow the same rules.&lt;br /&gt;There I can say that if I buy that particular title will it keep men entertained for the same time as I would have spent the same money on an alternative? Say cinema? New titles go up to 60 euros and more. FPS are the biggest problems, I can complete HL2 in 6 hours non interruptible time. Now once you played, it's no longer that interesting and with a single ticket to a cinema costing &lt; 5 euros with movies 1.5 to 2 hours I think spending the same time sitting in a cinema costs LESS while providing almost the same entertainment(personal view).&lt;br /&gt;&lt;br /&gt;So basically I would argue that like some prices are calculated based on how much you would spend on alternatives minus some small percentage, software prices should do the same.&lt;br /&gt;Software for business purposes should be priced not higher that the possible time savings. Custom software is another issue.&lt;br /&gt;Entertainment software prices should definitely be recalculated to honor the possible alternatives. Therefore im my country MOST of games are illegal copies. I personally play only WoW, the only game that I can say brings more entertainment than alternatives.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/956064359108114628-1167437956550067742?l=jalexoid.blogspot.com'/&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jalexoid.blogspot.com/feeds/1167437956550067742/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=956064359108114628&amp;postID=1167437956550067742' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/956064359108114628/posts/default/1167437956550067742'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/956064359108114628/posts/default/1167437956550067742'/><link rel='alternate' type='text/html' href='http://jalexoid.blogspot.com/2007/07/price-and-value-of-software.html' title='The price and value of software'/><author><name>JAlexoid</name><uri>http://www.blogger.com/profile/11226547359996333148</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='02183104841401283685'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-956064359108114628.post-973239341396541251</id><published>2007-04-17T05:40:00.000+03:00</published><updated>2007-08-21T20:08:15.299+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Java'/><category scheme='http://www.blogger.com/atom/ns#' term='Coding Future'/><title type='text'>Application developement process NIRVANA</title><content type='html'>What would you like coding to evolve to? I did a little thought on that and came up with some simple ideas.&lt;br /&gt;&lt;br /&gt;Going in the footsteps of Spring framework, we want LESS plumbing code.  Java, XML or other.*&lt;br /&gt;&lt;br /&gt;I asked myself what I wanted to ease my "typing pain"?&lt;br /&gt;For each piece of code that covers some logic, I want to say(ok, ok type in) I need this to operate. And I mean not like Spring does it, I mean like "I need the third letter from 17th page of a book that the client has selected to do my job". I don't want verbose XML's or Java helper classes for that. And I want it to be generic as much as possible, sure some things will still have to be coded and I do not mind doing it for too long.&lt;br /&gt;&lt;br /&gt;Defining process elements should be a simple operation. I like that it's already simple @ the top, but down here I am still in hell. Simple flows should be SIMPLE! (Map a to b and save to data store - should take no longer than 1 hour) Calling save method on data store should be something for optimization or out of the ordinary... Creation may be a different story...&lt;br /&gt;&lt;br /&gt;Otherwise Spring has it handled good, since auto-wiring components is a thing that I need to still be lazy...&lt;br /&gt;&lt;br /&gt;At the end I thought "Damn I'm LAZY".&lt;br /&gt;&lt;br /&gt;But then I thought of threads! Why J2EE containers "restrict" us using them? Why JMS became the solution to do parallel processing?&lt;br /&gt;Could we make so, that we declare that this logic is run in parallel and has a barrier? And I mean that that thread would be practically invisible, have the same auth token and maybe even run in the same global TX?&lt;br /&gt;&lt;br /&gt;The next thing is about saving state. I want be able to save state in such a way that the stack and execution points are saved. Therefore when restoring state the code could run from a certain point onwards, having the same local var's as if it had just come out of a long wait call. And I will not go to the extreme here, and be thankful for a partial implementation for this functionality... Some language constructs with some "save state here, and restore from here"...&lt;br /&gt;But this should directly linked with transactional memory. Ans since I am not for global transactional memory, I would just love transactional blocks.&lt;br /&gt;&lt;br /&gt;* - I am a person that sees extremes as answers. Fortunately I am smart enough to restrain those "feelings", but I'll be the most extreme here.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/956064359108114628-973239341396541251?l=jalexoid.blogspot.com'/&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jalexoid.blogspot.com/feeds/973239341396541251/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=956064359108114628&amp;postID=973239341396541251' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/956064359108114628/posts/default/973239341396541251'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/956064359108114628/posts/default/973239341396541251'/><link rel='alternate' type='text/html' href='http://jalexoid.blogspot.com/2007/04/application-developement-process.html' title='Application developement process NIRVANA'/><author><name>JAlexoid</name><uri>http://www.blogger.com/profile/11226547359996333148</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='02183104841401283685'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-956064359108114628.post-1596350607480430304</id><published>2007-02-03T00:09:00.000+02:00</published><updated>2007-02-03T00:32:36.950+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Java'/><title type='text'>JDBC 4.0, really?</title><content type='html'>Why is half the stuff missing from JDBC 4.0 that was there?&lt;br /&gt;I waited for killer things like the Queries and DataSets (iBatis goes BOOM!).&lt;br /&gt;Although I would prefer that creating multi column data type would be there, instead of Queries and DataSets.&lt;br /&gt;It would be nice to have something like:&lt;br /&gt;&lt;br /&gt;@JdbcDataType&lt;br /&gt;public class SomeData{&lt;br /&gt;    String a;&lt;br /&gt;    @Alias("c")&lt;br /&gt;    String b:&lt;br /&gt;    // Setters and getter and other stuff ......&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;PreparedStatement pst = connection.prepareStatement("SELECT a,c FROM SOME_COMPLEX_VIEW_OR_FUNCTION WHERE a= ?a AND b = ?c ");&lt;br /&gt;pst.setObject(instanceOfSomeData);&lt;br /&gt;ResultSet rs = pst.executeQuery();&lt;br /&gt;while(rs.next()){&lt;br /&gt;    SomeData data = rs.getObject(SomeData.class);// And of course we need overloaded method&lt;br /&gt;}                                                                                                                  // That takes a factory instance for objects&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Simple, easy.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/956064359108114628-1596350607480430304?l=jalexoid.blogspot.com'/&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jalexoid.blogspot.com/feeds/1596350607480430304/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=956064359108114628&amp;postID=1596350607480430304' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/956064359108114628/posts/default/1596350607480430304'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/956064359108114628/posts/default/1596350607480430304'/><link rel='alternate' type='text/html' href='http://jalexoid.blogspot.com/2007/02/jdbc-40-really.html' title='JDBC 4.0, really?'/><author><name>JAlexoid</name><uri>http://www.blogger.com/profile/11226547359996333148</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='02183104841401283685'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-956064359108114628.post-1302060843707948739</id><published>2007-02-03T00:02:00.000+02:00</published><updated>2007-02-03T00:09:26.648+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Java'/><title type='text'>IBM releases Java SDK 6 Early access, finally</title><content type='html'>Glad to hear that IBM has got a bit more progressive on their software front.&lt;br /&gt;&lt;br /&gt;Maybe we will get a certified for Java EE 5 WebSphere application server?&lt;br /&gt;&lt;br /&gt;Surely many great products have emerged from IBM, but somehow for last few years IBM has been a bit slow in adopting technologies. Good to see the wind changing. Hopefully they still will be able to keep the quality of products and quality standards HIGH on "stable" releases.&lt;br /&gt;Well in my personal opinion DB2 ROCKS! and if WAS would be just half of what DB2 is than LOOKOUT Oracle and Bea!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/956064359108114628-1302060843707948739?l=jalexoid.blogspot.com'/&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jalexoid.blogspot.com/feeds/1302060843707948739/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=956064359108114628&amp;postID=1302060843707948739' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/956064359108114628/posts/default/1302060843707948739'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/956064359108114628/posts/default/1302060843707948739'/><link rel='alternate' type='text/html' href='http://jalexoid.blogspot.com/2007/02/ibm-releases-java-sdk-6-early-access.html' title='IBM releases Java SDK 6 Early access, finally'/><author><name>JAlexoid</name><uri>http://www.blogger.com/profile/11226547359996333148</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='02183104841401283685'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-956064359108114628.post-223546920699715593</id><published>2006-11-11T02:58:00.000+02:00</published><updated>2006-12-26T20:43:53.758+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Java'/><category scheme='http://www.blogger.com/atom/ns#' term='Development'/><category scheme='http://www.blogger.com/atom/ns#' term='SOA'/><title type='text'>SOA and RL(Real Life)</title><content type='html'>WS-* is probably the most popular SOA base.&lt;br /&gt;But if you want real improvements on the base level focus on decoupled components!&lt;br /&gt;Decoupled is the thing that will keep your code clean and easy.&lt;br /&gt;&lt;br /&gt;Of course this is not real life where SOA = WS. SOAP(Simple Object Access Protocol) please remove S out of SOAP or at least change it to something like OAP(Object Access Protocol). Have you tried to understand all the specs for WS? XML is easy and readable, XML Schemas introduce complexity(but NP), but WS has so many elements that I get lost in them. WS is slow, WS is complex, WS is not easy.&lt;br /&gt;&lt;br /&gt;Writing decoupled components implies such techniques as coding against interfaces, breaking down components into logically separate modules(not just refactoring classes) and other decoupling methods.&lt;br /&gt;When you look at 3 tier architectures, MVC and IoC(Dependency injection) you will see that they are decoupled into logical(not everywhere) parts.&lt;br /&gt;When not to go berserk and decouple everything from everything example: Accounting logic should not be decoupled from Tax application logic(most of the times), file storage logic is logically with file attribute logic.&lt;br /&gt;What you see that is not core part(and in "core" I mean that logic that is bound to the process that invokes it)  is usually should be moved out of the code and expose it as a "service"(no reference to SOA or WS).&lt;br /&gt;&lt;br /&gt;The best thing that works for me is just imagining thing in reality.&lt;br /&gt;How would you use accounting services?&lt;br /&gt;&lt;ol&gt;&lt;li&gt; You would go to an accountant and request to calculate your taxes. You do not care what the accountant does as long as you get the correct result.&lt;/li&gt;&lt;li&gt; When you have cash and want to deposit it you go to the bank, wait in line and give your money, id and deposit form and you wait for response that your transaction is complete(In this scenario money = data, bank teller = DA component, safe = data store).&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Your secretary is writing a letter after you.(your words = data, secretary = DA component, pen and paper = data store, and you may even get corruption)&lt;br /&gt;&lt;/li&gt;&lt;/ol&gt;In 1 - you don't have to learn all the tax laws = easier life, 2 - you don't have to store money at home = less chances to be robbed, 3 - you don't need to write and check spelling(I was not the best speller in school maybe you were?)&lt;br /&gt;&lt;span style="font-size:130%;"&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;JUST TO NOTE: COMMUNITY EVOLVED STANDARDS ARE GENERALLY BETTER THAN A STANDARD CREATED BY A STANDARD BODY!&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;DA - data access&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/956064359108114628-223546920699715593?l=jalexoid.blogspot.com'/&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jalexoid.blogspot.com/feeds/223546920699715593/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=956064359108114628&amp;postID=223546920699715593' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/956064359108114628/posts/default/223546920699715593'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/956064359108114628/posts/default/223546920699715593'/><link rel='alternate' type='text/html' href='http://jalexoid.blogspot.com/2006/11/soa-and-rlreal-life.html' title='SOA and RL(Real Life)'/><author><name>JAlexoid</name><uri>http://www.blogger.com/profile/11226547359996333148</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='02183104841401283685'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-956064359108114628.post-3011988908682813435</id><published>2006-11-01T11:26:00.000+02:00</published><updated>2006-11-08T20:14:00.959+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Development'/><title type='text'>Hide the developers! The "business" is coming</title><content type='html'>What a the developer on the ground needs the most is simplicity. Any developer should be like a technical guy. The architect/project lead comes and says do that and that and do not worry about anything else. That is why there are PMs and architects - they are the "buffer" between all the crazy requests end client makes, even on the latter stages of the project. I recently was in a project that wanted to introduce new requirements and concept change 2 weeks after the development phase had ended and all functionality was finalized.&lt;br /&gt;&lt;br /&gt;If you are a developer that is talking to "the client" your productivity as a developer falls tremendously. Be careful what you promise and NEVER EVER say "yes".&lt;br /&gt;If you ever tried to look at how the specification is being created you'll see that for every requirement PMs battle with "the client". I wouldn't call it a requirement session but rather requirement battlefield.&lt;br /&gt;&lt;br /&gt;Be careful though as a developer you have to protect yourself against bad PMs and architects. Never let PM or architect say "this is easy" when you know that this is not easy with the technology that was selected. When youre alone from you team in a meeting with "the client" always say "we will have to check it and we'll get back to you on it" because even "ok" will seem to the client that you are ready to accept his terms where you may be not.&lt;br /&gt;&lt;br /&gt;So remember if you're a developer concentrate on the technical side and leave "the client" to PM.&lt;br /&gt;&lt;br /&gt;"business" - is usually the end client of the project.&lt;br /&gt;&lt;br /&gt;(Most of this stuff is my personal mental note)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/956064359108114628-3011988908682813435?l=jalexoid.blogspot.com'/&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jalexoid.blogspot.com/feeds/3011988908682813435/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=956064359108114628&amp;postID=3011988908682813435' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/956064359108114628/posts/default/3011988908682813435'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/956064359108114628/posts/default/3011988908682813435'/><link rel='alternate' type='text/html' href='http://jalexoid.blogspot.com/2006/11/hide-developers-business-is-coming.html' title='Hide the developers! The &quot;business&quot; is coming'/><author><name>JAlexoid</name><uri>http://www.blogger.com/profile/11226547359996333148</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='02183104841401283685'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-956064359108114628.post-4375448732389468344</id><published>2006-10-30T13:26:00.000+02:00</published><updated>2006-11-08T20:35:33.116+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Development'/><title type='text'>Testing everything</title><content type='html'>I always need to test.&lt;br /&gt;Never do trust that anything will work. I always get this urge to test. I have absolutely no faith in theory. Practice makes perfect ... not theory.&lt;br /&gt;&lt;br /&gt;Developing applications without the ability to test if the code is working is too much for me, it's like painting blindfolded having both your hands in casts.&lt;br /&gt;Note to the tech staff and IT security staff: If you do not give developers full access to every resource that will be used(not actually the real thing but at least an accessible copy) than you will 100% get security breach because the code could not be tested under real conditions.&lt;br /&gt;&lt;br /&gt;The testing is a very head on process that allows the developer to test most of the code for most visible bugs. If we cannot test that means we are back in the pre-PC era. Look at what we develop and do not forget that testing is one of the most important things in the current development methods. I for one write code fast and not always do it right, because it would take me an awful lot of time to write clean and bug free code without testing like in assembler or machine code for microcontrollers.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/956064359108114628-4375448732389468344?l=jalexoid.blogspot.com'/&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jalexoid.blogspot.com/feeds/4375448732389468344/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=956064359108114628&amp;postID=4375448732389468344' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/956064359108114628/posts/default/4375448732389468344'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/956064359108114628/posts/default/4375448732389468344'/><link rel='alternate' type='text/html' href='http://jalexoid.blogspot.com/2006/10/testing-everything.html' title='Testing everything'/><author><name>JAlexoid</name><uri>http://www.blogger.com/profile/11226547359996333148</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='02183104841401283685'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry></feed>