5 ms·
Why would a 14 year old be taught C++ and low level networking? Familiarizing them with a high level scripting language (like python say) will not do? Will you
by anuraj 14y ago
Why would a 14 year old be taught C++ and low level networking? Familiarizing them with a high level scripting language (like python say) will not do? Will you teach surgery to a 14 year old? Will you teach them to design and construct a building?
- seabee 14y agoWhy shouldn't they learn C++ and low-level networking?
- Tichy 14y agoBecause it is not as useful as other languages?
- EliRivers 14y agoUseful in what sense? Are you _using_ an operating system? What language was that written in? So how useful is it? NB: I'm taking your comments to apply equally to C as C++, given the prevalence of C in operating systems. If you really would not have said the same thing about C, I retract my comments.
- Tichy 14y agoIf as a 14 year old your plan is to write an operating system, learning C might make some sense. It just seems like a very unlikely scenario to me. Also I think a lot of tools for example in Linux are written in other languages. Most likely scenario for using C as a 14 year old might be doing electronics projects, but I think Arduino is most commonly programmed in Java.
- wollw 14y agoArduino is C/C++. It's mostly a C++ abstraction built on top of the avr-libc library. The Arduino IDE is written in Java though.
- Tichy 14y agoI think you can program the Arduino in C/C++ (like every other Microcontroller), but I was under the impression that it actually has a Java Runtime and the usual way is to code Arduino programs in Java.
- wollw 14y agoThe Arduino is based around Atmel's 8 bit AVR architecture which really doesn't have what it takes to run a JVM. The ATmega328P which the Arduino Uno board uses has 32KB of code space and 2KB of SRAM which isn't really enough for something like Java. The normal way Arduino projects are built is by defining a "setup" function and a "loop" function which, when compiled, are actually just called by a hidden C++ file with a main function that essentially does this: int main(void) { setup(); for (;;) loop(); } The actual file does a bit more and can be found in their git repository here: https://github.com/arduino/Arduino/blob/master/hardware/arduino/cores/arduino/main.cpp https://github.com/arduino/Arduino/blob/master/hardware/ardu...
- irahul 14y ago> Because it is not as useful as other languages? C++ doesn't have web frameworks, and is big and complicated. If you aren't doing web projects, you can safely stick with a subset(with guidance of course). You mention is not being useful - what is that Python can do that C++ can't? C++ is going to be a bit more verbose, yes, but verbosity is not the only variable. Also, use stl(and/or boost) and your code won't be that verbose. This isn't that bad. #include <set> #include <string> #include <iostream> int main(int argc, char **argv) { // Declare and Initialize some variables std::string word; std::set<std::string> wordcount; // Read words and insert in rb-tree while (std::cin >> word) wordcount.insert(word); // Print the result std::cout << "Words: " << wordcount.size() << std::endl; return 0; }
- Tichy 14y agoI meant "not as useful" as "not as efficient". Of course you could do everything you could do in Python (or whatever) in C++, since Python is basically a subset of C++ (I assume Python is written in C/C++). It just seems weird to make beginners start with a complicated tool when there are easier tools that can get the same results.
- vt220 14y agoIt is verbose compared to python, which would do this in about 3 lines. It's also not that great an example because it begs the question why one moment a set of strings ('words' as variable name feels weird to me because I think in c of word boundaries, but whatever) is set<string> (please use 'namespace std') and next moment its char argv. These are obviously simple things to anyone with c++ knowledge, but teaching this to someone is just likely to put them off. There's no reason to use c/c++ today unless you're coding drivers or very performance critical things. A set isn't necessarily implemented using a red-black tree, most likely its a binary tree of some kind, but why would anyone put that in a comment. It's a set, which just means there's only copy of any repeated 'words'. I think the reason why c++ doesn't make a good language to teach youngsters is because stl is still a beast of a template library, still spits out garbage error messages and is painful to work with even by the most experienced of developers (25+ c/c++ here) On the other hand, collections and data structures in python are simple, efficiently implemented and extremely succinct, if the value of a dictionary element contains 2 or 3 elements, or is another dictionary, or a map etc it's simple to do this in python, where as in stl pair<int, int> is great until you need three of them, then its auto_ptr or whatever and it starts to get unwieldy and the poor student trying to focus on the algorithm is now bogged down in the with the inelegance of a low level language. Don't get me wrong, I love c and c++, but i'd rather teach some python or ruby because they can get stuff done and working and not struggle with tedious syntax. len(set(sys.stdin.read().split(' '))) C++ does have web frameworks too! Witty (wt)
- shmerl 14y agoTell me that. C++ is a widely used industrial language.
- anuraj 14y agoa 5 year old may be taught neurosurgery - the point is what is the point?
- deleted 14y ago[deleted]
- seabee 14y agoProgrammers ought to have a lot less hubris about their subject. The difference in difficulty between imperative languages is not as large as you think - and changes depending on the problem domain. Networking enables the Internet in much the same way the internal combustion engine enabled modern transportation. Yet apparently only one of these topics is considered reasonable for a 14-year-old to study? I find it baffling.
- andrewflnr 14y agoWhether two technologies have analogous roles in two essentially unrelated systems has nothing to do with their teachability to 14 year olds. Some things are just harder. Though in this instance, they could both be taught to talented kids well below 14.
- deleted 14y ago[deleted]
- pooriaazimi 14y agoIt was 1997. I was 6 at the time so I don't know, but probably python/etc. were less known at the time or deploying them was harder than C++ on Windows.
- quesera 14y agoDon't underestimate children, or girls. I know sub-14 year olds who are fluent in C and a couple flavors of assembly language.
- batista 14y agoAnd I know tons of them that cannot even pin point their country on the maps. What's with using outliers as examples?
- quesera 14y agoThe point is that these are not outliers in aptitude. They're outliers in opportunities offered. Underestimating kids is a huge societal failure. We do it a lot. It offends me. I'm not sure you read the article, or noticed the comment I was replying to. Why would anyone not offer a class in hard stuff to 14 year olds?? 14 is not some tender sensitive age where kids need coddling.
- batista 14y ago>The point is that these are not outliers in aptitude. They're outliers in opportunities offered. Kids that can program in "several assembly languages" (your words) are just outliers in "opportunities offered"? Even in college, heck, even in CS majors, there are kids that "get it" and kids that do not. So, no kids that are programming geniuses at 10 are not just outliers in opportunities. Besides, the kids that could not pinpoint their country on the map were ALSO taught Geography. They weren't lacking in "opportunities", they lacked in skills, attention, etc. >Why would anyone not offer a class in hard stuff to 14 year olds?? 14 is not some tender sensitive age where kids need coddling. And why would that hard stuff be C++? It's not like it's something good to teach even for adults...
- snprbob86 14y agoI started learning C++ during my freshman year of High School, that was at about 14. I don't really consider myself an outlier... Hell, I was a pretty typical B+ student from grade school, straight through to my bachelor degree. C++ was hard, but I had already fallen in love with the magic of making the computer do things with some VB. As a result, I was motivated enough to fight my way through a C++ book. Kids need a special blend of internal motivation, external motivation, love, and support. Given those things, I promise you that kids will surprise you. Every. Single. Time. I've met some 14 year olds at http://www.studentrnd.com http://www.studentrnd.com that code circles around most college graduates. It's not because these kids are intellectual outliers. It's because they have a place to gather with other smart kids and challenge each other to build something just a little bigger and just a little better. We need to start expecting more from kids and providing them the opportunities to prove that they are deserving of those expectations.
- logn 14y agoC++ was taught in my high school. A good teacher can make C++ learnable. You just focus on using a sane subset of the language and it can make sense to beginners. Also going from C++ to Java is a lot easier (and others I'd imagine too) because C++ forces you to master pointers. And of course, Java is filled with pointers but the syntax hides it.
- jmvoodoo 14y agoI think C and low level networking are great things for beginners to learn. I started learning C at age 9 and networking around age 12. C is great because it teaches a ton about how computers actually work, and practically forces you to learn CS concepts, without having to go as far as program counters, etc. in assembly. Low level networking is great because it teaches how properly architected systems are built in layers that each serve a particular purpose. It also helps tremendously when building systems later on in your career. You have no idea how many "programmers" I have interviewed that can't even write a bubble sort because all they learned was Array.sort(). Starting with C fixes this problem, and sets the stage for proper learning (and appreciation) of high level languages. The other thing that I would really focus on at a young age is troubleshooting. It teaches you how to think in a way that not many other things can.
- sp332 14y agoYou're over-estimating the difficulty. I just did a networking project in C, and the APIs are quite straightforward and well-documented.
- irahul 14y ago> Why would a 14 year old be taught C++ and low level networking? There is an entry age for learning C++? Tell me more about it. /s > Will you teach surgery to a 14 year old? Apparently high school biology followed by 5 years of undergrad followed by 2 years of grad is the same as learning C++. Now don't go on a tangent about how CS schools need math foundation and are 4 years and you need grad school for deeper understanding. CS education isn't under contention - C++ is. C++ doesn't need a big foundation. An average 14 year old will pick up C++ just fine.
- shmerl 14y agoAnd why not?
- TallGuyShort 14y agoI learned C and C++ when I was 11, having only done BASIC before that. Why hold 14 year-olds back if they're capable of doing it?