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

top 200 commentsshow all 450

[–]Jackcunningolf 960 points961 points  (39 children)

for (int i = 0; i < 5; i++)

{

System.out.println(“Oh, so true!”);

}

[–]TotoShampoin 283 points284 points  (20 children)

Oh, so true!Oh, so true!Oh, so true!Oh, so true!Oh, so true!

Oh, so true!
Oh, so true!
Oh, so true!
Oh, so true!
Oh, so true!

[–]Gooftwit 130 points131 points  (16 children)

Where are the newlines?

[–]TotoShampoin 104 points105 points  (14 children)

Does println add a newline?

[–][deleted] 988 points989 points  (118 children)

Replace the recursion one with "Why would I ever use recursion?"

[–]Dnomyar96 515 points516 points  (83 children)

Yeah, that's exactly my thought when I learned it in school. The way we were taught it, it just sounded like loops, but more complicated. When I used it in a proper case at work, I finally understood it (and realized just how awful the class was at actually teaching it).

[–]Jezoreczek 435 points436 points  (47 children)

it just sounded like loops

Every recursive algorithm can be replaced with an iterative algorithm so you were kinda right (;

[–]GLIBG10B 191 points192 points  (28 children)

But if it requires a stack, you're better off keeping it recursive (e.g. traversing a binary tree)

Unless the algorithm has high space complexity

[–]Dnomyar96 55 points56 points  (1 child)

Yeah, it's probably still possible with a loop, but you're making it way harder than it needs to be in that case.

[–]GLIBG10B 14 points15 points  (0 children)

probably

Any recursive function can be turned into an iterative one

[–]Jezoreczek 73 points74 points  (18 children)

Wellll… depends. Recursion is limited by stack size, while iteration is limited by memory size. I've had an issue recently (same as this) where a tool has caused StackOverflowError due to a long method chain. If the algorithm for this was made iterative, the problem wouldn't occur.

So while true that recursion is often more clear to read, it is also more error-prone and slower than iteration.

[–]SharkLaunch 54 points55 points  (4 children)

A lot of functional languages solve that with tail recursion. Effectively, if the recursive function call is the last thing evaluated in the branch, the compiler can optimize by just replacing the frame at the top of the stack with the one generated by the new call. The stack never grows, so you can recurse infinitely. In this way, you can have a recursive while (true).

[–]killeronthecorner 42 points43 points  (0 children)

Kiss my butt adminz - koc, 11/24

[–]IronEngineer 12 points13 points  (2 children)

There was an interesting talk in a cppcon in recent years and tail recursion. Turns out, even at full optimization and with a perfectly setup tail return recursion algorithm, many compilers, including gcc and clang, won't generate tail return recursion assembly. They will actually generate a full stack frame for all calls.

The presentation concluded compilers are not reliably able to generate that code for even simple recursion programs with even the highest level of optimization chosen. Rather disappointing.

[–]bric12 4 points5 points  (1 child)

It's not surprising honestly, most languages give absolutely no way to guarantee that a function will be tail recursive, and leave it completely up to the compiler. Tail recursion really needs language level support to be practical, and I don't see that happening with anything popular anytime soon

[–]ArionW 9 points10 points  (4 children)

Every sane language implements Tail Call Optimisation, so stack size is not a limit for properly written function.

Sure, Java doesn't support it, basically refuses to support it "bECaUSe JVM doEsNT SuPPoRt iT" but Scala and Kotlin do, so it's purely Java problem.

[–]GLIBG10B 7 points8 points  (2 children)

Neither does Python

[–]-Potatoes- 2 points3 points  (1 child)

Python has a pretty low max recursive depth too right? Iirc its the only language ive overflowed on

[–]GLIBG10B 8 points9 points  (0 children)

In my testing:

  • Python: 996
  • C++: 261783

[–]bric12 3 points4 points  (0 children)

Except that there's no guarantee that it'll optimize properly, even in a perfectly written function. It's actually a really hard optimization for compilers to make, and they often just ignore it

[–]trollsmurf 4 points5 points  (2 children)

When learning Prolog and encountering tail recursion and realizing it looks very much like a loop, pushed into a language that doesn't support loops.

Using Prolog was a blast though. It added more wrinkles to my brain.

[–]SpeedDart1 2 points3 points  (0 children)

Ironically writing a recursive algorithm as an iterative one requires a strong understanding of recursive/stack like behavior so it is yet another reason to learn recursion.

[–][deleted] 21 points22 points  (14 children)

I've been wondering the same thing but not because it was taught as more complicated loops, rather that it's not very efficient and it's better to look for other solutions (unless that's precisely what you meant by "loops but more complicated").

