• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Are custom classloaders used in Spring/J2EE ?

 
Myke Enriq
Ranch Hand
Posts: 115
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have been asked if I ever wrote a class loader at a few Spring developer job interviews.

What does a class loader have to do with Spring ? I am trying to figure out why are they asking me this question , please help if you know why.
 
Saifuddin Merchant
Ranch Hand
Posts: 607
Firefox Browser Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Nothing that I can think of. Spring has no special relation to class-loaders.
A web server like JBoss or Tomcat would have class loader related questions.

Could you give specific examples of questions asked? Any particular conversation that leads to the point the questions come up?
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64716
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Probably because they wanted to know if you'd ever written a class loader. A "Spring-related" job isn't likely to be exclusively writing Spring code.
 
Myke Enriq
Ranch Hand
Posts: 115
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It actually went like this: 2 programmers/team leaders that were less than 30 years old each , asked me this and a couple more questions.

Then one of them asked me the following: "What would you chose between performance and readability in a program ?" and proceeded for half an hour to convince me that readability is more important than performance.

I actually felt that a piece of me was dying inside and I had the urge to hit him in the head with a brick , since in the last few years I actually spent countless of hours with sweat dripping from my forehead trying to optimize the most out of some piece of code.

Needless to say I did not get the job , although I really liked that company.


Anyhow , now that I read some class loaders tutorials , they do say that in J2EE class loaders are important as they allow to load a class from anywhere and that anywhere could be a web server.
But how is this related to Spring ?

 
Saifuddin Merchant
Ranch Hand
Posts: 607
Firefox Browser Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Bear Bibeault wrote:Probably because they wanted to know if you'd ever written a class loader. A "Spring-related" job isn't likely to be exclusively writing Spring code.


Of course Bear that's true. I'm just surprised that people were asking questions on class loaders. That's not something I would bring up in 'Application Developer' job interview around Spring. Class loaders are important (I guess) but personally I wouldn't bring that up if the interview is around "Spring" (I would dive in some CORE java stuff).

like I said before - nothing in spring would particularly bias questions towards class loader - so it most likely a general question. Agree there
 
Saifuddin Merchant
Ranch Hand
Posts: 607
Firefox Browser Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Myke Enriq wrote:
Then one of them asked me the following: "What would you chose between performance and readability in a program ?" and proceeded for half an hour to convince me that readability is more important than performance.


I'd root for readability too, but then again some of the "optimizations" that I talked against - made the code cryptic & would have degraded the performance rather than improve them. The rule I have around optimization is - "Don't". No unless you know and understand what your doing.

Of course that a general opinion. From your post it looked you job particularly included optimization (& probably ) you knew what you were doing & were consciously aware of it.

Not related to this post
So you have worked on optimizing a spring application? web based? (just curious, what optimizations you have done. Any examples that you could post, if possible?)
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64716
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Likes 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Myke Enriq wrote:I actually felt that a piece of me was dying inside and I had the urge to hit him in the head with a brick , since in the last few years I actually spent countless of hours with sweat dripping from my forehead trying to optimize the most out of some piece of code.

Needless to say I did not get the job , although I really liked that company.

You'd likely want to hit me with a brick as well. Unless there is a demonstrable problem with performance, clarity is far more important than micro-optimization.

Do you often have these urges to violence?
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64716
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Saifuddin Merchant wrote:That's not something I would bring up in 'Application Developer' job interview around Spring.

Depends upon the nature of the job. Just because Spring is being used doesn't mean that the job is 100% Spring all the time.
 
Saifuddin Merchant
Ranch Hand
Posts: 607
Firefox Browser Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Bear Bibeault wrote:
Saifuddin Merchant wrote:That's not something I would bring up in 'Application Developer' job interview around Spring.

Depends upon the nature of the job. Just because Spring is being used doesn't mean that the job is 100% Spring all the time.


True - like I said I was talking about what I would do currently. I work for a bank - so normally "class loader" are not a hot topic. I've not been in any interviews where people have brought up class loader. I am under the impression its not a usual topic people pick in interviews (but some obviously do)
 
Jan de Boer
Ranch Hand
Posts: 570
3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Bear Bibeault wrote:You'd likely want to hit me with a brick as well. Unless there is a demonstrable problem with performance, clarity is far more important than micro-optimization. Do you often have these urges to violence?


The 'brick hitting' probably has more to do with the nature of job interviews than with the actual issue. I kind off liked reading the 'brick hitting' part of his story, it made me laugh. First good moment of the morning for me! Well maybe I am a little violent too. :-)

About the classloaders question. People in those settings sometimes ask the smallest details just to test your general knowledge. It does not mean the answer to the question is something you use in the job. It is just like that, if you would know this detail, you probably know a lot about this computer language. I once had to answer how C++ structs differed from C# structs (sorry to stray away from Java now). I had to get the answer 'out of my tows', if that is a correct expression in English. I just mean I had to really think and recover knowledge I read in an instruction book about those languages years ago. It just in time stroke me though, and I gave them the answer. I got the job. But of course the difference between C++ structs and C# structs was not the main subject of that job.

I agree with you, Bear, on that optimizing issue by the way.
 
Jan de Boer
Ranch Hand
Posts: 570
3
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Myke Enriq wrote:I had the urge to hit him in the head with a brick


Ha ha ha. Okay! But was that because of his attitude in the whole interview, or actually really about the technical issue? I think job interviews are 'not really a pleasure' too. I never actually hit anyone though. :-)
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic