SShortSingh.
0
ProgrammingDEV Community ·

Engineering Team Replaced 3 Microservices and 4,100 Lines of Code With One Postgres Table

A software team eliminated three separate microservices — a notification service, a scheduler, and a retry handler — totaling over 4,100 lines of code, replacing them with a single 41-line Postgres table and a 560-line worker. The services were well-built but had been architected around an unnecessary boundary, as all three ultimately existed to move data from one state to another at a scheduled time. The original setup relied on RabbitMQ queues and Redis, introducing a classic distributed systems risk known as the transactional outbox problem, where a failure between a database write and a queue publish could silently drop events. By storing jobs directly in the database alongside application data, the team ensured all state changes remain in a single transaction, eliminating drift between systems. The refactor reduced operational overhead — including separate deployments, dashboards, and on-call runbooks — while retaining scheduling, retry, and delivery logic through simple SQL columns and queries.

0
ProgrammingDEV Community ·

Why AI Apps Need Learning Systems, Not Just Smarter LLM Wrappers

A developer building an AI application with a focus on quality, robustness, and cost-efficiency began questioning whether wrapping an LLM with tools and prompts truly makes a system intelligent. The author argues that most AI applications, even sophisticated ones using RAG and vector databases, simply re-execute predefined workflows without genuinely learning from past outcomes. The key distinction drawn is between prompt-driven behaviour, where instructions define every action, and a learning system, where a policy improves over time based on feedback and observed results. The piece also differentiates fine-tuning, which adapts a model using domain-specific examples, from reinforcement learning, which optimises decisions through reward signals and policy updates. The author concludes that treating the LLM as one component within a broader decision-making system, rather than as the sole intelligence, opens the door to more adaptive and cost-effective AI applications.

0
ProgrammingDEV Community ·

Claude Accounts Hijacked via Infostealer Malware That Bypassed 2FA

Anthropic has confirmed that multiple Claude user accounts were compromised through infostealer malware installed on users' own devices, not through a breach of Anthropic's systems. Malware variants including Vidar, LummaC2, and Atomic Stealer stole active browser session cookies, allowing attackers to access accounts without needing passwords or triggering two-factor authentication. Because session cookies represent an already-authenticated state, they bypass the login step that 2FA is designed to protect. Attackers exploited the stolen sessions to consume paid usage credits before being detected. Anthropic responded by terminating the compromised sessions, removing saved payment methods, and refunding unauthorized charges.

0
ProgrammingDEV Community ·

New API Tool Aims to Fix Character Name Drift in Chinese Webnovel Translations

A developer has launched Chinese Narrative Chapter Lock, an API designed to maintain consistent terminology across long-form Chinese-to-English webnovel translations. The tool addresses a common localization problem where character names, honorifics, sect titles, and cultivation ranks become inconsistent across hundreds of chapters. Unlike full machine translation engines, it functions as a chapter-scoped lock that returns standardized handles for names and terms when fed source text. It is aimed at freelance translators, small localization studios, and developers building Chinese narrative tooling. The tool is available via its own landing page and through RapidAPI, with documentation published online.

0
IndiaTimes of India ·

IIM Bangalore launches Rs 5 lakh national case competition for college students

IIM Bangalore has opened registrations for its National Student Case Competition 2026, offering a total prize pool of Rs 5 lakh. The competition is organised by the Center for Digital Public Goods and centres on real-world problems related to India's Digital Public Infrastructure. Eligible participants must form teams of exactly five students from recognised colleges or universities across India. The deadline for submissions is September 7 at 6 PM, after which shortlisted teams will be invited to present their solutions at IIM Bangalore.

0
IndiaNDTV ·

White House Received Al-Qaeda Warning One Week Before 9/11 Attacks

A week before the September 11 attacks, White House counterterrorism coordinator Richard A. Clarke raised urgent concerns about the al-Qaeda threat. Clarke directly questioned then-National Security Advisor Condoleezza Rice about whether the US administration was genuinely committed to addressing the al-Qaeda danger. The warning came amid growing intelligence signals about a potential terrorist strike on American soil. Clarke's query to Rice highlighted what critics later described as a failure to act decisively on pre-attack intelligence.

0
ProgrammingDEV Community ·

Terrain Tool Auto-Generates Codebase Docs to Help Developers and AI Assistants Onboard Faster

Terrain is an open-source engineering environment management platform designed to help both human developers and AI coding assistants understand unfamiliar codebases quickly. Built on a Git repository foundation, it automatically scans code, generates C4 architecture documentation, and creates structured knowledge assets tailored separately for humans and AI agents. The tool addresses common pain points such as outdated wiki documentation and the inability of AI assistants to grasp project architecture beyond simple file searches. Terrain tracks Git changes incrementally and assigns freshness scores to knowledge assets, so stale information is flagged automatically. Written in Rust as a single offline binary, it supports popular AI coding tools including Claude Code, Codex, and Cursor through a unified interface.

