A developer in the green world of HN.
During a time of crisis, in 2020 being unemployed, looking for jobs, and going to interviews almost every day, I found myself devastated after a four-round interview. I sat down after reading the rejection email and was thinking about what was the one thing that I remember from that interview.
Yes, it was the part where I believe I mess up. It wasn't technicality, it wasn't that I didn't know the answers, it simply was that they came up with a question I was not expecting.
This question literally froze me, got me brainstorming and thinking about all the lines of code I've written. I misunderstood this question in terms of complexity, I thought "best line" meant "tough or hard" which got me thinking about sophisticated lines of code. Something like:
staff.filter(worker => worker.isSenior).map(p => p.salary + p.salaryTax).reduce((acc, curr) => acc + curr, 0)
Doing multiple functionalities in one line was the main thing that came to my head. But the question was not about functionality, or simplicity, or efficiency, or how hard it is to actually write that line of code. After doing all the thinking and realizing that this question was the reason why I did not get hired, I realized this question was SYMBOLIC.
And I started to think about a line of code that really means something for me, that changed the way I code and the way I look at problems. I went to square 1 and came out with the line of code that as many other developers, got me started in the industry. The line of code that made me pursue a career in computer science and that motivated me to learn more and to explore other areas and programming languages.
This was the first program I ever made. A line of code that I will never forget regardless of what my favorite language (JS) is. This symbolized how much I wanted to become a developer.
"The best line of code I've ever written with no doubt is:
cout<<"Hello World "<<endl;
This was the type of answer that I should have said and elaborate on it. For those of you who are going to interviews to become a developer, my only advice will be to be yourself at all points and speak your mind. Just because they came with a question you didn't study, that does not mean it is over, just answer the question as any other question, straight from your heart.
Create your free account to unlock your custom reading experience.