6. History
"I wanted a scripting language that was more
powerful than Perl, and more object-oriented
than Python. That's why I decided to design my
own language."
- Matsumoto
7. History
"Often people, especially computer engineers, focus on
the machines. They think, "By doing this, the machine
will run faster. By doing this, the machine will run more
effectively. By doing this, the machine will something
something something." They are focusing on machines.
But in fact we need to focus on humans, on how humans
care about doing programming or operating the
application of the machines. We are the masters. They
are the slaves."
- Matsumoto
8. History
for (int i = 0 ; i < 3 ; i++){
System.out.println(“Hallo World”);
}
3.times{
print “Hallo World”
}
9. History
Language developed by Open Standards
Promotion Center of the InformationTechnology Promotion Agency
2011: Japanese Industrial Standard (JIS X
3017)
2012: International standard (ISO/IEC 30170)
25. Java Language
More language features don’t make a language
better. Just more complicated and more difficult
to learn.
Without monster tools like Eclipse it is nearly not
possible to use the language.
26. Can you write down the Java code to open this
file and output the content?
!
- Without IDE
- Without Google
text_file.txt
27. Java
import java.io.*;
!
class FileRead {
public static void main(String args[]) {
try{
FileInputStream fstream = new FileInputStream("text_file.txt");
DataInputStream in = new DataInputStream(fstream);
BufferedReader br = new BufferedReader(new InputStreamReader(in));
String strLine;
while ((strLine = br.readLine()) != null) {
System.out.println (strLine);
}
in.close();
} catch (Exception e) {
System.err.println("Error: " + e.getMessage());
}
}
}
32. Java
Ruby
package xyz;
!
import xyz;
!
public class User {
!
public void sayHello(){
System.out.println(“Hello”);
}
!
class User
!
def say_hello
p “Hello”
end
!
}
end
User user = new User()
user.sayHello()
user = User.new
user.say_hello
33. Java
Ruby
package xyz;
!
import xyz;
!
class User
!
def say_hello
p “Hello”
end
public class User {
!
public void sayHello(){
System.out.println(“Hello”);
}
!
private
!
!
private String secretHero(){
return “secret hero”;
}
!
}
def secret_hero
“secret hero”
end
!
end
38. Ruby
def greetz(name = “Rob”, say_name = true)
p "Hello #{name}" if say_name
p “Hello” unless say_name
end
user.greetz(“Bob”, false)
user. greetz(“Bob”)
user. greetz()
39. Java
List<String> list = new ArrayList<String>();
!
list.add("Spiderman");
list.add("Batman");
list.add("Hulk");
!
for (String name : list){
System.out.println(name);
}
49. Bundler - Gemfile
source 'https:/
/rubygems.org'
!
gem 'rails', '3.2.6'
gem 'sqlite3'
gem 'jquery-rails'
!
# Gems used only for assets and not required
# in production environments by default.
group :assets do
gem 'sass-rails', '~> 3.2.3'
gem 'coffee-rails', '~> 3.2.1'
gem 'uglifier', '>= 1.0.3'
end