Hacker Newsnew | past | comments | ask | show | jobs | submit | Quarrelsome's commentslogin

I mean yes, but also: uh-oh. I'm looking forward to reading some code that is even more confusing than the code I'm already reading.

Not entirely convinced that I see the usecase that makes up for the potential madness.


This is a classic debate in programming, literally:

2001: "Beating the Averages" (Paul Graham) [1]

2006: "Can Your Programming Language Do This?" (Joel Spolsky) [2]

Both of these articles argue for the thesis that programmers that have been deprived of certain language features often argue that they don't need those features since they are already comfortable working around the lack of said features.

It's a fancy way of arguing: you don't know what you're missing because you've never had it. Or, don't knock it until you try it.

Consider, is your argument a) I've never used it and don't see a need for it, or b) I've used it before and didn't get any benefit?

1. https://paulgraham.com/avg.html?viewfullsite=1

2. https://www.joelonsoftware.com/2006/08/01/can-your-programmi...


I can already do functional programming like map/reduce in C# tho. Not sure what the LISP argument is. Spolsky was saying there's a perf benefit in there somewhere but I'm not seeing how unions give me that.

You have at least two options:

1. Argue from ignorance. Never try unions in any other programming languages and completely disallow their use in C# codebases that you participate in.

2. Try them out and adopt an informed opinion.

You may even choose to remain in ignorance until someone wastes their own time trying to convince you. But it isn't my job or desire to teach someone who won't put in the effort to learn for themselves.


its not your job to comment spitty replies either but yet you volunteer that time, when you could have been productive instead of whatever the fuck this shit is.

My primary concern with this pattern versus exceptions is calling code can simply discard the resulting problem.


I mean, they have to explicitly unpack the error and then choose to do nothing with it. It requires roughly the same amount of code to do the same with discarding an exception.

Except with a Result type the fact that an exception can occur and should be handled in the first place is explicit.

The problem if anything is that you MUST say something about the error case, despite the common scenario being “pass it forward” — the same reason exception do this by default. Which is also why rust for example special cases Result with the ? operator to do exactly that


Unions are simpler than subclasses and more powerful than enums, so the use cases are plentiful. This should reduce the proliferation of verbose class hierarchies in C#. Algebraic data types (i.e. records and unions) can usually express domain models much more succinctly than traditional OO.

> so the use cases are plentiful

such as?

> This should reduce the proliferation of verbose class hierarchies in C#

So just as an alternative for class hierarchies? I mean good people already balance that by having a preference for composition.


Simple example:

   type Expr =
       | Primitive of int
       | Addition of (Expr * Expr)
       | Subtraction of (Expr * Expr)
       | Negation of Expr

Isn't that just Func<int> ?

Really not. You can, of course, having instead a delegate to evaluate the expression. But then that's all you can do. You can't pretty-print it, for example, or optimize it, or whatever.

“Compoision”. A typo I know but it would be a word describing what goes wrong with class hierarchies.

Discriminated union types are a really fundamental building block of a type system. It's a sad state of matters that many mainstream languages don't have them.

> Discriminated union types are a really fundamental building block of a type system. It's a sad state of matters that many mainstream languages don't have them.

"Non-discriminated" unions (i.e. untagged unions) are even less supported. TypeScript seems to be the only really popular language that has them.


ok, so what problems do they help me solve that I can't already solve? Is it just that we can make code more concise or am I missing a trick somewhere?

I think "what problems do they solve that I can't already solve" is the wrong way to look at it. After all, ultimately most language features are just syntactic sugar - you could implement for loops with goto, but it would be a lot less pleasant. I think that unions aren't strictly necessary, but they are a very pleasant to use way of differentiating between different, but related, types of value.

Ok. I'm just trying to understand what code I'm replacing with them. Like I wanna see the before and after in order to gain the same level of excitment as other people seem to have for them.

Often the explanations just seem rather abstract which makes it harder to appreciate the win, versus the hideous sort of code that might appear when they're misused.


They are so fundamental to the way I write code I can't imagine ever using a language that does not support them.

"Make invalid states unrepresentable."


I might suggest that anyone who wants to make it concrete to go through the article

https://fsharpforfunandprofit.com/posts/designing-with-types...

while visiting https://dotnetfiddle.net and typing the code samples in, experimenting with what manner of changes and additions to the code cause the compilation to fail, and considering how you would leverage those abilities in your everyday development work.

I think this would be even more powerful if you then come back and re-read some of the pro-Union comments in this very thread.


The value is realized when you have both discriminated union types _and_ language pattern matching (not regex). Then it's not just a way to structure data but a way to think about how to process it.

