How Many Frameworks Does It Take To Retrieve Orders?

I don’t like most of the Flex MVC frameworks cause they force me to write more code. I do like frameworks and tools that let me write less code. But there is no free lunch and, at some point, even productive frameworks, tools, and libraries reach critical mass and the finger pointing game begins.

Today, I’ve been working on an application that was supposed to display a list of orders form a relational DBMS. Not a rocket science. But let’s go over the languages, libraries, tools, and frameworks I had to use for this.

First, I wrote a 20-lines SQL Union statement and tested it in Oracle’s SQL Developer. Then I generated 80% of the code and wrote the other 20% manually. Here’s what I was using:

1. Eclipse IDE for Java EE Developers (Eclipse Foundation), which comes with the WTP plugin

2. CRUD code generator Clear Data Builder (Farata Systems). It generated the initial application written in Java, ActionScript, MXML. It also generated ANT build script

3. Configured Apache Tomcat (Apache Foundation) to run from inside Eclipse – this is where my rich Internet application is deployed.

4. Added to the project the libraries of MyBatis (Clinton Begin and Apache Foundation). This is a light-weight data mapping framework. You map manually written SQL to a Java DTO, which eliminates the need to write JDBC.

5. Spring Framework (Spring Source) was used to simplify wiring of MyBatis into my Java applications.

6. BlazeDS framework (Adobe) is being used for efficient serialization of the server-side Java into client-side ActionScript objects and back via AMF protocol. This exchange happens between the peer ActionScript/Java DTOs.

7. The ActionScript DTOs where automatically generated based on their Java peers by the DTO2FX tool (Farata Systems)

8. Most of the Java code was generated, but I had to write small fragments to be called for data manipulations via SQL/MyBatis

9. The latter would engage the Oracle driver and DBMS (Oracle)

Everything’s ready. Start the server, run the Flex app, and…instead of data I’m getting this error: ” org.springframework.jdbc.ArchiveSQLException : Error setting null parameter. Most JDBC drivers require that the JdbcType must be specified for all nullable parameters. Cause: java.sql.SQLException: Invalid column type”.

This error message is misleading. I do insert parameters to the SQL Select, but they are not nulls. I don’t insert anything into the database. The worst part is that there is nothing left to debug. Everything up to the last SQL-annotated Java method declaration works fine. But you can’t debug a method signature, can you? Who is to blame? Oracle driver? Or should I get the source code of MyBatis trying to find the line of the code that blows up?

Enough for today. Going home. I don’t know what’s causing this issue, but I’ll find the solution. The only question is how much time I’m going to spend on it. Do all these productivity frameworks and tools really save time in the long run? Would I be better off writing JDBC code manually? AS a matter of fact I like MyBatis a lot better than Hibernate, but still… Where are the time savings?

Sad Experience: Doing Business With Avacorp

Avacorp is an IT consultancy with headquarters in Edison, New Jersey. Their employees are located in the USA and India. According to their top management, the size of the company is more than 100 people.

In July of 2010, our company, Farata Systems, has been hired to develop an application for one of the Avacorp’s clients. I was leading a team of seven developers from our side, and Avacorp was managing the project, performed test, business analysis, and the data base administration.

Per our agreement, Avacorp had to pay for our work on the Net-30 basis, which meant not later than 30 days after receiving an invoice. After the first month of work we billed them and continued working for another month. So during the first two month our team of seven developers works, they were getting paid from Farata Systems funds. No big deal – we work with many clients under similar agreements.

After two months of work I decided to find out from Vivek Dhamodharan, Avacorp’s CEO when are we going to get paid. For some time he simply didn’t pick up my phone calls. When I got lucky, he explained that there are some difficulties, and they’d pay a portion of the amount and the rest shortly. OK. We kept working for another month and sent the second invoice. I made a follow up call asking regarding our payments. Vivek said that their client had financial issues and would resolve them shortly, and then Avacorp would pay us.

At this time the amount of unpaid invoices was way north of $100K. Each of our developers was getting paid regardless of these issues, and we decided to stop the development. This time Avacorp started bombarding us with emails explaining that this was their very important client and we should continue working.

