Yahoo!s Babel Fish is lost in translation. Its just horrible!

When I found out that you can add a Yahoo! Babel button to your Web page to translate the text to several foreign languages, i decided to add it to my blog. Prior to Babel, I tried Google ‘s translator to see how it translates from English to Russian. Since it ‘s still in Beta, the quality of the translation has a lot of room for improvement. Ok, Beta is beta, so let ‘s wait.

Since Yahoo! does not mark their tool as Beta, I assumed that the quality of translation will be better. So I ‘ve decided to make the world a better place by offering to the mankind reading my pearls in their native language. Adding the translator ‘s button was easy, but when I tried to translate my blog about Flex class , the result of translation from English to Russian is just f ‘ng horrible! No, it ‘s not just bad, it ‘s absolutely useless.

Then, I took the same text and went to Google ‘s translator (in beta), which gave me some meaningful translation. It has mistakes, but at least a Russian-speaking reader can understand what is this blog about.

I ‘d really appreciate if you could translate the same blog to the language you know, and leave a comment here about the quality of Yahoo! Babel Fish vs. Google translator.

Starting my next Flex class at NYU in ten days

Time flies. This is already the third time that I ‘m going to teach a hands-on course Building Rich Internet Applications with Adobe Flex at New York University starting on October 25. I really like this class. It runs over five weeks on Thursday nights. As opposed to typical five-day-in-a-row enterprise training, this gives the students a chance to spend some time between the sessions, do some studying on their own and bring the right questions to the next session. By the end of this course the students build a FLex application that communicates with Java part deployed under Tomcat and with Yahoo! to grab some RSS data from there.

If this sounds interesting let ‘s spend these five evenings together in an NYU lab. Enrollment is opened to the public. Pre-requisites: understanding of Object Oriented Programming and basics of XML.

Disclaimer. I ‘m not getting paid based on the number of enrolled students, so this blog is not an infomercial but rather a friendly suggestion on how killing five evenings may possibly change your career and add some fun to your day-to-day coding routine. This course really worth the money, especially if you take into consideration that having a student card entitles you for purchasing Flex Builder license dirt cheap.

Oops…I found Silverlight under my bed

Have you checked your Program Files folder lately? If you did not, do it now. Surprise, Surprise! My happy family may have a new kid ndash; Microsoft Silverlight made itself comfy on my machine.

There are different ways of delivering the run time environment for rich Internet applications to users PCs.

The AJAX crowd proudly states ndash; 100% of computer users have everything we need to run our applications. JavaScript is installed on every user “s machine, unless some psycho has disabled it. XmlHttpRequest object is also there.

Sun Microsystems ” speakers usually includes a slide in their presentation that states that several hundred million devices have JVM installed. Do not even think of asking the presenter this question, “How many of these JVM will be able to run my Java program XYZ? rdquo; Oh well, all these JVMs are a little bit different. Next year Sun will start its long Consume- JRE-penetration-journey with a hope that some day, every client device will have its version that will be compatible with all Java programs. If Sun Microsystems had this power to force feed your PC with the latest JRE, Java would be the number one tool for creation of Rich Internet Application, and they would not be spending years scratching their heads about the mystery of seamless install of a VM.

Six years ago, when Sun Microsystems and Microsoft settled the lawsuit about Java, both parties made happy statements, but this settlement was a major mistake on Sun ‘s part. Of course, they did manly thing by not allowing Micosoft to inject their libraries to JDK, but they should have made another deal that would allow Microsoft to distribute the latest JRE as part of Windows updates. This way 90% of the people in the world would have had the right version of JRE on their machines. SUN would be a leader in the RIA space by now.

A well-mannered Flash Player will ask you if you “d like to download Flash Player 9 IF AND ONLY IF you visit a Web page that includes a program that needs Flash Player 9. But even this polite way of asking for upgrade allowed Flash Player 9 to get installed on more than 93% of all computers (countries like Nigeria and Somalia do not count).

When Microsoft released their RIA tool called Silverlight, I thought to myself, “Microsoft is still a very powerfull company, but it “ll take them a while to get the Silverlight runtime to a substantial number of clients. rdquo; Boy, I was wrong! Microsoft is pushing it to every Windows user like myself as a Windows update. All of a sudden I have it installed on my PC without even asking. Not too kosher, but it gets things done.