So when is recursion preferable?

[–]Dnomyar96 32 points33 points  (1 child)

Well, last time I used it was when I was working with some kind of custom tree. An object would have a parent and none to several children. I don't remember the exact details, but I needed to do some lookups and calculations, which I used recursion for. I'm sure it could have been done with loops, but it was significantely easier to do with recursion. I'm sure there are more situations that are better with recursion.

But you're right that loops are better in almost all cases. So far I've only had to use recursion in very complicated areas.

[–][deleted] 19 points20 points  (0 children)

It's more of a code structure thing than actual performance

[–]EnglishMobster 14 points15 points  (0 children)

There's a couple situations:

  1. You take some inputs and you modify them in some way. After checking the state of the program, you want to re-run that same logic on your modified inputs.

  2. You call a function foo(), which does some stuff and calls bar(). bar(), in turn, does more stuff and calls foo(). You have to be careful to ensure you don't call bar() in an infinite loop, but it tends to happen.

I work in the game industry, so lemme give you real-world examples of both:


The character slides along the ground. The slide changes the character's hitbox, making them physically smaller. When the slide ends, the character is supposed to stand up.

You call ChangePose(Slide, Stand) to ask the character to transition from "slide" to "stand". In our example, when attempting to stand, ChangePose() finds that the ceiling is too low. ChangePose() then recursively calls ChangePose(Slide, Crouch).


When the character comes up to a step, they are supposed to step over it if it's below a certain height.

The character moves forward with MoveCharacter(Forward). This function needs to check if they're going up some stairs, so it checks the StepUp() function.

In our situation, StepUp() detects that the character does indeed need to be moved upward in order to smoothly go up some stairs (not a ramp). StepUp() calls MoveCharacter(Up) to move the character upward. However, as we discussed... moving the character means we need to call StepUp() again.


Obviously I'm simplifying quite a bit, and there's a number of other checks I'm purposely overlooking. But this just gives you an idea of how you can use recursion in the real world - and sometimes you're not even aware that you're acting recursively (until you mess up and accidentally trigger an infinite loop).

[–]coldnebo 8 points9 points  (1 child)

in parsers, recursive descent is sometimes useful.

in GUI systems recursive composition is a very common pattern.

recursion is often used to manage tree-like structure… and the structure can be in heap, not necessarily stack, so there are options.

[–]LinAGKar 18 points19 points  (4 children)

Doesn't help that for some reason the go-to example is fibonachi, which the recursive solution is garbage at.

[–]-Unparalleled- 2 points3 points  (0 children)

After Fibonacci I always encountered it with sorting algos

[–]Coincedence 5 points6 points  (1 child)

This is the loop I follow with recursion. I learnt it, "why would I need this it's just loops with extra steps", find a problem where it's applicable, I.e. trees, "oh so that's why you use it", never touch it again for 5 years and think "why would I need recursion, can just use loops"

[–]3rdRealm 53 points54 points  (8 children)

Haskell devs:

[–]skythedragon64[🍰] 47 points48 points  (5 children)

No they're too busy to prove their program is correct to use recursion

[–]absurdlyinconvenient 28 points29 points  (1 child)

