Global Lehigh Strategic Initiatives (without descriptions)
Which Programming Language is Best
1. Which PL is the best one?
Ricardo Terra
rterrabh [at] gmail.com
Ricardo Terra (rterrabh [at] gmail.com) Which PL is the best one? September, 2016 1 / 29
2. CV
Nome: Ricardo Terra
Email: rterrabh [at] gmail.com
www: ricardoterra.com.br
Twitter: rterrabh
Lattes: lattes.cnpq.br/ 0162081093970868
Ph.D. (UFMG/UWaterloo),
Post-Ph.D. (INRIA/Université Lille 1)
Background
Education: UFLA (since 2014), UFSJ (1 year), FUMEC (3 years), UNIPAC (1 year), FAMINAS (3 years)
Work Experience: DBA Eng. (1 year), Synos (2 years), Stefanini (1 year)
Ricardo Terra (rterrabh [at] gmail.com) Which PL is the best one? September, 2016 2 / 29
3. Metaphor
Which car is the best one?
Ricardo Terra (rterrabh [at] gmail.com) Which PL is the best one? September, 2016 3 / 29
4. Metaphor
Which car is the best one?
Ricardo Terra (rterrabh [at] gmail.com) Which PL is the best one? September, 2016 3 / 29
5. Metaphor
Which car is the best one?
Ricardo Terra (rterrabh [at] gmail.com) Which PL is the best one? September, 2016 3 / 29
6. Metaphor
Which religion is the best one?
Ricardo Terra (rterrabh [at] gmail.com) Which PL is the best one? September, 2016 4 / 29
7. Metaphor
Which religion is the best one?
Ricardo Terra (rterrabh [at] gmail.com) Which PL is the best one? September, 2016 4 / 29
8. Metaphor
Which religion is the best one?
Ricardo Terra (rterrabh [at] gmail.com) Which PL is the best one? September, 2016 4 / 29
9. Now
Which PL is the best one?
Ricardo Terra (rterrabh [at] gmail.com) Which PL is the best one? September, 2016 5 / 29
10. Now
Which PL is the best one?
It’s a very trick question!
Ricardo Terra (rterrabh [at] gmail.com) Which PL is the best one? September, 2016 5 / 29
11. Now
Which PL is the best one?
It’s a very trick question!
It’s a very dangerous question!
Ricardo Terra (rterrabh [at] gmail.com) Which PL is the best one? September, 2016 5 / 29
12. Now
Which PL is the best one?
It’s a very trick question!
It’s a very dangerous question!
It’s a very complicated question!
Ricardo Terra (rterrabh [at] gmail.com) Which PL is the best one? September, 2016 5 / 29
13. Now
Which PL is the best one?
It’s a very trick question!
It’s a very dangerous question!
It’s a very complicated question!
It’s a f###### trick, dangerous, and complicated question!
Ricardo Terra (rterrabh [at] gmail.com) Which PL is the best one? September, 2016 5 / 29
14. Now
Which PL is the best one?
It’s a very trick question!
It’s a very dangerous question!
It’s a very complicated question!
It’s a f###### trick, dangerous, and complicated question!
However, I have the answer! And the question now is:
Are you all ready for the answer?
Ricardo Terra (rterrabh [at] gmail.com) Which PL is the best one? September, 2016 5 / 29
15. Answer
Raul Seixas (Hokari, Raquel, and Ben Hur)
Play
Ricardo Terra (rterrabh [at] gmail.com) Which PL is the best one? September, 2016 6 / 29
17. Unfortunately, C is not the answer!
Unfortunately, C is not the answer!
Ricardo Terra (rterrabh [at] gmail.com) Which PL is the best one? September, 2016 8 / 29
18. Unfortunately, C is not the answer!
Unfortunately, C is not the answer!
I have the right answer! And, again, the right question is:
Are you all—indeed—ready for the answer?
Ricardo Terra (rterrabh [at] gmail.com) Which PL is the best one? September, 2016 8 / 29
20. Answer
I’m just kidding!!! lolololololo...
Ricardo Terra (rterrabh [at] gmail.com) Which PL is the best one? September, 2016 9 / 29
21. Answer
I’m just kidding!!! lolololololo...
Definitely, it’s not!
“The compiler won’t let you shoot yourself in the foot!”
Ricardo Terra (rterrabh [at] gmail.com) Which PL is the best one? September, 2016 9 / 29
22. Now serious
Now serious, which PL is the best one?
There isn’t!!!
or
It depends!!!
or
The question is wrong.
(João Vitor Lacerda Guimaraes)
Ricardo Terra (rterrabh [at] gmail.com) Which PL is the best one? September, 2016 10 / 29
23. Now serious
Now serious, which PL is the best one?
There isn’t!!!
or
It depends!!!
or
The question is wrong.
(João Vitor Lacerda Guimaraes)
And you think: What the hell are we doing here?
Ricardo Terra (rterrabh [at] gmail.com) Which PL is the best one? September, 2016 10 / 29
24. Now serious
Now serious, which PL is the best one?
There isn’t!!!
or
It depends!!!
or
The question is wrong.
(João Vitor Lacerda Guimaraes)
And you think: What the hell are we doing here?
We all are looking for the most appropriate PL!
Ricardo Terra (rterrabh [at] gmail.com) Which PL is the best one? September, 2016 10 / 29
25. Top 20 PL
Source: TIOBE, 2016.
Ricardo Terra (rterrabh [at] gmail.com) Which PL is the best one? September, 2016 11 / 29
26. Top 20 PL
Source: TIOBE, 2016.
Ricardo Terra (rterrabh [at] gmail.com) Which PL is the best one? September, 2016 11 / 29
27. IHMO
IHMO
The choice of the PL is not everything
Sometimes the problem may be on the developers as well:
Performance (e.g., algorithm)
Scalability (e.g., queries)
Readability (e.g., can’t we write understandable JS code?)
However, characteristics don’t lie:
Costs (e.g., IDEs)
Paradigm (e.g., procedural, OO, etc.)
Portability (e.g., win apps)
Ricardo Terra (rterrabh [at] gmail.com) Which PL is the best one? September, 2016 12 / 29
28. POG
POG
1st POG: Leap year by Pope (1,582 A.D.)
Ricardo Terra (rterrabh [at] gmail.com) Which PL is the best one? September, 2016 13 / 29
29. POG
POG
1st POG: Leap year by Pope (1,582 A.D.)
1,582: Oct/4 (Thursday) → Oct/15 (Friday)
Ricardo Terra (rterrabh [at] gmail.com) Which PL is the best one? September, 2016 13 / 29
30. POG
POG
1st POG: Leap year by Pope (1,582 A.D.)
1,582: Oct/4 (Thursday) → Oct/15 (Friday)
Principles:
“It works, then it’s correct!”
Ricardo Terra (rterrabh [at] gmail.com) Which PL is the best one? September, 2016 13 / 29
31. POG
POG
1st POG: Leap year by Pope (1,582 A.D.)
1,582: Oct/4 (Thursday) → Oct/15 (Friday)
Principles:
“It works, then it’s correct!”
“My Way!”
Ricardo Terra (rterrabh [at] gmail.com) Which PL is the best one? September, 2016 13 / 29
32. POG
POG
1st POG: Leap year by Pope (1,582 A.D.)
1,582: Oct/4 (Thursday) → Oct/15 (Friday)
Principles:
“It works, then it’s correct!”
“My Way!”
“Only beginners comment code!”
Ricardo Terra (rterrabh [at] gmail.com) Which PL is the best one? September, 2016 13 / 29
33. POG
POG
1st POG: Leap year by Pope (1,582 A.D.)
1,582: Oct/4 (Thursday) → Oct/15 (Friday)
Principles:
“It works, then it’s correct!”
“My Way!”
“Only beginners comment code!”
“Faith in God!”
Ricardo Terra (rterrabh [at] gmail.com) Which PL is the best one? September, 2016 13 / 29
34. POG
POG
1st POG: Leap year by Pope (1,582 A.D.)
1,582: Oct/4 (Thursday) → Oct/15 (Friday)
Principles:
“It works, then it’s correct!”
“My Way!”
“Only beginners comment code!”
“Faith in God!”
There are people proud of it! (source: desciclopedia.ws/wiki/POG)
Ricardo Terra (rterrabh [at] gmail.com) Which PL is the best one? September, 2016 13 / 29
35. Refactoring
Refactoring (Martin Fowler and Joshua Kerievsky)
Extremely used in Agile Methodologies (e.g., XP)
What is Refactoring?
Process of changing the code without modifying its external
behavior
Why?
To improve the design and understanding of the code
But why?
By continuously improving the design of code, we make it
easier and easier to work with
Ricardo Terra (rterrabh [at] gmail.com) Which PL is the best one? September, 2016 14 / 29
38. Developers: Suffering
Hug a Developer Today!
Play
Ricardo Terra (rterrabh [at] gmail.com) Which PL is the best one? September, 2016 17 / 29
39. PLs
Let’s take into consideration some popular PLs:
C / C++ (2nd
/3rd
)
Java (1st
)
C# and (Visual) Basic (4th
/9th
)
Objective-C (14rd
)
PHP (7th
)
Ruby (12th
)
Ricardo Terra (rterrabh [at] gmail.com) Which PL is the best one? September, 2016 18 / 29
40. C
C
Almost half-century of existence (1969)
Used by virtually all Operating Systems (and Windows)
UNIX (Recoded to C in 1973)
“You shoot yourself in the foot.” (programmers to programmers)
Why? Low-level
Pointers, DMA, etc.
It’s not portable! It’s true, but not 100% true
F###### fast! (this is why games are developed on it!)
“If you do something easily in C, probably it’s wrong.” (me)
PS: C++ is a superset of C (OO joke: Why don’t C++ talk to C?)
Ricardo Terra (rterrabh [at] gmail.com) Which PL is the best one? September, 2016 19 / 29
41. Java
Java
Very popular (huge community, several frameworks...)
Free (on the other hand...)
IDEs and compilers
Massively used
All Android Apps
Corporate systems
Problems solved? (do you consider it good?)
Automatic memory management and no pointers anymore
It’s portable!
Fast! (Improved a lot in the last 5 years, e.g., JIT)
Ricardo Terra (rterrabh [at] gmail.com) Which PL is the best one? September, 2016 20 / 29
42. C# and (Visual) Basic
C# and (Visual) Basic – .Net Platform
Great IDE
Definitely not cheap! (point to others)
High productivity (~8h/fp, in contrast to 11h/fp in Java)
Only runs in Windows [bad bad thing, but it might not be a problem (e.g., mono, wine)]
Good performance, scalability!
How to double the productivity of a .Net programmer? (joke)
Ricardo Terra (rterrabh [at] gmail.com) Which PL is the best one? September, 2016 21 / 29
43. Objective-C
Objective-C
Smalltalk-style messaging added to C
It was the main language used by Apple (OS X and iOS)
And about Swift? (“Objective-C without the C”)
All iPhone Apps (C or C++, as well)
Relevant features:
Weak and dynamic typing (people usually like, why?)
GC (the use is up to you!)
Generic Objective-C (no cocoa) → supported by GCC
Ricardo Terra (rterrabh [at] gmail.com) Which PL is the best one? September, 2016 22 / 29
44. PHP
PHP
Everything free!!! (IDE, Compiler, Server, perhaps even developers...)
Popular (huge community, default for web hosting...)
Wiki, Joomla, WordPress, Facebook...
High productivity (such an easy language)
Weak and dynamic typing
People criticize performance and scalability
Facebook (the most accessed website ever)
How to double the number of PHP programmers? (joke)
Ricardo Terra (rterrabh [at] gmail.com) Which PL is the best one? September, 2016 23 / 29
45. JS
“==” ou “===”?
Ricardo Terra (rterrabh [at] gmail.com) Which PL is the best one? September, 2016 24 / 29
46. Ruby
Ruby
Ruby versus Rails! (do u know the difference?)
Popular after Rails (why?)
Inspired by Perl and Python (scripting languages)
“I wanted a scripting language that was more powerful than
Perl, and more object-oriented than Python.” (Matz)
Very complete and up-to-date!
OO, functional, imperative...
GC, closures, lambda, dynamic typing (but strong)...
Major frustration: Twitter (Ruby on Rails → Scala)
Ricardo Terra (rterrabh [at] gmail.com) Which PL is the best one? September, 2016 25 / 29
47. Some of my insights
Some of my insights
1 I don’t want to pay for resources → get out .Net platform
Ricardo Terra (rterrabh [at] gmail.com) Which PL is the best one? September, 2016 26 / 29
48. Some of my insights
Some of my insights
1 I don’t want to pay for resources → get out .Net platform
2 I want to develop mobile apps → Java, Swift
Ricardo Terra (rterrabh [at] gmail.com) Which PL is the best one? September, 2016 26 / 29
49. Some of my insights
Some of my insights
1 I don’t want to pay for resources → get out .Net platform
2 I want to develop mobile apps → Java, Swift
3 I’m agile → Ruby, PHP, Python...
Ricardo Terra (rterrabh [at] gmail.com) Which PL is the best one? September, 2016 26 / 29
50. Some of my insights
Some of my insights
1 I don’t want to pay for resources → get out .Net platform
2 I want to develop mobile apps → Java, Swift
3 I’m agile → Ruby, PHP, Python...
4 I want to develop games → C
Ricardo Terra (rterrabh [at] gmail.com) Which PL is the best one? September, 2016 26 / 29
51. Some of my insights
Some of my insights
1 I don’t want to pay for resources → get out .Net platform
2 I want to develop mobile apps → Java, Swift
3 I’m agile → Ruby, PHP, Python...
4 I want to develop games → C
5 I love OO → .Net platform, Java, C++
Ricardo Terra (rterrabh [at] gmail.com) Which PL is the best one? September, 2016 26 / 29
52. Some of my insights
Some of my insights
1 I don’t want to pay for resources → get out .Net platform
2 I want to develop mobile apps → Java, Swift
3 I’m agile → Ruby, PHP, Python...
4 I want to develop games → C
5 I love OO → .Net platform, Java, C++
6 I’m in doubt about PHP or Ruby →
Ricardo Terra (rterrabh [at] gmail.com) Which PL is the best one? September, 2016 26 / 29
53. Some of my insights
Some of my insights
1 I don’t want to pay for resources → get out .Net platform
2 I want to develop mobile apps → Java, Swift
3 I’m agile → Ruby, PHP, Python...
4 I want to develop games → C
5 I love OO → .Net platform, Java, C++
6 I’m in doubt about PHP or Ruby → fear right now....
Ricardo Terra (rterrabh [at] gmail.com) Which PL is the best one? September, 2016 26 / 29
54. Some of my insights
Some of my insights
1 I don’t want to pay for resources → get out .Net platform
2 I want to develop mobile apps → Java, Swift
3 I’m agile → Ruby, PHP, Python...
4 I want to develop games → C
5 I love OO → .Net platform, Java, C++
6 I’m in doubt about PHP or Ruby → fear right now.... Ruby (IMHO)
Ricardo Terra (rterrabh [at] gmail.com) Which PL is the best one? September, 2016 26 / 29
55. Some of my insights
Some of my insights
1 I don’t want to pay for resources → get out .Net platform
2 I want to develop mobile apps → Java, Swift
3 I’m agile → Ruby, PHP, Python...
4 I want to develop games → C
5 I love OO → .Net platform, Java, C++
6 I’m in doubt about PHP or Ruby → fear right now.... Ruby (IMHO)
7 I’m going to develop a huge system → Java, .Net platform
Ricardo Terra (rterrabh [at] gmail.com) Which PL is the best one? September, 2016 26 / 29
56. Some of my insights
Some of my insights
1 I don’t want to pay for resources → get out .Net platform
2 I want to develop mobile apps → Java, Swift
3 I’m agile → Ruby, PHP, Python...
4 I want to develop games → C
5 I love OO → .Net platform, Java, C++
6 I’m in doubt about PHP or Ruby → fear right now.... Ruby (IMHO)
7 I’m going to develop a huge system → Java, .Net platform
8 I want to be rich → forget about PHP
Ricardo Terra (rterrabh [at] gmail.com) Which PL is the best one? September, 2016 26 / 29
57. Wrap-up
“If there wasn’t C, we’d be programming in Obol, Pasal...”
(did u get it?)
Ricardo Terra (rterrabh [at] gmail.com) Which PL is the best one? September, 2016 27 / 29
58. Wrap-up
“If there wasn’t C, we’d be programming in Obol, Pasal...”
(did u get it?)
“Any fool can write code that a computer can understand.
Good programmers write code that humans can understand.”
(Martin Fowler)
Ricardo Terra (rterrabh [at] gmail.com) Which PL is the best one? September, 2016 27 / 29
59. Wrap-up
“If there wasn’t C, we’d be programming in Obol, Pasal...”
(did u get it?)
“Any fool can write code that a computer can understand.
Good programmers write code that humans can understand.”
(Martin Fowler)
“Good programmers write good code,
no matter the PL they use.”
(me)
Ricardo Terra (rterrabh [at] gmail.com) Which PL is the best one? September, 2016 27 / 29
60. Wrap-up
“If there wasn’t C, we’d be programming in Obol, Pasal...”
(did u get it?)
“Any fool can write code that a computer can understand.
Good programmers write code that humans can understand.”
(Martin Fowler)
“Good programmers write good code,
no matter the PL they use.”
(me)
Please don’t hate (or kill) me.
(me)
Ricardo Terra (rterrabh [at] gmail.com) Which PL is the best one? September, 2016 27 / 29