Live data from Hacker News

Computer science courses that don't exist, but should (2015)

prog21.dadgum.com

221–230 of 308 posts

Re: Computer science courses that don't exist, but should (2015)

#221
post #163

Unlearning object oriented programming I think OOP became popular because it feels profound when you first grasp it. There is that euphoric moment when all the abstractions suddenly interlock, when inheritance, polymorphism, and encapsulation seem to dance together in perfect logic. It feels like you have entered a secret order of thinkers who understand something hidden. Each design pattern becomes a small enlighten…

The great achievement of OOP is that it inspires such passion. In essence OOP is just, "hey, if you have a struct and a bunch of operations that operate on that struct, let's put the name of the struct and a dot in front of the names of those operations and you don't need to pass the struct itself as an argument" It beats me how either the high priests or its detractors get so worked up about it, even with the add-on…

You’re missing the depth of the difference. It’s not just syntax sugar for calling object.method() instead of func(object). The key distinction is what happens when the method mutates the object.

When state is mutable, every method that touches it becomes coupled to every other method that touches it. The object stops being a collection of independent behaviors and turns into a shared ecosystem of side effects. Once you mutate state, all the code that relies on that state is now bound together. The object becomes a single, indivisible unit. You cannot take one method and move it elsewhere without dragging the rest of its world along with it.

Functional programming avoids that trap. Functions are isolated. They take input and return output. They don’t secretly reach into a shared pile of state that everything else depends on. That separation is not aesthetic, it is structural. It’s what makes functions genuinely modular. You can pull them out, test them, recombine them, and nothing else breaks.

   # OOP version
   class Counter:
       def __init__(self):
           self.value = 0

       def increment(self, n):
           self.value += n

       def double(self):
           self.value *= 2

   c = Counter()
   c.increment(5)
   c.double()
   print(c.value)
Here, every method is bound to self.value. Change how one works and you risk breaking the others. They share a hidden dependency on mutable state.

Now compare that to the functional version:

   def increment(value, n):
       return value + n

   def double(value):
       return value * 2

   increment_and_double = lambda x: double(increment(x, 5))
   print(increment_and_double(0))
In this version, increment and double are completely independent. You can test them, reuse them, and combine them however you like. They have no shared state, no implicit dependency, no hidden linkage.

People often think OOP and FP are complementary styles. They are not. They are oppositional at the core. OOP is built on mutation and shared context. FP is built on immutability and isolation. One binds everything together, the other separates everything cleanly.

Mutation is what breaks modularity. Every time you let a method change shared state, you weave a thread that ties the system tighter. Over time those threads form knots, and those knots are what make change painful. OOP is built around getters and setters, around mutating values inside hidden containers. That’s not structure. It’s coupling disguised as design.

Functional programming escapes that. It separates state from behavior and turns change into a controlled flow. It makes logic transparent and free. It’s not just another way to code. It’s the only way to make code truly modular.

Re: Computer science courses that don't exist, but should (2015)

#222

Earlier quoted context omitted.

Its because CS is not cared about as a true science for the most part. Nearly all of the field is focused on consolidating power and money dynamics. No one cares to make a comprehensive history since it might give your competitors an edge.

Art and Philosophy are hardly regarded as science, either. Actually, less so. Yet...

Philosophy is definitely a social or formal science (depending on who you ask).

Re: Computer science courses that don't exist, but should (2015)

#223

Unlearning object oriented programming I think OOP became popular because it feels profound when you first grasp it. There is that euphoric moment when all the abstractions suddenly interlock, when inheritance, polymorphism, and encapsulation seem to dance together in perfect logic. It feels like you have entered a secret order of thinkers who understand something hidden. Each design pattern becomes a small enlighten…

OOP and FP are in theory orthogonal principles. Maybe I'm too much of a pragmatic and purists might scoff at me, but I use and appreciate both.

No they are not. Fp and oop are opposing principles. They are in direct conflict with one another. See my other reply to see why.

Re: Computer science courses that don't exist, but should (2015)

#224
post #188
post #140

> CSCI 2100: Unlearning Object-Oriented Programming?? People in tech industry, seem to have no idea how the systems in the wild work. Enterprise Java runs the backbone of operations for all of large business organisations such as banks. It is just as grounded as MS Office is. It is object-oriented software that is running the bulk of production environments of the world. Who is going to maintain these systems for the…

Maybe it should be "really learn about object-oriented programming (at a low level)". Methods are functions, with an implicit argument usually called "self". Unless they are static, in which case, they are just regular functions. Classes are data structures, abstract methods are function pointers, inheritance adding data at the end of an existing data structure. In fact, inheritance is like a special case of composit…

