Monday, August 22, 2011

Are frameworks making developers dumb?

Last week I got to take interviews to hire senior java developers with around 5 years of experience. But after the interview process is over I felt like the frameworks makes developers life easier but at the same time making them dumb.

Everyone puts almost all the new frameworks on their resume claiming they have "Strong, working experience on Spring, Hibernate, Web Services etc".

Here is how the interviews went on.

Me: You have used Spring in your latest project. What are the advantages of using Spring?
Interviewee: We can configure beans in XML and it will take care of instantiating and give it to us.

Me: If Spring is for only creating objects why is it required at all, I can directly instantiate the dependencies using "new". Why should I configure the class names in XML and get the object from Spring?

Interviewee: If tomorrow we want to create another implementation of our interface we can create new implementation and update the XML configuration to use new impl. We don't need to change Java class and compile them.
Me: But you are writing a new Java class, so obviously you need to compile the project.
Regarding XML change, 99% of the times your XML will be packaged in war or ear file.
So you will run ANT script and create the war with the all the new changes.
Then your point of "if it is XML i don't need to compile" is not a valid point.

Interviewee: Hmmm, But the Dependency Injection design pattern suggests to follow this way.
Me: OK. I am done with the interview. Our HR will get back to you. :-)

Interview with another guy:

Me: Can you explain about your latest project and what technologies have you used?
Interviewee: It is some XYZ System and we are using Spring, Hibernate, REST WebServices.
Me: Ok. Can you explain something about RESTful architecture?
Interviewee: We can develop RESTful application by using @RequestMapping(value="/url", method="POST"). And also we can use PUT, DELETE methods.
Me: That OK, but what is the concept of RESTful architecture?
Interviewee: That's what I am explaining. If you use @RequestMapping(value="/url", method="POST") you can develop RESTful application.

Me: Ok, How good are you in Hibernate?
Interviewee: I am using Hibernate for the last 2 years. I am very good in using Hibernate.
Me: What are the advantages of using Hibernate over JDBC?
Interviewee: By using we don't need to write anything to interact with database, Hibernate will take care of.
Me: How Hibernate comes to know about your project requirement?
Interviewee: If we use Hibernate it will take care saving, updating and fetching data from database.
Me: Uffffffuuuuu... OK.. In your free time do you read any technology related blogs?
Interviewee: Yeah, why not. That how I learn Hibernate in-depth.
Me : Very Good, nice talking to you. Our HR will get back to you. :-)

Interview process went on like this...

I strongly believe frameworks will increase developer productivity. But the developers should try to understand how the framework is doing the stuff. You need not learn all the internal working mechanisms of frameworks. If you are really good at Servlets and JSP then it is very easy to understand any Java Web framework like Struts, SpringMVC etc.If you aren't good at the basics then obviously for every other question reply would be.. "framework's annotation/xml will execute this"

I strongly recommend the people who want to start their career as a Java developer to work on Core Java, Servlets, JSP for sometime.Then only one can understand the frameworks in proper way.

