this article is incredibly long and rambly, but please enjoy as this asshole struggles to select random items from an array in presumably Javascript for what sounds like a basic crossword app:
At one point, we wanted a command that would print a hundred random lines from a dictionary file. I thought about the problem for a few minutes, and, when thinking failed, tried Googling. I made some false starts using what I could gather, and while I did my thing—programming—Ben told GPT-4 what he wanted and got code that ran perfectly.
Fine: commands like those are notoriously fussy, and everybody looks them up anyway.
ah, the NP-complete problem of just fucking pulling the file into memory (there’s no way this clown was burning a rainforest asking ChatGPT for a memory-optimized way to do this), selecting a random item between 0 and the areay’s length minus 1, and maybe storing that index in a second array if you want to guarantee uniqueness. there’s definitely not literally thousands of libraries for this if you seriously can’t figure it out yourself, hackerman
I returned to the crossword project. Our puzzle generator printed its output in an ugly text format, with lines like
"s""c""a""r""*""k""u""n""i""s""*" "a""r""e""a"
. I wanted to turn output like that into a pretty Web page that allowed me to explore the words in the grid, showing scoring information at a glance. But I knew the task would be tricky: each letter had to be tagged with the words it belonged to, both the across and the down. This was a detailed problem, one that could easily consume the better part of an evening.
fuck it’s convenient that every example this chucklefuck gives of ChatGPT helping is for incredibly well-treaded toy and example code. wonder why that is? (check out the author’s other articles for a hint)
I thought that my brother was a hacker. Like many programmers, I dreamed of breaking into and controlling remote systems. The point wasn’t to cause mayhem—it was to find hidden places and learn hidden things. “My crime is that of curiosity,” goes “The Hacker’s Manifesto,” written in 1986 by Loyd Blankenship. My favorite scene from the 1995 movie “Hackers” is
most of this article is this type of fluffy cringe, almost like it’s written by a shitty advertiser trying and failing to pass themselves off as a relatable techy
But I knew the task would be tricky
Is it just me or isn’t this not even that tricky (just a bit of work, so I agree with him on the free evening thing, esp when you are a bit rusty)? Anyway, note how he does give a timeframe for doing this himself (an evening) but doesn’t mention how long he worked on the chatgpt stuff, nor does he mention if he succeeded at his project at all
E: anyway what he needs is an editor.
this is the exact kind of clown who’d go “uh actually I have an editor” and fire up ChatGPT again
deleted by creator
Yeah I was mentally already thinking about different datastructures and how to convert via various ones to solve the crossword puzzle thing (before I went ‘wtf am I doing’) and was already annoyed by a bit of the tedium of the problem.
And that is interesting that it works well for scripting like that.
I do now wonder, how much of the working with LLMs for code is partially the rubber duck effect. That while talking to a LLM and trying to get it to generate code you want are you already working out the problem more and more?
deleted by creator
Well, I had to speculate as I had not talked to people about this and don’t use LLMs myself (or at least not directly glares at google search results). So thanks!
Off topic but are you aware of neovim and it’s Lua capabilities?
deleted by creator
deleted by creator
I’ve been conducting DevOps and SRE interviews for years now. There’s a huge difference between someone that can copypasta SO code and someone that understands the SO code. LLMs are just another extension of that. GitHub Copilot is great for quickly throwing together an entire Terraform file. Understanding how to construct the project, how to tie it all together, how to test it, and the right things to feed into Copilot requires actually having some skill with the work.
I might hire this person at a very junior level if they exhibited a desire to actually understand what’s going on with the code. Here an LLM can serve as a “mentor” by spitting out code very quickly. Assuming you take the time to understand that code, it can help. If you just commit, push, deploy, you can’t figure out the deeper problems that span files and projects.
To me the only jobs that might not be safe are for executives a good programmer probably doesn’t want to work for.
deleted by creator
I think that’s a really fair far-future take. I think the most reasonable approach isn’t knee-jerk in either direction (they’re taking our jobs vs they are no threat). I feel that good programmers of the future are going to take advantage of AI capabilities. Copilot does a great job of quickly writing boilerplate code I could write at a slower rate. That in turn gives me more time to focus on things like chunking the problem into method names it could figure out how to write or just writing that complicated business logic myself. All of that comes from my architecture experience and ability to suss out what stakeholders really want, then deliver a minimum viable solution quickly enough to iterate or deliver. The emphasis becomes a focus on soft skills and systems thinking, which is something I feel can come naturally to good programmers today. Getting soft skills isn’t so easy and that might push a lot of folks out.
No matter what, I feel like a solid programmer is one who knows how to adapt. If you can do that, you can adapt to a future where our code jobs are very different from where they are today. I’m pretty young; I started writing Perl web apps, switched to PHP, did random shit, learned JavaScript, did some Rails, then found my passionate in DevOps/SRE. My selling point pre-leadership was my ability to code, not just write YAML, on top of infra knowledge. I think even in an AI future there’s still an edge or two available, even if it’s just soft skills.
On a related note, if LLMs get good enough to shove is out, the writing will be on the wall and we should have plenty of time to use said LLMs to write killer software for future us before executives grok the change.
deleted by creator
I love your rambling responses! You add a lot of detail and you’re talking about a side of code I don’t touch.
I think a safety net for you that will continue to exist your entire lifetime is embedded work for the US government or related contracts. I’ve got buds writing embedded code for defense contracts. Stuff like that will take decades to adopt LLMs because of how contracts work and the security process. I’ve got friends at DHS that just finished a fucking Coldfusion migration. Some friends are writing Ada for bombers. Your skills fit that niche pretty well and it’s stable work. The idea is not to use the newest and greatest but rather test in depth with old setups.
if the capitalists succeed in their omnipresent goal to vastly reduce the perceived value of your labor, you can always write terrible code that kills in one of the most tedious languages ever invented
do these ideas give you comfort
deleted by creator
Do you have anything to else to offer or is your solution to roll over and do nothing? Some of us still have families and networks to support so we can’t just devote all our time to sniping labor on the internet in preparation for the glorious revolution. Given the discussions you have on your instance, I’m kinda disappointed this tepid response is the best you have.
Assuming that the current largesse of US defense contracts will survive the LLM-induced collapse of the middle classes is … a take.
US defense spending is seen as a political holy cow at the moment but its well-paying superstructure is as vulnerable to attacks from the nativist/neo-isolationist right as from the left. Add in a sprinkling of attacks on “woke” corporations and that bomber program is not as safe as you think.
deleted by creator
Oh my goodness! I apologize for assuming. I read the wrong thing into your comments.
Do the whims of Silicon Valley greatly affect your market? The most I’ve interacted with non-US markets is running some near-shore consulting with one of the majors (spun up a Mexican firm but the executives wanted to pay local rates for remote US work which is a fucking joke). I also know, should I leave the US, I will have a much lower salary. I’ve hired a fair amount of remote talent in the Americas and India for various jobs; I think a good chunk of that work is the kind that could be replaced by LLMs in the next two decades or so.
I help maintain an open-source OS for industrial embedded applications.
fuck yes. there’s something weirdly exciting about work like that — not only is it a unique set of constraints, but it’s very likely that an uncountable number of people (myself possibly included) have interacted with your code without ever knowing they did
But the explicit purpose of generative AI is the devaluation of intellectual and creative labour, and right now, a lot of money is being spent on an attempt to make people like me redundant. Perhaps this is just my anxiety speaking, but it makes me terribly uneasy.
absolitely same. I keep seeing other programmers uncritically fall for poorly written puff pieces like this and essentially do everything they can to replace themselves with an LLM, and the pit drops out of my stomach every time. I’ve never before seen someone misunderstand their own career and supposed expertise so thoroughly that they don’t understand that the only future in that direction is one where they’re doing a much more painful version of the same job (programming against cookie cutter LLM code) for much, much less pay. it’s the kind of goal that seems like it could only have been dreamed up by someone who’s never personally survived poverty, not to mention the damage LLM training is doing to the concept of releasing open source code or even just programming for yourself, since there’s nothing you can do to stop some asshole company from pilfering your code.
the only future in that direction is one where they’re doing a much more painful version of the same job (programming against cookie cutter LLM code) for much, much less pay.
To the extent that LLMs actually make programming more “productive”, isn’t the situation analogous to the way the power loom was bad for skilled handweavers whilst making textiles more affordable for everyone else?
I should perhaps say that I’m saying this as someone who is just starting out as a web developer (really chose the right time for that, hah). I try to avoid LLMs and even strictly unnecessary libraries for now because I like learning about how everything works under the hood and want to get an intimate grasp of what I’m doing, but I can also see that ultimately that’s not what people pay you for that and that once you’ve built up sufficient skill to quickly parse LLM output, the demands of the market may make using them unavoidable.
To be honest, I feel as conflicted & anxious about it all as others already mentioned. Maybe I am just too green to fully understand the value that I would eventually bring, but can I really, in good conscience, say that a customer should pay me more when someone else can provide a similar product that’s “good enough” at a much lower price?
Sorry for being another bummer. :(
deleted by creator
I’m not sure the power loom analogy works, because power looms are (to my non-weaver knowledge) fit for purpose. if power looms’ output required significant rework by a skilled weaver (being paid significantly less for essentially the same amount of work done more tediously, per my point above), relied on stolen patterns from all of the world’s handweavers, and they were crushingly inefficient to run per woven piece, I seriously doubt history would remember them as a successful invention
unfortunately, we’re living in uniquely awful times, and decades of tech’s strange, manipulated culture have turned many programmers into nihilistic utopians with no ability to think things through on a systemic level. generative AI as a whole is nothing but an underhanded wage reduction tactic, but (by design) our industry doesn’t have the solidarity to fight it in any way that works (see the Writers’ Guild’s successful strike)
Totally agree.
IMO a better analogy would be clothing sweatshops rather than the power loom. Same utilitarian effect of textile affordability increases. Same ethical fuckery with exploitation of labour.
deleted by creator
huh, explained like that the power loom analogy does much better than I thought in encapsulating this anxiety; at its core, it’s a (very justified) fear that we haven’t learned anything from history and that the loudest and most foolish of our profession are gleefully marching us towards an awful fate
I’ve been doing some reading on the origins of technolibertarianism (though as with all my reading I’m far behind where I’d like to be) and it’s fucking insane the lengths Silicon Valley has gone to in order to make unionization a taboo topic among American tech workers
Commoditization is a real market force, and yes, it will come for this industry as it has for others.
Personally, I think we need to be much, much more creative and open to understanding ourselves and the potential of the future. It’s hard to know specifics, but there is broad domains.
Lately, I’ve been hacking at home with more hardware, and creating interesting low scale, low energy input systems that help me… garden. Analyzing soil samples, planning plots and low energy irrigation, etc, etc. It’s been fun because the work is less about programming in depth and more broad systems thinking. I even have ideas for making a small scale company off this. At that point, purely the programming won’t be the bottleneck.
If it helps, as an engineer, take a step back and think about nature and how systems and niches within systems evolve. Nature isn’t actually in the business of replacing due to redundancy, it’s in the business of compounding dependency via waste resources, and the shifting roles as a result of that. We need to be ready to creatively take our experience, perspective, and energy gradient to new places. It’s no different for any other part of nature.
deleted by creator
since there’s nothing you can do to stop some asshole company from pilfering your code.
Currently. Though I think that there is a future where adversarial machine learning might be able to greatly increase the cost of training on pilfered data by encoding human generated inputs in a way that runs counter to training algorithms.
Even if there were Glaze/Nightshade for computer programs, it could be reverse-engineered just like any other code obfuscation. This is the difference between code and most other outputs of labor: code is syntactic and formal, allowing for decidable objective analyses.
deleted by creator
There’s a difference between “can” and “cost”. Code is syntactic and formal, true, but what about pseudo code that is perfectly intelligible by a human? There is, afterall, a difference between sharing “compiled” code that is meant to be fed directly into a computer and sharing “conceptual” code that is meant to be contextualized into knowledge. Afterall, isn’t “code” just the formalization of language, with a different purpose and trade off?
shuf -n 100 /usr/share/dict/words
I would have expected JS standard library to contain something along the lines of
random.sample
but apparently not. A similar thing exists in something calledunderscore.js
and I gotta say it’s incredibly in-character for JavaScript to outsource incredibly common utility functions to a module called “_
”.Language bashing aside, there’s something to enjoy about these credulous articles proclaiming AI superiority. It’s not the writing itself, but the self-esteem boost regarding my own skills. I have little trouble doing these junior dev whiteboard interview exercises without LLM help, guess that’s pretty impressive after all!
Absolutely this, shuf would easily come up in a normal google search (even in googles deteriorated relevancy).
For fun, “two” lines of bash + jq can easily achieve the result even without
shuf
(yes I know this is pointlessly stupid)cat /usr/share/dict/words | jq -R > words.json cat /dev/urandom | od -A n -D | jq -r -n ' import "words" as $w; ($w | length) as $l | label $out | foreach ( inputs * $l / 4294967295 | floor ) as $r ( {i:0,a:[]} ; .i = (if .a[$r] then .i else .i + 1 end) | .a[$r] = true ; if .i > 100 then break $out else $w[$r] end ) '
Incidentally this is code that ChatGPT would be utterly incapable of producing, even as toy example but niche use of jq.
It’s so incredibly easy to randomly select a few lines from a file that it really doesn’t need to be in the standard library. Something like 4 lines of code could do it. Could probably even do it in a single unreadable line of code.
deleted by creator
the good parts of their evenings aren’t very long
and I mean, same
It’s not that uncommon for the best part of an evening to coincide with the highest level of inebriation.
wat indeed.
Twenty minutes, in a language you hadn’t seen before? Sure.
deleted by creator
ah, the NP-complete problem of just fucking pulling the file into memory (there’s no way this clown was burning a rainforest asking ChatGPT for a memory-optimized way to do this),
It’s worse than that, because there’s been incredibly simple, efficient ways to k-sample a stream with all sorts of guarantees about its distribution with no buffering required for centuries. And it took me all of 1 minute to use a traditional search engine to find all kinds of articles detailing this.
If you can’t bother learning a thing, it isn’t surprising when you end up worshiping the magic of the thing.
reading back, I wonder if they were looking for a bash command or something that’d do it? which both isn’t programming, and makes their inability to find an answer in seconds much worse
So I haven’t programmed in a long time but like isn’t a simple approach for this sort of thing (if want low numbers like 100) just something like:
from distribution I like(0, len(file)) get 100 samples read line at sample forall samples
or if file big
sort samples, stream file, if line = current sample add line to array, remove sample from other array.
Like that is literally off the top of my head. I’m sure there are real approachs but if googling is too hard isn’t shit like that obvious?
edit: wait you’d have to dedupe this. also the real approach is called: (unspellable French word for pit of holdy water etc) sampling
Our puzzle generator printed its output in an ugly text format… I wanted to turn output like that into a pretty Web page that allowed me to explore the words in the grid, showing scoring information at a glance. But Iknew the task would be tricky: each letter had to be tagged with the words it belonged to, both the across and the down. This was a detailed problem
I’m so confused. how could the generator have output something that amounts to a crossword, but not in such a way that this task is trivial? does he mean that his puzzle generator produces an unsorted list of words? what the fuck is he talking about
you know, you’re fucking right. I was imagining taking a dictionary and generating every valid crossword for an N x N grid from it, but like you said he claims to already have a puzzle generator. how in fuck is that puzzle generator’s output just a list of words (or a list of whatever the fuck
"s""c""a""r""*""k""u""n""i""s""*" "a""r""e""a"
is supposed to mean, cause it’s not valid syntax for a list of single characters with words delimited from*
in most languages, and also why is that your output format for a crossword?) if it’s making valid crossword puzzles?fractally wrong is my favorite kind of wrong, and so many of these AI weirdos go fractal
I… think (hope??) the “*” is representing filled in squares in the crossword and that he has a grid of characters. But in that case the problem is super easy, you just need to print out HTML table tags between each character and color the table cell black when the character is “*”. It takes like 10 minutes to solve without chatgpt already. :/
I rejected that as too easy to be what he meant, but as soon as I read your words I knew in my heart you were right. associating these letters to words is essentially fizzbuzz difficulty, he can’t do it, and he’s writing in the new yorker that he can’t do it. I’m feeling genuine secondhand embarrassment for him
fuck me, so the only reason scoring was “tricky” to them was because this asshole chose unstructured text as their interchange format instead of, say, JSON? and even given that baffling design flaw in their puzzle generator (which is starting to feel like code GPT found and regurgitated that they didn’t know how to modify to make it suitable for their purposes) I can think of like 5 different ways to include scoring data and none of them are hard to implement
Ah yes, the future of coding. Instead of directly searching for stack overflow answers, we raise the sea level every time we need to balance a tree.
AI chuds got the wrong message about the guy that tried to use tensorflow to write fizzbuzz.
Edit: I looked it up. Tensorflow fizzbuzz guy is also an AI chud it seems
Bonus: this is how I visualise LLMs generating results: https://youtu.be/Jn4k2TPIJf0
@self This was the point where I started wanting to punch things:
“At one company where I worked, someone got in trouble for using HipChat, a predecessor to Slack, to ask one of my colleagues a question. “Never HipChat an engineer directly,” he was told. We were too important for that.”
Bless his heart. That, dearie, isn’t “engineers are so special”, it’s managers wanting to preserve old-fashioned lines of communication and hierarchy because they fear becoming irrelevant. Gatekeeping access to other people’s knowledge to make yourself important goes back millennia.
I felt like there was a 100% chance that there was a python library that you could just import and use in two lines.
Turns out it’s like 4 lines depending on which of the multiple ones you use.
I do love internet people who make cool things because they are smarter than me and share.
If anyone else can’t load archive.ph due to having normie Google DNS like me, here is the URL: https://www.newyorker.com/magazine/2023/11/20/a-coder-considers-the-waning-days-of-the-craft
Really love the bit about how gpt is able to tackle the simple stuff so easily. If an original insight, I take my hat off to you. I came to the edge of it, but never quite really saw it as you point out.
if you never have, find YouTube videos of folks trying to use an LLM to generate code for a mildly obscure language. one I watched that gave the game away was where someone tried to get ChatGPT to write a game in Commodore BASIC, which they then pasted directly into a Commodore 64 emulator to run. not only did the resulting “game” perform like a nonsensical mashup of the simple example code from two old programming books, there was a gigantic edit in the middle of the video where they had to stop and make a significant number of fixes to the LLM’s output, where it either fictionalized something like a line number or constant, or where the mashup of the two examples just didn’t function. after all that programming on their part for an incredibly substandard result, their conclusion was still (of course) that the LLM did an amazing job
Yah I skimmed thru this article a couple days ago when I came across it.
The author did not bother doing any legwork.
He claims to be a programmer, but doesn’t want to spend a little bit of time investigating a tool that helps him code faster.
>I keep thinking of Lee Sedol. Sedol was…
Okay. Lee is his family name! Come on, how could the New Yorker fuck this up?