13 Aug 2025 #coding
A Redditor recently asked for tips to become a better programmer here. The kind of tips we wish we had known when we started coding.
I’ve been taking a few courses here and there for c# as a side language I’m learning. Curious if you know something I don’t and have tips for making other newcomers a better programmer… Lmk what you wish you could have learned earlier thst would of helped you progress faster!
I already wrote about four career lessons here. But there’s a coding lesson before those four.
Don’t obsess over syntax and programming languages.
Coding isn’t about learning every feature of a language.
You don’t need a huge list of languages. With HTML/CSS/JavaScript, one backend language, and a good amount of SQL, you have enough to make your way through the coding world.
More important than syntax and languages is thinking in terms of the product we’re building. Are we building what users really need? How will they use our product?
That attitude will make you stand out in any team. It will save you from building the wrong features or optimizing for a scale you won’t have. And it will open doors to climb the corporate ladder faster.
The best programmers aren’t the ones who know every reserved keyword or quirk of a language, but those who know how to ask the right questions and figure out answers.
After 10+ years, I’ve learned that the more senior you become, the less it’s about code and the more about your communication skills.
12 Aug 2025 #misc
According to fortune.com, Starbucks in South Korea has forbidden their clients to bring desktop computers, printers, and “bulky items.”
After the COVID crisis, Starbucks isn’t just a place for coffee in South Korea, but for cheap coworking spaces.
It reminded me of a lesson from The Boron Letters. That’s a series of letters (turned into a book) he legendary copywriter Gary Halbert wrote to his son from prison. He taught that, to sell more hamburgers, you don’t need the best recipe or location, but a starving crowd.
Starbucks has a starving crowd. Their starving crowd is asking them not only for coffee but for something else. It’s time to pivot, not to forbid that starving crowd to be hungry.
11 Aug 2025 #misc
By the end of 2023, I had burned out.
I had tied my sense of purpose to my job while forgetting my health and hobbies. That took a toll on me.
To recover, I started with an information diet. No more mindless scrolling, Hacker News, or even music. Just talks from creators who have been through it. Borja Vilaseca was one of them.
Another inspiring figure was James Altucher. I read about his bankruptcies and how he bounced back. I started to follow one of his habits: doing something for my mind, body, and spirit. He calls it: The daily practice.
Since recovering, I’ve embraced a simple mantra: one day at a time.
No matter how tough the day is, trust God (or the Universe or Life) and rest. Tomorrow is a fresh start.
Stop time traveling. Because living in the past makes you resentful, and worrying about the future makes you anxious. Stay present.
10 Aug 2025 #misc
“Use your credit card only for emergencies.”
Sure, there are good intentions behind that tip. Credit cards have some of the highest interest rates on the market. And, like any debt, they’re a loaded gun. Treat them carefully or they’ll hurt you.
But for emergencies, taking on debt with a high interest rate isn’t a good idea. So how do you prepare for emergencies? With a financial cushion.
The Richest Man in Babylon taught me about a financial cushion. It’s one of the best money books I’ve read. “From every 10 coins you earn, keep 1 and spend the other 9.” That’s how I remember the lesson. That simple habit helped me survive a layoff and even afford a mini-retirement.
Use your credit cards like cash. If you can’t afford it, don’t swipe. Cards are a payment tool, not a source of money you don’t have.
09 Aug 2025 #csharp
Today, I found this Reddit question asking for the lower effort extension methods we’ve written.
And like any real C# programmer, I have my own set of extension methods to work with collections. But I ended up stealing one method from that thread: Choose()
. It applies a transformation to a list and only returns the resulting values different from null
.
It turns out, Choose()
comes from F#’s List
type. So my next step was to sneak into F#’s List
type and steal some of its methods.
Here they are,
public static IEnumerable<U> Choose<T, U>(this IEnumerable<T> source, Func<T, U?> selector)
where U : class
{
foreach (var elem in source)
{
var projection = selector(elem);
if (projection != null)
{
yield return projection;
}
}
}
public static U Pick<T, U>(this IEnumerable<T> source, Func<T, U?> selector)
where U : class
=> source.Choose(selector).First();
public static U? TryPick<T, U>(this IEnumerable<T> source, Func<T, U?> selector)
where U : class
=> source.Choose(selector).FirstOrDefault();
public static IEnumerable<T> Replicate<T>(this T source, int count)
{
for (int i = 0; i < count; i++)
yield return source;
}
public static IEnumerable<T> Singleton<T>(this T source)
{
yield return source;
}
And here’s a quick example of how to use them,
var movies = new Dictionary<int, string>
{
{ 1999, "The Matrix" },
{ 2000, "Gladiator" },
{ 2008, "The Dark Knight"},
{ 2003, "Freaky Friday"}
};
var years = [1995, 1997, 2010, 2003, 1999, 2000];
years.Choose(movies.GetValueOrDefault)
// "Freaky Friday", "The Matrix", "Gladiator"
years.Pick(movies.GetValueOrDefault)
// "Freaky Friday"