38 comments:

  1. Amusing, but I am at odds with your assessment and conclusion.

    In general, a developer should be able to elaborate on the pros/cons of the technology they used, how it compares to related technologies and how to optimize it for some use cases. None of this requires understanding of the innards of said technology, and other technology they do not use, and likely never had a reason to use.

    I am not sure what you mean my "Core Java", because JSE is quite large and covers many topics which many developers likely never need. Most developers, aside from actual server developers never need to use concurrent and nio libraries. Web developers never need to use AWT, and desktop developers needed to use web technologies. And your additional points about JSP and Servlets also seems a bit of a stretch, as not all java developers use either technology.

    For example, with the REST developer, having knowledge about servlets and JSP is not necessary. JSP is not needed to build web-services. You do not even need to use Servlets (directly) to build web-services. I would expect the person to explain the framework they are using in the light of the points I made earlier, but I would have them also elaborate on the same points with regards to the servlet container they are using. None of this requires them to have written a line of code for servlets nor JSP.

    Also, you probably should update your job posting, to focus more on what you care about. If you do not want people who do not know the underlying technology. If you want someone who knows JDBC, with knowledge of Hibernate and EclipseLink as a bonus, then you should state that.

    ie
    - Experience developing database applications using JDBC and related technologies. JPA, JSO, and Hibernate a plus.
    - Experience developing web-applications using servlets and JSP. JAX-WS, JAXB and JAX-RPC a plus.

    ReplyDelete
  2. Hi,
    Thanks for your reply.
    But I partially agree with you.
    I agree that everyone need not have idea on all core java concepts like AWT, NIO etc. But I believe having a good idea on Collections is a must. And if the candidate claims that he has excellent idea on Collections but he says we can't add/remove elements to an ArrayList which is declared as final.
    If the candidate said I don't have experience on Hibernate then obviously we won't ask questions on Hibernate. But the candidate says that he is working on Hibernate for the last 2 years and is really good at Hibernate and he don't know that having a primary key is a must to use an entity with Hibernate.

    Without knowing the basic semantics of HTTP protocol if someone claims I am developing RESTful application will you hire him?
    The candidate doesn't even know for what scenarios he has to use POST, PUT, DELETE. He only assumes if he put annotations like @RequestMapping(method="PUT") then it is called RESTful application.

    And I don't think anyone without having idea on developing web application using servlets(if he is in java platform) can jump on to develop RESTful services. Even though if anyone can do it he will stuck up with the first issue itself because he don't know why the issue is coming and how to resolve it.

    Thanks,
    Siva

    ReplyDelete
  3. Hi, I translated your post into Russian here: http://habrahabr.ru/blogs/htranslations/126812/ and we have pretty interesting conversation about it. Thanks!

    I thought, you should know

    ReplyDelete
  4. Frameworks does not make a developer dumb. Its by choice they become dumb or sharp. A good passionate programmer always goes a step ahead to learn the concepts behind the framework and browse through the code to learn the inner details of the same. These developers you are taking will be dumb even if you ask them to write all the components themselves, imagine about writing a beanfactory similar to Spring or hand coding DI by a dumb developer, that would be disastrous to a project. Frameworks actually save projects from the hands of these people. In the present scenario of Indian IT industry i feel it is OK to have 30-40% of good developers and rest of these dumb developers to deliver a project successfully since there is always redundant work which needs to be replicated without knowing how it works.
    -Ram

    ReplyDelete
  5. Hi Anonymous,
    I agree with your point.
    I need to change the title to "Frameworks allow developers to be dumb".

    But I don't understand how it is relates to Indian IT Industry only?

    ReplyDelete
  6. I agree with u, but with basic concepts of java is important to learn object oriented programming-style. U can know all about java and continue to programming in procedural programming style...:D

    ReplyDelete
  7. @siva
    Most of our projects are get-input -> validate
    ->process -> save-to-db and get-from-db-> process -> display to user irrespective of the domain. Only the process part's complexity decides the task we do. The same kind of projects exists in other countries as well, but the proportion we Indians get is very huge. Thats what i implied by Indian IT industry. The good developers can do one complete flow whilst the rest of the average bunch can redo the same for rest of the project.
    -Ram

    ReplyDelete
  8. Hi Ram,
    Your point is very valid one.

    Siva

    ReplyDelete
  9. @siva
    I like your post and I agree with you. But I am not sure if "dumb" is the proper word. There is soooo much to know in software development. All the abstractions that are in place, frameworks and such, and all abstractions are somehow leaky so you should know what's going under the covers. I'm amazed how young developers call themselves senior after university and one larger project. So maybe your expectations are too high. With 5 years of experience, what is a Java developer supposed to know? Even after 12 years trying to figure out all that stuff I am surprised how little I know about some things.

    On the other hand you still might be right. Universities stop teaching hardcore topics, coding assembler or C and there are a lot of programmers that can't program. Maybe it's unfair but young developers have to work hard to catch up.

    ReplyDelete
  10. Frameworks DO make developers dumb. JAVA and .NET are the biggest frameworks going and the very fact that you dont need to understand memory management makes for very sloppy and dumb programming.

    Okay so 'dumb' maybe offencive to lots of people, 'limited understanding and capacity to design well or troubleshoot' is fairer.

    ReplyDelete
  11. "Frameworks DO make developers dumb. JAVA and .NET are the biggest frameworks going and the very fact that you dont need to understand memory management makes for very sloppy and dumb programming.

    Okay so 'dumb' maybe offencive to lots of people, 'limited understanding and capacity to design well or troubleshoot' is fairer."

    I don't completely disagree with you but I think its naive to say that because someone doesn't know this thing then they must be inferior somehow. Most assembly programmers said the exact same thing when C and C++ came around. There is always more to be learned. Every time you think you have a good grasp of everything about a subject along comes an entirely new layer of knowledge you didn't even know existed. So making statements like the one you did is naive at best and ignorant at worst.

    ReplyDelete
  12. I half agree with your general premis, but I don't agree with your line of questioning.

    "Enterprise" engineers that learn frameworks but don't know why the frameworks were built in the first place clearly missing some of the story. Though, it doesn't mean they can't create value in well defined tasks using that framework. They just won't be the high level thinkers you might want creating your architecture.

    You are clearly looking for someone that has a deep understanding of the underlying design principles and the reasons why these design principles have been materialized into frameworks. Unfortunately, your candidates probably haven't had to deal with refactoring from junk to such patterns, and thus have not felt the pain that the framework developers were trying to remedy.

    Your line of questioning may have been terse for the sake fo the blog entry, but if it was not, I think you were being overly vague with your questioning. Ask the right question, and you might get the right answer. I'm not saying that you should lead the engineer into the right answer, but you should be a little more blunt in your approach. Keep in mind, that person may be quite nervous. They may have more going upstairs than you give them credit.

    If you are looking for framework engineers, some rockstars per say, then they should understand your questioning well enough to be able to elaborate upon the frameworks and the reasons they have created.

    ReplyDelete
  13. Hi there,
    For me the answer - for myself at least - is yes even though I am a bit against the use of java, but there are same effects with C/C++ I am working with.
    But it is not only that (making developers dumb) also make the application slower in response than a similar one using - as example - extreme programming methodology.

    ReplyDelete
  14. Does your job ad solicit developers who are intelligent, or does it solicit people who are bold enough to claim expertise in a given framework? You cannot always find people with both attributes.

    ReplyDelete
  15. @David No one expects them to know how frameworks are made. We expect them to know what problem its solving. When something does not work where to look for. The Base. If you son't know principal of jsp/servlet, how you are going to figure out where is the problem when you see stackstrace ? I asked a 6+ years expereince person what is webservice. answer was wsdl2java and java2wsdl. Thats all. Whats is wsdl what are components of it. What problem its solving. He does not know.

    ReplyDelete
  16. The real issue is how one approaches a particular technology or framework. Every major framework in use today is built based on certain design patterns and best practices. Not many people try to understand the underlying principles of the framework with that perspective. Frameworks encourage best practices but if one doesn't know what and why those are best practices, then they will never get the framework gives to them.
    This is one of the reasons I always emphasize on fundamentals in my interviews.For me learning or working on any technology is just a cakewalk if one has strong fundamentals.

    Thanks,
    =Mahesh Kambam[Adaequare Inc]

    ReplyDelete
  17. @Jigar "I asked a 6+ years experience person" - Do you mean 6 or more years of experience, or 6 or more repeats of 1 year of experience?

    It's a common misconception that years of working with a technology equate to experience with that technology. However, experience implies learning and many people will learn technologies in a broad fashion, not a deep fashion (some won't even bother going broad). As such, people will learn just enough in order to piece together a vague solution but then never need to go deeper in their learning. Next project, they need the same amount of knowledge and don't learn anything new... repeat for 3 years and you have a few months of experience repeated several times.

    This is why you interview developers though - the only real way to gauge actual experience with a technology (rather than length of time working with it) is to talk to the person and ask these questions.

    As for the original premise - I'd suspect that developers that are 'dumb' (or maybe just don't have the drive to learn technologies deeply out of self-interest rather than project demands) would be the same with or without frameworks. Frameworks just make it easier for them to produce something that works (for some given value of 'works'). These are the people that flood the job market though, for various reasons, so when you interview applicants from a job advert you're going to need to sift through a lot of these sorts of applicant to find the couple of people that are actually worthwhile.

    ReplyDelete
  18. I love this comment from http://habrahabr.ru/blogs/htranslations/126812/:
    (Translation from Russian)
    About 10-12 years ago in the same way were interviewed a lot of developers
    There were almost same questions, and answers like: "but you can write it in ASM?". Answers: "Why should I write it on asm, when there are C++?."
    And the conclusions were pretty much the same - "languages ​​like c ++ developers make stupid."

    Frameworks - the usual progress of programming.

    And what I'm thinking. When you are hiring a developer you are trying a find man who will get job done. Not theoretic. That's the point.

    Chines saying: doesn't matter whether a cat is black or white, as long as it catches mice

    ReplyDelete
  19. Very Interesting post Siva :) Completely agree with you understanding fundamental and concept is more important and that's why some time feeling the pain is more important than following easy path because when you feel the pain you find ways to reduce that and you learn the core concept why frameworks has introduced and how they give you flexibility to better handle your work.

    Javin
    How HashMap works in Java

    ReplyDelete
  20. Hi Mahesh,
    I am very happy to see comments from you.

    "Working on any technology is just a cakewalk if one has strong fundamentals"

    This is what I learn from you and Raghu :-)

    -Siva

    ReplyDelete
  21. The point of hiring developers is to create applications and systems that support the business in the cheapest way possible. Frameworks make it possible to increase developer productivity while reducing labor costs (because you can use the "dumb" developers that failed your job interview to do this). Of course, you still need people who can direct the "dumb" developers. These are the architects and these people need to understand the pros and cons of the frameworks, the principles behind them, etc.

    So, to summarize: 1) Frameworks do not make developers dumb. They enable "dumb" developers to be productive. 2) You should review your hiring strategy and decide how many architects you are looking to hire versus developers. Then you should tailor your interview process accordingly.

    ReplyDelete
  22. Sometimes dumb programmers are what you need because they know how to use the framework without knowing the inner working just like a brick layer who knows only to lay bricks and not give ideas on structural aspects of a building.

    ReplyDelete
  23. Hello!

    I am relatively new to java, so could you please explain, whats the answer do you expect to get on your question
    >> If Spring is for only creating objects why is it required at all, I can directly instantiate the dependencies using "new". Why should I configure the class names in XML and get the object from Spring?

    Thanks.

    ReplyDelete
  24. If you follow Programming to Interface and Dependency Injection principles you can inject the Service Implementation based on the environment.

    Suppose you have SampleController which depends on SampleService.
    Then you can create an interface ISampleService and make your SampleController depends on that interface.

    public class SampleController
    {
    private ISampleService sampleService;
    //setter

    }

    Now you can have a Real implementation SampleServiceImpl which will be wired in applicationContext.xml and used in Production.
    Now you can have a Mock implementation MockSampleService which will be wired in applicationContext-test.xml and used for Testing.

    applicationContext.xml
    -----------------------
    <bean id="sampleController" class="com.SampleController">
    <property name="sampleService" ref="sampleService"/>
    </bean>

    <bean id="sampleService" class="com.SampleServiceImpl">

    </bean>


    applicationContext-test.xml
    -----------------------
    <bean id="sampleController" class="com.SampleController">
    <property name="sampleService" ref="sampleService"/>
    </bean>

    <bean id="sampleService" class="com.MockSampleService">

    </bean>

    This way Spring will give you the flexibility to inject the dependency based on environment(DEV/TEST/PROD) without touching the code.

    ReplyDelete
  25. Really great! Thanks)

    ReplyDelete
  26. Siva
    i think that is what the answer u got from that guy i feel, injecting beans from XML instead of java program, basically it is DI and how u use it its is upto u, but iam still not happy with your answer i was expecting some thing diffrent, but its very much same google answer

    ReplyDelete
  27. Siva
    Dependency Injection is a form of push configuration; the container "pushes" dependencies into application objects at runtime. This is the opposite of traditional pull configuration, in which the application object "pulls" dependencies from its environment. Thus, Dependency Injection objects never load custom properties or go to a database to load configuration — the framework is wholly responsible for actually reading configuration.

    [http://www.wrox.com/WileyCDA/Section/Why-Use-the-Spring-Framework-.id-130098.html]

    ReplyDelete
  28. Best article for this
    http://www.wrox.com/WileyCDA/Section/Why-Use-the-Spring-Framework-.id-130098.html

    ReplyDelete
  29. Many programmers are lazy and consequently they are not really interested in understand every aspect of the tools they have to work on daily basis. The software industry nowadays in many cases is not interested in provide a enthusiastic environment with motivation and deep support to develop their abilities, they are interested in productivity, save some nickels and threat people like a machine that is better replaced when it shows some malfunction. People have qualities and passion and a bunch of questions about Spring or Hibernate are not sufficient to show all their potential. Your kind of interview just reflects and reinforces this situation.

    ReplyDelete
  30. Néstor Hernández LoliOctober 27, 2011 at 12:16 PM

    Your blog is a awesome thing, I think that every single student must know the basics before jumping into coding using frameworks, I agree with your point.

    My name is Néstor, Greetings from Lima, Perú
    Gracias por tu blog!

    ReplyDelete
  31. I think it is more the case that frameworks are allowing people who don't have an aptitude for programming to work in it. I despair when interviewing, even after carefully vetting CVs 9/10 of interviews leave me face to face with someone who can't even understand the basic implications of the code they write (in relation to memory, IO, threading). So many frameworks fail to perform in production, and these people have no alternative to offer (thats if performance testing their apps would even occur to them). How am I supposed to run an IT department when the programmers on the market are this useless. What's worse these monkeys are now gaining senior positions, running departments and propogating their nonsense to the new developers coming through. Our public facing product (which I inherited) is slower, more buggy and less consistent than it has ever been, and the amount of manual maintenance it requires to just keep it up means it is unlikley I will ever have the resource to fix it. The whole industry needs a good slap.

    ReplyDelete
  32. I've been on both sides of the table & its very easy to RULE out someone quickly. I did that the first couple of times I took interviews. I realized quickly I was doing it wrong. I do things differently now - but that's for another time.

    I really like your views, but I don't agree about frameworks making people bad programmer. I know people who coded in 'pure-java' for years and would still not be able to answer basic questions.

    The point is there are developers and there are good developers and there are the really really good ones, just like in any other field ...

    ReplyDelete
  33. Frameworks are used to make developers day to day task much more easier, writing less / no code. The developers should just need to understand the framework to achieve a particular day to day task. In short FRAMEWORK should be FRAME-NO-WORK for developers who are using the framework, because developers make the framework to do the work, as such developers are not working

    ReplyDelete
  34. Partially agree with Siva but even one who doesn't know the inner details of the framework can still do good job for you. For driving a car you don't have to understand how the car is made it is enough if you know how to drive a car and he may become one of the best drivers for you overtime. You can teach them while on the project. It is that they didn't understand the language in the books they are reading.

    People like you can still hire them as they don't do any harm and then you can try to teach them, make them understand what happening inside.

    Then you will be a good lead or whatever.

    ReplyDelete
  35. Many programmers are lazy and consequently they are not really interested in understand every aspect of the tools they have to work on daily basis. The software industry nowadays in many cases is not interested in provide a enthusiastic environment with motivation and deep support to develop their abilities, they are interested in productivity, save some nickels and threat people like a machine that is better replaced when it shows some malfunction. People have qualities and passion and a bunch of questions about Spring or Hibernate are not sufficient to show all their potential. Your kind of interview just reflects and reinforces this situation.

    ReplyDelete
    Replies
    1. Hi Snehal,
      You raised very valid and good points about work culture in IT.
      Having good knowledge in Spring/Hibernate is not at all mandatory to say a developer has good programming skills. But if they say they used Spring/Hibernate extensively in their last 4 projects then obviously interviewer expects to have decent idea on those frameworks.

      Siva

      Delete
  36. Frameworks may not make developers dumb but seems to make them lazy.

    ReplyDelete
  37. Good post. This extends beyond Java frameworks as well, like .NET, javascript, and other languages. I think some web developers know jQuery but not so much direct HTML DOM manipulation with javascript that jQuery nicely wraps up.

    ReplyDelete