HN user

jbeninger

116 karma
Posts0
Comments62
View on HN
No posts found.

Just want to "me too" this. I have two weeks a year where I unplug completely from my daily work and it often results in a new project or skill that I wouldn't have thought of otherwise

Glad I could help. I've been trying to use coding agents more than makes sense this year to get a feel for the tech. There's no good set of guidelines yet and everything feels like secret knowledge.

If you're using a coding agent like codex or claude code, I've also seen marked improvement by telling the agent to keep a journal of decision points, and every file read or written. And then, here's the important part, read the last five journals before starting. It primes the context with whatever you were working on and keeps a new session more focused that if it has to go searching for keywords through the whole codebase. It can also be an interesting read.

But... it shouldn't. People are arguing that a bad abstraction is better than none at all. Badly-implemented abstraction is the same. If you hit code that is duplicated organically a dozen times, you don't make it a baker's dozen. You spend a bit of extra time at least stubbing out the abstraction so future organic duplication can at least share an entry point. Abstractions grow organically too, in well-tended codebases.

The gold standard is code samples. I've got 1000-line convention documents with very simple rules like "Early returns on a single line". Llms sometimes ignore these or misinterpret them in unusual ways.

But if I tell it "read these files that use the same conventions" first, there's no misunderstanding, and the agent also picks up the general "tone" of the code. I have very little to tweak if I've defined the problem well.

I think that AGI will make heavy use of LLMs. It's not a straight path, but a component.

To compare with the human brain, have you ever been so drunk you don't remember the night, but you're told afterwards you had coherent conversations about complex topics? There's some aspect of our minds that is akin to a next-token-generator, pulling information from other components to produce a conversation. But that component alone is not enough to produce intelligence.

I mean, it's not actually autocomplete. But it serves the same role. I know approximately what I want to type, maybe some of the details like argument-order are a bit foggy. When I see the code I recognize it as my own and don't have too much trouble reading it.

But I use LLMs one level higher than autocomplete, at the level of an entire file. My prompts tend to look like "We need a new class to store user pets. Base it on the `person` class but remove Job and add Species. For now, Species is an enum of CAT,DOG,FISH, but we'll probably turn that into a separate table later. Validate the name is just a single word, and indicate that constraint when rendering it. Read Person.js, CODE_CONVENTIONS.md, and DATA_STRUCTURES.md before starting. When complete, read REFACTOR.md"

With the inclusion of code examples and conventions, the agent produces something pretty close to what I'd write myself, particularly when dealing with boilerplate Data or UI structures. Things that share common structure or design philosophy, but not common enough to refactor meaningfully.

I still have to read it through and understand it as if I'd written it myself, but the LLM saves a lot of typing and acts as a second pair of eyes. Codex currently is very defensive. I have to remove some unnecessary guardrails, but it will protect against rare issues I might not have noticed on my first pass.

I've been through a few cycles of using LLMs and my current usage does scratch the itch. It doesn't feel like I've lost anything. The trick is I'm still programming. I name classes and functions. I define the directory structure. I define the algorithms. By the time I'm prompting an LLM I'm describing how the code will look and it becomes a supercharged autocomplete.

When I go overboard and just tell it "now I want a form that does X", it ends up frustrating, low-quality, and takes as long to fix as if I'd just done it myself.

YMMV, but from what I've seen all the "ai made my whole app" hype isn't trustworthy and is written by people who don't actually know what problems have been introduced until it's too late. Traditional coding practices still reign supreme. We just have a free pair of extra eyes.

I've found small features helps. If I ask the ai "do this", I wait 10 minutes for it to be finished, then another 30 understanding what was written

Instead, I start out broad. "I'm thinking of this feature. Let's talk about what components will go into it and where that code will live... Here are my initial thoughts. Let me know if I get anything wrong..."

This puts it in a conversation mode and gets you on the same page, and best of all it's quick. The llm agent isn't searching files and building, it's just giving general opinions

Once I have a good idea of the architecture, I move on to "write this class. Here is an overview of how I would do it", or point the agent to an existing file with the right conventions in place. Once again, if you've done your conversation doesn't take long. 20-second turnaround.

Then it's time to refine. "Move this function here, refactor that"

If you're going to have to understand the code anyway, read it while your writing it. Line by line, function by function, class by class. "Growing" a feature this way keeps you and the llm in sync. It doesn't go off on tangents. And building incrementally keeps you in the loop and in your flow. You don't have 5 things going at once. You have 1, faster.

