logo

/blog

Code brevity

/ web-development

We all want to write simple, short, effective code. My biggest desire when i was just starting up as a developer was to write short code. Even today, when I look at a piece of code, my initial reaction is to look for ways to simplify . The problem? I might not know enough about the problem I’m solving or the code I am working with to make that change… yet.

Read more →

Let’s become web developers again

/ web-development

We’ve turned everything into bundles of JavaScript and everything else… even HTML is JavaScript… I spend most of my day looking at red text in the console and in performance audit reports for websites. Websites, mind you, not web apps! The web can do so much these days so let’s become web developers again. Or, in the words of the great Jay Z: Get back to rap, you’re T-paining too much…

Read more →

Circuit breakers

/ Opinion

The more invested you are in a specific solution to a problem the harder it is for you to consider other options. I prove this to myself on a daily basis. This is why I’ve adopted a circuit breaker — I say “STOP!”, out loud. Picked this trick up from Deep Work, by Cal Newport, a couple of years back. Works like a charm!

Read more →

Core Web Vitals - The DevTools coverage report

/ Core Web Vitals / Web Performance

Since Google announced their initiative to include page experience KPIs in how they calculate search engine rankings, brands have been faced with the poor performance of their websites. Years of technical debt induced by feature development and optimization for delivery and shorter time to market are now taking their toll. What many of us fail to read is the fine print of Google’s reasoning and recommendations around Core Web Vitals. We’re missing the fact that Core Web Vitals only impact ranking in mobile searches.

Read more →

How to remove the trailing slash of a URL on a Hugo static website running on Netlify

/ Static Site Generators

I recently migrated www.oprea.rocks from Gatsby.js to Hugo. My biggest complaint was not being able to remove the trailing slash on all pages. Assuming your website is on Netlify, here are the steps to remove trailing slashes on your Hugo website/blog. Enable asset optimization on Netlify You can hand-pick your settings but for this purpose I left them all on — especially the “Pretty URLs” setting. That turns the HTML files generated by Hugo into nicely formatted URLs, but without that ugly, trailing slash.

Read more →

Fixing Golang GIN-debug WARNING Headers were already written.

/ Software Development / Golang

If you’re just getting your hands dirty with Golang, and specifically with Gin, which is a web development framework, you might come across this specific warning: [GIN-debug] [WARNING] Headers were already written. Wanted to override status code 400 with 200 Most likely, you’re trying to use BindJSON on a property that does not exist. Here’s an example. I’m building an analytics solution for weremote.eu and for its pageview counter, I wanted to also be able to pass in extra props besides the usual props such an event would carry.

Read more →

Handling errors is an essential skill

/ Coding Stories / Opinion

I’ve met tons of developers who would not do error handling because of fear of it being too much. Here’s a short list of reasons: We’re going to write too much boilerplate because the properties are too deeply nested. The code will look ugly. Why write a ton of if statements? The server always returns that response, why bother? Why validate this input — it’s declared as type="number" in the DOM so it only takes numbers.

Read more →

Small steps

/ Productivity / Opinion

We’re so imbued in zero-to-hero stories we fail to see the years of struggle, the lucky breaks and the sheer amount of effort today’s successful entrepreneurs had to put in to get to where they are. If you’re an avid reader like myself, you’re not getting any help there, either. The whole self-help genre is cluttered with overnight successes and “You can do it, Johnny!” attitudes. They’re lying to you! You end up believing that you simply have to push hard to get somewhere.

Read more →

A Markdown Story

/ Productivity / Opinion

It’s 2014 All my colleagues are writing their Bachelor’s Degree paper in LaTeX1. Or MSWord… 🤮 I’m doing it in Markdown, mostly because LaTeX looks too verbose for me. And I’m not that smart anyway. I was never the brightest bulb in the chandelier, to begin with. So, back to LaTeX: too verbose, too many keywords. Looks like the type of thing highly skilled academics use to flex their look-at-how-many-format-specifiers-I-can-pull-from-memory muscles.

Read more →

How I learned to talk about WeRemote.eu during Y Combinator Startup School sessions

/ Entrepreneurship

I signed up to Y Combinator Startup School with WeRemote. I’m putting in weekly status reports, watch some of the lectures, and I only missed a single session so far. During each session I have to talk about the platform and describe it. __It’s like an investor pitch. __ What’s funny is that neither myself, nor a many of the founders I talk to manage to keep the presentation short and concise.

Read more →
Copyright (c) 2023 Adrian Oprea. All rights reserved.