Syntax - Why so CareMad?
Upcoming SlideShare
Loading in...5
×
 

Like this? Share it with your network

Share

Syntax - Why so CareMad?

on

  • 649 views

Syntax tends to get people unusually upset in the programming world. Heck, virtually any introductory talk on Erlang (Haskell, Clojure, whatever) invariably contains a self-deprecatory quote about the ...

Syntax tends to get people unusually upset in the programming world. Heck, virtually any introductory talk on Erlang (Haskell, Clojure, whatever) invariably contains a self-deprecatory quote about the syntax. The thing people forget is that this isn't new. Syntax has been upsetting hominids since the first australopithecus said "Urghk" instead of "Oook" - getting thumped for its pains - and has continued to the present day (Look up "French is better than" on The Googles)

In this talk, I will explore the similarities between spoken and programming languages, with particular emphasis on the process of learning them, as well as the almost reflexive hatred of this process in most cultures. You'll learn to appreciate the role of syntax in languages, how it can help - or hinder! - your understanding of the semantics, and most importantly, how to appreciate syntax as an element of the language that is valuable in its own right.

Statistics

Views

Total Views
649
Views on SlideShare
511
Embed Views
138

Actions

Likes
0
Downloads
1
Comments
0

23 Embeds 138

http://dieswaytoofast.blogspot.com 61
http://dieswaytoofast.blogspot.co.uk 17
http://dieswaytoofast.blogspot.de 10
http://dieswaytoofast.blogspot.ca 8
http://dieswaytoofast.blogspot.in 7
http://dieswaytoofast.blogspot.se 6
http://dieswaytoofast.blogspot.com.ar 4
http://dieswaytoofast.blogspot.ru 4
http://dieswaytoofast.blogspot.fr 3
http://feedly.com 2
http://dieswaytoofast.blogspot.cz 2
http://dieswaytoofast.blogspot.hu 2
http://dieswaytoofast.blogspot.ro 2
http://dieswaytoofast.blogspot.co.at 1
http://dieswaytoofast.blogspot.pt 1
http://dieswaytoofast.blogspot.dk 1
http://www.linkedin.com 1
http://dieswaytoofast.blogspot.hk 1
http://dieswaytoofast.blogspot.mx 1
http://dieswaytoofast.blogspot.com.es 1
http://dieswaytoofast.blogspot.fi 1
http://dieswaytoofast.blogspot.nl 1
http://dieswaytoofast.blogspot.co.il 1
More...

Accessibility

Categories

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

CC Attribution License

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment
  • But this is a better way of saying it
  • I’m going to bounce between spoken and programming languages a lot
  • This means “sour” (kinda)
  • Lemons are sour
  • This means tiger
  • You don’t want to find a tiger in the fridge.It’ll be unhappy. Besides, why are your lemons in the fridge anyhow?
  • But they are both written the same
  • And pronounced the same too!
  • How do you say this in english? “hot”? “spicy hot”? Huh?
  • How do you say this in english? “hot”? “spicy hot”? Huh?
  • What does this even mean in english? Shyness? Really?Its actually contextual
  • Think of programming languages.Whats a Monad in VB?
  • Whats a Goto in Haskell?(ok wiseguy – you can do it. But you can also put a tiger in your fridge)
  • But, what *is* language? And how do you categorize it?
  • There is an astonishing number of ways in which languages are categorized“”
  • hierarchy of formal grammars – type 2 grammar (proglang) type 3 (RE)
  • Gets even better
  • Yet another classification of languages(intentionally dense)
  • And, of course, programming languages are the same
  • Ok, that’s complex, and somewhat unhlefulHow about structures in grammar?.Left branching vs Right Branching
  • Left branching? Green Car Right branching? Machina Verde Indian Languages (and Japanese) are Left Italian/Spanish is almost always Right English is screwed up
  • For programming,functiinal vs. imperative
  • You’d like to believe that languages are pure, but they are not
  • The point is, how you classify languages is itself very debatableAnd doesn’t help
  • Either way though, languages exist, and are spoken by billions of people
  • Sometimes by people by speak more than one language
  • Its easy when you have stuff in multiple languages
  • But what if you’re learning a new language? Or not good?You don’t park here.
  • You don’t scratch your head and leave
  • You don’t go ‘huh’?
  • This is especially true for kids!
  • And we suck in the US.Unless you’re from somewhere else. E.g., you’re Indian like me 
  • Multilingual people learn other languages easier
  • People who code in multiple languages usually know more than one language
  • People who code in only one language usually speak only one language
  • You learn languagersdifferently
  • The lack of preconceptions makes it easier to learn very different languages
  • The lack of preconceptions makes it easier to learn very different languages
  • While the similarities make it easier to learn related languagesOR NOT LEARN IT! (just ‘cos letters doesn’t mean it is english)
  • This is pretty easy to understand if you know java. Or whateverEven numbers in VB
  • Excel gets goofy thoughEven numbers in Excel
  • But going to functional languages, life gets complex, Even numbers in F#
  • But if you already know F# (or Haskell)But neither is *better*
  • Natural Languages are awesome at error correction
  • While the similarities make it easier to learn related languages
  • Programming languages, not so much.
  • Natural languages evolve at a ridiculous pace Verbing is accelerating
  • Telephone-u, bus-u
  • Even programming languages
  • Java version 1 2 ...6, 7
  • Especially scripting languages (because they tend to be more pragmatic)Larry Wall was a linguist Perl as English?
  • But, you still insist that it matters
  • Or maybe that it doesn’t matter
  • Its just a language – it doesn’t even have to make sense!C-u-t, b-u-t, p-u-t
  • There are two parties to a conversation – you, and everyone listeningBoth need to understand
  • Whether its you and another person
  • Whether its you and an audience
  • Whether its you and a computer.In all cases, everyone needs to understand
  • What if you’re counterparty is a node.js developer?You have to be aware of your audience!
  • But you’re smart! You claim that you always use the right tool for the job! You’re agnostic!
  • Like the coyote. And you know how that ended
  • Seriously!!!!
  • Are you going to pass this on to someone else? An “HTML Programmer”?
  • Are you going to pass this on to someone else? An “HTML Programmer”?
  • Are you going to pass this on to someone else? An “HTML Programmer”?
  • Just think of all this as if you are speaking.
  • There is no *correct*
  • There is no *incorrect*
  • “I am that I am”The point is COMMUNICATION
  • The point is COMMUNICATION

