In this article, we will build a terminal-based Minesweeper game in Python from scratch. We start with the grid layout, walk through the mine-placement and neighbour-counting logic, then bring it all together in a single game loop you can paste into a file and run. The whole game fits in roughly 200 lines of Python. The interesting work happens in two places: counting the number of mines adjacent to each cell, and recursively revealing the empty region when the player opens a cell that has zero neighbouring mines. About the game Minesweeper is a single-player game in which the player…
Author: drweb
I kept tripping on the colon in Python. Every few lines a line would refuse to run over one character. The colon shows up in the language in five different roles, and each one has its own reason and its own failure mode. Knowing which role is on screen is most of the job. Starting a code block The most common position is at the end of an if line. The same rule covers every compound statement: else, elif, for, while, def, class, try, except, finally, with, and match all end their header line with a colon, and the colon…
Anthropic introduced a self-hosted gateway this week that lets enterprises run Claude Code on Amazon Bedrock and Google Cloud without the credential sprawl and manual setup that have typically come with deploying AI coding tools at scale.The Claude apps gateway is a single, stateless container that organizations deploy on their own infrastructure and back with a PostgreSQL database. It centralizes identity, policy enforcement, usage tracking, and spend management for Claude Code, addressing a problem that will sound familiar to anyone who has tried to roll out a developer tool across a large engineering org: Every new hire needs a cloud…
If your AI coding agent keeps reading the same files every time you ask a question, it’s wasting time and tokens on work that could be answered almost instantly. I’ve been using Claude Code and a few other AI coding agents with a medium-sized Django project for the past few months, and I kept noticing the same problem. For example, if I asked, “What calls this function?“, the agent would start searching through a large part of the repository. It would consume thousands of tokens, take longer than necessary, and sometimes still miss a function call hidden deep inside the…
Lightrun is providing early access to an ability to verify whether a pull request (PR) will actually run in a production environment as part of its artificial intelligence (AI) platform for automating site reliability engineering (SRE) workflows.Company CTO Leonid Blouvshtein said the Runtime Aware PR Verifier enables DevOps teams to assess the impact a PR will have on a live production environment before it is deployed.At the core of the Lightrun platform is a Runtime Context engine that enables DevOps teams to understand how code truly behaves. Armed with those insights, it becomes possible to both identify issues and bottlenecks…
It wasn’t that long ago that AI assistants just watched from the sidelines. They could answer your questions, explain how things worked, sum up logs, and write deployment scripts. Handy, sure, but the real decisions? Still up to the engineers.That’s changing now.AI agents are stepping right into the heartbeat of operations. They can peek into monitoring platforms, tweak cloud settings, kick off deployments, change configs, restart services, you name it. For a lot of teams, giving AI this kind of access feels like the next obvious step in automation. If an AI finds a problem, why not let it fix…
By way of background, a while back I did video called “My New Favourite Join” on the LATERAL clause.The reason I like it is that it lets you solve a problem by composing little pieces together rather than writing one enormous query.Now this post is not about LATERAL, but I’ll show a quick LATERAL example to show how it leads to a cool new 26ai SQL enhancement. I’ll start with a simple example. SQL> select d.deptno, d.dname 2 from dept d; DEPTNO DNAME ———- ————– 10 ACCOUNTING 20 RESEARCH 30 SALES 40 OPERATIONS 4 rows selected. Suppose we decide we…
Chinese AI developer Z.ai has introduced ZCode, a desktop application that automates software development tasks, positioning the platform to compete with established coding platforms from Anthropic, GitHub and Cursor.The company built ZCode, which it calls an Agentic Development Environment, around its recently released GLM-5.2 LLM. Rather than functioning as a traditional coding assistant that responds to individual prompts, the software manages multi-step development projects by planning work, modifying code, running validation tests and running successive tasks with limited user intervention.Available for Windows, macOS and Linux, ZCode also supports third-party AI models through bring-your-own-key configurations. Developers can monitor long-running coding sessions…
Laravel & Wordpress Web Developer
Ornith, a new family of open source LLM models from the DeepReinforce research collective, takes a novel approach to executing coding and debugging tasks: It generates an architectural framework to give the user’s harness a structured instruction set – a scaffold – to create an agent to complete the job.Available in a set of four variants, the Ornith family was trained to work comfortably with complex software repositories undertaking complicated long-horizon jobs. Sure, LLMs can do these tasks now – until the job gets too complex. Ornith’s self-generated scaffolding ensures that it doesn’t forget the plot along the way.“The model…
