Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Python for Java developers
Search
Javier Honduvilla Coto
November 24, 2014
Programming
0
81
Python for Java developers
Javier Honduvilla Coto
November 24, 2014
Tweet
Share
More Decks by Javier Honduvilla Coto
See All by Javier Honduvilla Coto
Debugging – Learning Linux @ Facebook
javierhonduco
0
100
Understanding Ruby with BPF
javierhonduco
1
44
Spying Linux processes
javierhonduco
0
110
word2vec
javierhonduco
0
76
UC3M university cafeteria redesign
javierhonduco
0
88
Mac OSX UI toolkit and design guidelines
javierhonduco
0
120
Other Decks in Programming
See All in Programming
Claude Agent SDK を使ってみよう
hyshu
0
1.5k
モテるデスク環境
mozumasu
3
1.4k
なんでRustの環境構築してないのにRust製のツールが動くの? / Why Do Rust-Based Tools Run Without a Rust Environment?
ssssota
14
47k
alien-signals と自作 OSS で実現する フレームワーク非依存な ロジック共通化の探求 / Exploring Framework-Agnostic Logic Sharing with alien-signals and Custom OSS
aoseyuu
3
5.5k
Towards Transactional Buffering of CDC Events @ Flink Forward 2025 Barcelona Spain
hpgrahsl
0
120
Designing Repeatable Edits: The Architecture of . in Vim
satorunooshie
0
220
EMこそClaude Codeでコード調査しよう
shibayu36
0
570
テーブル定義書の構造化抽出して、生成AIでDWH分析を試してみた / devio2025tokyo
kasacchiful
0
370
Pythonに漸進的に型をつける
nealle
1
150
kiroとCodexで最高のSpec駆動開発を!!数時間で web3ネイティブなミニゲームを作ってみたよ!
mashharuki
0
1.1k
CSC509 Lecture 11
javiergs
PRO
0
290
KoogではじめるAIエージェント開発
hiroaki404
1
290
Featured
See All Featured
The Pragmatic Product Professional
lauravandoore
36
7k
A Modern Web Designer's Workflow
chriscoyier
697
190k
BBQ
matthewcrist
89
9.9k
Testing 201, or: Great Expectations
jmmastey
46
7.7k
The MySQL Ecosystem @ GitHub 2015
samlambert
251
13k
Writing Fast Ruby
sferik
630
62k
Side Projects
sachag
455
43k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
140
34k
Learning to Love Humans: Emotional Interface Design
aarron
274
41k
Being A Developer After 40
akosma
91
590k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
48
9.7k
Why Our Code Smells
bkeepers
PRO
340
57k
Transcript
Can I haz ur pythons? Rafael Medina García @rmed_dev Fco.
Javier Honduvilla Coto @javierhonduco
Where is python?
Examples for the Java weenies
Simple TCP Socket: Java
Simple TCP Socket: Python
Reading a file: Java
Reading a file: Python
Hashtable: Java
“Hashtable”: Python
Why python rocks? • Function parameters • GC ◦ Reference
counting • Decorators • Types (WTF) • List-Stack-Queue-[...] • PyPI
Concurrency is not parallelism • Concurrency ◦ GIL: Global Interpreter
Lock (</3) i. threads vs processes • celery ii. tasks iii. groups iv. pipes • cpython, pypy
Celery • Async framework task Queue + Tasks = fun
Cpython and moar • cpython ◦ Guido’s Python Interpreter •
pypy ◦ “an implementation of the Python programming language written in Python itself”
Web frameworks + wsgi • Django • Flask • ∞
Scientific packages • ipython + notebook • cython • numba...
Our fav libs • requests (http for humans) • SQLAlchemy
(database toolkit)
SQLAlchemy I
SQLAlchemy II
Is (c)python slow? • Overhead • Cache misses • Complex
data structures • Any variable can change its type • (dynamic)
None
Bibliography • https://jakevdp.github.io/blog/2014/05/09/why-python-is- slow/ • http://docs.python-requests.org/en/latest/ • https://bitbucket.org/zzzeek/sqlalchemy • http://wsgi.readthedocs.org/en/latest/
• http://www.dabeaz.com/python/UnderstandingGIL.pdf • https://docs.python.org/2/library/gc.html • https://pypi.python.org/pypi • http://pypy.org/ • http://www.scipy.org/