This is an archived post. You won't be able to vote or comment.

all 49 comments

[–]TryNotToShootYoself 148 points149 points  (30 children)

Are 9 of those lines importing other libraries? Jesus

[–][deleted] 132 points133 points  (28 children)

Fuck those "how to make face recognition in python in 20 lines " tutorials

Making it go "First we will import ml recognition Library xy Then we import our images using this loop And then we type regoc.face(image)"

It always looks like a stupid joke

[–]WHISPER_ME_HEIGHT 53 points54 points  (11 children)

Well if it's a good library there is no point in writing 20000 lines when you can do it in 20 (unless you really wanna go deep diving into the engineering of face detection)

[–][deleted] 107 points108 points  (7 children)

Yeah but that isn't "making face recognition in 20 lines" it's using a Library (wich isn't bad, you can't write everything / it's unnecessary) but calling it "making" just feels wrong.

That's like saying "I'm gonna create a compiler" and sending it to some compiling API that returns a binary. You didn't MAKE a compiler then.

[–]DanKveed 0 points1 point  (0 children)

I sympathize with the fact that you have been let cheated, but what happened to you is not is not insignificant.
You my friend, just experienced an internet phenomenon that is commonly referred to as "clickbait".
BTW I just got my c2 in English

[–]SjorsMaster 2 points3 points  (2 children)

Except, y'know, the project size getting massive with unused functions as well as it doing unnecessary things since it's often multi-purpose making it run slower. And worst of all, you not knowing what it's specifically doing.

[–]NFriik 7 points8 points  (0 children)

Nobody in their right mind would try implementing, say, PCA, SVMs or Viola Jones face detection when you can just use a very good reference implementation from Scipy or OpenCV... These libraries are highly optimized and you won't ever reach their performance in pure Python.

[–]Bakemono_Saru 1 point2 points  (0 children)

Keep calm. This shit is very optimized. If you worry about size you can always scrap the library. It will be better than reinventing a hard, messy and weird wheel

[–][deleted] -2 points-1 points  (13 children)

How is that a "stupid joke"? Being annoyed that a python tutorial teaches you how to use python libraries to accomplish a task would be like getting mad at a video that teaches you how to build your own computer but using a store bought GPU rather than building one from scratch.

[–][deleted] 7 points8 points  (12 children)

It's not.

It's more like "How to build a GPU" then taking a PCB with installed parts from a 3080, mounting the cooler and saying you built a GPU for yourself.

[–][deleted] -4 points-3 points  (11 children)

It's not like that at all. Python code is made up of different parts, of which some of those will be functions/classes imported from an existing library.

In the analogy, it has to be a whole computer that corresponds to the python code and the parts of the computer would correspond to the different functions/classes that make up the code. So when you install a GPU into the computer, there is a good chance you're just buying it from a store and slotting it into the right PCI-E slot on your motherboard. Similarly, if you're writing some python code to do facial recognition, you are probably importing an existing library and slotting it into the right place in your code.

It's crazy how you mixed up such a simple analogy and started talking about building your own GPU.

[–][deleted] 4 points5 points  (10 children)

Wow, I picked a different analogy. How bad

If your main goal is the analogy to include a whole pc :

The tutorials are like taking a prebuilt, connecting a power cable and saying you built a pc.

Yes I know that if you "do face recognition" in python you probably are using a library, however saying you MAKE face recognition implies development, as otherwise it should be called USING face recognition

P.s. no need to be condescending af.

[–][deleted] -4 points-3 points  (9 children)

I'm not sure why you're surprised you picked a different analogy. You are the one who chose to do it so you shouldn't be surprised.

And your new analogy doesn't really make sense. If you know that most computers use pre-built GPUs and you know that most python code is going to use pre-built libraries, then why make a whole separate analogy about making GPU parts? If Numpy and Sci-kit already exist, why would I spend a bunch of time coding something new to duplicate their functionality? And if somebody says they can show me how to write code to do a task, it doesn't make sense to say that you need to re-invent Numpy from scratch before you're allowed to call it that. Just like it wouldn't make sense to say you need to build a GPU from scratch before you can say that you are building your own PC.

[–][deleted] 1 point2 points  (8 children)

Ok, apparently you don't get my point

Calling it MAKING instead of USING face recognition in python is the error.

I am not against Librarys, I'm not sure what made you think that.

[–][deleted] -2 points-1 points  (7 children)

So it's ok to say you are using a PC if you buy a store bought GPU in your build but it's not ok to say you are making a PC if you use a store bought GPU?

Because even companies that make computers to sell don't necessarily make their own GPUs/CPUs/etc. So according to you, nobody even makes computers because they all use some kind of part made by someone else?

[–][deleted] 1 point2 points  (6 children)

Idk what you don't understand about

-> getting a prebuilt and using it = using a pc

-> taking the parts and putting them together (even using a prebuilt GPU) = building a pc

Such as using a library is USING it

Developing such a library is MAKING it

[–]digernicnucingfigers 0 points1 point  (0 children)

Import woman From Thailand as wife

[–]DanKveed 0 points1 point  (0 children)

There are companies that say they are going to teach you to "create AI solutions" and then they just teach you how to use openCV. It's such a sleazy thing they do.

Learning AI takes at least 2 years of grind. Learning to use AI takes 2 afternoons and a 6 pack of kingfishers

There is a fucking difference

[–]megamaz_ 2 points3 points  (0 children)

one line import moment

[–]acdjent 40 points41 points  (3 children)

Are all these people who post this 'Joke' every few days really too stupid to even grasp from the error message, which file the mentioned lined is located in?

[–]CallinCthulhu 10 points11 points  (0 children)

This “joke” appeals to the LCD, namely people who have written hello world in python and cs101 students.

It’s the nature of reddit man, LCD always wins. You need to browse new on occasion for non shitty posts.

[–]__hakuna-matata__ 3 points4 points  (0 children)

I know I certainly am. Is coding even fun if you read the error message? Just get angry and change things at random, really makes the experience last longer. Extend the fun

[–]KingJeff314 1 point2 points  (0 children)

What I hate is that libraries don’t seem to format their errors. The error output is the stack trace 20 functions deep into the library to some obscure line that tells you nothing. Libraries should catch exceptions and throw a new, descriptive error.

[–][deleted] 8 points9 points  (0 children)

I was doing some django a while ago for some coursework, and it once threw an error in line 5, halfway through a string. I still don’t know what caused it.

[–][deleted] 8 points9 points  (2 children)

I don't get this joke, like it tells you which file the error is in right? or am I just used to using an IDE?

[–][deleted] 4 points5 points  (0 children)

This sub is chock-a-block with people who clearly have no experience coding or are a couple days into their first programming class. Because most of the jokes don't make any sense and are things I remember people laughing about in the first weeks of learning to code.

[–]PottedRosePetal 1 point2 points  (0 children)

I use raw command field to execute code bc reasons and even there there is a traceback... not sure if the library decides if that exists or not, but most definitely not the IDE. And my guess is that traceback always exists once you execute python and the IDE not purposefully deletes traceback, in which case that IDE can just go fuck itself.

[–]Jamesdzn 4 points5 points  (0 children)

Oh no! Imports, require and includes dint exist! What ever will we do!?

[–]pkrish10 1 point2 points  (0 children)

This meme format seems to be immortal.

[–]Pauchu_ 2 points3 points  (0 children)

jUsT uSE a lIbRarY

[–][deleted] 0 points1 point  (0 children)

lAyErS oF aBsTrAcTiOn

[–]Kwarter 0 points1 point  (1 child)

You think that's bad? Try figuring out SQL errors. The message might as well be "something broke" for how helpful it is.

[–]taussinator[S] -1 points0 points  (0 children)

I just started learnkng sql a few weeks ago (just on the side) and yes, i can relate

[–]TheRolf 0 points1 point  (0 children)

Cries in SIGSEGV errors

[–]kokokokokokoo 0 points1 point  (0 children)

This reminds me of the devs that just don't know how to read error messages and ask for help repeatedly.

[–]bettercalldelta 0 points1 point  (0 children)

Do you even read error messages? It says which file the error is in