We didn’t work on this project for a month. This was a force major situation for us – the entire team of our developers was out of project on a one day notice. After a month, Avacorp stated that their client found the money and we’d get paid, and had to put the same team back together to continue working on the project.

I responded that we are willing to continue working if Avacorp would start pre-paying a full month work based on the month-to-month signed agreements. This was a Time and Material project so we “d be multiplying the rates by the man-hours to calculate the approximate amount. Avacorp started to beg to go easier on them, and we agreed on taking 50% of the next month amount sending them an invoice with the factual amount at the end of each month.

Each month we’d sign the Scope of Work (SOW) document for the next month listing resources/hours they need. All this time the work of our developers was closely managed by a project manager from Avacorp, who was satisfied with the quality of work we provided.

By May of 2011, the application was almost ready and the size of our team shrunk to 1.5 developers. By May 15 I asked if we should keep the same developers in June, and were told that Vivek would be sending us a new SOW shortly. It didn’t happen.. Despite that, I kept the key developers working on this project till the last day of May.

On May 31, Kiran, the project manager of Avacorp contacted me stating that the project won’t continue in June, but our developers would still need to finish a couple of lose ends. I asked if Avacorp was planning to pay for it?
“No. Since some milestone was not met, you’d need to do it for free”.

I responded, “Kiran, this was a Time and Materials project, we never agreed on being paid only if certain milestones were met. Besides, you’ve been managing our developers till the last day and was happy with their work. If you believe, that our developers didn’t deliver quality code, I’ll tell them to fix what they did wrong for free “.
“No, they worked fine, but there is something else to finish”, said Kiran.

I know that something may go wrong, and nobody’s perfect. But I was not asked about a favor. I was told that we must do this job. We rejected, and apparently Avacorp’s developers fixed those small issues on their own.

It’s mid August, and we’re still waiting for Avacorp to pay us for the second half of May for the work that we completed as per their requirements. Vivek keeps promising … Nine days ago he sent us a polite email with the following content:

“Apologies for the late response. We should be able to confirm the date of payment this Monday it will be this week. Sorry for the delay. We value your relationship and it has been mutually very good. Will give you a call on Monday to confirm the wire date.” Needless to say that we didn’t get a call till today.

Anyone who ‘s running a company knows that sometimes delays in payments happen. This was happening to us too with the clients as small as two-person startups or as large as multi-billion dollar corporations. But we never had a situation when the client simply didn’t want to pay and postpones this moment by any means.

Are we the only vendors of Avacorp having issues with payments? Apparently not. We found the site http://ripoffreport.com where another vendor complains about the same.

The more the merrier. The class action law suit can be the only way for us to get paid for the work that we did.

Water-Damaged iPhone

A week ago my 17 y.o. son dropped his 3 month old iPhone 4 into a hot tub. Guess what, it stopped working. To be precise, the camera flash was producing a steady light, and this was it. Using your smart phones and iPods by any types of water containers (including toilets) is not smart. Water damage is not covered. Apple put this special Liquid Contact Indicator inside the iPhones, which tells to the service technicians if the phone has been sunk.

Needless to say, my son was upset. His income from working part time at the local library is modest, and the last thing he was planning to spend it on was paying several hundred bucks for a little mistake he made.

These days when a young kid needs to find out how to fix something, he/she goes to a reliable source like Youtube ,Yahoo Answers. A guy on Youtube shared his story how keeping an iPhone in a container with rice for a couple of days fixed his iPhone. Rice is known for its water absorbing abilities.

Three days in a rice somewhat helped. The ability to make and receive calls came back. There was a little inconvenience though ndash; the screen remained pitch black. My son has good memory though and remembered the areas on the screen where the phone buttons were before the accident. The the voice activated feature came handy. Saying “Call Dad ” made the iPhone obediently dial my number.

After a week without this device my son said how this issue with the iPhone gave him a peace of mind ndash; no need to text, check emails and facebook that often. Yeah, right! Tell me about peace of mind, kido!

