this post was submitted on 22 Oct 2024
226 points (86.9% liked)

Technology

58845 readers
4792 users here now

This is a most excellent place for technology news and articles.


Our Rules


  1. Follow the lemmy.world rules.
  2. Only tech related content.
  3. Be excellent to each another!
  4. Mod approved content bots can post up to 10 articles per day.
  5. Threads asking for personal tech support may be deleted.
  6. Politics threads may be removed.
  7. No memes allowed as posts, OK to post as comments.
  8. Only approved bots from the list below, to ask if your bot can be added please contact us.
  9. Check for duplicates before posting, duplicates may be removed

Approved Bots


founded 1 year ago
MODERATORS
(page 2) 31 comments
sorted by: hot top controversial new old
[–] [email protected] 0 points 2 days ago (1 children)

AI and the discussion around it doesn't live in a vacuum.

Occasionally you'll get shit opinions like this. Easy slutty greek frat bro strawmen that'll sleep with anything that moves and then dodge child support payments.

We all have to remember the true Chad argument against AI is that it's built on degenerate theft and corporate soulless shills. AI is the Shikrelli of creativity.

load more comments (1 replies)
[–] [email protected] 31 points 2 days ago* (last edited 2 days ago) (9 children)

Good. There's a lot of non-programmers who are now bad ones and are using AI to make their ideas real. It's made programming way more accessible to people who would never learn before.

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

If you treat an AI like anything other than the rubber duck in Rubber Duck Programming you're using it wrong.

[–] [email protected] 2 points 2 days ago

I use it to generate repetitive patterns that's easy to guess what's next, but PITA to write, eg. asserts in Unit tests

[–] [email protected] 17 points 2 days ago* (last edited 2 days ago) (3 children)

I'll confess I only skimmed the article, but it seems like just a bunch of unsubstantiated opinions and I don't buy it.

Using AI generated code is like pair programming with a junior programmer. You tell the junior what to do and then you correct their mistakes by telling them how to do better. In my experience, explaining things to someone else makes you better at your craft. Typically this cycle includes me changing the code manually at the end, and then possibly feeding it back to ChatGPT for another cycle of changes.

Apart from letting me realize and test my ideas quicker, this allows me to raise the abstraction level of my thinking. I can spend more time on architecture and on seeing the bigger picture, and less time being blinded by the nitty gritty details. I would say it makes me both a faster and a better programmer.

[–] [email protected] 0 points 2 days ago (1 children)

Bugs never occur in the high-level/big picture land, it usually come up in the low-level/implementation land. Should you entrust these to AI ?

[–] [email protected] 2 points 2 days ago* (last edited 2 days ago)

Only because bugs are defined as errors in implementation details. You can still have errors in your design (sometimes referred to as design bugs).

It's not about "entrusting" to AI any more than I would be entrusting important code to a junior developer to just go off and push to production on his own. We still have code review, pair programming etc. As I said, I read the output code, point out issues with it, and in the end make manual adjustments to fit what I want. It's just a way of building up the bulk of the code more quickly and then you refine it.

load more comments (2 replies)
[–] [email protected] 145 points 2 days ago (7 children)

Try programming for a day without syntax highlighting or auto-completion, and experience how pathetic you feel without them. If you're like me, you'll discover that those "assistants" have sapped much of your knowledge by eliminating the need to memorize even embarrassingly simple tasks.

That's...how the world works. We move on. We aren't programming computers by flipping toggle switches or moving patch cables around anymore either.

'Try directly hand-coding bits into regions of memory without a compiler/linker and experience how pathetic you feel without it.'

[–] [email protected] 39 points 2 days ago (1 children)

Naw man, the other day I pulled a moth out of my code.

load more comments (1 replies)
load more comments (6 replies)
[–] [email protected] 46 points 2 days ago

I've never had AI create working code anyway.

But it will generally point me in the right direction. It's useful for:

  1. Helping get your train of thought back in the right direction
  2. Automating what would be a lot of boilerplate/repetitive coding. Just beware you will still need to check it over.

You need to be skilled to spot the mistakes it will definitely make.

[–] [email protected] -3 points 2 days ago* (last edited 2 days ago) (5 children)

The same logic can explain why Teslas crash so often. You turn on all the assists, and eventually forget how to change gears.

load more comments (5 replies)
[–] [email protected] 24 points 2 days ago* (last edited 2 days ago) (1 children)

You mean I can go from being a terrible programmer to merely a bad one? I'm in.

[–] [email protected] 12 points 2 days ago

Unironically, yes. It'll generally generate working code, but not necessarily the most correct or efficient. And it may not do exactly what you want.

[–] [email protected] 19 points 2 days ago (2 children)

Not a coder. I can understand most python code and powershell scripts that others have done, but I don't remember syntax, if I need to make something from scratch. Doing that involves ton of googling and reading awful documentation that still leaves some things out. I do this maybe twice a year.

