Tuesday, September 7, 2010

Developer / Architect interviews, looking at it from both sides. Part 2

Part 2, The Interviewer...

In Part 1, I covered things that would possibly aid you as an interviewee, now onto the other side. I will be the first to say, I still have lots to learn about interviewing people, and some of what I list below, I need to practice as well.

All companies have their general interview process, being certain technical tests, standard questionnaires and particular processes. Going beyond those -because they are a necessary evil- other things I feel important when interviewing a developer are:

1. Probably the most important thing I look for in a developer, being a developer, is a passion for development. Sadly this has also proven to be the hardest thing to find. There was only one candidate out of the 20 something interviewed that showed some passion for development and he ended up accepted an architecture role, where he probably won't get to develop. I feel if someone shows passion for what they do, they will learn faster, be more focused, be more positive and generally a much safer bet to employ. Judging a developers' passion in an interview can be difficult, the best way I can think of is to explore an area of their expertise. Taking myself as an example all you would need to say is: "So I see you worked with the Spring Frame..." and that would be the rest of the interview.

2. When you receive a candidate's CV, read it, make notes, add specific questions. Do this before the interview as once you are in the actual interview it is far more important to pay attention to the candidate. During this preparation look for discrepancies, these creep in, things like someone rates themselves 4/5 in say JavaScript or some application server for example... but then none of the jobs / projects they mention used that specific technology. Make sure to find out the detail, as this could be a miss communication somewhere between the candidate, recruiter, HR department and you, or actually something alluding to a "creative" CV. Always check for job hopping, in areas where there are large systems running it generally takes a developer 3-6 months to become really productive, if someone leaves within a year it's actually a huge loss.

3. Try get the candidate to relax, people do not show their actual personality under stress. So begin the interview with light personal questions, none that will get you in trouble with the HR department, but just enough to allow the candidate loosen up before jumping into the technical stuff.

4. Make sure everything required for the interview is available and ready. A clean whiteboard and markers or paper and pens if the candidate needs to draw or describe anything. Having both available is preferable as some people are really not comfortable drawing on a board.

5. People sometimes don't feel very comfortable asking the interviewer questions, specially in the case of panel interviews. Prepare a standard list of points that would answer questions the candidate didn't ask. I mentioned some in Part 1 and some examples as an interviewer may be:

The regular day /week in the life of a developer here looks like: weekly dev meetings, daily meetings close to deadline, multiple tasks, tech specs, code reviews and unit tests, etc etc.
We support 15 different application on a 24/7 basis every couple weeks.
The team size and structure is as follows: 12 people, 1 team lead, 1 architect, 6 developers...
The career path here is defined as follows Developer - Senior Developer - Architect - etc.
We supply you with a choice of laptop or desktop, duel monitors, 4gb RAM, IDE is up to you.

6. 'Go with your gut'; the general interview process is actually too short to be able to completely assess someones skills and compatibility. We work in a very high stress environment, with hundreds of different scenarios everyday and I don't think we can determine if the candidate will cope or excel within a 1 - 2 hour period. There are no hard and fast tests that will determine if the candidate will take responsibly for their work. If they will complete things in a timely manner under pressure. If they will boost the morale of those in the team, or will they turn out to be a complainer that will to jump ship at the earliest opportunity.

My final point to end off -something I heard from my wife's boss- which appealed to me greatly. This will probably get some reactions from people and unfortunately my current boss did not allow me to actually do this... but... In a perfect world, where you get a fair amount of high quality CVs, I would personally love to divide the large stack of applications in half and toss 1 half of them directly into recycle bin. If you are unlucky, it's probably better you find work somewhere else.

Monday, September 6, 2010

Developer / Architect interviews, looking at it from both sides. Part 1

Part 1, The Interviewee...

Firstly let me say, I am by no means an expert interviewer, I have just recently been included in the whole interview process. I originally wanted nothing to do with it actually, but now several months and 20ish interviews later I quite enjoy it. The only frustrating thing is how people actually come to an interview, in one word: Unprepared. This may be a South African thing, where the demand way out strips the supply when it comes to software developers, but sadly the quality of the candidates coming for interviews is really disappointing. I am going to try keep this technology agnostic, as it is not only limited to Java, my wife -a dev team manager in a .Net technology company- goes through the same frustrations when looking for new staff.

