Skip to content

Archive / page 53

All articles

Every practical article from the Nalar archive, newest first.

Tech 09 Sep 2026 7 min read

Why an Optical Mouse Can Struggle on Glass and Glossy Surfaces

A mouse can work perfectly on a notebook or mouse pad, then become jumpy or stop moving the pointer when you place it on a glass table. The buttons and scroll wheel may still work, which can make the problem look like a wireless connection or software fault. Often, the connection is fine. The mouse simply cannot measure its own movement reliably on that surface. An optical mouse does not sense motion from a wheel rolling across the desk. It observes the surface underneath it and looks for changes as the mouse moves. That simple idea explains why surface texture matters, why clear glass is difficult for many mice, and why changing what is under the mouse can fix tracking immediately.

Tech 09 Sep 2026 8 min read

Why a Webpage Can Still Look Old After You Refresh It

You know a website has changed, but your browser still shows the old logo, an earlier image, or styling that should have disappeared. You press refresh, yet the page still does not look right. The usual explanation is caching: keeping a temporary copy of web content so it does not have to be transferred again every time it is needed. Caching makes ordinary browsing quicker and reduces unnecessary data transfer, but it also means that loading a page is not always the same as downloading every part of it again.

Tech 09 Sep 2026 8 min read

Why a USB Device Can Pause When It Is Idle

A USB mouse, external drive, audio interface, or other peripheral can appear to pause after sitting unused. The first action may take a moment, a light may switch off, or a device may seem to disconnect and then return. Sometimes this is a fault, but sometimes the computer is deliberately reducing power to an idle USB device. Modern computers manage power in more places than the screen and battery. They can also let individual hardware devices enter lower-power states when those devices are not doing useful work. When activity returns, the system is supposed to bring the device back to normal operation.

Tech 09 Sep 2026 7 min read

Why a Screen Protector Can Change Touch Response

A screen protector can leave a phone looking perfectly normal while making taps, swipes, or typing feel slightly less reliable. You may need to press more deliberately, a keyboard may miss occasional letters, or touches near an edge may stop registering as easily as before. The protector does not normally work by physically pressing a button beneath the glass. Modern phone touchscreens usually detect changes in an electrical field near the surface. Adding another layer between your finger and that sensing system can weaken or alter the signal the touchscreen receives.

Tech 09 Sep 2026 7 min read

Why a Print Job Can Get Stuck in the Queue

You click Print, but nothing comes out. The document may sit at “waiting,” “paused,” or “printing” for minutes, and sending it again only adds more copies to a growing list. That list is the print queue. It lets your computer hold and manage print jobs before or while they are sent to a printer. Understanding the queue turns a vague “the printer is broken” problem into a sequence you can check: the document, the queue, the connection, and the printer itself.

Tech 09 Sep 2026 7 min read

What the Speed Symbols on an SD Card Actually Mean

An SD or microSD card can carry several speed symbols at once: perhaps a 10 inside a broken circle, a 3 inside a U, and a mark such as V30. It is easy to assume that these numbers are competing estimates of the card’s maximum speed. They are not. Most of these marks are speed classes: standardized ways to state a minimum level of write performance under defined conditions. Different class systems were introduced for different generations and uses, so one card can legitimately qualify for several of them.

Tech 09 Sep 2026 7 min read

What Mouse Polling Rate Changes and When Higher Hz Matters

A mouse may offer settings such as 125 Hz, 500 Hz, or 1,000 Hz, and some models support still higher rates. These numbers are easy to confuse with DPI, but they describe a different part of how mouse movement reaches the computer. Polling rate is about how often movement and button information can be reported to the computer. A higher rate can reduce the time between updates and make motion samples arrive more frequently. That can matter for responsive games and high-refresh-rate displays, but it does not make the mouse sensor more accurate by itself, and the practical benefit becomes smaller as the rate rises.

Tech 09 Sep 2026 9 min read

What Happens When You Close a Laptop Lid with an External Monitor

Connecting a laptop to a larger monitor can turn it into a comfortable desk computer. A common question follows: can you close the laptop lid and keep using the external screen? Sometimes yes. Sometimes closing the lid immediately puts the computer to sleep. The difference is not usually a property of the monitor. It comes from how the laptop and operating system are configured to respond when the lid closes, along with requirements such as external power or an attached keyboard and mouse on some systems.

Cybersecurity 09 Sep 2026 10 min read

Validate DNS Results Before Connecting to Untrusted Hostnames

