Author Topic: "Stop Teaching C" - Kate Gregory  (Read 43968 times)

0 Members and 1 Guest are viewing this topic.

Offline legacyTopic starter

  • Super Contributor
  • ***
  • !
  • Posts: 4415
  • Country: ch
Re: "Stop Teaching C" - Kate Gregory
« Reply #175 on: November 05, 2016, 02:37:46 pm »
@Marco, Brumby
the topic is mine, and I have no problem with the  brain storming we are actually doing
someone can comment the video where saint Kate explained her right
someone can agree, someone can disagree
someone can explain his/her points
someone can confirm the sanctity to saint Kate ( I do )
someone can revoke the sanctity to saint Kate
someone can argue that we are still looking for a modern language ( I am still )
someone can give me some good advice helping me to design my own made language
(thanks dudes )

no problem at all

come, take a beer, a coffee, a tea (I know, British have tea-time)
( I know, Americans prefer coffee, with/without milk? )
some chocolate ("after eight") ? some biscuits? some red wine?

enjoy my emoticon :popcorn:


there is just a rule: never ever talk about GCC!
immediately permanently banned if so  :-DD
 

Offline legacyTopic starter

  • Super Contributor
  • ***
  • !
  • Posts: 4415
  • Country: ch
Re: "Stop Teaching C" - Kate Gregory
« Reply #176 on: November 05, 2016, 02:50:38 pm »
at the end, I have chosen "Swift" because
it seems to have some legacy with C/C++
and I will follow some "Saint-Kate's points"
 

Online nctnico

  • Super Contributor
  • ***
  • Posts: 26755
  • Country: nl
    • NCT Developments
Re: "Stop Teaching C" - Kate Gregory
« Reply #177 on: November 05, 2016, 03:39:37 pm »
Seen few minutes of the video: What a bullshit that is. Yeah. Just stop teaching anything, because it requires to learn.  :palm:
That is not the point of the video. The point is that C++ offers many ways to program smarter with less chance of errors but most teachers start with C because they think that C has basics but that is a false assumption. You really don't need to know the low level C stuff in order to create good C++ programs so don't teach/learn that if you want to get going quickly. The C stuff is just extra luggage you can do without.
There are small lies, big lies and then there is what is on the screen of your oscilloscope.
 

Offline rstofer

  • Super Contributor
  • ***
  • Posts: 9886
  • Country: us
Re: "Stop Teaching C" - Kate Gregory
« Reply #178 on: November 05, 2016, 04:06:57 pm »
IMO programming should be taught by pseudo-code with assembly language implementation, teach them about micro-optimization (with a focus on memory coherency) at that level. Then skip C/C++ entirely and move up the abstraction chain to java or some fashionable high level language du jour. As much as I hate Apple, all the students are sitting there with macbooks any way ... so I guess swift would make sense.

Well, that's the approach that Donald Knuth took with MIX and MMIX in "The Art Of Computer Programming".  I'm not sure that physical MIX computers were around but, given FPGAs, it would be trivial to built the 64 bit MMIX computer.  At his web site, Dr. Knuth reiterates why he continues to discuss low level machine instructions and how to use them to deal with complex structures:

http://www-cs-faculty.stanford.edu/~knuth/mmix.html

I like to think of C as one step up from assembly language.  C++ and Java are several flights up.  Perhaps C++ should have been named something else.
 

Offline Yansi

  • Super Contributor
  • ***
  • Posts: 3893
  • Country: 00
  • STM32, STM8, AVR, 8051
Re: "Stop Teaching C" - Kate Gregory
« Reply #179 on: November 05, 2016, 04:24:00 pm »
Seen few minutes of the video: What a bullshit that is. Yeah. Just stop teaching anything, because it requires to learn.  :palm:
That is not the point of the video. The point is that C++ offers many ways to program smarter with less chance of errors but most teachers start with C because they think that C has basics but that is a false assumption. You really don't need to know the low level C stuff in order to create good C++ programs so don't teach/learn that if you want to get going quickly. The C stuff is just extra luggage you can do without.

There is no such "without luggage". Either you will carry the luggage and produce some nice code, or you will support bloatware bullscheisse and the CPU will take care of your luggage.  ;D

Modern days dictate to teach only high level programming languages - but I am fed up with the bullmerde software the world is now full of, will be glad to see some skilled low level programmers  :-+

To sum up: Everyone shall learn what he or she is interested in.  :-/O
 
The following users thanked this post: amyk

