๐— ๐˜† ๐—›๐—ข๐—ก๐—˜๐—ฆ๐—ง ๐—›๐—ก๐—š ๐—œ๐—ก๐—ง๐—˜๐—ฅ๐—ก๐—ฆ๐—›๐—œ๐—ฃ ๐—˜๐—ซ๐—ฃ๐—˜๐—ฅ๐—œ๐—˜๐—ก๐—–๐—˜

I spent two years as a Laravel developer. I felt stuck. I realized I did not know much about real programming. I decided to learn Javascript from scratch. That is how I found HNG.

HNG is a remote, intensive program. It gives you real engineering work from day one. There is no hand-holding. You get tasks, deadlines, and a Slack channel. It is a sink or swim environment. The pressure shows you how you think when things break.

I want to share two specific tasks from my time there.

๐—ง๐—ฎ๐˜€๐—ธ ๐Ÿญ: ๐—ฅ๐—ฒ๐˜๐—ฟ๐˜† ๐—˜๐—ป๐—ด๐—ถ๐—ป๐—ฒ (๐—œ๐—ป๐—ฑ๐—ถ๐˜ƒ๐—ถ๐—ฑ๐˜‚๐—ฎ๐—น)

I used Node.js and raw SQL with better-sqlite3. I built a schema for jobs, status, and error logs.

The problem: I hit a race condition. I tried to check a job status before processing it. But the check and the update were not atomic. Two instances could read the same pending job at the same time.

The fix: I used SQLite BEGIN IMMEDIATE transactions. I made the status check and update a single atomic operation. I used the synchronous nature of better-sqlite3 to make the locking reliable.

Lessons learned:

๐—ง๐—ฎ๐˜€๐—ธ ๐Ÿฎ: ๐—ฆ๐—ธ๐—ถ๐—น๐—น๐—ฏ๐—ฟ๐—ถ๐—ฑ๐—ด๐—ฒ ๐—”๐˜€๐˜€๐—ฒ๐˜€๐˜€๐—บ๐—ฒ๐—ป๐˜ (๐—ง๐—ฒ๐—ฎ๐—บ)

I worked on the backend for a personal assessment flow. I handled validation, failure handling, and API contracts.

The problems:

Lessons learned:

These tasks were not the most complex algorithms. But they made me a better engineer. I learned more in these two months than I have in a long time. HNG does not protect you from hard problems. That is why it works.

Source: https://dev.to/joyigbonekwu/behind-the-green-tests-my-honest-hng-internship-experience-3hn8