12 Apr 2026 #misc
This was supposed to be a call to get some help.
At least, that’s what I was told. But it turned out to be something else.
An invitation to a call…
This happened in the days I started to write seriously online.
After months of inactivity, I joined a social media platform.
I participated in the community, liking and commenting under big and small accounts.
For weeks, I replied to almost every post from a big creator.
His message resonated with me.
He left his regular job to make a living writing.
My dream!
One day, he messaged me asking me about my goals.
He offered to join a free call to see if he could help.
The day of the call…
Somebody else showed up.
“Definitely, we could help,” the guy said after asking why I was interested in writing.
He showed me all the incredible benefits of joining their writing program.
Testimonials, weekly coaching calls, a vibrant community…
You name it!
When I asked about the price, “Forget about the price. What would your life look if you achieve this goal?”
They promised hitting $10K a month.
I hesitated and kept asking for prices.
Then he typed some numbers. “Here’s the full price… If you’re an action taker, here’s the price… Or you can pay in X installments of Y…“
Wow! Far outside my budget. Then I knew why he asked about my income.
There was some awkward silence, followed by the same question, “What impedes you to take action now?”
Then, more silence, more awkward this time.
Being an action taker…
After some back and forth, he created a lite version of the program for a discounted price.
That was “all” he could do for me.
But there was a catch, I had to pay within the next 24 hours.
Otherwise, I’d prove I wasn’t “an action taker committed to achieving my goals” or something.
I sent the receipt to the creator who started the conversation.
Radio silence.
Each day made me worry more.
“How can I be so stupid?”
I checked my card activity, hoping not to see anything suspicious.
After a day or two, I got a link to join the course and the community.
It was some video recordings.
Not that bad, but overpriced.
I definitely felt tricked. A hand crossed the internet, through my screen, into my pocket.
“Hey, I’ve seen this one…”
More recently, the first email from a newsletter had a link to a webinar.
The guy promised 8 tips his mentor taught him to live a “dream life.”
He claimed he works one day a month.
But he only shared one tip.
To get the others, we only had until next Thursday midnight.
It was a “let me hold your hand” program, but you had to join a call to see if you were a good fit.
The price wasn’t disclosed anywhere.
I unsubscribed.
“Hey, I’ve seen this one, I’ve seen this one. It’s a classic,” Marty McFly would say.
That wasn’t the first time I heard that story.
If I don’t see this…
For a moment, I thought that call was a scam.
The closer followed all the sales tactics.
It was a sales call to showcase in a textbook.
Finding a pain, painting a dream outcome, making a limited-time offer…
I guess scammers and salespeople read the same books.
Or scammers are salespeople who joined the dark side.
That call and the other webinar made me set a rule:
If there’s no price, no time to decide, and the “help” comes wrapped in a call, I walk away without thinking twice.
If “help” is just a hand reaching into your pocket, it isn’t help at all.
That’s why I don’t do sales calls—on either side.
12 Apr 2026 #misc
There’s a thin line between making your clients happy and doing everything they want.
Derek Sivers in Anything You Want shares his strategy to end “small favors” while keeping clients happy.
When running CD Baby, he had a clear task: create a sales page for your CD.
For anything else, he answered “If you buy us a pizza, we’d do any favor you want.”
A pizza isn’t free but generates small friction to end next favors.
Replace pizzas with coffee or hamburgers. Also great idea to also support local businesses.
10 Apr 2026 #csharp #todayilearned
In another episode of the Excel paradox of Coding…
TL;DR: To read an invalid field from a CSV file as null with CsvHelper, create a map class and use Default() with useOnConversionFailure set to true on the appropriate field.
The cleanest approach
To honor the 20-minute rule and preserve my keystrokes, let’s say we need to read a CSV file with CsvHelper. By default, it throws an exception when it fails to parse a column, for example when it finds text on a numeric column.
Here’s how to read that invalid field as null instead of throwing an exception,
using CsvHelper;
using CsvHelper.Configuration;
using System.Globalization;
using System.Text;
namespace TestProject1;
[TestClass]
public class CsvHelperTests
{
private class MovieRating
{
public string Name { get; set; }
public float? Rating { get; set; }
}
private sealed class MovieRatingMap : ClassMap<MovieRating>
{
public MovieRatingMap()
{
Map(m => m.Name);
Map(m => m.Rating)
.Default(defaultValue: default(float?),
useOnConversionFailure: true);
// ^^^^^
// If the field is invalid, use the default value
}
}
[TestMethod]
public void NullWhenInvalidFloats()
{
var csv = new StringBuilder()
.AppendLine("Name,Rating")
.AppendLine("Inception,9.0")
.AppendLine("Titanic,ThisIsNotAValidRating") /* <-- */
.ToString();
using var reader = new StringReader(csv);
using var csvReader = new CsvReader(reader, CultureInfo.InvariantCulture);
csvReader.Context.RegisterClassMap<MovieRatingMap>();
// ^^^^^
var records = csvReader.GetRecords<MovieRating>().ToList();
Assert.AreEqual(2, records.Count);
var last = records.Last();
Assert.AreEqual("Titanic", last.Name);
Assert.IsNull(last.Rating);
// ^^^^^
// Look, ma! It's null
}
}
The magic happens in MovieRatingMap. The Rating map uses Default() with useOnConversionFailure set to true.
The manual approach
As an alternative, let’s read the CSV file manually while processing the records as needed,
[TestMethod]
public void ByHand()
{
var csv = new StringBuilder()
.AppendLine("Name,Rating")
.AppendLine("Inception,9.0")
.AppendLine("Titanic,ThisIsNotAValidRating")
.ToString();
using var reader = new StringReader(csv);
using var csvReader = new CsvReader(reader, CultureInfo.InvariantCulture);
csvReader.Context.RegisterClassMap<MovieRatingMap>();
csvReader.Read();
csvReader.ReadHeader();
// ^^^^^
// Open the reader and read the header
var records = new List<MovieRating>();
while (csvReader.Read())
// ^^^^^
// Read it by hand...
{
var name = csvReader.GetField<string>("Name");
var rating = csvReader.GetField("Rating");
// ^^^^^
// Read the field as string...
var parsedRating = !float.TryParse(rating, NumberStyles.Float, CultureInfo.InvariantCulture, out var parsed)
? default(float?)
: parsed;
// Parse it as needed...
records.Add(new MovieRating
{
Name = name,
Rating = parsedRating
});
}
Assert.AreEqual(2, records.Count);
var last = records.Last();
Assert.AreEqual("Titanic", last.Name);
Assert.IsNull(last.Rating);
// ^^^^^
// Look, ma! It's still null
}
A lot more work! We have full control, but it’s less clean.
In case you’re wondering, I asked Copilot about this but, with a straight face, it hallucinated suggesting a flag on CsvConfiguration, which didn’t even exist.
For scenarios like this, you still need strong debugging and code reading skills. I cover those skills and more in Street-Smart Coding—A roadmap with 30 lessons to help you code like a pro.
10 Apr 2026 #mondaylinks
Hey there.
Here are 4 links I thought were worth sharing this week:
#1. After a long wait, C# union types are here (10min). Well, in the next C# version. If you’re new to union types, I wrote this guide (9min) when Microsoft announced the feature.
#2. If you’re new to a codebase, run these Git commands (5min) before reading any code. Treat it like a crime scene: gather evidence before touching anything.
#3. When AI makes code and text free, the only skills left are taste and judgment (10min). I liked the exercise of “fails because.”
#4. Did you know that Jesus taught about prototyping with an LLM? Here’s his advice (3min).
And in case you missed it, not much about coding on my blog, but I wrote about the secret to surviving 30 years in one job (and to live a happy life) (3min).
(Bzzz…Radio voice) This email was brought to you by… Street-Smart Coding, 30 lessons to help you code like a pro. From Googling to clear communication, it shares the lessons to help you stand out in the age of AI.
See you next Friday with more links.
Keep coding smartly.
Cesar
08 Apr 2026 #writing
My first writing class shocked me.
Its main lesson was to write every day.
It was a webinar pitching a writing course.
But it made me revive my blog after abandoning it for months.
Since November 1st, 2024, I’ve been writing daily.
If I miss a day, I write two posts to recover the streak.
More than once I’ve thought I’d run out of ideas.
Writing daily makes you pay attention to the world.
You see the world through your writer’s glasses.
This is my favorite side effect.
As Robert Greene says, “it’s all material.”
A conversation could be a mini-story.
A failed delivery, a business lesson.
A visit to the grocery store, a life lesson.
Writing daily is a habit that has truly changed my life.