0
ProgrammingDEV Community ·

When to Use Records in .NET: Key Features and Best Practices

A software developer and blogger has outlined the main scenarios where using Records in .NET is beneficial, emphasizing that the choice should be driven by logic rather than novelty. Records offer default immutability, meaning property values cannot be changed on an existing instance — a new one must be created instead. Unlike classes, Records use value-based equality comparison, reducing boilerplate code when checking whether two instances hold the same data. Additional advantages include concise syntax, built-in deconstruction, an auto-generated ToString() method, the 'with' expression for creating modified copies, and seamless pattern matching support. The author stresses that no technology should be applied universally, and a follow-up post will cover situations where Records are not recommended.

0
ProgrammingDEV Community ·

C# Records: Immutable Data Types That Simplify Code and Testing

C# Records were introduced with C# 9 in November 2020, offering a concise way to define immutable data models using minimal code. Unlike traditional classes, Records are immutable by default, meaning their properties can only be assigned at initialization and cannot be changed afterward. A key distinction is that Records use value-based equality rather than reference-based equality, eliminating the need to manually implement Equals and GetHashCode methods. This makes unit testing simpler and reduces boilerplate code compared to writing equivalent immutable classes. Records can also include custom validation logic, making them suitable beyond simple data containers.

0
ProgrammingDEV Community ·

Combining Object Mother Pattern with AutoFixture for Cleaner Unit Tests

A software development tutorial published on DEV Community demonstrates how to combine the Object Mother design pattern with the AutoFixture library in C#. The Object Mother pattern centralizes test object creation, improving test readability and semantic clarity. AutoFixture complements this by automatically generating random test data, reducing manual setup effort. The article walks through a practical example using a User class and age-based access logic, showing how a UserMother class leverages AutoFixture's Build API to produce meaningful test objects. The combination allows developers to maintain expressive, well-organized unit tests without sacrificing flexibility in data generation.

0
ProgrammingDEV Community ·

How to Use AutoFixture with Immutable Entities in C# Unit Tests

AutoFixture is a popular .NET library used to generate test data for unit tests, but it behaves differently when working with immutable entities. While AutoFixture can successfully instantiate an immutable object using its factory method, it throws an unhandled exception when attempting to customize read-only properties via the Build().With() syntax. This issue surfaces when developers refactor their domain entities to be immutable — a recommended practice — and then find their existing AutoFixture-based tests breaking. The article, originally published on carlosvigueras.es, demonstrates the problem using an immutable User entity with a private constructor and a static Create method. A follow-up solution to resolve this incompatibility is promised in the same post.

0
ProgrammingDEV Community ·

AutoFixture: Open-Source .NET Library That Automates Test Object Creation

AutoFixture is an open-source .NET library available via NuGet that simplifies unit test setup by automatically generating objects with random data. It is designed to minimize the 'Arrange' phase of unit tests, allowing developers to focus on what is being tested rather than how test scenarios are configured. The library is particularly useful when dealing with complex objects, eliminating the need to manually assign values field by field. It also supports customized field values when random data is not sufficient for a specific test case. The article demonstrates its use through a practical example involving a User class with multiple properties tested against a Home access method.

0
ProgrammingDEV Community ·

Builder Pattern Explained as a Test Data Alternative to Object Mother

A software developer published a tutorial on the Builder design pattern, presenting it as an alternative to Martin Fowler's Object Mother pattern for creating test data. The Builder pattern is a creational design pattern used to construct complex objects, applicable in both production code and test suites. The author notes that its use in testing is a matter of preference, with both proponents and critics in the developer community. Using a C# example with User and Home classes, the tutorial demonstrates how a UserBuilder separates data creation from test logic to improve test clarity and readability. The full example code is made available on the author's GitHub repository for reference.

0
ProgrammingDEV Community ·

Data Clumps: The Code Smell That Signals Poor Program Structure

Data Clumps is a well-known code smell in object-oriented programming that refers to groups of variables repeatedly passed together across multiple parts of a program. These variables are usually related and carry a shared meaning, which is why they tend to travel together rather than being properly encapsulated. The presence of Data Clumps often signals deeper issues in software design or implementation that can hinder future scalability and maintainability. The recommended fix is refactoring: grouping related variables into dedicated classes, such as separating user data and booking date ranges into their own objects. Cleaner, better-structured code is easier to understand, modify, and scale over time.

← NewerPage 802 of 4483Older →