this post was submitted on 07 Mar 2024
168 points (87.2% liked)

Technology

59696 readers
2743 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
 

A person I watch frequently gave me this gem. Please forgive the annoying thumbnail.

Original from ycombinator

all 39 comments
sorted by: hot top controversial new old
[–] squirrelwithnut@lemmy.world 119 points 8 months ago (7 children)

I've seen this sentiment in a few places recently, and as a software engineer with 20 years of experience I can say with 100% certainty that this is a terrible (and dangerous) trend when it comes to programming.

Undergrads should absolutely be learning how memory works, how to allocate it, when to free it, and what issues you can get into when you don't do it properly. Sheltering them from such things will lead to a more ignorant generation of developers, which will lead to a lot of headaches down the road, for everyone.

[–] anlumo@lemmy.world 80 points 8 months ago

This is almost certainly not intentional. The AI just can’t differentiate between unsafe as in NSFW and unsafe as in manual memory management.

[–] iegod@lemm.ee 12 points 8 months ago

Agreed. I've been seeing the trend myself and it's a damn shame. Ignorance isn't a reason to shelter others

[–] stoly@lemmy.world 9 points 8 months ago

When I clicked the thread I thought this was a joke and am now experiencing a degree of horror.

[–] Lizardking13@lemmy.world 6 points 8 months ago

The programming field is going through what math has been going through for ages. Many people don't want to learn how things work because they can use a calculator or software to do basic maths. But then when it comes to actually understanding what's going on, there becomes a big loss.

[–] lolcatnip@reddthat.com 4 points 8 months ago

Good thing we have Rust.

[–] nyan@lemmy.cafe -2 points 8 months ago (3 children)

Manual memory management has about as much applicability these days as assembler did back when I was doing my degree. It should be covered as part of learning How Things Work Under the Hood, it's still needed for some kinds of specialist work, but many—perhaps even the majority of—people writing code will never need to deal with it in the real world, because the languages in which most code is written these days all have some form of memory management.

[–] thehatfox@lemmy.world 20 points 8 months ago (1 children)

There is still an enormous amount of C++ code still in use (and other unsafe languages for that matter). It is still an actively developed and used language, and likely will be for many years to come. Having at least a basic grounding in it is very valuable element of flexibility for any potential programmer, as well as an understanding of the underlying concepts.

[–] nyan@lemmy.cafe -4 points 8 months ago (1 children)

Yes, there is C++ code still being written, and it's a reasonable choice for some lower-level and complex code , but it's a much smaller percentage of the whole than it was even ten years ago. Web stack stuff tends to be written in memory-managed languages, and it probably accounts for more lines of new code than anything else these days (note that I didn't specify good code). You can have a whole career without ever getting down into the weeds.

Similarly, assembler still had some practical applications in games and video codecs when I got out of school. These days, I wouldn't expect to see hand-written assembler outside of an OS kernel or other specialized low-level use. It's still not gone, but it's been gradually going for many years now. Languages without memory management likely never will completely disappear, and they have massive inertia because of the sheer number of C utility libraries lying around, but they're gradually becoming more marginalized.

What it comes down to is: understanding how memory works is useful and broadening for someone who wants to program, but it's no longer necessary even for a professional. (I think we're mostly in agreement on everything except relative importance, in other words.)

[–] applebusch@lemmy.world 5 points 8 months ago (1 children)

Memory unsafe languages will always have value in applications where speed and performance mean anything. Embedded programming and video games are the obvious examples, but pretty much any application taken far enough will eventually demand the performance benefits of memory unsafe languages. Some even require writing assembly directly. Contrary to common dogma, the compiler isn't always best.

[–] robotica@lemmy.world 1 points 8 months ago

I love how you two seem to be arguing or trying to win over each other in some way, whereas you are in fact in agreement, just coming from opposite sides.

[–] catloaf@lemm.ee 9 points 8 months ago (1 children)

Yeah, but that doesn't mean you should allocate a billion arrays just because the memory is managed for you. It's still inefficient.

[–] nyan@lemmy.cafe -2 points 8 months ago

