Bite code!

Bite code! is a Substack focused on Python programming, offering insights into its nuances, best practices, and challenges. It covers Python's evolving ecosystem, including updates in the community and software development techniques. Themes include technology hype cycles, practical software engineering, Python-specific features and traps, and comparisons of Python implementations.

Software Development Practices Python Programming Programming Languages Technology Trends Software Engineering Python Community Updates Debugging and Error Handling

The hottest Substack posts of Bite code!

And their main takeaways
978 implied HN points β€’ 04 Mar 25
  1. Web development needs a balance between standardization and diversity. If everything is too standard, creativity suffers; too much diversity leads to chaos. Finding the right mix is key.
  2. History shows us that monopolies in web browsers can lead to stagnation and problems for developers. Just like with Internet Explorer 6, when one browser dominates, innovation can slow down.
  3. We should support alternatives to Chrome to prevent the rise of another monopoly. Using and promoting different browsers helps keep the web healthy and encourages a variety of options for developers.
1345 implied HN points β€’ 01 Mar 25
  1. PEP 771 aims to improve Python packaging by introducing default extra dependencies. This means users can install packages with recommended optional features more easily.
  2. PEP 772 suggests creating a Python Packaging Council to oversee packaging standards and tools, which could help unify the approach to Python packaging.
  3. Debugging in VSCode has become easier with the introduction of the debugpy command, allowing developers to start debugging their Python code effortlessly.
7584 implied HN points β€’ 15 Feb 25
  1. Using the uv tool for Python project management is generally a good idea because it simplifies many tasks. You can always revert to other methods if it doesn't suit your needs.
  2. Uv helps solve common problems in Python setup by being independent of system Python installations. This makes it easier for users to manage different environments without confusion.
  3. While uv is great, there are certain situations where it might not be the best choice, like for legacy projects or in restrictive corporate environments. It's best to try uv first and see if it works for you.
1834 implied HN points β€’ 20 Feb 25
  1. Using new tools like Atuin and Starship can make your terminal experience much simpler and faster. They help reduce the size of configuration files like .bashrc while still providing great features.
  2. The rise of Rust has led to better command-line tools that are efficient and user-friendly. These tools replace many old commands and plugins with minimal effort needed from users.
  3. It's okay to stop using some tools or plugins if they aren't effective for your needs. Keeping your setup clean and understandable is more important than having every possible feature.
1957 implied HN points β€’ 05 Feb 25
  1. Python 1.0 was surprisingly advanced for its time, with features like high-level data structures and ways to handle processes and files. It showed a lot of capabilities despite being the first major version.
  2. Compiling Python 1.0 requires some old tools and a legacy environment, as modern systems might not support all the necessary components. Using containers can help recreate this older setup.
  3. Even in its early stage, Python had a live REPL and error handling, making it quite user-friendly. Developers were able to perform a variety of tasks easily, which made Python appealing compared to other programming languages at the time.
Get a weekly roundup of the best Substack posts, by hacker news affinity:
1957 implied HN points β€’ 01 Feb 25
  1. PEP 773 is proposing a new way to install Python on Windows. It aims to simplify the installation process by using one tool for all versions and making it easier for users to manage them.
  2. Ruff, a popular linter, is getting a type checking feature added soon. This change will help improve Python's type checking and make it more user-friendly.
  3. Pypi has introduced a quarantining system for potentially harmful projects. This will block access to projects suspected of containing malware without completely removing them, allowing for better security.
1467 implied HN points β€’ 25 Jan 25
  1. You can change Python's syntax using a special trick called '# coding:'. This lets you define how your code is read and interpreted.
  2. By using custom codecs, you can make unusual text formats like JPEGs or even SQL valid in Python. It's a creative way to mix different languages within Python.
  3. While it's fun to play with these features, it can also make your code really complicated and hard to debug. So, use this power wisely!
1957 implied HN points β€’ 11 Jan 25
  1. Using a Python virtual environment (venv) in Docker is a good practice, even though it's possible to skip it. It helps avoid conflicts when installing dependencies, keeping your project stable and organized.
  2. Even if your Docker image seems minimal, it's hard to maintain that state. Relying on the base image without a venv can lead to unexpected issues later on, especially as dependencies change.
  3. Using a venv simplifies your workflow and ensures consistency across different environments. It protects you from potential problems that arise when system packages interact with Python packages.
