John McBride (@johncodes) header
John McBride (@johncodes) profile picture

🌊 | Co-founder, CTO @papercompute | 🎤 Hosting @opensourceready | 🐹 maintaining spf13/cobra

Joined October 2018
Photo by John McBride (@johncodes)Photo by John McBride (@johncodes)Photo by John McBride (@johncodes)Photo by John McBride (@johncodes)Photo by John McBride (@johncodes)Photo by John McBride (@johncodes)Photo by John McBride (@johncodes)Photo by John McBride (@johncodes)Photo by John McBride (@johncodes)Photo by John McBride (@johncodes)
Here's my @Neovim plugin for the Goland language server: It uses the VSX bundled server and provides native LSP capabilities - excellent functionality from the @GoLandIDE team, glad this got a public release! Give it a try!! github.com/jpmcb/goland.nvim
1
1
13
651
Who do I know @GoLandIDE working on the public vscode/cursor intelligence server? I have a Neovim plugin working that I'd love to share and get blessed to publish open source.
1
3
524
Excited to share naja-go/naja, a modern, powerful, and robust CLI toolkit for Go 1.27+. This is a hard fork of spf13/cobra, spf13/pflag, and other ecosystem dependencies. For some time, I and many in the Go community, have known that a significant number of legacy Go projects are 1 bad "go get -u ./..." supply chain attack away from complete disaster. And, unfortunately, many of these projects go unmaintained in personal GitHub repos with little opportunity for modernization. For example, Cobra is still pegged to Go 1.15 and stuck in the "spf13" GitHub account. There's lots and lots of reasons for this, but it basically boils down to "no one wants to break anyone else's dependency chain" - so, instead, new/modern features in the language go unadopted and new patches stall out. Naja uses modern generics syntax while maintaining a familiar Cobra structure. I also aim to make it near zero dependency so no third-party code can accidentally pwn your CLI at its root. This hard fork is also an opportunity to remove ancient APIs like global "CommandLine" state in pflag or nasty package "init()" calls that are difficult to reason about. I'm taking all the lessons from maintaining Cobra over the last 5+ years and transforming it into the modern toolkit the Go community deserves - cheers. github.com/naja-go/naja
7
18
1
108
4,741
So what's changed? Many of the early changes in supported Go 1.27+ are in naja-go/gpflag: instead of dedicated typed-constructors, gpflag uses a modern generics syntax that can take any type (native and static) ``` f := gpflag.NewFlagSet( "server", gpflag.ContinueOnError ) port := f.NewP("port", "p", 8080, "listen port") ``` "New..." can dynamically infer the T from the constructor or be given a static type making the flexibility on typing flags very powerful. github.com/naja-go/gpflag
2
1
3
271
Here's a fun bit of Go trivia for y'all which I believe perfectly demonstrates how, despite the absolute power of AI, it still codes like a over-eager-junior engineer straight out of CS 201 writing completely unmaintainable code. This was generated with GPT 6.1-sol while working on some experimental flag stuff akin to spf13/pflag: A "Count" type is defined like so: ``` // Count is an integer flag that increments 1 // when used without an argument. // With an argument, increments that amount. type Count int ``` And in the following "Set" method, a "+1" sentinel increments the counter flag (this is basically straight out of spf13/pflag) ``` // Set increments the count for "+1" // or sets it to the parsed integer. func (c *Count) Set(s string) error { if s == "+1" { if *c == Count(int(^uint(0)>>1)) { return fmt.Errorf("count overflows int") } *c++ return nil } value, err := strconv.ParseInt(s, 0, strconv.IntSize) if err == nil { *c = Count(value) } return err } ``` This path guards integer overflow and immediately made me raise an eyebrow: ``` if *c == Count(int(^uint(0)>>1)) ``` Step by step: by taking a zero value uint, flipping all its bits to 1, shifting it to the right by 1 (effectively removing the signing bit), then casting it to a Count, finally checking if it's equal to the current count -- we can effectively check if the count is at the given system's maximum signed int value and should error to prevent an overflow. On a 64 bit system, this is 2^63−1 (a massive number). ... this is all good except the agent completely ignored Go's "math.MaxInt" (I wouldn't even consider this "modern Go" since it's been around since Go 1.17) -- the complexity can be drastically reduced by simply doing: ``` if *c == math.MaxInt ``` This compiles without a "Count(...)" cast since, under the hood, this is an untyped const in the math package (essentially exactly what this std lib const is for). The complexity in understanding a one liner bit shift vs. just using the standard library cannot be over stated: even for agents, I'd argue that this exits the domain of "easy to maintain with agents" and would require lots and lots of resources (on the GPT 5.x tokenizer, the first implementation is 13 tokens and the second is 7 !!! ) Software engineering has always been about correctly combating and harnessing complexity in language, semantics, abstraction, construction, and creative expression. Using LLM tools did not change that and there's a very compelling argument to be made for beautiful, elegant, and correct code that enables BOTH the engineer and the tools to work better.
2
3
37
2,688
Did you know that since Fedora 44, there's a native dnf Nix package and it can very easily be installed? ``` sudo dnf install nix sudo systemctl enable --now nix-daemon ``` and that's it: no nasty community Nix installer, no manual disk tweaking or symlinking, just deterministic, reproducible builds as God intended. Today, I run Fedora with this setup and a ~/.config/ flake that basically builds my whole system. It's the stability of Fedora with the ergonomics/determinism of a Nix flake!
Everything I do after a fresh Fedora 44 install, from DNF tweaks and RPM Fusion to NVIDIA drivers and Docker, plus the release-day gotchas I hit. techhut.tv/fedora-44-post-in…
1
5
441
Hard-skills in software engineering are cratering, compacting, and changing: it should come as no surprise that the Google SRE book, which was the bible to many practitioners in the industry, required a complete re-write in the agent era. BUT. I do believe that now, more than ever, first principles thinking matter: the real question is "how do you develop a first principles mindset?" when you're not hands on with code and infrastructure and operations daily
SRE has changed a lot in 10 years. We're kicking off a special 2-part series with the minds behind "Site Reliability Engineering, 2nd Edition"! 📖 Tune into Part 1 (Season 7, Episode 5) now! 🎧 sre.google/prodcast/#season7… google.smh.re/5ikY
18
129
1
1,729
101,010
Spicy-deluxe, powered by cloud native 🫡🫡🫡
This post about Chick-fil-A's K8s team always brings me joy.
1
3
340
Many of you saying the GPL “is anti-open source” need to wake up and take a history lesson: the GPL is maybe the greatest gift Stallman could have bestowed onto a free (as in freedom) society. Copy left prevents entities from taking open and free code, close sourcing it, and building proprietary software ontop of it. Copy left compels those entities selling/distributing products with GPL bits to also open source their code under GPL. Linux has been GPL for 30+ years and has led to an explosion in open and free distros, innovations, and cross-industry collaboration. MIT and Apache are free but have near zero restrictions: one could argue that code that is simple available to lift and shift is not free, it is pillageable. I commend the Asahi maintainers for making the difficult re-licensing decision which aligns their project much closer to how Linux distros are typically licensed. I commend them for standing up to bad actors laundering their code through LLMs, and obfuscating their work.
26
65
6
544
10,662
I urge all to read "No Silver Bullet - Essence and Accident in Software Engineering" by Brooks. TLDR: shrinking all the "accidental" complexities in software engineering (semantics, boilerplate, dep management, awkward syntax, composition of code and packages, etc.) does NOT reduce the "essence" of complexity. And often, out of accidental complexities emerge new essential complexities. Shrinking down all the accidental bits to zero does not inherently and instantly result in the core complexities disappearing: if so, with the convention of ergonomic languages like Python and Lua and TypeScript, or better tools like IaC, we would have seen leaps and bounds in software capabilities and productivity. But, what emerges and transforms, like a werewolf, is increasing essential complexities that are, at the heart of it all, bound to the domain of the software and abstractions of the real world. What happens when abstractions and ergonomics and new ways of working arrive is that the inherent complexity transforms and re-appears: > "The complexity of software is an essential property, not an accidental one. Hence descriptions of a software entity that abstract away its complexity often abstract away its essence." AI and agents have changed software development. But the hard essential bits in software remain (if not are 10x) - today, instead of focusing on syntax, focus on how to build stable, complex, interlocking systems where the complexity is well managed.
Replying to @thdxr
i think the confusion is the urge to have pre-ai style opinions on programming but the entire point here is a lot of these things stopped mattering because ai can deal with it either way
15
29
2
258
14,673
As a long time tmux and zellij user, I have to say, Rex is something special. Been playing with the beta over the weekend and I see the vision. It's finally realizing a unified workspace "control plane" for every machine, workstation, server, and workflow. It sort of seems like tmux's server/client model with ideas from vSphere and the ergonomics/utility of a really polished user experience. The rex admin CLI is superb, the lua SDK and configurations APIs are already great (and I can tell will lead to an awesome explosion in user utilities akin to nvim) The only thing I'm skeptical of is how this will be monetized: I could see this going south a 100 different ways and becoming rather predatory (pay-per remote rex server, pay-per connection/traffic over integrated tailscale net, pay-per "assets under management" akin to Hashicorp managed-terraform, etc. etc.) I'll be very curious to see how this evolves!
1
6
915
Never forget that, during the pandemic, Amazon saw INCREASED productivity, employee retention, and overall work satisfaction. Jassy went so far as to go on CNBC and say Amazon is a remote first employer and how great it is! It wasn’t until Seattle put the squeeze on Amazon’s office real estate that they completely reversed course which inevitably lead to incredible amounts of talent leaving, wild return to office mandates, and the company becoming a shell of itself. Remote work works.
Unlimited budget to visit a co-worker at turbopuffer.
11
12
245
34,174
Baby I’m a star ⭐️
8
1
43
1,935
While it’s not beefy enough to run Kubernetes, it can definitely talk to a cluster over a bridge! My quick and dirty @github universe badge project was to get a small dashboard with the Py kubernetes client sdks and read-only RBAC role on cluster to display cluster status. Fun stuff! 🐈🐙🚢
1
1
13
548
As a product, I find the nintendo music app so interesting: who pitched it? How'd it get funding? What user/market research lead to its development? Intuitively, you wouldn't think that a whole music streaming service of ONLY nintendo music would work - but it is actually excellent.
2
3
397
I love mono typefaces: they are the ideal way to read code, are easy on the eyes, and I've always felt they provide a certain retro/future-elegance. Currently, I am really enjoying Nordwand github.com/tywr/Nordwand-Mon…
1
308
Let’s be clear: AI-assisted cyber attacks are NOT an excuse for pure negligence. OpenCode’s security posture has always been terrible: let us not forget the baffling OpenCode cross-origin RCE vuln from last year that let anyone execute whatever code they wanted on a local OpenCode HTTP server! I have not recommended OpenCode since then and have watched in horror as the team has ignored open source requests to harden the service and make it more transparent. Security is very rarely a technical problem: in my experience, it’s almost entirely cultural. You CAN make your services ironclad: you just have to believe in putting the time and energy into actually doing it. Fool me once, shame on you. Fool me twice, shame on me.
9
8
72
6,636
You Can See Everything is a masterpiece: a re-reckoning of truth, Silicon Valley’s worst “fail fast” and “fake it till you make it” cultures. It examines the often perverse incentive-through-lines in business, entertainment, media, politics, and everything in between. The result? You leave questioning everything: questioning if you did in fact see everything.
7
613
If we don't invest, the talent pipeline will completely dry up one day.
ai can do a lot of what junior engineers are tasked to do if you're a small team, all you need is a senior engineer with a max or pro subscription if you're a large company, i argue that you have an obligation to help train the next generation of engineers with or without ai
23
4
1
295
16,905
cracking open your recently shipped ai slopped test suites
I woke up today and decided to read the code in the pull request
1
4
459
In the 80s and 90s, nuclear scientists faced a difficult question: how do we safely and humanly store nuclear waste that will be dangerous for thousands and thousands of years? How do we communicate something is dangerous and potentially catastrophic to a civilization 10,000 years in the future that may not have writing, language, or communication as we know it today? Some of my favorite ideas that emerged: * Create a religion that can last through time that understands the nuclear symbols are evil and dangerous. * Craft landscapes and structures (pictured) that are inherently hostile and a person would not want to enter. * Breed a special species of cats that "glow" around nuclear waste as a supernatural symbol to future societies that those areas should be avoided. This tailscale snippet is a great example of this but in code. I've seen other "supernatural" ways to encourage code authors/readers to avoid certain areas: obscure ASCII symbols, obfuscated, minified, and difficult to read code, large comment blocks with something like "DO NOT MODIFY" or "WE DO NOT UNDERSTAND THIS BLOCK-DO NOT CHANGE" But in the age of AI, how do we discourage AI agents from modifying or mutating especially dangerous or sensitive code?
Found something funny when reading Tailscale code. They use a Cyrillic letter "ж" (reads as "zh") for the variable which shouldn't be exposed to callers and mutated. This is an artificial barrier for human devs that should raise concerns when trying to type it. Apparently it looks like an asterisk meaning it's a pointer. But for me it's a familiar letter which I didn't expect to see in the code and was like Ж? WAT? Yeah, you can use unicode letters in Go code if you want. I now really want to use something like that in my code because I bet it'll make me smile every time I see it
1
4
507