AJAX reporting – challenges and solutions with Flex

Check out this article to see how two swf components (both written in Flex) can help AJAX folks with processing SOAP Web Services and incorporating professional looking reports into HTML/JavaScript pages. Now our Web reporter ClearBI can get the data from any JavaScript array, from Web Services, from POJO using open sourced openAMF, and, of course from LiveCycle Data Services ES.

Rails is an amazing teacher, but what else?

In Summer of 2006, I ‘ve interviewed Bruce Tate. We were discussing Ruby and Ruby on Rails. Bruce went over specific features of the language, and at the end of the interview, I ‘ve asked him if he could give me a pragmatic reason to switch to Ruby. I really like this Bruce ‘s phrase: “Whether or not it is Ruby, I teach all of my students to learn another language. The effort will make you a better programmer. ‘ Absolutely!

Derek Sivers, creator of the Web site cdbaby.com also states, “Rails was an amazing teacher. I loved it “s “do exactly as I say rdquo; paint-by-numbers framework that taught me some great guidelines.I love Ruby for making me really understand OOP. God, Ruby is so beautiful. I love you, Ruby.

But the main reason that any programmer learning any new language thinks the new language is SO much better than the old one is because he “s a better programmer now! ”

But being a good teacher seem to be the only compliment that Derek can give to Rails. His blog is called “7 reasons I switched back to PHP after 2 years on Rails “. Derek spent two years with an excellent Rails developer re-writing 100K lines of PHP code and then abandoned this idea and returned back to PHP.

Rails is build on an excellent idea of convention over configuration, it allows you to create a working prototype of a CRUD application in minutes, map the code to the database tables that are named in a special way to simplify Rail ‘s job of objects ‘ persistence. But when the prototyping phase is over, and you need to program a commercial application, do you still enjoy the benefits of using Rails for development of this application?

Ruby has excellent language constructs, but the real world commercial applications require a language or a framework that can be grasped by a regular programmer, it should have good development tools, it should be secure, and completed applications have to perform well. Otherwise, you ‘ll get yet another great language like Smalltalk, which is used by a small group of loyal (and smart!) developers.

Derek lists seven reasons why he switched back from Rails to PHP. His last reason is this: “PROGRAMMING LANGUAGES ARE LIKE GIRLFRIENDS: THE NEW ONE IS BETTER BECAUSE *YOU* ARE BETTER “. I do not agree with this statement – the new girlfriend in rarely better than the old one. And Derek also went to a new one, learned some new positions, got familiar with this new lingerie , but then returned to his tried and true girlfriend called PHP. She does not wear Prada, but apparently, she knows how to do stuff.

It ‘s October of 2007, and my question remains the same, “What ‘s the main reason to use RoR for development of the real world enterprise applications? “

Can you hire a good Russian programmer in India

I “ve received an email from an American software company that operates from India. They found my old blog on Russian programmers and thought that I could offer them an advice. Here “s an excerpt from that email,

“We have been trying to hire a Tech Lead in India for quite a while unsuccessfully. It has occurred to us that we might be able to hire a software guy from Russia who would be willing to move to India. Is this tough to do? How does one find Russian talent? rdquo;

First, I “d like to make it clear that Russia as well as many other countries have programmers with good, mediocre and bad problem solving skills. But if you take a 33 thousand feet look at Russia and India you may see the following:

India

Pros: They speak English. They are very mobile and are ready to start a new project tomorrow anywhere in the world. There is a large pool of people with programming skills.

Cons: they have castes, which make people unequal. Programming is perceived as a way to quickly move up and get richer regardless of who are your parents rather than a working in an interesting field. There is a large pool of people with poor programming skills, which makes it very difficult to weed out good programmers.

Russia

Pros: One of the good parts of the communist regime was that having a college degree was available to everyone, and programming was just one of the respectful professions and not a way to get rich quick. Having good problem-solving skills is encouraged staring from the elementary school.

Cons: They are not mobile. Programmers in major cities like Moscow or St. Petersburg often earn three-four times more than programmers living in small cities. The latter simply complain about it instead of relocating. Spoken English is still a problem there.

Both India and Russia have large pools of excellent PhD-grade computer scientists that do not play this outsourcing game.