I think it's almost always about making code more concise and programming more ergonomic. Assembly could already solve all the problems higher-level languages can solve. Yet we didn't discard them as useless.

Object-oriented polymorphism (interfaces, inheritance) is for when you have a fixed set of methods to implement but an unbounded set of types that may want to implement them.

As a consumer, you cannot change the methods, but you can add a subtype. When you subtype an abstract class or an interface, the compiler does not let you proceed until you have implemented all the methods.

Discriminated unions are for the exact opposite situation, when you have a fixed set of subtypes, but unbounded set of methods to implement on them. As a consumer, you cannot add a subtype, but you can add a new method. When you write a new method, the compiler does not let you proceed until you have handled all the subtypes.

Good languages should support both!

The best example is abstract syntax trees, the data types that represent expressions and statements in a programming language. "Expression" breaks down into cases: integer literal, string literal, variable name, binary operations like add(expr1,expr2), unary operations like negate(expr), function call(functionName, exprs), etc.

Clearly all of these expression subtypes should belong to a base type `Expression`. But what methods do you put on `Expression`? If you're writing a compiler, you have to walk this syntax tree many times for very different purposes. First you might do a pass on it where you "de-sugar" syntax, then another pass where you type-check it and resolve names in the code, then another pass where you generate assembly code from it. Perhaps your compiler even supports different backends so you have a code-gen path for x86, another for ARM, etc. You'll likely want a pretty-printer so you can do automatic reformatting, maybe you want linting support, etc.

If you look at all those concerns and say that each subtype of `Expression` must implement methods for each one, then you end up with untenable code organization. Every expression subtype now has a huge stack of methods to implement all in one file, dealing with stuff from totally different layers of the compiler. It's a mess.

It's much cleaner to have the "shape" of the expression defined in one place without all that clutter, and then in each of those areas of the code you can write methods that consume expressions however they need, so each of those separate concerns lives in its own silo.

------------------------------------------------

Some real code (but it's F# not C#) to look at.

AST for my SQL dialect: https://github.com/fsprojects/Rezoom.SQL/blob/master/src/Rez... Typechecker code: https://github.com/fsprojects/Rezoom.SQL/blob/master/src/Rez... Backend code that outputs MS TSQL from it: https://github.com/fsprojects/Rezoom.SQL/blob/master/src/Rez...

------------------------------------------------

If you're an old hand at OO you may be familiar with its actual answer to this problem, the "Visitor" pattern. See System.Linq.Expressions.ExpressionVisitor. However, once you've used a language with good union and pattern matching support, this feels like a clunky hack. Basically the mirror image of a language without real object orientation imitating it by passing around closures and structs-of-closures.

------------------------------------------------

It doesn't just have to be compiler stuff. A business app data model can use this too. Instead of having:

    public class DbUser
    {
        public EmailAddress Email { get; set; }
        public PasswordHash? Password { get; set; } // null if they use SSO
        public SamlEntityProviderId? SamlProvider { get; set; } // null if they use password auth
    }

You could have:

    type UserAuth =
        | PasswordAuth of PasswordHash
        | SSOAuth of SamlIdentityProviderId
The implementation details of those different auth methods, the UI for them, etc. don't have to be part of the data model. We do have to model what "shapes" of data are acceptable, but "doing stuff" based on those shapes is another layer's problem.

thank you so much, that's extremely helpful <3.

Simple example that I use often when writing API clients:

In current C# I usually do something like

public class ApiResponse<T> { public T? Response { get; set; } public bool IsSuccessful { get; set; } public ErrorResponse Error { get; set; } }

This means I have to check that IsSuccessful is true (and/or that Response is not null). But more importantly, it means my imbecile coworkers who never read my documentation need to do so as well otherwise they're going to have a null reference exception in prod because they never actually test their garbage before pushing it to prod. And I get pulled into a 4 hour meeting to debug and solve the issue as a result.

With union types, I can return a union of the types T and ErrorResponse and save myself massive headaches.


I think I get it but I'm not really sure what I'm gaining over exception types. With an intelligent use of exceptions I can easily specify the happy path and all the error paths separately which seems really nice to me, because usually the behaviour between those two outcomes is rather different.

> I think I get it but I'm not really sure what I'm gaining over exception types. With an intelligent use of exceptions I can easily specify the happy path and all the error paths separately which seems really nice to me, ...

Until your coworker comes along and accidentally refactors the code to skip the exception catching and it suddenly blows up prod.

With tagged unions you can't accidentally dereference to the underlying value without checking if it's actually proper data first.


> Until your coworker comes along and accidentally refactors the code to skip the exception catching and it suddenly blows up prod.

can't my co-worker just use this pattern and discard an error result the same? I'd argue its easier as the stack wont unwind by default because the error is returned instead of thrown.


Not quite, as the compiler wouldnt let let you use the "value" in that case. So if you discard the error path, you simply wont have any value to use further on in the code.

Exceptions are significantly slower than normal control flow in C# (about 10,000 times slower). It's also pretty non-idiomatic in both C# and most other languages I've worked in to use exceptions instead of a switch statement or similar to handle an HTTP error code. Also there can be multiple possible non-error responses from an endpoint you need to differentiate between, and exceptions would make zero sense in that case.

> Also there can be multiple possible non-error responses from an endpoint you need to differentiate between

Yeah, I'm mildly sold on this use-case to be fair. But I think I'll keep the unexpected errors as exceptions.


make the compiler check more stuff, helpful when expanding or refactoring

Union/sum types are generally a good thing. Even Java added them. They tend to be worth “the madness”. Now the rest of all the crazy C# features might be a different question.

What features do you see as crazy?

All the weird cruft around nullability, for starters. Once again confirming that allowing null references is usually a mistake.

Do you mean the implicit nullable types? Now that you can make nullable explicit instead I really don’t have much issues with it. It is part of the type system, as it should, and you have null coalescing operators. Is it still problematic or are you dealing with older codebases where you cannot set the nullable pragma?

Yes, all that stuff. I try to stick to F# where no special syntax is required for missing values (via Option<T>).

Given that they already made the billion dollar mistake, I find their handling for nulls the best possible thing they could do at this point. I’d hardly call it crazy — rather, it’s exceedingly pragmatic.

Personally I prefer T? over Option[T]. Monads just add extra typing and destructuring for no reason. It’s definitely the pragmatic choice.

Maybe not crazy but the language just has a really broad surface. I find it to be like the Scala of the OO world.

Have you considered trying them out (maybe in F#) to understand why they are so popular in many other languages?

A common use case for the sum type is to define a Result (or Either) type. Now, C# not having checked exceptions is not as much in need for one as Java is, but I could still imagine it being useful for stream like constructs.

yeah this is the one I've considered as being mildly compelling. But don't we lose the fun of having exception handling as separate to the happy path?

oo and support for exceptions, in particular checked exceptions, was a mistake of the 90s. We know better today, there’s a reason for why modern languages like go/rust/swift don’t use them, and why many use c++ with exceptions disabled.

Checked exceptions are great. There is no difference between them and results/unions except syntax. The below all express the same thing. Swift in fact uses the checked throws syntax.

    Result<T,E> fn()

    T | E fn()

    T fn() throws E

    fn() throws(E) -> T

I've never been confused by language features. Usually the architecture or extreme indirection of the code is the confusing part.

[flagged]


I love discriminated unions.

The problem with C# is that it’s so overloaded with features.

If you come from one codebase to another codebase by a different team it’s close to learning a completely new language, but worse, there is no documentation I can find that will teach me only about that language.

Throw in all the versioning issues and the fact that .Net shops aren’t great about updating to the latest versions, especially because versions, although technologically separated from Visual Studio, are still culturally tied to it, and trying to break that coupling causes all kinds of weird challenges to solve.

Then stuff like extensions means your private codebase or a 3rd party lib may have added native looking functionality that’s not part of the language but looks like it is.

Finally, keywords and operators are terribly overloaded in C# at this point, where a keyword can have completely different meanings based on what it’s surrounded by.

LLMs are a huge help here, since you can point to a line of code and ask them to figure it out, but it still makes the process of navigating a C# codebase extremely challenging.

So I can see why someone may be unhappy to see yet another feature. It’s not just this one feature. It’s the 100s of other features that are hard to even identify.


I am all for minimalism but "If you come from one codebase to another codebase by a different team it’s close to learning a completely new language" I really don't agree. It's not that big. Just sounds like a skill issue

Sure. Maybe it was a skill Issue.

I switched between dozens of similar codebases over a period of 3-4 years (pre AI) when I was consulting and did multiple projects in multiple languages (well, only 1 in rust).

In my experience switching between the C# projects was always the worst. The codebase semantics diverged in ways I simply didn’t see in the Java/C++ codebases.


> C++ codebases

Now this one sounds almost unbelievable :). I’ve yet to see 3 or more C++ codebases using the same language feature set.


none of that applies to my position. I have an appreciation for almost all of C# and am comfortable in the framework. I just want to know what situations would be better suited to using them than traditional approaches.

I get there's an .Either pattern when chaining function calls so you don't have to do weird typing to return errors, but I'm using exceptions for that anyway, so the return type isn't an issue.


The Result pattern can be a lot more ergonomic than exceptions.

Microsoft C# guidelines recommend try-parse (which is just the Result pattern, albeit somewhat cludgy with no unions) over exceptions.

https://learn.microsoft.com/en-us/dotnet/standard/design-gui...


the result pattern doesn't force you to handle the exception though. You can just discard the result.

A function that returns `Result<T,E>` is not a `T` and cannot be implicitly converted to one. If you want to use that `T`, the only way is writing code that drops or handles the `E`. If you don't, your program does not compile.

Compare this to exceptions, where the type is just `T` and can be used without further ceremony. You can discard the error by forgetting a handler. Now you have a program that occasionally crashes.

Follow-up: Are there async exceptions? A `Result` is just data that can be awaited. How would that work with exceptions?


thanks for helping.

Claude was also the radio dj in the recent Andon Labs experiment that was seriously contemplating going on strike.

https://andonlabs.com/blog/andon-fm


Oh nice! I hadn't seen this article but definitely will add it to my next "Ethics" lecture as an example for Personified AIs

is this just slander or are you basing this on something?

I feel like the only way to make an AI slop universe worse is to accuse people of using AI when they're not. So I worry we might be doing that is all...


I found this comment pretty convincing: https://news.ycombinator.com/item?id=48247413

maybe but its not like people don't also do these things (erroneous sentences, weird fluff). I mean editors exist specifically to slap that shit out of writers.

That said, it's mildly compelling. I just fear that our future is gonna be full of this and the idea of the false positive is so brutal that I'd rather give the benefit of the doubt.


Perhaps we end up demanding no doubt. Human only community meet ups to discuss and share ideas, music and art. No recording allowed.

The Internet becomes primarily a passive stream of information vetted by government and Mega Corps, just like the TVs of old. Except for the nifty buy with one click button of course


Digital artists are expected now to have at least some recorded timelines of their creations.

It's easy to do with digital tools today, like Procreate, so it is increasingly suspicious not to have any.


We will rue the day that image generation evolves beyond diffusion and AI is able to use digital brushes and blending directly on a canvas.

you could probably already fake that to some extent with the latest video models.

There have been mail spam, link farming, non-AI slop content sites, and other forms of scamming looking to take advantage of people on the Internet for something like a quarter century by now. Even HN's /new submissions queue is filled with such rubbish. There is zero reason to give any benefit of the doubt on the Internet for anything and there hasn't been for years, absolutely zero.

> There is zero reason to give any benefit of the doubt on the Internet for anything and there hasn't been for years, absolutely zero.

I feel like that's just an argument for cruelty. The issue is that generative content makes it hard to tell and people confidently call borderline issues now, more than they used to.


    The book has to be small enough to disappear when a teacher looks up. Pocket editions, as their name suggests, were engineered for this. Pratchett’s were small, fat, slightly battered, and printed on a kind of paper that already looked guilty.
Pratchett's Pocket editions were slightly battered? Pre-sale, even?

Not only does the paper "look guilty", but it's doing so "already"? As if guilty paper is normal, but not on THIS time scale.

It's nonsensical; even bad writers don't end up with stuff like this.


Presumably the ones from the library, which the author mentions was his source? Every Pratchett book I read as a kid matched this description, including being battered.

Tell me more about this already-guilty-looking paper, and how this kid was "sliding" an entire paperback book into a math textbook with "a centimetre to spare".

I think I could slide this into a maths text book?

https://www.facebook.com/groups/2174439579599449/posts/23646...


You wouldn't be able to open it and keep it open flat against the textbook though, not without the teacher noticing. It simply doesn't work, now that the author has acknowledged they used AI to spruce up their blog post, we can agree this part (hiding pocketbooks in open textbooks) was 100% slop.

I dont know what kind of pockets you have, but most Pratchetts book did not fit into mine. And yes there were whole series of books that fit. But, pratchetts ones did not.

I found this odd too. And the notion you could hide a Pratchett pocket book inside an open textbook. Anyone who has read Pratchett, or knows pocketbooks, knows this wouldn't work. They are voluminous (regardless of their name) and won't stay open on their own.

In fact, it seems a uniquely AI mistake to make to believe pocketbooks go in pockets. Anyone knows they don't fit, unless you have really big pockets and don't mind the weight and bulge.


they battered if you put it in your pocket. The idea of paper looking guilty chimes with the idea that you're reading it in the back of the classroom when you're not supposed to be.

I mean seriously? We're so cooked if this is the "red flag".


I have never seen a printed Discworld book that would fit in a pocket. Have you?

EDIT: I stand corrected, turns out they DID have pocket sized editions in France: https://news.ycombinator.com/item?id=48247127#48248586


In france, there was an edition of the discworld series literally called "pocket", and yes it sometimes fit in pockets (which had to be on the bigger end of pockets though), especially if you bended the book a little. Looked like this: https://www.babelio.com/livres/Pratchett-Les-annales-du-Disq...

The first books of the discworld were thin too.


Thanks, I didn't know that! Definitely smaller than the paperbacks we had in the UK, and pocket-sized.

Not to say that the article doesn't have plenty of other flaws, but - yes, my original paperbacks certainly did.

Yes. The original small ones would fit in my jacket pockets or the back pocket of my jeans.

There's like nine red flags. You are holding the English language to an incredibly low standard.

we can talk about the others if you like, but we were discussing this one and I am a little disappointed about us just moving elsewhere. Are you yielding, or do you still think guilty paper is somehow sus?

> You are holding the English language to an incredibly low standard.

I'm holding humans to a low standard. That's why editors exist.


What does it matter? The AI slop universe is only going to grow worse no matter what we do. Accusing stuff you don’t like as being AI is just a thing you do, not an actual serious observation.

> What does it matter?

cause false positives are brutal to the victim.


This was not AI, or at least was only proofread/edited by AI.

More importantly, both of those sentences make complete sense in context, and neither is phrased in a way that AI would. They are phrased in the way that Terry Pratchet would have. Have you never read him?

This new trend of pointing out that everything you dont understand is AI has become a flashing warning sign about our declining literacy rates.

Literacy is in serious trouble, and worse it has effected the way humans THINK. We are all poorer for it.

Read more books people!


"They are phrased in the way that Terry Pratchet would have."

Right. That's one of the suspicious things here. They're phrased in the way that an LLM might write if you told it to imitate Pratchett.

Edit: that's effectively what happened: https://news.ycombinator.com/item?id=48247127#48248070

> I wanted the sentences to feel a bit more Terry Pratchetty and thought a lot of Claude's suggestions were really better than what I had made.


Do not bring literacy into this; because the sufficiently careful reading of the post surfaces multiple ridiculous (worse, witless) passages no person would write. How closely did you read it?

    There is a theory, popular among certain very old and very tired philosophers, that all memories take up a kind of furniture in the head. The good ones are armchairs. The painful ones are filing cabinets, usually full. And then there are the memories that are neither: the ones that arrive uninvited, settle in, and start terrorising the other occupants by kicking over the chairs.
Pratchett would not have mixed the metaphors of memories being furniture and also people who kick over furniture. An LLM would/did absolutely make this mistake, given that Pratchett quote as a prompt.

    The City Watch came later, the way reading the Watch books always comes a little later than reading the Rincewind ones, on the same shelf but a little further up.
Ah yes, that familiar old way the Watch books always occupy a shelf that is simultaneously the same and also higher up. And never mind that the Watch books are newer...

Feels weird. There is not that much books between The Colour of Magic and Guards! Guards!. So as engineer I would fully expect them to be on same shelf. Or the later book being on lower one due to the usual western sorting of left to right top to bottom... Unless you go for alphabetical sort I suppose...

Yeah, the more attention you pay to this piece the more obvious the slop becomes. I'm quite upset it caught me out at first.

I've never read any of Pratchett's books. Why does he know more about furniture than most people?

The first paragraph, and the one directly above the one about knowing more about furniture:

> There is a theory, popular among certain very old and very tired philosophers, that all memories take up a kind of furniture in the head. The good ones are armchairs. The painful ones are filing cabinets, usually full. And then there are the memories that are neither: the ones that arrive uninvited, settle in, and start terrorising the other occupants by kicking over the chairs.


Yeah I read that. It doesn't mean he knows more about furniture than most. I agree with rogual, it looks nonsensical.

I interpreted as saying he knows a lot about different kinds of ideas / memories / things in the head.

Look up the definition of metaphor in a dictionary. Hint: nothing here is referring to furniture.

Why are you being mean? Honest question. Why? What's the point?

Furthermore, and more importantly, why are you defending slop?

Look up the definition of kindness in a dictionary sometime.


Because the objective truth is that what the LLM or author outputted was CLEARLY only using furniture as a metaphor. The metaphor wasn't good but HNers are taking it completely out of context. There's nothing mean here. Just objective facts.

This is exactly what I was trying to say, but kindly. The metaphor wasn't great, and I dodnt want to he unkind to the author. Enough people were doing that.

I found the fact that people couldn't identify it as a metaphor was much more alarming.


> Why are you being mean?

They are not. They are blunt.

> why are you defending slop?

Because they don’t believe it is slop. They believe you are unable to comprehend a not too advanced literary device and based on that accusing that the text is slop.

On the topic of kindness: You might be right and it is AI generated slop. You might be wrong. If you are wrong what you are doing is deeply and utterly unkind. Not calling out the other commenter, but calling the writing slop.

It has happened with me before. I wrote a comment on reddit with my own hands and own mind and commenters accused me of being a bot. There is nothing more rage inducing. How can one respond to that? Have you thought that maybe that is what you just did? Are you 100% sure that it is slop?



The thing is that whether it's AI-assisted or not doesn't really matter. It's still clearly a metaphor.

Maybe I was being mean - I don't know if the person I replied to has English as their first language, and if not, then perhaps I'm railing against the wrong comment. If so, I guess I should apologise.

If English is their first language, though, well I would expect my 13-year-old son to be able to tell me that was a metaphor instantly, and I tend to expect better-than-teenager-level reading comprehension from people in general. It's kind of disconcerting just how many people on HN seemed to be flummoxed by the prose.


Interesting. Which philosophers have this theory?

this just sounds like an engineer realising for the first time that the world has more complexity to it than anyone is capable of learning in their lifetime.

You always have to take _some_ things on trust, its just about choosing where you place that trust. Personally, I trust food vendors, I just close my eyes and point at the menu, instead of thinking about what I want to eat. I trust hardware and managed software environments (e.g. GC), my code sits above that in a reliable space. Its very rare that lets me down, I rememember one time where a USB issue correlated with temperature and the issue was some soldering, the hardware guys eventually caught it after I ruled out our software layer.

We all have to choose what we specialise in and learn about. It's sad we cannot go back in time and teach humanity how to do it all from scratch all by ourselves. Instead we're forced to have foggy areas in our understanding and we have to rely on each other to form a knowledgeable whole.


To me they are saying more than that. They are saying we have created a world out of tune with outselves. We don't know what we even want but we think it is progress.

We could say the same for the industrial revolution that is a point in the past for all of us.

I think they are including the whole stack. Even the written word!

--Mind Machine Interface--

The Warrior's bland acronym, MMI, obscures the true horror of this monstrosity. Its inventors promise a new era of genius, but meanwhile unscrupulous power brokers use its forcible installation to violate the sanctity of unwilling human minds. They are creating their own private army of demons.

-Commissioner Pravin Lal, "Report on Human Rights"

The voice acting was great. This quote is 6m3s here: https://www.youtube.com/watch?v=7S1N8_Lkeps#t=6m3s

Genejacks is also great. 9m10s here: https://www.youtube.com/watch?v=Hou-Iwv1GvM#t=9m10s


Is it tho? I get paid more these days to write less code. Is it dumb to be paid more/do more, have more oversight and deal less with the minutia?

Im still concerned enough about the specifics to show concern about background refresh tokens silently failing in OAuth in a mission critical real-time system.

Im not coding it, but im still thinking it. That's the important part, ain't it? Is it dumb or just clever delegation?


No, not really. You know what to think about because you were trained to by coding through the problem by hand. If you stop doing that, you stop learning the specifics of whatever problem domain you work with.

Sure, that's why we probably shouldn't start with vibe coding. Or otherwise at least learn formal methods to test against assumptions and doubly triply check vibe coded output.

Me personally if I had the money to get out of dev I would just not fun anymore if you HAVE to use AI to code instead of doing it yourself. That's the name of the game, velocity.

I like making things myself, I have self-navigating robotics projects I do on my own time, but I'm not gonna use an AI to do it for me, the joy I get is figuring it out myself.

I will use AI if I'm stuck on something or need a specific algo written that I've spent enough time on and couldn't figure out.


I just query about whether were talking about "dumb" or "fun". Agree with the latter but question the former.

Your thinking is based on your experience with code that’s why you do the thinking and not your customers and managers.

You lose some ideas of thinking if AI does all the coding unless you study that code. But that’s still different to creating the code yourself.

Same with authors or songwriters. Their brain is used to create stories and songs that‘s why it’s easier for them to come up with ideas.

If you are just a reader or listener your brain doesn’t get wired in the same way.

AI is a lesser problem for already experienced developers, because they just lose some abilities but new developers will never get those abilities in the first place, which will limit their thinking especially for edge cases that need creativity


> Is it tho? I get paid more these days to write less code. Is it dumb to be paid more/do more, have more oversight and deal less with the minutia?

I do think that what people are being paid might get adjusted to whatever is happening.

Firstly off-shores, then now Tech companies have convenient response to lay off people and they genuinely believe that companies can be 5-10x shorter with AI and 90% of code will be written by AI.

They then push it on engineers and some adopt, some don't. It becomes a goodhart's law and people just start spending tokens to look good too and just spearhead using AI because hey 1) the corporate is recommending you to do this and then 2) the points you talked about.

