Author: drweb

I love Python Turtle. Honestly, it’s one of the most fun ways to get started with graphics programming in Python. The module comes built right into Python, so there’s nothing to install before diving in. A virtual turtle acts like a pen, dragging across the screen to carve out shapes and patterns. You can sketch basic polygons, whip up some artwork, or even build simple games and animations. For people just learning to code, having code produce instant visual results makes a huge difference in staying engaged. The idea behind turtle graphics actually goes back to Logo, a programming language…

Read More

I remember when I first heard the term CRUD. It sounded fancy, but honestly it’s just an acronym for four basic operations: Create, Retrieve, Update, and Delete. Any time you build an app that manages data, you’re doing these four things one way or another. Let me break it down quickly. Create puts new records into your database. Retrieve pulls data out. Update modifies existing records. Delete removes them. That’s it. Every blog, every user management system, every inventory tracker works this way. TLDR Flask-SQLAlchemy lets you define database models as Python classes The app uses @app.before_first_request to initialize the…

Read More

Python’s print() function defaults to writing to the console, but it also accepts a file keyword argument that redirects output to any writable file object. This works with any object that has a .write() method — files, io.StringIO, and similar streams. The idiomatic approach pairs print() with a context-managed file handle using with open(…) as f:, which handles closing automatically. Redirecting print() to a file is useful for logging during development, saving script output to disk without modifying program logic, and writing data export pipelines where you want human-readable output. Four common approaches exist, ranging from the recommended print(file=f) pattern…

Read More

Python frozenset() is an immutable version of the built-in set. Once created, a frozenset cannot be modified — elements cannot be added or removed. This immutability makes frozenset hashable, which means it can be used as a dictionary key, stored inside another set, or used anywhere Python expects a hashable object. Regular sets are mutable. They have methods like add(), remove(), and update() that change the set in place. frozenset has none of these mutation methods. The tradeoff is that frozenset gains hashability — the one thing regular sets lack. Understanding when to use each one comes down to whether…

Read More

Pandas makes moving data around straightforward, and ORC has become a reliable choice for analytical workloads. It sits in the same space as Parquet, but ORC offers better compression and solid type preservation. Writing a Pandas DataFrame to ORC takes about three lines of code, and the round-trip is fast enough that it never slows things down. Exactly how to write a DataFrame to ORC, practical examples that go beyond the basics, and the things that trip people up the first few times. At the end, the difference between ORC, Parquet, and CSV is clear, and getting data into ORC…

Read More

I have used linked lists in Python projects for years, and I keep coming back to them when I need fast insertions or deletions in the middle of a collection. Arrays give you O(1) random access, but inserting at position 0 means shifting everything. A linked list sidesteps that entirely. Let me show you how they work and when they actually make sense. In this article, I walk through what linked lists are, how to build one from scratch in Python, and the operations that make them worth using. I have tested each code example against Python 3.12. TLDR Linked…

Read More

Microsoft has unveiled plans to incorporate Anthropic’s Claude Mythos Preview model and other AI models into its Security Development Lifecycle, embedding AI directly into the stages where code is written and tested. Rather than relying primarily on static analysis tools, Microsoft is adopting AI models capable of analyzing code dynamically and identifying complex vulnerabilities that might otherwise go undetected until later stages of development. Released on April 7, Anthropic’s Mythos model has already demonstrated a previously unmatched ability to uncover critical flaws across operating systems and widely used software. Anthropic claimed that the model’s ability to find security vulnerabilities is…

Read More

Most B2B applications collect incomplete data by design. A lead form captures a name and company. A recruiting tool surfaces a LinkedIn profile. An event registration system logs an email address and job title. The record enters your system and sits there, half-formed, waiting for someone to manually fill in the gaps before it can be acted on. This is an architectural problem, not a workflow problem, and solving it at the architecture layer is what separates applications that create operational leverage from ones that just digitize manual work. Understanding how to build contact enrichment into your application using professional…

Read More

We have an in-depth course all about Web Performance Fundamentals from Todd Gardner. There is a lot to know, from the psychology of web performance, to measuring the new Core Web Vitals (LCP! INP! CLS!), to building a culture of performance at your organization. Access 300+ courses with a Frontend Masters subscription and get 20% off today! Personalized Learning Industry-Leading Experts 24 Learning Paths Live Interactive Workshops 20% Off Start Learning Today →

Read More
SQL

I do believe that Redgate has been very customer focused since it’s inception. I’ve worked with them in some capacity since 2002 and I’ve felt this along the way:The next page has this statement:We believe that if we do what is right for our customers then we will thrive.I think that’s been true when we keep this in mind. The (relatively) few times we’ve started to do things for ourselves rather than thinking about customers, things haven’t worked out as well.I think this sentiment is one that guides a lot of my life. Certainly inside Redgate, but also in the…

Read More