For someone like me AI coding is a god sent.

[–] [email protected] 12 points 2 days ago

doing that involves a ton of googling and reading awful documentation

Yes. That is programming.

To most of us, the syntax is the easy part to remember, and our IDEs take care of most of it. Being able to bang our heads through the documentation and experiment with libraries is pretty much what our jobs are.

AI coding is basically a shortcut to some of the stuff we have to repeat with slight changes in our software. It's also useful for setting up more complex code that we know we'll have to tweak.

Expecting it to produce something with the desired results is a recipe for disaster. It's basically a cheaper outsourcing method that can't actually compile and run it's code before giving it to you.

[–] [email protected] 6 points 2 days ago

If you're someone who has no actual interest in learning to code, and instead see AI as more of a freelancer—telling it stuff like "make a kart racer game," and "that sucks, make it better"—then none of this really applies to you.

[–] [email protected] 13 points 2 days ago (1 children)

Agree on the application side, but when it comes to the test suite, I'm definitely gonna consider letting an AI get that file started and then I'll run through, make sure the assertions are all what I would expect and refactor anything that needs it.

I've written countless tests in my career and I'm still gonna write countless more, but I'm glad I can at least spend less time on laborious repetition now and more time on the part of the job I actually enjoy which is actually solving problems.

[–] [email protected] -2 points 2 days ago (1 children)

Things like unit tests I just have AI do it all now. Since running the test tells you your coverage you can verify if it got everything or not.

[–] [email protected] 5 points 2 days ago

Here's something that might blow your mind. Coverage is not the point of tests.

If you your passing test gets 100% coverage, you can still have a bug. You might have a bunch of conditions you're not handling and a shit test that doesn't notice.

Write tests first to completely define what you want the code to do, and then write the code to pass the tests.

[–] [email protected] -2 points 2 days ago (2 children)

I'd rather be a bad programmer that gets stuff done than a good programmer who's just jerking off about proper design

t. good programmer

[–] [email protected] 8 points 2 days ago (1 children)

Once you move past a couple thousand LOC, you'll appreciate having an easily modifiable, modular design you had the foresight to plan out.

Or you can just trawl through thousand of lines of unstructured spaghetti code trying to figure out where to shoehorn your new feature in like a QBasic/Arduino kid.

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

Proper design will save an epic shit ton of money when it inevitably needs to be changed or fixed.

load more comments (1 replies)
[–] [email protected] 65 points 2 days ago* (last edited 2 days ago) (1 children)

Our computer science professor in some programming course at university told us we were not supposed to take advice from the internet or answers from Stack Overflow for half a year... Until we learned the ropes. And could asses for ourselves what's right and what is wrong. (And I believe that was some C/C++ course where you get lots of opportunuties to do silly things that might somehow work but for all of the wrong reasons.)

I think he was right. There is lots of misinformation out there that isn't a proper design pattern. And with copy-pasting stuff, you don't necessarily learn anything. Whereas learning with some method is efficient and works.

And I'm pretty sure I'm not super intelligent, but all of that isn't really hard. I mean if someone codes regularly, they might as well learn how to do it properly. It takes a bit of time initially... But you get that time back later on. Though... I'd let AI write some boilerplate code. Or design a website if I'm not interested at all how the HTML and CSS works... I think that's alright to do.

[–] [email protected] 53 points 2 days ago (3 children)

The real learning comes from debugging the garbage code you copied from stack overflow

[–] [email protected] 7 points 2 days ago (1 children)

Debugging only teaches logic. Not structure. No amount cut, paste, debug with teach you the factory pattern.

load more comments (1 replies)
[–] [email protected] 8 points 2 days ago

Debugging and being able to interpret documentation when it exists.

But good lord, the amount of programmers I work with that never use an IDE debugger is unreal. I get that you don't have to, but Jesus Christ, if yout not getting an expected result, it's way fucking faster to step through the code and see where the data changes then to slap logging into every line and attempt to read the output.

[–] [email protected] 22 points 2 days ago* (last edited 2 days ago)

I mean it also contains great stuff. Niche workarounds, ways to do something more efficiently than some standard library function does.

You just need a means of telling apart the good and the bad. Because there's also people smashing their forehead on the keyboard until it happens to be something that compiles. And people repeating urban legends and outdated info. You somehow need background knowledge to tell which is which. AI didn't invent phrasing some nonesense with full conviction. It is very good at doing exactly that, but we humans also have been doing that since the beginning of time.

[–] [email protected] 15 points 2 days ago (2 children)

Well I'm already a bad programmer, at least I save time /j

[–] [email protected] -1 points 2 days ago

came here to post this

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

Just because you are "bad programmer" does not mean you are a bad programmer.

[–] [email protected] 8 points 2 days ago

we should use 0, 1 and 2 instead of binary just to represent truer statements like this one

load more comments
view more: ‹ prev next ›