Java Interview: tips for the interviewer

This is a brief entry about how an interviewer should conduct a Java based interview. I have been on both side of the table and this is only based on my own observations.  I think most interviews that I attended in the past, and possibly some I have conducted myself, focus on the basic concept. I accept that developers should be aware of the language principles, but how can an interviewer test more advanced principles?

The interview time have to be split into: 

  1. Theoretical conceptsThis 1st phase is about asking the common questions about OOP concepts, differences between interfaces and abstract classes, differences between List and Set, multithreading and so on. If it is required to store answers, do provide a written paper and avoid multiple choice questions. In my experience, open-ended questions allow the developer to express his knowledge better. Multiple choice questions provide unnecessary hints to question answers. Even if I did forget a terminology or a definition by looking at the various answers provided, I can pick the right answer 9/10 times. Theories are central to practices but make sure can be related to the role you are recruiting for.An important point when interviewing a developer, if you have a developer present during the interview, avoid asking domain specific question unless it is something common. I had some interview with senior and lead developers asking questions about a programming problem they have recently encountered and were able to fix after spending months working on it, how am I supposed to know about that unless I have encountered the same issues in the past.
  2. Practical test
    In order to test a developer capability for the role, it is a must that he/she undertakes a practical test. You do not need to give the developer code with bugs for him/ her to fix, I believe this approach is not very useful. I would suggest that all interviewers prepare the developer to take a practical test using their favourite tools (provide two of the most common open source IDE) and provide them with a simple problem domain. In my experience, I had to write some simple factorial algorithm (a single recursive method) to a domain centric web service application (no DB, store data in memory instead) and to more advance concepts. If application multithreading is part of the main day to day job, then ask the developer to write a simple application that shows that.
    This practice exposes several features of the developer; from its reasoning by writing simple algorithm to coding practice (commenting and Java best practices) and problem solving.

After all, I believe that programming is more about logical reasoning and coding. The more senior we get in our profession, the harder it is to answer simple questions with straightforward answers; we get carried away and provide a complex answer to something so simple. We cannot talk baby talk anymore; our tongue is full of jargon. All developers should follow the KISS principle when answering theoretical questions but ultimately they should excel in the practical test. If they are good enough, they should use a text editor to write their codes and compile it through the shell (JVM command line).
Another thing that all interviewers should know; developers have very good memories and therefore can memorise more than 115 interview questions; I would recommend you to focus more on a practical test.

This was a brief entry for interviewers. The web is full of tips and questions for the interviewees and I do not see any point in duplicating them here.  As usual, this is based on my experience and belief, you are always welcome to comment. Also, support my blog by visiting my advertisers (by clicking on the link on the right) they might have something that you might need.


10 Things all Java developers should know

Since Java (I know it’s not an acronym, but it stands out like that) was officially introduced in 1995, it has changed the way most of us look at the Operating System. Bill Gate (how ironic) once said that it was not about the hardware but the software which will be the future. A decade or more later, the fifth employee of SUN, John Gage said “The Network is the Computer”. Fast-forwarding to the 21st century and John seemed to be right. Anyway, Java was built not to depend on an Operating System and deployed through the network. Java through its applet technology gave birth to Rich Network Application aka Rich Internet Application (RIA). Java is not perfect; or we would not have various releases and more on the way, but Java has given birth to a wide range of programming language (just Google it to find out more).

