Hacker News new | ask | show | jobs
by baron816 3224 days ago
While the reasons for this that the author gave are valid, I think it would also be valuable to do this in a high level language. I'm sure lot of people who can read C code went through a CS program, and hopefully learned how hash tables work then. People without CS degrees and who mostly write JS/Ruby/Python/etc. and use hash tables on almost every line of code they write are much less likely to know how they work. Just saying, someone should do it for other languages.
3 comments

The problem with writing hash tables or any fundamental data structures in JS/Ruby/Python/etc is that most of the hard work is done for them.

The hard part is allocation memory, keeping track of the structure(array) holding the hashtable, etc.

What else is there? Implementing the hash function/code?

If you don't have a CS degree, you probably don't even know how lists, queues, stacks, etc really work. But the kind of programming that is done at a "high" level, you might not even need know it.

Instead of saying people should implement it JS/Ruby/Python/etc ( all of whom are OOPs ), they should learn C and implement it in C.

There's room for both. There's a reason why a lot of CS programs have shuffled from primarily C to Python (some had Java in between).

Not having to deal with boilerplate and housekeeping lets you focus on learning the topic at hand. Especially in a classroom setting where you're probably focusing on the specific subject instead of real-world dirtiness.

But after learning the basic concept, you do need an actual implementation if you want to do anything.

> There's room for both.

Sure. I'm all for learning ML, Scheme, C/C++, Python, Ruby, Java/C#, etc.

> There's a reason why a lot of CS programs have shuffled from primarily C to Python (some had Java in between).

The reason is called dumbing down the curriculum. My fall freshman year, my college tried to switch from C to Java in order to make it easier for the general population to get into CS and there was a major pushback from the CS student body, alumni and a bunch of the CS professors. We went back to C/C++ my sophomore year.

> Not having to deal with boilerplate and housekeeping lets you focus on learning the topic at hand.

I disagree. Having to deal with the boilerplate and housekeeping helps you learn the topic at hand.

> But after learning the basic concept, you do need an actual implementation if you want to do anything.

I disagree. Giving them "training wheels" will keep them dependent on training wheels. In an idealistic world, people go from Java/Python to C/Assembly, but that's rarely the case.

CS should begin with Math ( boolean algebra/logic/etc ), Assembly and C. Then go on to functional paradigms. Then to OOP. Etc ( in the language ). Of course they should also learn about OS( kernel/filesystems/etc ), networks, computation theory/etc, compilers, etc.

The dumbing down of the curriculum so that music/english majors can pass CS classes doesn't do anyone any favors.

> so that music/english majors can pass CS classes

This breaks the HN guideline against flamebait. Please don't post like this here.

https://news.ycombinator.com/newsguidelines.html

It isn't flame bait. It was the reason our Dean gave for switching from C to Java. The thinking was that the learning curve for C was too high and the Math/Computer Science wanted to attract more humanities majors to take CS classes.

Introduction to Programming became a requirement and the drop-out/failure rate for non-CS major students was excessively high so the Dean thought teaching the classes in java rather than c would help out those who were new to programming and help them pass these "newly required" classes.

> Sure. I'm all for learning ML, Scheme, C/C++, Python, Ruby, Java/C#, etc.

Personally, I prefer to dig into 1 or 2 programming languages deeply instead of shallowly hop around half a dozen. I seem to retain the deep stuff a lot better. Even when coming back to languages I used heavily years ago (Bash or Perl, for example) I end up having to look up basic things like how loops or functions are defined when I pick them up again.

> The reason is called dumbing down the curriculum.

Do you feel the same way about SICP's choice of using Scheme? One of the innovations of SICP was that CS courses spent too much time explaining the details of a programming language [1]. That was 30 years ago. There are orthogonal discussions on the goals of CS changing over time.

> In an idealistic world, people go from Java/Python to C/Assembly, but that's rarely the case.

Maybe there's no business need? My wife works in video games. That's one industry where programmers often have deep knowledge of hardware and use assembly--but, there's still only a couple of them at each studio. Most people programming are doing game scripting or content creation.

> CS should begin with Math

Your argument seems to be against abstraction. Math is all about abstraction. So is programming. It's been interesting to see programmers tinker with hardware as things like Arduino and Raspberry Pi have become more popular. When writing software they take things for granted, but when interacting with hardware they have to account for things like debounce.

[1] https://people.eecs.berkeley.edu/~bh/sicp.html

The dumbing down of the curriculum so that music/english majors can pass CS classes doesn't do anyone any favors.

You sound butt-hurt

We ban accounts that post like this, so would you please not?

https://news.ycombinator.com/newsguidelines.html

Level of discourse on Hacker News 2017
Huh? I'm not butthurt. Seems like you are though.

I'm sorry having standards and expectations is something that offends so many people.

C isn't a "difficult" language. It's something any CS major should have an understanding of.

I can't believe on hackernews, I'd get attacked for saying people should learn C.

Nevermind that most OSes and most languages themselves are written in C. Even python interpreters are written in C.

Since when is saying people should learn C for a CS degree considered being "butthurt"? What's next? Saying people should learn latin/ancient greek for a liberal arts degree is considered being butthurt?

You're being attacked because of your condescending tone implying that music and english majors aren't smart enough to pass the CS curriculum
See elsewhere here https://news.ycombinator.com/item?id=15082885 for an neat-o Ruby implementation.
You could always port it.