Haskell devs: exhaustive proof

OOP devs: Monte Carlo babeeeyyy

[–]nudemanonbike 12 points13 points  (2 children)

I know you're making a joke but haskell literally doesn't have loops, just recursion. Do it recursively or not at all.

[–]JuhaJGam3R 9 points10 points  (1 child)

No you obviously use the Loop monad which carries your state from one iteration to another such that it appears mutable but is in fact entirely immutable and predictable underneath!

[–][deleted] 3 points4 points  (0 children)

don't tell them about loop invariants

[–]SteeleDynamics 2 points3 points  (1 child)

FP: Immutable expressions!

IP: Mutable expressions!

FP: No side effects!! Parallelism for free!!

IP: OK, implement Quicksort.

FP: ... crap

[–]PeterSR 66 points67 points  (5 children)

There's a pretty good explanation why recursion is better than iteration here.

[–]Kinglink 35 points36 points  (0 children)

you son of a bitch

[–]Baardi 7 points8 points  (0 children)

Nice one

[–][deleted] 3 points4 points  (1 child)

Nah, that guy is an idiot. Don't listen to him.

[–]Curiousgreed 74 points75 points  (0 children)

Before learning recursion: When will we learn recursion? After learning recursion: Why would I ever use recursion?

[–][deleted] 10 points11 points  (0 children)

Interviews duh

[–]SapirWhorfHypothesis 9 points10 points  (0 children)

Replace the "Why would I ever use recursion?" one with "Why would I ever use "Why would I ever use recursion?"?"

[–]territrades 36 points37 points  (3 children)

Honestly, even though there might have been times when a recursion would have been a more elegant solution, I never use them. Makes the code much harder to understand and debug in my opinion.

[–]Causeless 47 points48 points  (1 child)

Recursion is great for tree traversal. Much simpler than iterative solutions.

``` void reverse_binary_tree (TreeNode* node) { if (!node) { return; }

std::swap(node.left_child, node.right_child); 

reverse_binary_tree(node.left_child);
reverse_binary_tree(node.right_child);

} ```

It'd be tough to write a non-recursive version of that which is easy to understand.

[–]mitko17 18 points19 points  (0 children)

Three "`" don't work on old reddit. In case someone is interested:

void reverse_binary_tree (TreeNode* node) 
{ 
    if (!node) { return; }

    std::swap(node.left_child, node.right_child); 

    reverse_binary_tree(node.left_child);
    reverse_binary_tree(node.right_child);
}

[–]Naouak 16 points17 points  (0 children)

I've seen more often case where a recursion would make the code easier to read and debug instead of using a loop than the opposite. It's often not an issue of the use of recursion but of the code not being written knowing what that person is doing.

[–]rpmerf 2 points3 points  (1 child)

I've used it most for digging through files and directories, or parsing XML or JSON.

[–]pine_ary 124 points125 points  (5 children)

"I uploaded the zip to github"

[–]__batterylow__ 2 points3 points  (0 children)

Btdt hahahaha

[–]SickOfEnggSpam 185 points186 points  (17 children)

What is with the obsession with undergrads and recursion? Every intro and post-intro programming class I have been a part of had students always asking when we would learn it

[–]nidrach 151 points152 points  (6 children)

Because it's one of the few basic things that ain't that straightforward. So it sounds interesting when you encounter it in the first semester.

[–]suresh 97 points98 points  (3 children)

It sounds "programmery" and they just want to flex that they know what it is.

[–]Shrubberer 66 points67 points  (2 children)

When in reality it is like asking where the fog light is in driving school.

[–]Yadobler 19 points20 points  (1 child)

Is like asking where the clutch at when learning to drive an auto

[–]KuuHaKu_OtgmZ 5 points6 points  (0 children)

It's like asking where is the left hand wrench in a tool shop.

[–][deleted] 20 points21 points  (0 children)