Without further ado, I am going to get back to subject. This is a brief article on what I believe that every Java developers should know regardless of their experience. I do not personally believe that someone with 5 years experience is not as good as someone with 10 years experience. We all develop our own methods of working but as a developer you need to stay abreast of your technology. So, here are my top 10 not in order of importance (or?):

  1. Remember the basic of Java language and OOP paradigm.
    Most experience developers seem to forget the theory behind the language. I am not saying that they are not good at their job but can they explain to junior developers why they have used interfaces instead of abstract classes or why implement a pattern over another one? As a programmer, you become very arrogant as you believe that you write the best code but in the real world, people work in teams with different skill set and experiences. It is important that you can backup your actions/ codes. A very simple question such as; when should I use a String object instead of a StringBuilder/ StringBuffer? You might take this question lightly but can you actually tell someone else the difference?
  2. Know your technology stack
    All developers have to know their technology stack. What does it mean? Java is not like other languages; Java has subsets such J2ME and superset such as Java EE. We have our own area of expertise but it is important to know the differences between the various sets of Java. Some basic questions such as the differences between SWING, Applet, Servlets, EJBs and JavaFX will boost your confidence. Most developers do not know how to tweak the JVM and the differences between the JRE and the SDK environment. Do you know why you need the SDK to be installed to run Tomcat but you only need the JRE to run an application?
  3. Experiment with various Java EE framework
    I am not asking you to be an expert in every single Java EE framework but it will make the difference if you are familiar with Spring and EJB. That should actually be the de facto framework that should be on every developers CV. Developers should know the difference between Java EE 5 (soon 6) and Spring. Hibernate is also brilliant and it’s used for data access but all developers should have moved to JPA by now. Hibernate also comply with JPA therefore there is no more excuses.
  4. Know a scripting language
    Java can be heavyweight for some simple tasks which can be implemented using a simple dynamic language such as Python, Perl(?) and others. I would also recommend to developers to learn shell scripting on their target OS.
  5. Know how to develop web services
    The network is the computer, therefore it is important to know the different web services framework available. Data are integrated through web services and opening your services to the “cloud”. SWING developers will probably not develop web services but I am sure that they will be connecting to data through web services clients. Understanding the difference between the standardised SOAP and non-standardised ReST will help you choose which is best to implement your services.
  6. Know how and when to multithread your application
    I have to put that in there. Developers should know when and why to multithread an application, thread inter-communication and monitoring. All developers, junior or not, should know how to write a multi-threaded application.
  7. Database development using JDBC and JPA
    This should be a development law. All developers should know how to write SQL queries and how to create databases. All enterprise applications store data in some sort of relational database systems and it is therefore imperative that this knowledge should be of second nature. Java EE 5 introduced JPA (JDO was there before) but it is not applicable to all situation. Hence, knowing the difference and when to implement one instead of the other is important.
  8. Know a client side scripting language and what is AJAX
    The network is the computer and Internet is the deployment platform. Java EE and its various framework are server side executiong which can put extra “load” on the server. If you are looking to move a cloud based system where the providers charges you per resources used, it might be wise to move some of the execution to the client side. AJAX has been buzzing the scene for the last 3 years and more. This is not a technology but a new way of doing something that already existed. There are numerous Java AJAX framework such as GWT and DWR which makes it easy to develop AJAX based application which are compiled to JavaScript. Developers should also know what is the AJAX theories.
  9. Know your competitors and do not take part on “what is the best IDE” discussion
    Java is not the only language that can do what it does. I think that Java is more mature and complete as opposed to other languages. Knowing the difference between Java and .NET or Java and Ruby is a good asset to have. You also need to know when and why to use one instead of the other. Please please please, do not get into “my IDE is better than x because…” discussion as it is good for the Java community to have multiple IDEs and framework available to use. Every tools have their place as for example JDeveloper is better than x if you are going to solely develop on an Oracle stack and etc…
  10. Know ANT (MAVEN?), TOMCAT and any other mainstrean application server
    ANT is the de facto build script for Java and its IDE-based development. Maven is becoming popular and soon can be as popular as ANT (not sure of its popularity in the financial sector). TOMCAT  should be immortalised as the based servlet container that all developers should be familiar with.

There are alot more to add but this is just some of the basics that I think all developers should have in their repertoire. Feel free to add to this list in the comments box. If I could had another one to this, would be; all developers not just Java, should know how to search the web and Google is your best friends (now support my advertisers by clicking on the links on the right 😉 ). I hope you enjoyed the entry and feel free to comments good or bad!!! are welcome.


Android Mobile Application Development – Budget My Day

The last weeks or so, I have been contemplating on build a mobile application. I wanted to use a technology that I was familiar with and that is also currently available in the market. So Let me describe the factors that affected this weekend project:

  1. The user interface of the application have to be nice a la iphone.
  2. provide RAD tools, I do not have time coding in notepad.
  3. Good documentation and online support (through forums and etc..).
  4. Need to able to learn and develop a nice UI within hours.
  5. The ability to connect and display real-time maps such as Google Maps or Yahoo!Maps.

