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
733 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 β€’ 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.
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.
Get a weekly roundup of the best Substack posts, by hacker news affinity:
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.