Offline vodka

  • Frequent Contributor
  • **
  • Posts: 518
  • Country: es
Re: "Stop Teaching C" - Kate Gregory
« Reply #180 on: November 05, 2016, 08:39:22 pm »
 I am disagree with several topics this video.

First point, I  have never been a fan of the language C and i  have always found very weaknessed(my opinion bad design) that  i gave  many troubles when i performed several projects .
I don't know as is programming with C++ because i never used , but i have experienced with other programming language that are oriented  to objected (.NET .JAVA) and it is crap , worse than C.
The POO tends to be messed,cumbersome to read and understand and  you always terminate to write more code than the vintage paradigm programming.

When i saw the video  and i do a list of fallacies.

Strings -10:16

I acknowledge  that C  is very bad handling strings and with C++ enhances something.  But Is it necesary using OOP ?
No , COBOL  uses  UNSTRING for splittig strings and STRING for concating string. 

Printf - 11:30

This certain that the system out screen  on C is bad with the type the casting . But the solution on C++ is putting sprats between variables instead  the commas.
They have  resolved us the headache but now we have eyepain.

Arrays  14:31

Here the POO begin to pervert the names  , renaming with exotics names as "Collections"  , let's go  "the monkey is monkey although you wear him  of silk"
The main problem with the arrays on C++ is that the programmer doesn't have to think , he goes to class  get the method, and copies pastes a several times. The programmers loose the agilty of design algorithm.
On change C , too it exists funtions for handling arrays , but it has more flexibility on vary the  code for adapting to situation than with C++, besides the programmer gains agility.

Namespaces 19:30

Other example of like the POO complicates the life , with stupids renames. The namespace is as the classic assigned of the libraries on C.  But the great difficult that the old programmers see this , it is knowing that do this namespace ,because when they  go to help , they find a giant holybook inside this there are other holybooks as  russian dolls


Lambdas & polymorphs & cons & new  25:50-38:24

The pointers on C is a headache with the operators * and &  due to a bad design on  compared with the  ASM opcodes.

Now , when she says that the polymorphism and the pointers are the same, that is for laughing.

Then  the classical POO  theory  is dropped because  if it  does the same but without than the programmer handling pointers . Apart  that the programmers loose the know-how of handling the indirect access, which is the diference with  the visual basic.


On resume, i believe that don't have to leave to teach C due to this language has the main basic of the programming as  manual control arrays and the pointers .
On change the C++  i believe is a bad example of the modern programming : ideological ,incoherent with the actual culture ecologist ( consumed every time more memory while it reduces the consume power),disordering and unstructured programming.




« Last Edit: November 05, 2016, 08:52:59 pm by vodka »
 

Offline legacyTopic starter

  • Super Contributor
  • ***
  • !
  • Posts: 4415
  • Country: ch
Re: "Stop Teaching C" - Kate Gregory
« Reply #181 on: November 05, 2016, 08:55:15 pm »
I acknowledge  that C  is very bad handling strings and with C++ enhances something.  But Is it necesary using POO ?
No , COBOL  use  UNSTRING for splittig strings and STRING for concating string. 

She underlined that string is a type, and each type comes with "operators"
e.g. if (string == string), the "==" is a type_string_operator

But the solution on C++ is putting sprats between variables instead  the commas.
They have resolved us the headache but now we have eye pain

and "<<" is a type-operator, left-associative

 

Offline legacyTopic starter

  • Super Contributor
  • ***
  • !
  • Posts: 4415
  • Country: ch
Re: "Stop Teaching C" - Kate Gregory
« Reply #182 on: November 05, 2016, 08:59:50 pm »
POO

object oriented programming
O O P, on the mirror, is P O O
like UNIX and XINU, nice trick
 

Offline Syntax_Error

  • Regular Contributor
  • *
  • Posts: 204
  • Country: us
Re: "Stop Teaching C" - Kate Gregory
« Reply #183 on: November 07, 2016, 11:42:19 pm »
I hope this isn't considered too off topic. I watched the following video recently, and found it very interesting. Beware! He speaks very quickly throughout the video; it took some getting used to.



I watched the video by Kate Gregory when it came out, and honestly, I hate that video. Maybe she's right, I don't know. I'm not in a qualified position to know. But it strikes me as incorrect and also the presentation was quite irritating, which is difficult to ignore.
It's perfectly acceptable to not know something in the short term. To continue to not know over the long term is just laziness.
 

Offline karoru

  • Regular Contributor
  • *
  • Posts: 196
  • Country: pl
