python - the good, the bad and the ugly
TRANSCRIPT
![Page 2: Python - The Good, The Bad and The ugly](https://reader035.vdocuments.mx/reader035/viewer/2022062522/589f4fa01a28abec418b5ad9/html5/thumbnails/2.jpg)
About me
Intel Perceptual computing.Compute, cloud and embedded expert.Started with Python around 7 years ago with analytics tools, used it for bunch of stuff since then. Focus on Data science and Machine learning in recent years Disclaimer: The following are my views , please learn further on anything you find interesting and feel free to send me a note on matters you disagree
![Page 3: Python - The Good, The Bad and The ugly](https://reader035.vdocuments.mx/reader035/viewer/2022062522/589f4fa01a28abec418b5ad9/html5/thumbnails/3.jpg)
Agenda
IntroThe good The bad The uglySummary
![Page 4: Python - The Good, The Bad and The ugly](https://reader035.vdocuments.mx/reader035/viewer/2022062522/589f4fa01a28abec418b5ad9/html5/thumbnails/4.jpg)
THE GOOD
A MAN WITH NO NAME
![Page 5: Python - The Good, The Bad and The ugly](https://reader035.vdocuments.mx/reader035/viewer/2022062522/589f4fa01a28abec418b5ad9/html5/thumbnails/5.jpg)
Very newbie friendly, Great Eco-system
A LOT of material
online, for free
Syntax is very easy to
read and learn
Free dev environment and tools (as starter)
![Page 6: Python - The Good, The Bad and The ugly](https://reader035.vdocuments.mx/reader035/viewer/2022062522/589f4fa01a28abec418b5ad9/html5/thumbnails/6.jpg)
A lot of good quality libraries and tools
Internet: Web servers, Web
client, Scrappers, SDKs for all major
services
Infrastructure & Tooling: cross
platform, DevOps, Testing, Cloud
management, IT, consoles,…
Good selection of GUI capabilities ,
cross platform and cross
programming langs (Xpython)
![Page 7: Python - The Good, The Bad and The ugly](https://reader035.vdocuments.mx/reader035/viewer/2022062522/589f4fa01a28abec418b5ad9/html5/thumbnails/7.jpg)
Machine learning leadership
Leading for ML development (with R and
Matlab), Probably Best for production
Most ML libraries are python
friendly
Xaas providers are embracing python as well
![Page 8: Python - The Good, The Bad and The ugly](https://reader035.vdocuments.mx/reader035/viewer/2022062522/589f4fa01a28abec418b5ad9/html5/thumbnails/8.jpg)
THE BAD ANGEL
EYES
![Page 9: Python - The Good, The Bad and The ugly](https://reader035.vdocuments.mx/reader035/viewer/2022062522/589f4fa01a28abec418b5ad9/html5/thumbnails/9.jpg)
Mobile and browser support
No browser support (JS monopoly)
Weak support for mobile
![Page 10: Python - The Good, The Bad and The ugly](https://reader035.vdocuments.mx/reader035/viewer/2022062522/589f4fa01a28abec418b5ad9/html5/thumbnails/10.jpg)
Performance
Execution is slow
compared to compiled
code
Multi-threading is
not well defined, hard to implement
GIL
![Page 11: Python - The Good, The Bad and The ugly](https://reader035.vdocuments.mx/reader035/viewer/2022062522/589f4fa01a28abec418b5ad9/html5/thumbnails/11.jpg)
THE UGLY
Tuco Benedicto Pacifico Juan Maria Ramirez, AKA “THE RAT”
![Page 12: Python - The Good, The Bad and The ugly](https://reader035.vdocuments.mx/reader035/viewer/2022062522/589f4fa01a28abec418b5ad9/html5/thumbnails/12.jpg)
Versioning
Python2 or Python3 ?
Packaging, Virtualenv
VS containers
PEP8 and the Tabs-vs-Spaces holy
war
![Page 13: Python - The Good, The Bad and The ugly](https://reader035.vdocuments.mx/reader035/viewer/2022062522/589f4fa01a28abec418b5ad9/html5/thumbnails/13.jpg)
Loose definitions
Dynamic typing, runtime errors
Class defs, Self, parent
constructor, private/protecte
d,
Modules path are dynamic,
sys.path.append is too popular
![Page 14: Python - The Good, The Bad and The ugly](https://reader035.vdocuments.mx/reader035/viewer/2022062522/589f4fa01a28abec418b5ad9/html5/thumbnails/14.jpg)
SUMMARY
Watch the movie if you haven't
![Page 15: Python - The Good, The Bad and The ugly](https://reader035.vdocuments.mx/reader035/viewer/2022062522/589f4fa01a28abec418b5ad9/html5/thumbnails/15.jpg)
Python is great, yet with great power … • Python mindset is putting a lot of the rules on community and soft
conformation (We are all grownups …). • Use IDE, It makes a lot of the downsides smaller (Started with
pyscriper, than pydev, today pycharm) • Try to stick to PEP 8 as your coding style, pylint your code will help
you get use to it.
![Page 16: Python - The Good, The Bad and The ugly](https://reader035.vdocuments.mx/reader035/viewer/2022062522/589f4fa01a28abec418b5ad9/html5/thumbnails/16.jpg)
PEP 20 -- The Zen of PythonI use “sunscreen” as life mantra and PEP20 as programming mantra, both are endless journey. Beautiful is better than ugly. Explicit is better than implicit. Simple is better than complex. Complex is better than complicated. Flat is better than nested. Sparse is better than dense. Readability counts. Special cases aren't special enough to break the rules. Although practicality beats purity. Errors should never pass silently. Unless explicitly silenced. In the face of ambiguity, refuse the temptation to guess. There should be one-- and preferably only one --obvious way to do it. Although that way may not be obvious at first unless you're Dutch. Now is better than never. Although never is often better than *right* now. If the implementation is hard to explain, it's a bad idea. If the implementation is easy to explain, it may be a good idea. Namespaces are one honking great idea -- let's do more of those!