Dear Yakov Column

I ‘ve receieved an email with a question that started “Dear Yakov… ” and decided to create a new column. If you want to ask me a polite question about anything (I mean anything), just send an email at yfain at sys-con dot com. The subject of email must start with the words “Dear Yakov… “. I will also respond as polite as possible starting with Dear YourName. Let ‘s see if this list will grow…

1. Dear Yakov, In this blog you suggest that workaholics and and divorced dad should take their kids to this digital life expo. Why don ‘t you advise this to married dads? Thanks, Alex.

Dear Alex, divorced dads and workaholics always feel guilty for not spending enough time with their kids. As the result, their kids are going places on a regular basis, while married dads usually spend their weekends in front of a TV or computers knowing that kids will somehow entertain themselves.

2. Dear Yakov, I do not like about a half of what you write, but still keep checking your blog daily. I do not know why. Ann.

Dear Ann, you do not have to like everything I write. But you know that this blog is for real. I do not lie here. I do not sell anything here, well, I “d like people to buy my books and attend my classes, but it “s peanuts. So please keep checking my blog and leave your angry comments.

3. Dear Yakov, after reading some of your blogs on outsourcing, I have a feeling that you do not like programmers from India. Raj.

Dear Raj, its quite opposite! I work here in the US with many great Indian underpaid programmers waiting for their green cards. As to outsourcing to India , it “s a lot more expensive than people want to believe, which is the fault of mediocre American managers. They do not know how to manage offshore teams, and programmers in India use this situation to their advantage. I do not feel sorry for these filthy rich American corporations that do not know how to count their money either…I like working with offshore teams (I “m not sure if they like working with me though). But I cherry pick people from India not based on their rate, but based on their abilities to do the job. And I never leave the office until I ‘m sure that my remote colleages have enough work.

4. Dear Yakov, which Java Web framework should I learn? Thanks,Lee.

Dear Lee, to answer your question I need to know why you need to learn it. If you are a professional programmer, go to dice.com and search for various popular frameworks that are listed in job descriptions in your geographical area. Most likely Struts will be the winner. If Struts will help paying your bills, learn it. But if you do not have to program for a living, I ‘ll never recommend you learning Struts. All frameworks are equally bad. Stay with independent components and mix and match them in your application the way you like. But if you want to learn a framework anyway, learn whatever is included in the standard Java EE spec – servlets, JSP and JSF.

5.Dear Yakov, Can you please suggest some good books for beginners, in servlets,JSF and developing prog based on location based services? Sam, India.

Dear Sam, For Java beginners, I ‘d recommend two excellent books: Beginning POJOs and “Agile Java Development with Spring, Hibernate and Eclipse “. I ‘ve written a review of these books over here . Even though you live in India, you should be able to purchase these books online directly from publishers.If they won ‘t ship internationally, see if the PDF version is availale for purchase and download.

6. Dear Yakov, I read some of your blogs and couldn ‘t understand why you dont like ajax.There are lots of places where ajax makes more sense than flex.Moreover many of the widgets which flex provides are also provided by Google web toolkit.May be i am wrong but according to my understanding, to use a flex component within a webpage u need to use iframes which can be a pain sometimes. Vikas.

Dear Vikas, My area of expertise is enterprise business applications, and there are much better tools than Ajax in this field. Just a couple of things I do not like: JavaScript is not a good programming language, debugging is a pain, attempts to write object-oriented code there are not serious. Google ‘s GWT helps, but in the end, it ‘s still JavaScript.

As of today, JavaScript implementations and Web browsers are and you have to write if(IE) do this, if (Firefox) do that… Web browsers do not really care if a piece of JavaScript did not arrive to the client. Tons of the JavaScript source code have to go over the wire to the client. I ‘m talking about business applications, and not some POC demos. The code is more vulnerable to hackers ‘ attacks. You have to obfuscate and compress the code. You can also read this , and this about Ajax shortcoming. For Web sites like Google, Amazon or Yahoo Ajax may be a good solution. Flex components are not using iFrames.

7. Dear Yakov, what ‘s the difference between Fat Clients and Rich Internet Applications? Boris.

1.A user presses a button… and in a minute he finds a 300-pound middle-aged woman sitting on his laps. This is a fat client application.

2. A user presses a button…and in a moment he finds a 100-pound beautiful young lady sitting on his laps.

-Wow, you are so pretty, but a little too small!

-No worries, I ‘ve got girlfriends!

And the next moment he finds two more pretty girls sitting on his laps. This is a Rich Internet Application. Yet another explanation of the RIA term is located over here.