Ok, first of all I was not trying to develop a mobile webpage, the type of thing you can do with Yahoo! Blueprint. My aim is to later develop this weekend project into a full blown mobile application with other contents such as videos, telephone dialing and messaging features. Based on that, I realized that there are bunch of technologies there which can be separated into two categories:

  1. Vendor neutral: J2ME (JavaFX???) and Android
  2. Vendor (or Manufacturer): iPhone, Symbian and the list is very long.

I therefore decided to take a vendor neutral approach. I have some experience developing J2ME based applications and I can tell that the user interface is not as great as on the iPhone or Android based phones. So what about JavaFX, let me know the next time you see a JavaFX-based phone in a shop window or in public.

So I decided to take the Android route. I know the API were based on JAVA, making the learning curve an easy ride. One thing I don’t understand is; Android has been out for awhile and still do not provide a supported version of their development plugins for NetBeans or any other IDE but Eclipse. Nevertheless, I decided to use NetBeans to the develop the “weekend project”. Android emulator is nice to work but sometimes, i just had to run the application multiple times in order to see the app in the emulator.

I believe that in order to be a good Android developer, you need to familiarize yourself with building the UI through the XML and know your widget from your layouts. Anyway, this is just the start of the project but next time I blog about, I will discuss how to connect to web services to perform user authentication and persist data. For now here is a screenshot of the search tab taken from the emulator.

P.S. The application will be a recommendation engine that will recommend user how to go out and enjoy themselves on any budget. For example, a person with £100 budget can see what to do, where and when. For example, go on a date to cinema then to restaurant before heading out to night club. Users will be able to review and rate recommendations.

Please support my blog and its advertisers by clicking on the interesting products/ services on the right (Google ads).  Cheers.


IBM to buy SUN – the End for NetBeans and Glassfish?

I am sure that you have seen in the tech news that IBM are looking to buy SUN MicroSystem the owner of JAVA and now MySQL.

Sun has been losing money on its Solaris based servers, probably one of the reason Solaris is now Open Source? Sun started to lose money after the 2000-01 dot com bubble burst. Since the company has been trying to reinvent himself and even tried to look for buyers for more than year. Rumours says that HP turned the offer down. Everyone must be thinking now, why a company which losing money and put himself up for sale at $6B would buy an open source company for $1B (MySQL)?

Anyway, what would this acquisition mean to the JAVA world? IBM has been a major sponsor of SUN rival IDE – Eclipse. Therefore there is a major question as what will happen to NetBeans? Oh, and what about JavaFX, it is still in beta stage as far as I can see and cannot yet compete with Flash or SilverLight, will IBM pull the plug on that?

WOW, I have so much questions but I am not sure how to formulate them all. For example, I am a big fan of NetBeans and Glassfish but IBM develops Eclipse and WebSphere, I can’t help feel insecure about the future of NetBeans & Glassfish to be replaced by IBM own baby.

NetBeans funding will ceased th project will become a full fledge Open Source and hopefully an organisation like Apache or even Google take over it. But what about MySQL, IBM has DB2 which is very powerful so what are they going to do with DB systems?

You know what guys, time will tell us so let’s just wait and see, shall we?



Mobile 2.0 Applications – back to the future