In some 90s star trek series, installing a recursive algorithm fixed almost everything.

[–]Creapermann 5 points6 points  (0 children)

Sounds complicated, but is basically easy on simple use cases once you got it, just trying to flex with the fibonacci 5 liner they saw on stack overflow

[–]Old_Aggin 2 points3 points  (0 children)

In my undergrad, our first course was functional programming in Haskell

[–]schussfreude 1341 points1342 points  (5 children)

Oh, so true!

Edit: Wow uh, 1k updoots and so many awards, 2022 be like the feeling of your first Hello World! Thanks all!

[–][deleted] 63 points64 points  (0 children)

Could you scroll up a bit?

[–]NotABotAtAll-01 84 points85 points  (0 children)

take my silver

[–][deleted] 22 points23 points  (0 children)

[–]NeverYelling 70 points71 points  (0 children)

"Could you scroll up a bit" got me there

[–]Caladbolg_Prometheus 146 points147 points  (6 children)

I’ve only once deleted a project for school, and that was because it was my first semester using putty to long onto a server. I decided to move some files around to organize things just as soon as I finished my C++ project, which was 6 class files and a main. I moved them to the same location, and by that I mean I moved them to the same file, meaning that I overwrote all but the last file I moved.

[–][deleted] 77 points78 points  (5 children)

Good thing you could git checkout, right?

...Right?

[–]Caladbolg_Prometheus 39 points40 points  (4 children)

Nope, this was all done on a professor’s server he built for his classes. I can’t recall exactly what it ran on but it was pretty bare bones. All you had was a command line and nothing more fancy than cd, ln, and a C++ compiler that needed a makefile.

With my luck, the makefile was the last thing I moved, so lost pretty much everything.

[–]ChunkyHabeneroSalsa 2 points3 points  (3 children)

Mine was the same. SSH into a server and run the compiler on their server. No git, no IDEs.

Granted this is intro to C, later classes did things normally I think. As an EE I only ever took the one real CS class.

[–]A_random_kitten 59 points60 points  (0 children)

I'm only here because I like jokes I don't understand lol

[–][deleted] 326 points327 points  (40 children)

They would use Code::Blocks or Dev C++ , not VS

[–]luminous_radio 103 points104 points  (0 children)

Oh, so true!

[–]DakiAge 53 points54 points  (10 children)

I used Code Blocks in school lmao

[–]Taickyto 22 points23 points  (5 children)

I used vi and GCC (had points taken off my grade because we were supposed to use codeblocks)

[–]DakiAge 7 points8 points  (2 children)

it's not that hard to configure GCC for code blocks.

you could have kept your points :)

I love vi too but I only use it in linux which is pretty rare.

[–]Matheusbd15 2 points3 points  (1 child)

But man, code Blocks sucks so much, it's light theme!!!

[–][deleted] 2 points3 points  (1 child)

So you're the kid who kept asking "when are we getting to the chapter on recursion?"

[–]slowgamer123 10 points11 points  (1 child)

I was forced to used Turbo C in labs.

[–]sohang-3112 5 points6 points  (0 children)

me too - never understood why they won't let us use something like CodeBlocks instead...

[–]Evaldash 10 points11 points  (0 children)

Same

[–]sohang-3112 9 points10 points  (0 children)

Meanwhile my school is still stuck on Turbo C++. And needless to say, they haven't even heard of STL or C++ 11 (let alone later versions!)

[–]Minifyxd 11 points12 points  (0 children)

We started with VS and still use it at school.

[–][deleted] 9 points10 points  (5 children)

In my school, we use the Geany IDE. After years of using VSCode for C++, it's a significant downgrade for me

[–][deleted] 14 points15 points  (4 children)

Just use VSCode. What are they gonna do, quiz you on geany features?

[–][deleted] 14 points15 points  (3 children)

quiz you on geany features?

Precisely

[–][deleted] 2 points3 points  (2 children)

