What do schools have against teaching C?

You can talk about almost anything that you want to on this board.

Moderator: Moderators

User avatar
gauauu
Posts: 779
Joined: Sat Jan 09, 2016 9:21 pm
Location: Central Illinois, USA
Contact:

Re: What do schools have against teaching C?

Post by gauauu »

tepples wrote:How is that different in practice from needing the non-free Windows operating system to run your hardware drivers? This can happen when no laptops in your local Best Buy have a penguin logo to imply that free drivers are available for the hardware, and System76 (which specializes in Linux PCs) doesn't offer any laptops in your preferred form factor. ASUS T100 still has no suspend after years.
In the last 15 years, I've never had a laptop that wouldn't run linux reasonably well. Sometimes some non-essential bits don't work right (suspend/hibernate, or fingerprint readers, etc) but I've had about the same chance of problems when I upgrade a laptop to Windows 10 from an older version.
Even if Windows is non-free as in speech, Linux is non-free as in beer because of increased hardware support cost for the manufacturer. Last I checked, the Dell XPS 13 with Windows cost $50 less than the same laptop with Ubuntu.
For a personal user, you're right. For all practical purposes, windows is usually "free-as-in-beer" for a home computer because of the way it's sold. That said, there are a few important places that it's not free, but linux is:

1. Used computers. I've bought used computers with no legal windows license, or something ancient like XP. To get a modern OS on them, I'll use linux since I don't want to pay for a modern version of windows.

2. Servers and VMs. If I want to run some web service on a windows server, that's going to cost me money for the OS. I can run a linux server without paying for the OS.
User avatar
FrankenGraphics
Formerly WheelInventor
Posts: 2064
Joined: Thu Apr 14, 2016 2:55 am
Location: Gothenburg, Sweden
Contact:

Re: What do schools have against teaching C?

Post by FrankenGraphics »

Sometimes some non-essential bits don't work right (suspend/hibernate, or fingerprint readers, etc) but I've had about the same chance of problems when I upgrade a laptop to Windows 10 from an older version.
Not to mention things like hibernation/suspension doesn't work that well sometimes even on a designated soft/hardware package, and tends to break gradually over time with all the mandatory updates.

My current HP laptop, which is the most expensive i've bought to date, sometimes forgets its multitouch functions (and it's like 4 months old) which is a shame because they really up my workflow. Hibernation or reboot solves it.
User avatar
Sumez
Posts: 919
Joined: Thu Sep 15, 2016 6:29 am
Location: Denmark (PAL)

Re: What do schools have against teaching C?

Post by Sumez »

Bregalad wrote: No, you still need the non-free Windows operating system to run them.
Not to mention non-free computers to run that operating system on.
I think we're grasping for straws here :)

If you are strongly against anything Microsoft branded, Mono compilers and compatible IDEs do exist for other platforms. Also, the latest version of the official C# compiler is completely open source on Github (yes, they aren't even using Microsoft's own code repository).
tepples
Posts: 22708
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Re: What do schools have against teaching C?

Post by tepples »

gauauu wrote:
tepples wrote:How is that different in practice from needing the non-free Windows operating system to run your hardware drivers? This can happen when no laptops in your local Best Buy have a penguin logo [...]. ASUS T100 still has no suspend after years.
In the last 15 years, I've never had a laptop that wouldn't run linux reasonably well. Sometimes some non-essential bits don't work right (suspend/hibernate, or fingerprint readers, etc)
Some people drive everywhere. Others get motion-sick from reading while riding transit. I can see how they would consider suspend "non-essential bits", as they don't need to quickly suspend when transferring to another bus at the transit station and can instead rely on shutting down before leaving and booting when arriving. But I don't drive, and fortunately, I'm not affected by reading motion sickness. So to me, and probably to any other frequent passenger who doesn't get motion-sick, suspend is "essential bits".
gauauu wrote:1. Used computers. I've bought used computers with no legal windows license, or something ancient like XP.
Such as the off-lease ThinkPad X61 that I bought for $101 shipped on a tip from mikejmoffitt. It arrived with its Windows certificate of authenticity torn off and Windows 10 on a volume license that could no longer connect to the LAN where its activation server had been located. It now runs Debian 9 "Stretch", for which C and C++ are a sudo apt install build-essential away.
User avatar
FrankenGraphics
Formerly WheelInventor
Posts: 2064
Joined: Thu Apr 14, 2016 2:55 am
Location: Gothenburg, Sweden
Contact:

Re: What do schools have against teaching C?

Post by FrankenGraphics »

I guess there's a difference between hibernation behaving oddly from time to time or suboptimally, and not working at all. I'm working from the seat of a bus a lot.
DementedPurple
Posts: 318
Joined: Mon Jan 30, 2017 5:20 pm
Location: Colorado USA

Re: What do schools have against teaching C?

Post by DementedPurple »

A bit off topic but I’m always upset by how tutorials always use integers and constants when unnecessary. The arduino tutorials use an entire int just for a bool value. And they tend to use constants when they could just use #define VariableName Number.
User avatar
rainwarrior
Posts: 8732
Joined: Sun Jan 22, 2012 12:03 pm
Location: Canada
Contact:

Re: What do schools have against teaching C?

Post by rainwarrior »

DementedPurple wrote:A bit off topic but I’m always upset by how tutorials always use integers and constants when unnecessary. The arduino tutorials use an entire int just for a bool value. And they tend to use constants when they could just use #define VariableName Number.
1. C has no built in bool type, and on many C++ compilers the size of a bool is the same as an int, so the only gain from using bool is the type information, not storage size.