Re: "Stop Teaching C" - Kate Gregory
« Reply #184 on: November 08, 2016, 02:16:58 am »
For all these people with very strong opinions and saying that it's a blasphemy to use these "overbloated" things like vectors and strings and OOP instead of static tables, malloc and pointers - "stop teaching C" means "stop teaching C in C++ language course", not in "introduction to programming" course.

This talk was mainly about the big problem (that I also encountered in real life working with new programmers) that typical student after finishing typical C++ course writes code that won't pass any code review and often doesn't use any features of language that decided to choose it in the first place!

As a nice food for though there is another video from CppCon, explaining game for Commodore 64 written in modern C++ (and x86 to 6502 machine code translation) using all these naughty words like templates or classes showing how much can be done without any overhead in resulting machine code.

 
The following users thanked this post: thm_w

Offline rstofer

  • Super Contributor
  • ***
  • Posts: 9886
  • Country: us
Re: "Stop Teaching C" - Kate Gregory
« Reply #185 on: November 09, 2016, 12:32:03 am »
That CppCon video was excellent.  That embedded code can be written with zero overhead has caused me to rethink writing only in C.  Of course, every concept he used is well beyond my existing understanding of C++ so I'll have to go back and watch it a couple more times.  And hit the books...
 

Offline asgard20032

  • Regular Contributor
  • *
  • Posts: 184
Re: "Stop Teaching C" - Kate Gregory
« Reply #186 on: November 09, 2016, 01:51:36 am »
Both of these video made me rethink about using C++ in an embedded system, I really enjoyed these two video.

I still think that we should teach C first, not anymore because of C++ is bloated for embedded, but more because using C++ correctly require a certain degree of experience. And expecting people to learn the base of programming, while also learning object oriented while also learning how to use C++ feature correctly to produce correct embedded system code is maybe too much.

But if people already had some exposure to programming (and i am talking about true exposure, not exposure to some obscure language like visual basic)... and are taking a course focused on embedded programming (with a prerequisite programming course experience) then yes, do it, having a full semester to learn how to use C++ feature while also keeping controle of the compiler output is feasable.

I don't think that learning a language like C before is bad before learning C++, it only expose the student to basic programming mechanism that will be used in C++ anyway : pointer, if, else, while... After learning those, they just need to learn object oriented. What is the difference between learning C first then C++ VS learning C++ without teaching OO now (because before learning OO, we learn how to do basic statement first like if, else...), except that in the first case not to much syntax is involved while in the second case, C++ has lot of syntax that could confuse some student?

Introductory to programming (C, python... but no OOP yet) --> Embedded system programming (MCU, interrupt, RTOS, using C++ the right way for embedded...)
 

Offline legacyTopic starter

  • Super Contributor
  • ***
  • !
  • Posts: 4415
  • Country: ch
Re: "Stop Teaching C" - Kate Gregory
« Reply #187 on: November 09, 2016, 07:06:54 am »
Like some mining companies explore possibility of digging for gold,
I was exploring possibility of digging for Kernel development in C++
and this is interesting  :D
 

Offline rstofer

  • Super Contributor
  • ***
  • Posts: 9886
  • Country: us
Re: "Stop Teaching C" - Kate Gregory
« Reply #188 on: November 11, 2016, 01:06:39 am »
Here is another video by Dan Saks re: trying to get C programmers interested in C++.  He starts with a slide that show an increasing trend to use C versus a decreasing trend to use C++ and that C is used three times as often as C++.

Somewhere around 1:16:00, he gets to the meat of the issue (from my point of view):  C++ is a hard language - FAR more difficult to understand than C.  100x, 1000x?  In any event, it is a LOT more difficult.

He follows up by saying that a lot of embedded programmers are EEs, not CSs.  Their total exposure to programming in college was the instructor handing out copies of K&R and expecting to see LEDs blink.

The entire video is about how to approach the task of getting C programmers interested in C++.  Only a couple of code examples and those weren't all that helpful since he doesn't really discuss the C++ implementation.



I don't know why it is so difficult!  Just develop an embedded project in C++ (including interrupts and, potentially, an RTOS) and serve it up as an example.  Keyboard input via PS/2, LCD text screen output, some SPI or I2C, perhaps something truly difficult like a USB or Ethernet stack.  I watched one of the other CppCon videos re: embedded development and I'm totally fascinated.  Unfortunately, EVERY book I buy wants to develop an application to solve world hunger.  That's not in my area of interest!