I've let agents do their thing for a dozen minutes and usually end up having to rewind the whole thing piece by piece to understand what's actually happening

If you're truly vibe coding, maybe you don't have to read the code and can have a dozen agents on a dozen projects. But if you're making Serious Software, I don't see how you can commit code unseen. And in that case, you're not losing anything working incrementally and reading code as it's written?

FracturedJson 7 months ago

I'm in the JS ecosystem pretty regularly and "restrictive with no benefit" is the right description. I use JSON5 now when I have to, which greatly reduces the restrictions. I already have a build step so throwing in a JSON5 -> JSON converter is negligible.

As for FracturedJson, it looks great. The basic problem statement of "either minified and unreadable or prettified and verbose" isn't one I had put my finger on before, but now that it's been said I can't unsee it.

The pivot 9 months ago

I think the point though is it's not a "story". It's a fundamental shift. The shift is subtle and doesn't lend itself to sensationalism.

Entire countries have built their clout on fossil fuels. Wars have been fought. Now any country with a sufficient manufacturing base can be energy independent. And the resource is less controllable by a small group of people.

AI and geopolitics and everything else is huge right now, but they're being bent to the will of the current world order. The article is saying that that world order is going to change.

I think we're still missing an "open social" closed social network. Something like old-Facebook where you can post to an intimate audience of friends and family, and your feed isn't stuffed full of ads and influencers. Just a little private windows into your friends' lives.

That feels like something that could displace other social media in a way that's difficult for for-profit businesses to replicate since it goes against every product manager's instinct to leave engagement on the table, and would stand in stark contrast to the current social media landscape.

Same here. I was surprised at everyone here who prefers the more-complicated-but-arguably-more-intuitive lexical sort. Naive alphabetical sorts break some expectations, but don't produce any weird edge cases.

I wonder if there's an age divide at play here, where those of us who grew up with the naive alphabetical sort prefer it.

Developer's block 11 months ago

That is a great insight. Often the thought that breaks through developer block for me is "<sigh> fine, I guess I can't do it that way"

It depends. I had an LLM whip up a JavaScript function "theThursdayAfterNextSunday"

JavaScript isn't my primary language and date functions are always a pain. But I know enough to review and test the code quickly. It doesn't change a 1-week project into a 4-hour one, but it can change a 20-minute project into a 5-minute one.

The thing about being left handed is your hand will naturally drag across the fresh ink of a fountain pen.

I bought mine from therealreal.com. I got a lot more ring than I'd normally be able to afford, and it's an elegant design you don't see everywhere.

Check with the recipient beforehand, of course. You're not the one who has to wear it, and no amount of logic is going to change a mind that wants a brand new, natural diamond.

I think there's a bit of an "everybody knows that" [1] phenomenon when it comes to knowledge like this. Devs come from different backgrounds and work on different types of projects. There are 10000 things you expected to know to be an expert, and all of us are continually learning.

[1] https://xkcd.com/1053/

I'd say I write the majority of my code in areas I'm familiar with, but spend the majority of my _time_ on sections I'm not familiar with, and ai helps a lot more with the latter than the former. I've always felt my coding life is speeding through a hundred lines of easy code then getting stuck on the 101st. Then as I get more experienced that hundred becomes 150, then 200, but always speeding through the easy part until I have to learn something new.

So I never feel like I'm getting any faster. 90% of my time is still spent in frustration, even when I'm producing twice the code at higher quality

What I mean is it would involve cryptographic signing to keep your data in "your network". Your friends can always download and share an image you've posted, of course, but it wouldn't be just stored out in the open somewhere. Content you post could only be unlocked by a key from your network. Threaded discussion could be limited to just a set of friends you choose, and their friends, by limiting the keys you distribute as part of the first post.

So blockchain has some similarities in that it allows a decentralized way of managing communication through cryptographic signing, but the core of blockchain is that it provides a full "chain" of transactions going back to the beginning of time, whereas this idea is less "chainy" and more of a graph, or maybe a bunch of little chains, each originating from your profile

I've often thought that what we need is a social network. You only see your friends, and your friends' friends, and so on. With tools for blocking branches of the graph and restricting views to those friends. All controlled by signed content. A blockchain without the "chain" bit, I guess.

The devil is in the details, of course. Is it even possible to thread the needle of usability and controlling your own data/algorithm? Maybe! But if there's going to be a human island, I think this is the way. Individual trusted connections branching out from you.