[ 3 / biz / cgl / ck / diy / fa / ic / jp / lit / sci / vr / vt ] [ index / top / reports ] [ become a patron ] [ status ]
2023-11: Warosu is now out of extended maintenance.

/sci/ - Science & Math


View post   

File: 29 KB, 460x322, forgotretard.jpg [View same] [iqdb] [saucenao] [google]
11012947 No.11012947 [Reply] [Original]

>friend asks me to teach him how to kode so that he can get a job as a software engineer
>we come to recursion, ask him to create a fibonacci function to demonstrate the technique in action
>"Anon, what is the point of this? When will we ever use this in real life?"

I don't know what to say to this. I explained that this pattern is observable in nature and finance but he seemed uninterested. What do you say to people when they ask those "when will I use math in real life" questions?

>> No.11012952

YTA for pushing your friend to learn useless things.

>> No.11012953

you just made this thread

>> No.11012960

>>11012953
I didn't think it post. I don't see it in the catalog anywhere. That or the jannie jumped on top of it pretty quick.

>> No.11012967
File: 10 KB, 200x313, 1563226828976.jpg [View same] [iqdb] [saucenao] [google]
11012967

>>11012960

>>11012914

>> No.11012968

>>11012947
>making a fibonacci function through recursion
What the fuck is wrong with you?

>> No.11012974

>>11012967
That is weird. I must of hit the reply button instead of the new thread button. What a dumb fuck up.

>> No.11012983

>>11012968
Nah, it's a pretty good example of recursion. It's like 3 lines of code and it demonstrates everything nicely.

>> No.11012993

>>11012983
Try to calculate F(50) using recursion

>> No.11012994

>>11012983
This.

Just give up OP. There's no hope

>> No.11012996

>>11012993
Yeah it's O(n!) complexity but the point isn't that it's the best solution. The idea would be to show him memoization and finally a bottom-up approach (iterative).

>> No.11013000

>>11012952
fpbp

Stop nerdsplaining him and show him what's needed how the job. Faggot

>> No.11013001

>>11012983
shoulda reversed a string or traversed a list or tree

>> No.11013004

>>11012947
If you understood it, you could explain it.

>> No.11013005

>>11012996
You are trying to teach him memoization in the first few lessons? Just stick with something simple.

>> No.11013006

>>11012996
O(2^n)*

>> No.11013007

>>11012996
Could've explained quicksort to him instead.

>> No.11013013

>learn to code to work as a software engineer
This isn't how it works
coding != software engineering

>> No.11013014

>>11013005
Probably not. This is something that would take a few weeks with a lot of practice. It's mostly just to show him how recursion works. I want him to understand how to dissect a recursive problem and break down to a base case.

>> No.11013015

>>11013013
I told him that he'd benefit with a bachelors in CS or CE or literally any STEM related to software engineering but he refuses. He doesn't want to go back to school (only has a 1 year certificate to draw blood at a clinic).

>> No.11013026

>>11013015
>No degree
Every employer will trash his resume.

>> No.11013029

>>11012947
If you don't know how to use math in real life then you never will. Kind of a universal law of tool use.

>> No.11013034

>>11012947
Drown in pussy when you solve the Towers of Hanoi at a party

>> No.11013207

>>11013026
I have no degree
my employer hired me because he thinks going to college for CS is a scam

>> No.11013227

>>11013207
Did he asks leetcode questions?

>> No.11013257

>>11013227
no, he hired me part-time for three months to assess the quality of my work and then hired me full-time

He mostly wanted to see how quickly I could catch on to things I didn't already know rather than what I already knew.

>> No.11013270

>>11013257
Ah so it's a kode monkey job. Nice grab. Start thinking of moving on after the one year mark though.

>> No.11013313

>>11012947
Tell him it's an exercise, you're not trying to do something new and useful, just to learn something.

>>11013007
As much as I love quicksort for its beauty and worth, it's not something you use to teach recursion.
It would take countless hours to understand and appreciate.

>> No.11013708

>>11012947
He’s right you know. For everything that can be done with recursion, you could just do it iteratively.

>> No.11015729

>>11013257
In fact as I said >>11013013 coding is not engineering and code monkeys are the lowest bar in the food chain of the field

>>11013270 is right
Do you know something about programming patterns? (I'm assuming you know OOP) From there you can go up one level and study software architectures and programming paradigms
Try to become a bigger fish

>> No.11015731

>>11015729
What is the difference between coding and engineering?

>> No.11015777

>>11015731
SE includes everything that happens before your team sit in front of the computer and start coding, a short and approximative list:
- getting domain and requeriments from the customers
- define what methodology use (Agile, Scrum, Kanban, Scrumban or others)
- define what technologies your team is going to use
- design UML diagrams for the code monkeys of your team
- write a ton of documentation
- how the software is going to be maintained
And if you want or if it is necessary you can even help coding the software
You should read something about the software crisis in the 60s

>> No.11015920

>>11012996
Lmao imagine not using the closed form solution

>> No.11015979

>>11012947
Just skip over the fibonacci function.

>> No.11016204

>>11012947
Ask him to do something practical that is slightly outside of his capabilities. Teach him the syntax and let him loose on some projects. Some people learn best when they care about the result. Maybe get an Arduino or something.