Better HN
topnewbestaskshowjobs
Log inSign up

socketcluster

764 karma · joined Sep 20, 2023 (3y ago) · 325 submissions

Email: jon(at)socketcluster.io
Submissions

comment 12mo ago · link · parent

Bun is pretty cool. I maintain a Node.js library and updated my Node.js engine version and my library just didn't work on the latest version... In frustration, I decided to try Bun for the first time... I had never used it before but my library worked straight away, no warnings, no errors. I have never seen that level of compatibility before when a library works better with an alternative engine than the one it was designed for.

I did end up fixing Node.js compatibility later but it was extra work. Felt like they just created busy-work. Node.js maintainers should stop deprecating perfectly good features and complicating their modules.

comment 1y ago · link · parent

I co-founded a holiday real estate-backed crypto project in 2019. We only raised $50k though. Just enough to buy 1 unit in South Africa. We started using profits to do on-chain token buybacks with proof of burn. We proved the concept but scale was too small with just one apartment. It was a really cool concept though. Too bad the powers-that-be didn't select us.

The main problem with blockchain projects is that they're not decentralized in the way that counts. You still have to be chosen by the powers-that-be. There's still only one path to success; just like the rest of the tech sector.

comment 1y ago · link · parent

Glad to see that other people have come to a similar conclusion as I did. I don't understand why the industry hasn't been able to form much consensus around this.

You look at electronics and vehicles, the components inside are generic, many devices use exactly the same internal components... All the internal components are chosen specifically for their ability to handle a wide range of conditions (pressure, heat, electromagnetic interference) and also based on how broadly compatible they are with other components and tools... But somehow, when it comes to software, we treat it as if it's completely different.

There is a lot of value in using generic components which can handle a wide range of use cases. You want to avoid changing dependencies as much as possible because it takes time and effort to write robust code. You want a solid foundation which can solve a well defined (but not necessarily narrow) range of problems. Some modules can be used to solve many different problems, in completely different business domains but they may have a very simple, well defined interface. Think of a screw... Very simple, well-defined interface, can be applied to a huge range of use cases.

comment 1y ago · link · parent

If anyone is interested in a CRUD serverless backend, I built https://saasufy.com/

I'm looking for users who want to be co-owners of the platform. It supports pretty much any feature you may need to build complex applications including views/filtering, indexing (incl. Support for compound keys), JWT auth, access control. Efficient real-time updates. It's been battle tested with apps with relatively advanced search requirements.

comment 1y ago · link · parent

Even large companies are still grasping at straws when it comes to good code. Meanwhile there are articles I wrote years ago which explain clearly from first principles why the correct philosophy is "Generic core, specific shell."

I actually remember early in my career working for a small engineering/manufacturing prototyping firm which did its own software, there was a senior developer there who didn't speak very good English but he kept insisting that the "Business layer" should be on top. How right he was. I couldn't imagine how much wisdom and experience was packed in such simple, malformed sentences. Nothing else matters really. Functional vs imperative is a very minor point IMO, mostly a distraction.

comment 1y ago · link · parent

Wow. What luxury some people have to reject $1.5 million.

For that kind of money, I would put a large national flag in the banner of the socketcluster.io website, I would relocate HQ to whatever country and state they want. I would never utter the word 'diversity' for the rest of my life and upon receiving the money, I would take a screenshot, frame it, put it up on the back wall of my new office and I would pray to it every morning to give thanks.

comment 1y ago · link · parent

If you're interested, I added my email to my profile 'about' section. I could try to screen record my next feature development on one of my side projects.

I'm also kind of interested to see how others use LLMs for coding. I can speak for myself having worked on both good and bad code-bases; my experience is that it works MUCH better on those 'good' codebases (by my definition).

comment 1y ago · link · parent

System doesn't have to be distributed. In general it just needs to separate the insertion of records from their settlement.

comment 1y ago · link · parent

You can implement two-phase commit instead. It requires a bit of additional planning in terms of data management but I actually find it much more elegant and it scales better. DB transactions are expensive and unnecessarily complicated.

You can have a really simple two-phase commit system where you initially mark all records as 'pending' and then update them as 'settled' once all the necessary associated rows have been inserted into their respective tables. You can record a timestamp so that you know where to resume the settlement process from. I once had multiple processes doing settlement in parallel by hashing the ids to map to specific processes so it scales really well.

comment 1y ago · link · parent

I was kind of taken aback by the author's definition of 'terse'. I was expecting a discussion about architecture not about syntax aesthetics.

Personally I don't like short variable names, short function names or overly fancy syntactical shortcuts... But I'm obsessed with minimizing the amount of logic.

I want my codebases to be as minimalist as possible. When I'm coding, I'm discovering the correct lines, not inventing them.

This is why I like using Claude Code on my personal projects. When Claude sees my code, it unlocks a part of its exclusive, ultra-elite, zero-bs code training set. Few can tap into this elite set. Your codebase is the key which can unlock ASI-like performance from your LLMs.

My friend was telling me about all the prompt engineering tricks he knows... And in a typical midwit meme moment; I told him, dude, relax, my codebase basically writes itself now. The coding experience is almost bug free. It just works first time.

