337 karma · joined November 1, 2014
list top 10 hip hop artists from the year 2014 |> sortBy(chart performance, descending)
This stuff is experimental and not 100% yet, but it does mostly work today, just days after SudoLang was specified. And you don't even need to paste the spec: the whole language is inferable by GPT-4.
What you don't see in these comments is that SudoLang went viral overnight. Tens of thousands of people heard about it and the blog post comments are overwhelmingly positive.
As a programming assistant, SudoLang is already saving me time producing traditional software in JavaScript, but the real unlock is defining unambiguous requirements for complex programs that run directly on the LLM: Chatbots or productivity tools that require NLU - programs with enough complexity that a freeform natural language prompt just doesn't express easily (see the examples folder).
SudoLang meaningfully extends our ability to clearly communicate complex ideas with LLMs, and it's a language that LLMs and programmers and beginners learning to code all intuitively understand.
It opens up a middle ground between natural language and formally structured language and that does in fact open up new possibilities.
The people comparing the syntax of one-liners are missing the point. If you can clearly communicate the idea in natural language, just do that. In fact, that recommendation is right inside the style guide. But you can also do things like declaratively communicate the structure of objects for talking with REST APIs, clearly specify behaviors and requirements, etc.. things that need to be clearly specified and not just invented/improvised/hallucinated by the LLM.
SudoLang's infinitely inferable standard function library with modifiers can be easily and declaratively chained to radically simplify chain-of-thought reasoning: a process that helps LLMs think about tasks more carefully and produce better results.
It's OK that lots of people don't see the value, yet. It often takes time to warm up to new ideas. When I first started using GPT-3 in 2020 nobody believed me when I said it could code. Today, coders who employ AI tools are 2x faster than those who don't (this stat comes from a study on GitHub copilot comparing 95 devs working on the same task).
Thanks for your encouraging remarks.
The first is: Requirements change.
For many reasons. User needs change. Business processes change. Technology evolves.
If you're going to keep up, you must design code that is easy to change.
Code that is easy to change tends to be code that can work with lots of different code.
Code that can work with lots of different code tends to lean towards the general end of the spectrum, rather than being too specific.
Designing code that is modular does not mean that you need to over-engineer, and it doesn't even mean that it needs to be used more than once.
It should mean that the code has locality: The ability to understand the full effect of the code without also understanding the full context of the code around it or the full history and future life of every external variable it uses.
It may sound to new developers like I'm talking about something complicated, but it's the opposite:
Code that can be easily adapted to future use-cases tends to be more simple. It tends to know the least about it's environment. It tends to do only one thing, but do it so well as to be perhaps the optimal solution.
What follows from the first principle is perhaps the most important principle in software development. Remember this and you'll find yourself needing to do a small fraction of the work you once did to produce the same value:
A small change in requirements should lead to only a small change in implementation.
Mileage can and does vary. Airbnb noted a significant benefit from TypeScript. I suspect you could reproduce Airbnb's results if you had a good design review process and poor test coverage.
Lots of people share your views. A lot of people love using TypeScript because it feels satisfying and the intellisense you get with it is really nice. I'm not saying anybody is wrong for feeling that way -- only that on the projects we used it for, ROI was not good.
In my experience, TypeScript does not reduce the number of tests you need to write.
It has the disadvantage of being annoyingly verbose compared to TypeScript though, so I guess the score here is:
JSDoc: Documentation that stays in sync, powers editor tooling: 1 Works with standard JS: 1 Generates better API docs: 1
TS: Documentation that stays in sync, powers editor tooling: 1 Requires compile-to-JS: 0 Less verbose than JSDoc: 1 WAY more fun to write: 1 Lacks prose descriptions for documentation: 0
JSDoc: 3 TypeScript: 3
Beyond that, a good software engineer would have ensured that the specification made sense, that the integration with the rest of the system made sense, and that a sensible override system was part of the system design.
That said, the bulk of the article focuses on management's failure to ensure that quality was a priority, and to communicate that clearly in the company culture.
I do consider TDD and code reviews are costly but you can't skip them with TypeScript because at least 80% of bugs are not detectable with TypeScript.
As for the bug reducing benefit, yes it's up to 20% if you do nothing but TypeScript. As explained in the article, 80% of bugs can't be addressed by static types at all, so you can't skip the other measures safely. The zero point includes the other measures, which easily cover 90%+ reductions, combined.
Since other measures catch type errors, too, we apply the TypeScript reduction after discounting the other errors caught. Even with the maximum benefit of the doubt, assuming TypeScript catches 20% of the remainder, it's still a small percent of a small percent. You get exponentially diminishing returns with each bug prevention measure you apply, and TypeScript can't catch the lion's share of bugs, so it's the only one that makes sense to leave out as a quality control measure.
1. I get type feedback in my browser with inference. 2. I get near real-time feedback from TDD on file save. 3. I get real-time lint feedback, too.
The net result is I get several multiples better bug coverage than TypeScript alone can provide at about the same speed -- while writing idiomatic JS.
The study then finds that about 80% of the bugs they found were not simply ts-undetectable, but not type errors at all. Instead, they're things like the wrong URLs being used (sting errors), wrong branching logic, wrong predicate logic, etc.
That means the maximum effect must be less than 20%, but the authors couldn't detect 20% even knowing exactly what the bug and fix was, down to the line numbers and exact code used to fix the bug.
Even being extremely generous and assuming they could fix 20% of remaining bugs, it's too far down the ladder of exponentially diminishing returns to make much difference at that stage.
I wish.
As for the ROI analysis, the article clearly states that the objective data was too noisy to use, clearly explains why, clearly states which data is subjective, and provides readers with guidance on how to interpret the subjective data.
There's nothing dishonest about it. It is not "science", and does not claim to be, though it does cite some real science. It is an anecdotal opinion piece, though that opinion is well informed and supported by some "real science".
It should be interpreted as an anecdotal opinion, not a formal research study -- as with any small data sampling. You can't draw definitive, objective conclusions from it.
Some people have had overwhelmingly positive results with TypeScript. We need a lot more people to share their experiences before we can start to say anything objective about it. Please don't discourage them from sharing their opinions, no matter which side of the ROI spectrum they favor.