A server that accepts a hostname from a user can make a careful security decision and still connect somewhere it never intended. The common mistake is validating the hostname first, then assuming that the later network connection will reach the same kind of destination. Hostnames are names, not network locations. DNS turns a hostname into one or more IP addresses, and those answers can change. If your security rule says “public destinations only,” checking the text of the hostname is not enough. The connection must also be constrained to an address that satisfies that rule.

Software Engineering 09 Sep 2026 11 min read

Using Hedged Requests to Reduce Tail Latency

Most calls to a dependency may finish quickly while a small fraction take much longer. A request that depends on one of those slow calls inherits the delay even when another healthy instance could have answered sooner. Increasing the timeout does not solve this problem. Retrying only after the timeout may also be too late: by then, the caller has already spent most of its latency budget. A hedged request is a deliberately delayed duplicate of an operation that is still in progress. The original request starts normally. If it has not completed after a chosen delay, the caller sends one additional equivalent request, usually to another eligible instance. The first acceptable result wins, and the remaining work is cancelled or ignored.

Software Engineering 09 Sep 2026 9 min read

Using Factories to Contain Construction Policy

Creating an object is sometimes just allocation plus a few obvious values. In that case, direct construction is easy to read and easy to maintain. But construction can gradually become a decision process: choose an implementation, supply required collaborators, apply defaults, validate combinations, and ensure every caller assembles the object the same way. When that policy is copied across callers, a change to construction becomes a search-and-edit exercise. One caller may miss a new dependency or keep an obsolete default even though the resulting objects share the same conceptual role.

Artificial Intelligence 09 Sep 2026 9 min read

Use Predictive Entropy to Detect Uncertain Classifications

Use Predictive Entropy to Detect Uncertain Classifications A classifier can return the same predicted label for two inputs while being much less certain about one of them. If an application only keeps the winning label, that difference disappears. Predictive entropy gives you a compact way to preserve it. It summarizes how spread out a classifier’s predicted probability distribution is: concentrated probability produces low entropy, while probability spread across several classes produces higher entropy.

Python 09 Sep 2026 9 min read

Update Immutable Records with Python copy.replace()

I like immutable value objects because they make state changes explicit. The awkward part is that Python has historically offered several different ways to create a slightly modified version of one. A dataclass has dataclasses.replace(). A named tuple has _replace(). A custom class usually needs its own helper. The operations are conceptually similar, but generic code has no single interface to target. Python 3.13 adds copy.replace() to close that gap. It creates a new object of the same type while replacing selected fields, and it works with dataclasses, named tuples, and classes that implement __replace__().

Software Engineering 09 Sep 2026 9 min read

Turning Raw Input into Trusted Domain Values

A value often enters a program as a string, number, or loosely structured object and then travels through several layers. If every layer must ask whether that value is empty, malformed, or outside an allowed range, validation logic spreads through the codebase. Some callers repeat the checks, some forget them, and others quietly make different assumptions. A useful alternative is to treat external input as untrusted representation and convert it at a boundary into a value that represents a domain fact. After that conversion succeeds, downstream code can rely on the guarantees provided by the new value instead of repeatedly validating the original representation.

Cybersecurity 09 Sep 2026 8 min read

Treat Time as a Security Dependency

Security controls often depend on time without treating the clock itself as part of the control. A token may expire at a timestamp, a signed request may be accepted only for a short window, and investigators may reconstruct an incident by ordering events from several services. If those clocks are wrong, the security decision can be wrong too. A clock that jumps backward can extend a time-based window. Two servers with different wall clocks can disagree about whether the same credential is expired. Poorly synchronized log timestamps can make a correct sequence of events appear reversed.

Cybersecurity 09 Sep 2026 11 min read

Treat Spreadsheet Exports as Active Content

A CSV export can look harmless because the application is only writing text. The risk appears later, when a spreadsheet program opens that text and decides that a cell is a formula rather than ordinary data. If an attacker can control a field that appears in an export, a value intended to be a name, note, ticket title, or other text may be interpreted by the spreadsheet application as active spreadsheet content. The consequence depends on the spreadsheet software and its configuration, but it can include misleading calculated values, unexpected links or external interactions, and other behavior the exporting application never intended to authorize.

Cybersecurity 09 Sep 2026 10 min read

Treat Security Bypass Flags as Privileged Controls

