Readit News logoReadit News
sirsinsalot commented on Revisiting Interface Segregation in Go   rednafi.com/go/interface-... · Posted by u/ingve
sirsinsalot · a month ago
I'm saying that at some point declaring the minimal interface a caller uses, for example Reader and Writer instead of a concrete FS type, starts to look like duck typing. In python a functions use of v.read() or v.write() defines what v should provide.

In Go it is compile time and Python it is runtime, but it is similar.

In Python (often) you don't care about the type of v just that it implements v.write() and in an interface based separation of API concerns you declare that v.write() is provided by the interface.

The aim is the same, duck typing or interfaces. And the outcome benefits are the same, at runtime or compile time.

sirsinsalot · a month ago
Also yes Protocols can be used to type check quacks, bringing it more inline with the Go examples in the blog.

However my point is more from a SOLID perspective duck typing and minimal dependency interfaces sort of achieve similar ends... Minimal dependency and assumption by calling code.

sirsinsalot commented on Revisiting Interface Segregation in Go   rednafi.com/go/interface-... · Posted by u/ingve
zbentley · a month ago
How so? Genuine question. Duck typing is “try it and see if it supports an action”, where interface declaration is the opposite: declare what methods must be supported by what you interact with.

In Python, that would be a Protocol (https://typing.python.org/en/latest/spec/protocol.html), which is a newer and leas commonly used feature than full, un-annotated duck typing.

Sure, type checking in Python (Protocols or not) is done very differently and less strongly than in Go, but the semantic pattern of interface segregation seems to be equivalently possible in both languages—and very different from duck typing.

sirsinsalot · a month ago
I'm saying that at some point declaring the minimal interface a caller uses, for example Reader and Writer instead of a concrete FS type, starts to look like duck typing. In python a functions use of v.read() or v.write() defines what v should provide.

In Go it is compile time and Python it is runtime, but it is similar.

In Python (often) you don't care about the type of v just that it implements v.write() and in an interface based separation of API concerns you declare that v.write() is provided by the interface.

The aim is the same, duck typing or interfaces. And the outcome benefits are the same, at runtime or compile time.

sirsinsalot commented on Revisiting Interface Segregation in Go   rednafi.com/go/interface-... · Posted by u/ingve
sirsinsalot · a month ago
Follow the trail of the blog post and you end up with Python and duck typing, and all the foot guns there too.
sirsinsalot commented on Social Cooling (2017)   socialcooling.com/... · Posted by u/laurex
sirsinsalot · 2 months ago
I'm more concerned about the fact I have no idea if the article and the HN comments are all AI generated or not. Can you tell if this comment is AI or not?

What happens when social discourse is polluted by noise that is identical to signal?

Is there anyone else out there?

sirsinsalot commented on Social Cooling (2017)   socialcooling.com/... · Posted by u/laurex
phaser · 2 months ago
This idea is old, but today it conveys a much bigger meaning. There are two new developments since then that are very scary. The first is that artificial intelligence is supposedly replacing some jobs, but not only that, it is also being used to select jobs, and the latter is something that I have seen firsthand. The other phenomenon is the advance, in places of the world that classically were liberal, of political ideas that will hinder or directly eliminate the right to private communication over the Internet.

Combine these three factors: data brokerage, the use of AI to replace and select jobs, and the political landscape around the right to encryption, and we get a recipe for a future where the word dystopian falls short.

sirsinsalot · 2 months ago
Don't forget AI being used to replace friends. AI being used for validation in place of a varied social group is scarier than anything I see on the jobs market.

Asking ChatGPT if breaking up with your girlfriend is a good idea or not? Terrifying. People should be using human networks of friends as a sounding board and support network.

What happens next?

sirsinsalot commented on It's time for modern CSS to kill the SPA   jonoalderson.com/conjectu... · Posted by u/tambourine_man
Bridged7756 · 5 months ago
"It’s faster, simpler, and better for everyone."

For who? In the modern day and age most devices can handle some JavaScript just fine. The DX provided by front end frameworks/libs is just unrivaled. Vanilla JS/jQuery work fine for small stuff, things quickly get out of hand in complex projects, when you have to bake in things like UX, validations, and have to program around the limitations of HTML. I'm confused as to why make such a claim as "Don't do SPAs for websites" and then throw in a dumb broad statement like "Just do vanilla". Yes, you can use CSS and achieve a lot of complex functionality. Yes you can use the existing HTML tags for a lot of things. Is it more maintainable than just using React? No.

You can't live in a silo. Yes, if plain HTML works for your website, why bother with anything else? Just do forms for any submit, input validation, there you go. But for a company competitive in the industry, particularly B2C SaaS, UI/UX does matter. And lagging behind, more than a trend, means customer perception.

We tend to be biased in our takes as tech-literate people (I do), but the average person gets lost if a button isn't emphasized enough.

sirsinsalot · 5 months ago
> The DX provided by front end frameworks/libs is just unrivaled

How? I spent 6 months exploring React, Vue, Node, Next,...

The DX for all of them sucks. The documentation sucks. Everything is wrappers of wrappers of npm scripts of wrappers of bootstrappers of boilerplate builders of...

Seriously. The worst.

sirsinsalot commented on Kiro: A new agentic IDE   kiro.dev/blog/introducing... · Posted by u/QuinnyPig
stillpointlab · 5 months ago
> Natural language is trying to be a new programming language, one of many, but it's the least precise one imho.

I disagree that natural language is trying to be a programming language. I disagree that being less precise is a flaw.

Consider:

- https://www.ietf.org/rfc/rfc793.txt

- https://datatracker.ietf.org/doc/html/rfc2616

I think we can agree these are both documents written in natural language. They underpin the very technology we are using to have this discussion. It doesn't matter to either of us what platform we are on, or what programming language was used to implement them. That is not a flaw.

Biological evolution shows us how far you can get with "good enough". Perfection and precision are highly overrated.

Let's imagine a wild future, one where you copy-and-paste the HTML spec (a natural language doc) into a coding agent and it writes a complete implementation of an HTML agent. Can you say with 100% certainty that this will not happen within your own lifetime?

In such a world, I would prefer to be an expert in writing specs rather than to be an expert in implementing them in a particular programming language.

sirsinsalot · 5 months ago
In this world where the LLM implementation has a bug in it that impacts a human negatively (the app could calculate a person's credit score for example)

Who is accountable?

sirsinsalot commented on Kiro: A new agentic IDE   kiro.dev/blog/introducing... · Posted by u/QuinnyPig
a5c11 · 5 months ago
And we re-invent the wheel basically. You have to use very specific prompts to make the computer do what you want, so why not just, you know... program it? It's not that hard.

Natural language is trying to be a new programming language, one of many, but it's the least precise one imho.

sirsinsalot · 5 months ago
I agree with this. There's so much snake oil at the moment. Coding isn't the hard part of software development and we already have unambiguous language for describing computation. Human language is a bad choice for it, and we already find that when writing specs for other humans. Adding more humaness to the loop isn't a good thing IMHO.

At best an LLM is a new UI model for data. The push to get them writing code is bizarre.

sirsinsalot commented on Kiro: A new agentic IDE   kiro.dev/blog/introducing... · Posted by u/QuinnyPig
charlysl · 5 months ago
Thank you, I will certainly check this out because this is something I've been sort of doing, manually, but I am still struggling to get the right workflow.

This recent OpenAI presentation might resonate too then:

Prompt Engineering is dead (everything is a spec)

In an era where AI transforms software development, the most valuable skill isn't writing code - it's communicating intent with precision. This talk reveals how specifications, not prompts or code, are becoming the fundamental unit of programming, and why spec-writing is the new superpower.

Drawing from production experience, we demonstrate how rigorous, versioned specifications serve as the source of truth that compiles to documentation, evaluations, model behaviors, and maybe even code.

Just as the US Constitution acts as a versioned spec with judicial review as its grader, AI systems need executable specifications that align both human teams and machine intelligence. We'll look at OpenAI's Model Spec as a real-world example.

https://youtu.be/8rABwKRsec4?si=waiZj9CnqsX9TXrM

sirsinsalot · 5 months ago
You know what an executable spec is? Source code.
sirsinsalot commented on Java at 30: Interview with James Gosling   thenewstack.io/java-at-30... · Posted by u/chhum
nradov · 7 months ago
Right. Before Microsoft created .NET and C# they first tried to play their "embrace, extend, extinguish" trick with Java. They released a JVM and "Visual J++" language which was sort of Java, but had incompatible proprietary extensions to lock customers in to Windows. Eventually they were forced to stop that for legal reasons so they completely dropped all Java support, and built their own replacement virtual machine and associated languages from scratch.
sirsinsalot · 7 months ago
And even today some people don't worry about Microsoft's ownership and stewardship of things like Github.

u/sirsinsalot

KarmaCake day2450January 17, 2021View Original