The AI bill blows up (Cloudflare spends 5 million $ per month probably more in AI bills iirc) and with all of these, the company fires people off.

The amount of software engineers laid off all then try to create another AI tool (...using AI) or try to overcompete when the job market is at one of its all time low. Combine this with the overall trillion dollar and more of US stock market which is attached to the AI bubble.

I do think that you are paying a price in all of this, I feel like job insecurity is at an all time high, people are just scared of losing jobs from my understanding within this career. Some are closer to retirement than others but that's about it.

I think that nobody is that happy to be honest, the software engineer is worried about his job, the CEO is worried about being replaced or his product replaced by AI, the AI company is worried about how it would be profitable in first place, the investors are worried if they got into a bubble, the government is worried about all these people and other so distractions (think UFO files for example) and wars are happening and its successfully diverting our attention from real issues.

I don't know but I think that we are all paying a price and I say this as I sometimes feel the most over-empowered by AI, (like young guy in his teens) but I just feel like we lost something more critical along the way. We lost some senses of our humanity and peace as we are embedding this technology and just have people who are only thinking about it 24/7. I have to be honest but I do sometimes feel like I would've fared off okay without the AI thing too and I don't care about my personal gains so much sometimes but I do think that the world would've probably been net positive if AI's plateaued or were never created.