We are now seeing a surge on internet activity from mobile devices such as smart phones and PDAs. Nowadays, people are keeping track of their life on-the-go. Since its release in 2007, the Apple iPhone has set a new standard for accessing the web on mobile devices. Apple had predicted to sale about 10M+ units by end of 2008. In its short life, the iPhone has grabbed a large share of internet users in North America. The figure will change dramatically with the release of competitive devices from other manufacturers.
Chart provided by Net Application.
Anyhow, I am not a business analyst but and this not what this blog entry is all about. But it is important from a developer point of view in adopting a platform, that he understands where his choices lies in the market. The aim of this blog is to understand what tools and technology are available in order to develop products and target a large number of users. I will make some assumptions hopefully in the right places in order to emphasize on a point.
My first assumption is to understand the reason behind browsing the web on mobile devices.
With the recent rise in popularity of social sites such as Facebook, MySpace and Twitter, most of the mobile internet population will be updating their status or communicating with peers on the go. I blogged previously about the profitability of social sites from a business point of view but their market acceptance from a user point is very big. But the rise in population accessing the internet on the devices is also due to network carriers slashing their data plan price. Ok. So we want to develop a mobile application and want to make available to a large number of users. I will take my own skills set to benchmark the different software development kit.
Here is the basic requirement:
Being an enterprise server-side developer, I decided to develop an application that will be used update users status on multiple social sites at once with just a single click. On top of the string of messages sent, I have a desire to make my mobile geographical location included as part of the message. I shall also be able to check for messages from networks peers to provide into the application tag by their sources and person who sent them.
So I decided to research the mobile market, as done above, to pick the right software development kit (SDK). I decided to review the following:

  • iPhone – the market has a large market share but that’s for America, I am based in Europe and would like to primary target to European market. I do not have enough data on the European to start with so it still sounds like a good device to go for.

    The iPhone’s applications are developed in Objective-C, this language is not much popular outside of the Apple world and seems to be a barrier in what I want to do with my One-man army of developers. After looking at the available tutorials on the internet, I decided to keep and possibly use it as they have a simple drag and drop IDE. I will probably run into problem when I try to implement more advanced features.

  • Java ME – voila! A language that I am familiar with. First of all, I think it was wrong by the guys from Net Application to include Java ME as MobileOS. The Java ME can run on any devices that support its standard (mobile JVM) and per se is not bound to single device. As far as I know, only Apple has restricted the use of Java ME and similar technologies on their platform. This might be due to the popularity of the technology; developers will drop the Objective-C in favour of Java ME written application. OK so right now, if I chose this technology, my application will not be available to iPhone consumers, OUCH!

  • Android – this is the new entrant of the market but it is poised to become very popular in the near future, grabbing about 6% of the American market within 3 months of introduction. Android is written in JAVA but there’s no current support for Java ME. How does that work? I have no idea! Nevertheless, Android is led by the Google guys and promises to offer most of their freely available API straight out of the box, therefore eliminating the need to call remote web services and then parsing the result.

So I still cannot make my mind about which platform to use. But the fact that Android does not support Java Me out the box is not the end of the world as there are freely available software that allows you to run Java ME on Android devices such as MicroEmulator. For this reason, I will now bring the comparison to two groups of devices: iPhone vs Java ME/ Android. As a developer, you want to be able to have good access to the market so let’s what is available to facilitate market penetration of our application:
Short term market

  • iPhone – At the time of writing, iPhone had more software download than Android (come-down I know that Android is relatively new). The success of the iPhone is its App Store which allowed developers to write their applications and use the App Store like an Ebay to promote and sell it. iPhone is targeting 500M+ downloads but a large number of those application are actually download for free use with no cost associated with it. So basically your application has to be available for free. Also, Apple vets applications that can be sold through the App Store channels and might reject your application leaving you in the cold. But right now, it is a developer best friend to make money and make a name for him.

  • Android – the Google guys took the idea of the Apple App store and develop their own. But this time, in order to attract a large number of developers, they decide not to vet applications and let the developers make some money and or fame for themselves. There are currently no much available on in their store which will make good for developers’ application to be more accessible to consumers.

In the short term, the iPhone, with its App Store, is a more attractive option. But as the number of applications increases, yours will be pushed back to make place for the new and most popular one. What about if you write this “killer-app” that competes with an application provided with the iPhone out the box, Apple would reject it and not make it available through their store in contrast to Android’s store.
Long term market Apple dominance of the mobile application market will come under severe competitions as more handset manufacturers introduce competing devices. Also, people feeling frustrate by apple strict regulation of the App Store will turn to clone sites such as the guys from Cidya Store and network carriers. I suppose, a Java ME store can also be open on the internet to allow greater choice.

This is a blog and I have to make it a short. In conclusion, in the short term, any developers wanting to develop for advanced devices should develop for the iPhone and allow them to sell it through the popular iPhone App Store.
In contrast, the long term prospect of the market will be dominated once more by Java ME as its support by handset manufacturers keeps on growing. I do believe that the Java ME needs an App store maybe which can be a plug-in to Firefox or IE. Java ME phones can already installed application over the air so on-demand installation would not a be a problem.
For now, I am developing on Java ME and iPhone and this pain as I would like my application to work on multiple devices without me needing to change my codes over and over.
Hope this help to give you an idea of the tools and market for mobile devices. Before embarking on commercial mobile project, you are advised to conduct more thorough feasibility studies.
I am not a geek… you are nerd