I told my friend I'd consider letting him code on my codebase if he uses an LLM... And he took me up on the offer... I merged his first major PR directly without comment. It seems even his mediocre Co-pilot was capable of getting his PR to the standard.

comment 1y ago · link · parent

I find statically typed code harder to read and maintain on average because interfaces tend to be more complex on average. With dynamically typed languages, there is more pressure to keep the function signatures as simple as possible as developers try to work around their mental limitations of remembering all the types.

IMO, the value of simple interfaces is enormous and yields substantial benefits in terms of separation of concerns and modularization. The benefits of such architecture make arguments around static vs dynamic types pointless.

Once you know how to architect code properly and test appropriately, it makes almost no difference whether the languages is statically typed or dynamically typed... A lot of the constraints of static typing become annoyances.

The most infuriating line I hear from proponents of dynamically typed languages is how statically typed languages make refactoring easier. It's infuriating because I know exactly what they mean but it's incorrect. Having coded with statically typed languages, I'm familiar with the feeling of refactoring code and "the friendly compiler" guiding me and reminding me of all the places were I forgot to update the code when I changed one of the types... But unfortunately, the very fact that refactorings often require updating code in so many places is a testament to poor architecture. I don't have this problem when refactoring dynamically typed codebases. On average, the code is more modular. With dynamically typed languages, people don't try to design types that cut across the entire codebase. Oftentimes, many 'refactorings' in static typed land are just type modifications which wouldn't even be a problem in the first place if a dynamically typed language was used.

comment 1y ago · link · parent

I think the centralization aspect sounds potentially very useful so I didn't mean it like a deal-breaker. I've been thinking it's a matter of time before someone figures out a good way to centralize MCP tools. This kind of thing could be huge; like the Google of MCP tools.

comment 1y ago · link · parent

TBH. I don't think we actually need AGI. It's not a win-win.. It's a civilization-altering double-edged sword with unclear consequences.

I'm quite satisfied with current LLM capabilities. Their lack of agency is actually a feature, not a bug.

An AGI would likely end up implementing some kind of global political agenda. IMO, the need to control things and move things in a specific, unified direction is a problem, not a solution.

With full agency, an AI would likely just take over the world and run it in ways which don't benefit anyone.

Agency manifests as thirst for power. Agency is man's inability to sit quietly in a room, by himself. This is a double-edged sword which becomes increasingly harmful once you run out of problems to solve... Then agency demands that new problems be invented.

Agency is not the same as consciousness or awareness. Too much agency can be dangerous.

We can't automate the meaning of life. Technology should facilitate us in pursuing what we individually decide to be meaningful. The individual must be given the freedom to decide their own purpose. If most individuals want to be used to fulfill some greater purpose (I.e. someone else's goals), so be it, but that should not be the compulsory plan for everyone.

comment 1y ago · link · parent

My understanding is that this is essentially a hub for MCP servers?

The current and potential benefits are:

- Consistent authentication mechanism for all tools.

- Ease of tool registration/deregistration.

- Tool discovery.

Main drawbacks are:

- Trusting WebMCP npm package to run on your users' computers.

- Trusting WebMCP with access to your site or platform's functionality. Kind of like OAuth?

Does this sound right? Any other pros and cons versus integrating MCP server directly with specific LLMs?

comment 1y ago · link · parent

The real benefit of using a framework is that it helps to create components which can be easily and reliably nested. That said, nowadays you can achieve the same thing using native Web Components.

I'm currently working on a Company and Employee finder application with Web Components. I found them a lot easier to work with than React.

Also, I'm using a serverless platform I built from scratch. So it's literally all made from scratch with very few dependencies.

https://www.insnare.net/app/#/dashboard/

comment 1y ago · link · parent

I tried Claude Code with my custom serverless BaaS https://saasufy.com/ - The results were excellent.

I'm hoping this will commodify the BaaS sector which is good news if you're competing on efficiency and functionality as opposed to relying on network effects.

comment 1y ago · link · parent

This is a nice set of tools. Very useful.

I hope they will also develop a self-hosted standalone service/node which hosts accounts and can support JWTs which I could verify on my own servers so the BetterAuth node would issue JWTs signed with a secret key I provided as an ENV var, then I could verify the JWTs on my own servers. This would be a neat decoupling. Could be offered as a SaaS service as well.

I'm also keeping tabs on https://github.com/stack-auth/stack-auth

comment 1y ago · link · parent

Yes and it may open the door for new platforms with pure backend (BaaS) focus. With AI hallucinations, letting AI write backend code is not feasible due to security implications. Access controls still require a control panel which can be easily audited.

The frontend, however, is a completely different story.

It reminds me of a saying from one of my ex-colleagues "Frontend development is like building a house of cards. If it falls, nobody gets hurt. On the other hand, backend development is like building a house out of wine glasses."

AI and frontends are a natural fit, there is way more tolerance for brittleness 'move fast break things' on the frontend as the consequences of bugs are far less severe.

comment 1y ago · link · parent

Could this be the feature which finally unlocks the potential of my low-code Backend as a Service? https://saasufy.com/

