Live data from Hacker News

A coder considers the waning days of the craft

newyorker.com

171–180 of 1001 posts

Re: A coder considers the waning days of the craft

#171
post #152

Earlier quoted context omitted.

Yeah it’s not a challenging problem, but the specific code example isn’t the point. Replace his example with “at one point, we wanted a command that would convert a PNG to a JPG….” most of us couldn’t do that without Google.

$ cat /usr/share/dict/words | shuf | head -n 10 $ convert foo.png foo.jpg Took me almost literally two seconds to come up with that, unless your point is that at one point I had to learn it which, yeah, sure. What am I missing?

You're missing that some folk haven't learned that yet - and that others have forgotten it.

In 2013 I was using complex ffmpeg commands and using filters in there. Could remember the stuff easy. Now, I've gotta reference my ffmpeg notes more frequently.

Where's that XKCD about using the tar command?

Re: A coder considers the waning days of the craft

#172

> 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. I mean ... IDK, if you can't write that on your own without research, I don't…

To be really fair, there are levels of programming. The easiest level is traditionally vulnerable to automation. There's a lot of "accidental complexity" (https://wikipedia.org/wiki/No_Silver_Bullet), e.g. ffmpeg, git; even in recalling syntax and idiom of an infrequently used tool, e.g. bash, jq.

Once upon a time, developers had to pore over manpages, paper textbooks, or memorize it. Then came google. Next, stackexchange. And now GPT-4 - which is kind of a search engine plus rudimentary synthesis.

But let's be clear. This is low-hanging fruit. It's a poor substitute for actual thought. And surely we are safe.

Re: A coder considers the waning days of the craft

#173
post #29
post #6

Maybe I’m in the minority. I’m definitely extremely impressed with GPT4, but coding to me was never really the point of software development. While GPT4 is incredible, it fails OFTEN. And it fails in ways that aren’t very clear. And it fails harder when there’s clearly not enough training resources on the subject matter. But even hypothetically if it was 20x better, wouldn’t that be a good thing? There’s so much of t…

AI taking over one of the only professions able to afford someone a proper middle class existence is pretty shitty. It will be great for capitalists though.

It’s also one of the few fields with good compensation that can be broken into with minimal expense — all one needs is an old laptop, an internet connection, and some grit. Just about anything else that nets a similar or better paycheck requires expensive training and equipment.

Losing that would be a real shame.

Re: A coder considers the waning days of the craft

#174

> 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. I mean ... IDK, if you can't write that on your own without research, I don't…

So a search engine user was surpassed by man using search engines and this new search tool called GPT4?

Programming is doomed!

Re: A coder considers the waning days of the craft

#175

> 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. I mean ... IDK, if you can't write that on your own without research, I don't…

[deleted]

Re: A coder considers the waning days of the craft

#176
> What I learned was that programming is not really about knowledge or skill but simply about patience, or maybe obsession. Programmers are people who can endure an endless parade of tedious obstacles.

This captures the reason I'm optimistic about AI-assisted programming.

The learning curve for getting started programming is horribly steep - and it's not because it's hard, it's because it's frustrating. You have to sweat through six months of weird error messages and missing semicolons before you get to the point where it feels like you're actually building things and making progress.

Most people give up. They assume they're "not smart enough" to learn to program, when really they aren't patient enough to make it through all of that muck.

I think LLMs dramatically impact that initial learning curve. I love the idea that many more people will be able to learn basic programming - I think every human being deserves to be able to use computers to automate tedious repetitive tasks in their lives.

Re: A coder considers the waning days of the craft

#177
post #162

> 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. I mean ... IDK, if you can't write that on your own without research, I don't…

I guess the point is that there are different levels of coders. For coders who can't write code that print a hundred random lines from a dictionary file, GPT-4 is already a significant threat. On the other hand, even if you can write it, does it mean you should write it? How much time does it cost you to write it? How much money your company is paying you in that amount of time? Is it more economical for GPT-4 to do…

Not bad, but suppose the dictionary is too big to load into memory - could AI suggest an online (reservoir sampling) algorithm as an alternative?

Re: A coder considers the waning days of the craft

#178

> 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. I mean ... IDK, if you can't write that on your own without research, I don't…

leftpad

Re: A coder considers the waning days of the craft

#179

Earlier quoted context omitted.

The problem is not that I don't know the algorithm... the problem is that to implement the algorithm you need to remember what method from what class does the thing you want to do. And knowing that is very difficult, even for seemingly simple problems. That's why Google is the way to program modern programming languages. (Of course I could do the same task without any libraries, but in that case it would be considere…

This isn't a complex problem - this is something you do with built-in standard libraries in pretty much any programming language. Like I would expect anyone who claims to know even basic file I/O in their given language to be able to produce a mostly working version of this in less than 30 minutes.

80% of the time they'll produce a subtly biased shuffle, most people don't intuitively know the fisher-yates method unless they've been taught it

like, try this

    import collections, random
    def shuffle(xs):  # naive intuitive shuffle
        for i in range(len(xs)):
            j = random.randrange(len(xs))
            xs[i], xs[j] = xs[j], xs[i]

    def first_of(n):
        xs = list(range(n))
        shuffle(xs)
        return xs[0]

    print(collections.Counter([first_of(3) for i in range(100_000)]))
note that 1 comes out first 25% more often than 2, but with a fair shuffle all three should have an equal chance of being first

even without running it you can figure out logically that it must be biased in some way because there are 3! = 6 possible permutations and 3³ = 9 equally likely sequences of choices for j (each producing one of those permutations), and 9 is not divisible by 6, so some of those permutations have to be more likely than others

so i think this algorithm is a good one to get from a library if its randomness is important to you

not from chatgpt, which commonly does give you subtly buggy code

Re: A coder considers the waning days of the craft

#180
post #162

> 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. I mean ... IDK, if you can't write that on your own without research, I don't…

I guess the point is that there are different levels of coders. For coders who can't write code that print a hundred random lines from a dictionary file, GPT-4 is already a significant threat. On the other hand, even if you can write it, does it mean you should write it? How much time does it cost you to write it? How much money your company is paying you in that amount of time? Is it more economical for GPT-4 to do…

    
Post reply on HN