5 ms·
I've had this in my bookmarks for awhile, intending to work through it. I think I can probably even do it solo without the guide, at this point. After years o
by desine 5y ago
I've had this in my bookmarks for awhile, intending to work through it. I think I can probably even do it solo without the guide, at this point. After years of programming, and learning (or at least playing with) many languages, I've come to a philosophical conclusion of sorts:
C and Lisp should be the two languages all students start with, in my opinion. Probably SICP style Scheme education, and classic simple C89. C is the barest of the high level, the least abstracted, the most work. Students should build their own data structures, memory management, improved string handling, etc. I think this gives a really solid foundation of what other languages' features actually do, their benefits and trade offs. Then Lisp, to show what metaprogramming can do, and demonstrate the power that a language can have.
From there, sure, learn C++, Java, Rust, Go, Node.js, whatever toolset matches your industry. Start with the fundamentals, though.
- subtra3t 5y agoI wholeheartedly agree with you. Lisp is a perfect example of an underestimated programming language. It really is astonishing that most programmers (whom I know) consider Lisp to be this weird language with too many brackets.
- capableweb 5y ago> It really is astonishing that most programmers (whom I know) consider Lisp to be this weird language with too many brackets. Programmers (humans really) are really good at having knee-jerk reactions to things and then sticking with the same opinion for some reason. As engineers, you would think we'd be better at looking at things objectively, but somehow discussions/thinking around programming languages tend to be a very emotional thing for many, so they stick with their first impressions.
- andi999 5y agoThe real problem with lisp programs is each of them has its own DSL (the macros) so you have to learn one language per program. (I think that's the reason also why the library ecosystem is lacking)
- gjvc 5y agoUniversities should not fear teaching Lisp and Smalltalk in the first year.
- gjvc 5y agoLet me refine this slightly... Universities should not have become fearful of teaching Lisp and Smalltalk in the first year, once Java gained popularity.
- ohpauleez 5y agoI also have had this thought - start people with very simple (C89) C and Scheme. When they learn data structures have them use C and scheme and show additional examples in class in Python/Java/JavaScript. When they take an AI class, they build the fundamentals in Lisp and see examples/ecosystem in Python. When they take some form of "Programming Languages" they get introduced to SML and see some Java+ANTLR. When they take Software Design I and II, they work in Java. From that foundation, they'd have the exposure they need to expand out. I also enjoyed the path my University took. You started with Java. Data Structures was in C++, Java, and Python. Operating Systems was in C. AI was in Common Lisp (with some examples in Java and Python). Programming Languages was in any language you wanted, but examples were mostly in C and SML (SML/NJ). Computer System Design was in HDL, Assembly, and C. Software Design I and II used Java. Requirements Elicitation and Specification used Z. Concurrent/Distributed systems I and II used Promela, SPIN, TLA, and code was in Java.
- prionassembly 5y agoPUC-Rio (birthplace of Lua) does an intro to programming with Scheme (kind of a watered down SICP-type course) and then data structures in C.
- pge 5y agoThat was the progression when I took (the now well-known) CS50 at Harvard. Learn C first, then Lisp, then write a Lisp compiler in C. That was a lot of years ago, so one could argue that is an outdated approach now, but I think it still provides a strong foundation of CS fundamentals.
- gjvc 5y agofundamentals never become outdated
- mucholove 5y agoI learned Objective-C this year and I love it. It is a fantastic language to use because the tradeoff is obviously evident in the language. You can use Smalltalk for a day. Understand the history. Understand the compromise. And Objective-C captures a beautiful moment in the trajectory to ever more high level abstraction.
- pjmlp 5y agoKind of, they went a bit overboard with @
- blacktriangle 5y agoI think most of the crazy @ features are in Apple's branch. There's still the GNU version floating around working with OpenStep that is much closer to the original Objective-C vision.
- pjmlp 5y agoAnd largely incompatible with modern Objective-C libraries, so of questionable utility.
- ogintherapgame 5y agoTerrible suggestion. We need to kill all these c'isms as fast as possible. Teach people to write nice data-structures, with good api's, and with generic and sensible types. All these C'isms like returning -1 for false and 'nil' children seriously sucks. For a systems class it might still be suitable, but you could design good courses around other languages like ada, zig, rust w/e. If you want to teach them a lisp as a first language, at least use Racket, which actually have modules designed for education. I think it's less of a headache to use a language with a more modern syntax, like python or pyret, but Racket is excellent of course. You can introduce lisp later in a undergraduate compiler/interpreter class so you don't have to talk about parsing for a month.
- vngzs 5y agoI'm fairly conflicted about this. While I believe that learning C teaches bad habits - manual memory management tends to account for some absurd percentage (70-80%) of CVEs in modern programs - it's also unquestionably tethered to the history of software, and a majority of the immense foundation of tooling on a Linux system is authored in C. There is a terrific benefit to learning on a platform where you can not only look up documentation within the system (man pages), but also "dig deep" into the code of any particular piece of the system you are interested in. So in learning C, you gain access to the body of knowledge contained in a Linux system, or contained in a BSD, and when you get curious about something like "These loops and conditionals are all fine and well, but how does a window actually get drawn to my screen?" you have everything at your fingertips to go and answer it. Is that connection to the machine possible without learning C? You could use a toy operating system written in something else, but you miss out on the honesty that comes from teaching the same system that people are actually using (or at least able to use). I think Go might not be an unreasonable alternative. It shares C's philosophical heritage, removes the need for manual memory management, and is capable of exposing a student to pointers, creating images, and HTTP communication all within the stdlib and the first chapter of the official book. The only downside, as I see it, is that one would need to additionally learn something like Rust to be able to apply the concepts to things like kernel drivers and close-to-the-metal programming.
- 5y ago
- UbrtrbNchDneRle 5y agoAs a student, I disagree on C. C is fun for playing with pointers and doing raw memory things, but it becomes overwhelmingly painful and frustrating so quickly. And for the wrong reasons. Once you have to touch macros, or want to reuse code, it is just … old. Not hard, not minimalistic - just old. C can be fun the way bash can be fun, or baking without a recipe. It is fun to overcome an arcane mess, for the challenge. But you really learn little, or the wrong thing. And C is not easy to look up online either. It took me so many hours figuring out some things are just not possible in C (without making it a new language via macro madness). Things that should be possible. Like „generics“. Kinda possible, but never satisfying. You constantly have to endure verbosity over abstraction. Not because that’s how computers work, but because how people did it 30 years ago, or because some industrial microcontroller needs it this way. IMO whatever C can teach you, assembly can do better. Without tricking you into believing it’s a practical choice for most anything. I think Rust is visually offputting for new students and it’s not really a good choice, but at least you learn something important, when things get hard. In C you are either trained to view programming as the most repetitive, joyless activity ever, or to indulge in hacking your way around broken shit, disregarding cooperation (with your future self), universal elegance and safety. If there is „one language everyone needs to learn“ it’s some accessible and fun, which let’s enjoy computers and not tell you limits at every opportunity. There is no way to avoid C entirely, if you enjoy programming anyway; at some point you have to interface or tweak C, most likely.
- kazinator 5y ago> IMO whatever C can teach you, assembly can do better. Other than, oh, things like getting the same code to produce exactly the same result on two different machines, where the sizes of the types being used by the code are different.
- mrmuagi 5y agoHmm, unless I am mistaken, does not using portable types stdint.h u?int(8|16|32)_t fix this?
- 5y ago