Syntax - Why so CareMad? Presentation Transcript

  • 1. V 1.0 © Ubiquiti Networks, Inc. All Rights Reserved Syntax – Why so Caremad? Syntax Matters Mahesh Paolini-Subramanya (@dieswaytoofast) V.P. R&D, Ubiquiti Networks
  • 2. Syntax – Why so Caremad? Syntax Doesn’t Matter V 1.0 © Ubiquiti Networks, Inc. All Rights Reserved
  • 3. Syntax – Why so Caremad? Syntax Doesn’t Matter V 1.0 © Ubiquiti Networks, Inc. All Rights Reserved Except when it does
  • 4. Syntax – Why so Caremad? Syntax Doesn’t Matter V 1.0 © Ubiquiti Networks, Inc. All Rights Reserved Except when it does But that isn’t the point
  • 5. V 1.0 © Ubiquiti Networks, Inc. All Rights Reserved Syntax – Why so Caremad? (huli)
  • 6. lemon • (huli)
  • 7. V 1.0 © Ubiquiti Networks, Inc. All Rights Reserved Syntax – Why so Caremad? (huli)
  • 8. V 1.0 © Ubiquiti Networks, Inc. All Rights Reserved Syntax – Why so Caremad? vs (huli vs huli)
  • 9. V 1.0 © Ubiquiti Networks, Inc. All Rights Reserved Syntax – Why so Caremad? vs (huli vs huli)
  • 10. V 1.0 © Ubiquiti Networks, Inc. All Rights Reserved Syntax – Why so Caremad? (khara)
  • 11. chili •( )
  • 12. V 1.0 © Ubiquiti Networks, Inc. All Rights Reserved Syntax – Why so Caremad? (sankocha)
  • 13. Syntax – Why so Caremad? Monad V 1.0 © Ubiquiti Networks, Inc. All Rights Reserved
  • 14. V 1.0 © Ubiquiti Networks, Inc. All Rights Reserved Syntax – Why so Caremad? GOTO
  • 15. Syntax – Why so Caremad? It’s the Language stupid! V 1.0 © Ubiquiti Networks, Inc. All Rights Reserved
  • 16. V 1.0 © Ubiquiti Networks, Inc. All Rights Reserved Syntax – Why so Caremad? Classifications
  • 17. Syntax – Why so Caremad? Chomsky-Schützenberger V 1.0 © Ubiquiti Networks, Inc. All Rights Reserved
  • 18. V 1.0 © Ubiquiti Networks, Inc. All Rights Reserved Syntax – Why so Caremad? Structures
  • 19. Syntax – Why so Caremad? Multilingual People V 1.0 © Ubiquiti Networks, Inc. All Rights Reserved
  • 20. Syntax – Why so Caremad? Unscientific Studies Rock! V 1.0 © Ubiquiti Networks, Inc. All Rights Reserved
  • 21. Syntax – Why so Caremad? Unscientific Studies Rock! • 60% correlation between polyglots V 1.0 © Ubiquiti Networks, Inc. All Rights Reserved Source: Wholly unscientific research by me.
  • 22. Syntax – Why so Caremad? Unscientific Studies Rock! • 60% correlation between polyglots • 80% correlation between monolinguals V 1.0 © Ubiquiti Networks, Inc. All Rights Reserved Source: Wholly unscientific research by me.
  • 23. Syntax – Why so Caremad? Language Differences V 1.0 © Ubiquiti Networks, Inc. All Rights Reserved
  • 24. Syntax – Why so Caremad? vs andare V 1.0 © Ubiquiti Networks, Inc. All Rights Reserved
  • 25. V 1.0 © Ubiquiti Networks, Inc. All Rights Reserved Syntax – Why so Caremad? http://langexplr.blogspot.co.uk/2011/03/quick-look-at-apl.html
  • 26. Syntax – Why so Caremad? aller vs andare V 1.0 © Ubiquiti Networks, Inc. All Rights Reserved
  • 27. Syntax – Why so Caremad? If i Mod 2 = 0 Then MsgBox(“Even”) Else MsgBox(“Odd”) End If V 1.0 © Ubiquiti Networks, Inc. All Rights Reserved
  • 28. Syntax – Why so Caremad? =IF(MOD(A1,2)=0,1,2) V 1.0 © Ubiquiti Networks, Inc. All Rights Reserved
  • 29. Syntax – Why so Caremad? {for i in l when i % 2 = 0 -> i} V 1.0 © Ubiquiti Networks, Inc. All Rights Reserved
  • 30. Syntax – Why so Caremad? [I || I <- L, (I rem 2) == 0]. V 1.0 © Ubiquiti Networks, Inc. All Rights Reserved
  • 31. V 1.0 © Ubiquiti Networks, Inc. All Rights Reserved Syntax – Why so Caremad? Error Correction
  • 32. Syntax – Why so Caremad? It deson’t mttaer in waht oredr the ltteers in a wrod aepapr, the olny ipromatnt tihng is taht the frist and lsat ltteer are in the rghit pcale. V 1.0 © Ubiquiti Networks, Inc. All Rights Reserved From http://www.livescience.com/18392-reading-jumbled-words.html
  • 33. V 1.0 © Ubiquiti Networks, Inc. All Rights Reserved Syntax – Why so Caremad? Hello Compiler!
  • 34. Syntax – Why so Caremad? Errors lead to Evolution V 1.0 © Ubiquiti Networks, Inc. All Rights Reserved
  • 35. Syntax – Why so Caremad? All Languages Evolve V 1.0 © Ubiquiti Networks, Inc. All Rights Reserved
  • 36. Syntax – Why so Caremad? Syntax Matters V 1.0 © Ubiquiti Networks, Inc. All Rights Reserved
  • 37. Syntax – Why so Caremad? Syntax Doesn’t Matter V 1.0 © Ubiquiti Networks, Inc. All Rights Reserved
  • 38. Syntax – Why so Caremad? It’s a Language stupid! V 1.0 © Ubiquiti Networks, Inc. All Rights Reserved
  • 39. Syntax – Why so Caremad? Two parties to every conversation V 1.0 © Ubiquiti Networks, Inc. All Rights Reserved
  • 40. Syntax – Why so Caremad? Right tool for the job! V 1.0 © Ubiquiti Networks, Inc. All Rights Reserved
  • 41. Syntax – Why so Caremad? What is the Job? V 1.0 © Ubiquiti Networks, Inc. All Rights Reserved
  • 42. Syntax – Why so Caremad? Syntax • Who are you talking to? V 1.0 © Ubiquiti Networks, Inc. All Rights Reserved
  • 43. Syntax – Why so Caremad? Syntax • Who are you talking to? • How necessary is it? V 1.0 © Ubiquiti Networks, Inc. All Rights Reserved
  • 44. Syntax – Why so Caremad? Syntax • Who are you talking to? • How necessary is it? • How quickly do you need it? V 1.0 © Ubiquiti Networks, Inc. All Rights Reserved
  • 45. Syntax – Why so Caremad? Syntax Doesn’t Matter This is SO not the point V 1.0 © Ubiquiti Networks, Inc. All Rights Reserved
  • 46. Syntax – Why so Caremad? Syntax Isn’t RIGHT V 1.0 © Ubiquiti Networks, Inc. All Rights Reserved
  • 47. Syntax – Why so Caremad? Syntax Isn’t WRONG V 1.0 © Ubiquiti Networks, Inc. All Rights Reserved
  • 48. Syntax – Why so Caremad? Syntax Just IS V 1.0 © Ubiquiti Networks, Inc. All Rights Reserved
  • 49. Syntax – Why so Caremad? Syntax Just Is V 1.0 © Ubiquiti Networks, Inc. All Rights Reserved Mahesh Paolini-Subramanya (@dieswaytoofast) V.P. R&D, Ubiquiti Networks