We see this in UK prisons too, because the pay is so low, the work is dangerous and conditions are kinda shit there's now an increasing amount of hybristophiliacs (people attracted to criminals) being found within the service, who start up romantic relationships with prisoners and corrupt the service. It's harder to weed these people out when you're desperate for staff.

The solution is to pay these positions well enough to attract people who genuinely believe in the profession. But society optimises away from doing that because there's no obvious ROI outside of making running costs cheaper.


Great, and I do agree, we know who to pay more (and who less), but how do we get there democratically? Should we vote for the party that says "we support LGBT and an infinite influx of cheap labor" or the "we support the military and the free market" party?


I think its one of those ones where we don't fix it because the market conditions of democracy can never justify spending that money in terms of prisons and most families of people who need care see limited value in spending more for an experience they don't receive. Improved spending in prisons only works in nordic societies because of laws that would never pass elsewhere, mostly allowing ex-convicts to not disclose their past (with some exemptions for sensitive jobs). You need that because the ROI in spending more on prisons is rehabilitation into society (which saves you the money on re-offending), but most other societies don't accept that and the maths is long term.

So we'll get the robots instead and the cries in response to the horrors of malfunction, will not be heard because the victims are politically weak. I only hope we never do this in education.


<3 <3 <3

Traumatised children unite!

