|By Janice J. Heiss, March 2010|
This series of interviews spotlights Java Champions, individuals who have received special recognition from Java developers across industry, academia, Java User Groups (JUGs), and the larger community.
Bio:Java Champion Yakov Fain is a Managing Director at Farata Systems where he's responsible for Enterprise Architecture and emerging technologies. He has authored several Java books, dozens of technical articles, and has a popular blog. He holds a BS and MS in Applied Mathematics, leads the Princeton Java Users Group, and is an Adobe Certified Flex Instructor.
In addition, he hosts podcasts in English and Russian in which he explores issues of interest to IT professionals.
Java.sun.com (JSC): You have spent more than 25 years in the enterprise technology business. What are the biggest misconceptions in the minds of Java enterprise software developers?
Fain: First, it's okay to use software that's not free. It seems that some Java developers don't even consider software that costs money. They'd rather spend a week trying to get some free software to work than spend $300 on a professional tool.
Second, an enterprise project doesn't have to be written only in Java. It's okay to have modules written in different languages. Java should be one of the tools in a toolbox of a professional enterprise developer, but not the only one. Using Java for all programming needs is similar to using a Phillips screwdriver on all screws.
JSC: Kirk Pepperdine wrote in a 2006 Java Specialists' Newsletter article that, "violating design principles or writing overly complex code is often the stumbling block to achieving good performance." Sun's Brian Goetz, in a similar vein, recommends that developers should write "dumb code," by which he means straightforward, clean code that follows the most obvious object-oriented principles, in order to get the best compiler optimization. He argues that clever, hacked-up, bit-banging code will get poorer results. Your thoughts?
"I agree that writing overly complex code may hurt performance. On the other hand, I don't think that violating design principles or not following the most obvious object-oriented principles are always bad things."
Fain: Both Kirk and Brian are very respected in the Java community. I agree that writing overly complex code may hurt performance. On the other hand, I don't think that violating design principles or not following the most obvious object-oriented principles are always bad things. Recently, I've been running a seminar for a small group of Java developers. Several times they've asked me, "Is this code an example of MVC pattern?" I got the impression that implementing MVC had become an end in itself. Using Design Patterns is not a dogma. Just write the code that makes sense. Not everything that makes sense has a named design pattern.
Abusing design patterns is not always the fault of Java developers. I find the approach used in the enterprise software shops similar to medicine in the US. In my opinion, lots of doctors here practice "protective medicine". They are trying to protect themselves from malpractice law suits. Enterprise managers and tech leads also try to minimize the risk introduced by lower-skilled developers who are part of every team. Yes, abiding to object-oriented principles definitely helps in making code readable, but this does not always translate into better performing applications. If hacked-up code produces great results, apply it without worrying whether another developer will have problems understanding it.
JSC: Java EE expert and fellow Java Champion Adam Bien points to three big fallacies about Java EE technology: First, believing that J2EE is complex; second, believing that Java EE 5 is easy; and third, believing that distributed programming could be simpler. Do you agree?
Fain: I believe that Java EE is still not simple enough. Java EE developers still spend too much time configuring Java beans, and annotating code. In my opinion, a good Java EE developer first of all should know Java really well unfortunately, they spend too much time configuring XML files.
JSC: What are your expectations for the future of Java EE?
Fain: If I were responsible for the future of Java EE, I'd keep only servlet containers with transactional support and Java Messaging Service in the spec. This would work for the majority of the enterprise applications and would make Java EE simpler.
JSC: How does the world of Java EE differ from the rest of the world of Java technology?
"In the beginning of my career finding tough bugs was the most fun for me. Now I'd say the most fun is writing code without any bugs. I hate the smell of bugs."
Fain: I'd say Java EE developers represent the elite of the Java world. Unfortunately, they need to master many different technologies used in enterprise applications.
JSC: Adam Bien also says that, "Large-scale IT projects are inherently inefficient. It's a misconception to even talk about a large-scale project. The trick is to divide a huge project into small, two- to five-member developer teams that can act independently and be responsible for particular parts of the project. This is a challenge, but it's worth a try." Your comments?
Fain: I fully agree with Bien on this one. A large project should consist of a number of small self-contained modules developed and tested by small teams. A light-weight test harness should ensure that module A works properly, and accepts the required input and generates expected output. If each of these small modules (a.k.a. black boxes) is ready, bringing them together under one roof should be a trivial task. Having large and distributed teams working on a monolithic application is counter-productive.
JSC: Where in the process of programming do you have the most fun?
"Java is more than a programming language. It's blood flowing through the veins of lots of technologies, software products and tools."
Fain:Eric Sink in his book, Eric Sink on the Business of Software , wrote, "I like the smell of a freshly killed bug." In the beginning of my career finding tough bugs was the most fun for me. Now I'd say the most fun is writing code without any bugs. I hate the smell of bugs.
JSC: What technical insights into the Java programming language have been most important to you?
Fain: Java is more than a programming language. It's blood flowing through the veins of lots of technologies, software products and tools. Learning the Java syntax is not the hardest part. Finding the most efficient ways of building applications using Java can be challenging.
JSC: When you're stumped, what do you do?
Fain:When I'm stumped, I read books related to the technology or techniques I'm working on at the moment. Using search engines is fine, but there's nothing better than a well-researched book.
JSC: Tell us what you do at Farata Systems.
Fain: Farata Systems sells consulting services specializing in the development of enterprise rich Internet applications that utilize Adobe Flex on the client and Java EE on the server side. Our company is a bit unusual, because we don't have salesmen, and we have to find other ways to let our prospective clients know that hiring us for the job is low risk because we know how to do things right the first time.
My main responsibility is to offer sales support without sales. I produce technical materials, write blogs, speak at technical conferences, conduct trainings, provide mentoring for our clients' teams, manage offshore developers, and participate in development and promotion of our open-source products. So far, this works for us, and we get a steady stream of work from people who realize that hiring our firm bears low risk, as we've proven many times that we make any project a success.
Establishing trust is a very long process, and when someone calls us saying, "We've followed you guys for years, and now need your help with our project," my colleagues and I meet with them, and when the papers are signed, I get involved as a managing team lead.
But my favorite activity in our firm is traveling around the world teaching software.
JSC: What's your hobby?
Fain: I like blogging and podcasting in English and in Russian. I started podcasting in Russian over a year ago and became one of the most popular podcasters in the Russian-speaking virtual world. One of my new projects there is Radio Bermuda Triangle, where we discuss life for the Russian-speaking IT people living around the world. One of my co-hosts lives in Great Britain and the other one in Germany and we talk about life and careers in the Western world. It seems to be an eye opener for many young people living in Eastern Europe, and I hope these podcasts will help many people be more productive while working in multi-national software teams.
"Ten years from now, an application running on a smart phone talking to a cloud will be the norm."
JSC: What are the most exciting things happening with emerging Java technologies and architectures in the enterprise?
Fain: I believe Java will shine in the development of cloud-based solutions. Java will continue to be the number one choice in building robust server-side tiers utilized in the cloud. I hope that platforms such as Android will allow Java developers to create really cool applications in the mobile space.
JSC: How would you help a young Java developer, just out of school, prepare for their first job interview?
Fain: First, join one of the open-source Java projects while in school. This will help you avoid falling into a catch-22 situation: "We can't hire you because you don't have real world experience -- but how can I get this experience if nobody hires me?" Being a contributor to an open-source project will make your resume stand out from others and will give you experience working in a team.
"I believe Java will shine in the development of cloud-based solutions."
Second, try to get as many technical interviews as possible. Apply for jobs outside of your geographical area. Analyze your mistakes after each failed interview and make sure that you are better prepared for the next interview.
Third, don't talk too much during the job interview this will lower your chances of saying something stupid. Give short answers and wait for the next question.
Fourth, research some technical areas and challenges in the Java space, and make sure that you don't leave the job interview without discussing these topics. If the interviewer doesn't ask you questions about these topics, find a way to turn the interview in the direction where you feel strong.
JSC: Do you have further advice for someone starting out as a Java programmer?
Fain: Remember that learning the syntax of Java is just the beginning. Learn how an application's building blocks work together. Create a real project like the popular Pet Store, a site for your church, school, football team, etc. using different server side Java technologies. Become a contributor to one of the thousands of open-source projects.
JSC: What are the prevailing misconceptions about Java EE and Flex?
Fain: The number of misconceptions is slowly diminishing, but three years ago most of the Java developers were under the impression that it's either Flex or Java and we're protecting Java from intruders. Now they seem to realize that their Java skills remain valuable and can be utilized in a mixed architecture.
Some still refer to Flex as proprietary software even though it was open-sourced two years ago. Our company is actively modifying the Flex source code while working on different projects with customers. For example, we've been enhancing communication protocols while building a trading application for a foreign exchange trading company. These protocols are written both in Java and in ActionScript, and we've changed the code. Last week we finished a project redesigning the way RPC (Remote Procedure Call) works when Flex clients talk to Java.
While some Java developers don't think twice about locking themselves into a small vendor that developed and open-sourced a Java framework or a component library, they wouldn't consider adopting an open-source software offered by a large company such as Adobe.
Such attitudes have been slowly changing over the past three years, and I'm certain that Flex and Java are complementary technologies that will remain the best solution for building enterprise RIA.
JSC: The Java class that you couldn't live without is...?
Fain: Thread. This is where the power of Java resides. There are books written about Java threads, which give you super power and flexibility when it comes to building highly-available, scalable, and responsive applications capable of processing thousands of concurrent requests of various types.
JSC: What recent changes to the platform have made your life more complicated?
Fain: JSR 315, which is Servlet 3.0 specification. Some time ago its proposal was based on an excellent and scalable solution implemented in Jetty 7 servlet container. It was about introducing suspend/resume mode for threads allocated to users' requests. Our company had very successful experiments with Jetty.
We've created stress tests and have proven that when a sample application deployed under Apache Tomcat died when 800 concurrent users hit the server, our NIO-based solution in Jetty was working fine even with 5000 concurrent users. You can find details and recording of this stress test here.
For some reason, people responsible for JSR 315 have changed the direction in favor of Comet-based architecture. We were planning to offer our scalable addition for all Java servlet containers, but now it remains a Jetty-only solution.
JSC: Which books would you most recommend to Java developers and why?
Fain: First, Java for kids, parent and grandparents, by Yours Truly. This is the simplest way to learn Java. I hope you will excuse my self promo if I tell you that this eBook is a free download.
Second, Joel on Software by Joel Spolsky. No one writes about IT better than Joel. It doesn't matter what programming language you use. Just read it.
Third, Thinking in Java by Bruce Eckel. There are lots of good Java programmers in the world, but only a handful of them can properly explain and teach programming. Bruce is one of them.
Fourth, Head First Design Patterns by Elisabeth and Eric Freeman, Kathy Sierra, and Bert Bates. These authors managed to turn the sleeping-pill-topic into a fun read with code samples in Java.
Fifth, SQL for Smarties by Joe Celko. Why? Because I don't respect Java developers who don't know SQL. This book has lots of tips and tricks on how to communicate with your relational DBMS. The book also has one side effect I must warn you about. After mastering this manuscript you may never be able to make love with Hibernate.
Finally, Java Concurrency in Practice by Brian Goetz, Joshua Bloch, et al. No one knows Java internals better than the authors of this book. As I said earlier, Thread is the most important class in Java and this not for the faint of heart. The book will teach you everything you need to know to design highly-available and well-performing Java applications.
Besides reading these books, I highly recommend that you subscribe to Dr. Heinz Kabutz's Java Specialist' newsletter.
JSC: In October of 2009, you wrote, rather playfully, on your blog, "The ultimate goal of any software vendor is... to make sure that their software runs on iPhone. The time will come when the entire J2EE stack with EJB will run on iPhone." Would you care to elaborate on this?
Fain: That was a joke. What I was really saying was that we were entering a new phase of enterprise software engineering in which a smart mobile device will become your primary computer. Every vendor of desktop software should prepare to provide an application with similar functionality on iPhone, Blackberry, Windows ME, Nokia, Droid and other smart phones.
Ten years from now, an application running on a smart phone talking to a cloud will be the norm. The horse power of smart phones will keep increasing, but software developers will need to return to the eighties mentality: write efficient code that doesn't require much memory and goes easy on CPU, plus a new requirement -- it doesn't drain the batteries.