I ran into this problem the hard way during a data pipeline project – I needed to duplicate a large NumPy array for processing, and my first attempt with the assignment operator left me with two variables pointing at the same memory. After that, I made sure I understood every way NumPy lets you copy arrays. This article covers all of them, with their tradeoffs. NumPy is the foundational library for numerical computing in Python. Copying arrays shows up everywhere – from machine learning feature engineering to image processing pipelines. This article walks through each copy method, when to use…
Author: drweb
I ran into this problem when an e-commerce client asked why their best customers kept disappearing after month two. The obvious metrics told us nothing. What we needed was a way to watch user behavior unfold over time, which is exactly what cohort analysis does. This article covers cohort analysis from the ground up: what cohorts are, how to build them in Python, and how to read the retention heatmap that comes out the other end. TLDR Cohort analysis groups users by their first activity period and tracks retention over time The core metric is the cohort index — months…
It’s time for T-SQL Tuesday #198! T-SQL Tuesday is a monthly community blogging event started by Adam Machanic in 2009. Each month a host picks a topic, participants write about it on the second Tuesday of the month, and the host posts a recap with links to all the responses. If you haven’t participated before, I hope this is the month you give it a try.This month’s topic is change detection.Why change detection?I’ve been spending a lot of time lately with Fabric Mirroring for SQL Server 2025. One of the things that makes the SQL Server 2025 change feed interesting…
AI coding tools have advanced rapidly, but most are still designed around the individual developer. Their effectiveness depends heavily on a user’s ability to write understandable prompts, preserve architectural coherence across sessions, and identify areas that require additional work. This model works for some engineers, but it is far less dependable for a large organization’s development team, where software must align with defined standards, delivery processes and governance requirements. Today, AI development systems that reduce reliance on individual judgment are coming to market. They bring embedded structure, constraints, and verification directly into the platform. For organizations, customer-facing products and portals,…
This is Week 1 of PowerShell Strikes Back – a four-week May series for SQL Server DBAs who have dabbled in PowerShell but never stopped to nail down the fundamentals. New posts every Monday in May. May the 4th be with you.A long time ago, in a query window far, far away, a DBA typed their first PowerShell command. It looked simple enough. A variable, a string, a path to a backup folder. But then something went wrong, the variable didn’t expand, the connection string came out mangled, the script ran without errors, and produced completely wrong output. They had…
The question comes up every time I review a pull request: should this be a for loop or a while loop? Newer developers often reach for whichever feels natural in the moment, which leads to code that works but reads awkwardly. I have spent real time debugging loops that were structurally fine but semantically wrong for their purpose. This article covers how to choose between for loops and while loops in Python. You will learn what each loop type is built for, how to avoid the most common mistakes, and how to apply this in real code you write today.…
This happened to me recently after being busy with non-data modeling tasks for a few weeks. I went to add a relationship and was confused about the behavior. Read on to see what happened and what I did.This is part of a series on Redgate Data Modeler.Adding a RelationshipI opened one of my models and saw something like this. Note that the Article and ArticleTag entities aren’t related.I decided to add a relationship. This is a Many to Many, so I clicked on that icon in the toolbar.I then clicked on the Article entity and saw this. It’s a self-referencing…
DevOps.com is now providing a weekly DevOps jobs report through which opportunities for DevOps professionals will be highlighted as part of an effort to better serve our audience. Our goal in these challenging economic times is to make it just that much easier for DevOps professionals to advance their careers. Of course, the pool of available DevOps talent is still relatively constrained, so when one DevOps professional takes on a new role, it tends to create opportunities for others. The 10 job postings shared this week are selected based on the company looking to hire, the vertical industry segment and…
Source Have you ever re-read something you wrote and thought, “Wow, that really sounds like me”? That feeling isn’t just about familiarity. Your writing style, the way you structure sentences, the words you reach for first, how long your paragraphs run, all of it is a surprisingly accurate map of how your brain organizes and expresses ideas. Linguists, cognitive scientists, and writing researchers have spent decades studying the connection between how people write and how they think. What they’ve found is genuinely interesting: your style isn’t just a habit you picked up in school. It reflects the way you process…
Sysstat is a collection of performance monitoring utilities for Linux that includes mpstat, pidstat, iostat, and sar, and together they give you a real-time and historical view of everything your system is doing. Most sysadmins start with top command when something looks wrong, such as high CPU usage, system lag, or load spikes. It provides a quick snapshot, but it also has its own limitation, for example it only shows the current state and does not explain what is causing the problem over time. In real Linux performance issues, CPU is rarely the only factor, but bottlenecks usually come from…