Yes, Russia has plenty of talented programmers, but finding a talent there is very difficult. I now this first hand because I speak the language, know people there and our company has developers working in several former Soviet Union republics. We cherry pick developers by finding references through people we know, and then carefully watching them. We have bad experience in hiring teams and prefer working with individuals.

Large Russian cities offer very expensive programmers as the cost of living is high there. That “s why we are looking for people in Ukraine and other republics.

But if I “d be running a company in India, I ‘d rather hire Indian programmers than trying to relocate someone from Russia.

The author of this email continues,

“There are a few reasons why we ‘re thinking that someone from an Eastern-block country would be a good match:

1. As a group they are paid much lower than Americans/Europeans

2. In pay they are probably on par with Indians, but are probably more

talented

3. We suspect that they would have much better problem-solving skills than typical Indians do (Americans tend to have good problem-solving skills, but getting an American to move to India gets very expensive.)

4. The candidate would have the opportunity to work with a team in India and a team in the USA; both locations are great for a resume ”

If a good programmer from Russia decides to work abroad, s/he can find

better places to live than India and with better pay. India has people with different skills, and some of the programmers there are brilliant. I suspect that this particular firm is fishing in the low-end market, where people with beginners skills are willing to work for less pay, hence the quality is lower as well.

In this particular case, I “d rather offer a compensation that pays 20% more than prevailing wage for this kind of leadership position, which would bring more experienced local candidates. Yes, it “d cost more, but who said that the quality should be cheap?

Why we do not give away our software for free

When a bus pulls out the bus stop, a person who “s running to catch this bus and the person who is already in the bus see things differently. On the same note, people who use the free software and people who develop it look at giving away the software for free differently. I had a chance to be in both camps hellip;

Besides offering professional services, our company, Farata Systems, creates software components and plugins . When we “ve released our first component DAOFlex and saw a couple of thousand downloads, we “ve decided to invest our own money and created a number of productivity plugins that would save time of professional software developers. Unless you work for a large firm, there is a huge difference between creating an open source and commercial software. With open source components, availability of any product documentation is perceived as an extra bonus. With the for-profit software, a well written documentation is expected, or else hellip;

In the open source software, having bugs is a norm of life, but if you charge for it, any Joe-Shmo who paid $19.95 for this software, expects to have quick bug fixes and an expert-level production support provided by an engineer who “s paid at least $30 per hour.

OK, you want to sell your software ndash; how much? The answer depends on who are your customers. If you sell to lots of individual consumers, preferred price is $19.95 or less and it does not really matter how much money did you invest into producing this software. For many people, twenty dollars is some kind of a magic number, and if an item costs more, people just do not buy it. If you are selling software for enterprises, THE SAME software has to cost at least a couple of thousand bucks, come with a salesman in a blue suit and 24×7 production support, otherwise big guys won “t take you seriously and won “t purchase it.

There is this joke about filthy rich “new Russians “, when one guy meets another who wears a nice yellow silk tie by Armani.

The first one asks, “How much did you pay for it? ”

“$100! ”

“You are plain stupid. Two blocks from here there is a place that sells the same exact ties for $200 a piece! ”

The same principle works with enterprises ndash; the higher the price, the easier to sell.

Getting back to our products hellip; We “ve invested our own time and money and developed a number of productivity plugins that save tremendous amount of time to any professionals like ourselves who work on Adobe Flex and Java projects for a living. Most of our components are priced from $99 to $399 dollars a license. After selling a number of copies we broke even, our R amp;D expenses were covered, and since we mainly sell Flex consulting, we started to talk about either giving these components away for free or cutting the prices since these components are not our main source of income anyway. But after a quick discussion, we “ve decided not to do give them away for free for several reasons:

1. If we make them free, a lot more people may start asking for support, and we do not have a dedicated person to answer such requests. Rejecting these requests is not an option either because people will start badmouthing us in the Web.

2. Our target customers are professional developers who value their time. They could easily do the math and appreciate the savings that these couple of hundred dollars would bring them.

3. As of today, these components give our consultants an edge while working on the projects for our clients. Btw, our clients get these components (except ClearBI) for free. If we “d give them away for free, we “d lose this competitive edge. Want to have an edge too? Spend a couple of hundred bucks while other people enjoy free software.