On Saturday, I asked him what “s the status of this rice-recovery process. He replied that it “s pretty much hopeless. I felt really bad for him, and started thinking of how to help. Giving money for a new phone was out of the questions ndash; I “m not that kind of a parent. Breaking the 2-year contract with AT amp;T and getting into a new one is expensive. So I said, “Make an appointment at the Genius Bar at the closest Apple store, let “s go there, tell them the truth, and get an estimate of the repair cost. ”

Two hours later we entered the store and my son bravely said, “I dropped my phone into the water, and then did this rice thingy hellip; ”

The technician smiled, “This rice thingy might help in the beginning, but the hardware is damaged and it “d show up some way later. But let “s see hellip; “.

Then he took out the SIM card and carefully examined its holder. “The replacement will cost you $199. Think about it while I “ll check your account. ”

The next comes the dialog between me and my son

“Do you want to pay $199? ”

“I “d like to check all my other options first ”

“But you don “t have many options, do you? Do you have money on your account? ”

“I do, but before paying I “ll like to check my other options ”

“What if I “ll pay half? ”

“Thank you, but I “d like to see what else can be done ”

The guy comes back and says to me, “You “re a good customer and, as an exception, we decided to replace this phone for free. ”

A minute of silence… Two smiles hellip; Three smiles hellip;Thank you, thank you, thank you hellip;

Ten minutes later we left the Apple store, the place that carries the great devices and can turn an issue into a fun experience. And this was not the first time they did it to me!

My son was so happy carrying a new iPhone 4 (I guess, it was a refurbished one , but covered by a regular warranty)! He said, “Honesty is the best policy! ” It really is. I replied, “Steve Jobs for President! “

Java Veterans, Brush Up Your Java

During the last two months I “ve interviewed a number of senior Java developers for a position at the financial firm. Vast majority of them have 10+years experience working with Java on real-world financial applications. They have lots of interesting projects on their resumes, know how to present themselves, are self-confident, and claim the expert level of Java knowledge.

But it seems that most of them assume that just spending years working on Java projects is enough for considering themselves Java experts. The fact that you “ve been using Hibernate, Spring, JMS, and some caching framework doesn “t make you a Java expert. Over the years you might have improved your understanding of the architecture of Java EE applications, but this doesn “t not make you a Java expert.

Back in 2004, Java 1.5 has been released. Besides generics and annotations it introduced the library of classes supporting concurrency. I don “t care if you know generics, but this library is golden, especially for Java developers who are applying for working on financial applications. Many of these Java veterans never bothered looking into the latest Java features for years. And if I “m asking any concurrency-related question, a typical answer is “Oh yes, I remember there were some new classes that can do this. rdquo; Some new classes? Come on, they were in Java since September of 2004!

If a job applicant believes that the only two ways to create a Java thread are extending a Thread or implementing Runnable, he ‘s not a senior Java developer regardless of how many years he spent working on Java projects. This tells me that this person doesn ‘t care about Java and is not interested in keeping his technical skills current.

This is one of these “less is more rdquo; situations. People who have learned Java after 2004 are more likely to know it better. My message to Java veterans is simple, “If you want to compete with young kids, spend some time learning Java programming. Become competitive as you were ten years ago. Otherwise your only option is to complain about the outsourcing that may take away your job any day. rdquo;

If President Obama Would Run an IT Project

What do you need to do to bring a software development project to a dead end?

Get a group of software developers and give them a manager who never managed an IT project before, but is a skillful oracle who can convince business users that his team is working as planned, is moving in the right direction, and will produce good results. Important: at any cost avoid setting any deadlines and deployment dates – not even for the alpha releases.

During the first year, the business users wouldn “t expect seeing improvements in software because the previous team lead used the wrong architectural principles, wrong design patterns, didn “t use Ruby on Rails. Besides, who said that creating a cross-platform state of the art software should be easy?

The biggest enemy of such project is agile methodology. No two-week sprints showing any intermediate results are allowed. Insist on the waterfall management style, which requires a couple of years just to produce the project documentation.