A security control sometimes needs an emergency exception. A certificate check may need a temporary compatibility mode during a migration. A fraud rule may need a narrow exemption for a broken integration. An administrator may need a recovery path when the normal authentication service is unavailable. The dangerous mistake is to treat the switch that disables or weakens that control as ordinary configuration. If changing require_strong_check = true to false removes a protection, then permission to change that value carries security authority. A compromised deployment account, careless operator, stale test setting, or poorly protected configuration service can turn the exception into a persistent bypass.

Cybersecurity 09 Sep 2026 9 min read

Treat Client-Side Authorization State as Untrusted Input

Applications often send useful state to a client: a user role for rendering navigation, an owner identifier for displaying a record, or a flag that controls whether a button appears. The security problem begins when the server later accepts that client-supplied state as proof that an action is allowed. A client is outside the server’s trust boundary. A browser, mobile application, API consumer, or desktop client can send requests that differ from the interface the developer intended. If changing a client-controlled field can change an authorization result, a user may gain authority that the server never granted.

Cybersecurity 09 Sep 2026 11 min read

Treat Certificate Pinning as a High-Cost Trust Decision

TLS normally lets a client authenticate a server through a certificate chain anchored in a trusted certificate authority. A developer may look at that broad trust model and decide to add certificate pinning: require the server to present not only a normally valid certificate, but also certificate or public-key material that the application already expects. That extra restriction can reduce risk in a narrow threat model. It can also turn an ordinary certificate or key rotation into an outage if the application has no usable replacement pin. For many applications, especially ordinary websites, the operational risk is not justified.

Cybersecurity 09 Sep 2026 10 min read

Treat Account Email Changes as Security-Sensitive

Changing an account email address can look like an ordinary profile edit. In many systems, however, the email address is also used for sign-in, password recovery, security notifications, or proving control of the account. That makes the change a security-sensitive transition, not merely a text-field update. If an application lets a valid session replace the account email without additional checks, a stolen or unattended session may be enough to redirect future recovery messages to someone else. The legitimate user can then lose both a warning channel and a path back into the account.

Software Engineering 09 Sep 2026 9 min read

Transactional Outbox for Reliable Message Publishing

Transactional Outbox for Reliable Message Publishing A common service operation has to do two things: change its own data and tell another part of the system what happened. For example, an order service may mark an order as paid and publish an OrderPaid message. The awkward part is that the database and message broker usually have separate commit mechanisms. If the service updates the database and then publishes, it can crash between those steps. If it publishes first, the database update can fail afterward. Either order can leave the two systems disagreeing about what happened.

Artificial Intelligence 09 Sep 2026 11 min read

Train with Unlabeled Data Using Mean Teacher

Labeled examples are often the expensive part of an AI system. You may have millions of inputs but only a small subset with trustworthy labels. Training only on the labeled subset ignores information in the rest of the data, while assigning guessed labels too aggressively can teach the model its own mistakes. Mean Teacher is a semi-supervised learning method for this situation. It trains a normal model, called the student, while maintaining a second model, called the teacher, whose parameters are an exponential moving average of the student’s parameters. The student learns from real labels when they exist and is also encouraged to make predictions that agree with the teacher on unlabeled inputs.

Artificial Intelligence 09 Sep 2026 12 min read

Train Discrete Neural Operations with Straight-Through Estimators

Neural networks are usually trained with gradient descent, which depends on small changes in parameters producing informative changes in the loss. A discrete operation can break that assumption. Rounding a value, choosing a binary gate, or selecting a quantized level may be exactly what the forward computation needs, yet its derivative can be zero almost everywhere or undefined at transition points. A straight-through estimator (STE) is a practical way to keep training in that situation. The forward pass uses the discrete operation, while the backward pass substitutes a simpler derivative so that a gradient can flow through it. The important consequence is easy to miss: the backward signal is generally not the true derivative of the discrete forward computation. It is a deliberately chosen surrogate.

Python 09 Sep 2026 11 min read

Stop Stuck Process Pools with Python 3.14

ProcessPoolExecutor is a convenient way to spread CPU-bound Python work across multiple processes. Most of the time, its normal shutdown behavior is exactly what an application wants: stop accepting work, let running tasks finish, and clean up worker processes. Some failures do not fit that model. A worker can become stuck in native code, wait indefinitely on an external resource, or execute a task whose runtime has exceeded the application’s operational deadline. At that point, cancelling a Future may not stop work that is already running, and waiting for an orderly pool shutdown may take too long.