You don't need to understand the details of how memory is allocated to understand that taking up too much space is bad, and that there's often a tradeoff between programmer time, machine execution time, and memory allocated, though.

[–] sunbeam60@lemmy.one 3 points 8 months ago

Hmmm.

You’re probably right. But to any student reading this I’d say you’re likely to become a significantly stronger programmer, and thus find it easier to find employment, if you understand and feel comfortable knowing how to use a memory-unsafe language. Eventually you’ll arrive up in a problem that’s caused by it, or a required optimisation that benefits from manual memory management. If you want to work in games, too, there really is no other option.

In that sense it’s the same as assembler. One day you’ll sit there and not understand why something breaks only to realise that the underlying assembler doesn’t quite do what the source alludes to.

So, I’m not sure you need it, but I’m pretty sure you’ll benefit from it.

[–] asdfasdfasdf@lemmy.world -3 points 8 months ago* (last edited 8 months ago)

You can do all that with Rust. Maybe C/C++ is good to teach if the professor explains why they should almost never be used, but IMO it would probably be better to just educate them using a well designed language like Rust so that they have the experience for a career.

[–] LoremIpsumGenerator@lemmy.world 34 points 8 months ago (1 children)
[–] Traister101 11 points 8 months ago (1 children)

At least Tom won't be affected. He's a genius.

[–] AusatKeyboardPremi@lemmy.world 7 points 8 months ago (3 children)

For those in the unknown, this comment is in reference to an article on The Daily WTF, which ThePrimeagen “reacted” to.

rant

As I have frequently found myself not knowing a quip/quote/reference from popular (or worse, obscure) media, I am doing my bit to add context to this rather plain comment disguised as an in-joke.

For people who derive pleasure from posting such references, please annotate your reference with some context for others to take part in/appreciate the media you liked enough to remember and make a reference of.

[–] PipedLinkBot@feddit.rocks 3 points 8 months ago (1 children)

Here is an alternative Piped link(s):

“reacted”

Piped is a privacy-respecting open-source alternative frontend to YouTube.

I'm open-source; check me out at GitHub.

[–] RageAgainstTheRich@lemmy.world 1 points 8 months ago (1 children)

I like theprimeagen and I'm really interested in what he has to say. but he talks so loud into the microphone and it just ends up giving me anxiety :(

There was this one youtube video he made and the moment it started, he screamed into the microphone and it just instantly freaked me the fuck out. 😔

[–] Traister101 -1 points 8 months ago

Turn down your volume?

[–] abhibeckert@lemmy.world 10 points 8 months ago

Let me guess - learned from all those websites about unsafe memory(ies)?

[–] PipedLinkBot@feddit.rocks 7 points 8 months ago (1 children)

Here is an alternative Piped link(s):

https://piped.video/watch?v=r2npdV6tX1g

Piped is a privacy-respecting open-source alternative frontend to YouTube.

I'm open-source; check me out at GitHub.

[–] HelloHotel@lemm.ee 8 points 8 months ago (2 children)
[–] ABCDE@lemmy.world 4 points 8 months ago (1 children)

Really? The website never works.

[–] NightAuthor@lemmy.world 2 points 8 months ago

I rarely have issues, weird.

[–] cheese_greater@lemmy.world 3 points 8 months ago (1 children)
[–] HelloHotel@lemm.ee 2 points 8 months ago (1 children)
[–] cheese_greater@lemmy.world 2 points 8 months ago* (last edited 8 months ago) (1 children)

We gots a lil buddy (downvoter) Poor guy thinks anyone gives a shit

[–] HelloHotel@lemm.ee 2 points 8 months ago* (last edited 8 months ago) (1 children)

Nah, I found it amusing, no ill intent was ment.

[–] cheese_greater@lemmy.world 1 points 8 months ago* (last edited 8 months ago)

We're all having fun, thats wat matterz (I never count not giving a shit unless I'm not enjoying it ;)

[–] cyd@lemmy.world -1 points 8 months ago (1 children)
[–] FooBarrington@lemmy.world 0 points 8 months ago

Actual, true AI