4. Giving components away for free while selling support is not an option for us, because these components just work and do not need much support especially for those who found the time to read the fine manuals (a.k.a. RTFM) that come with the products.

Free software plus premium for services works for creators of JBoss, Hibernate, Spring, Ruby on Rails, and AJAX frameworks because all of the developers that use these packages benefit from having an expert in the respective product handy. Our components are automated and can be used as is.

In the USA, a minimal price is being enforced on some grocery products, and stores are not allowed to set the price lower. Why? To keep the small convenience stores running. Without this regulation large supermarkets would start selling milk at 20 cents a gallon. They “d lose money on milk, but it would not really matter because after entering the store, the customer would purchase lots of other products at a substantial markup. But such a low price on milk would have killed all small stores in the area.

On the same note, the big guys give away software for free. Sun Microsystems made Java and NetBeans free. Tibco has open-sourced GI, their AJAX tool. Eclipse IDE is an open source project (let “s pretend that we do not know that it has started with a $40M worth of code donated by IBM). The big guys are killing small independent software vendors, who understand that they won “t be able to compete with a price tag of 20 cents even if their “milk rdquo; will taste a little better.

So why do we even develop these components? Because we can, and it “s fun. Do these components help us in finding consulting jobs? Absolutely! Seasoned hiring managers understand that if we were capable of creating this software the chances are high that we “ll succeed in working on their projects as well. And to be completely honest, somewhere in the back of our minds there is this little thought that may be one day some big firm will decide to acquire our small company because of our products.

Sincerely as usual,

Yakov Fain

The practical use of the mediator design pattern in GUI design

Any complex screen, more or less, of a business application consists of a number of layout containers (Panel, Canvas) and controls (Buttons, data grids, Comboboxes). In the best case scenario, a UI designer gives you a nice-looking screen prototype that s/he put together without bothering too much about which UI components you are going to select to implement the required functionality. Now what? Just look at this screen below that consists of a number of nested components and containers, which I numbered for easier reference. For simplicity (or should I say for better abstraction?) I did not use the actual components such as panels and dropdowns, but I’m sure you can extrapolate this image to your real-world business screen.

Mediator

A simple (but wrong) approach is to just put all these components in one container (1), program the business logic and communication between these components and be done with it. This would produce a monolithic application with tightly coupled components that know about each other, and the removal of one component would lead to multiple code changes in the application. Talking about a string attached…

The better approach is to create loosely coupled custom components that are self-contained, do not know about the existence of each other, and can communicate with the external world by virtue of sending and receiving events. In this post I use code samples from Adobe Flex,which is a good framework for creating event-driven applications, and it has all you need for the creation of custom components. But the same principle can apply in any other programming language or a framework.

At this point, I could have just explained to you the essence of using custom components, but I’d rather make this essay more solid by introducing a little theory about object-oriented programming and explain the use of the design pattern called Mediator. People say that these days some smart employers are asking questions about design patterns during job interviews. So let’s get armed with this Mediator Pattern.

We’ll start with a definition of this pattern from Wikipedia:

“The mediator pattern is a software design pattern that provides a unified interface to a set of interfaces in a subsystem.”

Not clear? I know. Keep reading.

“The mediator pattern addresses this problem by promoting looser coupling between these classes by being the only class that has detailed knowledge of the methods of other classes. Classes send messages to the mediator when needed and the mediator passes them on to any other classes that need to be informed.”

This does not get much better either.

Okay, to put it simply: if you have Lego parts, they don’t know about each other and they don’t have any idea that some boy (a.k.a. Mediator) has decided to use these particular components to build a toy house. And tomorrow, the Mediator will decide to use the same components in a boat. You know where I’m going to with all this.

I would expect that some impatient readers have already scrolled down this article to see if I’ll ever show you some concrete code examples. I will. Promise.

In the diagram above, containers play the role of the Mediator. The top-level mediator is the container 1, which is responsible for making sure that components 2, 3, and 6 can communicate if need be. On the other hand, the number 2 is a mediator for 4 and 5. The number 3 is the mediator for 7 and 8.

Being a mediator is a very honorable mission, but it comes with responsibilities as you need to listen to events from one of your Lego parts and, possibly, fire the event on the other one.

