6

Never understand why schools use C/C++ as an introductory programming langauges. Someone needs to tell those text editor people to fuck off.

Comments
  • 7
    Pascal would be better as learning language, but it's a dead language. C strikes a compromise between being useful for learning and being relevant.

    Beginners should not start using abstractions without knowing what is being abstracted because all abstractions are leaky, and they'll be fucked as soon as the abstraction breaks.
  • 6
    One must learn how to code, before telling an IDE what to do for them.

    It's no different to learning to stand before learning to run.
  • 4
    C and C++ are fine languages for a starter. you learn the basics of how the programs actually work.
  • 1
    also Dev-C++ is a good barebones IDE for simple programs. I've used it during my first year in university when we were learning C++.
  • 1
    If beginners should understand what has been abstracted, why JS devs don't study prototype nonsense, computer science students don't study circuitry, engineer students don't study mathematical proofs? It might be helpful to understand what has been abstracted after one is able to write comprehensible code, but schools typically skip the very basics and go straight into all edge use cases. If schools do not babysit beginners, beginners definitely need to start with a good programming language with a good static analyzer, like Rust
  • 4
    @h3rp1d3v javascript devs *should* learn prototypes.

    Everything else: you're reducing to absurd.
  • 6
    Pfft...
    You should start with assembly language. One does not start learning high level language without knowing what's happening on the silicon.

    You do already know how semiconductor, bandgap and digital logic works right? Otherwise, start with your physics first before learning programming. Otherwise you will get lost on what's happening.
    #sarcasm

    On serious note, what language you should start depends on what made you interested in programming in the first place. I happened to start with assembly language as I was interested in using ICE on Windows 95. But today, typical languages are Python, Java, C or C++.

    And in my opinion, using modern IDE has its pro and cons. But for sure, IDE/Dev env will be another topics that you want to explore later on.
  • 7
    @h3rp1d3v Even at high school, the CS course did have logical circuits of transistor logic. This is the very basics of how computers work. Also, engineering studies do have math proofs.
  • 1
    @Fast-Nop Try to ask engineering professors to prove all theorems they use on daily basis and see what happens.
  • 6
    @h3rp1d3v Doesn't change a thing in that devs should know how a computer actually works, or else they are not devs, but monkeys clicking shit together.
  • 0
    @Fast-Nop It seems we have come to an agreement
  • 3
    @h3rp1d3v That's why C is tought. Actually, assembly would be even better, but that would be limited to a specific CPU, and C strikes good compromise again.
  • 0
    Our introductory OOP course in college had us write Smalltalk-80 in an IDE named VisualWorks, that at most times did everything BUT "work" but was critical to getting anything done in that language.
  • 0
    @Fast-Nop I meant people are 🐵
  • 6
    Because it serves two purposes:

    1. show people that their fuckery in dynamic languages is not for granted and that there is computational weight to everything they do

    2. Weed out the script kiddies

    If you can get the basics of both languages then you can go far. I do not see the problem. You may not "like" said languages, but their attributes and proper standards are there for you to take and build spaceships.

    Understanding them make other languages make more sense. Think of data races in C or C++, then look at how Rust makes it damn near impossible to have them. Then look back at C/C++ to understand how shit works, understand how people are stupid and a new language to prevent their stupidity from being released into a production build was needed. Keep moving forward from there.

    C/C++ are excellent languages for this, they give you 100% absolute control and power, it is up to you to understand what you do.
  • 4
    Appropriate meme:
  • 5
    @AleCx04 uncle Ben once said, with great power comes great responsibility.

    Sadly, the avg Dev these days fails on being responsible with their code, and such languages like rust created to hold the lazy fuckers hands.

    Ps: I do enjoy how easy it is to do the right thing in rust vs fucking up all the time 🤗
  • 1
    @C0D4 well, rust is a trade off between fast code and verbose as fuck mess for handholding
  • 2
    C makes sense once you understand assembly, and Rust makes sense once you understand C. Or so. ;-)
  • 1
    imho the only benefit of using IDE when learning the absolute basics is a GUI debugger as you can see the content of variables and flow of the program while slowly stepping through them.

    Ofc you could use gdb, but I don't think that would be a pleasant beginner learning experience and would likely send the person down the printf debugging rabbit hole.
  • 0
    Well he’s right about IDEs.
    I’m using VS for the past 15 years or so, I still don’t know what half of buttons does.
  • 0
    @iiii For starting I'd prefer C even more. Simple, quite low level. For the basics. C++ for the advanced course.
  • 0
    @schmackofatz

    Weeeelllll. 10 years ago I would agree.
    But now ? Nop.
    If the person wants to do web dev and any kind of “high level” programming, it doesn’t matter how memory or pointers are managed.
    You don’t need to understand MSDOS before installing windows 10.
    I feel like teaching these concepts of memory/pointers etc is pointless now. People who want to learn them can find plenty infos on Internet.
    We need more productive developpers, even if they don’t know how .net or node works. It doesn’t matter until you reach certain level and start asking questions “What is GC?”.

    Just like in a lot of countries tou can have driving permit with automatical transmission. You don’t need to know how it works. It just works.

    I think it’s time to abstract all of technical details.

    And for me c# and Java are top 2 languages to learn coding. Maybe Python too, but I al;most never worked with it, so can’t form an opinion.
  • 0
    @NoToJavaScript I see what you are talking about! Right definitely! E.g. web dev, no need of knowledge about pointers.
    My comment is biased due to the job I am working at. XD
    Using C++ on SPS, so some knowledge of "internals" is useful.
  • 1
    @schmackofatz depends. almost any valid C code is a valid C++ code. you can start without all the fancy stuff
  • 2
    @NoToJavaScript The problem with devs who don't know what a computer actually does is that they have no idea what's going on under the hood. All abstractions are leaky at some point.

    Such devs will code slow performance hogs because the issues remain invisible to them. With regard to web dev, that describes the current state of affairs pretty well, and that's why the web sucks.
  • 1
    @Fast-Nop

    I agree.
    But hear me out, do they NEED to know how computer works ?
    How many of you are using AC at home ? Can you write the thermodynamics exchange formula it uses?
    Can you write mathematically how microwaves works ?
    You don’t need details. Computer is just a tool. You need to learn how to use it, not how it’s working internally.
    This knowledge will come by it self if you deep dive into programming. But you don’t need this knowledge to be a good developer (Not excellent, just good).
  • 1
    @NoToJavaScript Yes, you need to know the basics of your trade. It doesn't mean that a web dev has to be able to code OS level drivers, but not knowing what a computer is actually doing will make bad devs.

    That means also a web dev should be able to code simple C programs (or Pascal, or similar, doesn't matter). There's no need for advanded, C language specific knowledge such as pointer aliasing or preprocessor witchery, and no three star pointer dereferencing orgies.

    Understanding the difference between an actual house and the address of the house should not overwhelm any dev. I'd say if a dev can't understand the concept of a pointer and use it in a simple demo application, he shouldn't be developing at all.
  • 3
    @NoToJavaScript

    Does the user needs to know how his AC/microwave work? No. (although lack of basic knowledge lowers efficiency). Does the AC/microwave engineer, who designs it, needs to know? Absolutely.

    Does the webpage end user needs to know how it works? No. Does the developer who writes the code needs to know? Yes.

    Do not mix up a person responsible for a good solution with a clueless end user.

    I've encountered this knowledge gap last month. The dev was wondering why it takes over 1 minute to fetch ~100 SQL rows because they could not visualize how the JOIN works, resulting in exponentialy complex query. A simple rewrite made it linear, but they blamed the server for being slow instead of thinking about their bad design.
  • 0
    It all depends on what your end goal is.

    Are you trying to get a new young intelligent person interested in development? Show them Python.

    Are you trying to discourage and overload a new young intelligent person and damage their confidence so deeply that they lead a life knowing they aren't good enough to be a developer? Show them C.

    This isn't necessarily the rule, but not everyone has the patience to learn C.
  • 0
    @sariel your classification is backwards. Python is for those beginners who want results quickly and without effort, but will not learn very deeply because of that lack of effort
  • 1
    We all know you C/C++ devs are hotshots who can build OS using binary code.
  • 0
    @iiii there's more to learning than content.

    Teaching a child can be a challenge especially when they cannot instantly see results. Skills such as persistence and perseverance are learned through deliberate subjection to hardship and tests of personal will(this is both true for the student and the teacher).

    If you attempt to teach a 3 year old how to read, you start with See Spot Run, not Patterns of Enterprise Application Architecture.

    Sure, 0.01% of every kid will get it and read it, but the rest of the 99.99% of the kids would get discouraged and only learn they don't meet your standards of acceptance and hate you for it.

    You have to teach to the student, not teach the curriculum.

    Any parent with a child in school knows this.
  • 0
    @sariel you don't teach noobs patterns, spot runs and architecture. You reach basics. Your argument makes even less sense now
  • 1
    @iiii try to explain to someone who knows nothing about software engineering the fundamental types of the C language.

    Then tell them about when and why you use them. Once you're done there you can explain when you should declare them.

    Finally, maybe after 2-4 weeks, you can let them write some code.

    I have taught students at an introduction level. You might have an aptitude for it, but I'm telling you that most students don't.

    In my experience ~75% of students that took software engineering in college failed to place into a job in that field. This is fine though, most will continue into positions into many other career paths such as; IT support, finance, management, IT technician, operations support. By having an existing background(no matter how successful or fleeting) tends to put these individuals ahead of their peers that don't.

    An entry level software development course is just that. It's supposed to be easy. Learning C is not easy.

    If it was, everyone would know it.
  • 1
    @sariel yet again you're trying to dump too much on a beginner.

    There are three fundamental types for them: integers,decimals and strings. And also arrays of those.

    Why you have to declare them? Because that's how computer works, because computer have to know what is the shit it works with.

    You're definitely bloating the problem at hand. And also you're handing them a language for which better but more tedious languages will look like a downgrade, which is totally backwards, as they will reject those languages right away without understanding why their comfortable language sucks balls in everything except saving some brain cells on types and such.
  • 3
    @sariel Learning C on student level isn't difficult, but production grade coding is hard. Pascal is a much better language for teaching than C, but the drawback is that Pascal is dead in production.

    I think the choice of Python vs. C as teaching languages depends on what the goal is for the student.

    If it's an auxiliary course at school or for uni studies that don't revolve around computer tech, then I'd go for Python and rather concentrate on basic data structures and algorithms. That knowledge will always be useful no matter which language. Again, Pascal would be better, but would lack actual application.

    If we're talking uni studies where it's likely that people will be developing software, it's a different story - but come on, stuff like math 1-4 with partial differential equations is no piece of cake, either.
  • 2
    @iiii @sariel btw good example of learning basics with C is the Harvard CS50 course. (you can enroll into CS50x online for free)

    It assumes students might be outside of the IT field, so they provide cs50.h library, which abstracts some aspects of C (working with strings, user input, array allocation...), to prevent newbies get stuck and demotivated and introduces these concepts later on in the lessons.

    I've seen "intro to C" on two local unis, but liked the Harvard approach the most. But it assumes a lot of work from the teacher (preparing and maintaining the libs) instead of just teaching curriculum.
  • 1
    @qwwerty I personally don't remember any difficulties picking up raw C/C++ at uni after learning Pascal at school. And definitely had no problems with Pascal in the first place as well. At first there were "magic functions" like "cout" but I did not have to understand how that works to use that, because the focus was on data structures and pointers which are essential, rather than some fancy syntax. And yes, including manual memory management.
  • 1
    @qwwerty it seems like people assume that other people are one brain cell idiots. If that is true, there's no point in teaching them anyway, because they will produce very bad code afterwards. The student either gets the basic concepts or stops being a CS student and does something else. We have enough wannabees in the industry already
  • 1
    @iiii My only struggle with pointers was understanding what happens when I read out an int* as char*, and that's because the language abstraction breaks at this point.
  • 1
    @iiii I'm telling you from experience that introduction level courses cannot be impossible to learn for average people.

    Everyone has a role to play in development. I certainly don't want to take the "html" jobs, and somebody has to do it to start from somewhere.

    To deny someone the chance to be fulfilled by something they enjoy(no matter how successful) based upon your perception of their intelligence makes you sound like a gatekeeping twit.

    If someone makes it to the professional level and doesn't know what basic construct is, they didn't make it alone and everyone that supported them along the way shoulders some blame.

    It's ok to get mad because you work with these people, but you only have yourself to blame if you refuse to attempt to teach them.
  • 1
    @sariel any industry should have some minimal standards (gatekeeping as you call it) otherwise it will degrade to shit.
  • 1
    @iiii the point is, if you're senior/knowledgable you're supposed to help juniors to reach the standard instead of telling them to fuck off. Often as little as pointing them to a good learning materials is enough, as without skills they can't evaluate quality of it on their own.

    Leverage the interest and enthusiasm while steering it in the right direction instead of killing it.
  • 1
    @qwwerty so now we are talking about juniors who already have studied something? I've thought that this talk was about newbies who know nothing yet
  • 1
    @iiii There's no difference. It does not matter if you, as a senior, have to steer juniors or newbies. You're the knowledgable authority responsible for introducing them to "the standard" and showing them how to achieve it. The easier path you show them, the faster they reach your expectations while their frustration is kept at minimum.

    I'm not saying the standard should be lowered or getting there should be easy, but goal of optimization is to achieve the result while being efficient.

    Providing unnecessary difficult learning paths while you're aware of simpler approaches (aka "i had it hard, so they must too") is just a sadistic egostroking dick move.
  • 2
    @qwwerty Newbies who struggle severely with getting how a computer works should not make it through CS or comparable studies - or else, the degree becomes worthless.

    As senior in the industry, you should not have to guide newbies who can't even program. They should already have been weeded out in the interview. If not, the interview process needs to be improved.
  • 1
    @Fast-Nop Agree on that. As stated before, I'm not saying the standard and our collective expectations should be lowered.
  • 2
    @qwwerty the path has to be at least somewhat difficult, otherwise it's not learning but a mere participation award.
  • 1
    @iiii I agree with you on this point. As I said, the point is not to have it easy but efficient. And yes, even the efficient/optimized learning path will be too difficult for some and it'll weed them out.

    We agree on the fact that a standard has to be maintained and can't be lowered in order to maintain industry/product quality.

    I'm arguing regarding ways of bringing newbies and juniors on the proper expected level.
  • 0
    @qwwerty well, I was not stating anything other than "newbies should be taught properly and not be given too lax treatment if they cannot grasp the basics". Skipping some fundamentals because "they are too hard" is exactly the opposite and, imo, promotes degradation of the industry, because it lowers overall quality. Yeah, it is somewhat benefitial to those who are not as bad, but it also dillutes the pool with cheap and unskilled workers which are the beloved food of capitalism.
  • 2
    Try to understand then. Or provide valid arguments. Instead of telling people to fuck off.
Add Comment