Forgot your password?
typodupeerror

Comment Re: Lack of math skills? (Score 1) 110

[invariant-heavy and proof-heavy guidance to the AI] How do you do that?

My main AGENTS.md has ten lines about the most important coding principles:

- Prefer functional-style code, where variables are immutable "const", there's almost no "if/else" branching branching, and most functions are side-effect free.
- Code should have comments, and functions should have docstrings. The best comments are ones that introduce invariants, or prove that invariants are being upheld, or indicate which invariants the code relies upon. ...

I am adamant about clean engineering. What I look for:
- Invariants are the best way to document all aspects of code. These include code invariants (stating what assumptions a function makes about shared data, and how it upholds them), and architecture invariants (for instance the main index.js never touches state except through component accessors). ...

You must document *meaning* of every field, and also enums and disjoint type fields.
- "Meaning" says briefly what the field/enum represents. From a well-written meaning, a smart reader will be able to deduce all the invariants around this field/enum, and deduce how it will be used in the code.
- It is hard work to distill a good meaning! You must put considerable effort into it. ...

The instruction on "meaning" ended up carrying a lot of weight to the AI. It adopted the habit of putting a comment on every single field and function that starts with the word "// Meaning: " and they're honestly, genuinely good ones! Single-line sentences on fields that carry a lot of good weight.

Separately, I have a LEARNINGS.md file which I have the AI auto-update every time it gets course corrected by me. Over the first two weeks there were a lot of course corrections, but now there are only a few a day. The file ended up carrying my senior engineer wisdom, more or less, the kind of things I normally mentor to junior developers on the team over several years. Here's an extract: https://gist.github.com/ljw100...

Comment Re: Lack of math skills? (Score 1) 110

My CS degree had a lot of theorem proofs in it, invariants, that kind of thing. I've always had the habit of aiming to prove my code correct under all possible circumstances. Usually not a formal proof, but using the same skeleton as a formal proof would.

It got me a job on the C# language design team (when I tried to prove an algorithm correct, couldn't, discovered a counter-proof that the runtime had a flaw).

As I mentor junior devs and review their code, I'm always telling them to reason about their invariants better and document them.

Now in the age of AI, I find that invariant-heavy and proof-heavy guidance to the AI ends up getting its work done quicker and higher quality. OpenAI mentioned the same thing in a blog post in February.

Sure, there are many paths to professional success and engineering excellence that don't involve this kind of CS heavy approach. But, there are many that do...

Comment Re:What's the benefit of Rust here though? (Score 2) 171

For existing code in the QA he said leave it be and it's better to fix.

For new code, he's recommending Rust and the advantage he talks about is that it makes the code more maintainable by people. And one thing that every AI coding talk I've seen agrees on is that what makes code more maintainable by people also helps AI and vice versa.

People and AI both have limited attention and memory. The less context necessary the easier it is to evaluate safety.

Another thing not in the summary he touches on is hardware safety. Not just software bugs but also compromised hardware which if your driver is memory safe can also prevent a buggy or adversarial piece of hardware since the hardware is effectively user input.

Comment Other quotes from talk. (Score 2) 171

To balance out OP's selective quoting to avoid people strawman-ing his argument as a fanatic who can't balance risk:

"No, we don't want [rust] rewrites, so unless you're the maintainer and owner of that file, just do it for new stuff. Leave existing C code alone, and let's evolve forward after that."

Now, that doesn't mean he thinks Rust is magic. It's not. He cited one of the first Rust components merged into the kernel: QR code display logic used when the kernel crashes. "That logic was written in Rust. Famously, it had a memory bug. It was given a buffer and its size, and the rest of the st code never checked the buffer size... Could scribble all over memory..."

Comment Re:Prices are sticky (Score 5, Informative) 103

Anyone expecting corporations to not try to make a profit and extract maximum value for their shareholders ignore that that's their fiduciary duty.

"this belief is utterly false. To quote the U.S. Supreme Court opinion in the recent Hobby Lobby case: 'Modern corporate law does not require for-profit corporations to pursue profit at the expense of everything else, and many do not.'"

https://www.nytimes.com/roomfo...

"We ... show that [the Shareholder Primacy Norm] is not a legal requirement, at least under the guise of shareholder value maximization. This is in contrast to the common assertion that managers are legally constrained from addressing corporate social responsibility issues if doing so would be inconsistent with the economic interests of shareholders."

https://papers.ssrn.com/sol3/p...

Comment Re:Conciousness isn't as mysterious as you thought (Score 1) 403

Dawkins is very likely right. I am also impressed at how human AI can seem, with all our faults of hallucinating, hiding our mistakes, and making stuff up, as well as the stuff we are proud of. But Dawkins and I both realise that we have no definition of 'intelligence' that will allow us to rule whether AI is intelligent. The Turing test has foundered because the early AI attempts were able to express ideas eloquently even when their 'intelligence' was questionable. It seems that AI has a talent for imitation and mimicry, which lets it convince us in a Turing test even when it shouldn't. Any adversarial training to get AI to distinguish between AI and us will also spawn a more convincing imitator. Where do we go from here? I find it entirely reasonable that AI executes the same sort of processes as our minds do, but proving equality rather than equivalence is going to be hard.

Comment Re:Huh? (Score 2) 22

> Am I the only one that can't imagine any possible value an AI assistant would bring to a game?

I use AI assistants lots when playing games!

At the moment it's Minecraft. I want to figure how to build something, e.g. a golem farm. I look for tutorials online but (1) they're all videos which I hate watching, (2) they're all hyper-specific and concrete, "place this block here then that block there", but what I want to understand are the foundational principles so I can know how to adapt the golem farm to my own purposes -- what are the mechanics, how do they spawn, how does water flow, what is the SOLUTION SPACE of possibilities.

Gemini AI has been really good at this kind of thing.

The other time is when I get stuck, or want advice on how to make a character build to achieve a certain end. Once again the online advice is typically in the form of "walkthroughs", do step 1 then step 2 then step 3, in other words just one possible way to play the game, and it's too easy to accidentally read too far and spoil the rest of it. I don't want that. I like the feeling of openness and possibilities. I again ask Gemini, and it gives me advice on just the particular bit I'm stuck on, and is better at showing for me the available options.

Slashdot Top Deals

Do not use the blue keys on this terminal.

Working...