New Beginnings and Interviews

March 6, 2007

I’ve been wondering if I should do this for a while. Make and maintain a blog that I’m quite aware no one will ever read. Eventually, with one or two people saying it’s a good idea, I’ve decided to officially throw my hat into the blogging ring.


For those of you who don’t know me, my name is Mark Stump and I’m a second-year Computer Engineering major at the Rochester Institute of Technology. I’m also a lab instructor for the Computer Science Department at RIT, which is fun job to do.


The trigger for the creation of this blog was a job interview I just had. I’m currently trying to enter the BS/MS (Bachelors/Masters Dual Degree) program that the CE department offers, which means I have to co-op this summer. Today I had a phone interview with, and I wanted to get out how it went and what was asked. I’m sure many people I know will go through processes such as this; I just got lucky with an early interview. The interview consisted of two parts: Technical questions and a long coding question. What happened in each part is explained below.


Technical Questions


This part of the interview took about a half hour and consisted of a wide-range of questions, from basic Object-Oriented Programming concepts to advanced Java topics. I was able to get most of the questions, but one I completely borked when I shouldn’t have. That question is below:


Interviewer: “Explain the difference in Java between strings and string buffers”


Me: <Long winded, grasping-at-straws explanation>


Me: “That’s not even close, is it?”


Interviewer: “Nope”


Me: “Crap”


Which was not a good way to start (this was my first question). However, things turned around from there. Another question I was asked was why Java now allows you to use Generics in collection declarations. While I wasn’t completely sure about this, I was able to come to the correct answer (allows Strong Typing). While I didn’t say “Strong Typing” exactly, I was able to explain the concept of it, which seems like that’s what really counted


A simple question that was given that I felt was easy (and made me feel smart) was to explain what a garbage collector is and what it does.


Finally, the most involved question I received was to design a complete Zoo with the concepts of OOP. This wasn’t language specific, just general conceptual-type stuff. I gave an answer of a large “Zoo” class where everything else would come together, and then other classes such as an “Animal” class (which sub-classes that inherit for specific species), a “Cage” class (sub-classes for different types of cages), and a person class with subclasses for different people (Spectator, employee, whatever).


The best advice I can give is to not get discouraged. Like I said, although I completely borked the first question which I probably should’ve gotten, I was able to recover and finish fairly strong.


Coding question


This question could’ve gone down in a few ways. First, if I didn’t have enough time, I would’ve written out the code by hand and relayed the code over the phone, which had a really excellent chance of being an awful experience. Since I had the time, I was able to get the full version of the problem and probably show the interviewer that I have a decent grasp on the language I programmed the solution in and also that I have decent problem solving skills.


The question was this: Write a method (or methods) that take an integer and return the value as an English sentence. The number was to be between 999,999 and 0. This problem wasn’t overly hard, but it did take some time to complete.


To complete the problem, I was given about 2 hours, of which I took about an hour and a half to get a satisfactory solution (to me).


The method I attacked this problem was to use three methods, two of which returned string versions of basic numbers and the main driver method to convert the number and return a string. I’m not going to get into my solution for the problem (if you want, feel free to ask me for it, I’ll give it to you) since the logic behind, while I find it easy to understand, I suck at explaining stuff like this over the web.


Feel free to try it yourself; it’s actually a fairly fun, simple problem. I was able to do it a little under 200 lines of code (which comments I put in). My solution is probably bloated and given more time, I could probably trim the code to be a good deal more efficient and more compact. I was under the gun and a bit nervous, which isn’t an environment where I code the best. I was given the choice to do the code in any language any way I wanted. Java was the programming language I choose (I’m most familiar with it) and I also used the Eclipse IDE to test and code my program.


Anyway, that’s about all I have to say on this topic. I wanted to record my experience, and I hope the information I have helps at least one person with his or her own interview. If you have any questions or comments or whatever, feel free to contact me at


Now I get to enjoy the rest of my Spring Break. Ciao.


One Response to “New Beginnings and Interviews”

  1. Myke Says:

    Hello Mr. Stump. Interesting blog so far.

    About your coding question about strings and string buffers….

    1. Strings are immutable where as stringbuffer are not

    2. StringBuffer.append() gives better perfomance than string if the concationation at runtime (Runtime resuliton).

    + operator between strings gives much better performance than StringBuffer.append() when it is compile time resolution

    Run time resolution takes place when the value of the string is not known in advance where as compile time resolution happens when the value of the string is known in advance

    3. Some intersting things about String Buffer

    StringBuffer maintains a character array internally.The default capacity is 16 characters. When the StringBuffer reaches its maximum capacity, it will increase its size by twice the size plus 2 ( 2*old size +2).

    If you use default size, initially and go on adding characters, then it increases its size by 34(2*16 +2) after it adds 16th character and it increases its size by 70(2*34+2) after it adds 34th character. Whenever it reaches its maximum capacity it has to create a new character array and recopy old and new characters. It is obviously expensive. So it is always good to initialize with proper size that gives very good performance.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: