Weve bought our first robot

Finding a cleaning lady in our area is not easy. They exist, but charge about the same rate as a senior Java architect with 25 years of experience.

Vacuuming the floor is the most annoying thing I can think of. Our friend Veronica lives in a small rown in Connecticut. She told us about her little helper, and yesterday, we ‘ve bought this little robot that vacuums the floors a lot better than I do.

It ‘s round (one feet in diameter) and is probably three inches high. Runs on the rechargeable battery, and has a docking station – when it feels that the battery is dying, it finds this station on its own and climbs on it to recharge. We call it Robik. It goes around all obstacles, has a little brush that helps pick dust in the corners.

Robik comes with two little boxes emitting some signals that allow you to set an area restrictions.

Even my son who hates cleaning his room, enjoys it now. Really cool thing. Let ‘s see how long our excitement lasts.

PowerBuilder, Java, Flex, Agile Development

Ten years ago I ‘ve been doing PowerBuilder and my mentality was different: first, I was the best friend of business users, and second I did not really worry about what ‘s under the hood. I could do stuff quickly, or using the modern jargon, I was an agile programmer without even knowing this (on the same note, lots of people were creating Ajax applications five years ago without knowing this, but it ‘s off topic). I ‘d ask the business user Joe, “How do you usually do your business, what would you like to have on this screen, what step do you do after this step? ” Most likely Joe did not really know, but I ‘d still give him a wide American smile: “No problem, I ‘ll come back tomorrow and will show you something “. Mary, yes you, “What ‘s the most important word in my last sentence? ” No, Mary, not “I ‘ll come back “, but TOMORROW. Not next week, not next month, but tomorrow.

With DataWindow component it was easy. I did not have to pull Joe ‘s teeth, I was able to create a working prototype in a day, show it to Joe next day, his glassy look all of a sudden would become friendly and understanding. Now Joe was back in control: “No, Yakov, you did this part wrong, I want it differently “. No problem, Joe, I ‘ll see you tomorrow. Mary, what was the most important word in my last sentence? Good girl, Hasta maniana! I did not really know how DataWindow worked, but I trusted this component. PowerBuilder used event-driven programming model, which was clean and simple. An object A triggers an event XYZ on object B, and this event can carry a payload – the data that the object B needs to operate. Using the modern jargon it ‘s called Inversion of Control or Dependency Injection design pattern. Whatever. What ‘s important is that the object B does not know about the object A. Loose coupling in action.

Then I became a Java programmer, and my mentality have changed . Big time. I realized that the user ‘s screens are not that important, because I have an intimate knowledge of how programs work internally. Screw users. I ‘ll spend majority of my time designing a multi-tier system that does not really depend on any specific screen and is universal. Joe still asked me, when is our next meeting? In a month. Mary, do not raise you hand. I see that you know the most important word here. Why in a month? Because I could not do a decent prototype sooner (Java folks, easy, easy – Matisse was not even in the picture yet), and more importantly, we started to make fun of PowerBuilder or Visual Basic programmers who were thinking screens, while us, cool Java gurus, knew how the motor worked inside! These guys were enjoying a ride and counting cup holders, while we were thinking sparking plugs and combustion chambers. We were enjoying the process of programming in itself.

There is this Russian stand-up comedian Mickhail Zhvanetskiy, and one of his excellent phrases was “Who cares about the soup, when so much is going on in the kitchen! ”

Now, with Flex I started to care about the soup again, because I can. I can change the prototype twice a day, and Joe does the same with his business requirements. No six-freaking-sigmas documentation. Napkin on the knee is back and it works. I ‘ll give the final OK to my server side Java team only after Joe is 100% happy.

Besides, with Flex I can have the best of both worlds: the source code of the Flex framework is available, I can learn how it works inside and override it (not always it ‘s as easy as it should be, but it ‘s doable).

Working Flex promotes agile development. If you do not know what it is, get a really good book Agile Java Development with Spring, Hibernate and Eclipse. This is one of these mis-titled books, which has not much to do with Spring, Hibernate and Eclipse other than the fact that it comes with the working sample application written with these tool/technologies. It presents an excellent overview of the development process in an enterprise Java shop. You ‘ll learn how to set up the environment, gather business requirements, and build the project deliverables an agile way.

Dear user, I ‘m your friend again! Now I ‘m as flexible as Flex can be. What do you want me to change?

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

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!

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?

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!