03 Mar 2026 #writing
This blog started as a coding notebook, but now it’s my small corner of the web.
I’ve changed what a post is. It used to be tutorials. I spent time designing covers with Canva and picking images from Unsplash. I wanted it to look like a “real” blog. Those days, around 2022, I shared my posts on LinkedIn to boost traffic and get attention.
But writing daily posts left no time for covers and images. To stay consistent, I simplified my approach and adopted some rules. I first shared them here and here, but now I’m updating them:
#1. Write short pieces. You don’t have to write breakdowns or 2,000-word posts. If it’s longer than a tweet, publish it. A good headline plus some sentences works. A 10-idea list works. Some random thoughts are worth publishing.
#2. Write reaction posts instead of comments.
#3. Make your urls easy to pronounce.
#4. If you miss a day, write two posts the next day.
#5. Use your posts multiple times. Repost them on another platform. Use them as book chapters. Share shorter versions on social media. You can steal from yourself.
01 Mar 2026 #writing
TV shows are a good writing classes.
These days, I binge-watched Slow Horses Season 5. Not that I’m a fan of spy shows.
After watching one of the first episodes, I noticed how good episode endings it has.
So I watched the rest of the season with my writer’s glasses on, here are some of the devices I noticed—No spoilers:
- Increasing tension in every episode. The enemy is using the same strategy the Brits used in them during the Cold War. Each episode follows one of the steps.
- Plot twist. The innocent turns out to be not that innocent.
- Ending episode with revelation. One episode ends without any dialog or action scene, but with a text message.
- Connecting elements. A box full of souvenirs and a tape recorders show up in screen, connecting the plot between episodes.
- The season ends connecting with the first episode. One of the protagonists makes a phone call, following up a conversation from the first episode.
- Make you hate a character. That’s not the villain, but a protagonist used as an “useful idiot.” You just hate it by the end of the season. Give characters some life.
More TV show breakdowns: Black Doves, Not Really on Purpose, and House M.D..
01 Mar 2026 #misc
For my February book experiment, I wanted to open each chapter with a powerful quote. Stealing from Mastery by Robert Greene.
But then I realized I didn’t have enough quotes. I needed at least ten. I didn’t want to Google or ChatGPT for quotes and get the same quotes every motivational post uses. It was too late to read or surf the web looking for quotes.
That’s when I wish I had been a quote collector.
I remember Austen Kleon, author of Steal Like an Artist and Show Your Work, who has a notebook for quotes and then he transcribe them.
I wish I had joined the notebook cult.
27 Feb 2026 #mondaylinks
Hey, there.
Here are 4 thought-provoking links I found this week. Plus my reflections after a week off social media.
#1. AI makes code cheaper, but cheap code means not understanding what you’re building. “Use AI or stay behind” shouldn’t be the real mantra. It should be rely on AI and get left behind (4min).
#2. College and bootcamps don’t teach the skills you need for real-world coding. That’s why I wrote Street-Smart Coding, by the way. This week, I found an updated version of The Missing Semester, a free course covering text editing, version control, agentic coding, and other skills nobody else teaches.
#3. Do you want to see a blue shield on your LinkedIn profile? Think twice after seeing all the data LinkedIn and friends collect to verify us (12min).
#4. Now with cheaper code it’s finally time to tackle the real bottlenecks (3min). And no, coding and typing were never the bottleneck.
I spent last week away from social media, and it turns out I’m another dopamine junkie (4min), even with mindful use and a timer. Arrggg!
(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 covers the lessons you don’t learn in tutorials. It’s now out on Kindle and paperback on Amazon.
Until next Friday. Keep coding smartly
Cesar
26 Feb 2026 #csharp #sql #bugoftheday
A subtle detail easy to forget when working with legacy applications that use stored procedures.
Stored procedures swallow long strings
If you’re inserting a long string into a shorter column, SQL Server truncates the parameters with no complaints,
USE Movies;
GO
CREATE TABLE Movies (
Id INT PRIMARY KEY IDENTITY(1,1),
Name NVARCHAR(10) NOT NULL /* <-- A 10 here */
);
GO
CREATE PROCEDURE InsertMovie
@Name NVARCHAR(10) /* <-- Notice the "10" here */
AS
BEGIN
INSERT INTO Movies (Name)
VALUES (@Name);
END;
GO
/* @Name is a NVARCHAR(10), but the value is longer than 10 */
EXEC InsertMovie @Name = 'ThisMovieNameIsWayTooLongForTheColumn';
GO
The stored procedure “swallowed” that long parameter. No complaints! But wait to see what Entity Framework does.
Entity Framework doesn’t validate or truncate
Now, if we try to do the same inside a unit test,
using Microsoft.EntityFrameworkCore;
namespace LookMaWhatEntityFrameworkDoes;
public class Movie
{
public int Id { get; set; }
public string Name { get; set; }
}
public class MovieContext : DbContext
{
public MovieContext(DbContextOptions<MovieContext> options) : base(options)
{
}
public DbSet<Movie> Movies { get; set; }
}
[TestClass]
public class MovieTests
{
[TestMethod]
public async Task TruncateItPlease()
{
const string connectionString = $"Server=(localdb)\\MSSQLLocalDB;Database=Movies;Trusted_Connection=True;";
var options = new DbContextOptionsBuilder<MovieContext>()
.UseSqlServer(connectionString)
.LogTo(Console.WriteLine)
.Options;
using (var context = new MovieContext(options))
{
context.Movies.Add(
new Movie
{
Name = "RememberThatNameInTheDBHasSize10"
}
);
context.SaveChanges();
// ^^^^^
// Test method LookMaWhatEntityFrameworkDoes.MovieTests.TruncateItPlease threw exception:
// Microsoft.Data.SqlClient.SqlException:
// String or binary data would be truncated in table 'Movies.dbo.Movies', column 'Name'. Truncated value: 'RememberTh'.
}
using (var context = new MovieContext(options))
{
var movies = context.Movies.ToList();
Assert.IsNotNull(movies);
}
}
}
Entity Framework Core blows in your face. At least, it tells you the table and column names, and the value being truncated.
Another subtle detail worth remembering. Et voilà!
Here’s another Entity Framework gotcha: Nullable foreign keys