Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Undergrads are stupid? Blame the universities for teaching C and Java

Name: Anonymous 2017-08-14 23:08

https://archive.rebeccablacktech.com/g/thread/61460559/
/g/ is where CS undergrads hang out. The quality of knowledge of /g/ reflects the quality of their education.

In Brazil you have C in introductory classes, second semester is C and assembly. Why are american CS classes such a joke?

The only way to teach someone properly is:
>pseudoassembly language to make the students get the basic principles of how a computer works (without introducing any platform specific stuff)
>C, to teach basic imperative programming and also memory-related matters
>modern C++ for introduction to OOP, templates etc, and also to make the students understand that automatic memory management is possible without a garbage collector
>a modern OOP language (C#, or possibly Java)
>a meme piece of shit scripting language (most likely Python)
>a pure functional language (most likely Haskell)
>SQL, an actual assembly language and webshit languages (Javascript, HTML, CSS) somewhere along the way

This way you get the full picture, a thorough understanding, and you do it in the proper ascending order of abstraction from the hardware layer.
That's what my university did in my CS course, and it was worth it.
And this order makes retards fail quickly, so here's another upside.

I like Java, its the comfiest language. But I wouldn't trade having my 101 class in C for anything. I believe it was a very valuable experience. Plus, it helped me with OS, Systems programming, and computer architecture later on down the road. Not teaching C just fucks students over later. Maybe it's for the best though cause ee need less JS script fags scraping out a CS degree and calling themselves developers anyway. Stallvolution will eliminate them from the equation.

As a CS major who was taught Java first then C and C++ later. Java was easier to learn, but I wish I was introduced to the complexities of C first. One big thing that I can think of is that Java has a garbage collector so you are basically allowed to write shit code. Once we started learning C, that shit wouldn't fly and the idea of memory allocation was lost on many.

C might be harder to learn, but for CS it's a better foundation imo.

Name: Anonymous 2017-08-15 3:24

Blame the universities for teaching C and Java
Blame them for what? Companies want C & Java code monkeys, so universities start to train them.
People who go to universities want to join the workforce, not circlejerk about their optimized Haskell sleep sort.

Name: Anonymous 2017-08-15 7:27

>>2
optimized Haskell sleep sort
How fast it is?

Name: Anonymous 2017-08-15 9:27

Why do they think the introductory language is so important?
I've never been to university, but 3/5 years sounds like plenty of time to make somebody learn a couple of different languages and bring them out of whatever mindset learning the introductory language left them with.

Name: Anonymous 2017-08-15 12:25

>>4
Because they never really understood the concepts and just copy patterns in whatever language they were taught first.

Name: Anonymous 2017-08-15 20:24

>>1,4
Computer Science isn't about ``Apping''. Go to Software Engineering if you want that.

Name: Anonymous 2017-08-15 20:38

>>4
The introductory language is the university's definition of what ``programming'' should be. They don't learn a couple of different languages and compare and contrast them anymore. C is their only ``imperative'' language, Java is their only ``OOP'' language.

Name: Anonymous 2017-08-15 22:21

>>7
That's not necessarily it.
It's just a language that can be used to teach programming concepts. Doesn't have to be perfect, but the more useful it is the better

and the reason they choose Java is because of C syntax and the fact it is in demand

Name: Anonymous 2017-08-15 22:27

Why is this discussion always had? Just like it was said in https://dis.tinychan.org/read/prog/1498630586 there's no ulterior motive to it. They just do it for JOBS JOBS JOBS

CS has nothing to with programming or computers, so it's pointless to complain that you got to learn two very popular languages instead of pascal and eiffel.

Name: Anonymous 2017-08-16 0:34

>>8
It's just a language that can be used to teach programming concepts.
It's very bad at that because most of the questions aren't about programming concepts, they're about some bad syntax or semantics that non-C-based programming languages don't have. C creates the bad questions and answers on Stack Overflow. The answers say that it's their problem, not the language, but it is the language. Their inexperience with non-C-based languages means they don't know that there are other control structures or other numeric syntax that make more sense. /g/ and Stack Overflow users are saying what they were taught. They get upvoted because the other students think they are correct.

and the reason they choose Java is because of C syntax
C syntax is the hardest to learn, has the least powerful concepts, and provides the least benefit to the programmer. Computer science used to teach multiple programming languages which have different syntax, different control structures, different data types, different I/O, etc. Now they teach C as their only ``imperative'' language and don't teach any of these languages because they think C covers everything. I think this is because learning all of these programming languages takes less time than learning C. When they switched to C, C was all they had time to teach. To me, that's proof that C syntax is worse, but to them, it means C is better because they can get away with knowing less and having worse control structures, worse types, etc. Maybe you can call that ``Worse is Better''.

and the fact it is in demand
Who made it in demand?

>>9
CS has nothing to with programming or computers
They shouldn't be teaching any programming languages if that's the case.

Name: Anonymous 2017-08-16 0:51

>>10
C creates the bad questions and answers on Stack Overflow.
The more popular a language is, the more that happens. So this isn't a fault of C.

C syntax is the hardest to learn, has the least powerful concepts, and provides the least benefit to the programmer.
Another LITHPer who thinks sexps are the pinnacle of good syntax.
Here's something to ponder about; if C syntax is so terrible, then why is it and algol the most common choices for pseudocode?

Who made it in demand?
Free market

They shouldn't be teaching any programming languages if that's the case.
It's just an introductory.

Name: Anonymous 2017-08-16 2:27

/g/ is where CS undergrads hang out.
4chan /g/ is a board about technology, not programming.
Didn't read.

Name: Anonymous 2017-08-16 4:09

>>11
The more popular a language is, the more that happens. So this isn't a fault of C.
C questions are by smart people bewildered by bad design and limitations in the language and the answers defend this bad design.

Another LITHPer who thinks sexps are the pinnacle of good syntax.
I don't think Sexps are good syntax but I think C is bad too. C is hard to learn compared to what it has and not because of the concepts, but because of the syntax and semantics. Pointers are not hard to understand, but C's pointer syntax distracts you from what pointers are. C programmers ask about whether it should be int *p or int* p, which has nothing to do with pointers at all. int* p, q isn't about pointers either. If * meant ``constant'' or ``lazy evaluation'' there would be the same problem because it's a C syntax problem, not a pointer problem. Good syntax helps you understand things better and makes these questions unnecessary.

C's switch is another bad design. You won't know why unless you compare it to other languages.
http://www.ada-auth.org/standards/12rm/html/RM-5-4.html
http://www.freepascal.org/docs-html/ref/refsu56.html
http://www.freebasic.net/wiki/wikka.php?wakka=KeyPgSelectcase
http://www.cs.mtu.edu/~shene/COURSES/cs201/NOTES/chap03/select.html
http://documentation.microfocus.com/help/topic/GUID-0E0191D8-C39A-44D1-BA4C-D67107BAF784/HRLHLHPDF903.html

These are easier to learn, more powerful, and a greater benefit to the programmer.

In a C class, they would be talking about fallthrough and why cases are only limited to single integers instead of understanding why this kind of control structure is useful and improves program readability and optimization. Stack Overflow has questions about why you can't use strings and floats, but there are programming languages where you can use strings and floats in a case or select statement and most of the answers don't mention that. That's how people are dumbed down.

Free market
But who created the supply of CS grads who only knew Java? Why did companies need to hire Java programmers when there were no Java programs?

It's just an introductory.
It should be an introduction to programming, not an introduction to the bad design of a particular language.

Name: Anonymous 2017-08-16 4:59

Case Number of
1..10 : WriteLn (’Small number’);
11..100 : WriteLn (’Normal, medium number’);
else
WriteLn (’HUGE number’);
end;

Name: Anonymous 2017-08-16 10:35

>>14
What programming language is this?

Name: Anonymous 2017-08-16 10:53

>>14
size x | x <= 10 = "Small number"
| x < 100 = "Normal, medium number"
| otherwise = "YUGE number"

Name: Anonymous 2017-08-16 10:58

>>16
That's not even switch or case

Name: Anonymous 2017-08-16 13:21

>>13
C questions are by smart people bewildered by bad design and limitations
Lol.
I bet you also think the same about the Java questions.

Name: Anonymous 2017-08-16 13:31

>>17
It is the Nomad's equivalent of such.

Name: Anonymous 2017-08-16 13:56

>>16
That syntax is similar to Elm's old if syntax, before its creator realized that it strayed too far from the ``standard'' C syntax to be considered serious syntax by mental midgets.

Name: Anonymous 2017-08-16 14:28

>>19
No it's not. That's syntactic sugar for an if statement with guards.

This is what an actual one looks like:
num x =
case x of
1 -> 'a'
2 -> 'b'
_ -> 'z'

Name: Anonymous 2017-08-16 14:32

>>21
switch is syntactic sugar for if statements

Name: Anonymous 2017-08-16 14:43

>>21
Fine then. It is one of the equivalents for the Nomad.

Name: Anonymous 2017-08-16 18:16

>>20
strayed too far from the ``standard'' C syntax to be considered serious syntax by mental midgets.
Universities teach the C syntax because it is the only one that would take an entire semester to learn. C syntax creates thousands of questions that would not occur with any other language.

Suppose someone made a C-based language with lazy evaluation. When you declare int *p, q, p is lazy and q is not. They would spend a whole class on this. None of this has anything to do with lazy evaluation. It is bad syntax.

LITHPers are also liars because they don't distinguish between good syntax and bad syntax. They say that all syntax that isn't Sexps is bad because it doesn't allow macros (not true, but I don't care about LITH. They tell CS students that Pascal, Algol, BASIC, Fortran, etc. are just as badly design and hard to learn as C, which makes them liars, and I'm already fed up with UNIX and C liars, so I have no motivation to join another group of liars.

Name: Anonymous 2017-08-16 23:54

>>24
because it is the only one that would take an entire semester to learn.
cool story, mental midget.

Name: Anonymous 2017-08-17 0:09

>>25
Whomst are you quoting?

Name: Anonymous 2017-08-17 1:34

>>25
Nobody understands C syntax completely. C++ is even less completely understood. The tricks that allow Duff's device and Pigeon's device are part of the syntax of C. There are more ``devices'' waiting to be discovered. You might think it's clever to be able to do this without goto, but that makes the C syntax very complicated. It makes optimizers more complicated. It makes programs harder to read.

https://en.wikipedia.org/wiki/Duff%27s_device
http://pigeonsnest.co.uk/stuff/pigeons-device.html

C syntax and semantics is beyond post-doctorate level work. There have been full semantics of programming languages, some with more features than C, but it has never been done for C despite the efforts put into it. If they finally formalize it, C will still have null-terminated strings, low-quality arrays, and bad control structures. What happened to making programming languages that are easy to understand?

Name: Anonymous 2017-08-17 5:50

>C syntax and semantics is beyond post-doctorate level work
>C programmers are mental midgets

Name: Anonymous 2017-08-17 5:57

>>27
Ok, i'll have to explain this " beyond post-doctorate level work"
Its painfully easy: case and else are just syntax sugar for jump labels:
they are essentially markers for goto. You are looking at combined code of two labels:

int pigeons_device(int a, int b, int mode) {
int result; /* Isn't C a wonderful language? */
switch (mode) {
case 0: if (gloop(a, b)) {
case 1: result = arfle(a, b); break; } else {
case 2: result = barfle(a, b); break; }
} return (result); }

This is syntax sugar for :

int pigeons_device(int a, int b, int mode) {
int result; /* Isn't C a wonderful language? */
static void *modes[] = { &&case0, &&case1, &&case2 };
goto modes[mode];
case0: if (gloop(a, b)) {goto case1;}else{goto case2;}
case1: result = arfle(a, b); goto end;
case2: result = barfle(a, b); goto end;
end:;
return (result); }

Name: Anonymous 2017-08-17 10:44

>>27
this is pretty neat tho

Name: Anonymous 2017-08-17 11:38

>>27
C syntax and semantics is beyond post-doctorate level work
doesn't that mean it's good?

Name: Anonymous 2017-08-17 12:01

>>27
but those devices are trivial to understand if you know assembly, holy fuck how can you call others 'mental midgets' when you don't understand that at the machine level there's really no such thing as control structures so there's nothing weird about jumping in and out of them?

it's my first time reading about 'pigeon's device' and there's nothing 'post-doctoral' about it. you could trivially do it in BASIC, provided your BASIC has computed gotos.

Name: Anonymous 2017-08-17 12:31

check my dubs

Name: Anonymous 2017-08-17 12:41

It's JMPs all the way down.

Name: Anonymous 2017-08-17 20:09

>>28,31
The creation of C semantics and syntax is not post-doctorate at all. Anyone who knew assembly and a high level language like FORTRAN, BASIC or Pascal could make a better language than C.

What's hard is formal semantics of C. Post-docs can't do it after decades of trying and a lot of funding and incentives to do it. Semantics have already been done for languages with more features than C because they have a better design. C is just so badly designed that even the ISO committee doesn't know what code written in it is supposed to do. They often don't even know if it's defined by the standard or not. C++ is even worse.

>>29,32
If you want to use goto/jumps, you write goto.
static void *modes[] = { &&case0, &&case1, &&case2 };
That's not C, which is the root of the problem. If that was possible in C, these ``devices'' wouldn't exist.
#include <stdio.h>

int main() {
int a, i;
scanf("%d", &a);
switch (a) {
for(i = 0; i < 10; i++) {
int j = 0123;
case 0: printf("%d\n", j);
};
while (a < 10) { case 1: printf("a"); a++; };
};
}

Name: Anonymous 2017-08-17 22:25

>>35
Anyone who knew assembly and a high level language like FORTRAN, BASIC or Pascal could make a better language than C.
More autism.
If that's the case, then surely we'd already languages better than C, yes?

Name: Anonymous 2017-08-18 0:17

>>32
I'm pretty sure these anti-C threads are all made by the same guy.
He always rants about how C is shit, mental midgets are everywhere, and how it's ruining universities. Probably a true LITHPER.

Name: Anonymous 2017-08-18 0:30

>>36
If that's the case, then surely we'd already languages better than C, yes?
Being popular doesn't make something good. You might as well be asking ``If that's the case, then surely we'd already languages better than Java, yes?'' If you think there were better languages than Java, there were also better languages than C.

There was already PL/I which was made by IBM and the language Multics and some other operating systems were written in. Teaching C is also dumbing everyone down because they don't know anything about programming languages that aren't C-based.

Universities are switching to JavaScript and not teaching pointers at all because C confuses everyone with bad syntax and semantics. There are just so many things wrong with C that I can't even pick one problem. JavaScript, incredibly, is even worse.

>>37
C is ruining universities. We are focusing too much time and energy on something we can't fix when there are so many solutions available. Universities are creating programmers who know nothing but C, can't learn anything but C and C-based languages, and love the C hacker mentality but hate the Right Thing. They want to replace C because it has all of these bugs, but they create more C programmers. The F-35 uses C and C++ because they couldn't find enough Ada programmers. These universities are part of the problem. Not every university, but if they teach C, they are.

Name: Anonymous 2017-08-18 1:54

>>38
Being popular doesn't make something good.
That wasn't the argument, learn to read.

Name: Anonymous 2017-08-18 2:11

>>39
I think that is the argument. There are better languages than C, and were before C was created, but they aren't popular enough today that you know about them.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List