From https://people.csail.mit.edu/gregs/ll1-discuss-archive-html/... (the koan below is a bit worn out but the email thread is also enlightening)

The venerable master Qc Na was walking with his student, Anton. Hoping to prompt the master into a discussion, Anton said "Master, I have heard that objects are a very good thing - is this true?" Qc Na looked pityingly at his student and replied, "Foolish pupil - objects are merely a poor man's closures."

Chastised, Anton took his leave from his master and returned to his cell, intent on studying closures. He carefully read the entire "Lambda: The Ultimate..." series of papers and its cousins, and implemented a small Scheme interpreter with a closure-based object system. He learned much, and looked forward to informing his master of his progress.

On his next walk with Qc Na, Anton attempted to impress his master by saying "Master, I have diligently studied the matter, and now understand that objects are truly a poor man's closures." Qc Na responded by hitting Anton with his stick, saying "When will you learn? Closures are a poor man's object." At that moment, Anton became enlightened.

Re: Computer science courses that don't exist, but should (2015)

#225

Unlearning object oriented programming I think OOP became popular because it feels profound when you first grasp it. There is that euphoric moment when all the abstractions suddenly interlock, when inheritance, polymorphism, and encapsulation seem to dance together in perfect logic. It feels like you have entered a secret order of thinkers who understand something hidden. Each design pattern becomes a small enlighten…

Did you use ChatGPT to write this?

No

Re: Computer science courses that don't exist, but should (2015)

#226
post #45

I would add debugging as a course. Maybe they should teach this but how to dive deep into figuring out how to learn the root cause of defects and various tools would have been enormously helpful for me. Perhaps this already exists

Great idea. I had a chemistry lab in college where I was given a vial of a white powder on the first day of class and the course was complete when I identified what it was.

A similar course in CS would give each student a legacy codebase with a few dozen bugs and performance / scaling problems. When the code passes all unit and integration tests, the course is complete.

Re: Computer science courses that don't exist, but should (2015)

#227

Earlier quoted context omitted.

> It is interesting that no software engineering or computer science course I’ve seen has ever spent any time on CI/CD. It's hard to fit everything student needs to know in the curriculum. Someone else posted here they had 10 pages of proofs per week, for one course. I would have been fired for assigning so much homework! I was a CS professor at a local college. My solution was to ignore CS1 and CS2 curriculum (we we…

>Someone else posted here they had 10 pages of proofs per week, for one course. Huh. As a professor, I would not be able to grade this kind of volume in any serious capacity. Especially since proofs need to be scrutinized carefully for completeness and soundness. I wonder how their instructor manages.

It’s possible that person was new to writing proofs; inexperienced people going in the wrong direction can tend to ramble, for lack of a better word.

Re: Computer science courses that don't exist, but should (2015)

#228

Earlier quoted context omitted.

If Alan Kay doesn't respond directly to this comment, what is Hacker News even for ? :) You're not wrong about history, but that only strengthens Kay's case. E.g., our gazillion-times better physical substrate should have led an array of hotshot devs to write web apps that run circles around GraIL[1] by 2025. (Note the modeless GUI interaction.) Well, guess what? Such a thing definitely doesn't exist. And that can on…

https://news.ycombinator.com/user?id=alankay Has not been active on Hacker News for several years now. At 85 he has earned the peace of staying away from anything and everything on the internet.

Yes, Alan Kay is very ill.

Re: Computer science courses that don't exist, but should (2015)

#229
post #220

Earlier quoted context omitted.

The man on the street may not know this history, but serious actors, singers, authors, and inventors themselves certainly know what came before them. If not, they are presumably not actually that interested in their own vocation (which is also normal, by the way).

Do you know this for fact? My gut is that most performers will know of the performers they watched for inspiration. Just like athletes. But few will know the history of their field. I will agree that the "greats" seem to tend to know all of this. Such that I think I'm agreeing with your parenthetical there. But most practitioners?

I don't know it for fact, no. BUT...I would be very surprised if the average working film director hasn't heard of Ernst Lubitch or Ringo Lam (here I'm deliberately picking names that aren't commonly known by the public at large, like Steven Spielberg). Obviously we could do this for lots of vocations, but really my statement above was about serious practitioners, people who are deliberately trying to improve their art, rather than just hammer a check (which, again, is normal and fine!).

Re: Computer science courses that don't exist, but should (2015)

#230
CSCI 4330: Software Cotillion Class

Learn the group etiquette during meetings for task assignment and interacting with supervisor authority.

Emphasizes being respectful and polite, with lessons on manners like handshakes, greetings, and helping others.

Cotillion classes often culminate in a formal backlog grooming and lessons-learned where students display their learned skills.

Post reply on HN