8. Dear Yakov, some of the links to your previous blog entries do not work. Why? Sarah, Texas

Dear Sarah, I try to blog immediately as soon as yeat another “smart ” thought or observation comes to my mind. Sometime I re-read the blog entry next day or even an hour later and trash it, because after some time this thought may not look as bright as it originally was, it sounds too offensive, wrong or not appropriate for public reading.

Next question please…

Some thoughts after watching AJAX FABridge Flex demo

There is this blog and a nice looking demo showing how AJAX can happily live together with Flex charting. This vendor ‘s AJAX grid component is populated with the data first, and then using FABridge the data is being passed to the Flex Charting component. Typically blogs demos like this get a number of Wows , and I expect several “Cool, man ” comments to this blog within the next day or so.

Since the blog authors have provided the decription of how this demo was made, I ‘ve read it and these are some of my questions/concerns.

I understand that these guys need to promote their AJAX grid component, and that ‘s why they ‘ve published this blog, but let me ask you this: if I ‘m planning to pass data to Flex components anyway, why on Earth not just use Flex Data Grid in the first place?

The authors honestly admit: “To ensure that the details grid is still fast, we only render the part of the dataset that the user is looking at rather than rendering all 1000 records say, which can take a long time when you use the DOM innerHTML property. ” That ‘s right guys, and instead of jumping through various hoops to overcome such issues, just use Flex DataGrid – it would be much faster.

Keep reading…

“All of the sales data is transported from server to the client using Ajax, but subsequently massaged using XSLT and rendered using the FABridge and Flex Charting 2. This approach is particularly attractive since it enables us to preserve the way each tier in our application works as an Ajax application, and simply extend the application to include Flex. ”

If you ‘d use just Flex, you would not need to use XSL transformation to pass the grouped data to Flex. After doing your grouping on the server side, and sending the data to Flex collection once, and using data binding, both controls would be populated.

Guys, I really wish you all the best in selling your AJAX grid, bit I ‘ll be honest with you: I won ‘t buy it. And you did not convince me that this demo is the right use of FABridge.

A day of a Google software engineer

I ran into a interesting blog of a Google programmer, Igor Krivokon who describes his typical day. The original blog is in Russian. For those of you who do not know this language, go to this site , where you can copy text, select from/to languages and read the language of your choice.

If you do not want to bother with translatoin, enjoy the photos.

Adobe Flex marketing

As much as I like Adobe Flex 2, I did not see a real strong marketing push of this product from Adobe. I wrote one blog , and another , and some other bloggers also expressed similar concerns . I clearly see a vibrant community of Flex developers, but this is not the Ruby language, which is not backed up by any serious software vendor yet. Flex has Adobe and I ‘d like to see some real promotion there. I had a feeling that I am a part of a group of people who received a really cool tool, and kept telling how good it was…to each other.

Apparently it ‘s better than I thought: Adobe team has published the blog describing their Flex marketing efforts in details. But absolute numbers mentioned in this blog do not tell much as I am not marketing professional. All I have is a gut feeling that it ‘s not enough. This blog states that Flex-Ruby SDK is in the works. This can ‘t be serious. Ruby has a tiny footprint in corporate IT. Java and only Java is the target (ColdFusion folks, sorry). I ‘ve been presenting with my partner on Flex to more than a hundred Java developers in New York last month – most of them did not know what Flex was and why they should even considered it.

Adobe should arrange a series of lunch-and-learn Flex-intro sessions in major corporations, but the trick is that these sessions should be conducted not by Flex own evangelists, but by Java developers well known in their communities. Obviously, these should be Java developers who already appreciate the benefits of using Flex 2 as a the front end of Java Web applications.

Offer free Flex licenses for raffling off at Java Users groups. I ‘m running Princeton JUG , and raffling off one license on Java IDE called IntelliJIDEA on each monthly meeting, plus books, plus t-shirts… Send some free stuff to JUGs.

They mention some university-focused projects. Here ‘s how I see a university-focused project. Adobe hooks up with the Air Force and hires a hundred choppers. Each of them takes a load of Flex 2 CDs with ABSOLUTELY FREE academic licenses. These choppers are flying methodically over campuses of each university and community college and carefully dropping the cargo off on parachutes. At the same time Adobe marketing professionals take University professors out to dinners explaining the benefits of teaching Flex . Now we are talking! Now we can call it a University-focused project!

Building a community and winning the mindshare is really important. Let ‘s hope that this process will translate into something more visible.

I do not beleive in Ajax, but I wish Adobe to have the same impact on the industry a year from now as Ajax champions today.

Update: On October 16 Adobe has hired a new senior VP of corporate marketing . Hope this will help.

