23 comments

[ 1.7 ms ] story [ 56.0 ms ] thread
The college board AP exam for CS was comically bad when I took it. It was somehow too easy and too hard and not tied to what is needed.

I wish we had better ways to evaluate competency.

Im frankly disappointed that most students introduction to programming is object oriented, and when that language is java im even more appalled.

Computers are easier to understand if you start with assembly, and you actually tell students how a computer stores information and how it operates on that information before you try to make them conceive of an abstract object which has a distinction between instance and definition.

Maybe you would argue that assembly is not "computer science". I am liable to agree, maybe it should instead be a differently titled prerequisite.

I'll meet you halfway. Java is indeed a bad language to start with: it teaches you to prioritize creature comforts over good software, which is a pretty self-destructive mindset to head into the industry with. Learning assembly is exactly what these students fear though, and I frankly think it's hard to ascertain any useful information from an ASM breakdown without understanding the abstractions going on overhead.

Frankly, I think there should simply be a "computer history" pre-requisite class that younger students are allowed to take, with more of a theory-oriented approach like you're describing. A ton of common programming misconceptions can be eliminated by explaining how to pass flags to your compiler or what happens to your memory when you turn off the computer.

I think Java is a great language to start with . It’s verbosity forces certain programming features to be known, static typing is better for beginners, and it’s easier To teach encapsulation , overloading , and overriding due to the Java’s verbosity in my opinion. The existence of Arrays and Arraylist gives a better view into static arrays vs dynamic arrays that you might not get in very language.

I think of programming tools as knives in cooking. While all knives fundamental can cut , not all knives are made to cut the same thing. Similarly , not all programming languages are made to tackle the same thing. I think Java works as a good juxtaposition to Python by showing that that contrast via its syntax and basic features. Also when compared , it can allow students to get over the notion that it’s not about the language but the techniques and how each language can implement the technique.

> Its verbosity forces certain programming features to be known

This is why IMO Java is possibly the worst choice of them all (okay, maybe Perl is worse, but nobody is that insane).

Beginners don't start with enough "culture", as it were, to understand why features are there in the first place. The very first program you write in Java is something like this:

    public class Hello() {
        public static void main(String[] args) {
            System.out.println("Hello, world");
        }
    }
That's an insane amount of cerimony and boilerplate. Professional developers know what every piece is for: of course you need the class declared public! Of course the main method needs to be static! Of course it needs to take an array of strings as arguments! But everything a n00b sees is a bunch of garbage on the screen. What's a class? What's a public? What's a static? What's a System?

And it's not like it gets better: what is an interface and why we need one? What is an abstract class? Why is there inheritance but we're not supposed to use it?

All Java does is encouraging people to treat programming as a black box, where the end goal is to learn the correct "wingardum leviosa" to make the magic happen. A good intro to CS does the exact opposite: the first concept we need to get inside people's skulls is how programming is flexible, malleable, composable. How it's "just" a composition of super simple stuff. How you should look under the hood.

It's the CS equivalent of how math is taught in high school: inscrutable, opaque recipes. It's the perfect way to make somebody hate the subject instantly.

And I think it’s those aspects are great. Students should absolutely know about classes , encapsulation, arguments and method return types and Java reinforces that learning by having them always included. Students are force to learn these early and learn a valuable pragadim.
Eh.

ASM is a good start for people who already know how to program. Manually implementing a linked list by syscalling mmap is something everyone should do. OTOH the main stumbling block for students who can't already code is "thinking algorithmically" i.e. breaking down the steps you need to perform in a precise way. At that level, ASM is just getting in the way.

I'm partial to Scheme because that's what my intro course used and I loved it, but I can see an argument for both another high level language, C, or ASM.

Java is just a terrible idea FFS. At an introductory level you won't even understand what kinds of problems Java is supposed to solve: are they teaching what's a virtual method too? I assume it's a misguided attempt at teaching something "relevant for the job market".

It seems that there is a fundamental tension for intro to CS/SE classes between refining the fundamentals of self-taught programmers and starting students from zero. Expecting total n00bs to find which part of their code causes the segfault is a frustrating waste of time for all involved. However, showing how the computer works is useful for people who already have figured out the rudiments of things like for loops and if/then conditionals.
100% this. It's kind of weird, but it's almost as though grokking the idea that you can arbitrarily program the machine is even more fundamental than the machine itself, and in fact a prerequisite to even ASM.
Teaching assembly as computer science is like teaching welding as architecture.
Somewhat, yes, but arguably no more so than any other programming language.
At least with a higher level language it is easier to learn the practical side of concepts taught in Computer Science. As part of my architecture course at university, we were tasked to create a matrix multiplier in assembly. While it was an interesting challenge I would not use an assembly language for assignments in linear algebra.
Computers are easier to understand if you start with assembly(after having programmed for a decade).
I agree. However, I'd like to expand a bit...

