TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

What codegen is good for

114 点作者 tomduncalf超过 1 年前

16 条评论

thomashop超过 1 年前
<i>Instead of thinking about codegen as a replacement for a developer, what if we thought about it as an extension?</i><p>In my filter bubble most people would already agree with the statement that generative code models are an extension rather than a replacement. It&#x27;s not that revelatory of a statement.<p>Saying they are a replacement without any evidence to suggest this is already starting to happen seems like it&#x27;s taking a larger leap of faith.
评论 #37693907 未加载
评论 #37692383 未加载
jackconsidine超过 1 年前
I thought these were some good ideas. In my experience I vacillate between &quot;omg the singularity is here&quot; and &quot;this actually isn&#x27;t that good for X specific task&quot;.<p>I very much trust the output of LLMs to be well-designed, but I don&#x27;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.<p>Anecdotal but consistent with Figma&#x27;s observation
评论 #37693497 未加载
评论 #37693847 未加载
评论 #37695669 未加载
whywhywhywhy超过 1 年前
&gt; developers, only 3% say that they highly trust the accuracy of these (AI) tools<p>I don&#x27;t believe this at all judging from how I&#x27;ve seen developers using them the past few months. Seems a huge amount of trust in them. Although I&#x27;d say the trust is earned, it&#x27;s shocking how often ChatGPT can completely nail a request.
评论 #37692070 未加载
评论 #37692107 未加载
评论 #37692069 未加载
galkk超过 1 年前
I&#x27;m quite sure that LLM style things will be smart enough to generate things like complicated decision trees and state machines from human explanations, plus test suites and explaining which cases have ambiguity and&#x2F;or missing.<p>I&#x27;m still quite skeptical about generic codegen.
评论 #37695658 未加载
评论 #37695712 未加载
emporas超过 1 年前
I remember back in March, using ChatGPT to generate code, i was not impressed at all. I mean, the code was okey-ish, but nothing that revolutionary.<p>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.<p>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.<p>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.<p>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.<p>Unfortunately the third point rules out any amateur trying to use code generation effectively.<p>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.<p>Does a tool like that exist? I have no doubt, GPT will excel at this, not that difficult but still not trivial task.
评论 #37701180 未加载
评论 #37702214 未加载
评论 #37694630 未加载
narush超过 1 年前
We&#x27;ve thought about this question a lot at Mito[1], where we&#x27;re building a spreadsheet that code-gens Python code for you as you edit it. For us, it&#x27;s been useful to decompose the question of &quot;what code-gen is good for&quot; into a few sub-questions that help us think about how generative AI approaches effect us:<p>1. Why is it necessary to generate code in the first place? Can you just skip to the &quot;solution?&quot; 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?<p>As a Figma user, I&#x27;d answer these in the following way:<p>&gt; Why is it necessary to generate code in the first place?<p>Because mockups aren&#x27;t your production website, and your production website is written in code. But maybe this is just for now?<p>I&#x27;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&#x27;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...<p>In the meantime, while we have websites that don&#x27;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.<p>&gt; Why is just writing the code by the hand not the best solution?<p>For the majority of us full-stack devs who have written &gt;0 CSS but are less than masters, I&#x27;ll leave this as self-evident.<p>&gt; So you do want to do code-gen, does it make sense to do it in a chat interface, or can we do better?<p>In the case of Figma, if they were a new startup with no existing product and they were trying to &quot;automation UI creation&quot; -- v1 of their interface probably would be a &quot;describe your website&quot; and then we&#x27;ll generate the code for it.<p>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.<p>ChatGPT-style code-generation is like v0.1. Github Copilot is an example of next step - it&#x27;s not just a chat interface, it&#x27;s something a bit more integrated into an environment that make sense in the context of the work you&#x27;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.<p>Any thoughts appreciated!<p>[1] <a href="https:&#x2F;&#x2F;trymito.io">https:&#x2F;&#x2F;trymito.io</a>, <a href="https:&#x2F;&#x2F;github.com&#x2F;mito-ds&#x2F;mito">https:&#x2F;&#x2F;github.com&#x2F;mito-ds&#x2F;mito</a> [2] <a href="https:&#x2F;&#x2F;www.figma.com&#x2F;blog&#x2F;building-a-professional-design-tool-on-the-web&#x2F;" rel="nofollow noreferrer">https:&#x2F;&#x2F;www.figma.com&#x2F;blog&#x2F;building-a-professional-design-to...</a>
KronisLV超过 1 年前
Even before LLMs, I think that codegen (the model driven variety) was a good thing!<p>For example, you could throw a WSDL file at SoapUI and get an API client that let you play around with it (<a href="https:&#x2F;&#x2F;www.soapui.org&#x2F;docs&#x2F;soap-and-wsdl&#x2F;working-with-wsdls&#x2F;" rel="nofollow noreferrer">https:&#x2F;&#x2F;www.soapui.org&#x2F;docs&#x2F;soap-and-wsdl&#x2F;working-with-wsdls...</a>) or client code for some frameworks (<a href="https:&#x2F;&#x2F;www.soapui.org&#x2F;docs&#x2F;soap-and-wsdl&#x2F;soap-code-generation&#x2F;" rel="nofollow noreferrer">https:&#x2F;&#x2F;www.soapui.org&#x2F;docs&#x2F;soap-and-wsdl&#x2F;soap-code-generati...</a>), more or less what OpenAPI&#x2F;Swagger is really nice for nowadays: <a href="https:&#x2F;&#x2F;swagger.io&#x2F;tools&#x2F;swagger-ui&#x2F;" rel="nofollow noreferrer">https:&#x2F;&#x2F;swagger.io&#x2F;tools&#x2F;swagger-ui&#x2F;</a> and <a href="https:&#x2F;&#x2F;swagger.io&#x2F;tools&#x2F;swagger-codegen&#x2F;" rel="nofollow noreferrer">https:&#x2F;&#x2F;swagger.io&#x2F;tools&#x2F;swagger-codegen&#x2F;</a><p>You can also do the reverse, say, go from a live MySQL&#x2F;MariaDB database running somewhere or a script to a model of it by reverse engineering (<a href="https:&#x2F;&#x2F;dev.mysql.com&#x2F;doc&#x2F;workbench&#x2F;en&#x2F;wb-reverse-engineering.html" rel="nofollow noreferrer">https:&#x2F;&#x2F;dev.mysql.com&#x2F;doc&#x2F;workbench&#x2F;en&#x2F;wb-reverse-engineerin...</a>), 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: <a href="https:&#x2F;&#x2F;dev.mysql.com&#x2F;doc&#x2F;workbench&#x2F;en&#x2F;wb-design-schema.html" rel="nofollow noreferrer">https:&#x2F;&#x2F;dev.mysql.com&#x2F;doc&#x2F;workbench&#x2F;en&#x2F;wb-design-schema.html</a> and <a href="https:&#x2F;&#x2F;dev.mysql.com&#x2F;doc&#x2F;workbench&#x2F;en&#x2F;wb-forward-engineering.html" rel="nofollow noreferrer">https:&#x2F;&#x2F;dev.mysql.com&#x2F;doc&#x2F;workbench&#x2F;en&#x2F;wb-forward-engineerin...</a><p>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: <a href="https:&#x2F;&#x2F;blog.jetbrains.com&#x2F;dotnet&#x2F;2022&#x2F;01&#x2F;31&#x2F;entity-framework-core-inside-rider-ui-way&#x2F;" rel="nofollow noreferrer">https:&#x2F;&#x2F;blog.jetbrains.com&#x2F;dotnet&#x2F;2022&#x2F;01&#x2F;31&#x2F;entity-framewor...</a><p>Not only that, but OpenAPI&#x2F;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.<p>While most of the codegen I&#x27;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&#x2F;or fine tune as necessary, using the generated stuff as a basis (even though re-generating it would probably overwrite the changes).<p>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&#x27;s no silver bullet, it feels like a value add to me, since there&#x27;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.
Pannoniae超过 1 年前
This article is so misleading.... when someone talks about codegen, it usually means AOP, bytecode manipulation, compiler plugins and the sorts. Not &quot;AI tools&quot;.<p>What is even worse is that this isn&#x27;t even a proper article, this is just a thinly concealed advertisement.
评论 #37692487 未加载
评论 #37693151 未加载
评论 #37692607 未加载
评论 #37693490 未加载
评论 #37692751 未加载
评论 #37692854 未加载
评论 #37692366 未加载
评论 #37693367 未加载
评论 #37692470 未加载
VyseofArcadia超过 1 年前
You keep using that word. I don&#x27;t think it means what you think it means.<p>No, seriously, codegen already has a specific technical meaning. AI generated code vomit needs to be called something else.
评论 #37692168 未加载
评论 #37693454 未加载
mgaunard超过 1 年前
Nonsense article. A compiler generates code. It&#x27;s essential to any software development.
评论 #37692048 未加载
评论 #37693461 未加载
tikkun超过 1 年前
Did anyone else find the layout of the article to be quite tough to read and confusing?
评论 #37692640 未加载
评论 #37693963 未加载
评论 #37693376 未加载
latenightcoding超过 1 年前
Never seen anybody refer to chatgpt code as &quot;codegen&quot;.
评论 #37695532 未加载
评论 #37694232 未加载
评论 #37693689 未加载
arabello超过 1 年前
&gt; <i>Instead of thinking about codegen as a replacement for a developer, what if we thought about it as an extension?</i><p>Who would think otherwise? It seemed pretty clear from the beginning that anything that automatically generates code would act as an <i>assistant</i> rather than a replacement<p>EDIT: Formatting
评论 #37693581 未加载
评论 #37693695 未加载
kaycebasques超过 1 年前
There&#x27;s a few comments in here along the lines of &quot;codegen is not the correct term for describing what LLMs do&quot;. What is the established term?
评论 #37695545 未加载
评论 #37694163 未加载
评论 #37694295 未加载
beaugunderson超过 1 年前
Entire page crashes with &quot;Application error: a client-side exception has occurred (see the browser console for more information).&quot; if HTML5 autoplay is disabled.
评论 #37695982 未加载
IAmGraydon超过 1 年前
I have to say this kind of wreaks of Figma feeling threatened.
评论 #37694283 未加载