1590 implied HN points β€’ 29 Dec 24
  1. Astral is expanding its projects and has taken control of python-build-standalone, making it easier to install Python on different systems without complicated setups.
  2. PEP 768 is a new proposal that will allow easier and safer debugging for live Python processes, improving how we can fix issues in running applications.
  3. The Django community is updating their framework to be more user-friendly by replacing old commands with simpler ones, while keeping the framework modern and relevant.
1957 implied HN points β€’ 15 Dec 24
  1. Using 'uv run' lets you run commands in a temporary environment without cluttering your main setup. This makes it easy to use big tools like Jupyter without installing them every time.
  2. The 'uvx' command works like 'npx', letting you test and run Python utilities quickly. It handles dependencies nicely, so you can focus on your tasks without worrying about setup.
  3. Creating scripts with 'uv init' helps you get started fast. It sets up everything you need, including project files and dependencies, making it easier to organize your Python projects.
978 implied HN points β€’ 02 Jan 25
  1. Shiv allows you to bundle your Python project into a single executable zip file, which includes all your code and its dependencies. This makes it easy to run your program on any compatible server without needing to install anything else.
  2. Creating a zipapp with shiv involves a few steps, including setting up a virtual environment and running specific commands to package your project. It’s important to understand the process to avoid common pitfalls.
  3. Using shiv can simplify deployment, especially for web services or applications with many dependencies. However, it does require Python to be installed on the target machine and might not work well with certain compiled extensions.
1467 implied HN points β€’ 15 Nov 24
  1. AI can help programmers by reducing the amount of typing they do. This means they can focus more on solving problems instead of just writing code.
  2. As programmers use AI tools more, they might become better at understanding and defining problems instead of just following strict coding rules.
  3. In the long run, AI could make the whole community of developers smarter. It will lower the barrier for entry to coding and help people learn more about the real issues we need to solve.
1957 implied HN points β€’ 25 Oct 24
  1. Python 3.13 introduces improvements in debugging tools like PDB, making it easier to work with errors and set breakpoints. This is a big win for developers who rely on debugging in their workflow.
  2. The shutil module has seen many bug fixes and enhancements, which means working with files and directories will be more reliable. Developers can finally use it without constant worries about it failing.
  3. There are small but useful updates for concurrency in Python, such as changes to asyncio and task management. These little updates add up to make handling multiple tasks easier and more efficient.
733 implied HN points β€’ 19 Nov 24
  1. You can measure distance using sonar technology, which was once considered advanced but is now easily available and affordable for projects like Raspberry Pi.
  2. Creating fun experiences, like detecting when people pass through a giant Mario pipe and playing a sound, requires careful planning and some troubleshooting.
  3. Working with hardware can be tricky, as it often involves dealing with unexpected issues and requires patience, but it can lead to creative and playful outcomes.
856 implied HN points β€’ 29 Oct 24
  1. Python 3.13 has been released, bringing many new features like better error messages and a new JIT compiler. It's exciting, but users are advised to hold off on upgrading until next year.
  2. Template strings (or t-strings) are introduced, offering a cleaner way to create formatted strings that can be used in various situations. This could help prevent mistakes when handling string formatting for tasks like translation or logging.
  3. New proposals like external wheel hosting and dependency groups in pyproject.toml make it easier to manage packages and their dependencies, especially for larger libraries.
978 implied HN points β€’ 13 Oct 24
  1. Always have your business logic on both the frontend and the server. If you only trust the client side, you risk getting incorrect data.
  2. Your server needs to handle requests from various sources, including non-standard browsers and bots. These can bypass your frontend checks if they're not replicated on the server.
  3. Any important checks for security and data integrity should happen on the server to prevent unexpected issues. This means you'll often have to duplicate checks that you already do on the frontend.
2568 implied HN points β€’ 04 Feb 24
  1. TDD can make your code more flexible, reliable, and less error-prone by focusing on testing upfront.
  2. TDD may not work well for everyone, as it requires experience, ability to hold complex models in mind, and sustained focus.
  3. Not all projects are suited for TDD, and it's important to assess the cost and benefit of testing based on project needs and constraints.
1957 implied HN points β€’ 19 Feb 24
  1. Python automatically concatenates strings written next to each other, making it easier to break long strings across multiple lines.
  2. In Python, be mindful of the differences between functions like sorted() and list.sort(), as they behave differently in terms of returning values.
  3. Tuples in Python are created using commas, with parentheses being optional for non-empty tuples, but crucial for tuples of one element to avoid confusion.