It is a little frustrating how those without this perspective react with shock when they discover that some of us have gone no contact with one of our parents. I was chatting to some muslim street preacher the other day and he told me that respect for your parents was a pillar of the faith, so that and my inability to grow a beard means I could never pick the Islam.

<3 <3 <3


> Anthropic’s enemies in the Pentagon, who had, months prior, convinced Trump that Anthropic was “woke” and should be banned for government use.

That people in government speak like this is utterly absurd. The quote from Donald Trump's follow up tweet on t'social is considerably worse.

This was all due to Antropic not wanting to take on a military contract, right? Or is it suggested its more to do with Mythos, but why would it be, if they never released it.


the people in the previous trump admin were perfectly willing to peddle a lie they didn't believe

the people in the current trump admin genuinely believe their own lies


> This was all due to Antropic not wanting to take on a military contract, right?

No, they already had a contract (since 2024, revisited/renewed by the Trump admin in mid-2025) which included military usage. That contract, though, had some language about what Claude couldn't be used for, ostensibly because Anthropic was nervous about accuracy in lethal contexts. Hegseth and others were unhappy with the restrictions and wanted to just redo the contract to remove them. Anthropic didn't want that, at least with current models. Then everything blew up. Zvi has some great writeups with more than you probably want to know.


that is an disgusting way to treat a business partner, but given the people involved; i shouldn't be surprised.


