this post was submitted on 24 Oct 2023
875 points (93.1% liked)

Programmer Humor

19503 readers
1496 users here now

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

founded 1 year ago
MODERATORS
 
top 50 comments
sorted by: hot top controversial new old
[–] [email protected] 170 points 1 year ago

ChatGPT just makes me feel like I'm doing code review for junior developers who don't understand the task... wait...

[–] [email protected] 148 points 1 year ago (12 children)

For the love of God, if you're a junior programmer you're overestimating your understanding if you keep relying on chatGPT thinking 'of course I'll spot the errors'. You will until you won't and you end up dropping the company database or deleting everything in root.

All ChatGPT is doing is guessing the next word. And it's trained on a bunch of bullshit coding blogs that litter the internet, half of which are now chatGPT written (without any validation of course).

If you can't take 10 - 30 minutes to search for, read, and comprehend information on stack overflow or docs then programming (or problem solving) just isn't for you. The junior end of this feel is really getting clogged with people who want to get rich quick without doing any of the legwork behind learning how to be good at this job, and ChatGPT is really exarcebating the problem.

[–] [email protected] 18 points 1 year ago (15 children)

If you can’t take 10 - 30 minutes to search for, read, and comprehend information on stack overflow or docs

A lot of the time this is just looking for syntax though; you know what you want to do, and it's simple, but it is gated behind busywork. This is to me the most useful part about ChatGPT, it knows all the syntax and will write it out for you and answer clarifying questions so you can remain in a mental state of thinking about the actual problem instead of digging through piles of junk for a bit of information.

[–] [email protected] 21 points 1 year ago* (last edited 1 year ago) (2 children)

Somehow you hit an unpopular opinion landmine with the greybeard devs.

For the greybeard devs: Try asking ChatGPT to write you some Arduino code to do a specific task. Even if you don't know how to write code for an Arduino, ChatGPT will get you 95% of the way there with the proper libraries and syntax.

No way in hell I'm digging through forums and code repos for hours to blink an led and send out a notification through a web hook when a sensor gets triggered if AI can do it for me in 30 seconds. AI obviously can't do everything for you if you've never coded anything before, but it can do a damn good job of translating your knowledge of one programming language into every other programming language available.

[–] [email protected] 26 points 1 year ago (2 children)

It's great for jumping into something you're very unfamiliar with. Unfortunately, if you often find yourself very unfamiliar with day to day tasks, you're probably incompetent. (Or maybe a butterfly who gets paid to learn new things every day.)

load more comments (2 replies)
load more comments (1 replies)
[–] [email protected] 17 points 1 year ago (1 children)

Just a few days ago I read an article on the newest features of Kotlin 1.9. Zero of it was true.

Internet is littered with stuff like this.

If model is correct, you are correct. If model is not correct, you are working on false assumptions.

load more comments (1 replies)
[–] [email protected] 14 points 1 year ago* (last edited 1 year ago) (7 children)

The more you grow in experience the more you're going to realize that syntax and organization is the majority of programming work.

When you first start out, it feels like the hardest part is figuring out how to get from a to b on a conceptual level. Eventually that will become far easier.

You break the big problem down into discrete steps, then figure out the besy way to do each step. It takes little skill to say "the computer just needs to do this". The trick is knowing how to speak to the computer in a way that can make sense to the computer, to you, and to the others who will eventually have to work with your code.

You're doing the equivalent of a painter saying "I've done the hard part of envisioning it in my head! I'm just going to pay some guy on fiver to move the brush for me"


This is difficult to put into words, as it's also not about memorization of every language specific syntax pattern. But there's a difference between looking up documentation or at previous code for syntax, and trying to have chatGPT turn your psuedocode notes into working code.

[–] [email protected] 19 points 1 year ago

The more you grow in experience the more you're going to realize that syntax and organization is the majority of programming work.

organization, absolutely - but syntax? c'mon...

[–] [email protected] 13 points 1 year ago* (last edited 1 year ago) (1 children)

I'm a pretty senior dev and have chat gpt open for quick searches. It's great for helping me figure out what to Google in the cases where I can't think of the name of a pattern or type I'm looking for. It also helps quite a bit with learning about obscure functions and keywords in SQL that I can do more research on

Hell, I use Copilot daily. Its auto complete is top-tier

load more comments (1 replies)
[–] [email protected] 10 points 1 year ago

I've been programming for decades, I'm not actually a beginner. A mistake I made early on was thinking that everything I learn will be worth the time to learn it, and will always increase my overall skill level. But (particularly as relates to syntax) it's not and it doesn't; something I only use once or rarely, something that isn't closely connected with the rest of what I often do, I'll just forget it after a while. I greatly prefer being broadly capable of making things happen to having a finely honed specialization, so I run into that sort of thing a lot, there is an ocean of information out there and many very different things a programmer can be doing.

