Profile avatar
nicbarker.com
Open source developer & programming educator. github.com/nicbarker for my projects. https://www.youtube.com/@nicbarkeragain for programming videos. ex engineering @canva & game dev @cerebralfix
350 posts 418 followers 201 following
Regular Contributor
Active Commenter

I wonder how much total compute power has been spent over history skipping over the "." and ".." entries reported in every directory listing by the posix and windows APIs...

does anyone else's computer desk look like this at basically all times

It's funny how the word "edge case" has evolved from "the user submitted 10 million print jobs in one second" to basically mean anything that isn't the absolute happy path. "The edge case where the user needs to reset their password" brother please I'm begging you

In the interests of transparency and for other creators out there, I just spent 30-40 hours working on a video that didn't pan out. I just couldn't get the logical throughline to feel smooth. Have started it again from scratch and I think I've got it, it happens sometimes!

One of Clay's contributors has written a DOS compatible renderer for the Allegro library, and built this awesome replica of Encarta '95 as a showcase. Brings back great memories for me 🥲

Programming & concentrating for 4-8 hours straight isn’t a natural thing. The stamina takes practise to build up and maintain. I suspect by sprinkling meetings across our programmer’s work days, we’re actually causing those muscles to atrophy, which becomes self fulfilling.

The more experienced I get at programming, the more I feel that libraries having long lived, readable internal state is a mistake. The most reliable libs tend to be data in -> transform -> data out. So many problems stem from "our data got out of sync with the library's data"

If you do a lot of work with software that uses mouse + keyboard shortcuts (blender, final cut, logic, etc), I can't recommend enough rebinding your capslock key to backspace / delete. It takes time to get used to but it's magical not having to take your right hand off the mouse.

I've noticed people often describe their pivot from highly abstracted web / frameworks / engines etc into lower level programming as "freeing". I think that stems from realising that most of the rules about programming are just made up, and the machine is amazingly flexible.

I couldn't help but laugh out loud when I saw this info box on my stackoverflow profile page. It's perfectly ordered by least useful -> largest to most useful -> smallest. ✅𝑯𝑼𝑮𝑬 𝑻𝑰𝑪𝑲 𝐘𝐨𝐮'𝐯𝐞 𝐞𝐚𝐫𝐧𝐞𝐝 𝐚 𝐧𝐞𝐰 𝐩𝐫𝐢𝐯𝐢𝐥𝐞𝐠𝐞! ʏᴏᴜ ᴄᴀɴ ɴᴏᴡ ˢᵉᵉ ᵛᵒᵗᵉˢ

Amusing thing about web assembly - Address 0 is valid memory. So rather than a segfault equivalent when you access a null pointer, you just end up with garbage. Can lead to some fun debugging sessions...

Nothing makes you realise you don't understand something like trying to teach it to someone else 😅

When I'm assessing new projects that I'm interested in pursuing, I often use something I refer to as the "FUD factor". If reddit, hackernews, etc are full of people saying the idea is "impossible", "just use the existing solution" etc. It's often a sign of huge potential there.

I have a feeling there's a huge opportunity for people to build simple, high performance tooling for writing modern C - almost 100% of the tools I've seen are designed for C++ with C as an afterthought, which I suspect balloons the complexity by at least 10x, if not more.

Whenever I have a problem and someone tells me "oh, you can just use the freaky-friday algorithm to do that, here's a link to the research paper"

I'm thinking about making a video explaining how most recursive algorithms can be easily implemented iteratively using an array (motivation being I find them easier to debug and much less pressure on stack memory) Would anyone find this interesting?

This is a bit of a hail mary because it's so niche, but does anyone know why emmintrin.h for x64 SIMD intrinsics pulls in stdlib.h and malloc internally? The equiv arm_neon.h by contrast is self contained. I'm looking to bring SIMD into Clay but we don't link the std lib.

A subtle performance gremlin I've noticed in large codebases comes from abstraction hiding the fact that you're in a hot loop. It's easy for someone to jump in and modify FunctionThatUsedToBeFast here without even realising it's used in a loop:

Just finished up a new video, giving a primer on data structures and how they're implemented using arrays! youtu.be/KwBuV7YZido

For a few years, I've been trying to use less hyperbolic language - trying to catch myself saying "the best way to do this is..." and naturally defer to "a great way to do this is..." It's usually more accurate, and also gives your big claims more credibility when you do make them.

Such a joy stumbling onto a website that looks like this in the modern day!

I think one of the biggest points of confusion for newer C devs around malloc / manual memory management is the idea that you're supposed to free memory the _instant_ you're "done" with it. You can delay freeing memory for as long as you like, until it's convenient!

In addition to being one of the best television shows I’ve ever seen, the Severance workstations are just stunning, I would kill to have something like this as my daily driver

It took me a long time to understand that yes, doing things just because they're popular is stupid, but conversely, refusing to do things just because they're popular is just as stupid. You can love death metal & pop music, or Python & C. The heart wants what it wants.

Something I always try to point out in my educational material is when there are two terms / pieces of jargon that mean essential the same thing. So much of the new programmer's brain space is taken up by storing redundant / duplicated words and concepts.

Whenever I read modern lecture material and coursework from good computer science schools, it makes me realise that I would have learned so much more from my bachelor degree if I had worked as a programmer for 10 years before university. Feels like it's all backwards sometimes.

Having a lot of fun writing the script for this new video 😁