8 ms·
Explain how fragility of implementation, like spaghetti code, high coupling low cohesion fit into your world view?
by awakeasleep 7mo ago
Explain how fragility of implementation, like spaghetti code, high coupling low cohesion fit into your world view?
- datsci_est_2015 7mo agoAlso developer UX, common antipatterns, etc This “the only thing that matters about code is whether it meets requirements” is such a tired take and I can’t imagine anyone seriously spouting it has has had to maintain real software.
- vova_hn2 7mo agoI personally haven't made my my mind either way yet, but I imagine that a vibecoding advocate could say to you that maintaining code makes sense only when the code is expensive to produce. If the code is cheap to produce, you don't maintain it, you just throw it away and regenerate.
- sarchertech 7mo agoIf you have users, this only works if you have managed to encode nearly every user observable behavior into your test suite. I’ve never seen this done even with LLMs. Not even close. And even if you did it, the test suite is almost definitely more complex than the code and will suffer from all the same maintainability problems.
- raw_anon_1111 7mo agoAnd in that case how is it different than when random developers come on and off projects?
- sarchertech 7mo agoFor one you don't let random devs hop on and off projects without code reviews, which is what people who say they don't care about the code should be doing. And 2 clearly agents are worse at reasoning through code changes than humans are.
- raw_anon_1111 7mo agoAnd the team lead with 7 developers isn’t going to be doing code reviews of all the code. At most he is going to be reviewing those critical paths. I could care less about the implementation behind the vibe coded admin website that will only be used by a dozen people. I care about the authorization. Even the ETL job, I cared only about the performance characteristics, the resulting correctness, concurrency, logging, and correctness of the results.
- sarchertech 7mo ago>And the team lead with 7 developers isn’t going to be doing code reviews of all the code. At most he is going to be reviewing those critical paths. Why would the team lead need to review all 7 developers? If you're regularly swapping out every single developer on a team, you're gonna have problems. >I could care less about the implementation behind the vibe coded admin website that will only be used by a dozen people. I care about the authorization. If you only have 12 users sure do whatever you want. If you don't have users nothing is hard.
- raw_anon_1111 7mo agoIt was 12 users who monitored and managed the ETL job. If I had 1 million users what difference would the front end code have made if the backend architecture was secure, scalable, etc. if the login is taking 2 minutes. I can guarantee you it’s not because the developer failed to write SOLID code…
- sarchertech 7mo agoThere you go arguing with strawmen again. I don’t give a single flying flip about SOLID, or Clean Code, or GoF. People who read Clean Code as their first programming but and made that their identity have been the bane of my existence as a programmer. It’s not about how long something is taking although that is an observable behavior. It’s about how 1 million users over time will develop ways of using your product that you never thought about, much less documented or tested. Perhaps you’ve heard the phrase “The purpose of the system is what it does”? The system is the not the spec or the tests. An agent is only reasoning about how to add a new feature, and the only thing preventing from changing observable behavior is the tests. So if an agent is changing untested behavior it’s changing the purpose of the system.
- raw_anon_1111 7mo agoThe developer UX are the markdown files if no developer ever looks at the code. Whether you are tired of it or not, absolutely no one in your value you chain - your customers who give your company money or your management chain cares about your code beyond does it meet the functional and non functional requirements - they never did. And of course whether it was done on time and on budget
- sarchertech 7mo ago[dead]
- raw_anon_1111 7mo agoAWS S3 by itself is made up of 300 microservices. Absolutely no developer at AWS knows how every line of code was written. The scalability requirements are part of the “non functional requirements”. I know that the vibe coded internal admin website will never be used by more than a dozen people just like I know the ETL implementation can scale to the required number of transactions because I actually tested it for that scalability. In fact, the one I gave to the client was my second attempt because my first one fell flat on its face when I ran it at the required scale
- sarchertech 7mo agoI'm not talking about scalability requirements. I'm talking about the different workflows that 10 million people will come up with when they use a program that won't exist in any requirements docs.
- raw_anon_1111 7mo agoDo you think that AI coded implementations just magically get done witkoug requirements?
- sarchertech 7mo ago
- petcat 7mo agoAs human developers, I think we're struggling with "letting go" of the code. The code we write (or agents write) is really just an intermediate representation (IR) of the solution. For instance, GCC will inline functions, unroll loops, and myriad other optimizations that we don't care about (and actually want!). But when we review the ASM that GCC generates we are not concerned with the "spaghetti" and the "high coupling" and "low cohesion". We care that it works, and is correct for what it is supposed to do. Source code in a higher-level language is not really different anymore. Agents write the code, maybe we guide them on patterns and correct them when they are obviously wrong, but the code is just the work-item artifact that comes out of extensive specification, discussion, proposal review, and more review of the reviews. A well-guided, iterative process and problem/solution description should be able to generate an equivalent implementation whether a human is writing the code or an agent.
- sarchertech 7mo agoA compiler uses rigorous modeling and testing to ensure that generated code is semantically equivalent. It can do this because it is translating from one formal language to another. Translating a natural prompt on the other hand requires the LLM to make thousands of small decisions that will be different each time you regenerate the artifact. Even ignoring non-determinism, prompt instability means that any small change to the spec will result in a vastly different program. A natural language spec and test suite cannot be complete enough to encode all of these differences without being at least as complex as the code. Therefore each time you regenerate large sections of code without review, you will see scores of observable behavior differences that will surface to the user as churn, jank, and broken workflows. Your tests will not encode every user workflow, not even close. Ask yourself if you have ever worked on a non trivial piece of software where you could randomly regenerate 10% of the implementation while keeping to the spec without seeing a flurry of bug reports. This may change if LLMs improve such that they are able to reason about code changes to the degree a human can. As of today they cannot do this and require tests and human code review to prevent them from spinning out. But I suspect at that point they’ll be doing our job, as well as the CEOs and we’ll have bigger problems.
- 7mo ago
- raw_anon_1111 7mo agoYou did see the part about my unit, integration and scalability testing? The testing harness is what prevents the fragility. It doesn’t matter to AI whether the code is spaghetti code or not. What you said was only important when humans were maintaining the code. No human should ever be forced to look at the code behind my vibe coded internal admin portal that was created with straight Python, no frameworks, server side rendered and produced HTML and JS for the front end all hosted in a single Lambda including much of the backend API. I haven’t done web development since 2002 with Classic ASP besides some copy and paste feature work once in a blue moon. In my repos - post AI. My Claude/Agent files have summaries of the initial statement of work, the transcripts from the requirement sessions, my well labeled design diagrams , my design review sessions transcripts where I explained it to client and answered questions and a link to the Google NotebookLM project with all of the artifacts. I have separate md files for different implemtation components. The NotebookLM project can be used for any future maintainers to ask questions about the project based on all of the artifacts.
- sarchertech 7mo ago> It doesn’t matter to AI whether the code is spaghetti code or not. What you said was only important when humans were maintaining the code. In my experience using AI to work on existing systems, the AI definitely performs much better on code that humans would consider readable. You can’t really sit here talking about architecting greenfield systems with AI using methodology that didn’t exist 6 months ago while confidently proclaiming that “trust me they’ll be maintainable”. Well you can, and most consultants do tend to do that, but it’s not worth much.
- raw_anon_1111 7mo agoI wasn’t born into consulting in 1996. AI for coding is by definition the worse today that it will ever be. What makes you think that the complexity of the code will increase faster than the capability of the agents?
- sarchertech 7mo ago
- soulofmischief 7mo agoI would like to introduce you to the concepts of interfaces and memory safety. Well-designed interfaces enforce decoupling where it matters most. And believe it or not, you can do review passes after an LLM writes code, to catch bugs, security issues, bad architecture, reduce complexity, etc.
- icedchai 7mo agoIn my experience, consulting companies typically have a bunch of low-to-medium skilled developers producing crap, so the situation with AI isn't much different. Some are better than others, of course.