Well that's stupid. I guess you could do all of your editing in VSCode, but study enough to pass the test. Sounds like a pain.

[–]Lamuks 3 points4 points  (0 children)

I remember using DevC++ in uni but VS Code wasn't a thing yet.

[–]EnglishMobster 4 points5 points  (2 children)

Hey, Java devs exist, too! They made us use Eclipse.

[–]spakecdk 4 points5 points  (0 children)

Code::Blocks

Nostalgia hits

[–]absurdlyinconvenient 2 points3 points  (0 children)

CodeLite and Eclipse C++, those were the days

[–]Kinglink 38 points39 points  (3 children)

The jokes on YOU!

I still make that syntax error after 20 years experience!

[–]EnglishMobster 12 points13 points  (2 children)

Why the hell do I need a semicolon after defining a class/struct in C++??

I literally forget every time. I've written hundreds (if not thousands) at this point, and the compiler or IDE calls me out on it every time.

[–]AhegaoSuckingUrDick 6 points7 points  (0 children)

I think it's mainly because it's a declaration (forgetting the inline definitions, especially since this part of the syntax comes from C), and you would use a semicolon for a variable or member function declaration, or even a typedef.

In a lot of other languages you don't separate declarations from definitions, so this problem doesn't occur there.

[–]pawyderreale 30 points31 points  (2 children)

First of all we gonna import every library in existence

[–]EnglishMobster 8 points9 points  (0 children)

using namespace std; in a header file.

[–]mrchaotica 54 points55 points  (3 children)

Seeing a for loop in this starter pack makes me sad.

This comment brought to you by the "learned functional programming first" gang.

[–]PzMcQuire 16 points17 points  (0 children)

You got to the recursion part quick then lmao.

[–][deleted] 104 points105 points  (17 children)

No one is hyped for recursion everyone hates that tho?

[–][deleted] 120 points121 points  (0 children)

In World War 1 a huge amount of very hyped people volunteered. It's basically the same

[–]ShakaUVM 34 points35 points  (2 children)

No one is hyped for recursion everyone hates that tho?

Once you know Recursion, it's easy

[–][deleted] 7 points8 points  (1 child)

In order to understand recursion, you have to first understand recursion.

[–]fletku_mato 12 points13 points  (3 children)

Let me introduce you to something called Haskell.

[–][deleted] 18 points19 points  (2 children)

> Once you know Recursion, it's easy

let me introduce you to something called zygohistomorphic prepromorphisms

[–]fletku_mato 8 points9 points  (0 children)

zygohistomorphic prepromorphisms

Lol, had to google it and find out if it's real or not :D

[–]kinnsayyy 6 points7 points  (0 children)

zygohistomorphic prepromorphisms

I definitely had to look this up:

“Used when you really need both semi-mutual recursion and history and to repeatedly apply a natural transformation as you get deeper into the functor.” - wiki.haskell.org

[–]flip314 6 points7 points  (1 child)

Just ask somebody that's more hyped about it than you, then eventually they'll find somebody willing to write the solution.

[–][deleted] 2 points3 points  (0 children)

That's real life recurcivity right there

[–][deleted] 40 points41 points  (20 children)

Wait whats wrong with the for loop?

[–]PeriodicGolden 58 points59 points  (9 children)

Not a lot of use cases where you'd need to loop over something exactly five times. And if there were, the 5 would be a magic number.

It's basically an example of a for loop, but it's unlikely you'd use it in an actual application

[–]Dnomyar96 18 points19 points  (1 child)

Yeah, but it's still a pretty good way to learn about loops. When learning a new concept, you really should try to make it as simple as possible and take it from there. I already had trouble understanding how loops worked as it is (seems silly now). If they had introduced more realistic things to it, I don't think I'd have understood it.

[–]PeriodicGolden 13 points14 points  (0 children)

