SlideShare a Scribd company logo
1 of 8
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

Devoxx 15 equals hashcode
Devoxx 15 equals hashcodeDevoxx 15 equals hashcode
Devoxx 15 equals hashcodebleporini
 
[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 SavkovOWASP Russia
 
concurrency with GPars
concurrency with GParsconcurrency with GPars
concurrency with GParsPaul 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 frameworkknight1128
 
#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-forkjoinknight1128
 
Mutation Testing: Testing your tests
Mutation Testing: Testing your testsMutation Testing: Testing your tests
Mutation Testing: Testing your testsStephen Leigh
 
Boostライブラリ一周の旅
Boostライブラリ一周の旅 Boostライブラリ一周の旅
Boostライブラリ一周の旅 Akira Takahashi
 
groovy databases
groovy databasesgroovy databases
groovy databasesPaul King
 
Mark linq queries and operators
Mark   linq queries and operatorsMark   linq queries and operators
Mark linq queries and operatorsLearningTech
 
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
 

What's hot (20)

Devoxx 15 equals hashcode
Devoxx 15 equals hashcodeDevoxx 15 equals hashcode
Devoxx 15 equals hashcode
 
In kor we Trust
In kor we TrustIn kor we Trust
In kor we Trust
 
[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
 
concurrency with GPars
concurrency with GParsconcurrency with GPars
concurrency with GPars
 
GPars (Groovy Parallel Systems)
GPars (Groovy Parallel Systems)GPars (Groovy Parallel Systems)
GPars (Groovy Parallel Systems)
 
Spock
SpockSpock
Spock
 
Jersey framework
Jersey frameworkJersey framework
Jersey framework
 
#5 (Remote Method Invocation)
#5 (Remote Method Invocation)#5 (Remote Method Invocation)
#5 (Remote Method Invocation)
 
Excelsheet
ExcelsheetExcelsheet
Excelsheet
 
5. Ввод-вывод, доступ к файловой системе
5. Ввод-вывод, доступ к файловой системе5. Ввод-вывод, доступ к файловой системе
5. Ввод-вывод, доступ к файловой системе
 
Jdk 7 4-forkjoin
Jdk 7 4-forkjoinJdk 7 4-forkjoin
Jdk 7 4-forkjoin
 
Mutation Testing: Testing your tests
Mutation Testing: Testing your testsMutation Testing: Testing your tests
Mutation Testing: Testing your tests
 
Quebec pdo
Quebec pdoQuebec pdo
Quebec pdo
 
NIO and NIO2
NIO and NIO2NIO and NIO2
NIO and NIO2
 
Boostライブラリ一周の旅
Boostライブラリ一周の旅 Boostライブラリ一周の旅
Boostライブラリ一周の旅
 
groovy databases
groovy databasesgroovy databases
groovy databases
 
Oop lecture9 12
Oop lecture9 12Oop lecture9 12
Oop lecture9 12
 
Ejb3 Dan Hinojosa
Ejb3 Dan HinojosaEjb3 Dan Hinojosa
Ejb3 Dan Hinojosa
 
Mark linq queries and operators
Mark   linq queries and operatorsMark   linq queries and operators
Mark linq queries and operators
 
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...
 

Viewers also liked

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ümleriBGA 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 DiliSerdar Dogruyol
 
Ruby Programlama Dili
Ruby Programlama DiliRuby Programlama Dili
Ruby Programlama Dilipinguar
 
Internet Tabanli EğItim
Internet Tabanli EğItimInternet Tabanli EğItim
Internet Tabanli EğItimselver
 
Yapay Zeka, Deep Learning and Machine Learning
Yapay Zeka, Deep Learning and Machine LearningYapay Zeka, Deep Learning and Machine Learning
Yapay Zeka, Deep Learning and Machine LearningAlper Nebi Kanlı
 
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ğ ProgramlamaOguzhan 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önetimiFatma Ç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ığı SunumuAhmet Gürel
 
Open cv kütüphanesi
Open cv kütüphanesiOpen cv kütüphanesi
Open cv kütüphanesiahmetkakici
 
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İ KULLANARAKRecep 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
 

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ı)
 
Büyük veri(bigdata)
Büyük veri(bigdata)Büyük veri(bigdata)
Büyük veri(bigdata)
 
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
 
Tcpdump ile Trafik Analizi(Sniffing)
Tcpdump ile Trafik Analizi(Sniffing)Tcpdump ile Trafik Analizi(Sniffing)
Tcpdump ile Trafik Analizi(Sniffing)
 
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
 
Ruby Programlama Dili
Ruby Programlama DiliRuby Programlama Dili
Ruby Programlama Dili
 
Internet Tabanli EğItim
Internet Tabanli EğItimInternet Tabanli EğItim
Internet Tabanli EğItim
 
Yapay Zeka, Deep Learning and Machine Learning
Yapay Zeka, Deep Learning and Machine LearningYapay Zeka, Deep Learning and Machine Learning
Yapay Zeka, Deep Learning and Machine Learning
 
10-Kablosuz Ağlardaki Zaafiyetler
10-Kablosuz Ağlardaki Zaafiyetler10-Kablosuz Ağlardaki Zaafiyetler
10-Kablosuz Ağlardaki Zaafiyetler
 
Nmap Kullanım Kitapçığı
Nmap Kullanım KitapçığıNmap Kullanım Kitapçığı
Nmap Kullanım Kitapçığı
 
Python İle Ağ Programlama
Python İle Ağ ProgramlamaPython İle Ağ Programlama
Python İle Ağ Programlama
 
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
 
Holynix v1
Holynix v1Holynix v1
Holynix v1
 
Kara Sistemlerinde Yapay Zeka Uygulamaları
Kara Sistemlerinde Yapay Zeka UygulamalarıKara Sistemlerinde Yapay Zeka Uygulamaları
Kara Sistemlerinde Yapay Zeka Uygulamaları
 
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
 
Yapay Sinir Ağları
Yapay Sinir AğlarıYapay Sinir Ağları
Yapay Sinir Ağları
 
Open cv kütüphanesi
Open cv kütüphanesiOpen cv kütüphanesi
Open cv kütüphanesi
 
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
 
Yapay Sinir Ağları
Yapay Sinir AğlarıYapay Sinir Ağları
Yapay Sinir Ağları
 
HTTPS Ne Kadar Güvenlidir?(sslstrip)
HTTPS Ne Kadar Güvenlidir?(sslstrip)HTTPS Ne Kadar Güvenlidir?(sslstrip)
HTTPS Ne Kadar Güvenlidir?(sslstrip)
 

Similar to Python mu Java mı?

모던자바의 역습
모던자바의 역습모던자바의 역습
모던자바의 역습DoHyun Jung
 
比XML更好用的Java Annotation
比XML更好用的Java Annotation比XML更好用的Java Annotation
比XML更好用的Java Annotationjavatwo2011
 
Use of Apache Commons and Utilities
Use of Apache Commons and UtilitiesUse of Apache Commons and Utilities
Use of Apache Commons and UtilitiesPramod Kumar
 
A topology of memory leaks on the JVM
A topology of memory leaks on the JVMA topology of memory leaks on the JVM
A topology of memory leaks on the JVMRafael Winterhalter
 
Nice to meet Kotlin
Nice to meet KotlinNice to meet Kotlin
Nice to meet KotlinJieyi Wu
 
Exceptions and errors in Java
Exceptions and errors in JavaExceptions and errors in Java
Exceptions and errors in JavaManuela Grindei
 
New Features Of JDK 7
New Features Of JDK 7New Features Of JDK 7
New Features Of JDK 7Deniz Oguz
 
CodeCamp Iasi 10 march 2012 - Practical Groovy
CodeCamp Iasi 10 march 2012 - Practical GroovyCodeCamp Iasi 10 march 2012 - Practical Groovy
CodeCamp Iasi 10 march 2012 - Practical GroovyCodecamp Romania
 
Androidaop 170105090257
Androidaop 170105090257Androidaop 170105090257
Androidaop 170105090257newegg
 
Groovy Introduction - JAX Germany - 2008
Groovy Introduction - JAX Germany - 2008Groovy Introduction - JAX Germany - 2008
Groovy Introduction - JAX Germany - 2008Guillaume Laforge
 
• GUI design using drag and drop feature of IDE(Net beans), • File IO
•	GUI design using drag and drop feature of IDE(Net beans), •	File IO•	GUI design using drag and drop feature of IDE(Net beans), •	File IO
• GUI design using drag and drop feature of IDE(Net beans), • File IOSyedShahroseSohail
 

Similar to Python mu Java mı? (20)

모던자바의 역습
모던자바의 역습모던자바의 역습
모던자바의 역습
 
Coding Ajax
Coding AjaxCoding Ajax
Coding Ajax
 
比XML更好用的Java Annotation
比XML更好用的Java Annotation比XML更好用的Java Annotation
比XML更好用的Java Annotation
 
Use of Apache Commons and Utilities
Use of Apache Commons and UtilitiesUse of Apache Commons and Utilities
Use of Apache Commons and Utilities
 
Coding Ajax
Coding AjaxCoding Ajax
Coding Ajax
 
Java 7 & 8 New Features
Java 7 & 8 New FeaturesJava 7 & 8 New Features
Java 7 & 8 New Features
 
Junit and testNG
Junit and testNGJunit and testNG
Junit and testNG
 
A topology of memory leaks on the JVM
A topology of memory leaks on the JVMA topology of memory leaks on the JVM
A topology of memory leaks on the JVM
 
Basic of Javaio
Basic of JavaioBasic of Javaio
Basic of Javaio
 
Nice to meet Kotlin
Nice to meet KotlinNice to meet Kotlin
Nice to meet Kotlin
 
Project Coin
Project CoinProject Coin
Project Coin
 
Exceptions and errors in Java
Exceptions and errors in JavaExceptions and errors in Java
Exceptions and errors in Java
 
Spring
SpringSpring
Spring
 
New Features Of JDK 7
New Features Of JDK 7New Features Of JDK 7
New Features Of JDK 7
 
Java 7
Java 7Java 7
Java 7
 
CodeCamp Iasi 10 march 2012 - Practical Groovy
CodeCamp Iasi 10 march 2012 - Practical GroovyCodeCamp Iasi 10 march 2012 - Practical Groovy
CodeCamp Iasi 10 march 2012 - Practical Groovy
 
Androidaop 170105090257
Androidaop 170105090257Androidaop 170105090257
Androidaop 170105090257
 
55j7
55j755j7
55j7
 
Groovy Introduction - JAX Germany - 2008
Groovy Introduction - JAX Germany - 2008Groovy Introduction - JAX Germany - 2008
Groovy Introduction - JAX Germany - 2008
 
• GUI design using drag and drop feature of IDE(Net beans), • File IO
•	GUI design using drag and drop feature of IDE(Net beans), •	File IO•	GUI design using drag and drop feature of IDE(Net beans), •	File IO
• GUI design using drag and drop feature of IDE(Net beans), • File IO
 

Recently uploaded

Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piececharlottematthew16
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfRankYa
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 

Recently uploaded (20)

Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piece
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdf
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 

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