CLion’s Git integration offers “smart checkout”, i.e. what I’ve been asking for, for ages: It automatically does the stash/checkout/apply-stash dance for you.

What is Thor’s least favorite Kylie Minogue song?

I should be so Loki.

What I wasn’t aware of: C++’s

for (auto foo : collection) { … }

loops also work on arrays. Not on random pointers used as arrays though, just on the kind of arrays you could call sizeof() on to get the total size instead of size of a pointer.

Interesting usability dilemma: Unix has Ctrl+C in Terminal to abort. GUIs use Ctrl+C to copy. Write a Terminal app for a Unix GUI!

Ubuntu copies with Ctrl+Shift+C, which drives me nuts.

Thinking “if there is a prompt up, Ctrl+C means copy, if not, it means abort” would be nice.

Many know the story of the original “Dune” novel from the movie.

If that’s all you know, I recommend you watch the Scifi miniseries. Particularly “Children of Dune”. By the end of that 2nd miniseries, you’ll have an inkling of where the book series is going.

Such a deep story.

Are there any texts about the thread-safety in Objective-C’s class-loading? I’m kind of wondering how that is done, especially regarding loading a category from a dylib into an existing class. Same for +initialize and +load.

Is it just one huge “stop-the-world” lock?

@uliwitness in languages with the function keyword, "n foo" also tends to work pretty well!

I love peeks into big projects like this question on Stack Overflow:

You rarely get to be privy to thought processes like these.

Working on modernizing – have a separate daemon now with SMLoginItemSetEnabled() … but how do I communicate with it? Is there a way to create my own XPC service from it?

There’s a totally crazy and charming game called “Stick Fight” wherer you are one of several colorful stick figures that try to kill each other XD

Recently wishing a lot that traditional C/C++ headers didn’t “leak” symbols and includes that they use. But at least I have a build tester to let me know when I forget an include that is only implicit with another header on macOS, but not leaked e.g. on Linux.

You can really have some fun in Spider-Man stealthing: (be sure to un-mute)

That’s Mel from by the way.

Another neat large codebase navigation trick: pause the app in the debugger when whatever you’re interested in is onscreen or running, look at the backtrace to find out the class names.

In iOS/macOS apps: Use the UI debugger, it will show you the names of all view controllers.

As a full-time programmer for > 12 years, my favorite trick is still using search to navigate large codebases:

Search for a function name you remember vaguely, then in results:

foo() <— no semicolon! Implementation!

In C++, search for ::foo often works, too.

Uli’s rule of UI design: never leave an empty list view, table view or other pane empty: Put instructions in it what the user can do to fill it, or at least a line of text what it lists (“no servers”, “no videos” etc.).

Uli’s rule of API design: If you provide a userData parameter/property (refCon, userContext, whatever you call it) do not use it yourself for anything. Add a second internalRefCon if you must.

Show more
Mastodon for Tech Folks

This Mastodon instance is for people interested in technology. Discussions aren't limited to technology, because tech folks shouldn't be limited to technology either!

We adhere to an adapted version of the TootCat Code of Conduct and follow the Toot Café list of blocked instances. Ash is the admin and is supported by Fuzzface as a moderator.

Hosting costs are largely covered by our generous supporters on Patreon – thanks for all the help!