It seems like everyone is trying to learn to code: Code.org has celebrities like Bill Gates, Mark Zuckerberg, and Chris Bosh telling you anyone can code; CoderDojo's are springing up all over the country; the UK has made it part of their official curriculum for all grade school kids.
I think this is slightly misguided. Don't get me wrong - I do think the world would be better off if everyone had some familiarity with coding - but coding itself should not be the goal. Computers and programming are just tools. They are a means to an end. The real goal should be to teach people a new way to think. In other words, we should be trying to teach computer science and not just coding. In this blog post, inspired by Simon Peyton Jones' wonderful TED talk Teaching Creative Computer Science, I'll explain the difference between the two, and why focusing on the right one is critical for the movement to succeed.
(Score: 2) by kaszz on Saturday July 05 2014, @04:05PM
Actually it's a strategy in some college's to teach math to make students think..!
Oh and math doesn't have any typing nor compiler warnings to guide you. Instead, make an error and you have just a big lump of algebra that is just garbage.
(Score: 4, Funny) by Runaway1956 on Saturday July 05 2014, @04:23PM
But - thinking is such HARD WORK! People want a formula for everything, so that they don't HAVE to think!
“I have become friends with many school shooters” - Tampon Tim Walz
(Score: 2) by kaszz on Saturday July 05 2014, @04:31PM
There's always there career as white collar peon or Pointy-Haired-Boss ;)
(Score: 3, Informative) by opinionated_science on Saturday July 05 2014, @04:57PM
and learning when it is not possible to have a formula, is one of the coolest things about studying. We live in a golden age of information, and learning what to study and what to just use, is an important skill.
In engineering the expression is "don't memorise things you can derive. Don't derive things you and lookup."
Oh the joys of open book exams...
(Score: 1) by bzipitidoo on Saturday July 05 2014, @07:06PM
That was the approach I took through school. It did have problems. It takes longer to derive things, and you don't have a lot of time for that on tests. Testing with tight time limits forces you to memorize.
As to open book exams, I thought they were cool until one teacher gave a take home test over the weekend that turned out to require some 36 pages of answers. That's 36 pages of engineering, not some fluffy English book report. I started Friday night, but as the weekend wore on, my answers got shorter and shorter as my time ran short. I did have other homework to do that weekend, couldn't spend all my time on that test.
(Score: 2) by aristarchus on Saturday July 05 2014, @07:27PM
Or could I just take an electric shock as an alternative, like this article [soylentnews.org]. I mean, I should get a diploma because the pain of thinking and that of electric shocks are the same, so. . .
(Score: -1, Offtopic) by Anonymous Coward on Saturday July 05 2014, @07:52PM
I don't think, I just listen to the voices in my head.
(Score: 3, Interesting) by mth on Saturday July 05 2014, @04:35PM
Math does have typing, but mathematicians are lazy and leave types implicit most of the time.
(Score: 2) by kaszz on Saturday July 05 2014, @04:40PM
Can you elaborate on what you mean?
(Score: 3, Interesting) by mth on Saturday July 05 2014, @06:44PM
A variable represents a value from a particular set, a function has a range and a domain. Often that set isn't written down, but it is given by conventions: like the AC below says, n from N, x from R etc.
This was a frustration for me when learning math in first year university: I didn't know which greek letter came from which set and depending on the subbranch of math the same letter would even represent a value from a different set. Also subsets were handled implicitly, so x could come from all of R, from R+ or from [0, 1], but this was hardly ever written down. This didn't confuse just me, but I also saw the professors make mistakes that could have been avoided by making the types explicit: in particular whether 0 is included or excluded can make a big difference.
(Score: 2) by Nerdfest on Saturday July 05 2014, @07:41PM
Convention over configuration. Great concept, but like everything else, mistakes are occasionally made when the conventions are not understood.
(Score: 2) by kaszz on Sunday July 06 2014, @02:13AM
There seems to be a varied opinion among professors in math whether "0" shall be included as a natural number or not.
(Score: 0) by Anonymous Coward on Saturday July 05 2014, @05:27PM
I'd rather say that math has explicit typing:
n in N, x in R
f: RxR -> R
M in R^(mxn)
There's just no syntax and semantics checking as with compilers. A lazy student might omit declaring which variable is part of which set. But formulas that get published usually have very strict type declarations.
(Score: 2) by maxwell demon on Sunday July 06 2014, @06:39AM
Indeed, the fact that every function has a domain is one of the most neglected facts. Given any function f:R->R, you can create infinitely many other functions by just restricting it to a subset of R. And given f(x)=1/x on R\{0} and g(x)=x on R, you get the pointwise product f(x)g(x) = 1 on R\{0}. Evaluating that function at 0 is an error.
That can be directly translated into programming language functions:
Given
clearly calling h with the argument 0 gives an error (division by zero).
The Tao of math: The numbers you can count are not the real numbers.
(Score: 4, Insightful) by c0lo on Saturday July 05 2014, @11:03PM
Lazy? On the contrary my friend, on the contrary. Most of the times math-heads do "template metaprogramming" - they search the minimum set of constrains that need to be imposed for the "variables" they work with for a lemma/theorem/demonstrable property to hold true.
Need examples, you say? Think algebraic structures (group, ring, manifold and all that), topology, functional analysis/operators algebra, set theories, etc.
https://www.youtube.com/watch?v=aoFiw2jMy-0 https://soylentnews.org/~MichaelDavidCrawford
(Score: 2) by maxwell demon on Sunday July 06 2014, @06:51AM
What you describe is not template metaprogramming, but generic programming. Template metaprogramming is a technique. Generic programming is a paradigm. Now generic programs often make use of some template metaprogramming to compensate for lacking direct language support (concepts would have brought that support to C++; with concepts a generic program would rarely if ever use template metaprogramming). But there's no direct connection between generic programming and template metaprogramming, except the fact that some template metaprogramming is currently needed to adequately implement generic programs in C++. Even then, generic programs usually use only the most simple forms of template metaprogramming (mostly, simple type mappings). Another use of template metaprogramming in generic libraries (supporting a variable number of arguments without compromising type safety) already is made obsolete by variadic templates.
The Tao of math: The numbers you can count are not the real numbers.
(Score: 2) by c0lo on Sunday July 06 2014, @11:18PM
I could go and debate a bit with you, but... my apologies, just happens I don't have enough time.
The bit that worth debating: C++ templates is a bit different kind of animal than generics - e.g. C++ templates don't require you to specify "explicit type contracts" (e.g. interfaces). For instance, I can create a template function using a type (generic) which is supposed to:
* declare a special "iterator" inner type,
* have a "iterator()" method that returns an object of the "inner iterator type"
* possible have some attributes/fields.
The above is equivalent with what XML Schema calls "element/attr groups", the lesscss calls "mixins", PHP (5.3+) calls "trait" - it is not a definition of a new type
Now... if, as "template specialization/instantiation", you provide a type which fails any of the requirements, the C++ compiler will cough your source code out - simply because what your method attempt to use does not exist.
This is unlike the "generics" concept, in which you deal with types that do need declaration
Maths example - Ferchet [wikipedia.org] could carry his work even if only later Stepan Banach introduced the new Banach space [wikipedia.org] "type" (i.e. standardized it in the "maths std library")
https://www.youtube.com/watch?v=aoFiw2jMy-0 https://soylentnews.org/~MichaelDavidCrawford
(Score: 2) by maxwell demon on Monday July 07 2014, @07:06PM
I don't know what "generics" you are speaking about (I'm pretty sure nothing in C++ is named that word), but I suspect it has not that much to do with generic programming (a paradigm invented by Stepanov and Lee, of which the C++ STL is the prime example).
The Tao of math: The numbers you can count are not the real numbers.
(Score: 2) by mth on Sunday July 06 2014, @08:21PM
It's a particular kind of laziness: a disinterest in the trivial details of the problem. However, if you make one tiny mistake in those details, the entire thing you constructed breaks down. So in my opinion it's worth spending a little extra time on making those details explicit.
Being explicit is not at odds with being abstract: you can state "let S be a set with associative multiplication" if that is all your theorem requires. Or in terms of programming: you can use templates, but please document what functionality you expect from the types that are passed to the template as arguments. Forcing people to read the entire implementation to deduce those requirements is just sloppy.
(Score: 1) by Uncle_Al on Saturday July 05 2014, @05:39PM
That's funny, I thought it was so I could memorize tables of integrals, since if you didn't have them memorized along with the magic equivalences you couldn't finish the exam in the time given.
And what about literary and social analysis or history (20th century technological history in particular)?
Is that the 'wrong' kind of 'thinking'?
It certainly isn't valued in engineering schools, or by nerds in general.
The closest a nerd gets to philosophy is the "Bruce's Philosophers Song"
(Score: 2) by Nerdfest on Saturday July 05 2014, @07:50PM
Thinking and problem solving is one thing. If they teach that, people will have the ability to apply those problem solving skills using a computer language. Coding is another thing. You need to know computer language concepts (procedural, object oriented, functional, etc), where to use them to best effect, and how to write *maintainable* code. I regularly am contracted to rewrite the code of someone who has 'learned to code' and 'solved' a problem when errors are discovered or changes need to be made. Solving the problem in a way that can be easily maintained is as important as solving the problem itself in many cases. I've frequently said that I'd rather be handed a well written system that doesn't work than a poorly written one that does. It will be an easier problem to solve. Yes, problem solving abilities need to be taught, but that's not the only thing that's required.
(Score: 2) by maxwell demon on Sunday July 06 2014, @07:01AM
Writing maintainable code is a skill you need when you actually write code. If you don't write code, you don't need to know how to write maintainable code. To apply an example from the blog: If you want to fly an airplane, you better know quite well which switch in the cockpit has which function, what procedures to follow when communicating with the tower, and so on. If all you want is to have a general understanding of airplanes, all that doesn't matter. You have to understand the physics that keeps the airplane in the air, have a general idea of air traffic control to understand how it is achieved that planes don't constantly crash into each other, and so on.
The Tao of math: The numbers you can count are not the real numbers.
(Score: 2) by buswolley on Saturday July 05 2014, @04:05PM
I always tells people, if you want to learn how to think rigorously, learn to program. It is a bitch of a teacher, but you'll be trained. Yes you will.
subicular junctures
(Score: 3, Funny) by kaszz on Saturday July 05 2014, @04:34PM
Most important is that you get an immediate response without any fluff lies. "YOUR CODE SUCKS at line #2503 - Greetings from the compiler" ;)
(Score: 2) by maxwell demon on Sunday July 06 2014, @07:08AM
No. A thousand times no. Your compiler will warn you about trivial things like typos and grammar errors. It won't warn you about nonsense code, as long as it follows the formal rules. You may write a "password check" that accepts every password you enter, and the compiler will happily compile it for you. You can write a sorting routine that fails in subtle ways as soon as there are more than a hundred entries, and the compiler will not complain. On the other hand, forget a single semicolon in an otherwise perfect code, and the compiler will refuse to compile.
The compiler error messages are the analogue to the grammar nazi: Extremely picky about the details, but completely agnostic to the actual meaning.
The Tao of math: The numbers you can count are not the real numbers.
(Score: 2) by VLM on Sunday July 06 2014, @12:46PM
"You may write a "password check" that accepts every password you enter, and the compiler will happily compile it for you."
He used the compiler as one example of an immediate response. Your example will also instantaneously and very verbally explode, just at the unit test level instead of the compiler level. Assuming you have and actually use real unit tests.
An example of something you can't detect immediately is data validation where you couldn't put in unit tests because nothing is formally defined or the problem is literally unimaginable until you run into it, like a poisonous brain eating meme. Given a BNF spec for account numbers that everyone else follows, I'd be perfectly OK, but too many times in my programming life I've said things like "You've gotta be shitting me, customer account numbers can have embedded spaces in them and those spaces are significant?" or "You've gotta be shitting me, customer account numbers can have significant leading zeros so 000123 is different than 0123 or 123?" Sadly those are true stories from employers who initially claimed sometimes in writing that account numbers are just 32 bit (positive) integers. Most of the time when a programmer is debugging a problem and leads off with "You've gotta be shitting me..." then that was a problem that inherently couldn't be caught by the compiler or unit tests by literally being unimaginable at that time.
And then the joyous topic of illogical business logic. I love that whole class of bugs. Professionals can design large complicated yet reliable and logical systems. Most large complicated systems are of course not professionally designed, or even designed at all, and thats no problem because the programmers will catch all the blame (LOL).
(Score: 2) by frojack on Saturday July 05 2014, @05:23PM
But it also leaves you with something of a social impairment, because of the learned tendency to over-analyze everything you see or here.
Waitress: If you need more coffee, my name is Sally.
Me: (silently), and who the hell are you if I've got all I need?
TV: In New York, I'm Wolf Blitzer.
Me: Who do you become in Vegas?
No, you are mistaken. I've always had this sig.
(Score: 3, Interesting) by yellowantphil on Saturday July 05 2014, @05:37PM
I was like that already. Perhaps that explains why I became a programmer.
In middle school, someone called me to give me a list of things I needed to bring on a youth group trip. She asked, "Do you have a pencil?" Well, yes... She then gave a list of items, and no matter how soon I said "OK" after each item, she paused for several seconds. Only after I hung up the phone did I realize that she thought I was going to write down the list. I didn't realize that she was asking if I had a pencil in my hand, not merely owning one.
(Score: -1, Troll) by Anonymous Coward on Saturday July 05 2014, @08:02PM
Those aren't examples of you overanalyzing, they're just examples of you being a dick and ignoring or just ignorant of the fact that there are often things left implied in language.
In the first example, here is what the waitress was actually saying: "If you need more coffee, [let me know. By the way,] my name is Sally.
In the second one: [Reporting from here] in New York, I'm Wolf Blitzer.
Do you always restate the person or object about which you're speaking rather than using pronouns, and also constantly speak in the third person? If not, how else can you understand what "he", "you", or "I" mean? So then you must understand implicitness in language, and are simply being an asshole.
(Score: 2) by frojack on Saturday July 05 2014, @09:26PM
AC: Did you really thing it was necessary to state to obvious?
Was there any indication I don't know what was meant?
Which of us was being the dick here?
No, you are mistaken. I've always had this sig.
(Score: 2) by VLM on Sunday July 06 2014, @01:00PM
Humorously your two examples are usable CS / IT educational examples.
The first is passing pointers -n- references. Yo parent process, if you want an output file handle for the coffee file, I have stashed a pointer to one in a variable named Sally. Nothing in life is more cute / funny / tragic than watching a noob's first flailing around with pointers and references.
The second one is an ARP response. In this ethernet segment, I'm MAC access is 00:DE:AD:BE:EF:00 (presumably an ARP response to "who the F is IP address "Wolf Blitzer"?). And yes on another ethernet port most sane systems don't have the same MAC addr on multiple ethernet ports. DECNET did things a bit differently, but that's a long time ago.
(Score: 2) by c0lo on Saturday July 05 2014, @11:15PM
Warning: confusion between learning and training detected.
Yes, programing is training. No the result of learning how to program is not yet education - e.g. critical thinking would be mostly missing: if you can't express something in the programming language of your choice, you aren't even going to think of it, much less to challenge it.
Yes, programing can train you in being thorough, wary about side effects, etc - but that's just a set of skills you use to operate. You need to build something more on top of that to make it learning/thinking (e.g. software engineering and/or and/or architecture and/or analysis etc)
https://www.youtube.com/watch?v=aoFiw2jMy-0 https://soylentnews.org/~MichaelDavidCrawford
(Score: 0) by Anonymous Coward on Monday July 14 2014, @12:30AM
gFfa6i enrnfhwdgced [enrnfhwdgced.com], [url=http://jmllzsdkbswp.com/]jmllzsdkbswp[/url], [link=http://jbzokctdcyda.com/]jbzokctdcyda[/link], http://zlldsflpfntd.com/ [zlldsflpfntd.com]
(Score: -1, Troll) by Anonymous Coward on Saturday July 05 2014, @04:08PM
Did Simon Peyton learn to go the gym? Thoze shoulders are so slumped.
(Score: 1) by digitalaudiorock on Saturday July 05 2014, @04:55PM
I'd agree that coding in and of itself is just learning what a language (as a tool) can do, and that the important part is of course what you do with it.
I'm not sure I'd agree that this necessarily means teaching "computer science". I'd say it more important to teach "software engineering". That is, simply learning how to design code that does the desired job well. While computer science concepts are clearly a part of that, I've worked with people who have computer science degrees who've shown me that the two are NOT synonymous...for example guys who know all the theory etc, and always need to use all of it, even if it means hiding everything behind so many layers of abstraction that nobody else can even figure out how their code works.
Even having said that, it often seem to me that a lot of that comes down to skills that are difficult to teach if they don't tend to come somewhat naturally.
(Score: 3, Insightful) by PinkyGigglebrain on Saturday July 05 2014, @06:47PM
I find it interesting that the people who are saying "Learn to code" made their money by getting someone else to do it for them.
"Beware those who would deny you Knowledge, For in their hearts they dream themselves your Master."
(Score: 1, Interesting) by Anonymous Coward on Saturday July 05 2014, @07:01PM
"people who are saying "Learn to code" made their money by getting someone else to do it for them."
Preferably people who will be paid less. Women, and minorities in particular.
Or this could all just be PR spin to counter all the 'Brogrammer' press lately.
$50 million dollars in grants from Google for this was in the press last week.
Someone there thinks it's important. Would be interesting to find out who and why.
(Score: 1) by jcm on Saturday July 05 2014, @06:57PM
I'm tired with this "everybody must code" motto.
Why not simply try to learn another culture with a different language from yours ?
Developing language and math skills are related to coding skills.
And as a bonus, it will also help you to understand the world as it is right now, and it's not US centric !
We need more open-minded people, not specialists who only focus on their domain of mastery.
Oh that's right, what is important now is to develop social skills, because your network will help you find a job, probably !
(Score: 1) by PizzaRollPlinkett on Saturday July 05 2014, @07:52PM
If people wanted to think, they could learn without coding. We have these things called books, which have knowledge in them. You can read them and think new thoughts, and learn and grow. You can expose yourself to the brightest minds in history, how they thought and approached the world. You could benefit from their experience, leveraging everything they can teach you in a fraction of the time it took them to develop their knowledge. Many of these books are in the public domain, and you can read them cheaply or even freely online. More books are being produced now than ever, which cuts both ways, but we have access to an overwhelming amount of knowledge. Learning to think has never been easier. Yet it doesn't seem to be catching on.
So buy a Dover logic book, today. Start with Patrick Suppes, you can't go wrong with him.
(E-mail me if you want a pizza roll!)
(Score: -1, Offtopic) by Anonymous Coward on Saturday July 05 2014, @08:08PM
Reading is hard. Is there an audiobook version I can get? If not, I'll just wait for the movie.
(Score: 1) by Uncle_Al on Saturday July 05 2014, @08:12PM
"You could benefit from their experience, leveraging everything they can teach you in a fraction of the time it took them to develop their knowledge"
And there were these things called universities, where people who had read the books were that could objectively tell you
what to read based on their experience. You could even learn who knew what there and talk to them based on their fields
of expertise and maybe get to talk to them.
But then, people found out that knowledge was only worth what someone on the outside was interested in paying you
for to know.
If you were really lucky, someone would pay you to think about things that weren't tied directly to you making money for them,
if you were willing to live on a fraction of what the other people got who did.
Things went downhill from there.
(Score: 0) by Anonymous Coward on Saturday July 05 2014, @08:29PM
When I was in the Navy, my Captain always said "If you need a new idea, read an old book."
(Score: 1) by pyg on Monday July 07 2014, @03:16AM
The most important skill I hope to impart to my progeny is how to learn which in many ways is also how to think. Curiosity and skepticism are way too undervalued in conventional education. Mostly the complete opposite is emphasized.
(Score: 0) by Anonymous Coward on Tuesday July 08 2014, @06:29AM
Good point. Sometimes the education system feels like it was designed to produce unthinking automatons.