1590 implied HN points β€’ 06 Mar 24
  1. Creating software has become easier due to resources and tools available, but it still requires dedication, time, and energy.
  2. Writing software demands perseverance and continuous learning, akin to mastering a musical instrument or a sport.
  3. Working on software involves dealing with humans, extracting requirements, navigating social dynamics, and recognizing the importance of human interaction in the development process.
1467 implied HN points β€’ 03 Mar 24
  1. Redis is a powerful companion for Python, used for caching, sharing states, and creating queues.
  2. Redis is easy to use and highly efficient, widely employed in the industry for tasks like caching and inter-process communication.
  3. With basic features like lists, hashes, and sets, Redis has vast utility in tasks such as caches, queues, and inter-process communication.
1467 implied HN points β€’ 21 Jan 24
  1. Decorators provide syntactic sugar for code reuse of callback processing.
  2. Popular usages for decorators include intercepting calls, registering functions, and enriching function behavior.
  3. Decorators can be combined and used creatively to enhance your code, but be mindful not to overdo it.
1100 implied HN points β€’ 28 Feb 24
  1. Astral released a new Python package manager called uv, which aims to replace existing package and virtual env managers, with smartly integrated features and community contributions.
  2. Stand Alone Python project by indygreg compiles Python for various platforms, offering archives that can be run without installation, providing a consistent experience across different machines and platforms.
  3. A new lock file proposal by Brett Canon aims to tackle the challenge of pinned dependencies for Python projects, with previous attempts in 2021 and the latest proposal focusing on source distribution support and a new file format.
978 implied HN points β€’ 14 Mar 24
  1. Cookie banners on websites are not legally required by any EU law; companies choose to implement them.
  2. American companies do not have to comply with EU laws such as showing cookie banners to users in the USA.
  3. Many cookie banners on websites are actually illegal according to EU law, as they use dark patterns to trick users into tracking consent.
1100 implied HN points β€’ 15 Jan 24
  1. The splat operator ( ) in Python is used for unpacking function arguments and defining infinite (variadic) parameters.
  2. Differentiate between arguments and parameters in Python; parameters are defined variables in a function signature, while arguments are values passed to those parameters when calling the function.
  3. Positional and keyword arguments in Python allow passing arguments by position or by name in a function call.
856 implied HN points β€’ 30 Jan 24
  1. A new Python video game, JOY OF PROGRAMMING, is available on Steam for learning programming interactively.
  2. Pyodide, a Webassembly CPython port, now has experimental support from urllib3, enabling Python to run in the browser.
  3. Numpy 2 is set to release soon, with changes that may impact compatibility, so users should prepare by checking and updating dependencies.
1223 implied HN points β€’ 08 Jul 23
  1. Making HTTP POST requests can have unexpected challenges, like dealing with network issues and corporate setups.
  2. Using ThreadExecutor and ThreadPoolExecutor in Python can help manage tasks efficiently, especially in scenarios like log aggregation.
  3. Error handling is crucial in programming, and sometimes unconventional solutions are needed to manage exceptions effectively.
1100 implied HN points β€’ 10 Jun 23
  1. Python allows underscores in numeric literals for better readability and formatting of numbers
  2. Unpacking in Python is versatile, allowing assignment to slices and nested structures
  3. Using the splat operator in Python, like with lambdas and unpacking arguments, can make code more concise and powerful
978 implied HN points β€’ 13 Jun 23
  1. Merge dictionaries with methods like dict.updates(), **, |, and collections.ChainMap
  2. Deal with missing values in dictionaries using methods like dict.get(), dict.setdefault(), and collections.defaultdict
  3. Extract multiple values at once using tools like operator.itemgetter and match/case
733 implied HN points β€’ 09 May 23
  1. PDB is a basic but useful debugger that comes with Python by default, allowing you to pause programs, enter a debugging shell, and analyze program states.
  2. Learning to use PDB is valuable because it helps you understand debugging fundamentals, and knowing PDB can translate to using other debuggers as well.
  3. PDB offers various helpful commands like 'help', 'quit', 'list', 'next', 'continue', 'until line', 'jump line', 'display', 'step', 'return', 'up', and 'down' for effective debugging in Python.