Passing parameters to Flex that works

Here ‘s the assignment: write a Flex application that can run against different servers (dev, uat, prod) without the need to recompile the SWF file. It does not take a rocket scientist to figure out that the URL of the server should be passed to SWF as a parameter, and we “ll do this by using a special variable flashVars in HTML wrapper. Flex documentation suggests to include flashVars parameters in the tags Object and Embed and read them using Application.application.parameters in AS3 code. At the time of this writing this does not work. But as the ancient saying goes, “Adobe closes one door but opens another rdquo;. Let “s get familiar with Flex code:

lt;?xml version= “1.0 ” encoding= “utf-8 “? gt;

lt;mx:Application xmlns:mx= “http://www.adobe.com/2006/mxml ” layout= “absolute ”

applicationComplete= “initApp() ” gt;

lt;mx:Label text=

“Will run the app deployed at http://{serverURL}:{port}/MyGreatApp.html ” / gt;

lt;mx:Script gt;

lt;![CDATA[

[Bindable]

var serverURL:String;

[Bindable]

var port:String;

function initApp():void{

serverURL=Application.application.parameters.serverURL;

port=Application.application.parameters.port

}

]] gt;

lt;/mx:Script gt;

lt;/mx:Application gt;

The script portion of this code gets the values of parameters serverURL and port (defined by us) using the Application object. We “ll add the values of these parameters to the HTML file as described below. These values are bound to the mxml label as a part of the text string.

If you “ll open generated HTML file, you “ll find the JavaScript function AC_FL_RunContent that includes flashVars parameters in a form of key-value pairs. For example, in my sample application it looks like this:

“flashvars “, ‘historyUrl=history.htm%3F amp;lconid= ‘ + lc_id + ” ”

Add our parameters serverURL and port to this string:

“flashvars “, ‘serverURL=MyDevelopmentServer amp;port=8181 amp;historyUrl=history.htm%3F amp;lconid= ‘ + lc_id

Run the application, and it “ll display the URL of the server it connects to. If you “d like to test your application against QA server, just change the values of the flashVars parameters in the HTML file.

We have one last little wrinkle to iron out: if you “ll manually change the content of the generated HTML file, next time you clean the project in Flex Builder, its content will be overwritten and you “ll lose added flashVars parameters. Here “s a simple solution to this problem: instead of adding flashVars parameters to the generated HTML, add them to the file index.template.html from the html-template directory, which Flex Builder uses for generation of run and debug versions of HTML wrapper.

Of course, this little example does not connect to any server, but it shows how to pass the server URL (or any other value) as a parameter to Flash Player, and how to assemble the URL from a mix of text and bindings

New York needs Java developers, while West Coast is into AJAX

I ran into an interesting statistics about current job openings. Good news: Java and SQL are in demand in New York City.

As per SkillProof, they run it “systematically surveys daily more than 200,000 job openings directly obtained from large U.S. and foreign employers. Our research identifies growth or decline in the demand for skills and occupations. ”

Anyway, there is more than 2000 Java job openings in Big Apple. While this is good news, it ‘s not too surprising. But I ‘m very pleased that SQL is still in demand. I ‘m one of these die hard programmers who believe in SQL more than in Hibernate. For those of you who do not know who Joe Celko is, I highly recommend any of his books on SQL. My favorite one is SQL for Smarties (get the latest edition).

The AJAX statistics is also not surprising – AJAX should be used by the software vendors or such companies as Amazon and AOL. There is a small demand on the Wall Street, but I do not expect much growth there.

It ‘s clear that SkillProof is being run by a small group of individuals biased toward AJAX, so I do not know what ‘s the error margin here. But…it is what is…

My only question is why Adobe is hiring five Ajax developers?

Digital Life Expo in New York

The show DigitalLife opens tomorrow in the Javits Center in New York City ‘s. This is a quote from their sit: “the only consumer technology, entertainment and gaming event for gadget enthusiasts of all ages. This four-day public press and consumer event is designed to educate and inspire consumers with the latest in digital technology for home, work and play from many of the world ‘s leading technology companies. ”

Workaholics or divorced dads from Big Apple, take you kids to this show on the weekend!

As a prudent blogger I have to react to Google-Youtube deal

That ‘s right, Google purchased YouTube for $1.65B in stocks. I ‘m sure, you ‘ll have lots of blogs today discussing how good it is technology-wise. So I ‘m not going to waist your precious time on this, and will just mention of some other positive results of this deal.

1. Every CEO of a tiny company gets goose bumps because s/he see that something like this may happen to their company as well.

