237 points · by sadiq · 3y ago · 199 comments
My idea of enjoyable high-quality programming isn’t to dip a spoon into an ocean of soup made of other people’s random design decisions and bugs accumulated over fifteen years, hoping to get a spoonful without hidden crunchy insect bits.
I know the soup is nutritious and healthy 98% of the time, and eating it saves so much time compared to preparing a filet mignon myself. But it’s still brown sludge.
By averaging, a lot of imperfections get diluted away.
Like in Anna Karenina "happy families are all alike, unhappy ones are each in its own way". The defects are idiosyncratic, the commonalities are good.
[1] https://fstoppers.com/portraits/average-faces-women-around-w...
Multi-sourced accumulated unmaintained amateur software without clear provenance or ownership is more like creating a feature I'll call "insta-legacy": now you're responsible for a bunch of code you didn't write that by definition nobody you have access to understands.
This is absurd.
It's not going to stop people from doing it. The industry is clinically insane.
It allows people who do bad work to do more of it quickly. Before they had to manually shovel garbage into projects but now they have a dumptruck.
You know what? It might be fine. Maybe we're going to have a world of fast food programming where minimum wage coders pump out trash and there's going to be Michelin star programmers where you go to for the real stuff.
If that's the case, we'll have to somehow educate the public on the difference so they don't think it's the same thing. McDonald's and The French Laundry are both successful restaurants. That world is possible in programming as well.
It might already be like that. The cheap rates for shady contracting firms that do trash work are probably already using these things
https://arxiv.org/abs/2206.08896
The idea is: LLMs know how to modify code in semantically useful ways. Evolutionary algorithms are great at search, but don't learn new mutations by themselves. So combine them together to generate new data and retrain the models.
So the old system is: scrape human code and train on it. the new system is: generate code, keep the good parts and retrain. It only costs electricity and is open-ended.
> Maybe we're going to have a world of fast food programming where minimum wage coders pump out trash and there's going to be Michelin star programmers where you go to for the real stuff.
It sounds like your concern isn't that it's going to to a poor job, it's that it's actually going to do a good job and you will no longer be able to differentiate your work.
If what you're delivering is so much more valuable then there is no threat and no concern to be had. I believe the concern is that this actually will solve peoples problems or much cheaper to almost free and as a result people will use it. And use it tons. And that's a legit fear to have, but I don't think it should be wrapped up in calling it's output McDonalds's of code.
The better analogy in my mind is a collection of wine connoisseurs seeing the rise of something like 2 buck chuck and trashing it for not being snobby. Deriding it for not having "grapefruit mouthfeel" or something. When in fact most people just want a easy to drink wine that goes with what they're having or dinner - and none of the the extra.
If this code doesn't help people out then people won't use it, if it does, and the "French Laundry" of code is important only to the chef's working there and not anyone else, then we'll find that out pretty soon.
The real issue is potentially getting "French Laundry" quality (or a step just shy) for an every day meal price .
Also known as:
• Getting hired at a software company that already exists
• Having co-workers leave the project
• Importing frameworks or libraries you didn't write
Software on the other hand is a logical environment with clear, logical requirements. It ought to work, not just fall apart randomly.
There is no guarantee that sticking the average of one software into a completely different one will satisfy the logical requirements by any means whatsoever.
I can see us switching from programing languages to some new type of logical construct that AI excels at.
Also, when you average you don't really kill "defects", but rather outliers. An "outlier" statement within a program is very likely to do something important, e.g. taking care of a corner case, otherwise it wouldn't be there.
(My experience with Copilot and ML-assisted programming has been extremely positive, I would not choose to go without it at this point)
Also, unrelated: Leo Tolstoy had his number of problems with his wife and wrote them into Anna Karenina. In fact, it is quite contrary: most disfunctional families fall into several textbook scenarios, while happy families has their own distinct inner dynamics, just looking the same on the outside.
This "study" and your argument are meaningless.
> Futurists in 1950: Automation will free mankind from meaningless tedium to focus on creative pursuits only humans can master.
> Techbros in 2023: We coded AI to write all your books, music, and TV so you can focus on the meaningless tedium of your cubicle farm.
From this popular tweet by @stealthygeek https://twitter.com/stealthygeek/status/1618997354199400449Are they going to follow the luddites and call for people to storm data centers and smash the GPUs?
a big part of me not liking windows and preferring the open source world was also not wanting to use the lowest common denominator quality operating system and applications.
handmade, handcrafted stuff will be always head and shoulders above the rest, software included.
In both cases the problem is the same, and hearkens back to Reflections on Trusting Trust. The total amount of code necessary to implement a useful system is far too large for anyone to fully understand and audit.
A question of volume, surely? It might be OK for snippets, but once you've added a million lines of AI code to your codebase, when are you going to get around to reading it?
Like libraries, you hit a button and add thousands to millions of LOC. If it appears to work, are you going to read it?
What I see is a person who copy and pastes crap around until it works and calls it a day. I think code assistants can and will compete with them.
I love to solve _problems_ and to help people with it, but sometimes I just hate to write code to solve them. I wish my computer could have a clear picture of the solution that is in my mind so I didnt have to write a single line of code, so I could focus on the creative part of the problem solving
But I totally agree with you that it would be a positive outcome if we spent less time writing lines of code and more time using better tools to direct computers in solving problems and (I think just as critically) understanding the dynamics of those solutions. A major facet of my skepticism is that I think progress on that second part seems to be lagging way behind...
I foresee a lot of "we had a team, who have all now left, that used AI to write this system and it's mostly working right except in all these ways, and you need to fix it, good luck!" in all of our futures.
It is going to be incredibly easy for people to be the 100x programmer who always delivers on time and promptly leaves for a higher paying job, leaving the debris in the hands of some poor sod who knows nothing about the code or the decisions that led to it.
What AI will do in this scenario is make the "creative" part much easier and jolly and the maintenance part much more painful and frustrating.
[0]: https://www.semafor.com/article/01/27/2023/openai-has-hired-...
The six figure salaries won't last another decade. For some of us, maybe, but certainly not most of us.
Learn AI now.
Good luck, everyone.
It really doesn't take that much time to teach the CS fundamentals needed to help you figure out where to put the generated code. Or even to know how to prompt it.
Our careers as high earners are collectively doomed. I really didn't expect LLMs to get this good until 2025 minimum. Pretty sad that "learn to code" is gonna be dead. It was the only place where the American dream was still alive.
But I don't buy the "joy of writing code" argument. Coding is all about making a computer work for you, and I think that taming AIs to be more efficient without letting it introduce random crap will become both important and enjoyable. I think the techniques we have now are too crude for that, but it will improve. Keep in mind that even if you are writing C, you are already at high level, using libraries and compilers other people wrote, bugs included.
Now there is a certain charm being close to "hands on" programming, but if that's the case, go get an Amiga and make a few demos. It won't pay the bills, but it can be fun.
That is an absolutely valid point of view. But it doesn't apply to everyone. Programming is something that can take me into the zone like nothing else. And it has the added side effect of making me think more precisely about higher level problems as well. It's one of those excercises that help me stop fooling myself (in the Feynman sense).
Traditionally you'd put a list of recipe ratios into a spreadsheet and then calculate what you need. But there's a mod called Helm that can handle all those calculations for you, so you just need to specify what logistics components you'll be using.
His immediate comment was "that takes all the fun out of it", to which I responded "it just moves the fun elsewhere."
In this case, the programmer still provides intent and strategy for the bot. We know roughly how efficient the final algorithm should be, and roughly what the data model might be-- being able to get 90% of the code written in 30s-1min should free up more time to think about the system as a whole, I think. (Though this point has been beaten nearly to death, now that I ruminate on it.)
At least in my own experience with Copilot it's been very convenient not having to worry about the finer details. More "should I model the problem this way?" and less "and now I bring in the inner for loop, then I overwrite the first part of the buffer up to index j...".
As a human programmer, is this not what your own brain looks like? What are you doing to the information you take in that allows you to avoid regurgitating the "crunchy insect bits" of your own training corpus?
Maybe something like GPT, style transfer, and OpenAPI combined.
That's not to say plumbing doesn't take skill, it certainly does, but the point of it is that nobody except the next plumber cares how the pipes are laid out, so long as it works and works well. It's when one blows and you have to fix it, or install a second bathroom, that shit really tends to come out. If I'm the one that has to do the work, I can only hope the previous plumber had some idea of what they were doing, and didn't just leave it entirely to automation.
But if they did I'd hope they trust, but verify.
depends what you are working on, I suppose the average web developer could probably be considered this. But there are people working on problems that require major CS knowledge, domain expertise, etc. Those types would definitely be closer to engineers building the tools that the plumber uses
Programmers when the plumbing works: But I don’t want to just stitch components together! This is boring.
There's a reason they call Europeans "europoors". There are advantages to identifying yourself by your work.
What I meant by that is that there are no source images that have previously existed, and especially not in these animated latent space forms. And no, I’m not the only person to be using the tools like this and I never claimed to be.
https://williamcotton.com/articles/the-making-of-distant-des...
What I think I’m doing with this is revisiting some live audio visual stuff I was working with over a decade ago, but instead of having to hand draw as I did in this video:
Around 2:20 has some landscape animations. There’s some really low quality temp imagery in that video as well because it take a lot of time to draw stuff! I basically stopped doing this kind of stuff because it was already too much work to do on top of writing and performing music let alone all the nonsense related to getting shows and managing a band…
I don’t have time to make these base visuals, animate them, program, etc.
Also, I want to try to map audio inputs like amplitude to vectors in the latent space… snare hit increases (lightning:1.0) vector, kick the (ocean:1.0) vector, etc.
Or maybe I don’t do anything other than explore and get inspired.
Prepare for the same thing with electronics which you didn't consider as containing much software before - central heating units, AC units, fridges, stoves, light switches, LED light bulbs, vacuum cleaners, electric shavers, electric toothbrushes, kids toys, microwave ovens, really anything which consumes electricity.
Prepare for the support of the vendors of those appliances not taking phone calls anymore, only text communication.
Prepare for the support not understanding the random problems you encounter.
Prepare for the answers you get from support being similarly random.
And maybe, with an unknown probability, prepare for your house burning down and nobody can tell you why.
Just learn how to be a plumber.
Car manufacturing has been automated very much and there was still a need for welders and other skilled workers in different fields. If phased in slowly enough, automation of repetitive work does not have such bad repercussions and has happened all throughout history.
But we've had all of history to regulate quality control in many of these fields. All of this regulation worked to slow down adoption of automation. And this is a good thing. Without regulation roads would be full of alpha quality self driving cars (Tesla manages to ignore this). And even when the tech is ready, switching too quickly is bad.
Creative fields are far less regulated and require far longer training and education. The transition to alpha quality 80% good enough AI has the potential to be far more abrupt and to never actually eliminate higher skilled work but to instead destroy the pipeline towards that higher level of skill.
On the other hand, an utility (truck, taxi, etc.) driver, for example, after a certain number of hours of driving will no longer get any better at driving. Repetitive tasks have an upper limit of skill. Contrast for example a lawyer, since we recently had that AI startup, there is no upper boundary for skill because at a high enough level the comparison is fuzzy. And lower stakes cases serve as training for higher stakes cases. Also contrast how road regulation slowed start-ups like Waymo and Cruise (but not Tesla) vs the reason DoNotPay is facing setbacks: not because there is regulation specifying a minimum level of quality of lawyer work but due to receiving threats from State Bar prosecutors.
Think of other examples of jobs we have automated away: textile making, blueprint drawing, etc. After a number of years working the loom or drawing blueprints a worker would no longer get any better at it. Overall humanity is better off having automated those tasks and the transition has been gradual.
Not sure whose skillset is being threatened, 5-year-olds?
https://github.com/giuven95/chatgpt-failures has more failures, some were fixed, laughed a bit at:
me: "write a sentence ending with the letter s"
ChatGPT: "The cat's fur was as soft as a feather.""No GMO"!
"Chicken eggs and cow eggs are produced by different animals and have some notable differences. Chicken eggs are much smaller than cow eggs and have a smooth, hard shell. Cow eggs, on the other hand, are much larger and have a thicker, bumpy shell. Additionally, chicken eggs are typically used for human consumption, while cow eggs are not."
then I followed up with how to make an omelette from cow eggs, they answered:
"To make an omelette from cow eggs, you will need the following ingredients:
2-3 cow eggs
Salt and pepper, to taste
1 tablespoon of butter or oil
Instructions: 1. Crack the eggs into a bowl and beat them together with a fork or whisk.
... (general omelette steps)
7. Serve immediately and enjoy!
Note: cow eggs may be larger than chicken eggs, so adjust the amount of eggs you use accordingly."Technically correct, hard to argue. Perhaps the AI label should specify "Programmed by Pattern Matching: No general understanding or common reason involved".
Yes, we can automate systems, in certain aspects we can even externalize some decision-making: is this a good apple or a bad apple, should the car break or take a left, but when the chips are down, we are rather far from any externalization of reasoning, meta-reasoning, higher-order thinking, and so forth.
[1] https://en.wikipedia.org/wiki/Mars_Climate_Orbiter#Cause_of_...
[2] "One way to see the MCAS problem is that the system took too much control from the pilots, exacerbated by Boeing’s lack of communication about its behavior. But another way, McClellan suggests, is to say that the software relied too much on pilot action, and in that case, the problem is that the MCAS was not designed for triply redundant automatic operation." https://www.theatlantic.com/technology/archive/2019/03/boein...
[3] https://en.wikipedia.org/wiki/Margaret_Hamilton_(software_en...
Even worse, prepare for them to enthusiastically take calls.
Don't worry, someone will plug ChatGPT into a text-to-speech model soon enough, and market it as a way to put the personal touch back into customer support. Maybe they'll even give it a folksy accent.
This is not a tool for generating applications using statistical methods (we have a lot of tools which do that already), but a tool for assisting human persons by taking boring/repetitive tasks from them and letting us focus on the meaning, the goal
I think this will lead to extreme cost cutting measures in choice of the developers which are used.
People who would have previously been totally ineligible to develop software will happily be chosen.
And they won't care about the garbage code they produce as long as it somehow seems to work from the outside.
They'll care about feeding their families in the dire situation they are in, not more.
It's adherence to safety regulations that's stopping your house burning down at the moment and this responsibility will be there regardless of how the code is written.
Like said, this is already the case since somewhere beginning '00 when the outsourcing boom started taking off.
Tools like this probably simply will lower the bar to $2-3/hr 'data entry' 'specialists', who were ignored before for programming work.
I already see people directly around me who normally couldn't really write much of anything (be it natural language or code) with ease or at all who suddenly (since chatgpt saw the light) produce both with success. They could already do that with gpt3 or copilot, but that takes prompting; chatgpt lowers the barrier to entry significantly.
> And they won't care about the garbage code they produce as long as it somehow seems to work from the outside.
It would be a black box for sure; json in, json out. When something is broken, that 'nano service' is just replaced by a new black box nano service that does the same thing but without the reported bug(s).
And you would logically be without a job hence your fear of these tools?
Maybe it’s much more likely that these tools entrench current software developers who did in fact learn the craft before these tools and can successfully use them to make themselves much more productive?
Does the recent memory of bootcampers getting paid as much as industry vets after a year or two have an impact on this psychology of feeling replaceable?
I think my intuition is that the average quality of software may well improve (good!) but that when issues arise they will be more obscure and harder to debug and fix, because nobody will know what the system is actually doing.
this is a fun pattern I've seen play in other industries
The 50% success rate is also best out of 3200 completions. For best out of 1 completion, the success rate is in low single digits.
I think the lesson here is that these models bring a lot more value when: 1. you have unit tests, 2. can afford compute/time to let the model try many solutions, 3. have enough isolation to run unverified code.
But yes, the choice of scales for the graph was rather peculiar.
One of the first steps of a misaligned/unhelpful/virus type of a system, attempting to secure its presence would likely be inference/GPU/TPU compute access. And code injection is a vector. There are multiple other vectors.
When designing such systems, please do keep that in mind. Make sure code changes are properly signed and the originating models are traceable.
Same applies to datasets generated by models.
I on the other hand will survive: what sense is an AI to make of such classic messages as David Bowie's excellent "ch-ch-changes!", the five "fix CI maybe???"s in a row, or the eternal "fuck this shit"?
Something I haven't seen explored too much: navigation help. One of the things that takes me the most time when coding is remembering what was the next file / module / function I need to edit and jumping to it.
An autocomplete engine that would suggest jump locations instead of token could help me stay in the flow much longer, with fewer worries about whether I'm introducing subtle bugs because I'm relying on the AI too much.
1. Humans create programming languages which machines can understand. OK.
2. Humans build tools (LSP, treesitter, tags, type checkers and others) to help humans understand code better. OK.
3. Humans build (AI) programs which run on machines so that the computer can understand... computer programs???
Aren't computers supposed to be able to understand code already? Wasn't the concept of "computer code" created so as to have something which the computer could understand? Isn't making a (AI) program to help the computer understand computer programs re-inventing the wheel?
(Of course, I get that I use the terms "understand" and "computer programs" very loosely here!)
Arguably, we would benefit from even higher level abstractions so the LLM can fit more logic in a single prompt/output.
Maybe a future AI could generate machine code that could be "disasssembled" into higher level languages.
Not sure if that would be better.
My concern with AI across all fields are that people won’t gain the fundamental skills necessary for moving the bounds of what’s possible. Certainly, tools like this AI could produce good results. However, the underlying human is still providing the training data. More importantly, humans are producing the trajectory of development.
If humans are no longer capable of pushing the AI systems. Then the AI systems will either cease to improve, or the AI systems will learn to play off each other. In highly complex systems like many programs, I suspect they’ll play off each other and achieve local minimum/maximum locations. Ie because the “game” (program development) can be iterative they’ll constantly improve code. However, because the AI systems don’t interact with all data (particularly real-world data) when a customer shows a sad face at some UI/UX, it won’t completely develop a new feature that matches the desires of the customer.
Where I fear this will leave us is a class of less-skilled engineers and overly optimized AI. Basically, stuck in development.
So you train the LM to:
Input: code+commit output: diff
OpenAI has an 'edit' endpoint but it's 'in beta' and limited to 10-20 requests per minute. They do not acknowledge support requests about this. Azure OpenAI also has this endpoint I think but they ignore me as well.
So for my edits just like everything else I have been relying on text-davinci-003 since it has much more feasible rate limits. I have just been having it output the full new file but maybe this Unified Diff thing is possible to leverage.
Does anyone know, what would be the easiest way to try to run their 6B Diff Models thing against my own prompts for my service? Maybe Hugging Face?
Negative results are interesting in their own right. I’d rather read about why this isn’t better at the 6B parameter level than e see a hand wave that, well, the samples are more diverse and look the 350M model is better.
<NME> diff_model.py
<BEF> import argparse
import torch
import transformers
def main():
argparser = argparse.ArgumentParser()
argparser.add_argument('--checkpoint', default='CarperAI/diff-codegen-2b-v2', choices=['CarperAI/diff-codegen-6b-v2', 'CarperAI/diff-codegen-2b-v2', 'CarperAI/diff-codegen-350m-v2'], help='Model to use')
args = argparser.parse_args()
model = transformers.AutoModelForCausalLM.from_pretrained(args.checkpoint)
tokenizer = transformers.AutoTokenizer.from_pretrained(args.checkpoint)
# Use CUDA.
model = model.cuda()
text = '<NME> diff_model.py\n<BEF> '
text += open("diff_model.py").read()
text += '<MSG> Print a message after loading the model\n<DFF>\n'
completion = model.generate(tokenizer.encode(text, return_tensors="pt").cuda(), max_new_tokens=400)
completion = tokenizer.decode(completion[0], skip_special_tokens=True)
print(completion)
if __name__ == '__main__':
main()
<MSG> Print a message after loading the model
<DFF>
<DFF> @@ -1,4 +1,5 @@
'''
+import sys
import argparse
import torch
@@ -8,6 +9,7 @@ def main():
tokenizer = transformers.AutoTokenizer.from_pretrained(args.checkpoint)
# Use CUDA.
+ print("CUDA:", torch.cuda.is_available())
model = model.cuda()
text = '<NME> diff_model.py\n<BEF> '
@@ -10,3 +12,4 @@ def main():
completion = tokenizer.decode(completion[0], skip_special_tokens=True)
print(completion)
+ sys.exit(0)
\ No newline at end of file
[\ No newline at end of file repeated many times]
It takes about 150 seconds to run on a 3090 Ti when the model is already on disk.I also wonder if it could be useful in creating Coq proofs!
2023: engineers with their own AI model, typing “#fixed bugs” and spending the rest of the day by the pool.
It makes me wonder if it's related to recent protests in other creative fields in response to AI models, or just a weird dislike of openly released model weights?
And both are trained on large corpus of github sources
Is there a way to test it somehow? Public API maybe?
Do people actually use Copilot for that? I just let it work its magic uninstructed. I guess it sometimes uses comments and function/variable names for its suggestions but that's about it. 99% of the time it just looks at my code, the context and neighboring files to predict what I'm trying to do.
//insert a unicode dot between each character in the string, and convert the numbers to subscript
saved me a lot of copy-pasting.
- ok
- fix
- done
- test
- nice
You should fix that.
Or more likely they are working alone.
It's like good comments in software. Half the time, you're doing it for your future self.
Sounds kinda cool, even if trusting it would be a terrible idea.