▲ 427 ▼ Python tutorial moment (lemmy.world) submitted 2 years ago by devilish666@lemmy.world to c/programmerhumor@lemmy.ml 56 comments fedilink hide all child comments
[–] Buffalox@lemmy.world 89 points 2 years ago (28 children) How is this funny? 8 Upvotes at current writing??? permalink fedilink source hideshow 28 child comments replies: [–] bjoern_tantau@swg-empire.de 164 points 2 years ago (21 children) It's kind of funny because it looks like it is nonsense dreamt up by a non-programmer. But it actually works. permalink fedilink source parent hideshow 21 child comments replies: [–] mac@infosec.pub 147 points 2 years ago (9 children) 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 fedilink source parent hideshow 9 child comments replies: [–] lowleveldata@programming.dev 41 points 2 years ago (5 children) 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 fedilink source parent hideshow 5 child comments replies: [–] bort@sopuli.xyz 25 points 2 years ago* (4 children) 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 fedilink source parent hideshow 4 child comments replies: [–] gears@sh.itjust.works 7 points 2 years ago (1 child) Jesus that was one hell of a thread permalink fedilink source parent hideshow 1 child comment replies: [–] anguo@lemmy.ca 3 points 2 years ago I dont want to see the words "low quality tooling" ever again. permalink fedilink source parent [–] unique_hemp@discuss.tchncs.de 4 points 2 years ago Love the part where he claims that if your users are authenticated, it's not untrusted input. I mean, surely you trust all of your users to run any code on your server, right? permalink fedilink source parent [–] Gabu@lemmy.ml 3 points 2 years ago Impressive and unsurprising. As soon as you start getting complex libraries with multiple dependencies it becomes nearly impossible to review everything. At one time I had an interest in contributing to some AI libraries, but they're a mess as soon as you go looking for points of improvement. permalink fedilink source parent [–] bjoern_tantau@swg-empire.de 24 points 2 years ago Works as well. permalink fedilink source parent [–] billwashere@lemmy.world 7 points 2 years ago 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 fedilink source parent [–] WolfLink@lemmy.ml 5 points 2 years ago That is a large part of coding permalink fedilink source parent [–] mondoman712@lemmy.ml 92 points 2 years ago (8 children) It's basically import antigravity permalink fedilink source parent hideshow 8 child comments replies: [–] ChaoticNeutralCzech@lemmy.one 35 points 2 years ago* (1 child) Time travel is a prerequisite but don't worry, you can just from __future__ import antigravity permalink fedilink source parent hideshow 1 child comment replies: [–] Gabu@lemmy.ml 1 point 2 years ago Future libraries still makes me laugh. permalink fedilink source parent [–] grue@lemmy.world 26 points 2 years ago (3 children) It's literally this comic, five years and a research team later. permalink fedilink source parent hideshow 3 child comments replies: [–] dandroid@sh.itjust.works 5 points 2 years ago 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 fedilink source parent [–] tofubl@discuss.tchncs.de 4 points 2 years ago (1 child) More like all the research teams. permalink fedilink source parent hideshow 1 child comment replies: [–] Bene7rddso@feddit.de 1 point 2 years ago And 10 years permalink fedilink source parent [–] mac@infosec.pub 16 points 2 years ago "I also sampled everything in the medicine cabinet" This made me smile. permalink fedilink source parent [–] RobertoOberto@sh.itjust.works 3 points 2 years ago 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 fedilink source parent [–] otter@lemmy.ca 30 points 2 years ago 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 fedilink source parent [–] billwashere@lemmy.world 1 point 2 years ago Good because I was confused. I’ve written similar code permalink fedilink source parent [–] CanadaPlus@lemmy.sdf.org 39 points 2 years ago* (last edited 2 years ago) (1 child) Because this example isn't really programming, it's just calling an existing library. Which is the big joke about Python. permalink fedilink source parent hideshow 1 child comment replies: [–] Buffalox@lemmy.world 9 points 2 years ago OK that way I get why it could be considered funny. permalink fedilink source parent [–] akhial@lemmy.world 32 points 2 years ago (2 children) It's funny because from apps import facebook-killer as fb fb.start() // 3 million seed investment permalink fedilink source parent hideshow 2 child comments replies: [–] zaphod@sopuli.xyz 12 points 2 years ago (1 child) SyntaxError permalink fedilink source parent hideshow 1 child comment replies: [–] pewpew@feddit.it 4 points 2 years ago : Inconstistent indentation permalink fedilink source parent [–] lupec@lemm.ee 5 points 2 years ago My best guess is it's a play at the usual "all you do in python is import libraries without knowing how they work lololol" dig but yeah, I don't find it particularly funny either permalink fedilink source parent
[–] bjoern_tantau@swg-empire.de 164 points 2 years ago (21 children) It's kind of funny because it looks like it is nonsense dreamt up by a non-programmer. But it actually works. permalink fedilink source parent hideshow 21 child comments replies: [–] mac@infosec.pub 147 points 2 years ago (9 children) 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 fedilink source parent hideshow 9 child comments replies: [–] lowleveldata@programming.dev 41 points 2 years ago (5 children) 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 fedilink source parent hideshow 5 child comments replies: [–] bort@sopuli.xyz 25 points 2 years ago* (4 children) 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 fedilink source parent hideshow 4 child comments replies: [–] gears@sh.itjust.works 7 points 2 years ago (1 child) Jesus that was one hell of a thread permalink fedilink source parent hideshow 1 child comment replies: [–] anguo@lemmy.ca 3 points 2 years ago I dont want to see the words "low quality tooling" ever again. permalink fedilink source parent [–] unique_hemp@discuss.tchncs.de 4 points 2 years ago Love the part where he claims that if your users are authenticated, it's not untrusted input. I mean, surely you trust all of your users to run any code on your server, right? permalink fedilink source parent [–] Gabu@lemmy.ml 3 points 2 years ago Impressive and unsurprising. As soon as you start getting complex libraries with multiple dependencies it becomes nearly impossible to review everything. At one time I had an interest in contributing to some AI libraries, but they're a mess as soon as you go looking for points of improvement. permalink fedilink source parent [–] bjoern_tantau@swg-empire.de 24 points 2 years ago Works as well. permalink fedilink source parent [–] billwashere@lemmy.world 7 points 2 years ago 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 fedilink source parent [–] WolfLink@lemmy.ml 5 points 2 years ago That is a large part of coding permalink fedilink source parent [–] mondoman712@lemmy.ml 92 points 2 years ago (8 children) It's basically import antigravity permalink fedilink source parent hideshow 8 child comments replies: [–] ChaoticNeutralCzech@lemmy.one 35 points 2 years ago* (1 child) Time travel is a prerequisite but don't worry, you can just from __future__ import antigravity permalink fedilink source parent hideshow 1 child comment replies: [–] Gabu@lemmy.ml 1 point 2 years ago Future libraries still makes me laugh. permalink fedilink source parent [–] grue@lemmy.world 26 points 2 years ago (3 children) It's literally this comic, five years and a research team later. permalink fedilink source parent hideshow 3 child comments replies: [–] dandroid@sh.itjust.works 5 points 2 years ago 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 fedilink source parent [–] tofubl@discuss.tchncs.de 4 points 2 years ago (1 child) More like all the research teams. permalink fedilink source parent hideshow 1 child comment replies: [–] Bene7rddso@feddit.de 1 point 2 years ago And 10 years permalink fedilink source parent [–] mac@infosec.pub 16 points 2 years ago "I also sampled everything in the medicine cabinet" This made me smile. permalink fedilink source parent [–] RobertoOberto@sh.itjust.works 3 points 2 years ago 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 fedilink source parent [–] otter@lemmy.ca 30 points 2 years ago 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 fedilink source parent [–] billwashere@lemmy.world 1 point 2 years ago Good because I was confused. I’ve written similar code permalink fedilink source parent
[–] mac@infosec.pub 147 points 2 years ago (9 children) 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 fedilink source parent hideshow 9 child comments replies: [–] lowleveldata@programming.dev 41 points 2 years ago (5 children) 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 fedilink source parent hideshow 5 child comments replies: [–] bort@sopuli.xyz 25 points 2 years ago* (4 children) 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 fedilink source parent hideshow 4 child comments replies: [–] gears@sh.itjust.works 7 points 2 years ago (1 child) Jesus that was one hell of a thread permalink fedilink source parent hideshow 1 child comment replies: [–] anguo@lemmy.ca 3 points 2 years ago I dont want to see the words "low quality tooling" ever again. permalink fedilink source parent [–] unique_hemp@discuss.tchncs.de 4 points 2 years ago Love the part where he claims that if your users are authenticated, it's not untrusted input. I mean, surely you trust all of your users to run any code on your server, right? permalink fedilink source parent [–] Gabu@lemmy.ml 3 points 2 years ago Impressive and unsurprising. As soon as you start getting complex libraries with multiple dependencies it becomes nearly impossible to review everything. At one time I had an interest in contributing to some AI libraries, but they're a mess as soon as you go looking for points of improvement. permalink fedilink source parent [–] bjoern_tantau@swg-empire.de 24 points 2 years ago Works as well. permalink fedilink source parent [–] billwashere@lemmy.world 7 points 2 years ago 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 fedilink source parent [–] WolfLink@lemmy.ml 5 points 2 years ago That is a large part of coding permalink fedilink source parent
[–] lowleveldata@programming.dev 41 points 2 years ago (5 children) 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 fedilink source parent hideshow 5 child comments replies: [–] bort@sopuli.xyz 25 points 2 years ago* (4 children) 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 fedilink source parent hideshow 4 child comments replies: [–] gears@sh.itjust.works 7 points 2 years ago (1 child) Jesus that was one hell of a thread permalink fedilink source parent hideshow 1 child comment replies: [–] anguo@lemmy.ca 3 points 2 years ago I dont want to see the words "low quality tooling" ever again. permalink fedilink source parent [–] unique_hemp@discuss.tchncs.de 4 points 2 years ago Love the part where he claims that if your users are authenticated, it's not untrusted input. I mean, surely you trust all of your users to run any code on your server, right? permalink fedilink source parent [–] Gabu@lemmy.ml 3 points 2 years ago Impressive and unsurprising. As soon as you start getting complex libraries with multiple dependencies it becomes nearly impossible to review everything. At one time I had an interest in contributing to some AI libraries, but they're a mess as soon as you go looking for points of improvement. permalink fedilink source parent
[–] bort@sopuli.xyz 25 points 2 years ago* (4 children) 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 fedilink source parent hideshow 4 child comments replies: [–] gears@sh.itjust.works 7 points 2 years ago (1 child) Jesus that was one hell of a thread permalink fedilink source parent hideshow 1 child comment replies: [–] anguo@lemmy.ca 3 points 2 years ago I dont want to see the words "low quality tooling" ever again. permalink fedilink source parent [–] unique_hemp@discuss.tchncs.de 4 points 2 years ago Love the part where he claims that if your users are authenticated, it's not untrusted input. I mean, surely you trust all of your users to run any code on your server, right? permalink fedilink source parent [–] Gabu@lemmy.ml 3 points 2 years ago Impressive and unsurprising. As soon as you start getting complex libraries with multiple dependencies it becomes nearly impossible to review everything. At one time I had an interest in contributing to some AI libraries, but they're a mess as soon as you go looking for points of improvement. permalink fedilink source parent
[–] gears@sh.itjust.works 7 points 2 years ago (1 child) Jesus that was one hell of a thread permalink fedilink source parent hideshow 1 child comment replies: [–] anguo@lemmy.ca 3 points 2 years ago I dont want to see the words "low quality tooling" ever again. permalink fedilink source parent
[–] anguo@lemmy.ca 3 points 2 years ago I dont want to see the words "low quality tooling" ever again. permalink fedilink source parent
[–] unique_hemp@discuss.tchncs.de 4 points 2 years ago Love the part where he claims that if your users are authenticated, it's not untrusted input. I mean, surely you trust all of your users to run any code on your server, right? permalink fedilink source parent
[–] Gabu@lemmy.ml 3 points 2 years ago Impressive and unsurprising. As soon as you start getting complex libraries with multiple dependencies it becomes nearly impossible to review everything. At one time I had an interest in contributing to some AI libraries, but they're a mess as soon as you go looking for points of improvement. permalink fedilink source parent
[–] bjoern_tantau@swg-empire.de 24 points 2 years ago Works as well. permalink fedilink source parent
[–] billwashere@lemmy.world 7 points 2 years ago 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 fedilink source parent
[–] WolfLink@lemmy.ml 5 points 2 years ago That is a large part of coding permalink fedilink source parent
[–] mondoman712@lemmy.ml 92 points 2 years ago (8 children) It's basically import antigravity permalink fedilink source parent hideshow 8 child comments replies: [–] ChaoticNeutralCzech@lemmy.one 35 points 2 years ago* (1 child) Time travel is a prerequisite but don't worry, you can just from __future__ import antigravity permalink fedilink source parent hideshow 1 child comment replies: [–] Gabu@lemmy.ml 1 point 2 years ago Future libraries still makes me laugh. permalink fedilink source parent [–] grue@lemmy.world 26 points 2 years ago (3 children) It's literally this comic, five years and a research team later. permalink fedilink source parent hideshow 3 child comments replies: [–] dandroid@sh.itjust.works 5 points 2 years ago 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 fedilink source parent [–] tofubl@discuss.tchncs.de 4 points 2 years ago (1 child) More like all the research teams. permalink fedilink source parent hideshow 1 child comment replies: [–] Bene7rddso@feddit.de 1 point 2 years ago And 10 years permalink fedilink source parent [–] mac@infosec.pub 16 points 2 years ago "I also sampled everything in the medicine cabinet" This made me smile. permalink fedilink source parent [–] RobertoOberto@sh.itjust.works 3 points 2 years ago 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 fedilink source parent
[–] ChaoticNeutralCzech@lemmy.one 35 points 2 years ago* (1 child) Time travel is a prerequisite but don't worry, you can just from __future__ import antigravity permalink fedilink source parent hideshow 1 child comment replies: [–] Gabu@lemmy.ml 1 point 2 years ago Future libraries still makes me laugh. permalink fedilink source parent
[–] Gabu@lemmy.ml 1 point 2 years ago Future libraries still makes me laugh. permalink fedilink source parent
[–] grue@lemmy.world 26 points 2 years ago (3 children) It's literally this comic, five years and a research team later. permalink fedilink source parent hideshow 3 child comments replies: [–] dandroid@sh.itjust.works 5 points 2 years ago 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 fedilink source parent [–] tofubl@discuss.tchncs.de 4 points 2 years ago (1 child) More like all the research teams. permalink fedilink source parent hideshow 1 child comment replies: [–] Bene7rddso@feddit.de 1 point 2 years ago And 10 years permalink fedilink source parent
[–] dandroid@sh.itjust.works 5 points 2 years ago 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 fedilink source parent
[–] tofubl@discuss.tchncs.de 4 points 2 years ago (1 child) More like all the research teams. permalink fedilink source parent hideshow 1 child comment replies: [–] Bene7rddso@feddit.de 1 point 2 years ago And 10 years permalink fedilink source parent
[–] mac@infosec.pub 16 points 2 years ago "I also sampled everything in the medicine cabinet" This made me smile. permalink fedilink source parent
[–] RobertoOberto@sh.itjust.works 3 points 2 years ago 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 fedilink source parent
[–] otter@lemmy.ca 30 points 2 years ago 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 fedilink source parent
[–] billwashere@lemmy.world 1 point 2 years ago Good because I was confused. I’ve written similar code permalink fedilink source parent
[–] CanadaPlus@lemmy.sdf.org 39 points 2 years ago* (last edited 2 years ago) (1 child) Because this example isn't really programming, it's just calling an existing library. Which is the big joke about Python. permalink fedilink source parent hideshow 1 child comment replies: [–] Buffalox@lemmy.world 9 points 2 years ago OK that way I get why it could be considered funny. permalink fedilink source parent
[–] Buffalox@lemmy.world 9 points 2 years ago OK that way I get why it could be considered funny. permalink fedilink source parent
[–] akhial@lemmy.world 32 points 2 years ago (2 children) It's funny because from apps import facebook-killer as fb fb.start() // 3 million seed investment permalink fedilink source parent hideshow 2 child comments replies: [–] zaphod@sopuli.xyz 12 points 2 years ago (1 child) SyntaxError permalink fedilink source parent hideshow 1 child comment replies: [–] pewpew@feddit.it 4 points 2 years ago : Inconstistent indentation permalink fedilink source parent
[–] zaphod@sopuli.xyz 12 points 2 years ago (1 child) SyntaxError permalink fedilink source parent hideshow 1 child comment replies: [–] pewpew@feddit.it 4 points 2 years ago : Inconstistent indentation permalink fedilink source parent
[–] pewpew@feddit.it 4 points 2 years ago : Inconstistent indentation permalink fedilink source parent
[–] lupec@lemm.ee 5 points 2 years ago My best guess is it's a play at the usual "all you do in python is import libraries without knowing how they work lololol" dig but yeah, I don't find it particularly funny either permalink fedilink source parent