2. It shows again that the USA is the man. Only in this country in less than two years you can LEGALLY become a multi-millionaire. When I read about initiatives of some forward-thinking bureaucrat in any other country claiming that he ‘ll invest an X number of dollars and will build another Sillicon Valley there, I just smile. You guys have great individually smart people, but you do not have such an echo system that will allow you to go as high as in the US.

3. Dot com 2.0 is here again, and if you ‘ve been having an idea about something cool but risky, go for it! Go Johnny, go!

4. Young kids will consider IT as a good career choice again. Check out the list of fifty richest people in the world: it has lot more IT people than folks with MBA.

5. Thousands of lawyers were waiting for such a deal and are about to open their cases of YouTube ‘s copyright violation. Do you know that lawyers have the lowest unemployment rate in the USA – 0.7%? This number will approach zero after Google-Youtube deal.

What a country!

I also want to see a million Flex developers in three years

It “s 5:30 PM, and I “m tired. When I “m tired, I pick a topic and blog for 30 minutes or so, and this helps me to relax. Today, I “ll unload some thoughts on the situation with Adobe Flex, and why I want this technology to succeed (Adobe has an ambitious goal of having a million of Flex developers in three years).

I “m not going to annoy you with all reasons of why I think it “s going to be hot. Let “s just have a more generic discussion about a success of a programming language in the business world. So kids who become exciting just by creation of a cool little thingy in Flex or Flash should not read this blog. I “ll start with throwing some random thoughts at you, and write a brief summary at the end, if needed.

1. The most popular programming language is Java: 5 million PROFESSIONAL developers use it.

2. I have 4,999,999 competitors. No good. But I know Enterprise Java pretty well, which is good.

3. I also know Flex pretty well. There is almost no competition in this field today. I work for a small company of RIA experts (Farata Systems), our rates are not low, but very reasonable for what we deliver. There is not too many Flex projects at this point, but it “s more than we can handle.

4. You “d expect that I would want to keep the status quo since the demand for our skills is pretty high. Wrong! I want more people to learn Flex.

5. When I recommend to my clients using Flex as a front end tool, the first question they ask is “Who else is using it? rdquo;. This is a very important and pragmatic question. Development managers have enough stress already to take chances and switch from an established platform to this super promising dark horse.

6. A development manager thinks, rdquo;I like Flex demos, and it seems to be a pretty solid platform that perfectly fits my needs. Yakov knows what he “s doing, we can start a pilot project, but what if three month from now he “ll have more lucrative offer from another client and quit? IS THERE A POOL OF SKILLED FLEX PROGRAMMERS? rdquo; There are lots and lots Java developers out there, that “s for sure.

7. And the development manager is right. He has his own agenda and career plans. He would not mind using bleeding edge cool technologies as long as his career is not in jeopardy. That “s why I want to see lots of Flex programmers .

8. There was Adobe and there was Macromedia. Their merger was made in heaven. But the honeymoon is coming to an end, and it “s about time to start heavy marketing of Flex.

9. Someone said that the crew of any software company consists of two parts: sales and sales support. Adobe Sales support (a.k.a. technical evangelists) works fine. Today, Flex evangelists are actually selling Flex to enterprises. It “s about time to inject some serious cash into sales force and advertisement.

10. Adobe should give away Flex Builder to college students for free. In a couple of years they will join the work force armed with the right understanding of what “s the right tool for RIA development and will keep selling the product from inside. Their minds should not be poisoned by free AJAX. This strategy worked for Java, and there is no reason why it would not work for Flex. Charging students $79 for Flex Builder is wrong ndash; they do not have enough money for partying. Have mercy.

11. So why don “t I afraid of competition? Because I am an early adopter. Students are still partying, and India is still asleep. My Flex+Java+business skills will put bread on my table for at least another three years. And what “s after? Something else will come out, and I “ll make sure to be the first to learn it.

12. I “m not going to fall in love with any programming language, sorry, Flex. But I promise, we “ll have steady relations for a while.

Summary.

No we don “t need summary. Did I make myself clear?

A Coding challenge

Just finished writing an article called “Polymorphism Without Interfaces “. I challenge you to review and explain the code below (it ‘s written in ActionScript 3.0) :

for(var i:uint = 0; i lt; workers.length; i++) {

var p:* = workers[i][ “increasePay “];

output.text+=p==undefined? “no luck “:p(5);

}

The person who writes the best explanation, will get a free copy of my e-book “Java programming for kids, parents and grandparents “. I ‘m sure plenty of people understand the syntax, so I ‘m looking for an explanation of WHY it ‘s written this way.