16 May 2025 #mondaylinks
Hey, there.
Here are 4 links I thought were worth sharing this week:
#1. We as coders take pride in our craft. We like to follow principles and best practices: KISS, SOLID, DRY. But there are some coding myths we need to retire (8min).
#2. There’s one problem with the “get things done” attitude of startups: security. Here’s a breakdown of security issues found on a dating app (8min). They had broken one-time passwords and open endpoints. Security shouldn’t be an afterthought.
#3. A URL shortener is maybe the new “hello, world” for distributed apps. But building one doesn’t have to be that complicated. Here’s a simple not-overengineered alternative (6min).
#4. Dragging and dropping controls onto a canvas is normal these days. Even the word “controls” is normal. But someone has to come up with all those ideas. They started with the release of Visual Basic, back in the 80s. Here’s the history and legacy of Visual Basic (20min).
And in case you missed it, I wrote on my blog about cURL, a simpler and faster alternative to Postman (2min) and how to find all 3-digit numbers in a tree (4min).
(Bzzz…Radio voice) This email was brought to you by… Want to master SQL Server performance tuning? Brent Ozar, the leading SQL Server expert, is celebrating with a special anniversary sale.
Only this month, get the prerecorded Mastering bundle and save $400. This bundle includes four advanced courses covering indexes, queries, and full database optimization. Everything to optimize and tune your SQL server like a pro.
See you next time,
Cesar
Want to receive an email with curated links like these? Get 4 more delivered straight to your inbox every Friday. Don’t miss out on next week’s links. Subscribe to my Friday Links here.
15 May 2025 #misc
Recently, I needed to track down how an old Visual Basic WebForms app stored a value from the database into the Session object.
But I didn’t know I was in trouble until I looked for the file in the GitHub repository and it said “(Sorry about that, but we can’t show files that are this big right now.)”
The file had 69,359 lines. Its name? GlobalFunctions.vb
. You can guess what was in there just by looking at that name, right? It was a clear symptom of a deeper problem.
The problem isn’t that it was a WebForms app in Visual Basic. It was that huge “throw everything under the carpet” kind-of file.
It reminded me of one of the conventions I decided to ban: “Helpers” and “Utility” classes, full of unrelated static methods.
If you’re tempted to write anything named with “Helpers,” “Utilities,” or worse, “GlobalFunctions,” please stop and consider how to split that class into smaller, more focused classes with clearer names. Smaller, well-named classes ease cognitive load, making them easier to work with.
Or even better, if you’re practicing DDD, before defaulting to a “Utility” class, ask yourself: does this belong inside an entity or value object instead?
14 May 2025 #productivity #showdev
Postman still isn’t opening.
Five minutes after clicking the icon… Nothing. Maybe it’s calling home, checking in with the International Space Station, or just ghosting me. Who knows?
Today I found out about Bruno, a “Git-integrated, fully offline, and open source API client”. A simpler alternative to Postman. I had come across Bruno before but had forgotten about it.
But, there’s an even simpler alternative to Postman and Bruno.
When I want to test a single endpoint, I just:
- Go to the Network tab on Chrome,
- Right-click on the request I want to test,
- Then click on “Copy as cURL (bash)”,
- Then paste it into a Terminal, and
- Press enter.
cURL is a “command line tool and library for transferring data with URLs”. It comes preinstalled with Git Bash for Windows. And I’m a “terminal Git user,” so I keep a terminal open all the time. Way faster than opening an Electron app.
Here are some cURL examples to send data:
$ curl --json '{"name":"some json here"}' https://example.com`
$ curl -s --json @body.json https://example.com
$ curl -s -i --json @body.json -H "header-name:header-value" https://example.com`
$ curl -d "data to PUT" -X PUT http://example.com/
Here’s the meaning of those options:
--json
: To POST a json request either as a json string or from a file.
-s
: Silent mode
-i
: To include response headers
-k
: To avoid validating SSL certificates. Handy when an ASP.NET Core project has HTTPS redirection.
Et voilà! No waiting, no upgrades, no paywalled features. cURL is faster and simpler than Postman, which still doesn’t open on my computer. I guess it’s time to upgrade it or simply use a better alternative.
PS: Turns out Postman finally opened… after an upgrade. Unnecessary drama. Arrggg!
13 May 2025 #misc
In 2023, I felt sick to my stomach.
By the end of the year, I burned out. Then in 2024, I was laid off. Perfect combination, right?
For the first time, I had no idea what to do next.
One day, I called a friend to tell him how I felt and get things off my chest. “You always have a plan,” he told me.
But not that time. I only knew what I didn’t want to do. I didn’t want to go back to where I was: stomach sick, burned out, and without a job.
I felt relieved after that layoff.
But it lasted only weeks before I realized I had no paycheck coming. I checked my expenses and bank account to see how long I could last without a paycheck. Relief quickly turned into desperation. More than once.
The quote that changed everything
By chance or fate, I found this quote:
“If you don’t know what to do with your life, start by working on your health”
That’s from James Altucher, one of my favorite writers. It’s from an interview or one of his books, I can’t remember exactly. I’ve been following his work online since then, by the way.
Since last year, after ditching my to-do lists, my only plan has been to take care of my body, mind, and spirit every day.
Prioritizing our health creates forward momentum. It gives clarity, energy, and purpose.
There are days when I miss working on any of the three parts.
But when I miss a couple of days, I can feel it. Frustration, ruminating thoughts, and low energy start to appear. Again. That’s the warning sign to go back to my healthy habits. My body tells me when it needs to be taken care of.
I still don’t know what to do with my life. Probably, I never will. But working on my health has given me so much peace of mind.
One day at a time
Life doesn’t come with an instruction manual. We have to figure things out. We all are figuring life out as we go. Sometimes it’s easy. Sometimes it’s not. Sometimes we know what we want out of life. Sometimes it’s easier to tell what we don’t want to do.
No matter where you are in life, work on your health. That’s the first step to change.
12 May 2025 #writing
#1. Use Fear, Curiosity, and Desire to write attention-grabbing headlines.
Credits to Ron Markley on Medium.
Recently I’ve learned that when we write content, we’re in the business of writing headlines.
A good headline is like a good welcome sign. People will only stop by if they see a good one.
No matter how thoughtful our content is, if the headline doesn’t hook readers, they won’t stop to read it.
#2. When writing stories or fiction, a point in time creates expectations in the readers’ minds.
When we write “It was a sunny summer day when I saw her for the first time…“ readers expect to hear more about what happened.
And if we abruptly shift subjects, it’s like breaking readers’ expectations. Avoid those abrupt shifts. It’s like cutting off a conversation mid-way.
Listicles work online and offline.
The 10 Commandments, the 95 Theses by Martin Luther, the 48 Laws of Power… All of them are listicles.
Since last year, I’ve been experimenting on LinkedIn. And listicles have worked like a charm.
My most viewed post was something like “12 lessons after 10+ years in Software Engineering (In less than 1 minute)” followed by 10 one-liners and a question to invite people to the comment section. Boom! Over 80,000 views. I felt like an Internet celebrity for a couple of days… Here’s the post, if you’re on LinkedIn, by the way.
When reading listicles, people tend to comment on the item that resonated the most.
#4. One single post can boost your follower count.
You know the Pareto principle, right? 80% of results come from 20% of effort.
Well, 80% of followers and engagement come from 20% of posts. And one viral post can boost your follower count. It has happened to me on LinkedIn and Medium recently.