this post was submitted on 13 Apr 2024
414 points (100.0% liked)

Technology

37712 readers
187 users here now

A nice place to discuss rumors, happenings, innovations, and challenges in the technology sphere. We also welcome discussions on the intersections of technology and society. If it’s technological news or discussion of technology, it probably belongs here.

Remember the overriding ethos on Beehaw: Be(e) Nice. Each user you encounter here is a person, and should be treated with kindness (even if they’re wrong, or use a Linux distro you don’t like). Personal attacks will not be tolerated.

Subcommunities on Beehaw:


This community's icon was made by Aaron Schneider, under the CC-BY-NC-SA 4.0 license.

founded 2 years ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[–] sabreW4K3@lazysoci.al 161 points 7 months ago (2 children)

Framing libraries as cheat sheets is hilarious

[–] ulterno@lemmy.kde.social 39 points 6 months ago (1 children)

It's kinda fun to think of programming as magic.
And "libraries" as grimoires/tomes .

It's surprising how far you can go with the analogy.

[–] Banzai51@midwest.social 10 points 6 months ago* (last edited 6 months ago)

My best comment ever in Reddit was describing Lord of the Rings as programming.

[–] jarfil@beehaw.org 21 points 6 months ago* (last edited 6 months ago) (1 children)

Some time ago:

  • Me: "Programming is fun, but user interfaces are a PITA"
  • CS student: "What!? The algorithms I'm given to solve are really complicated!"
  • After a year on a job: "I hate testing user interfaces..."

Some other day:

  • Me: "Programming is mostly copy&paste"
  • Engineering student: "What!? We have to come up with a new solution for every problem!"
  • After a year on a job: "I don't program anymore, just copy&paste..."

Told ya.

[–] Dark_Arc@social.packetloss.gg 8 points 6 months ago (1 children)

Programming is mostly copy&paste

I don't know what y'all are working on but these comments always scare me ...

[–] jarfil@beehaw.org 11 points 6 months ago (1 children)

No matter what you work on, programming is one of:

  • Check the documentation for a library, copy&paste the interface call, fill in the blanks.
  • Pick the best algorithm for the case at hand, copy&paste, change a few variable names.
  • Get out your snippets archive, copy&paste the one you need.
  • Write some boilerplate, copy&paste over and over, then fill in the blanks.
  • Look up how someone else solved your problem, replicate it in a way that doesn't look like copy&paste.
  • Once in a blue moon, come up against an actually novel problem, spend some days figuring out the best way to solve it... then copy&paste the solution back into the project.

Doesn't matter what you're working on, in the end it's mostly copy&paste 😂

[–] Dark_Arc@social.packetloss.gg 8 points 6 months ago (1 children)

I work on compilers (we can't/don't even have access to the C++ standard library in my case)... Most of the time, Google can't help me ⚰️😅

It was definitely a bit more copy and paste when I was working on web applications... But even then, most of the code I was writing was fairly novel / more application and database architecture problems than trying tying libraries together.

[–] jarfil@beehaw.org 6 points 6 months ago* (last edited 6 months ago)

What are databases, other than glorified MS Access (¹)? 😜

But seriously, if you're working on compilers, then your "target users" are way different than the average thing: you have actual problems to solve, and can stick to the CLI.

Most copy&paste begins the closer to a GUI you get. Modern web interfaces, have also become a string of libraries and frameworks.

(¹: once upon a time... I tried to explain to a client, why there was no way on Earth to make their in-house MS Access solution compatible with personal data protection requirements for medical data, like 100% access control and logging. I failed... then some years later saw a story about the same problem on Coding Horror; still wonder if it was the same guy who got some other poor soul to try and go through with it, or if it was a more widespread problem at the time when personal data protection laws got enacted)