114 points · by tomduncalf · 3y ago · 102 comments
In my filter bubble most people would already agree with the statement that generative code models are an extension rather than a replacement. It's not that revelatory of a statement.
Saying they are a replacement without any evidence to suggest this is already starting to happen seems like it's taking a larger leap of faith.
plus ca change
Not to mention ChatGTP is already has most of the skills needed to be a reasonable replacement for most of my customer service interactions. Not all, but somewhere around 70% I’d say.
Not trying to be alarmist, but I feel we’re going to have to rethink labor in both large and small ways.
Those are physical labour based industries, and dexterity robots are very, very expensive and not cost competitive with humans.
Low end, phone/chat only customer service will be replaced very soon. But what's next in line is millions of white collar jobs, from medicine to law to accountancy to teachers.
You are like 2 years behind, the 'truck drivers will be replaced first' narrative has long been flipped on its head.
Maybe we should take your insight with a giant grain of salt. Especially since it's not groundbreaking.
Why doesn't HN have a downvote option?
I very much trust the output of LLMs to be well-designed, but I don't trust things to just work, especially if the system is complicated. I experimented a bit the past few days doing a task myself (building an interface in an existing project), using AI assist, and trying to get AI to solve completely (GPT-4). The solve completely pathway failed and I found myself in an interminable loop. AI-assist was a solid experience.
Anecdotal but consistent with Figma's observation
I've been coding for 15 years, but on my NAS I still use the Synology reverse proxy so I don't have to deal with Traefik and self signed SSL.
Even with GPT-4, if you ask it for anything interesting, it often produces code that not only won't work, but that couldn't possibly work without a major rewrite.
Not sure what you've been requesting if it's always been good output. Even when asking GPT-4 for docs I've had it hallucinate imaginary APIs and parameters more often than not.
Maybe the questions I ask are not as common? Given my experiences, though, I wouldn't recommend it to anyone for fear it gave them profoundly bad advice.
However it’s been great at being my rubber duck and it’s been great as a tool for helping me eg write complex SQL queries — never without me being a key part of the loop, but as a tool to help me fill in gaps in my own skills or understanding. That is, it amplified my abilities. It was also pretty good at creating interesting metaphors for existing concepts, explaining terminology and even explaining bits of code I gave it.
Great tool! Saves a ton of time! Not a dev replacement (yet)
I don't believe this at all judging from how I've seen developers using them the past few months. Seems a huge amount of trust in them. Although I'd say the trust is earned, it's shocking how often ChatGPT can completely nail a request.
I won't argue the metrics but while I generally trust Copilot and ChatGPT, I would not say I "highly trust" them.
I'm still quite skeptical about generic codegen.
I'm not.
Fast forward 3 months, i learned to use the tool, now i use it all the time to generate code. There are some ways to use it, and really shine as a tool.
1) It works well for CLI tools. It knows thousands of linux commands and can use them flawlessly most of the time. Any recombining of existing command line tools, is easy as a breeze.
2) Try to use it on a language with an as strict compiler as possible. Rust is the most obvious and modern candidate. Untyped or dynamically typed languages like Python and Angular are far from ideal and should be avoided. Typescript is one more obvious language of choice.
3) Jargon of programming, and knowledge about libraries in the programming language are very important. Being as specific as possible about libraries, maybe even modules and functions makes all the difference.
Unfortunately the third point rules out any amateur trying to use code generation effectively.
The following days, i want to use GPT to create a notification system for HN comments, like a daemon running in the background, which downloads my comment page, saves all comments on a database, and for every reply, it sends a notification, using notify-send with the user and the first 10 words of the reply. Maybe a subtle sound effect as well, like gmail, or facebook.
Does a tool like that exist? I have no doubt, GPT will excel at this, not that difficult but still not trivial task.
For not knowing rust, I'm pretty impressed!
The username, of which the comments it is looking for, is hardcoded into the code. The standard convention for CLI tools, is to create a .rc file, like .hn_reply_notifierrc and save some configuration in there.
The way your program is configured, the next user will have to recompile the code with the new username. That's a big no-no!
It is so much fun to use GPT that way, that i cannot resist but generate my own program, and i will share with you on github the resulting code, alongside with the GPT conversation.
I can't wait to see your attempt!
1. Why is it necessary to generate code in the first place? Can you just skip to the "solution?" 2. Why is just writing the code by the hand not the best solution? 3. So you do want to do code-gen, does it make sense to do it in a chat interface, or can we do better?
As a Figma user, I'd answer these in the following way:
> Why is it necessary to generate code in the first place?
Because mockups aren't your production website, and your production website is written in code. But maybe this is just for now?
I'm sure some high-up PM at Figma has this as their goal - mockup the website in Figma, it generates the code for a website (you don't see this code!), and then you can click deploy _so easily_. Who wants to bet that hosting services like Vercel etc reach out to Figma once a week to try and pitch them...
In the meantime, while we have websites that don't fit neatly inside Figma constraints, while developers are easier to hire than good designers (in my experience), while no-code tools are continually thought of as limiting and a bad long-term solution -- Figma code export is good.
> Why is just writing the code by the hand not the best solution?
For the majority of us full-stack devs who have written >0 CSS but are less than masters, I'll leave this as self-evident.
> So you do want to do code-gen, does it make sense to do it in a chat interface, or can we do better?
In the case of Figma, if they were a new startup with no existing product and they were trying to "automation UI creation" -- v1 of their interface probably would be a "describe your website" and then we'll generate the code for it.
This would probably suck. What if you wanted to easily tweak the output? What if you had trouble describing what you wanted, but you could draw it (ok, OpenAI vision might help on this one)? What if you had experience with existing design tools you could use to augment the AI. A chat interface is not the best interface for design work.
ChatGPT-style code-generation is like v0.1. Github Copilot is an example of next step - it's not just a chat interface, it's something a bit more integrated into an environment that make sense in the context of the work you're doing. For design work, a canvas (literally! [2]) like Figma is well-suited as an environment for code-gen that can augment (and maybe one day replace) the programmers working on frontend. For tabular data work, we think a spreadsheet is the interface where users want to be, and the interface it makes sense to bring code-gen to.
Any thoughts appreciated!
[1] https://trymito.io, https://github.com/mito-ds/mito [2] https://www.figma.com/blog/building-a-professional-design-to...
For example, you could throw a WSDL file at SoapUI and get an API client that let you play around with it (https://www.soapui.org/docs/soap-and-wsdl/working-with-wsdls...) or client code for some frameworks (https://www.soapui.org/docs/soap-and-wsdl/soap-code-generati...), more or less what OpenAPI/Swagger is really nice for nowadays: https://swagger.io/tools/swagger-ui/ and https://swagger.io/tools/swagger-codegen/
You can also do the reverse, say, go from a live MySQL/MariaDB database running somewhere or a script to a model of it by reverse engineering (https://dev.mysql.com/doc/workbench/en/wb-reverse-engineerin...), so that you can explore and change it in a visual manner. You can take either that, or a model created from scratch and either synchronize it with an existing schema, or get the full set of SQL migrations for setting it up from scratch: https://dev.mysql.com/doc/workbench/en/wb-design-schema.html and https://dev.mysql.com/doc/workbench/en/wb-forward-engineerin...
Codegen like that can even extend across architecture tiers. For example, I can take a live database with said schema, connect JetBrains Rider with an EntityFramework plugin (using ASP.NET and C# here as an example, though similar solutions exist in Java and other tech stacks) and generate a set of entities with mostly correct data types and relation mappings automatically: https://blog.jetbrains.com/dotnet/2022/01/31/entity-framewor...
Not only that, but OpenAPI/Swagger codegen is integrated in ASP.NET so I can also end up with a web based UI to test any APIs that I might make, should I opt to create controllers that use those entities.
While most of the codegen I've seen in an academic context has been more or less a mess (broken Eclipse plugin based tools), practical approaches like this are wonderful - for the more boring and boilerplate stuff, I can basically draw a few boxes and get bunches of SQL and C# code that I can then change and/or fine tune as necessary, using the generated stuff as a basis (even though re-generating it would probably overwrite the changes).
LLMs feel like the logical next step: feed in a bunch of projects and language documentation and you can query the LLM with various questions about how to do something, to at least sometimes send you on the correct search path yourself without having to jump around 15 different documentation pages, maybe only 5 will suffice now. I use ChatGPT fairly liberally for my personal projects and while it's no silver bullet, it feels like a value add to me, since there's a surprising amount of boilerplate out there for the boring problems that I solve, with every framework and language solving the same stuff in slightly different ways.
What is even worse is that this isn't even a proper article, this is just a thinly concealed advertisement.
I have found the opposite to be true, starting this year. You can commiserate with people who are interested in cryptography.
- "Dexter" is no longer "Dexter's Lab" (It's Darkly Dreaming Dexter)
- "Dark Descent" is no longer "Amnesia" (It's some other game)
- "Server" no longer means "server" (It means a Discord guild)
- "Serverless" now means "On a server"
- "Operating system" sometimes means "web app"
- "Powered by" has nothing to do with power
And Internet speeds are still measured in bits, in case anyone is not running the latest System/360
Jason isn't my friend anymore, but a data interchange format.
Neither is Kate, she's how I orchestrate my containers.
Ghosting doesn't involve poltergeists or a Halloween, Zoom isn't a function on my camera, and fishing steals my data and doesn't get me delicious salmon.
This feels like a JVM-land interpretation? I think it's quite domain-specific.
This is an odd take to me when LLMs are very, very good at generating code, which has got a lot of attention recently. Sure it may be a different beast from what we've currently identified as "codegen" but it remains a descriptive term for the code-generating technology.
Codegen's long history of macro-fied (or similar kind of scripting) source writing matters here. It has the very important property of having consistent/deterministic output from a process that can be verified with very high confidence by rudimentary human inspection.
It's like calling autocomplete "codegen".
I truly love LLM-assisted coding. I would never call it codegen, and think it can even be unethical to do so when the stakes are high, because it gives it the veneer of trustworthiness that lends one to carelessly not audit it.
LLM-aided code writing should, IMO, be called "code assist", not "codegen".
Ummm.... Awful code that often looks right at first glance, maybe.
Maybe LLMs can generate the kind of code that's really shallow in its complexity, but for literally everything I would call interesting LLMs have produced hot garbage. From "it doesn't quite do what I want" to "it couldn't possibly work and it's extremely far from being sane," though it always looks reasonable.
> Maybe LLMs can generate the kind of code that's really shallow in its complexity, but for literally everything I would call interesting LLMs have produced hot garbage. From "it doesn't quite do what I want" to "it couldn't possibly work and it's extremely far from being sane," though it always looks reasonable.
None of this has any bearing.
No, seriously, codegen already has a specific technical meaning. AI generated code vomit needs to be called something else.
I'm not seeing anything immediately obvious to exclude AI-synthesized code from the "codegen" label.
Take for example "go gen", React or Markdown to html, Helm templates, generics, Lisp, ... people think of these as code generation.
Taken further, both humans and LLMs generate code based on fuzzy statements
A transpiler is doing code gen as well, very similar to your link, but a different, typically text based, target
Still code generation according to Wikipedia:
> Source-code generation is the process of generating source code based on a description of the problem[9] or an ontological model such as a template and is accomplished with a programming tool such as a template processor or an integrated development environment (IDE). These tools allow the generation of source code through any of various means.
The actual content felt a bit tortured as well which didn't help anything.
Well, it seems it will be another round of terminology abuse.
Many results
We talk about it in our Readme, under features > chat
> Combine LLM and Hof code gen for better, scalable results
Who would think otherwise? It seemed pretty clear from the beginning that anything that automatically generates code would act as an assistant rather than a replacement
EDIT: Formatting
Many people call it code gen, I would wager that it is at least a plurality that use "code gen" for what LLMs do.