For example, in the online store scenario, the number 6 can be a control where you select an item; number 4 is the button “Add To Shopping Cart”, and 5 is a shopping cart. Let’s forget about number 6 for a moment and look at the content of the mediator number 2. The button 4 has a specific look and feel and can do just one thing: broadcast the event “AddItemClicked”. To whom? To whomever is interested in receiving such an event. So expect to have the code:

dispatchEvent(new Event( "AddItemClicked"));

somewhere inside the component 4. If the mediator 2 is interested in receiving of this event (and it is, otherwise why even bother including number 4?) it will define an event listener for it, which will get the event and in turn will dispatch another event right on the number 5:

addEventListener( "AddItemClicked", addItemClickedEventHandler);

...

private function addItemClickedEventHandler(): void{

Number5.dispatchEvent(new Event("Add3ShoppingCart"));

}

Please note, that in the pseudo-code above, the mediator is choreographing how its little components will communicate. It’s time to get to the nitty-gritty coding details. Just read an article about creating custom components in Flex.

I’d like to stress that in the above example number 4 is shooting an event up in the sky: whoever wants to hear can listen. On the other hand, number 5 is just sitting quietly and listening to the incoming event. From whom? It has not an idea. This is what I mean by loose coupling of components. Number 4 does not know about number 5, but they talk anyway through the mediator.

However, as a developer of this screen, you have to take care of mediator-to-mediator communications as well. For instance, if number 6 is a widget where you can select your Sony TV, mediator 1 will be notified about it and need to talk to mediator 2, which in turn will arrange the flow between 4 and 5.

The Bottom Line

Don’t even think of starting to code UI unless you’ve identified your mediators, custom reusable components, and all communication between them via events.

Congratulations! India is outsourcing jobs to the USA.

You have arrived to your destination. Wipro, a large IT firm from India is planning to hire people in Atlanta , GA.

I follow the outsourcing trends very closely, and this sounds very logical to me. First, about ten years ago, someone has found a golden mine: there was a place on Earth where people were willing to write software for $1 an hour. Some smart entrepreneurs made a fortune by charging modest (by American standards) hourly rates and delivering OK jobs. Since Indian programmers were dirt cheap, some body shops started entertain “nine women=a baby in one month rdquo; strategy. They were giving the same assignment to 9 different programmers, and at the combined expense of $9 an hour someone would definitely get the job done.

Because of poor planning done by mediocre management, enterprise America required more and more software applications to be developed. Ninety percent of this software would wind up in a waste paper basket, but that “s OK ndash; highly profitable corporations did not even notice this.

Smart Indians quickly figured out that filthy rich America needs help and this was a chance for them to get out of poverty. Especially for those who were not lucky to be born in a high caste family. Hotel, motel, Patel. Engineers and people with no degree went to vocational schools in India. Armed with the knowledge of programming basics and trained to win in a “technical interview rdquo; game they did not have serious difficulties in getting job offers. The H1B visa became a typical way for Indian programmers to get into the country. Then the green card process followed by American citizenship for those who wanted it.

But since there is a limit to the number of programmers America lets into the country, a mass production of programmers in India caught attention of American management and the outsourcing of software development slowly became a norm of life. Americans got scared, and decided that IT career is not for them. Enrollment in CS and IS is at its lowest levels.

If outsourcing has started because of lower hourly rates offered by the offshore companies, now it “s flourishing because of the fact that you simply can “t find a programmer in America. The salaries in India are getting higher and higher, and apparently, they are already high enough to be offered to people in Atlanta, GA, USA.

Now watch carefully what Indians will do while American smarty pants in Academia are discussing curriculums of the Computer Science majors. No,no,no,no,no, Indians will not participate in these discussion clubs. They will quietly repeat what they did in India. They will open vocational schools, and will train low-income local citizens of Georgia, Utah, Montana to give them basic skills to handle if-statements, which is pretty much all that “s needed for 50% of today “s enterprise projects. Talking about a cookie-cutter effect hellip;

Everyone will be happy now: a manager of a Fortune 500 firm is outsourcing the project to Bangalore, which offers them teams staffed with native English speakers, the fellow citizens. Do not expect another Google coming out of these teams, but they will get by. Enterprise managers will be able to deliver mediocre quality products according to mediocre quality project plans, which will let them to achieve their ultimate goal: career advancement. t “ll take another three years till America will accept the notion that India is THE place to develop enterprise applications, but a large portion of this work is outsourced to the USA.

