DEV Community

Sam
Sam

Posted on

3

My somewhat rocky start to HNG11...

HNG memeBetween you and me, there is a screen.

Nope? Apologies if that opening joke turned you off, but stick with me here

Between you and me, I never thought the first task for this year's HNG internship would be to write an article(if you don't know what HNG or internship means, Keep reading). Trust me, I triple checked to make sure I hadn't registered for the wrong track but it was written there in bold text - “STAGE ZERO TASK - BACKEND TRACK”

For someone like me who dreads putting pen to paper or more appropriately, fingers to keys, I was ready to jump off the HNG rollercoaster of fun, but then something crazy happened… JK, a friend convinced me otherwise.

I'm to write about a difficult problem I recently encountered but in my opinion a proper article would be when have I never faced problems when I boot up my pc? No seriously, when?

However, a particularly interesting recent problem that stands out is a problem I encountered while working with the emerging JavaScript library, Htmx. Everything was going well until I had to do redirects! You see, with the way Htmx works, the direct way of doing redirects wouldn't work as Htmx requires that you return hypermedia from the backend(it's not as bad as it sounds, trust me)

Being an emerging technology as it is, there was no working solution to be found anywhere. Stackoverflow just led me around in circles of Qs and As that didn't really help and chatgpt kept giving me responses from its hallucinations. But then it struck me, if I have to return hypermedia and JavaScript can be hypermedia(if in a script tag), all i needed to do was return JavaScript code to change the current URL. It worked like magic and all it took was a single line of code and I was indeed proud of myself at the time. I have since found a neater way to do this but that's a story for another day.

Now that this article is behind me, I look forward to all that HNG has in store for me this year. So far I have almost missed a deadline and a friend has managed to trap themself in a bet that sees them losing their pc if they fail to complete the internship so this should be fun. If it does sound like fun, I'd recommend you join here or here(for premium access) and maybe shoot me a DM @kid_with_adream

Will I chronicle my journey in this cohort? I doubt it. But let's see how it goes. Until next time, dear reader✌🏽

Sentry blog image

How to reduce TTFB

In the past few years in the web dev world, we’ve seen a significant push towards rendering our websites on the server. Doing so is better for SEO and performs better on low-powered devices, but one thing we had to sacrifice is TTFB.

In this article, we’ll see how we can identify what makes our TTFB high so we can fix it.

Read more

Top comments (0)

Image of Docusign

🛠️ Bring your solution into Docusign. Reach over 1.6M customers.

Docusign is now extensible. Overcome challenges with disconnected products and inaccessible data by bringing your solutions into Docusign and publishing to 1.6M customers in the App Center.

Learn more