The road to wisdom? Well, it's plain
And simple to express:
Err
and err
and err again,
but less
and less
and less.
The latest Applied Go Weekly Newsletter is here!
https://newsletter.appliedgo.net/archive/error/?utm_source=appliedgo-mastodon
[#]golang
https://newsletter.appliedgo.net/archive/error/?utm_source=appliedgo-mastodon
=> More informations about this toot | View the thread
Make it simple but not too simple
Strive for simplicity.
There are good reasons for this:
…but know that complex problems cannot have simple solutions.
Avoid like the plague: Building a complex (let alone complicated) solution for a simple problem.
=> More informations about this toot | View the thread
DeepSeek DOES tell you about Tiananmen Square... if you ask it to act as a neutral historian.
=> More informations about this toot | View the thread
=> More informations about this toot | View the thread
If you use DeepSeek, all your data is sent… TO CHINA! 🇨🇳 😱
You may or may not be concerned about this. After all, the Chinese are really nice people, and you have been buying a lot of hardware and software from Chinese companies already, didn't you? DIDN'T YOU?!
But everyone who is concerned about data privacy can use a simple solution: DeepSeek hosted on servers within your jurisdiction. The laws of your country (or conglomerate of countries) apply. If those laws are good, they protect your privacy rights well.
The DeepSeek model can run anywhere because it's open source. (Rule of thumb: Cool companies build open source products.) You can take that model and run it in a data center of your choice (or have the data center run it for you).
I gave Nebius AI Studio a try. Nebius is a company in the Netherlands that runs a long list of open source LLMs on their GPUs, including DeepSeek V3 and R1. I connected my Open WebUI instance to their DeepSeek V3 and R1 instances via an OpenAI-compatible protocol. So far, it runs like a charm.
Question to you: Which EU-based AI model hosting providers (preferably with pay-per-token billing) do you know/use/love?
(Nebius are the first I came across after a very exhau^W superficial search, but there are surely others as well. Not that I'd want to switch, though. Their service runs flawlessly.)
=> More informations about this toot | View the thread
"Self-documenting code or external code documentation" is a false dichotomy.
Both are indispensable, on different levels.
And in-between, there are code comments.
There is no either-or.
=> More informations about this toot | View the thread
Silent observation shouldn't affect the observed. Sometimes, however, you can' avoid to affect the object you observe. For example, to track a data structure across its lifetime, you'd need to hold a pointer to it. But an active pointer to an object prevents it from getting garbage collected.
A catch-22?
Say hello to weak pointers. More on this in the Spotlight section of the latest Applied Go Weekly Newsletter issue.
https://newsletter.appliedgo.net/archive/2025-01-26-a-weak-connection-is-still-a-connection/?utm_source=appliedgo-mastodon
[#]golang
=> More informations about this toot | View the thread
=> More informations about this toot | View the thread
ORM or plain SQL?
Er, no.
The question isn't: "ORM or plain SQL".
The question is: Do you know SQL well enough to use an ORM?
If you don't know how SQL (and relational databases in general) works and you choose to start with an ORM, then you'll be at the ORM's mercy. You'll be prone to writing an infamous "n+1 query", creating data redundancies, difficult-to-query data, and whatnot. Heck, I've seen 1:n relationships implemented as JSON blob columns.
To be clear, the ORM is not the culprit. It's the lack of understanding the fundamentals of relational databases that will have brought you there.
The question, "should I learn SQL or just pick an ORM?" is wrong in itself. Learn SQL, learn relational databases, and then you'll enjoy the freedom of choice. 💐
=> More informations about this toot | View the thread
Hey, mich würde mal interessieren, wie viele deutschsprachige Gopher eigentlich hier unterwegs sind!
[#]golang
=> More informations about this toot | View the thread
Keith Jarret's The Köln Concert album was released on Jan 24, 1975—50 years ago. (HT to Radio Bayern 2 who made me aware.)
That reminded me that I have stacked a few CDs from Keith Jarret when I was a bit younger.
Time to dig up some old memories... (Now playing: Tabarka, from the album My Song)
[#]jazz #memories
=> More informations about this toot | View the thread
BART and IIFE: Two Disparate Spotlights
Two new entries in appliegdo•net/spotlights:
The latest one, fresh from the newsletter:
BART, The Little Routing Table Package That Became Indispensable
https://appliedgo.net/spotlight/bart-routing-table/
And one from the attic:
Immediately Invoked Function Expressions
https://appliedgo.net/spotlight/immediately-invoked-function-expressions/
[#]golang
https://appliedgo.net/spotlight/bart-routing-table/
=> More informations about this toot | View the thread
Always be clear about the difference between "complex" and "complicated".
A complicated system has many moving parts, yet they work together in a well-defined way. A combustion engine or a compiler are examples of complex systems.
A complex system has many moving parts whose interactions are poorly defined or even unknown. Predicting the behavior of a complicated system can be impossible.(*)
Treat complex systems merely as complicated at your own peril.
Trivia
The Zen of Python includes these lines for a reason:
Simple is better than complex.
Complex is better than complicated.
(*) This being said, there is some irony in the fact that extra features on a timepiece are called "complications" and not something like "complexifications". (**)
(**) This fact has historical reasons. The term "complication" was coined by clockmakers before modern system theory created the distinction between "complex" and "complicated".
=> More informations about this toot | View the thread
=> More informations about this toot | View the thread
In Ulm's computing domain
Charly builds networks to reign
His tables and lists
Help firewalls persist
While packets flow smooth down the lane
The latest Applied Go Weekly Newsletter is here!
https://newsletter.appliedgo.net/archive/2025-01-19-everyones-favorite-route/?utm_source=appliedgo-mastodon
[#]golang
https://newsletter.appliedgo.net/archive/2025-01-19-everyones-favorite-route/?utm_source=appliedgo-mastodon
=> More informations about this toot | View the thread
"Debugging needs a debugger."
Nnnope.
Debugging starts way before starting a debugger.
To reduce bugs in your code:
Debugging isn't what you do with a debugger. Debugging is everything you do to eliminate undesired behavior in your code. The debugger is but one tool in a large arsenal of debugging tools and techniques.
=> More informations about this toot | View the thread
My little remote software stack
I am working on reducing my dependency on my laptop, or any local machine in general.
So far, this is the small stack of (open source) software I use:
One goal I pursue is data sovereignty, which is why you see no centralized service of the Big Ones listed.
Curious, what self-hosted software are you using for fun and profit?
=> More informations about this toot | View the thread
Two more spotlights are online:
Big Things Will Happen
https://appliedgo.net/spotlight/big-things-will-happen-2025/
How To Verify Struct Initialization For Completeness
https://appliedgo.net/spotlight/verify-struct-initialization-complete/
[#]golang
Enjoy reading!
https://appliedgo.net/spotlight/big-things-will-happen-2025/
=> More informations about this toot | View the thread
Clean up what the GC can't clean up
Gophers coming from OOP languages may occasionally miss a finalizer in Go. Fret no more: With the AddCleanup function, new in Go 1.24, you can close files, disconnect DB connections, and clean up other resources once the object containing these resources becomes unreachable.
Here is how it works:
If the object containing the resource becomes unreachable, hence due for garbage collection, the cleanup function is called.
A small but important caveat: The cleanup function must not refer to the object containing the resources. Otherwise, the object would always be referenced by reachable code and would never become subject to garbage collection; hence, the cleanup function would never run.
The example in the screenshot and in the playground is simplified as much as possible. The object is a temporary file, and the cleanup function removes the file from disk.
https://go.dev/play/p/05BWkHUHWZo?v=gotip
=> More informations about this toot | View the thread
A new Applied Go Weekly Newsletter issue is available:
https://newsletter.appliedgo.net/archive/2025-01-12-big-things-will-happen/
https://newsletter.appliedgo.net/archive/2025-01-12-big-things-will-happen/
=> More informations about this toot | View the thread
=> This profile without reblog | Go to christophberger@c.im account This content has been proxied by September (3851b).Proxy Information
text/gemini