I think the progression should be something like this:

    1- Machine Language
        - Yes, flip 1's and 0's and learn raw programming of a microprocessor
        - No need to make a career out of it, but it is truly valuable
    2- Assembler
        - Here exposure to different processor architectures is important
        - Harvard vs. Von Neumann are two examples worth understanding
    3- Using the above-gained skills, implement FORTH from scratch
    4- Using FORTH, implement drivers for various peripherals
        - Storage, communications, real time clock, etc.
    5- Using FORTH, write a FORTH code editor from scratch
    6- C
    7- C++
    8- LISP, APL
    9- Python
My oldest son just finished his BS in Computer Science and is pursuing a his Masters. Sadly, he would not have learned most of what is on this list had I not made it a point to teach him during high school.

His next sibling by age --still in high school-- is now going through MIT's excellent 6.00.1x two course sequence on EDx. This would have been very difficult for him without some of what he learned from me over the last couple of years.

The rest of this is a tangent, you can stop reading here.

Aside from the above sequence, I also got them involved in home remodeling projects, solar array design and installation, manual and CNC machining (on real industrial machines), MIG, TIG and stick welding, woodworking, business, etc. And yes, lots of fun fishing, kayaking, and being kids.

When it comes to education as a general subject, I remain deeply disturbed by the fact that our educational system graduates young adults out of high school without any marketable skills whatsoever. The average high school graduate in the US is barely useful to make coffee and stack boxes in a warehouse, much less anything else. We give our kids to schools for somewhere in the order of a dozen years and what comes out is someone who can't earn a living.

When my oldest son went to college he was able to land jobs making two to three times minimum wage because he had marketable skills to pull from. He added enough value to any business hiring him that they were happy to pay an excellent wage. Many of his college friends were working at coffee shops and amusement parks making minimum wage. By the end of his first year in college he was able to save $25K free and clear. He is on track to graduate from university with well over $100K in the bank as well as multiple degrees.

He was able to do this because he launched out of high school ready for the world, not because of what he was taught in school but rather due to my intervention to fix the severe deficiencies in a system that is most definitely broken.

Educations matters. A lot. And not just math, science and history. Not sure why this mess isn't a conversation at a national level. If we care about elevating people from their station in life the most important factor is launching them into the world with marketable skills.

I see what schools are teaching my kids and can't help but feel something between sadness and anger for what other kids will face out of high school. In some way, the greatest source of inequality are our own schools.

Sorry, that was a bit of a rant.

I disagree. The goal of intro classes isn’t to throw students into the crucible and make them experts ASAP, it’s to spark further independent interest in the field so the want to keep studying on their own time.

The faster they’re building “real” apps that they think are awesome the better. That way they’ll travel down the rabbit hole of advanced concepts in order to keep building cooler stuff, not because someone told them it will be useful in their professional life >4 years from now.

I can agree how java is not a great place to start.

But no not assembly.

Should start with terminal (bash/zsh) and then python. And then work from there. People can go assembly or Java after that part.

> Should start with terminal (bash/zsh)

I'm going to have to strongly disagree with teaching bash/zsh (or any other shell) as a first language. The are just too many gotchas and implicit variables and conversions going on that make it really hard to understand what's going on.

Shells are fine for stringing commands together. They are hell for doing any sort of development in.

Teaching shell is not about writing a .sh script though.

It's about getting used to the terminal. I think this is one of the biggest shortcoming of people who are just learning to code/bootcamps. If one stays in an IDE at all times they won't learn the system.

I consider appropriate knowledge of shell as the ability to replace the native system UI usage with terminal. And that's not a high bar.

Assembly is absolutely not the first language I would teach people. It has several severe flaws from a pedagogical perspective.

The first is the number of "magic things that won't be explained until later." Want to output a string to the console? That requires a magic mechanism (syscall) which isn't going to be covered until later. Doing almost anything with strings involves going through function calls (and the concomitant need to put things in specific registers). Mixed code and data? Here's some magic assembly directives! Get it wrong, and your program breaks in really non-obvious ways [1]. (To be fair, Java also scores pretty poor on this metric; a language like Python scores much higher)

The second problem with assembly is that there's a lot of busy work you have to do yourself that serves no functional value. You have to manually allocate registers to variables (which means remembering what r3 means in this section of code); you have to give a unique name to the target of every jump for every if/then/else statement, or loop, or whatnot. Depending on your assembly variant, even "set this register to a large constant" can be a nontrivial undertaking. This severely limits what problems you can assign to students.

[1] I've TA'd intro-to-assembly several times, and I can attest there's quite a few people who struggle with "no, you can't put your data before your code because the OS will try to execute the data as code."

There's something to this. As a kid, I tried to learn C, but the idea of pointers didn't really click. I gave up and later learned x86 assembly and then what a pointer was became completely obvious.

A couple of years later in our high school's electronics lab, they had this radio shack "microcomputer trainer", which was a breadboard kind of thing with a seven segment display, some LEDs, a speaker, and a hex keypad. The great thing was how simple and straightforward everything was. There were about 30 instructions, and you programmed it by entering the machine code directly via the hex keypad. You did the assembly yourself on a piece of paper.

I don't envy kids learning programming today, because there is so much complexity in the stack below where you're operating. You have to just take on faith that things work a certain way, and it can be hard to reason about if you don't understand how it works under the hood.

What happened to AP Computer Science AB? It seemed like without a doubt the better course and ideal prep for college study..