I think it is an important and valuable lesson to know when to get over yourself and take shortcuts. There are situations where you absolutely should never do that, but they are rare. There are many situations where not taking shortcuts is a huge mistake and will result in piles of abandoned code and not finishing what you set out to do. AI is an incredibly powerful source of shortcuts.

You’re doing the equivalent of a painter saying “I’ve done the hard part of envisioning it in my head! I’m just going to pay some guy on fiver to move the brush for me”

More like you've coded the functionality for a webapp, have a visual mockup, and pay some guy on fiver to write the CSS for you, because doing it yourself is an inefficient use of your time and you don't specialize in CSS.

As for the issue of a new programmer ending up with problems because they rely too much on AI and somehow fail to learn how to model the structure of programs in their head, that's probably real, but I can't imagine how that will go because all I had to go on when I was learning was google and IRC and it's totally different. Hope it works out for them.

load more comments (4 replies)
load more comments (12 replies)
load more comments (11 replies)
[–] [email protected] 85 points 1 year ago (2 children)

ChatGPT is banned by my employer, because they don't want trade secrets being leaked, which IMO is fair enough. We work on ML stuff anyway.

Anyway, we have a junior engineer that has been caught using ChatGPT several times, whether it's IT flagging its use, seeing a tab open in their browser during a demo, or simply just seeing code they obviously didn't write in code I'm reviewing.

I recently tried to help them out on a project that uses React, and it is clear as day that this engineer cannot write code without ChatGPT. The library use is all over the place, they'll just "invent" certain API's, or they'll use things that were deprecated/don't work if you've even attempted to think about the problem. IMO, reliance on ChatGPT is much worse than how juniors used to be reliant on Stack Overflow to find answers to copy paste.

[–] [email protected] 31 points 1 year ago (2 children)

I’m surprised these people can pass a technical interview. I imagine the employer doesn’t test candidates for something like this to happen.

[–] [email protected] 25 points 1 year ago* (last edited 1 year ago)

One of the dirty secrets at FAANG companies is that lots of people join from internships, and can get all the way to senior and above without ever needing to go through a standard, full technical loop. If you have a formal apprenticeship scheme, sometimes you'll join through a non-tech loop.

load more comments (1 replies)
[–] [email protected] 26 points 1 year ago* (last edited 1 year ago)

