SlideShare a Scribd company logo
Python mu Java mı?
VS
© Ahmet Erkan ÇELİK Haziran 2012
JAVA TEMİZDİR!
 Örneğin şöyle bir JAVA sınıfını
public class Employee
{
private String myEmployeeName;
private int myTaxDeductions = 1;
private String myMaritalStatus = "single";
//--------- constructor #1 -------------
public Employee(String EmployeName)
{
this(employeeName, 1);
}
//--------- constructor #2 -------------
public Employee(String EmployeName, int taxDeductions)
{
this(employeeName, taxDeductions, "single");
}
//--------- constructor #3 -------------
public Employee(String EmployeName,
int taxDeductions,
String maritalStatus)
{
this.employeeName = employeeName;
this.taxDeductions = taxDeductions;
this.maritalStatus = maritalStatus;
}
}© Ahmet Erkan ÇELİK Haziran 2012
PYTHON DAHA TEMİZDİR
 Python ile yazacak olursak
class Employee():
def __init__(self,
employeeName
, taxDeductions=1
, maritalStatus="single"
):
self.employeeName = employeeName
self.taxDeductions = taxDeductions
self.maritalStatus = maritalStatus
© Ahmet Erkan ÇELİK Haziran 2012
JAVA Hızlıdır
 projecteuler.net problemlerinden 22. soru:
Using names.txt (right click and 'Save Link/Target As...'), a 46K text file containing
over five-thousand first names, begin by sorting it into alphabetical order. Then
working out the alphabetical value for each name, multiply this value by its
alphabetical position in the list to obtain a name score.
For example, when the list is sorted into alphabetical order, COLIN, which is worth 3
+ 15 + 12 + 9 + 14 = 53, is the 938th name in the list. So, COLIN would obtain a
score of 938 53 = 49714.
What is the total of all the name scores in the file?
© Ahmet Erkan ÇELİK Haziran 2012
JAVA Hızlıdır!
Java ile çözümü
import java.util.Arrays;
import java.lang.StringBuilder;
import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;
public class euler22
{
public static String readFileAsString(String path) throws IOException
{
StringBuilder builder = new StringBuilder();
BufferedReader reader = new BufferedReader(
new FileReader(path));
String buffer = null;
while((buffer = reader.readLine()) != null)
{
builder.append(buffer);
}
reader.close();
return builder.toString();
}
public static void main(String[] args) throws IOException
{
String[] names = fileAsString("names.txt").replace(""", "").split(",");
int total = 0;
Arrays.sort(names);
for(int i = 0; i < names.length; ++i)
{
int sum = 0;
for(char c : names[i].toCharArray())
{
sum += c - 'A' + 1;
}
total += (i + 1) * sum;
}
System.out.println(total);
}
}
Kod çalışma süresi : ~0.3s
© Ahmet Erkan ÇELİK Haziran 2012
Python Daha hızlıdır!
Python ile çözümü
def main():
names = open("names.txt", "r").read().replace(""", "").split(",")
names.sort()
print sum((i + 1) * sum(ord(c) - ord('A') + 1 for c in n) for i, n in enumerate(names))
if __name__ == "__main__":
main()
Kod çalışma süresi : ~0.05s
© Ahmet Erkan ÇELİK Haziran 2012
Framework Çözümleri
Python Frameworkleri Java Frameworkleri
• Tornado
• Django
• Grok
• Pylons
• TurboGears
• Web2Py
• Zope
• CubicWeb
• Enamel
• GAE Framework
• Gizmo (QP)
• Glashammer
• Karrigell
• Kiss.py
• Nagare
• …
• Tapestry
• Cocoon
• MyFaces
• Spring
• Google Web Toolkit
• Turbine
• Makumba
• Stripes
• JPublish
• JOSSO
• wings
• Strecks
• AribaWeb
• Playframework
• Anvil
• …© Ahmet Erkan ÇELİK Haziran 2012
Kaynaklar
 http://pythonconquerstheuniverse.wordpress.com
/2009/10/03/python-java-a-side-by-side-
comparison/
 http://codereview.stackexchange.com/questions/1
0997/python-vs-java-runtime-on-euler-22
 http://wiki.python.org/moin/WebFrameworks
 http://java-source.net/open-source/web-
frameworks
© Ahmet Erkan ÇELİK Haziran 2012

More Related Content

What's hot (20)

Devoxx 15 equals hashcode
Devoxx 15 equals hashcodeDevoxx 15 equals hashcode
Devoxx 15 equals hashcode
bleporini
 
In kor we Trust
In kor we TrustIn kor we Trust
In kor we Trust
Saúl Díaz González
 
[3.3] Detection & exploitation of Xpath/Xquery Injections - Boris Savkov
[3.3] Detection & exploitation of Xpath/Xquery Injections - Boris Savkov[3.3] Detection & exploitation of Xpath/Xquery Injections - Boris Savkov
[3.3] Detection & exploitation of Xpath/Xquery Injections - Boris Savkov
OWASP Russia
 
concurrency with GPars
concurrency with GParsconcurrency with GPars
concurrency with GPars
Paul King
 
GPars (Groovy Parallel Systems)
GPars (Groovy Parallel Systems)GPars (Groovy Parallel Systems)
GPars (Groovy Parallel Systems)
Gagan Agrawal
 
Spock
SpockSpock
Spock
Evgeny Borisov
 
Jersey framework
Jersey frameworkJersey framework
Jersey framework
knight1128
 
#5 (Remote Method Invocation)
#5 (Remote Method Invocation)#5 (Remote Method Invocation)
#5 (Remote Method Invocation)
Ghadeer AlHasan
 
Excelsheet
ExcelsheetExcelsheet
Excelsheet
amarnathprasad
 
5. Ввод-вывод, доступ к файловой системе
5. Ввод-вывод, доступ к файловой системе5. Ввод-вывод, доступ к файловой системе
5. Ввод-вывод, доступ к файловой системе
DEVTYPE
 
Jdk 7 4-forkjoin
Jdk 7 4-forkjoinJdk 7 4-forkjoin
Jdk 7 4-forkjoin
knight1128
 
Mutation Testing: Testing your tests
Mutation Testing: Testing your testsMutation Testing: Testing your tests
Mutation Testing: Testing your tests
Stephen Leigh
 
Quebec pdo
Quebec pdoQuebec pdo
Quebec pdo
Rengga Aditya
 
NIO and NIO2
NIO and NIO2NIO and NIO2
NIO and NIO2
Balamurugan Soundararajan
 
Boostライブラリ一周の旅
Boostライブラリ一周の旅 Boostライブラリ一周の旅
Boostライブラリ一周の旅
Akira Takahashi
 
groovy databases
groovy databasesgroovy databases
groovy databases
Paul King
 
Oop lecture9 12
Oop lecture9 12Oop lecture9 12
Oop lecture9 12
Shahriar Robbani
 
Ejb3 Dan Hinojosa
Ejb3 Dan HinojosaEjb3 Dan Hinojosa
Ejb3 Dan Hinojosa
Dan Hinojosa
 
Mark linq queries and operators
Mark   linq queries and operatorsMark   linq queries and operators
Mark linq queries and operators
LearningTech
 
Industrial Strength Groovy - Tools for the Professional Groovy Developer: Pau...
Industrial Strength Groovy - Tools for the Professional Groovy Developer: Pau...Industrial Strength Groovy - Tools for the Professional Groovy Developer: Pau...
Industrial Strength Groovy - Tools for the Professional Groovy Developer: Pau...
Paul King
 
Devoxx 15 equals hashcode
Devoxx 15 equals hashcodeDevoxx 15 equals hashcode
Devoxx 15 equals hashcode
bleporini
 
[3.3] Detection & exploitation of Xpath/Xquery Injections - Boris Savkov
[3.3] Detection & exploitation of Xpath/Xquery Injections - Boris Savkov[3.3] Detection & exploitation of Xpath/Xquery Injections - Boris Savkov
[3.3] Detection & exploitation of Xpath/Xquery Injections - Boris Savkov
OWASP Russia
 
concurrency with GPars
concurrency with GParsconcurrency with GPars
concurrency with GPars
Paul King
 
GPars (Groovy Parallel Systems)
GPars (Groovy Parallel Systems)GPars (Groovy Parallel Systems)
GPars (Groovy Parallel Systems)
Gagan Agrawal
 
Jersey framework
Jersey frameworkJersey framework
Jersey framework
knight1128
 
#5 (Remote Method Invocation)
#5 (Remote Method Invocation)#5 (Remote Method Invocation)
#5 (Remote Method Invocation)
Ghadeer AlHasan
 
5. Ввод-вывод, доступ к файловой системе
5. Ввод-вывод, доступ к файловой системе5. Ввод-вывод, доступ к файловой системе
5. Ввод-вывод, доступ к файловой системе
DEVTYPE
 
Jdk 7 4-forkjoin
Jdk 7 4-forkjoinJdk 7 4-forkjoin
Jdk 7 4-forkjoin
knight1128
 
Mutation Testing: Testing your tests
Mutation Testing: Testing your testsMutation Testing: Testing your tests
Mutation Testing: Testing your tests
Stephen Leigh
 
Boostライブラリ一周の旅
Boostライブラリ一周の旅 Boostライブラリ一周の旅
Boostライブラリ一周の旅
Akira Takahashi
 
groovy databases
groovy databasesgroovy databases
groovy databases
Paul King
 
Mark linq queries and operators
Mark   linq queries and operatorsMark   linq queries and operators
Mark linq queries and operators
LearningTech
 
Industrial Strength Groovy - Tools for the Professional Groovy Developer: Pau...
Industrial Strength Groovy - Tools for the Professional Groovy Developer: Pau...Industrial Strength Groovy - Tools for the Professional Groovy Developer: Pau...
Industrial Strength Groovy - Tools for the Professional Groovy Developer: Pau...
Paul King
 

Viewers also liked (20)

Man in the Middle Atack (Ortadaki Adam Saldırısı)
Man in the Middle Atack (Ortadaki Adam Saldırısı)Man in the Middle Atack (Ortadaki Adam Saldırısı)
Man in the Middle Atack (Ortadaki Adam Saldırısı)
Ahmet Gürel
 
Büyük veri(bigdata)
Büyük veri(bigdata)Büyük veri(bigdata)
Büyük veri(bigdata)
Hülya Soylu
 
BGA CTF Ethical Hacking Yarışması Çözümleri
BGA CTF Ethical Hacking Yarışması ÇözümleriBGA CTF Ethical Hacking Yarışması Çözümleri
BGA CTF Ethical Hacking Yarışması Çözümleri
BGA Cyber Security
 
Tcpdump ile Trafik Analizi(Sniffing)
Tcpdump ile Trafik Analizi(Sniffing)Tcpdump ile Trafik Analizi(Sniffing)
Tcpdump ile Trafik Analizi(Sniffing)
BGA Cyber Security
 
Ruby - Dünyanın En Güzel Programlama Dili
Ruby - Dünyanın En Güzel Programlama DiliRuby - Dünyanın En Güzel Programlama Dili
Ruby - Dünyanın En Güzel Programlama Dili
Serdar Dogruyol
 
Ruby Programlama Dili
Ruby Programlama DiliRuby Programlama Dili
Ruby Programlama Dili
pinguar
 
Internet Tabanli EğItim
Internet Tabanli EğItimInternet Tabanli EğItim
Internet Tabanli EğItim
selver
 
10-Kablosuz Ağlardaki Zaafiyetler
10-Kablosuz Ağlardaki Zaafiyetler10-Kablosuz Ağlardaki Zaafiyetler
10-Kablosuz Ağlardaki Zaafiyetler
Önay Kıvılcım
 
Python İle Ağ Programlama
Python İle Ağ ProgramlamaPython İle Ağ Programlama
Python İle Ağ Programlama
Oguzhan Coskun
 
Büyük Veri ve Risk Yönetimi
Büyük Veri ve Risk YönetimiBüyük Veri ve Risk Yönetimi
Büyük Veri ve Risk Yönetimi
Fatma ÇINAR
 
Kara Sistemlerinde Yapay Zeka Uygulamaları
Kara Sistemlerinde Yapay Zeka UygulamalarıKara Sistemlerinde Yapay Zeka Uygulamaları
Kara Sistemlerinde Yapay Zeka Uygulamaları
Ferhat Kurt
 
Liselere Yazılım ve Siber Güvenlik Farkındalığı Sunumu
Liselere Yazılım ve Siber Güvenlik Farkındalığı SunumuLiselere Yazılım ve Siber Güvenlik Farkındalığı Sunumu
Liselere Yazılım ve Siber Güvenlik Farkındalığı Sunumu
Ahmet Gürel
 
Yapay Sinir Ağları
Yapay Sinir AğlarıYapay Sinir Ağları
Yapay Sinir Ağları
Abdulkerim Fettahoğlu
 
Open cv kütüphanesi
Open cv kütüphanesiOpen cv kütüphanesi
Open cv kütüphanesi
ahmetkakici
 
YÜZ BULMA VE TANIMA SİSTEMLERİ KULLANARAK
YÜZ BULMA VE TANIMA SİSTEMLERİ KULLANARAKYÜZ BULMA VE TANIMA SİSTEMLERİ KULLANARAK
YÜZ BULMA VE TANIMA SİSTEMLERİ KULLANARAK
Recep Holat
 
HTTPS Ne Kadar Güvenlidir?(sslstrip)
HTTPS Ne Kadar Güvenlidir?(sslstrip)HTTPS Ne Kadar Güvenlidir?(sslstrip)
HTTPS Ne Kadar Güvenlidir?(sslstrip)
BGA Cyber Security
 
YAPAY ZEKÂ VE DUYGUSAL ZEKÂ KULLANIM FARKLILIKLARININ İNCELENMESİ: TEKNOLOJİK...
YAPAY ZEKÂ VE DUYGUSAL ZEKÂ KULLANIM FARKLILIKLARININ İNCELENMESİ: TEKNOLOJİK...YAPAY ZEKÂ VE DUYGUSAL ZEKÂ KULLANIM FARKLILIKLARININ İNCELENMESİ: TEKNOLOJİK...
YAPAY ZEKÂ VE DUYGUSAL ZEKÂ KULLANIM FARKLILIKLARININ İNCELENMESİ: TEKNOLOJİK...
SELENGCN
 
Man in the Middle Atack (Ortadaki Adam Saldırısı)
Man in the Middle Atack (Ortadaki Adam Saldırısı)Man in the Middle Atack (Ortadaki Adam Saldırısı)
Man in the Middle Atack (Ortadaki Adam Saldırısı)
Ahmet Gürel
 
Büyük veri(bigdata)
Büyük veri(bigdata)Büyük veri(bigdata)
Büyük veri(bigdata)
Hülya Soylu
 
BGA CTF Ethical Hacking Yarışması Çözümleri
BGA CTF Ethical Hacking Yarışması ÇözümleriBGA CTF Ethical Hacking Yarışması Çözümleri
BGA CTF Ethical Hacking Yarışması Çözümleri
BGA Cyber Security
 
Tcpdump ile Trafik Analizi(Sniffing)
Tcpdump ile Trafik Analizi(Sniffing)Tcpdump ile Trafik Analizi(Sniffing)
Tcpdump ile Trafik Analizi(Sniffing)
BGA Cyber Security
 
Ruby - Dünyanın En Güzel Programlama Dili
Ruby - Dünyanın En Güzel Programlama DiliRuby - Dünyanın En Güzel Programlama Dili
Ruby - Dünyanın En Güzel Programlama Dili
Serdar Dogruyol
 
Ruby Programlama Dili
Ruby Programlama DiliRuby Programlama Dili
Ruby Programlama Dili
pinguar
 
Internet Tabanli EğItim
Internet Tabanli EğItimInternet Tabanli EğItim
Internet Tabanli EğItim
selver
 
10-Kablosuz Ağlardaki Zaafiyetler
10-Kablosuz Ağlardaki Zaafiyetler10-Kablosuz Ağlardaki Zaafiyetler
10-Kablosuz Ağlardaki Zaafiyetler
Önay Kıvılcım
 
Python İle Ağ Programlama
Python İle Ağ ProgramlamaPython İle Ağ Programlama
Python İle Ağ Programlama
Oguzhan Coskun
 
Büyük Veri ve Risk Yönetimi
Büyük Veri ve Risk YönetimiBüyük Veri ve Risk Yönetimi
Büyük Veri ve Risk Yönetimi
Fatma ÇINAR
 
Kara Sistemlerinde Yapay Zeka Uygulamaları
Kara Sistemlerinde Yapay Zeka UygulamalarıKara Sistemlerinde Yapay Zeka Uygulamaları
Kara Sistemlerinde Yapay Zeka Uygulamaları
Ferhat Kurt
 
Liselere Yazılım ve Siber Güvenlik Farkındalığı Sunumu
Liselere Yazılım ve Siber Güvenlik Farkındalığı SunumuLiselere Yazılım ve Siber Güvenlik Farkındalığı Sunumu
Liselere Yazılım ve Siber Güvenlik Farkındalığı Sunumu
Ahmet Gürel
 
Open cv kütüphanesi
Open cv kütüphanesiOpen cv kütüphanesi
Open cv kütüphanesi
ahmetkakici
 
YÜZ BULMA VE TANIMA SİSTEMLERİ KULLANARAK
YÜZ BULMA VE TANIMA SİSTEMLERİ KULLANARAKYÜZ BULMA VE TANIMA SİSTEMLERİ KULLANARAK
YÜZ BULMA VE TANIMA SİSTEMLERİ KULLANARAK
Recep Holat
 
HTTPS Ne Kadar Güvenlidir?(sslstrip)
HTTPS Ne Kadar Güvenlidir?(sslstrip)HTTPS Ne Kadar Güvenlidir?(sslstrip)
HTTPS Ne Kadar Güvenlidir?(sslstrip)
BGA Cyber Security
 
YAPAY ZEKÂ VE DUYGUSAL ZEKÂ KULLANIM FARKLILIKLARININ İNCELENMESİ: TEKNOLOJİK...
YAPAY ZEKÂ VE DUYGUSAL ZEKÂ KULLANIM FARKLILIKLARININ İNCELENMESİ: TEKNOLOJİK...YAPAY ZEKÂ VE DUYGUSAL ZEKÂ KULLANIM FARKLILIKLARININ İNCELENMESİ: TEKNOLOJİK...
YAPAY ZEKÂ VE DUYGUSAL ZEKÂ KULLANIM FARKLILIKLARININ İNCELENMESİ: TEKNOLOJİK...
SELENGCN
 
Ad

Recently uploaded (20)

“State-space Models vs. Transformers for Ultra-low-power Edge AI,” a Presenta...
“State-space Models vs. Transformers for Ultra-low-power Edge AI,” a Presenta...“State-space Models vs. Transformers for Ultra-low-power Edge AI,” a Presenta...
“State-space Models vs. Transformers for Ultra-low-power Edge AI,” a Presenta...
Edge AI and Vision Alliance
 
cnc-drilling-dowel-inserting-machine-drillteq-d-510-english.pdf
cnc-drilling-dowel-inserting-machine-drillteq-d-510-english.pdfcnc-drilling-dowel-inserting-machine-drillteq-d-510-english.pdf
cnc-drilling-dowel-inserting-machine-drillteq-d-510-english.pdf
AmirStern2
 
National Fuels Treatments Initiative: Building a Seamless Map of Hazardous Fu...
National Fuels Treatments Initiative: Building a Seamless Map of Hazardous Fu...National Fuels Treatments Initiative: Building a Seamless Map of Hazardous Fu...
National Fuels Treatments Initiative: Building a Seamless Map of Hazardous Fu...
Safe Software
 
Trends Artificial Intelligence - Mary Meeker
Trends Artificial Intelligence - Mary MeekerTrends Artificial Intelligence - Mary Meeker
Trends Artificial Intelligence - Mary Meeker
Clive Dickens
 
Enabling BIM / GIS integrations with Other Systems with FME
Enabling BIM / GIS integrations with Other Systems with FMEEnabling BIM / GIS integrations with Other Systems with FME
Enabling BIM / GIS integrations with Other Systems with FME
Safe Software
 
Creating an Accessible Future-How AI-powered Accessibility Testing is Shaping...
Creating an Accessible Future-How AI-powered Accessibility Testing is Shaping...Creating an Accessible Future-How AI-powered Accessibility Testing is Shaping...
Creating an Accessible Future-How AI-powered Accessibility Testing is Shaping...
Impelsys Inc.
 
Introduction to Typescript - GDG On Campus EUE
Introduction to Typescript - GDG On Campus EUEIntroduction to Typescript - GDG On Campus EUE
Introduction to Typescript - GDG On Campus EUE
Google Developer Group On Campus European Universities in Egypt
 
Azure vs AWS Which Cloud Platform Is Best for Your Business in 2025
Azure vs AWS  Which Cloud Platform Is Best for Your Business in 2025Azure vs AWS  Which Cloud Platform Is Best for Your Business in 2025
Azure vs AWS Which Cloud Platform Is Best for Your Business in 2025
Infrassist Technologies Pvt. Ltd.
 
Oracle Cloud Infrastructure Generative AI Professional
Oracle Cloud Infrastructure Generative AI ProfessionalOracle Cloud Infrastructure Generative AI Professional
Oracle Cloud Infrastructure Generative AI Professional
VICTOR MAESTRE RAMIREZ
 
Murdledescargadarkweb.pdfvolumen1 100 elementary
Murdledescargadarkweb.pdfvolumen1 100 elementaryMurdledescargadarkweb.pdfvolumen1 100 elementary
Murdledescargadarkweb.pdfvolumen1 100 elementary
JorgeSemperteguiMont
 
Oracle Cloud and AI Specialization Program
Oracle Cloud and AI Specialization ProgramOracle Cloud and AI Specialization Program
Oracle Cloud and AI Specialization Program
VICTOR MAESTRE RAMIREZ
 
Introduction to Internet of things .ppt.
Introduction to Internet of things .ppt.Introduction to Internet of things .ppt.
Introduction to Internet of things .ppt.
hok12341073
 
Domino IQ – What to Expect, First Steps and Use Cases
Domino IQ – What to Expect, First Steps and Use CasesDomino IQ – What to Expect, First Steps and Use Cases
Domino IQ – What to Expect, First Steps and Use Cases
panagenda
 
Boosting MySQL with Vector Search -THE VECTOR SEARCH CONFERENCE 2025 .pdf
Boosting MySQL with Vector Search -THE VECTOR SEARCH CONFERENCE 2025 .pdfBoosting MySQL with Vector Search -THE VECTOR SEARCH CONFERENCE 2025 .pdf
Boosting MySQL with Vector Search -THE VECTOR SEARCH CONFERENCE 2025 .pdf
Alkin Tezuysal
 
Secure Access with Azure Active Directory
Secure Access with Azure Active DirectorySecure Access with Azure Active Directory
Secure Access with Azure Active Directory
VICTOR MAESTRE RAMIREZ
 
Crypto Super 500 - 14th Report - June2025.pdf
Crypto Super 500 - 14th Report - June2025.pdfCrypto Super 500 - 14th Report - June2025.pdf
Crypto Super 500 - 14th Report - June2025.pdf
Stephen Perrenod
 
How Advanced Environmental Detection Is Revolutionizing Oil & Gas Safety.pdf
How Advanced Environmental Detection Is Revolutionizing Oil & Gas Safety.pdfHow Advanced Environmental Detection Is Revolutionizing Oil & Gas Safety.pdf
How Advanced Environmental Detection Is Revolutionizing Oil & Gas Safety.pdf
Rejig Digital
 
The State of Web3 Industry- Industry Report
The State of Web3 Industry- Industry ReportThe State of Web3 Industry- Industry Report
The State of Web3 Industry- Industry Report
Liveplex
 
Can We Use Rust to Develop Extensions for PostgreSQL? (POSETTE: An Event for ...
Can We Use Rust to Develop Extensions for PostgreSQL? (POSETTE: An Event for ...Can We Use Rust to Develop Extensions for PostgreSQL? (POSETTE: An Event for ...
Can We Use Rust to Develop Extensions for PostgreSQL? (POSETTE: An Event for ...
NTT DATA Technology & Innovation
 
Down the Rabbit Hole – Solving 5 Training Roadblocks
Down the Rabbit Hole – Solving 5 Training RoadblocksDown the Rabbit Hole – Solving 5 Training Roadblocks
Down the Rabbit Hole – Solving 5 Training Roadblocks
Rustici Software
 
“State-space Models vs. Transformers for Ultra-low-power Edge AI,” a Presenta...
“State-space Models vs. Transformers for Ultra-low-power Edge AI,” a Presenta...“State-space Models vs. Transformers for Ultra-low-power Edge AI,” a Presenta...
“State-space Models vs. Transformers for Ultra-low-power Edge AI,” a Presenta...
Edge AI and Vision Alliance
 
cnc-drilling-dowel-inserting-machine-drillteq-d-510-english.pdf
cnc-drilling-dowel-inserting-machine-drillteq-d-510-english.pdfcnc-drilling-dowel-inserting-machine-drillteq-d-510-english.pdf
cnc-drilling-dowel-inserting-machine-drillteq-d-510-english.pdf
AmirStern2
 
National Fuels Treatments Initiative: Building a Seamless Map of Hazardous Fu...
National Fuels Treatments Initiative: Building a Seamless Map of Hazardous Fu...National Fuels Treatments Initiative: Building a Seamless Map of Hazardous Fu...
National Fuels Treatments Initiative: Building a Seamless Map of Hazardous Fu...
Safe Software
 
Trends Artificial Intelligence - Mary Meeker
Trends Artificial Intelligence - Mary MeekerTrends Artificial Intelligence - Mary Meeker
Trends Artificial Intelligence - Mary Meeker
Clive Dickens
 
Enabling BIM / GIS integrations with Other Systems with FME
Enabling BIM / GIS integrations with Other Systems with FMEEnabling BIM / GIS integrations with Other Systems with FME
Enabling BIM / GIS integrations with Other Systems with FME
Safe Software
 
Creating an Accessible Future-How AI-powered Accessibility Testing is Shaping...
Creating an Accessible Future-How AI-powered Accessibility Testing is Shaping...Creating an Accessible Future-How AI-powered Accessibility Testing is Shaping...
Creating an Accessible Future-How AI-powered Accessibility Testing is Shaping...
Impelsys Inc.
 
Azure vs AWS Which Cloud Platform Is Best for Your Business in 2025
Azure vs AWS  Which Cloud Platform Is Best for Your Business in 2025Azure vs AWS  Which Cloud Platform Is Best for Your Business in 2025
Azure vs AWS Which Cloud Platform Is Best for Your Business in 2025
Infrassist Technologies Pvt. Ltd.
 
Oracle Cloud Infrastructure Generative AI Professional
Oracle Cloud Infrastructure Generative AI ProfessionalOracle Cloud Infrastructure Generative AI Professional
Oracle Cloud Infrastructure Generative AI Professional
VICTOR MAESTRE RAMIREZ
 
Murdledescargadarkweb.pdfvolumen1 100 elementary
Murdledescargadarkweb.pdfvolumen1 100 elementaryMurdledescargadarkweb.pdfvolumen1 100 elementary
Murdledescargadarkweb.pdfvolumen1 100 elementary
JorgeSemperteguiMont
 
Oracle Cloud and AI Specialization Program
Oracle Cloud and AI Specialization ProgramOracle Cloud and AI Specialization Program
Oracle Cloud and AI Specialization Program
VICTOR MAESTRE RAMIREZ
 
Introduction to Internet of things .ppt.
Introduction to Internet of things .ppt.Introduction to Internet of things .ppt.
Introduction to Internet of things .ppt.
hok12341073
 
Domino IQ – What to Expect, First Steps and Use Cases
Domino IQ – What to Expect, First Steps and Use CasesDomino IQ – What to Expect, First Steps and Use Cases
Domino IQ – What to Expect, First Steps and Use Cases
panagenda
 
Boosting MySQL with Vector Search -THE VECTOR SEARCH CONFERENCE 2025 .pdf
Boosting MySQL with Vector Search -THE VECTOR SEARCH CONFERENCE 2025 .pdfBoosting MySQL with Vector Search -THE VECTOR SEARCH CONFERENCE 2025 .pdf
Boosting MySQL with Vector Search -THE VECTOR SEARCH CONFERENCE 2025 .pdf
Alkin Tezuysal
 
Secure Access with Azure Active Directory
Secure Access with Azure Active DirectorySecure Access with Azure Active Directory
Secure Access with Azure Active Directory
VICTOR MAESTRE RAMIREZ
 
Crypto Super 500 - 14th Report - June2025.pdf
Crypto Super 500 - 14th Report - June2025.pdfCrypto Super 500 - 14th Report - June2025.pdf
Crypto Super 500 - 14th Report - June2025.pdf
Stephen Perrenod
 
How Advanced Environmental Detection Is Revolutionizing Oil & Gas Safety.pdf
How Advanced Environmental Detection Is Revolutionizing Oil & Gas Safety.pdfHow Advanced Environmental Detection Is Revolutionizing Oil & Gas Safety.pdf
How Advanced Environmental Detection Is Revolutionizing Oil & Gas Safety.pdf
Rejig Digital
 
The State of Web3 Industry- Industry Report
The State of Web3 Industry- Industry ReportThe State of Web3 Industry- Industry Report
The State of Web3 Industry- Industry Report
Liveplex
 
Can We Use Rust to Develop Extensions for PostgreSQL? (POSETTE: An Event for ...
Can We Use Rust to Develop Extensions for PostgreSQL? (POSETTE: An Event for ...Can We Use Rust to Develop Extensions for PostgreSQL? (POSETTE: An Event for ...
Can We Use Rust to Develop Extensions for PostgreSQL? (POSETTE: An Event for ...
NTT DATA Technology & Innovation
 
Down the Rabbit Hole – Solving 5 Training Roadblocks
Down the Rabbit Hole – Solving 5 Training RoadblocksDown the Rabbit Hole – Solving 5 Training Roadblocks
Down the Rabbit Hole – Solving 5 Training Roadblocks
Rustici Software
 
Ad

Python mu Java mı?

  • 1. Python mu Java mı? VS © Ahmet Erkan ÇELİK Haziran 2012
  • 2. JAVA TEMİZDİR!  Örneğin şöyle bir JAVA sınıfını public class Employee { private String myEmployeeName; private int myTaxDeductions = 1; private String myMaritalStatus = "single"; //--------- constructor #1 ------------- public Employee(String EmployeName) { this(employeeName, 1); } //--------- constructor #2 ------------- public Employee(String EmployeName, int taxDeductions) { this(employeeName, taxDeductions, "single"); } //--------- constructor #3 ------------- public Employee(String EmployeName, int taxDeductions, String maritalStatus) { this.employeeName = employeeName; this.taxDeductions = taxDeductions; this.maritalStatus = maritalStatus; } }© Ahmet Erkan ÇELİK Haziran 2012
  • 3. PYTHON DAHA TEMİZDİR  Python ile yazacak olursak class Employee(): def __init__(self, employeeName , taxDeductions=1 , maritalStatus="single" ): self.employeeName = employeeName self.taxDeductions = taxDeductions self.maritalStatus = maritalStatus © Ahmet Erkan ÇELİK Haziran 2012
  • 4. JAVA Hızlıdır  projecteuler.net problemlerinden 22. soru: Using names.txt (right click and 'Save Link/Target As...'), a 46K text file containing over five-thousand first names, begin by sorting it into alphabetical order. Then working out the alphabetical value for each name, multiply this value by its alphabetical position in the list to obtain a name score. For example, when the list is sorted into alphabetical order, COLIN, which is worth 3 + 15 + 12 + 9 + 14 = 53, is the 938th name in the list. So, COLIN would obtain a score of 938 53 = 49714. What is the total of all the name scores in the file? © Ahmet Erkan ÇELİK Haziran 2012
  • 5. JAVA Hızlıdır! Java ile çözümü import java.util.Arrays; import java.lang.StringBuilder; import java.io.BufferedReader; import java.io.FileReader; import java.io.IOException; public class euler22 { public static String readFileAsString(String path) throws IOException { StringBuilder builder = new StringBuilder(); BufferedReader reader = new BufferedReader( new FileReader(path)); String buffer = null; while((buffer = reader.readLine()) != null) { builder.append(buffer); } reader.close(); return builder.toString(); } public static void main(String[] args) throws IOException { String[] names = fileAsString("names.txt").replace(""", "").split(","); int total = 0; Arrays.sort(names); for(int i = 0; i < names.length; ++i) { int sum = 0; for(char c : names[i].toCharArray()) { sum += c - 'A' + 1; } total += (i + 1) * sum; } System.out.println(total); } } Kod çalışma süresi : ~0.3s © Ahmet Erkan ÇELİK Haziran 2012
  • 6. Python Daha hızlıdır! Python ile çözümü def main(): names = open("names.txt", "r").read().replace(""", "").split(",") names.sort() print sum((i + 1) * sum(ord(c) - ord('A') + 1 for c in n) for i, n in enumerate(names)) if __name__ == "__main__": main() Kod çalışma süresi : ~0.05s © Ahmet Erkan ÇELİK Haziran 2012
  • 7. Framework Çözümleri Python Frameworkleri Java Frameworkleri • Tornado • Django • Grok • Pylons • TurboGears • Web2Py • Zope • CubicWeb • Enamel • GAE Framework • Gizmo (QP) • Glashammer • Karrigell • Kiss.py • Nagare • … • Tapestry • Cocoon • MyFaces • Spring • Google Web Toolkit • Turbine • Makumba • Stripes • JPublish • JOSSO • wings • Strecks • AribaWeb • Playframework • Anvil • …© Ahmet Erkan ÇELİK Haziran 2012
  • 8. Kaynaklar  http://pythonconquerstheuniverse.wordpress.com /2009/10/03/python-java-a-side-by-side- comparison/  http://codereview.stackexchange.com/questions/1 0997/python-vs-java-runtime-on-euler-22  http://wiki.python.org/moin/WebFrameworks  http://java-source.net/open-source/web- frameworks © Ahmet Erkan ÇELİK Haziran 2012