« Last Edit: November 11, 2016, 01:09:27 am by rstofer »
 

Offline westfw

  • Super Contributor
  • ***
  • Posts: 4196
  • Country: us
Re: "Stop Teaching C" - Kate Gregory
« Reply #189 on: November 11, 2016, 02:33:22 am »
Kate's talk seems to be aimed at the instructors of "5 day C++" classes.  Presumably (?) people who have programmed in bash or javascript, and are looking for info on a more efficient programming language.   This is a pretty scary demographic; it reminds me of my teen son who wanted to wait till age 18 to get his driver's license so he wouldn't have to deal with "silly classes." :-)
You can't become a competent programmer in ANY language in 5 months, much less 5 days.  So it becomes a matter of "what do you teach them first, so that they can do the most without hurting themselves."  In that context, her suggestions make some sense...
 

Offline JPortici

  • Super Contributor
  • ***
  • Posts: 3452
  • Country: it
Re: "Stop Teaching C" - Kate Gregory
« Reply #190 on: November 11, 2016, 11:27:40 am »
For all these people with very strong opinions and saying that it's a blasphemy to use these "overbloated" things like vectors and strings and OOP instead of static tables, malloc and pointers - "stop teaching C" means "stop teaching C in C++ language course", not in "introduction to programming" course.

This talk was mainly about the big problem (that I also encountered in real life working with new programmers) that typical student after finishing typical C++ course writes code that won't pass any code review and often doesn't use any features of language that decided to choose it in the first place!

As a nice food for though there is another video from CppCon, explaining game for Commodore 64 written in modern C++ (and x86 to 6502 machine code translation) using all these naughty words like templates or classes showing how much can be done without any overhead in resulting machine code.


finally watched that video
* very long whistle *
 

Offline rstofer

  • Super Contributor
  • ***
  • Posts: 9886
  • Country: us
Re: "Stop Teaching C" - Kate Gregory
« Reply #191 on: November 11, 2016, 04:53:37 pm »

finally watched that video
* very long whistle *

And I am having a heck of a time finding reference material (books, class notes (no, not that kind of class)) that will get me started.  I was blown away by the elegance of the code and the display of generated code was compelling.  So, how to get started?  I'm talking only about  embedded programming.

I'm a 'cut and paste' kind of person.  I like to find working examples and then incorporate them into my projects.  So far, I'm not finding anything useful.
 

Offline Bruce Abbott

  • Frequent Contributor
  • **
  • Posts: 627
  • Country: nz
    • Bruce Abbott's R/C Models and Electronics
Re: "Stop Teaching C" - Kate Gregory
« Reply #192 on: November 11, 2016, 06:24:35 pm »
I'm a 'cut and paste' kind of person.  I like to find working examples and then incorporate them into my projects.
Thief!  ;)

But seriously, you should just use working examples as a guide to writing your own code. It will be more satisfying, you will learn more, and when you need to do something different you won't be out of your depth. 



 

Offline Marco

  • Super Contributor
  • ***
  • Posts: 6694
  • Country: nl
Re: "Stop Teaching C" - Kate Gregory
« Reply #193 on: November 11, 2016, 07:36:49 pm »
I saw a mention of ZeroMQ in the stackoverflow thread, the developer has some choice things to say about C++ for lower level programming.

What seems to be necessary for C++ to be suitable for projects to be maintainable is a big stick, as always with programmers. The adherence to the C++ subset chosen for a project should be guaranteed by a code sanitizer, rather than depending on programmer discipline.

We need C++-.
« Last Edit: November 11, 2016, 07:38:29 pm by Marco »
 

Online tggzzz

  • Super Contributor
  • ***
  • Posts: 19281
  • Country: gb
  • Numbers, not adjectives
    • Having fun doing more, with less
Re: "Stop Teaching C" - Kate Gregory
« Reply #194 on: November 11, 2016, 07:40:38 pm »
I saw a mention of ZeroMQ in the stackoverflow thread, the developer has some choice things to say about C++ for lower level programming.

What seems to be necessary for C++ to be suitable for projects to be maintainable is a big stick, as always with programmers. The adherence to the C++ subset chosen for a project should be guaranteed by a code sanitizer, rather than depending on programmer discipline.

We need C++-.

See the FQA (q.v.) :) Don't build castles on sand :)
There are lies, damned lies, statistics - and ADC/DAC specs.
Glider pilot's aphorism: "there is no substitute for span". Retort: "There is a substitute: skill+imagination. But you can buy span".
Having fun doing more, with less
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf