๐ ๐ ๐๐ข๐ก๐๐ฆ๐ง ๐๐ก๐ ๐๐ก๐ง๐๐ฅ๐ก๐ฆ๐๐๐ฃ ๐๐ซ๐ฃ๐๐ฅ๐๐๐ก๐๐
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:
- Concurrency bugs are hard to debug. They do not happen every time.
- You must understand your tools. I thought the library's synchronous nature was a limit. It was actually the solution.
๐ง๐ฎ๐๐ธ ๐ฎ: ๐ฆ๐ธ๐ถ๐น๐น๐ฏ๐ฟ๐ถ๐ฑ๐ด๐ฒ ๐๐๐๐ฒ๐๐๐บ๐ฒ๐ป๐ (๐ง๐ฒ๐ฎ๐บ)
I worked on the backend for a personal assessment flow. I handled validation, failure handling, and API contracts.
The problems:
- Case mismatch: The frontend expected snake_case. The backend sent camelCase. We lost time debugging why fields were undefined.
- Mid-build changes: The PMs changed the requirements halfway through. We had to move question management from the frontend to the backend. This forced a redesign of our data model.
- Testing struggles: My early end-to-end tests failed constantly. I struggled with test isolation and state.
Lessons learned:
- Use shared, written API contracts. Review them before coding starts.
- Document the impact of spec changes immediately.
- Tests are not just for green checkmarks. The failures tell you how your code actually works.
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