Earlier quoted context omitted.
Haskell very much has an if then else equivalent. if' :: Bool -> a -> a -> a if' True x _ = x if' False _ y = y https://wiki.haskell.org/If-then-else Also, Java was designed to handle performance critical code like that. That’s why people call it a fast language, you can write non performance critical code however you want, but optimize for speed and it’s going to look like C.
Maybe I'm nitpicking, but I see that construction as the equivalent of the ternary operator. Its not the if-else construct you find in imperative languages. The claim was "Every language can do some form of if then else" - which I read to imply that every language is semantically familiar to someone who knows python / C / java. Haskell's approach is certainly not familiar if you've only ever written javascript or som…
Why did we ever think a student's first programming language didn't matter?
271–280 of 286 posts
Re: Why did we ever think a student's first programming language didn't matter?
#272Re: Why did we ever think a student's first programming language didn't matter?
#273As a biologist I learned to program at 34, it was using Python (pandas and seaborn) in Jupiter notebooks. I mainly did data science in the beginning. I can tell you this worked extremely well for me. I could make small steps, add text and output variables and graphs constantly as I “developed”. It took me quite some time to shift to a full vscode flow, I kept going back to notebooks. I’ve become more of a software de…
There’s many different styles of programming. Excel and Jupyter notebooks are a kind of “end user computing”. Programs developed in those environments often need a lot of refactoring to get turned into “software” (by some arbitrary definition). However these programs are incredibly useful for the business ideas they explore. To put it another way, using Notebooks with pandas is a great way to wrote biology programs.…
Re: Why did we ever think a student's first programming language didn't matter?
#274Earlier quoted context omitted.
> University is not vocational training. I'll believe that when employers stop giving preference to people with university credentials. Until they do that, the primary reason most people go to university for CS will continue to be 'for vocational training.' People follow incentives.
If the employers don't want people who have a detailed understanding of academic minutia, they should maybe stop hiring from university courses and set up some sort of vocational system. Just because there is a need for vocational experts doesn't mean the universities should try to fill it. The place in society for universities is not a short-term-practical one.
Re: Why did we ever think a student's first programming language didn't matter?
#275Earlier quoted context omitted.
> I certainly think everyone has the mental capacity to understand algebra. I invite you to tutor some middle school students then. For values of algebra that include “can be taught to draw the appropriate line given the corresponding equation” there are plenty who can’t understand algebra.
I don’t know about middle school kids, mine’s not there yet, he’s 9 - but he’s already done algebra, including simultaneous linear equations with multiple unknowns. No powers, quadratic equation or differentiation and the like yet, but I can see the QE coming up in next years books (which we recently bought since 3rd grade just finished) I’m pretty sure that when I was at school, this was a “senior school” (age 11-16…
Re: Why did we ever think a student's first programming language didn't matter?
#276Earlier quoted context omitted.
Maybe I'm nitpicking, but I see that construction as the equivalent of the ternary operator. Its not the if-else construct you find in imperative languages. The claim was "Every language can do some form of if then else" - which I read to imply that every language is semantically familiar to someone who knows python / C / java. Haskell's approach is certainly not familiar if you've only ever written javascript or som…
Doing better is irrelevant when we are talking about what constitutes the basics of programming. You can always improve your personal skills, but the basics are in effect the smallest set of skills that works.
If you only know enough Java to be able to translate awkwardly from C, you aren’t fluent in Java. I know bits and pieces of Haskell - probably enough to make working programs. But I’m not fluent in Haskell. I can’t read the code others write. I can’t think in Haskell. And that’s not enough.
Re: Why did we ever think a student's first programming language didn't matter?
#277Earlier quoted context omitted.
I'm not gonna downvote you but I think you should be. This is already what universities were doing up until recently and I don't think it helped anyone. Some people learn top down and some learn bottom up, some learn... middle-out? what ever their way is, you're just saying everyone has to learn bottom up.
Assembly is indeed intimidating for novices. I agree. But I still think that newly minted programmers need to understand something about what's under the hood of languages like python. Maybe a full course in assembly is too much for freshmen, but they should at least understand that RAM isn't like VCR tape: you can fetch any RAM memory location in constant time, unlike with a serial storage medium like tape. And they…
Again you learn how computer works in computer architecture class, you learn programming already know that, or not, if it's irrelevant to your learning goals. You don't design programming languages to teach how computer works, nor do you learn programming to learn how computer works, that makes zero sense.
Re: Why did we ever think a student's first programming language didn't matter?
#278Earlier quoted context omitted.
Absolutely not. Programming is like, using mathematical structure to instruct a computer. But many domains don't need you to use mathematics to instruct the computer. Natural language processing, like a search bar, GUI, . Medicine, legal, so many other trades don't need mathematical instruction of a computer. They just need not-totally-useless operation of it, through
Either "programming" is not using "mathematical structure" to instruct a computer, OR printf("Hello world\n"); is a "mathematical structure", OR it is not programming. Which one?
I'm saying that "because" you don't need operations defined mathematically, you can use whatever human computer interface.
Re: Why did we ever think a student's first programming language didn't matter?
#279Earlier quoted context omitted.
Doing better is irrelevant when we are talking about what constitutes the basics of programming. You can always improve your personal skills, but the basics are in effect the smallest set of skills that works.
“The smallest set that works” in the real world requires that you can write code that others can read, write code that could pass a PR. And that you can read the code that others write. If you only know enough Java to be able to translate awkwardly from C, you aren’t fluent in Java. I know bits and pieces of Haskell - probably enough to make working programs. But I’m not fluent in Haskell. I can’t read the code other…
“Professional” is not what most people mean when they talk about the basics as say a welder, cook, etc.
Re: Why did we ever think a student's first programming language didn't matter?
#280In my opinion the best sequence looks something like this: - Machine language (not assembler) — Assembler for a couple of different architectures (i.e: Von Neumann vs. Harvard, CISC vs RISC, etc) - Forth (written from scratch with one of the above) - C - LISP - APL - C++ I think of everything else beyond these mostly as C/C++ cousins or derivatives. With languages like Javascript and Python it’s far more about learni…
The machine an assembler should probably be taught together. Where possible either emulations of real chips, programmable logic simulated chips, or real chips should be used. I recall the class which used a 6800 derivative in one of my college courses had a _very_ well written developer's spec manual for it. Complete with a (large) table that showed the logical relationship between the binary value of an instruction…
The way I would prefer to teach machine language would be to start from scratch. This means you would create and define a simple set of instructions in the context of an equally simple 4 bit processor the students would build on a breadboard out of simple chips. And, yes, the microcoded instructions would be coded by hand using a diode matrix.
I truly believe such an exercise has enough value that it should be the starting point of a real education in computer science.
From there it's on to assembler on preexisting processors.
The reason Forth follows assembler on my list is that you can easily bootstrap Forth from scratch on any processor. Building the language from scratch is, again, to repeat myself, a worthwhile exercise. You would use assembler to get started and then switch to the embryonic Forth to build upon that. At some point you write your own code editor in Forth. From there there are a number of interesting applications (PID motor controller?) that could be implemented with the language you just built from scratch.
C offers an entry point into a world of languages that look and feel like C. It provides a tool that is close to the hardware, yet high level enough to allow for much greater freedom of expression. Doing arrays in Forth is a very hands-on proposition. In C it's pretty easy.
Once you are good with C you can easily pick-up languages like Javascript and Python. Not the same thing but you "speak" the same words to the computer to achieve pretty much the same thing. A "while" loop and an "if" conditional are the same incantations.
LISP opens the mind to an entirely different paradigm. It is well worth learning. The same is the case for APL. I don't think of these languages as "career level" languages. That may have been the case ages ago. No longer the case. However, the perspective gained is invaluable. As we try to solve more and more complex problems the limiting factor might very well become our ability to express ideas for a computer to solve these problems. Having the perspective of languages such as LISP and APL makes someone realize there are other valuable approaches to solving problems computationally.
Finally, C++, well, it's the entry point into object-oriented programming.
This, BTW, was pretty much my path through computing. I can't complain.