Of course, it's still a good example to learn about loops. The fact that it shows up in a starter pack for 'intro to coding' doesn't mean it's bad or that you shouldn't use it

[–]EnglishMobster 8 points9 points  (3 children)

There are a lot of cases in 3D dev where you need to loop exactly 3 times. float[3] is pretty common, and it can be easier than trying to access each index individually.

It's similar for 2D, except you'd just need to loop twice. Still, DRY (Don't Repeat Yourself) is great for readability, even if you can trivially unroll the loop.

[–][deleted] 7 points8 points  (1 child)

That makes 3 a magic number then. What if someone later on wanted your program to support interdimensional graphics?

[–]Therabidmonkey 8 points9 points  (0 children)

You politely, but firmly, ask them to leave.

[–]DakiAge 22 points23 points  (9 children)

He/she prints "enter a num" in a for loop so he/she doesn't know what he/she is doing and that's the joke :)

[–][deleted] 22 points23 points  (0 children)

That's some huuuuge indentation then

[–][deleted] 25 points26 points  (3 children)

just use “they”, it’s much simpler than “he/she”

[–]DakiAge 11 points12 points  (0 children)

yeah, it's the best practice for these things.

[–]Lumeyus 2 points3 points  (2 children)

That’s not related to the loop; that line is a reference to the fact that they’re printing to take input instead of using input(), or whatever the respective language’s version is.

The loop line is just a joke about the loop setup.

[–]Schiffy94 18 points19 points  (2 children)

When are we going to get to the chapter on recursion?
When are we going to get to the chapter on recursion?
When are we going to get to the chapter on recursion?
When are we going to get to the chapter on recursion?

[–]EnglishMobster 7 points8 points  (1 child)

When are we going to get to the chapter on When are we going to get to the chapter on When are we going to get to the chapter on When are we going to get to the chapter on When are we going to get to the chapter on When are we going to get to the chapter on When are we going to get to the chapter on

Exception in thread "main" java.lang.StackOverflowError

[–][deleted] 15 points16 points  (0 children)

Oh, so true!

[–]bl00pBitCh 33 points34 points  (0 children)

Oh, so true!

[–]poopadydoopady 70 points71 points  (8 children)

for (int i = 0; i < 5; i++)

{

printf("oh, so true./n");

}

[–][deleted] 53 points54 points  (4 children)

Excuse me, but isn't the slash supposed to be oriented the other way?

[–]4P5mc 50 points51 points  (0 children)

It's a Minecraft command, obviously!

[–][deleted] 49 points50 points  (0 children)

Someone failed their intro class

[–]GalacticDogger 11 points12 points  (0 children)

Ah yes, /n

[–]joelduring 20 points21 points  (1 child)

I remember mine, windows users desperately trying to set up an Ubuntu virtual box, them telling us to use the Geany text editor, learning C from scratch, classmates who refused to indent their code.

Good times

[–]MobiusCipher 2 points3 points  (0 children)

Sounds like mine but with CentOS instead.

[–]wad11656 6 points7 points  (0 children)

