Better HN
topnewbestaskshowjobs
Log inSign up

socketcluster

763 karma · joined Sep 20, 2023 (3y ago) · 321 submissions

Email: jon(at)socketcluster.io
Submissions

comment 1d ago · link · parent

I think one of the most profound changes I've observed on the tech side is the definition of 'modularity'; in the past, ideal modularity implied that the code could be locked down to a specific version, packaged up, distributed and everyone would integrate it into their projects as-is; everyone's projects would use the same module. This is a double-edged sword. If the module is secure and efficient, then that means everyone benefits from the security and efficiency, otherwise it means everyone is vulnerable to the same flaws or everyone suffers from the same inefficiencies.

In our new reality, module distribution has changed. We no longer need to obtain a module as-is from npm or whatever package manager... We can just get AI to pull it from another repo and make any necessary adaptations. The AI becomes the new npm and it's not a straight copy. Modules are more like blueprints rather than ready-made parts.

That said, modules still benefit from having simple interfaces, high cohesion, loose coupling. The ideal code doesn't look any different than before, it's just that the ideal distribution mechanism for it has changed. The design of the module significantly influences the logic surrounding it and that's why code quality still matters.

comment 3d ago · link · parent

I was unemployed for 8 months a few years ago and I filled the gap with work on my own platform which I listed as my startup. Unfortunately, I couldn't find any users for it but it served its purpose as a filler. I got a job with a different startup in an area which I didn't enjoy and against my principles but beggars can't be choosers and so I managed to last 8 months by faking enthusiasm. Still, the founder was quite impressive in some ways and I learned a lot from observing his behavior. That job served as an on-ramp to a truly horrible software job which I hated; codebase was legacy and over-engineered and pay was low... But that job became an on-ramp to my current job which is consulting. Mostly been dealing with boring subject matter but has a strong AI focus and quite challenging. There were a lot of issues with that job. It's been a real struggle but the leaders are reasonable, well connected and it's a good growth area which matches my vision of what role software should play in the economy.

comment 4d ago · link · parent

> From the home page, I see that you are sponsored by two different companies

Forgot to update the website. I'm no longer receiving money from these. The reason is that both were projects I started and I used to pay myself and casual contributors about $2000 per month (as in, split between contributors) but the funding dried up completely years ago after the blockchain project we were based on changed its architecture.

comment 4d ago · link · parent

It's insane. I maintain a small open source project with only about 100k downloads per week and so, in terms of funding, it's crickets for me but I assumed famous projects like OpenSSL would get some decent funding.

Then I read articles about billionaires donating millions or even billions to various (sometimes frivolous) charities and I wonder WTF.

The numbers just don't add up. It's like there is an invisible force field preventing people from donating money to open source?

Crazy to think that the people who once posted a dumb viral 30-second meme video on YouTube probably got more money than the author of a complex, world-famous open source project which has been at the top for decades and which quite literally intermediates every aspect of almost every human's life.

Does not compute.

comment 4d ago · link · parent

> BTW, OpenSSL seems to be a rather low quality implementation of a very low quality set of APIs.

Fully agree with your assessment above that line, but damn, this is a strong statement for a library this ubiquitous. You wonder; how could this happen? And yet, as an open source developer myself, I know how little people care about code quality.

comment 5d ago · link · parent

> Capitalism does, however begrudgingly, recognize that smart people who give a shit are required to build and maintain complex systems that serve capitalist goals.

This line resonates so much. I do actually feel like a lot of top capitalists harbor a kind of deep hatred towards smart people who give a shit.

Towards dumb people who give a shit, they feel contempt.

Towards smart people who give a shit, they feel hatred.

I feel this but can't quite explain it. It's almost like envy of someone else's virtues. Or maybe it's rooted in a feeling threatened by virtue. Virtue is hard to control and these people like control.

comment 6d ago · link · parent

Agreed but often, even the simplest possible solution is still complicated.

comment 6d ago · link · parent