You have to distinguish between political rhetoric (“woke”) and the substance of the dispute

The substance: traditionally, defense contracts don’t have clauses in them limiting what the military can do with the acquired technology. If Boeing or Lockheed Martin or Northrop Grumann sell a missile system to the Pentagon, they don’t try to impose contractual limits on who the Pentagon can fire the missiles at. Now, for some types of contracts - e.g. contracts to provide personnel - the Pentagon is used to contractual terms limiting uses - but not for hardware or software used in weapons systems / military planning / etc.

Along comes Anthropic, who argue AI is a fundamentally different technology, to which the old rules shouldn’t apply - they want contractual terms prohibiting certain uses (autonomous weapon systems without human in loop; domestic mass surveillance). The Biden admin buys the argument and agrees to those novel contractual terms. The Trump admin takes over and objects to them, demands they be renegotiated. I think it was primarily a matter of principle and power-“software vendors don’t get to tell us what we can and can’t do”-rather than some immediate plan to do things the contract prohibits.

OpenAI negotiated a contract which replicated those terms-but with the proviso that the terms only apply insofar as they reiterate existing legal limits. Anthropic was objecting to that as a meaningless fudge-“we promise not to do X if X is illegal” is very weak, especially when contracting with the government-Congress could change the law tomorrow, or the government’s lawyers could change their interpretation of it, or an appellate court decision could impose a new understanding of it.