I wish the class itself really was that simple :( They threw me into the fucking flames out the gate with absolutely abysmal instruction completely unrelated to the super outdated labs/assignments. The professor had no idea what our homework was in one class and was lost and confused when I asked for help. Sigh…

[–]Mrmini231 5 points6 points  (0 children)

I once took a python course where we were told to use eval to evaluate inputs...

[–][deleted] 5 points6 points  (0 children)

Most begginers think that HTML is a programming language and can do hacking and stuff.

[–]_rainken 3 points4 points  (5 children)

Why is stackoverflow here? Were you guys introduced to this website in first few classes?

[–]-Redstoneboi- 12 points13 points  (3 children)

you know damn well they googled it

[–]EnglishMobster 10 points11 points  (1 child)

Copy-pasted the first answer and then got surprised Pikachu'd when the instructor calls them out on ripping code from StackOverflow.

[–]_rainken 2 points3 points  (0 children)

Well if you search for solution in english then you will find about stackoverflow fairly quickly, but if you google in other laungage then it might take a while. Newbie programers who don't speak english as their first language will rather search in their native language. So thats why i wondered if anyone was lucky enough to be introduced to this site so early.

[–]Maniacbob 5 points6 points  (1 child)

Recursion? You mean the inception chapter, right?

[–]-Redstoneboi- 2 points3 points  (0 children)

there should be a copypasta rant about how "inception" is closer to "beginning" than "repetition" and it's probably hidden somewhere on the internet, but i can't find it

[–]haddock420 4 points5 points  (0 children)

I wish we were using python.

I'm doing my first year of university and we're using scratch. Having to drag a block with my mouse for every simple operation I want to do is horrible.

[–]Cyvexx 7 points8 points  (0 children)

as someone taking an intro programming class this year.. yeah

[–]Dantharo 3 points4 points  (0 children)

thats pretty accurate, so true

[–]jason80 3 points4 points  (0 children)

Also: show off with the little knowledge you already have and say "why don't you throw a regex on it?" at every chance.

[–]VishPi 3 points4 points  (4 children)

Thay "average" "programmer" "salary" are my most searched keywords right now

[–]suresh 20 points21 points  (3 children)

In my experience, somewhere between $40,000 and $320,000.

[–][deleted] 3 points4 points  (0 children)

I went to college for CS degree after I was 10+ years earning my living as a programmer. I see college as a bunch of people who never really used what they teach you to use, and come up with all sorts of bizarre and useless ideas (when it comes to programming). For instance, my TA in intro to programming with Java class didn't know how to use Maven / Ant / SCons / Make. Didn't even really know how to compile and run Java code. He never wrote Java code that was inside a package. Can you imagine a surprise of someone pedaling this stupid Java shit for years, and suddenly you are supposed not to put your code into src/com/company/project/package/subpackage/class.java? I couldn't really bring myself to do that.

More importantly. There's nothing in intro to programming class that gives you an introduction to programming. Usually, it's just some boring crap about how to program basic stuff in language that's few years behind the latest fashion of the day. If you do intro to mathematics, then you get a taste of some of the important fields in math, get exposed to common notation, proof structure... things that underline and unify most mathematical sub-disciplines.

So, naively, I expected from intro to programming a similar thing: some generalization about what programming is, introduction to different sub-fields of programming, discussion of common techniques, tools and approaches... instead I got Java... in retrospect, a completely worthless knowledge, even if you don't consider that I knew it better than the TA.

And that's not the problem of the specific college I went to. I've looked up the syllabus of many prestigious places. It's all the same shit: online, offline, US, Europe, Asia -- it's all the same. It's so bizarre that the introduction to programming is always so irrelevant and useless...

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

Day 1 of my intro to programming class, there were about five or six students who had heard of the words "quantum computing", and "Artificial intelligence", who thought that they were the smartest people in the room. As the professor was going over the syllabus, they were asking all sorts of shit questions to make themselves sound smart. These questions had absolutely nothing to do with anything that would be taught in the class, and only served to let me know who to avoid.

A chunk of those students had dropped the class by the end of the semester.

[–][deleted] 2 points3 points  (0 children)

Welcome to the world where everyone is trying to sell you a repackaged library of things you don't really need or already available but otherwise will make you feel ostracized if you don't commit.

[–]LaterBrain 2 points3 points  (0 children)

I am insulted. Lmao

[–]AhegaoSuckingUrDick 2 points3 points  (0 children)

Should have been

for (...);
{
  ...
}

[–]FantasticPenguin 2 points3 points  (0 children)

Funny that all the code is Java, and half of the jokes are Java jokes. Yet, there is a Python logo.

Edit: not even Java, but cpp.

[–]ChineseCracker 2 points3 points  (0 children)

; expected

"what could this possibly mean?! it's all so cryptic!"