Software developers working for such manager will quickly figure out that they are allowed to spend most of the time working on their pet projects. But if Google employees can spend only 20% on pet projects, in this team it “s close to a 100%.

Our charismatic manager will keep convincing project stakeholders that the headcount and the budget for his team needs to be increased. One of the reasons for new funds is waging a new flame war with Java developers from the 15th floor. The goal is noble ndash; to explain them that since all software development on the 13th floor is done in Ruby and Rails, the 15th floor would also benefit from using this great technology for quick prototyping. Conventions over configurations rules!

A couple of years later, this war can be used as an excuse, “The war with the 15th floor created holes in our budget, so we could not complete own project and need more money rdquo;.

This manager would keep generating new internal projects. Massive code refactoring is a great candidate for this! Every developer will be able to convince any outside auditor why replacing this piece of code with that one is the right thing to do. Developers will do it sincerely and with high energy. No ROI? Well, you can “t measure everything with simple arithmetic. Restructuring the code and making it more readable is clearly a great project for future generations who may want to read and reuse our software components.

Unfortunately, the day may come when the business users/stakeholders will notice that in a couple of weeks they can run out of money. No, literally. Now this project will have to be either closed or outsourced to India with mandatory relocation of the entire team from Washington DC to Bangalore. All of a sudden, the angry business users will become hyperactive and will start putting enormous pressure to our IT team (they even force the team to work on the weekends, no kidding!). Dear business users, didn “t you see this manager was pulling your legs from day one? Or maybe you knew it all along, but wanted to enjoy seeing this incompetent C-level manager on his death row? You got it now. The project is terminated. Who “s happy?

The job has to be done anyway. Put up a new job description for another project manager, but make sure it includes the following clauses:

“Deep familiarity with the agile development methodology is a must. Successful large-scale projects must have traceable references with a proven track record. “

Thank you, Java annotation!

This was an interesting bug hellip; I was working on a Web application, where Adobe Flex client was sending an instance of an ActionScript WrapperObject to the Java server, which was supposed to invoke some JBDC code to run an SQL Insert statement saving the data from the Java version of WrapperObject in the database. I wrote all the pieces of Flex, Java, and SQL and started Tomcat in Eclipse IDE.

The Web browser displayed my window, I filled out the form populating the ActionScript WrapperObject and pressed the button Save. Nothing happened. No errors and no data inserted in the database.

Well, need to start debugging hellip;Let “s see what could have gotten wrong:

1. I didn “t properly populate the ActionScript WrapperObject

2. I didn “t properly configure the Java class/method so the front end didn “t even call it.

3. I didn “t code the database portion properly.

But why there is no errors? Starting the Flex part in the debug mode quickly revealed that the WrapperObject was properly populated and the asynchronous request to the Java server has been sent.

Great. The next question is, “Have I called the proper endpoint (the destination) on the Java side and if the correct method has been really invoked? rdquo; Started an HTTP/AMF sniffer, which confirmed that I was calling a method on the endpoint mapped to the class Customer shown below. On the Java side, the class hierarchy looked as follows:

class _Customer {

hellip;

public boolean saveData( WrapperObject wrapper){

// an empty method

}

}

class Customer extends _Customer{

public boolean saveData (WrapperObject wrapper) {

// the code saving data in DBMS was here

}

}

Without leaving Eclipse IDE, restarted Tomcat in the debug mode and put a breakpoint in the caller of Java “s saveData. Interesting hellip; The debugger brought me inside the empty method of _Customer.saveData. Do you see any spelling errors in the method signatures? Me neither. This was about time to use a Java annotation @Override, which I was always underestimating. Changed the class Customer to look like this:

class Customer extends _Customer{

@Override

public boolean saveData (WrapperObject wrapper) {

// the code saving data in DBMS was here

}

}

Sure enough, the Java compiler immediately told me that the method saveData has to override the one from the superclass. But I did override it, didn “t I?

The problem was that my project has two different versions of the class WrapperObject located in different packages! The superclass was using the WrapperObject from one package, but the subclass from another! This little annotation caught what my eyes didn ‘t see. Fixed the import statement in the subclass to properly override the method saveData, re-ran the program and got hellip; an SQL error stating that I have an extra comma somewhere in my Insert statement. But this one is a piece of cake! I was so happy.

Thank you Java @Override ndash; you made my day!From now on I ‘ll be using this example in all my Java classes.

An Open Source Paradox

Once again I ‘m facing a weird dilemma. Our company (Farata Systems) has created yet another piece of great software that allows fast and smooth work with large sets of data in Flash Player. For example, a datagrid with 200K records works like charm with our lazy loaded collection. But this solution is not so trivial to explain. If we give it away to the open source “as is “, people will start having issues with it and will start bad mouthing us publicly. On the other hand, we don ‘t have time and resources to properly document this solution. It ‘s a lot easier to offer this solution for sale as a short gig to all these filthy rich Wall Street firms 🙂

Over the weekend, I will record and publish the video to at least show this solution in action.

Social Networks Will Kill Religions by The End of Century

Why people practice religions

IMO, people are practicing any religion for three reasons:

a) They’ve been born and raised in a religious family

b) They got some serious illness or lost one of their loved ones and are looking for help that’s the current society and science can’t offer

c) You want to marry her, and the mother-in-law-to-be wouldn’t approve the marriage you will convert into whatever religion she practices.

How they do it

For some people faith in God is very personal. They don’t need a middleman to talk to God. They don’t need to wear a certain attire or be in a certain place at a certain time to pray. These kinds of people are minority though.

Most of the people prefer to be in a heard while talking to God so they gather in churches, mosques, synagogues, or Buddhist temples. They practice religions. Some of the religions are older then others. The new religions were not appearing that often, but the human life had a lot slower pace too. The information channels were slow. Who would have thought that the mankind needed one more religion? But it was born, matured and got lots of followers over time.

Social networks are today’s religions

The history of the social networks resembles the history of religions but at a much faster speed. Who would have thought at the medieval times of MySpace that the mankind needs another social network? Nevertheless, the Facebook has risen from the ashes with its half billion worshipers. Who would have thought that the mankind needs another social network if the FaceBook (and its regional clones) serves all our needs? But last month the prophet Google Plus has been born and a large portion of people who were practicing the FaceBook religion are ready to move to another temple.

People want to be among people with similar believes. If a hundred years ago, say a Christian had to relocate, the first thing he’d do was finding a local church. What happens today? If a person relocates or travels to a new place, he start with finding the Internet connection to be able to login to his FaceBook, Twitter account to find himself in a not just a similar, but in HIS/HER OWN congregation.

While people are wondering if Google Plus presents a danger to FaceBook, my question is wider: “When the social networks will completely replace the need to practice ANY religion? rdquo; IMHO, in the Western society this will happen by the end of this century. All it takes is three generations of people raised on Facebook, Twitter, Google+, and the like.

I can read Japanese!

I wanted to download a software from a Web site, and there was a link to the Read Me First file. Here ‘s what I saw after clicking on the link:

利用条件と免責事項 9031のソフトウエアは無料でご利用いただけます。

これらのソフトウエアは使用者ご自身のPCデスクトップ環境の範囲内でご使用ください。作者の許可なく無断で再配布、改名、変換などを行うことはご遠慮ください。

これらのソフトウエアの使用は、使用者ご自身の責任でおこなってください。これらのソフトウエアを使用またはインストールすることは、本利用条件と免責事 項に同意したものと見なします。これらのソフトウエアのダウンロードや使用に関して、使用者に直接または間接的損害が生じても、作者はいかなる責任を負わ ないものとし、一切の賠償等を行わないものとします。

My first thought was, “Yeah, right! What am I gonna do with this gibberish? ” A second later I copy/pasted this text to Google Translate, and read this text first in English, and then in Russian. Google changes our lives, habits, and routines big time!

Waiting to see if Google+ will make me a fan of social networks. Facebook failed miserably in getting my time.