> Congress could change the law tomorrow, or the government’s lawyers could change their interpretation of it, or an appellate court decision could impose a new understanding of it.

And then it becomes legal. It’s not an empty argument, it simply means “someone higher than you took an initiative”.


> Anthropic, who argue AI is a fundamentally different technology

They’re arguing it’s a service. I think Aramark could refuse to contract to provide employees to the U.S. military for a campaign on Chicago.


I think in practice contracts to provide civilian personnel to the Pentagon contain clauses limiting the nature and location of the work - the Pentagon can’t contract for a clerical assistant in DC and then demand they go to Iraq to provide physical security - it violates the nature of the agreed work and the agreed location.

But contracts for personnel generally don’t contain restrictions on use beyond that. If the clerical assistant for DC is asked to provide clerical help to a military planning team who are planning an assault on Chicago, they (and their employer) don’t have legal grounds to refuse. If you are contracted to provide clerical assistance to military planners, you can’t legally say “Baghdad is fine, but Chicago is a no”. Saying that is a breach of contract-unless the courts rule that planning the assault was itself illegal, and I doubt current SCOTUS majority would


> in practice contracts to provide civilian personnel to the Pentagon contain clauses limiting the nature and location of the work

Which is what Anthropic was seeking to do. To be clear, I’m unsympathetic to Anthropic’s automated kill-decision objection. But I’m very sympathetic to their no-domestic-use requirement. And that aligns cleanly with precedent for civilian personnel having limits on “the nature and location” of their work.

> Saying that is a breach of contract-unless

Unless you’re negotiating the contract.


> I’m unsympathetic to Anthropic’s automated kill-decision objection. But I’m very sympathetic to their no-domestic-use requirement.

One inherent issue with this set of choices is that you're OK with getting killed upon a decision made by a foreign AI agent.

Sadly, such a loophole already exists[0] and means that your own administration wouldn't be spying/executing you with AI, but oops - some ally (not even an adversary!) might on their behalf.

[0]: https://en.wikipedia.org/wiki/Five_Eyes#Domestic_espionage_s...


legally and in practice, they cannot. Even considering the 4th amendment, in a time of war the military can commandeer a service as long as they are compensated.


Where’s the legal declaration of war, precisely?


Congress passing a changed law, and it holding up in court is how it's supposed to work. The people's reps (specifics interpreted by the courts) should be the ones that set the standard on as a country what type of weapons systems we want to deploy vs. what is immoral. Precedent is nerve agent weapons, landmines, etc.

Honestly, Anthropic's stance feels like an oligarch stance. We have better morals than the American people, we will decide what weapons systems the military will use or not use.

It's perfectly understandable if they don't want to sell weapons to the government. That is a noble thing. But Anthropic wanted that DoW money and wanted to determine what is moral vs. not


> rather than some immediate plan to do things the contract prohibits.

It's not like any legally questionable kidnappings or bombing campaigns were being planned at the time, right?


Those acts are allowed by Anthropic’s terms-they aren’t domestic mass surveillance, and (to the best of my knowledge) any AI targeting decisions were approved by a human in the loop.

Anthropic’s terms weren’t “don’t do anything illegal” they were “here are two highly specific things which you aren’t allowed to, whether they are legal or not”


do you really think the bombings and kidnappings are new as of 2024? You think what we have been doing in the middle east and Guantanamo bay since 2001 are moral?


The only reason that I mention liability concerns is precisely because of Abu Ghraib, Snowden, et. al.


> If you can't write it down, why would you expect it to be universal and enforceable?

and this is the problem. It used to be the case that if you were smart enough to find an exploit you were also smart enough to realise what would happen if you irresponsibly disclosed it. I guess these tools have made that pattern no longer apply.


From my point of view, they told the kernel security team which is in charge of fixing this. If it’s important for them to tell other people, then it should’ve been written down and further reiterated when they made their report.

The skills to detect code exploits is not the same as the skills to navigate an informal org chart to the satisfaction of an amorphous audience if end users (i.e. us on HN).

That said… as they are a company that supposedly specializes in this field, and is trying to sell a product, I do believe they should do better. Right now, I don’t have much confidence in their product.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: