You are viewing a single thread.
View all comments View context
163 points

It’s kind of funny because it looks like it is nonsense dreamt up by a non-programmer. But it actually works.

permalink
report
parent
reply
147 points

I thought it was poking fun at the tutorial saying instead of learning to code, import a library from someone who knows how to code.

permalink
report
parent
reply
24 points

Works as well.

permalink
report
parent
reply
41 points

That’s what libraries are for. I’m no security expert and the sensible thing to do is using a library instead of taking a class.

permalink
report
parent
reply
25 points
*

I’m no security expert and the sensible thing to do is using a library instead of taking a class.

Counterpoint: “not knowing your libraries” + “blind trust in the maintainer” will give you stuff like this: https://bitbucket.org/snakeyaml/snakeyaml/issues/561/cve-2022-1471-vulnerability-in

(the thread itself is worth a read. But also very impressive is the list of big players who fell for exactly this mentality)

permalink
report
parent
reply
5 points

That is a large part of coding

permalink
report
parent
reply
7 points

Which is funny because when I first started my CS degree in the late 80s (get off my lawn) we used to make fun of the beginning Java classes because it seems 90% of coding was to import the right library.

permalink
report
parent
reply
92 points

It’s basically import antigravity

permalink
report
parent
reply
16 points

“I also sampled everything in the medicine cabinet”

This made me smile.

permalink
report
parent
reply
35 points
*

Time travel is a prerequisite but don’t worry, you can just

from __future__ import antigravity
permalink
report
parent
reply
1 point

Future libraries still makes me laugh.

permalink
report
parent
reply
26 points

It’s literally this comic, five years and a research team later.

permalink
report
parent
reply
4 points

More like all the research teams.

permalink
report
parent
reply
5 points

It’s funny how solvable that problem is now. I remember seeing that comic, I think over a decade ago now, and thinking about how true it was. It really shows you have far we’ve come in CS.

permalink
report
parent
reply
3 points

From the hovertext: “I wrote 20 short programs in Python yesterday. It was wonderful. Perl, I’m leaving you.

After years of a dozen other languages, I finally tried Perl the other day.

Never again, if I can help it.

permalink
report
parent
reply
30 points
from Lemmy import Upvote
from Fediverse import Posts
from ActivityPub import Submit

target_post = 'https://lemmy.ca/post/18691085'
num_votes = 8

post = Posts.open(target_post)

package = Upvote(post, num_votes)

package.Submit(target_post)

or something

permalink
report
parent
reply
1 point

Good because I was confused. I’ve written similar code

permalink
report
parent
reply

Programmer Humor

!programmerhumor@lemmy.ml

Create post

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

  • Posts must be relevant to programming, programmers, or computer science.
  • No NSFW content.
  • Jokes must be in good taste. No hate speech, bigotry, etc.

Community stats

  • 6.8K

    Monthly active users

  • 1.4K

    Posts

  • 32K

    Comments