Looking for people to try it out. You just need to create an account on saasufy.com (with GitHub) then paste (or attach) the README.md file from our GitHub https://github.com/Saasufy/saasufy-components/blob/main/READ... inside Claude, telling it what your Saasufy service URL is (shown on saasufy.com dashboard after deployment) then deploy directly from Claude.

This is a good approach. Developers can interact with Claude directly while BaaS platforms like Saasufy can host the backend and data in a secure way. This is ideal because the frontend can tolerate some hallucinations/brittleness, but the backend cannot. This approach could finally support production-ready apps, not just prototypes.

comment 1y ago · link · parent

What this article touches on is why I focused only on the serverless part with my project https://saasufy.com/ and why didn't implement any frontend UI for it (besides the control panel which is only concerned with backend concepts like schema definitions, auth, access control...). Now Claude is allowing generation and hosting of UI apps directly from their chat interface so it would be reinventing the wheel to build a UI.

AI companies are going to be working really hard to ensure that users do not bypass their chat interface because AI APIs don't provide much lock-in factor for them.

comment 1y ago · link · parent

I built a 'serverless' platform that's similar, smaller but more focus on low-code than Supabase https://saasufy.com/

All the components are declarative HTML and update in realtime. Similar concept as HTMX but doesn't require any backend code. You can still implement complex UX, authentication, access control and filtered views (indexing and all).

I built this app with it over a few months as a weekend project: https://www.insnare.net/app/#/onboarding/country/All

comment 1y ago · link · parent

Definition of government funding:

Funding for everyone except you.

comment 1y ago · link · parent

The problem with HTTP2 is that the server-push aspect was tacked on top of an existing protocol as an afterthought. Also, because HTTP is a resource transfer protocol, it adds a whole bunch of overheads like request and response headings which aren't always necessary but add to processing time. The primary purpose of HTTP2 was to allow servers to preemptively push files/resources to clients to avoid round-trip latency; to reduce the reliance on script bundles.

WebSockets is a simpler protocol built from the ground up for bidirectional communication. It provides a lot more control over the flow of data as everything passes over a single connection which has a single lifecycle. It makes it a lot easier to manage state and to recover cleanly from a lost connection when you only have one logical connection. It makes it easier to process messages in a specific order and to do serial processing of messages. Having just one connection also greatly simplifies things in terms of authentication and access control.

I considered the possibility of switching the transport to HTTP2 for https://socketcluster.io/ years ago, but it's a fundamentally more complex protocol which adds unnecessary overheads and introduces new security challenges so it wasn't worth it.

comment 1y ago · link · parent

I meant, it is inconvenient in a web context. People do crazy stuff with JS like minifying it writing it all on one-line in the console during testing. It would be different with Python. Sometimes I do write JS functions as one-liners for testing. The Chrome dev console isn't very good at handling tab characters or new lines.

It opens up a whole new can of worms.

comment 1y ago · link · parent

It's not offensive. It's just very stubborn. JavaScript has been bashed incessantly. People would actively look for all the bad parts just to complain about it... Totally ignoring all the good parts and the fact that it was extremely well adapted to an evolving web environment and also well-suited for being standardized.

The people who are pushing for Python in the browser are going to be in for a shock when they realize how inconvenient Python's indentation is to deal with.

comment 1y ago · link · parent

I made something kind of similar https://saasufy.com/ but currently only tied to a single database but particularly good at scaling real-time updates. I'm looking for a non-tech co-founder who can drive to a niche use case.

As an example of its capabilities I built this from scratch without frameworks and completely server-less (basically just a .html file, .css file and a couple of .js files hosted only on GitHub): https://www.insnare.net/app/#/dashboard/company-filter/tags%...

That entire app is less than 4K lines of code; all frontend code.

comment 1y ago · link · parent

I created a serverless platform and some generic Web Components which let me build highly maintainable applications (which update in realtime) very quickly. It's more versatile than just CRUD as it supports complex views and serverless querying capabilities including fast search with indexing.

Unfortunately, it seems essentially impossible to get get traction in my country so I'm unsure what to do with it. I use it for my own projects. See https://saasufy.com/

comment 2y ago · link · parent

Can be, yes. I think besides the context window size though, there is the issue that performance seems to decline as the input size increases. It can become a problem before you reach the context window size limits.

comment 2y ago · link · parent

I think AI is still nowhere near where it needs to be to provide business value in software development.

As an experiment, some time ago, I tried to build a TODO app entirely with AI prompts. I used a special serverless platform on the backend to store the data so that it would persist between page refreshes. I uploaded the platform's frontend components README file to the AI as part of the input.

Anyway, what happened is that it was able to create the TODO app quickly; it was mostly right after the first prompt and the app was storing and loading the TODOs on the server. Then I started asking for small changes like 'Add a delete button to the TODOs'; it got that right. Impressive!

All the code fit in a single file so I kept copying the new code and starting a new prompt to ask for changes... But eventually, in trying to turn it into a real product, it started to break things that it had fixed before and it started to feel like a game of whac-a-mole. Fixing one thing broke another and it often broke the same thing multiple times... I tried to keep conversations longer instead of starting a new one each iteration but the results were the same.

1
7891011