Programming thread

I wouldn't call C a functional programming language. I feel like the bare minimum you'd demand of a programming language for it to be considered functional is that functions are emphatically first-class (i.e. you can store them in variables/data struconatures, pass them as parameters to other functions, and return them as results from other functions). Sure, you can sort of get that behavior happening with function pointers in C, but it definitely doesn't feel as obvious as doing it in a classical functional language like Haskell or ML or something.

Whoa hold up nigga. Did you just call C a functional programming language?

I can feel it. Many LISP programmers in pain. They're mad and they don't know why.

Lulz, busted. You're both right, of course. I was conflating "functional" with "non-object-oriented" in my head for some reason.
 
  • DRINK!
Reactions: Knight of the Rope
What's the difference between functional and oo directed?
A 'functional' programming language is a language where functions are considered 'first-class.' That is to say, functions can be bound to variables and passed around like any other value type.

A function in this case is just a particular kind of subprogram (probably the most common one you find in languages these days) which can return a value and also has parameters and local variables lexically scoped to itself. Or in layman's terms - a function is a part of the program you can call to do something in a standard way that has its own storage for the stuff the function does and can also spit out a value when it's done (this will make a lot more sense once you start programming).

Functional programming is therefore the idea of defining programs in terms of functions. In functional programming, you tend to build lots of small functions and then define larger functions in terms of those smaller functions. You also see functions taking other functions as parameters to allow for things like generic programming.

Most functional languages just have these features in concert with another programming paradigm (either structured programming, OOP, procedural etc) but some functional languages are 'pure', which is to say not only do they support functional programming but they only support functional programming. A pure functional language does not have a mutable program state and thus (it's argued anyway) pure functional programs are easier to reason about and test.

Or in non-autism speak - functional programming is where you can treat functions like normal data you can pass around and do shit with. Don't think about it too hard.

Object-oriented programming is a style of programming that came around in the 1980s and became popular in the 1990s. In the OO paradigm, the fundamental unit of a program is an 'object.' An object is kind of a black box that contains data as well functions (called 'methods') that can interact with that data. Understanding OO is hard if you don't know basic programming shit but the basic idea is that you model your program based on the real-world concrete things you're doing computation on (so a program that deals with cars will have a 'car' object that encapsulates all the computations you might need to do about cars).

With a few exceptions, most programming languages are multi-paradigm. That is, they support many different kinds of programming paradigms (functional, OO, structured, procedural, etc). The languages I suggested for each paradigm were more based on what's idiomatic on those languages - JavaScript programmers will favor functional approaches whereas C# programmers will favor object-oriented approaches despite JS supporting OO and C# supporting functional programming.

In the 'real world', you're likely to encounter both kinds of programming paradigms at the same time. Most languages support both paradigms and there's a lot of languages (Ruby and Scala for example) that actually fuse both together in their syntax. So it's worth learning about both and being comfortable working with both.
 
Last edited:
If one struggles to pick a language, look through at least 100 programming job listings in the area and pick the language that appears the most in the first entry under "Job Requirements." In the end, it's about using what can land you a job. Everything else can be for side projects or advanced learning outside work.
 
One of the biggest problems ive seen as a computer forensics student is how outdated the course material is, like in my C class were expected to utilize out as fuck dated crap, like the graphics.h. From my self study there is really no reason to teach in C, when C++ is just as relevant and more useable. Java and python are just as easy, but from what ive found its mostly due to the book makers catering to indias students.
Hate to hear my school wasn't the only retarded one teaching graphics.h. I also had an entire semester of writing SQL queries and results by hand. I coincidentally developed carpal tunnel around that time
 
Hate to hear my school wasn't the only retarded one teaching graphics.h. I also had an entire semester of writing SQL queries and results by hand. I coincidentally developed carpal tunnel around that time
my java teacher made us write code by hand, always dinged me hard due to my hand writing, i swear to fuck if i wrote in cursive i would have gotten way better grades, fucking mid term and final for it.
 
Why by hand?

Was this a fucking school for Ludites?
I suspect Knight of the Rope is right. The professor was old and stubborn (and strangely) sexually aggressive). At least she was better than the CS/EE processor that didn't use computers because he was paranoid about tracking.

So maybe you are onto something. I might have been unknowingly enrolled in CS for the Amish
 
I suspect Knight of the Rope is right. The professor was old and stubborn (and strangely) sexually aggressive). At least she was better than the CS/EE processor that didn't use computers because he was paranoid about tracking.
It is unfortunately common, yeah.

Actually someone from my alma mater told me that they're probably bringing back fully-written assignments for one of the computer science modules there. At the moment they've got assignment submission entirely automated with unit tests that check if the code actually fulfills the requirements, and as you can imagine it's all-or-nothing (i.e. if your code doesn't even compile or run without errors, then of course it fails every check, so you get a 0). But that's 'too cruel' apparently, and many of the students want it changed so that they can get "points for an attempt" again.
 
  • Thunk-Provoking
Reactions: nah
It is unfortunately common, yeah.

Actually someone from my alma mater told me that they're probably bringing back fully-written assignments for one of the computer science modules there. At the moment they've got assignment submission entirely automated with unit tests that check if the code actually fulfills the requirements, and as you can imagine it's all-or-nothing (i.e. if your code doesn't even compile or run without errors, then of course it fails every check, so you get a 0). But that's 'too cruel' apparently, and many of the students want it changed so that they can get "points for an attempt" again.
Paying piles of monies to take classes that are a series of inferior codewars projects. I know the feeling. CS education should be the most advanced in the sector but they keep finding ways to make it remarkably stupid.

At least it isn't multiple choice...
 
I suspect Knight of the Rope is right. The professor was old and stubborn (and strangely) sexually aggressive). At least she was better than the CS/EE processor that didn't use computers because he was paranoid about tracking.

So maybe you are onto something. I might have been unknowingly enrolled in CS for the Amish
I still remember having to write MIPS assembly by hand for exams. Shit always fucked up my wrists.
 
I hate writing code by hand simply because I'm fucking terrible at drawing curly brackets.
The struggle is real- imagine being a music major and having to draw a curly bracket to start every grand staff (e.g. piano music), and having every one look like I put the pencil between my toes and drew it with my feet.
 
Can someone in the tech industry tell me what kind of job this girl has? Because from what I’ve heard about the industry, crunch is rampant and fucking around is not an option and this girl does fucking nothing.
 
Back