Abstract Class vs Interface in C#: Demystifying the Difference Introduction Few C# interview questions create as much confusion as: "What is the difference between an abstract class and an interface, Many developers memorize a comparison table: Abstract class → can have implementation Interface → defines a contract Abstract class → supports fields Interface → does not Abstract class → single inheritance Interface → multiple inheritance These statements are useful, but they do not answer the most important Why would I choose one over the other when designing a real This article builds the answer from first principles. The simplest way to remember it is: An interface describes what a type can do. An abstract class That distinction is much more valuable than memorizing syntax. Suppose we are building an application that sends notifications. We may have: Email notification SMS notification Push notification All of them can send a notification. That immediately suggests a contract: public interface INotificationSender { Task SendAsync(string message); } Now imagine that all notification providers also need: Common logging Common validation A provider name Shared retry behavior That may suggest an abstract base class: public abstract class NotificationSender { protected readonly ILogger Logger; protected NotificationSender(ILogger logger) { Logger = logger; } public abstract Task SendAsync(string message); protected void LogSending(string message) { Logger.LogInformation("Sending notification: {Message}", message); } } The two abstractions solve different design problems. The interface says: "Anything implementing me promises that it can send a notification." The abstract class says: "These objects belong to the same conceptual family and can share That is the core distinction. An interface is a contract. It defines capabilities that a type promises to provide. public interface IPaymentProcessor { Task ProcessPaymentAsync(decimal amount); } A class implements that contrac
I got tired of checking Instagram manually. This was for a small online store. We wanted to notice when someone tagged the account or mentioned it, mostly so those posts wouldn't just sit there unnoticed. At first, I thought this would be a pretty simple thing to automate. It wasn't. My first setup was a mixture of manual checking and some scraping. It worked for a while, then stopped working reliably. I'd come back to it, fix something, and eventually end up checking Instagram manually again. So I decided to stop trying to patch that setup and make the workflow much simpler. The workflow I ended up with is basically: Check for new Instagram activity. Get the post/user data through an API. Compare it against the items I've already processed. Keep only the new stuff. Send those items to the next step of the workflow. I'm using HikerAPI for the Instagram API part. The useful thing for my case was simply having REST endpoints I could call from the automation instead of maintaining the scraping code myself. A request looks roughly like this: import requests headers = {"x-access-key": "YOUR_KEY"} user = requests.get( "https://api.hikerapi.com/v2/user/by/username?username=google", headers=headers ).json() r = requests.get( "https://api.hikerapi.com/v2/user/stories", params={"user_id": user["pk"]}, headers=headers ) print(r.json()) I'm still keeping the workflow pretty boring on purpose. The old setup had more moving parts than it needed. The new one is basically just fetch → check → filter → process. That's been much easier to maintain. I'm interested in what other people here have automated around Instagram monitoring. What small repetitive task would you automate next?
If your product ships behind A/B experiments and feature flags, your QA team has a failure mode nobody tracks: variant amnesia. You add yourself to an experiment's testing group to check a feature, switch variants a couple of times, move on. A week later you're testing something else, the app behaves strangely, and you file a bug — not knowing you're still enrolled in variant B of an experiment you forgot exists. I lead QE on a team that works with Amplitude daily. Here's what variant amnesia actually costs, the rules that fixed it, and the tool I built to make the rules cheap. False bugs. The most expensive kind: a developer spends an hour reproducing an issue that is just an experiment variant doing its job. Irreproducible reports. Two testers see different UI on the same build, compare screenshots, and argue — because one of them is enrolled and the other isn't. The repro steps are useless without enrollment state, and nobody writes enrollment state into bug reports. Cleanup archaeology. In Amplitude, checking where you're enrolled means opening every experiment one by one and scanning its testing list for your email. Nobody does that weekly. So nobody knows their own state. Test on aliases, never on your main account. you+checkout@company.com, you+paytest1@company.com — disposable identities with clean state, one per scenario. Your main account stays out of every testing group. Treat enrollment as part of the repro steps. A bug report on an experiment-covered surface states which identity was enrolled in what. If you can't say, you're not done investigating. Leave tests when you're done. Exiting the testing group is exit criteria of the test cycle, same as closing the ticket. Stale enrollments are the amnesia. Check enrollment first, debug second. When the app "behaves strangely," the first question is not "what broke" but "what am I enrolled in." These rules work on any platform — LaunchDarkly, Optimizely, GrowthBook. The problem is that on all of them, followi
This is a submission for the Hacktoberfest Open-Source AI Challenge Week 1: Touch Grass What I Built Golden Hour Walk tells you exactly when to leave the house to catch the best light of the day. You give it your location (or press "Use my location"), a date, and whether you want a morning or evening walk. You also say how long you want to walk and how far the spot is. It works out when golden hour starts and ends, when the sun rises or sets, and when you need to leave. Then it writes a short, friendly plan, like "Leave at 5:40 PM so you reach the water as golden hour starts." Most people don't skip a walk because they hate walking. They skip it because there's no reason to go now. Golden hour gives you one: a specific window, a specific time to leave, and a sky that won't look like that again until tomorrow. It's for anyone who spends their day at a screen and wants a small, concrete nudge to go outside. Demo [https://golden-hourcatcher-i3r8p32e8-jeris-projects-4cc75d2b.vercel.app/] Code [https://github.com/Jeri20/GoldenHour_catcher/tree/main] The whole app is one index.html file with no backend, so it deploys as a static site. How I Built It The core idea is simple: code does the facts, the model does the words. The facts (no AI involved). All the sun times come from a solar calculation that runs in the browser. I started from Python's astral, which uses the NOAA solar algorithm, but a static page can't run Python. So I ported the same method to JavaScript. Golden hour uses the same definition astral does: the sun between 4° below and 6° above the horizon. Leave time is just golden hour start minus your travel time. The words (open-weight model). The wording comes from an open-weight model running inside the visitor's browser using WebLLM and WebGPU. The default is Qwen 2.5 1.5B, and Llama 3.2 1B and 3B are in a dropdown. The model never calculates anything. It receives a short list of facts ("Leave home at: 5:40 PM, Golden hour starts: 5:55 PM...") and turns them
Choose an explicit result heartbeat over a simple error tracking API when a FastAPI or Django SaaS must answer, "Did the scheduled import produce a result?" Use searchable exception events and grouped issues as supporting diagnosis, not as the primary detector. For an import expected every 15 minutes, alert on an overdue, uniquely identified schedule occurrence only after its completion deadline has passed, then attach any correlated exception group to that alert; this choice produces a higher-quality signal because silence becomes observable while retries, duplicate deliveries, and repeated stack traces do not manufacture extra incidents. Short answer: choose heartbeat-first detection when missing work matters more than counting thrown errors. Choose exception-first detection only when every meaningful failure is guaranteed to throw, reach the tracker, and remain distinguishable from retry noise. That is a demanding invariant for scheduled imports. An exception proves that one execution path reported an error. It does not prove that a schedule fired, that a worker received the job, that the process remained alive long enough to report telemetry, or that a syntactically successful import produced a usable result. A quiet queue, a disabled scheduler, expired credentials handled as an empty response, and a worker terminated before export can all leave the exception channel silent. No news is ambiguous. A result heartbeat answers a narrower question. Record one durable observation per expected schedule occurrence, with fields such as tenant_id, integration_id, scheduled_for, completed_at, outcome, records_seen, and trace_id. The scheduler or monitor can then compare expected occurrences with recorded outcomes. The heartbeat is not a log line whose presence depends on search retention; it is evidence tied to a business-level unit of work. The ADR therefore has three invariants. First, (tenant_id, integration_id, scheduled_for) is unique, so a retry cannot create a secon
A hands-on build, a deliberate failure, and the cost, resilience and design trade-offs that never make it onto the architecture diagram. Nobody designs a bad cloud network. They accumulate one reasonable decision at a time. It starts with two VPCs and one peering connection, and it works beautifully. Then a third VPC appears for a new team. Then a fourth for a new environment. Six months later you own a web of routes that nobody can fully draw from memory, and a single missed entry can take down a service on a Friday afternoon. I wanted to see exactly where that curve bends, so I built both designs in AWS: a peering topology, and a hub-and-spoke network around a Transit Gateway. I tested connectivity, broke it on purpose, and then did the part most tutorials skip: I looked hard at what each choice costs, how it fails, and when it is the wrong answer. Here is what I learned, including the places where the "obvious" upgrade is not the right call. Before the case against peering, the case for it, because it is a strong one. A VPC peering connection is a direct, private link between two VPCs. AWS builds it on the existing VPC infrastructure rather than on a gateway or separate appliance, and its own documentation states there is no single point of failure and no bandwidth bottleneck. There is also no charge to create one, and data that stays within an Availability Zone is free. For a web tier talking to a database tier, peering is close to perfect. I would still choose it there. So why leave it? Because of one design property that quietly becomes your biggest problem. If VPC A is peered with B, and B is peered with C, A still cannot reach C. Connectivity never passes through a middleman. The only way to connect everything is a full mesh, where every VPC peers with every other VPC: connections = N × (N − 1) ÷ 2 VPCs Peering connections Route entries to maintain* 3 3 6 10 45 90 50 1,225 2,450 100 4,950 9,900 *At least one route per side of every connection, before account
The debate around AI agent architecture often frames the choice between using a hosted platform, adopting an open-source framework, or building from scratch as a question of engineering maturity. This is a misconception. The decision is strictly a matter of fit, determined by two critical factors: the complexity of your control flow and who owns the failure modes when things inevitably break. Hosted platforms are excellent for specific scenarios, primarily when the agent is a secondary feature within a larger product rather than the core value proposition itself. If you are adding a chatbot to a SaaS dashboard where the primary business logic resides elsewhere, outsourcing the agent infrastructure makes sense. However, this convenience comes with a significant trade-off: moving agent operations to a platform shifts core behavior outside your codebase. This limits your ability to locally reproduce failures and patch issues independently. You become dependent on third-party release schedules for fixes that affect your user experience. Frameworks occupy the middle ground. They are optimal when your agent’s logic aligns with standard multi-step reasoning patterns and common tool interfaces. These tools handle the tedious plumbing, such as the tool-calling protocol, message history formatting, retry logic for parse errors, and streaming interfaces. For many developers, this abstraction saves time. But beware: working around a framework’s abstraction can sometimes be harder than implementing the functionality without it. If your requirements deviate from the "happy path" supported by the framework, you may find yourself fighting the library rather than leveraging it. Building an agent loop from scratch is justified when specific requirements make framework abstractions obstructive. A prime example is exact cost accounting or unusual control flow logic. A DIY implementation typically involves calling provider APIs directly within a simple while loop with a clear stop condi
Sixth in a series on using @relax.js/core with a coding agent. This is the piece I said in the first article bothered me enough to fix. When I worked in Angular, a wrong property in a template was a build error. vue-tsc does the same for Vue. Relaxjs sells itself on having no compiler, and the price was that a template is a string: {{user.naem}} is perfectly valid TypeScript, because it is text. The previous two articles are about catching it at runtime, in a test, with the errors captured. That works, and it depends on three things the agent has to remember: write the test, render with a representative model, assert on the captured errors. Forget one and the typo ships. The rule I keep coming back to, from the design notes I write for agents: an API that makes wrong usage a type error is worth far more than one that makes it a runtime warning, because nobody is watching the console. So the question was whether a library with no build step could have a type check for its templates anyway. compileTemplate takes two type parameters: the view model render() receives, and the functions context it receives as its second argument. interface ViewModel { heading: string; } interface Handlers { discard: () => void; } .. and using it like: this.template = compileTemplate (` {{heading}} Display name Email Bio Save Discard changes `); Nothing changes at runtime. The types are there for the checker. npx @relax.js/core check It reads the project's tsconfig.json, finds every compileTemplate call whose template is a literal and every html`…` literal, and resolves each expression against the types with the TypeScript compiler API. Here is the example app's page as an agent might first write it, with two typos and one habit carried over from the other engine: export const page = compileTemplate (` {{heading}} Signed in as {{profile.emial}} Discard changes `); const card = html` {{user.name}} `; export const status = card({ user: { name: 'Alice' } }); And the output, verbatim: src/pag
Popular weight-loss drugs may do more than help people shed pounds. They might also melt away the years. Drug giants Eli Lilly and Novo Nordisk say patients taking their drugs age less quickly, according to readouts from molecular “aging clocks.” Such clocks assess a person’s biological age by looking at changes to DNA that accumulate…
Ghost.ai just raised $11M. But Ghost.org, a $1B energy drink and a 1990 Swayze film own the word. We searched Google, Bing and ChatGPT to see who wins.
Mirror Particle will launch at TechCrunch Disrupt's Startup Battlefield 200 with a world model built from scratch to predict human behavior, arguing that LLM role-play falls short for market research and brand strategy.
UK fashion retailer ASOS confirmed a data breach Tuesday after hackers sent unauthorized push notifications through its mobile app while claiming to have stolen customer data from the company's Snowflake environment. [...]
I'm really tired of writing about genAI today. It's my first news shift with RPS, and within a few hours, I've written three stories that are solely about genAI use by modders, indie outfits and now, somehow, Jagex. Still, the horrors persist, and so I must continue reporting on them. As part of RuneFest 2026, Jagex unveiled a new trailer for RuneScape 3's Hoard of Dragons expansion, featuring the Dragon Slayer II quest, arriving in 2027. That video I linked to is a reupload by another channel, as Jagex very quickly took down their own upload of the video due to the trailer's use of genAI imagery being pointed out (thanks, Kotaku!) Read more
The Nothing Headphone 1 are among the discounted headsets. | Photo by Owen Grove / The Verge We spotted a variety of discounted headphones and earbuds during October’s Prime Big Deals Days, with some of our favorite options discounted to at (or near) their all-time low prices. While some deals on Amazon require a Prime subscription, there are plenty that are available to anyone, and other retailers have gotten in on the action, too. While you’re shopping, make sure to check out our full roundup of the best deals we’ve found so far from the sale. Nothing Headphone 1 Nothing’s first pair of over-ear headphones feature a retro transparent design and high-end features like active noise cancellation, spatial audio with head tracking, and plush ear pads. They also feature a paddle button that allows you to control music playback. Read our review. Where to Buy: $299 $189 at Amazon $299 $199 at Nothing AirPods Pro 3 The AirPods Pro 3 have a new design that improves their fit, superior noise cancellation, better bass, and fairly accurate heart rate sensors. Read our review. Where to Buy: $249 $179 at Amazon $249 $179 at Walmart $249 $179 at Best Buy Soundcore Liberty 5 Pro The Soundcore Liberty 5 Pro by Anker have the best call quality of any earbuds we’ve tested, and include features like ANC and a screen on the charging case. Read our review. Where to Buy: $169.99 $135.99 at Amazon $169.99 $135.99 at Anker JLab Go Air Pop The JLab Go Air Pop are an affordable pair of wireless earbuds with eight hours of battery life (or 32 hours with the included charging case). The case also houses a built-in USB-A charging plug, so you’re never without a charging cable. Where to Buy: $29.38 $19.88 at Walmart Google Pixel Buds Pro 2 Significantly smaller and lighter than their predecessors, the Pixel Buds Pro 2 also offer stronger noise cancellation, a crystal clear transparency mode, and lengthy battery life. Where to Buy: $229 $179 at Amazon $229 $189 at Google Store $229 $189 at Best B
With AI hardware, tech companies are pushing the definition of what does and doesn't constitute a recording. For most of gadget history, it'd be reasonable to assume that a device with a microphone or camera is either recording you or it isn't; it's either on or off, without much gray area. Microphones capture sound. Cameras capture images. That data is saved onto a device. Sometimes, it's also sent to the cloud - hopefully with end-to-end encryption - for processing. That data is a preserved instant in time and is therefore a recording. Perhaps not anymore. Last week, Bloomberg's Mark Gurman reported that Apple is working on a smart hom … Read the full story at The Verge.