Hackernoon logoWhat is the best line of code you've ever written? by@fabian337

What is the best line of code you've ever written?

The best line of code I've ever written with no doubt is: SYMBOLIC. It symbolized how my passion for programming came to life, how I decided to pursue a career in the computer science field. 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.
image
Fabian337 Hacker Noon profile picture

Fabian337

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.

What is the best line of code you've ever written?

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.

image

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;

it symbolized how my passion for programming came to life, how I decided to pursue a career in the computer science field, and it was the beginning of who I am today. This line of code will always hold a special place in me, and even though I do not code much in C++, it was the programming language that I started my career with. For other developers, it might be Java or Ruby or Javascript or others, but for me it was C++."

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.

Tags

Join Hacker Noon

Create your free account to unlock your custom reading experience.