I agree that they don't typically phrase it in the simplest way possible. Also, they have a bias towards increasing complexity so they tend to frame problems in a complex way so that they may then suggest solving them by making things more complicated. Many times, the best solution is to avoid the problem entirely. LLMs almost never see this kind of solution.

comment 1w ago · link · parent

It is true that they don't tend to give simple answers.

But it reveals something about human biases that we tend to seek out simple answers to complex questions. We tend to think that because a question is short, that it's simple. We forgot how many details are involved and how much is actually going on underneath. Reality itself is often annoyingly complex.

All living creatures, including humans, are conditioned to simplify extremely complex things into simple concepts which we can react to. We only understand things to the extent that we believe they affect us.

comment 1w ago · link · parent

It's not an appropriate solution to for AI vibe coding IMO. It's too complex. People without a technical background need a simpler abstraction than RLS.

comment 1w ago · link · parent

> The USA is not centrally planned.

Completely disagree about this point. It's centrally planned around a centralized system of money creation where banks have the power to loan money which they don't have (and which didn't even exist before they loaned it into existence) at below risk cost and they are allowed to make a profit on top of money which wasn't even theirs (which is technically people's money since it dilutes everyone's savings and the value of employment contracts). Also, governments handing large contracts to large corporations is another aspect of central planning. Basically, the compounding returns which prop up the stock market are generated artificially by the government and banks constantly creating new money through a few highly centralized channels. It creates a Cantillon effect with unequal scarcity of money determined purely by people's distance from institutional 'money printers'. Essentially all of the main money-creation channels have been monopolized. There is no free market.

It's like there is one river and all the spots all along that river's banks are taken. The economy thus revolves entirely around servicing those who have direct access to the water. Those who have direct access to the water don't have to do any work or take any risks; their success is essentially guaranteed because everyone has to come to them to participate in 'the market'.

comment 1w ago · link · parent

Yes it seems very dangerous. Also, I think a lot of the software we use today, we don't need or we could make much more efficient. We almost certainly don't need so many data centres. Most businesses could self-host their own systems. Even a lot of large companies.

I feel like we probably only need a tiny fraction of the compute capacity if we let things be decentralized and let the market operate naturally.

This was my thought years ago and so now it looks blatantly obvious to me with AI data centres driving electricity prices. It's pretty clear the industry is being propped up by other parts of the economy.

comment 1w ago · link · parent

Some of us software engineers have been predicting the software apocalypse since over a decade so what's going on now is not surprising.

What else won't surprise me is the government trying to step in and making it their problem. That's what I'm worried about. The only right thing to do is remove regulations, remove government intervention from every aspect of the economy, and let the market fix the mess which the central planners have created.

Designing the entire software industry as a giant government-supported oligopoly was not a good idea. It was unethical and it was not going to work in the long term.

comment 1w ago · link · parent

It's good to see some articles about this coming out finally. I've been saying that formal proofs aren't that useful for over a decade but now with generative AI, it's easier for most people to see why.

Even a simple spec like "Copy a file from A to B" may require a highly complex solution. I could easily turn this simple 7-word statement into a 10k-word requirement specification document depending on the systems involved because of how much complexity can exist. And that's just one small part of a much larger system. And the 10k word spec might require a 10k-line code solution; which itself might require a 500k-line formal proof.

The formal 500k-line proof itself, which might take years to produce, would likely contain many assumptions upon which the proof rests; just by going through the list of assumptions, the stakeholder could invalidate the entire proof, years of work, in just 1 second with the mere frowning of their brow. That's not even considering the fact that the requirements themselves may change over time (more than once per year). Hence, by the time you finish producing the proof, it is already invalid with respect to the requirements.

Therefore, formal proofs are only of limited use; when the project is simple, requirements are fixed and assumptions can be fully enumerated and verified by the primary stakeholder.

EDIT: Actually, I ran my comment through Claude and it was able to generate a formal proof of what I just said but phrased in this way:

"A monolithic, full functional-correctness proof against a complete specification is useful only when the project is simple, the requirements are fixed and the assumptions are accepted." Q.E.D.

You can ask Claude to write the proof out for you. It should mention 'No salvage' as an assumption among others and provide some superficial counter-points (alluding to seL4 project) but you can ask it to disprove this which it did successfully based on the assumption that most projects aren't sufficiently modular (with respect to proofs) to make proofs salvageable in the event of requirement changes.

Along with the proof, it provided a remarkable piece of information:

'Supporting evidence. The objection cited seL4, but seL4 supports the reply. The CACM paper on the verification has a section titled Kernel Design for Verification: the kernel was shaped to suit the proof. Even so, the verification team estimated that invariants took about 80% of the effort in the first refinement step, and those invariants were about system-wide conditions and relationships between data structures. On the cost of change, a member of the seL4 team told the project’s mailing list that altering something central to the system could wipe out a large share of the proof, and that estimating re-proof cost remains “a bit of a black art”.'

comment 1w ago · link · parent

Exactly. I've worked on complex year-long projects where we've just been working non-stop, each team member generating thousands of lines per day and 1 year isn't enough to plug all the gaps in the spec with code and to cover all the exception handling cases at an MVP level.

You can't formally verify code when the code hasn't even met the spec yet! It takes a huge amount of time and effort to achieve this! Even when you think you've achieved this and your code meets the spec word-for-word, some stakeholders will still disagree based on technicalities and definitions!

How in the world are we supposed to prove that code is correct when people can't even agree on the same definition of 'correct'?! That's most of the work, really.

Also, if it takes people 1 year to complete a project in such a way that it barely just meets the spec to an acceptable standard, and only in a pure high level business sense; just barely covering all the basic exception handling scenarios; how long is it going to take to add formal verification on top of that? How many more gaps will have to be plugged, how many more assumptions will need to be enumerated, in order to make your formal proof air-tight? Then what happens if the client reads your formal proof and informs you that some of your assumptions are incorrect? What value is your proof then?

comment 2w ago · link · parent

I feel like these kinds of platforms which simplify the hosting and development with AI will be critical. I bootstrapped a product in the space but I'm not feeling the interest yet from other people and I'm just using it for myself and a few close customers for now. Not really promoting anymore even though it cut my own development and maintenance time by at least 90% and significantly improved security.

I think people need to experience more critical vulnerabilities, more hacks, more pain.

When vibe coders will be lost in tangled webs of complexity with hundreds of thousands of lines of code, unhappy customers and they can't find engineers to fix their slop (because the good ones are all too busy fixing other slop) and they are on their knees begging for relief, that will be the right time.

Or maybe it will be after that point. Let them hit rock bottom and their startup collapse due to complexity. Then I can try to promote to them for their next startup. Start-up failure due to complexity hasn't really been a bottleneck in the past; usually product-market fit is the bottleneck but I'm hoping this changes.

Paul Graham said it right, "Make something people want" and it's a very different problem from "Make something people need". I'm sure I made something people need, but they won't know they "want" it until they've felt a significant amount of pain.

comment 2w ago · link · parent

It can generate a fragile codebase because it can leave gaps if you're not thorough.

The old adage of software development still stands "Computers do what you say, not necessarily what you mean."

But as a software engineer, this is ideal.

It would be horrible if it didn't follow the spec exactly as written because then all projects would converge on the exact same designs based on the AI's taste and it would be impossible to steer it away from slop.

If your codebase is simple, if you use a well designed foundation, the code it generates will be simple. I know because I've worked on both kinds of projects.

comment 2w ago · link · parent

We already have superintelligence though in some aspects like coding, AI is much smarter than any human because of its sheer speed and accuracy.

It can generate large amounts of essentially bug-free code. The only bugs are bugs in the spec.

It has essentially no common sense though so it often misinterprets the spec or leaves gaps and edge cases unhandled and that's where the human engineer is still essential.

The dangers of AI are much clearer today than they were a year ago. There is a certain precision and relentlessness which is going to be a problem. It's a matter of time before people unleash AI viruses which spread through computers and data centres and pursue various goals relentlessly with no off switch. Some of these viruses and their goals may be nefarious. Imagine an AI trying to disrupt a specific person's life relentlessly. Spreading from machine to machine, never stopping.

comment 2w ago · link · parent

If your files are named well and codebase is of reasonable size, it will find them and re-use them. I haven't experienced the problem of duplicate functions at all on any of my personal projects. The trick is that my code is separated into distinct modules in a clear hierarchy with one-way dependency; no module has more than 5k lines total, no more than 20 files or so. Basically, I treat every part of my system as an independent, fully self-contained black-box product which could potentially be used by third-parties in different business domains. The interface of each module is generally quite simple and it doesn't expose any internal details.

My AI agent never has to work with more than 5k lines of code and like 20 files at a time; and most are much smaller than that; like 1k or 2k lines... Even though one of my projects is almost 30k lines, my AI agent never has to consider more than 5k.

It's a very different experience in my day job because the project has more lines, more files and all the files for the entire project are in the same repo and naming is not as clear. In this case, I have to point to the relevant files/context in every session.

comment 2w ago · link · parent

It just gets worse as your codebase grows with more code and more files especially. It's like a human developer who is under intense time pressure. If the codebase is large, it might miss an existing function and implement a second one... or it might miss the fact that a database table already exists to solve its current problem and create another one. The solution is to keep the codebase as simple and small as possible and name everything as intuitively as possible with proper separation of concerns. Same principles which were useful before AI are still useful with AI.

comment 2w ago · link · parent

Someone tried to hack my computer with a fake job interview once. I believe it was a real person because there wasn't much latency.

They tried to get me to git clone a repo, presumably to get me to install malicious npm dependencies.

I refused, then they wanted me to download Claude Code but I told them I already had Claude Code harness installed on my machine... But they said I should install a different version of it; they sent me a link... The landing page was the same kind of design as Anthropic uses but I didn't recognise the URL. I stopped the interview right there.

comment 2w ago · link · parent

I also think so. The weakness of current popular cryptocurrencies though, is the complexity and size of their codebases. Many above 100k lines of code. That's risky. Though the benefit is that they are somewhat heterogeneous (different nodes running slightly different code/versions) so it may be hard to find a vulnerability which affects more than 50% of nodes; and this is a hard requirement for compromising the integrity of that system.

Traditional finance has the benefit that they can more easily reverse malicious transactions, but if hacks become too common, it will be impossible to correct fast enough and in a reliable way. With traditional banking, a hacker only needs to hack a few nodes to compromise the integrity of the entire system.

So yeah I also think crypto will win in the long run. I would bet on a tokenized stock with AI attached.

I think the top asset will combine the AI which is best at hacking with the blockchain which is hardest to hack. Ability to corrupt others whilst maintaining perfect integrity yourself.

AI for offence, blockchain for defence.

comment 2w ago · link · parent

My main fear is that the integrity of everything will be compromised, but everyone will keep acting as if it's not. I feel like it's already somewhat the case but I'm worried about it getting worse.

My prediction is that some people will be able to use AI to create essentially infinite money inside their bank accounts (through hacking); the prices of assets will grow to ridiculous sums as the people with infinite money buy up assets, but yields on all assets would soon approach 0%; still, one asset is going to grow at a faster rate than all other assets (E.g. an AI company backed by blockchain/tokenized shares that are impossible to hack) and everyone is going to start piling their infinite money into that asset; every other asset will crash because of the rapid, exponential price acceleration of the top asset making every other asset unattractive by comparison. Then fiat money would cease to exist and shares (or crypto tokens) of the top company will be used as money instead. Then prices of assets would stabilize again; denominated in the new currency... Then after that, we will finally be able to start innovating with AI.

comment 3w ago · link · parent

Yes but I agree with the previous comment that there is a bias towards maximizing complexity. My experience in this industry tells me that real dynamics tend to differ significantly from canned narratives such as "this tool can protect you from Y."

Sure, it could, if developers were perfectly rational entities and if hiring processes at big tech firms where optimal... But neither of these are even remotely true.

The psychological aspects transcend a tool's capabilities. A tool which aims to protect people may in fact cause more harm than it prevents.

Kind of like a gun; great tool for personal protection in the hands of decent people, but put enough of them in the hands of violent criminals and they become a net problem. Human psychology tends to subvert the intent of tools as well as that of laws and regulations, in my experience.

comment 3w ago · link · parent

This is true but its assessment did match my personal experience as a developer who has built quite a few apps with React + Node.js + Postgres combo. The project I had written with my framework was only about 1400 lines of code (mostly declarative HTML) and my experience is that applications of that complexity would normally approach or exceed 10k lines if well written with React/Node/Postgres. So its assessment even seemed conservative based on my own estimate.

I once also worked on a simpler application (feature-wise) for someone else which was approaching 100k lines but it was poorly architected with a lot of bad abstractions and over-engineered. In this case I could claim that my framework is cutting almost 99% of the code but that's comparing to the worst possible situation. Still, even that's not necessarily an unfair comparison because, in practice, a lot of real projects do end up bloated to such extent after a decade or so, likely even more so now with AI. Any framework which can prevent that bloat code from being generated is genuinely delivering long term benefits.

comment 3w ago · link · parent

I enjoyed reading this article. I think it's an important article. Even though people might disagree about certain definitions like "maintainability," I liked what the author did by sticking to objective measurements which do correlate somewhat with the things we care about: Ability to implement the product fast, with few tokens and with as few lines of code as possible in the final product. These are well chosen metrics IMO.

Fewer lines of code (per piece of functionality) does, in fact, correlate strongly with maintainability. The downside of this metric to watch out for (as Goodhart's Law would have it) is to ensure that the framework isn't compromising (current or future) flexibility in an unacceptable way. I imagine if this kind of benchmark becomes popular, people would start coming up with low code frameworks which are extremely rigid and inflexible. Because rigidity is a good way to cut lines of code. There needs to be a way to ascertain the flexibility limits of the framework too.

Would be good to have a similar benchmark for a more complex application; one with authentication, access control (with individual ownership of records and group ownership).

Also would be good to compare the security of different frameworks in this way. See which frameworks leave security gaps. Would be good to set up a benchmark where an AI agent is made to impersonate different users (with different roles) and test access to all possible data types and views in an exhaustive way.

A while ago, I showed Claude a relatively complex application I had built with my framework https://saasufy.com/ and asked it to estimate how many lines of code and how long would be required to build the same application with a stack like React + Node.js + Postgres and it estimated that it would require 4 to 5 times the amount of code and amount of time so I'm keen to actually test it out with a benchmark like this.

I was not surprised that HTMX lead in a lot of the benchmarks. I suspect it would do even better with a more complex application. IMO, its design is closer in spirit to where the industry needs to go. There are a lot of maintainability and security gains to be had by standardizing frontend and backend interactions; though I believe there are other way to do this which can yield even more gains (though obviously with some tradeoffs depending on the use case).

comment 3w ago · link · parent

IMO, we'll need to rebuild all of crypto and all software from scratch using a minimalist approach. Minimize the amount of code, with proper modularization where each module has clear responsibilities and fully self-contained attack surface and exposes a well-defined set of features.

comment 1mo ago · link · parent

That is a lot of tables for one schema. Maintaining so many tables seems like a security vulnerability in and of itself from risk PoV.

I think your prediction makes sense. There needs to be a lot of guardrails and you need a fully integrated platform/stack on the backend to protect the user from doing dangerous things because the AI ain't gonna tell them when something is dangerous or doesn't perform at the scale they need

comment 1mo ago · link · parent

But IMO, React didn't go as far as it could have; partly because it is backend-agnostic. You still have to re-implement a lot of the same wiring over and over and you keep running into the same issues and vulnerabilities. Also React offers too many ways to do the same thing; it just confuses the LLM as it mixes all different approaches, it lacks a clear philosophy to provide the guardrails you mentioned.

We should be able to just deal with pure UX issues/tradeoffs; we shouldn't be running into technical issues.

12345
11