What “s next? Do not be surprised if you “ll be offered relocation to Bangalore, or else hellip;

Once again, being an employee or a consultant?

This is a response to Jim McGovern “s blog titled “Are you a consultant ” . Just for the reference, Jim is employed as an enterprise architect by a major insurance firm. In the past, we “ve co-authored a book together, and I can assure you that he definitely knows what “s happening in the real enterprise world and his insights are often interesting and thought provocative.

Working as an employee or a consultant is an interesting subject and I “m planning to cover it in details in my upcoming book “This life of an enterprise programmer “. But in this blog, I “ll just take Jim “s observations about consultants and will try to see how they apply to employees. I “ll keep quotes from Jim “s blog about consultants in italics.

You work very odd hours. It ‘s difficult to maintain a relationship or a family. You are paid a lot of money to keep your client happy. You are paid well but your pimp gets most of the money. You spend a majority of your time in a hotel room.

You work very odd hours without being paid for all these endless evenings you spent in the office to keep your manager happy. You salary is OK, but you “ve been brain washed that your total compensation package is twice as big, because you are getting extra perks like 401K plan with no or minimum contribution from your employer, free car wash, laundry on premises, gym that you do not use and discounted tickets to the Broadway shows that you do not like. You spend majority of your time at work.

You charge by the hour but your time can be extended for the right price. You are not proud of what you do. Creating fantasies for your clients is rewarded. You have no job satisfaction. If a client beats you up, the pimp just sends you to another client. People ask you, “What do you do? ” and you can ‘t explain it.

You do not charge by the hour, hence it “s assumed that your time does not worth anything. By the way, Joe, can you join the meeting at 6AM tomorrow so our offshore partners won ‘t need to stay late? If you do not like what you are doing, you are pretty much stuck, cause even if in theory you can ask for a transfer within the same organization, you “d better plan to spent the rest of your employment with your current manager. Your only hope is that your manager will get a raise and will be transferred somewhere else. But will the new manager be better?

Your client pays for your hotel room plus your hourly rate. Your client always wants to know how much you charge and what they get for the money.

Your manager knows exactly how much you make, and wants to make sure that he gets as much as possible for the money. He also knows that one can “t get blood from a stone, but given your modest salary, he can live with it.

You know the pimp is charging more than you are worth but if the client is foolish enough to pay it ‘s not your problem. When you leave to go see a client, you look great, but return looking like hell (compare your appearance on Monday AM to Friday PM).

You believe that you are underpaid and it bothers you all the time. You do not think that it “s fair to work your ass off as you do day in and day out. Compare your appearance on Monday AM and Friday PM. Actually, you may get a call on a weekend too.

You are rated on your “performance ” in an excruciating ordeal. Even though you get paid the big bucks, it ‘s the client who walks away smiling. The client always thinks your “cut ” of your billing rate is higher than it actually is, and in turn, expects miracles from you.

You are rated based on the stupid rules invented by someone in the HR department. All year you are earning points for good behavior. The highest points are earned if you fill and submit your timesheets with detailed description of your work on time. If your group will actively participate in one of the firm-wide social initiatives, they “ll allow you to come on Wednesday wearing jeans. Your manager does not expect miracles from you, but is pleasantly surprised when you deliver one. Hint: save your miracles till October/November when the raise and promotion decisions will be made.

When you deduct your “take ” from your billing rate, you constantly wonder if you could get a better deal with another pimp. Everyday you wake up and tell yourself, “I ‘m not going to be doing this stuff the rest of my life. ”

When they deduct your taxes from your gross income, you constantly wonder if you could get a better deal with another employer. Once in a while a crazy thought strikes you, “May be I should try to become a consultant myself? rdquo; But then you arrive to your comfy cube, see all familiar faces hellip; and then say to yourself, “No big deal. I have only 15 years to my retirement. If I control my emotions and maintain good relations with my boss, I “ll spend these years without major cataclysms.

So, are you a consultant or a prostitute?

I “m not going to ask you this question. You know the answer: we all are prostitutes to some degree.