- Dev Notes
- Posts
- Why Python is terrible...
Why Python is terrible...
![](https://media.beehiiv.com/cdn-cgi/image/fit=scale-down,format=auto,onerror=redirect,quality=80/uploads/asset/file/3f382e8d-dc40-4f24-8cd7-41179fb0d4fe/newsletter_header.png?t=1703072155)
![](https://media.beehiiv.com/cdn-cgi/image/fit=scale-down,format=auto,onerror=redirect,quality=80/uploads/asset/file/c1fa9cbf-ccd3-494f-9684-0d75d171fa69/header.png?t=1705872875)
Good Morning! Jon argues Python is unsuitable for large software projects due to its dynamic typing and lack of compile-time checks. Alan Turing's landmark 1936 paper introduced the concept of uncomputable problems through an ingenious self-referential technique known as diagonalization. The Rust scheduler leverages eBPF to dynamically load new algorithms without rebooting, delivering up to 2x frame rate gains in gaming benchmarks.
Why Python is terrible...
Opinion Piece
![](https://media.beehiiv.com/cdn-cgi/image/fit=scale-down,format=auto,onerror=redirect,quality=80/uploads/asset/file/42b09e6d-de1f-423b-8d2d-98519301a977/python.png?t=1705870871)
Image Credit: Akashic Seer
In the post, titled "Why Python is Terrible", Jos Visser argues that while Python is popular and easy to learn, it is "patently unsuitable" for large, professional software applications.
Visser talks about his extensive experience managing complex Python codebases, claiming he has "seen and experienced horrors" from bugs and issues that would not occur in compiled, strictly typed languages like Rust. He states Python's dynamic typing and lack of compile-time checking leads to brittle, hard-to-maintain spaghetti code.
Specifically, he notes Python's lack of type safety means you cannot guarantee code will work properly or catch all errors upfront. So you end up needing exhaustive testing which is impractical. He also highlights problems with undefined behavior, uncalled functions accumulating, poor performance, and more.
In Visser's view, Python's ease of use comes at the expense of software quality and long-term maintainability. While acknowledging Python's enduring popularity, he argues developers should switch to more modern compiled languages like Go or Rust for most production applications.
Read More Here
A Counterintuitive Proof of Algorithmic Limits by Alan Turing
![](https://media.beehiiv.com/cdn-cgi/image/fit=scale-down,format=auto,onerror=redirect,quality=80/uploads/asset/file/afa1c0f1-d261-4adf-aab8-414a1ed1efa9/alan.png?t=1705871437)
Image Credit: Science Museum
In his 1936 paper that laid the foundations for modern computer science, Alan Turing proved the existence of uncomputable problems - those with well-defined inputs and outputs but no algorithm can solve them. His ingenious proof relied on a technique called diagonalization, which constructs a pathological problem that rejects every attempted solution.
Diagonalization works by flipping bits in strings to ensure a new string differs from all strings in a given list. Turing adapted this method to an infinite list of all possible algorithms. He crafted a decision problem that outputs the opposite of what each algorithm outputs on its own code as input. This forces every algorithm to fail on at least one input, its own code, proving the problem’s uncomputability.
The key insight enabling this tour de force is that algorithms can take other algorithms’ code as input. Turing leveraged this recursive property to essentially construct an infinite regression of “No I won’t” responses to algorithmic solution attempts. Building the uncomputable problem thus becomes an “infinity questions” game of endless contrarian obstinacy.
While diagonalization elegantly proves uncomputability, theorists later showed it cannot resolve essential questions about relative algorithmic difficulty. By operating in the abstract realm of all possible algorithms, it ignores pragmatic details affecting real-world computation. Still, diagonalization remains invaluable for establishing absolute limitations on what algorithms can achieve. Turing demonstrated the immense power of mathematical negation to delineate the boundaries of the computable. His legacy is a masterclass in the virtue of strategic contrarian thinking.
Read More Here
Rust-Based Linux Scheduler Shows Promise for Gaming
![](https://media.beehiiv.com/cdn-cgi/image/fit=scale-down,format=auto,onerror=redirect,quality=80/uploads/asset/file/dc6634d6-a25e-4c98-8287-de898e3721bd/linux.png?t=1705871844)
Image Credit: MUYLINUX
Canonical engineer Andrea Righi recently created an experimental Linux scheduler written in Rust that leverages the kernel's sched_ext feature. Early testing shows it can outperform the default Linux scheduler for workloads like gaming.
The scheduler is implemented using eBPF (extended Berkeley Packet Filter). eBPF allows user-space programs to safely execute inside the Linux kernel at runtime. Using eBPF for the scheduler provides flexibility - new scheduling algorithms can be loaded without rebooting. In benchmarks, Righi's scheduler improved gaming frame rates by up to 2x while a parallel kernel build ran in the background. It accomplishes this by prioritizing interactive applications over CPU intensive background tasks.
The gaming focus doesn't mean the scheduler only benefits games. Other interactive workloads like web browsers, editors, etc. are also prioritized. However, long-running batch jobs will take longer to complete. Righi isn't claiming Rust itself boosted performance. But he says Rust's abstractions allowed quick development while still providing low-level control when needed. This shows Rust can now handle performance critical kernel code.
The scheduler is still experimental. But its early success highlights the potential of eBPF and Rust to enable more innovative Linux kernel extensions. Dynamic user-space schedulers could help optimize for emerging workloads as compute environments grow more diverse.
Read More Here
Tech News
Communication Restored Between NASA and Mars Helicopter Ingenuity
![](https://media.beehiiv.com/cdn-cgi/image/fit=scale-down,format=auto,onerror=redirect,quality=80/uploads/asset/file/8e0111b8-ef08-4fd4-80c5-2e41c77cad47/mars.png?t=1705870235)
Image Credit: Nasa Science Mars Exploration
NASA announced Saturday night that it has regained communications with the Ingenuity Mars Helicopter after an unexpected dropout during its latest flight on Thursday. The 1.8-kilogram rotorcraft, which relies on the Perseverance rover to relay signals between it and Earth, failed to communicate telemetry data back to the rover during its ascent to 40 feet altitude on flight 72.
While no engineering data made it back to assess flight performance, Perseverance was able to receive basic status signals from Ingenuity during Flight 72. After not hearing anything further, NASA instructed Perseverance to conduct extended listening sessions over the next couple sols (Mars days) in hopes of reestablishing the connection.
On Sol 371 at 7:55 pm UTC Earth receive time, Perseverance detected and recorded a signal from the long-lost Ingenuity. The project team is currently reviewing this new data set to gain insights into what transpired during the "unexpected communications dropout.” It’s speculated that rocky terrain between the vehicles during the last flight may have interfered with radio communications. The loss happened as Ingenuity was beginning its powered decent - a phase it had struggled with before during Flight 71 which ended with an unusually fast landing.
Read More Here
Youtube Spotlight
2024 Web Design Trends
The 2024 web design trends are centered around bold, vibrant colors, asymmetric layouts, 3D elements, super massive text, custom illustrations, micro animations, real life with digital overlays, responsive design, AI generated artwork, and the rise of no code platforms for website design. These trends reflect a shift towards more dynamic, interactive, and visually appealing web designs, driven by advancements in technology and a desire for more unique and authentic website experiences.
More Notes
Ditching GitHub
The author has decided to migrate all his public source code from GitHub to his own self-hosted git server, wiping the repositories' histories on GitHub in the process, due to longstanding unease with GitHub since the Microsoft acquisition and its increasing commercialization features like Copilot, desiring instead full control over hosting his content rather than relying on a third party that can unilaterally change terms. (More Here)
Build a React Native Livestreaming App: A Step-by-Step Guide
This tutorial provides developers with a comprehensive, step-by-step guide for building a live video streaming app using React Native that allows broadcasting unlimited live event streams from iOS and Android devices and supports advanced features like notifications, chat integration, and custom events. (More Here)
![](https://media.beehiiv.com/cdn-cgi/image/fit=scale-down,format=auto,onerror=redirect,quality=80/uploads/asset/file/92f7d28f-33c2-404e-9ce8-4174bcc6f439/credits.png)
Was this forwarded to you? Sign Up Here
Reply