Ref: https://en.wikipedia.org/wiki/Boolean_d ... ive-C,_AWK

2. Most people would complain about using #define for constant values when unnecessary. #define has a whole host of potential unwanted side effects, and a const value has very few.

Ref: https://www.baldengineer.com/const-vs-d ... d-why.html

C++11 also offers constexpr, which can more strongly enforce "compile time only", if you need it.
lidnariq
Posts: 11432
Joined: Sun Apr 13, 2008 11:12 am

Re: What do schools have against teaching C?

Post by lidnariq »

C didn't use to support booleans as a first-order primitive; that was added with C99. (stdbool.h)

(Yes, I know you could use bitfields)

Most computer architectures don't support direct addressing of individual bits as opposed to explicitly using longer constants to emulate the same behavior. At that point, it's faster to just the full word instead of whatever subset anyway.
User avatar
slembcke
Posts: 172
Joined: Fri Nov 24, 2017 2:40 pm
Location: Minnesota

Re: What do schools have against teaching C?

Post by slembcke »

Eh, I dunno. I'm of the opinion that you shouldn't learn just one programming language anyway. I know quite a few devs that are uncomfortable outside of their only language. (ex: Unity/C# or HTML/Javascript) Many of them consider C++ to be black magic even though they've never used it. I did a Global Game Jam game last weekend for NES, and it blew a few peoples minds that I wrote a dozen lines of assembly to handle music selection. Not that these are bad people, but don't be like that. :p

Be ready to use Java if you are hired to work on Android, C# if it's for MS, Swift if it's Apple, C if it's for Linux, etc. (Yeah, I know there are overlaps and what about JS/Python/etc, I'm just sayin'...) The more adaptable you are, the more valuable you are. If you are learning a language, figure out what makes it unique, and it will make you a better programmer in other languages even if you don't like it.
User avatar
whicker
Posts: 228
Joined: Sun Dec 13, 2009 11:37 am
Location: Wisconsin

Re: What do schools have against teaching C?

Post by whicker »

My experience with a C programming class at college was that in the end we'd spent about 80% of the time dealing with all the intricacies of printf format strings.

And yes under a microscope printf does some bizarre and tricky things that'll get points marked off. Something that teachers love when they're under pressure to make their grades look like a bell curve.
User avatar
FrankenGraphics
Formerly WheelInventor
Posts: 2064
Joined: Thu Apr 14, 2016 2:55 am
Location: Gothenburg, Sweden
Contact:

Re: What do schools have against teaching C?

Post by FrankenGraphics »

Hahaha like a large percentage of a projects' development time was spent on polishing the layout of some console output no user will ever see.
User avatar
rychan
Posts: 65
Joined: Wed Jun 21, 2017 1:51 pm
Contact:

Re: What do schools have against teaching C?

Post by rychan »

Sadly at the schools I went to in the UK wayyy back, no-one ever taught us how to program. Which was a shame but they did at least have the goodwill to give us access to the Basic family of things in secondary school (BBC Basic, QBasic and Visual Basic)

No lessons as I said, but the I.T. rooms were always open during break times and were frequented by me and a few others a lot.

At University much of the teaching was very hands-off so you'd just go and learn your own style through research and practice. My course wasn't strictly a programming course, more a mix of design and coding but you get the picture.

Recently there's been a push for more visual programming langauges such as Scratch for kids around theage of 8 years old which is fine. It's an entryway into programming I guess, you can set up logic loops, etc which is cool. Very bare bones but a good starting point.
Probably The "Most Filthy Casual" NES ASM Developer https://refreshgames.co.uk/
User avatar
Fisher
Posts: 1249
Joined: Sat Jul 04, 2015 9:58 am
Location: -29.794229 -55.795374

Re: What do schools have against teaching C?

Post by Fisher »

I think you guys are lucky to at least have classes with computers.
When I was at school, there where only a few PCs that most of the time were broken.
Now that my kids go to school, I have a weird feeling that most teachers are afraid of computers, since most of the time I see the computers staying idle or off, when they're not being used by someone to surf the Web.
User avatar
tokumaru
Posts: 12427
Joined: Sat Feb 12, 2005 9:43 pm
Location: Rio de Janeiro - Brazil

Re: What do schools have against teaching C?

Post by tokumaru »

I'm under the impression that smartphones and tablets made computer classes for kids kinda pointless. Kids start using tablets/phones when they're only 2 years old nowadays, and they're probably capable of doing much more advanced stuff by the time they're teenagers than the things I was doing when I had computer classes at that age.
Garth
Posts: 246
Joined: Wed Nov 30, 2016 4:45 pm
Location: Southern California
Contact:

Re: What do schools have against teaching C?

Post by Garth »

Learning to program is getting harder, not easier: https://developers.slashdot.org/story/1 ... ing-harder

http://oneweekwonder.blogspot.co.uk/201 ... llacy.html :
I've just been watching this BBC news article, which features luminaries from the UK industry talking about the woeful programming skills in the new generation of kids.

Let's make a case here: not only does the education system have computing wrong because we focus on ICT, but the programming industry has the wrong emphasis on computer science, because they believe in teaching kids using powerful environments on powerful systems; when what we need is dirt simple systems and environments. ...
Report: 80’s kids started programming at an earlier age than today’s millennials: https://thenextweb.com/dd/2018/01/23/re ... llennials/
http://WilsonMinesCo.com/ lots of 6502 resources
Post Reply