this post was submitted on 14 Nov 2023
63 points (100.0% liked)

TechTakes

1435 readers
88 users here now

Big brain tech dude got yet another clueless take over at HackerNews etc? Here's the place to vent. Orange site, VC foolishness, all welcome.

This is not debate club. Unless it’s amusing debate.

For actually-good tech, you want our NotAwfulTech community

founded 1 year ago
MODERATORS
 

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

all 50 comments
sorted by: hot top controversial new old
[–] Soyweiser@awful.systems 17 points 1 year ago* (last edited 1 year ago) (2 children)

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.

[–] self@awful.systems 13 points 1 year ago

this is the exact kind of clown who’d go “uh actually I have an editor” and fire up ChatGPT again

[–] bitofhope@awful.systems 14 points 1 year ago (2 children)

shuf -n 100 /usr/share/dict/words

Master hacker

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 called underscore.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!

[–] zogwarg@awful.systems 5 points 1 year ago* (last edited 1 year ago)

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.

load more comments (1 replies)
[–] locallynonlinear@awful.systems 12 points 1 year ago (2 children)

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.

[–] self@awful.systems 6 points 1 year ago

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

load more comments (1 replies)
[–] sc_griffith@awful.systems 10 points 1 year ago (1 children)

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

[–] self@awful.systems 5 points 1 year ago (1 children)

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

[–] 200fifty@awful.systems 5 points 1 year ago (2 children)

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. :/

[–] sc_griffith@awful.systems 6 points 1 year ago

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

[–] self@awful.systems 4 points 1 year ago

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

[–] swlabr@awful.systems 10 points 1 year ago* (last edited 1 year ago) (1 children)

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

[–] swlabr@awful.systems 5 points 1 year ago

Bonus: this is how I visualise LLMs generating results: https://youtu.be/Jn4k2TPIJf0

[–] m@blat.at 8 points 1 year ago

@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.

[–] ericbomb@lemmy.world 8 points 1 year ago

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.

[–] iamnearlysmart@awful.systems 6 points 1 year ago (1 children)

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.

[–] self@awful.systems 7 points 1 year ago

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

[–] sailor_sega_saturn@awful.systems 5 points 1 year ago* (last edited 1 year ago)

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

[–] aubertlone@lemmy.world 4 points 1 year ago

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.