The underlying problem is the same, it just became more accessible to copy code you don't understand (you don't even need to come up with a search query that leads you to some kind of answer, chatpgt will interpret your words and come up with something). Proper use of chatgpt can boost productivity, but people (both critics of chatgpt and people who don't actually know how to code) misuse it, look at it as a "magic solution box" instead of a tool that can assist development and lead you to solutions.

[–] [email protected] 68 points 1 year ago (2 children)

.....who wrote code without stack overflow

[–] [email protected] 22 points 1 year ago* (last edited 1 year ago)

I've got no issues with people using stackoverflow or chatGPT as a reference. The problem has always been when anyone just skims what they found and just paste it in without understanding it. Without looking at the rest of the comments, further discussion, or looking at any other search results for further insight and context.

I think chatGPT makes this sort of "carelessness" (as opposed to carefulness) even easier to do, as it appears to be responding with an answer to your exact question and not just something the search algorithm thinks is related.

[–] [email protected] 20 points 1 year ago (3 children)

...who wrote in-line assembly.

load more comments (3 replies)
[–] [email protected] 49 points 1 year ago (1 children)

In days of yore, before Google or even Altavista, you could tell the quality of a team by how many O'Reilly books they had on the shelves.

load more comments (1 replies)
[–] [email protected] 39 points 1 year ago (1 children)

I find it to be suprisingly usless compared to classic aproach. But in my case it might be beacuse of the language i work with ( abap ).

[–] [email protected] 47 points 1 year ago (2 children)

It's not the language. ChatGPT is about as useful as a decent code manual. It won't actually solve any problems for you, but it can show you the general format for doing so.

[–] [email protected] 29 points 1 year ago* (last edited 1 year ago) (1 children)

And it's great for boilerplate heavy stuff or writing tests.

load more comments (1 replies)
[–] [email protected] 15 points 1 year ago (2 children)

The manual is usually not wrong.

[–] [email protected] 11 points 1 year ago (3 children)

Have you read Microsoft manuals?

load more comments (3 replies)
load more comments (1 replies)
[–] [email protected] 35 points 1 year ago (1 children)

I strongly advise not to do that. As others pointed out, it really is just predicting the next word. It is worth learning about how to problem solve and to recognize that the only way to become a better program is with practice. It's better to get programming advice from real people online and read the documentations for the functions and languages you are trying to use.

[–] [email protected] 20 points 1 year ago (1 children)

If the internet has succeeded in anything, it's that the illusion of competence is worth more than the thing itself. Until someone calls you out, that is.

load more comments (1 replies)
[–] [email protected] 34 points 1 year ago (1 children)
[–] [email protected] 34 points 1 year ago (2 children)

Notepad++ is perfectly fine to code in. With the wealth of plugins it has, it's pretty similar to vscode in how you can trick it out with all sorts of things it can't do by default.

[–] [email protected] 20 points 1 year ago (9 children)

I'm a tolerant person, but come on, man. Between VSCode, JetBrains, (n)vim and emacs, and I can't think of a legitimate reason to use np++ for development over any of them.

[–] [email protected] 16 points 1 year ago (4 children)

You havent lived until you wrote python over ssh in nano.

load more comments (4 replies)
[–] [email protected] 11 points 1 year ago (1 children)

It's super fast in comparison to full IDEs and is easier to use than most editors. I switch between vscode and notepad++ depending on what im doing.

[–] [email protected] 8 points 1 year ago

Macros man, being able to record a macro and use it quickly and easily is worth it's weight in gold when you're doing something super repetitive that there are no automatic refactors for.

And i hate the "modern sleek design" culture of making all the options hidden and difficult to reach. Notepad s interface is so fucking clean and usefull.

I still use intellij because of a lot of other things but quite often I find myself using notepad for specific tasks and it's such a treat

load more comments (7 replies)
[–] [email protected] 9 points 1 year ago

Notepad++ gang

[–] [email protected] 29 points 1 year ago

ChatGPT is next level Rubber Duck. Tell it to talk to you like Socrates.

[–] [email protected] 26 points 1 year ago (1 children)

I can code a feature faster than i can debug ChatGPTs attempt. so long as it's in JS

ChatGPT is better at bash than me though

[–] [email protected] 11 points 1 year ago

The good thing about ChatGPT is that it gives you a starting point for languages you're not familiar / rusty with.

[–] [email protected] 26 points 1 year ago (11 children)

I've always, always been a documentation-only guy. Meaning I almost never use anything other than the documentation for the languages and libraries I use. I genuinely don't feel that I'm missing out on anything, I already write code faster than my peers and I don't feel the need to try to be some sort of 10x developer.

[–] [email protected] 17 points 1 year ago (5 children)

Sometimes there are better methods to implement something, and we can learn from others’ mistakes without having to make them ourselves

load more comments (5 replies)
load more comments (10 replies)
[–] [email protected] 22 points 1 year ago (8 children)

I literally cannot comprehend coding with ChatGPT- How can I expect something to work if I don't understand it, and how can I understand it if I don't code and debug it myself? How can you expect to troubleshoot any issues afterwards if you don't understand the code? I wouldn't trust GPT for anything more complex than Hello World.

[–] [email protected] 12 points 1 year ago (1 children)

Just yesterday, I wrote a first version of a fairly complex method, then pasted it into GPT-4. It explained my code to me clearly, I was able to have a conversation with it about the code, and when I asked it to write a better version, that version ended up having a couple significant logical simplifications. (And a silly defect that I corrected it on.)

The damn thing hallucinates sometimes (especially with more obscure/deep topics) and occasionally makes stupid mistakes, so it keeps you on your toes a bit, but it is nevertheless a very valuable tool.

[–] [email protected] 8 points 1 year ago

That only really works, if the method is self-contained, and written in a language that GPT has seen often (such as python). I stopped using it, because for 1 in 10 successful tries I waste time for the other 9 tries...

[–] [email protected] 11 points 1 year ago* (last edited 1 year ago) (1 children)

You shouldn't use code that you don't understand. Chatgpt outputs quite readable and understandable code and makes sure to explain a lot of it and you can ask questions about it.

It can save quite a lot of effort, especially for tasks that are more tedious than hard. Even more if you have a general idea of what you want to do but you're not familiar with the specific tools and libraries that you want to use for the task.

[–] [email protected] 10 points 1 year ago

It's also wrong a lot. Hence the requirement for understanding. It can be helpful to get through a stretch but it will fuck up before too long and relying on it entirely is a bad idea.

load more comments (6 replies)
[–] [email protected] 22 points 1 year ago* (last edited 1 year ago) (1 children)

There was once a programmer that wrote his own code

[–] [email protected] 15 points 1 year ago (1 children)

Of course the first programmer did, but everyone who came after just copied her work and tweaked it a bit to suit their needs.

load more comments (1 replies)
[–] [email protected] 19 points 1 year ago (1 children)

If you're doing something extremely skillfully, chat gpt will make the dumbest suggestions ever...

Chatgpt is good for learning ideas and new things as an aggregate of what everyone thinks about it. But as a coding tool it cannot reason properly and has rubber stamp solutions for everything.

[–] [email protected] 10 points 1 year ago

Well yes it's responses are based on what the average of the internet would say.

I'm surprised it doesn't constantly tell you to format windows and reinstall no matter what you ask

[–] [email protected] 11 points 1 year ago

What about a programmer that doesn't use stack overflow.

load more comments
view more: next ›