So out of the 20ish candidates I have interviewed in the past months only 3 potentially had the skills we required, 1 was hired, 1 accepted an architect position at another company rather than the senior developer we were offering and the other's personality was not a match for the team. The other 17-20 people were either unprepared, unskilled or incorrectly represented by a recruitment agency.

I personally have not been for an interview in about 4 years, so my own interview skills may be a little rusty. However if I had to apply some of my experiences of being the interviewer into being the interviewee. I would do the following, above and beyond the standard interview success practices of being presentable, on time, professional, confident and having a self sales pitch.

1. If you are going through a recruitment agency, make sure that they show you the CV (Curriculum Vitae / Resume) they will be sending to their clients. Make sure you are happy with it. I would say about half the CVs we get really do not accurately describe the candidate. When this happens it immediately changes the tone of the interview and your chances diminish greatly.

2. Find out upfront what kind of tests the company makes candidates do, and prepare for those.
In the case of my current employer:
2.1 There is a general "aptitude" test, which I personally don't agree with, but it generally covers classic word sum, riddle, trick and what's the next in the sequence type questions. There seems to be a lot of companies doing this kind of test these days. So it is well worth searching the web and practising this kind of test. One site I did find quickly India Bix, would be a good way to prepare.
2.2 A Tech Check, which is a scaled down version of the official certifications and as such the same preparation can be done for those.
2.3 Finally after the initial interview there is a long Psychometric Test. Which you can't really prepare for.

3. Find out who is interviewing you, and just to a quick web search on them. They may have a blog, a book, a twitter feed, public facebook account all of which can give you vital information that can drastically alter the entire interview. Take myself for example, if you knew I was interviewing you and you found my blog, you would find this article along with a whole bunch of technical stuff about the environment / company that can give you a very nice advantage in the interview.
I Google all the candidates, only fair that they do the same.

4. Stay Current, we are in a ever changing industry, companies and your current employer may not be able to keep up with the changing technology environment, but this doesn't mean we as IT professionals shouldn't. As an interviewer I often ask the questions, "how do you stay current?", "what do you read?". How I try stay current, is this blog and Google Reader, I follow and read many Java, development and architectural related websites and blogs. I also plan to get the new Kindle in the next week or so, as there are quite a number of books that I need to get through.

5. Make sure that you read and know the common interview questions for your technical specialities. There are a lot of resources online to help with that. You don't want to show up to an interview as a Hibernate, Spring, Oracle or Asp.net 'expert' and then get put on the spot by a relatively simple well known interview question.

6. Ask questions, from the interviews I have done very few people have even asked the basic questions. It is important to ask questions, firstly there are things you should know about your working environment and you to engage the interviewer. Some example questions I would ask are in no particular order:
6.1. What does a regular day in the life of a developer or architect here look like?
6.2. What applications are you supporting? What are the support hours like?
6.3. What is the team size and structure?
6.4. What is the career path and policies on training?
6.5. What IDE, and what kind of hardware will be supplied?
6.6. Why are you hiring? Is it because the team is growing? (or are people jumping ship... don't ask that :) their answer will imply that.)
6.7. What are the greatest challenges facing the new person in this position?
6.8. What is the management style of my direct manager?
6.9. Who will evaluate my performance? When? How?

On a side note:
If I was to find new employment I would firstly research companies I want to work for and see if I could directly deal with them, as I stated before recruitment agencies can sometimes do you more harm than good. Search the top 100 companies to work for in your country / city, check the technologies they use, their culture, their location. I would also use social networks, a candidate that comes recommended from a current employee already has a huge advantage to just some random Joe Smith off the street.

In Part 2, I will discuss some of my experiences on the other side of the table as a interviewer.

Wednesday, September 1, 2010

Chunking a List into parts.

Needed to batch up the contents of a list into groups of 4 today. Spent a little more time than I would have liked on it, but I think it's a pretty neat bit of code now, and I actually got to use java.util.concurrent.CopyOnWriteArrayList for the first time.



The result of running this:

Top level list 1 contains:
1
2
3
4
Top level list 2 contains:
5
6
7
8
Top level list 3 contains:
9

Saturday, August 28, 2010

Cargo, Maven and the benefits of integrated functional testing

I little while back an ex-colleague mentioned that I should have a look at an open source project called Cargo. So what is Cargo, their mission statement states "Cargo is a thin wrapper that allows you to manipulate Java EE containers in a standard way." and that is exactly what they do.

In 2 of my previous posts:
Some useful Maven configurations
and
Your POM is quite nice

I went through some maven configurations and practices along with the concept of continuous integration. This article and Cargo make a logical "Part 3". In the above 2 articles there is a lot of emphasis on continuous testing, but with some very large / legacy systems total unit test coverage is something of a luxury and quite often neglected. Depending on the size, type and deployment of the application there will be certain circumstances where to quickly gain, promote and gauge system stability, integration or functional testing will be a much faster and more beneficial practice than retro fitting unit test coverage.

Tools like Selenium, QTP (QuickTestPro) a number of others, allow you to simply record, playback and validate the application. In my current environment and I am sure in a lot of other places, these types of tests are run by people outside the development team, namely testing teams, clients or even business analysts. I personally feel to gain the most benefit out of functional testing and automation tools these need to happen at build time. Having these tests run outside of the standard development environment add extra unneeded iterations, and more external dependencies that can delay a software project. Bringing these type of tests into you build process allow you detect, maintain and repair system issues before influencing the world outside the development environment.

Like everything else surrounding the "continuous integration" philosophy, automation is key. This is were Cargo helps you out. If you already have the other tools like Maven and Hudson setup it is very quick to integrate and benefit from Cargo.

My environment runs on Weblogic, so that is what I will be using as my example, but Cargo supports about all the major web and application servers used. So this should work for anyone.

Maven has the concept of phases which can be thought of like a collection of goals. A full list of the phases of Maven is available here: Lifecycle Reference

The 3 we are interesting in with regards to Cargo are:
pre-integration-test
perform actions required before integration tests are executed. This may involve things such as setting up the required environment.
integration-test
Process and deploy the package if necessary into an environment where integration tests can be run.
post-integration-test
Perform actions required after integration tests have been executed. This may including cleaning up the environment.

So any phase higher than ’pre-integration-test’ will trigger the deployment to your application server.

Cargo can only stop and start local application servers, deployments can take place remotely, not all application servers have "deployers", detail for these are on the Cargo site. The one feature I am very happy with is the server properties. You can from within you POM configure all the required, JDBC, JMS, and JVM settings you require for your application server to function, which is awesome. In my examples I just needed JVM and JDBC settings, but theoretically you should be able to configure most things you may require.

You could integrate the Cargo plugin into your existing POMs, I prefer to keep it separate. I am not including any Selenium configuration to keep this post about Cargo. However here is a very nice Maven Selenium Guide.

So for the local server configuration, this will startup the application server, create the JDBC configuration and deploy the war.

Tuesday, August 17, 2010

Pimp your Eclipse, a collection of darker colour schemes

Since my recent disappointment with NetBeans, I figured I would make myself feel a bit better by customizing my Eclipse to almost look a little like one of the themes that come with Netbeans. Now Eclipse doesn't really cater for "Themes", more just colour schemes that you can import. There are 2 basic ways to import bulk settings...

Firstly, make a backup! (I don't wanna be blamed for lost hours :))
To do that in Eclipse, go to File > Export > Preferences and export all the preferences. This will export all your settings so you can quickly roll back.

Now the 2 ways to update (besides changing every setting manually) are:
1. Import.
If you have or download a *.epf file you can import. In Eclipse through File > Import > Preferences.

Or
2. Manual.
The settings for the basic and java editors are stored in the following 2 files:
[workspace]\.metadata\.plugins\org.eclipse.core.runtime\.settings\org.eclipse.jdt.ui.prefs
[workspace]\.metadata\.plugins\org.eclipse.core.runtime\.settings\org.eclipse.ui.editors.prefs

The problem with the import is that it can contain ALL the settings of the person that exported it, there is no option to only export the UI bits, so I personally prefer the Manual route, but both work fine.

So to begin, my theme, Dark Blue Eclipse:


The 2 perfs files can be downloaded from, and copied the manual way:
Download List

I tried the following theme, and quite liked it, however I did miss blue:
Prabir's Blog


I also came across the following collection of themes and what is nice with the links here is that srand did it the manual way, and the other is a clean *.epf import ( I checked the files, no unrelated settings):
srand's blog
Which actually come from:
Eclipse color themes

Inkpot:


Sula:


Vibrant Ink:


Wombat:


I have not actually tried the following site but it should be very useful if you are looking to create your own colour scheme:
Edwards research Eclipse Gen

Monday, August 16, 2010

Spring, JMS, Weblogic, and FizzBuzz

There are 2 reasons for me posting this example:
I have not looked at anything Spring related for about a month, and last week I got to show someone new to Spring all the joy that it can bring, I couldn't shut up for about a hour. One of the reasons he is looking into using Spring happens to involve JMS, something I had not yet covered in my blog.
The other reason is:
I was challenged by a work colleague to come up with a more complex FizzBuzz implementation than his monster rule implementation and not being a person to back down on a challenge.

Here it is. Spring, JMS, Weblogic and FizzBuzz

All the code for this example will be available --Here--

There are a couple JMS examples out there using ActiveMQ, and either JMS "client type" implementations or Message Driven POJOs but not together. For this example I will show both methods and will use Weblogic, those that have worked with Weblogic know there are always little nuances. The first thing is to have a standalone client for Weblogic, you need the weblogic.jar (Full Client), I have uploaded this into my local maven repo so that I can just place this within my POM.


In the Weblogic admin console I set up the JMS modules as follows (5 Queues and a Connection Factory):


Now for what this example does:
* It creates 100 messages...
* It reads 100 messages... while reading, it checks the content, depending on the value it creates a message to a fizz queue or a buzz queue or a fizzbuzz queue and a result queue.
* There is message driven POJO on the result queue that prints out the content.

How it does this:
The Spring application context below is pretty straight forward but it does have a couple things to note:
1. The jndiTemplate, jmsQueueConnectionFactory, jmsDestinationResolver, jmsTemplate are all used in combination to get to the application server, and connect to the actual JMS queues.
2. The "messageDrivenListener" and "queue" beans are the configuration for the message driven POJO. In that config is "concurrentConsumers", this allows you to specify how many listeners will be created to process the messages on the queue. For this example I only require 1.



I have created just a simple example message structure for this, with a generic content which looks like:






The message driven POJO is just the standard javax.jms.MessageListener interface implementation:



The client classes to read and create messages, make use of Springs JMSTemplate to simplify your interaction with the JMS server:



And the finally the Main class, that creates the 100 messages, then reads them, publishing messages to 4 different queues. The reading of the results queue is triggered by the application server and handled by Springs "DefaultMessageListenerContainer"



Note: if you constantly run this example, you will end up with a ton of messages on the Fizz, Buzz and FizzBuzz queues as there is nothing reading those messages to clean it up.

Wednesday, August 11, 2010

NetBeans 6.9 and 6.9.1 find usages not working.

Yesterday I was investigating an issue, during my investigation I started following the code trail, I finally get to a place where the when calling "Find Usages" on a method returns me nothing... I think great... Delete, Delete, Delete... cleaning up unused code always takes me to a happy place, so after this I just check with someone that had originally worked on this bit of functionality which goes a bit pale, stating that there has to be something wrong and that code must run...

I quickly revert back to local history, do the "Find Usages" again, and yip still no reference. We go to the code where we think it should be called... and surprisingly it is there... go delete the code, do a "mvn clean install" and it fails correctly...

Off to Google... "netbeans find usages not working" leads me to the following logged bug: Bug 186314

As I commented there, I installed the latest 6.9.1 version and the issue still occurs.

This is such a nasty bug in my opinion that I will probably have to go back to Eclipse until it is sorted. I have just recently changed teams and have roughly 14000 java files that I know nothing about, life without "Find Usages" will be painful.

Tuesday, August 10, 2010

Maven Remote Windows Scheduled Task

Just a quick Maven / Windows config I came across the other day, I have recently switched teams and they are using Maven and Hudson to control some of their server tasks. I figure it could come in handy sometime.

To start and stop a Windows Scheduled task from a Maven pom, actually using the ant run plugin

Replace the [Server Name] and [Task Name] obviously.

Saturday, August 7, 2010

Domain Name Change

Since I am now quite addicted to this whole blogging thing, I decided to "move" my blog to new url: www.briandupreez.net... it's just a lot simpler to tell someone my name + .net than java hyphen it hypen zen . blogspot.com... which will still work anyways.


www.briandupreez.co.za should also be routing to the .net address, I say should as I played and broke a couple DNS settings trying to get everything pointing to the right place and found a pretty useful site if you ever have to check out what your DNA settings look like to the rest of the world Pingability... There is a link to instantly check your domains relative mappings Quick Check.

Tuesday, August 3, 2010

Glassfish ESB, easier than you think. Part II

To continue from Part I, which simply just went in and out of the BPEL process, I will now add a couple EJBs to show a nice little Glassfish ESB structured activity, namely: Flow

Since this is now getting a little larger, I have made all the demo source available ... here.

So using the EJB project Wizard I create 2 EJB projects: DemoEJB1, DemoEJB2
once you have the project, Add a webservice:



For demo purposes I am going to have 2 web services with 2 methods, gatherAppData and gatherHistoryData, these 2 functions can happen concurrently and cause you no pain as long as you change different data in your object model.
Once that is done, from the project menu select the web service, drag it over to the right hand side of the BPEL editor, on the orange circle.



Then update the Partner Link information that pops up.


To execute the 2 web service calls concurrently you will need a "flow", grab that from the structured activities.



From the web service palette grab 2 invoke objects and place them in the flow.

Edit the invoke objects, choosing the different webservices.


Create variables for both, in and out. Try stick to a naming convention of some sorts as when you get to 20ish components it can get very messy.



So now the BPEL will look something like the following.


You can add as many concurrent steps to a flow as you like or as many different values you have within your object model.
To get these 2 invokes to function we need to assign the input and output variables and then assign the result of both to the output variable of the BPEL process. For each assign, map the input variable of the BPEL to the input variable of the relevant data for the service that is being called. In the 3rd assign map the relevant part of the each output variable to the output variable of the BPEL.

just for clarity here is the last assign in the mapper view.



And that is it... 2 concurrent web service requests within a Glassfish ESB process



The final steps are to add the newly created EJBs to the "Service Assembly" in the composite application, you can just drag the EJB project directly onto the middle JBI section, build, deploy and test.

Monday, August 2, 2010

Eclipse -clean

I am sure most Eclipse users have run into some "funny" (as in, this milk tastes funny, not funny haha) issues from time to time, namely:

Extremely slow start up times.
Unable to open any editor.
A resource already exists on disk when building.
etc.
etc.

These will probably be more of an issue for users that install a large amount of plugins or products like MyEclipseIDE.

I was having some of the issues I mentioned above, went searching for a bit and found and Eclipse option:
-clean

It looks like this tells Eclipse to erase and rebuild it's internal plugin cache which in turn sorts out some versioning / state issues. You only need to run it once so the option can be removed after the workspace restart.

So for MyEclipseIDE I added it to myeclipse.ini just before the -vm option.
Closed and opened Eclipse... and both issues were solved. /cheer

If you are just using standard Eclipse, you can place it in your eclipse.ini

Building KubeSkippy: Learnings from a thought experiment

So, I got Claude Code Max and I thought of what would be the most ambitious thing I could try "vibe"? As my team looks after Kuber...