LiveJournal

I can’t say why, precisely, but LiveJournal has never truly held any attraction for me. Maybe its the user interface, but I think its mostly that I want to have full control of my stuff — and that’s simply not done in any online, managed service. The fact that it is censored in Iran also doesn’t really help, either.

But today when I found out that one of my favorite authors of all time, Scott Lynch, was an active user, I decided to create an account, so that I could send him a message. Anyways, here is my LiveJournal journal and also, I have set it up so that anything I post here is cross-posted straight there, using a neat WordPress plugin called the LiveJournal CrossPoster plugin.

I have also made my public notes available under http://journal.mmnaseri.com

Interview Question #1

So, as I mentioned before, I am going to post questions I think will be useful in interviewing applicants to a developer position in an average software development company. Here goes the first one.

Question

We see a class named AbstractShape with a method redraw() on it, with a given behavior already implemented. One of its subclasses, Circle, overrides this method and instead of coding a behavior of its own, throws an UnsupportedOperationException. What is the matter with this design? How can it be fixed?

Continue reading

My First Interview

About a week ago, I conducted my first interview. It was important to me from multiple points. For starters, it was a nice change to be on the other side of the table when  going to the interview. Secondly, it kind of validated my status in the company for myself. I have been in the architecture and infrastructure for more than four years now. It is THE team people go to when they hit something they just can’t get right.

I have been known to be the guy people refer to when they have problems understanding something. Of course, I’m not the only one. There are five of us — or, rather, used to be; since nowadays it’s mostly me and another colleague. But having the high and mighty, so to speak, acknowledge this is sort of a validation of my efforts in the past years.

Anyways, I had to come up with some questions for a person claiming to know Java, EJB, Hibernate, and JPA rather well. She also had written down SQL, MySQL, and Oracle down in her resumé, but we cleared early on that she was no expert and therefore we skipped it.

Now, having gone through the process of thinking of the questions I found it something that wasn’t exactly trivial. Therefore, I will be sharing the questions I came up with shortly. Each will be an individual post, and I will try to elaborate on the answer and why I think it is a good question as well as what point it proves.

I also hope that people find it useful and correct any possible errors I have, as well as add their own suggestions.

Second Phone Screen

I got my answer in about three weeks. A rather long period of time, based on the normal time reported by other people.

But it was good news, so I wasn’t too mad. What had happened was that apparently it was Google recruitment season finale and my recruiter was swamped. So, anyway, I got good news, but they told me to study more data structures. It all relates to a data structure question I had to answer, but had to invent my (coincidentally correct and working) own data structure because I had not encountered the actual data structure before.

Anyways, I got to it. Studied CLRS some more, read Cracking the Coding Interview some more, and then it got time for my second phone interview. It happened two weeks ago. This time, the interviewer was more business-like. No chitter-chatter to get me to talk about my background. Just jumped right into coding answers to the questions on the shared Google Doc.

I got the first question right, and stumbled my way past some optimization to my solution. He was happy enough and gave me the next question. I had to first illustrate that I understood the question well enough and had the rough sketch of an answer before he would let me write some code. I chose Java since it’s the language I’m most comfortable in.

I made the silly mistake of sorting an array and getting the first item by way extracting the minimum, instead of the obvious O(n) way. He caught me on that, and I said shit out loud and apologized and fixed my code.

He was happy that I could detect my own mistake at one point, and finally asked me to tell him how I would make an O(km) answer run in O(m lg(k)) by using the proper data structure, but told me no further coding was needed as we were nearly out of time.

I told him, and he said his good day to me. I asked him to tell me how I did before he hung up, but he wouldn’t. He hung up and I waited for an answer.

Four days later, my recruiter called me, giving me a very positive feedback. He pointed out these points (from a feedback report, no doubt, as he confessed himself to be not-so-technical):

  • very adept at algorithms
  • converts algorithms to codes very easily
  • competent codewriting
  • made sure functions terminated without errors
  • no issues understanding the problems
  • sophisticated coding
  • should be brought in for the face-to-face

Anyway, I was thrilled. He told me should the same feedback come from the face-to-face, I could consider myself hired. I was overjoyed. Right until he told me that Google — unfortunately — would not be hiring anyone outside of the US for its US-based offices, this year.

Now, I am faced with the choice of going somewhere else in the world, or postponing the whole deal for a possible future date. I would love it to happen and should it be for Australia, I would be extra happy. But I have to wait for the recruiting officer for outside-of-US offices to tell me what options I have, exactly, location-wise.

Anyhow, that’s how it has been so far. I will be studying some more, practice coding on paper and a whiteboard, since that is the hardest part, I hear. I will also be reading more in-depth algorithms to be as ready as possible. Who can ask for more, right? Anyway, if there is anyone out there reading this, please do wish me luck.