Skip to content

Archive / page 44

All articles

Every practical article from the Nalar archive, newest first.

Tech 11 Sep 2026 7 min read

What IP Ratings Tell You About Dust and Water Protection

An IP rating can make a phone, speaker, smartwatch, or pair of earbuds sound ready for almost any wet or dusty situation. A label such as IP67 or IP68 is useful, but it describes performance under defined tests rather than a promise that the device can handle every kind of exposure. The code becomes much easier to use once you separate its two parts. The first digit concerns protection against access and solid objects, including dust at the higher levels. The second concerns water. Each part represents a particular test category, so the number is more like a compact test result than a general durability score.

Tech 11 Sep 2026 7 min read

What Hardware Acceleration Does in a Web Browser

A browser setting called hardware acceleration can sound as if it simply makes the internet faster. That isn’t quite what it does. Your connection can stay exactly the same while hardware acceleration changes how efficiently the computer draws pages, plays video, runs visual effects, or handles other graphics-heavy work. The basic idea is straightforward: instead of asking the main processor to do every kind of computation itself, the browser can hand suitable work to hardware designed for that job. On a typical computer, that often means using the graphics processing unit, or GPU.

Tech 11 Sep 2026 8 min read

What Display Scaling Changes on High-Resolution Screens

A laptop can have a very high-resolution screen and still show large, comfortable text. Another screen with the same resolution can fit much more on the desktop but make everything look smaller. The difference often comes from display scaling. Display scaling lets an operating system draw interface elements at a practical apparent size while still using the detail available from a dense screen. It separates two ideas that are easy to mix up: how many physical pixels the panel has and how large software makes things appear.

Tech 11 Sep 2026 9 min read

What Airplane Mode Actually Changes on Your Phone

Airplane mode looks like a single on-off switch, but modern phones have several separate wireless systems. Turning the setting on does not necessarily make the phone completely radio-silent, and it does not stop apps or the phone itself from working. The useful mental model is simple: airplane mode changes wireless connections, not the entire device. It primarily prevents the phone from using its normal cellular connection and changes the state of other radios such as Wi-Fi and Bluetooth. On many current devices, Wi-Fi and Bluetooth can then be enabled again while airplane mode remains active.

Tech 11 Sep 2026 8 min read

What a USB-C Hub Can and Cannot Do

A USB-C hub can turn one compact port into several connections for storage, displays, keyboards, network cables, memory cards, and charging. That makes a hub look simple: plug it in, gain more ports. The catch is that USB-C describes the connector, not one fixed set of capabilities. Two laptops can have identical-looking USB-C sockets yet support different data speeds, display features, and charging behavior. The hub has its own limits too.

Tech 11 Sep 2026 8 min read

What a Factory Reset Does to a Phone

A factory reset is the closest common phone setting to starting over. It can clear years of apps, accounts, messages, downloaded files, preferences, and other local data in one operation. That makes it useful before selling a phone or when a serious software problem has resisted simpler fixes, but it also makes the command easy to misunderstand. The key idea is simple: a factory reset primarily resets the phone’s local user environment. It does not reach into every service, storage device, or online account connected to the phone. Knowing that boundary makes it much easier to predict what will disappear and what can still exist elsewhere.

Cybersecurity 11 Sep 2026 10 min read

Verify Account Email Changes Before Trusting the New Address

Changing an account’s email address looks like an ordinary profile update. In many systems, though, that address is also used for password resets, security notifications, sign-in links, or account recovery. Replacing it immediately can therefore change who controls a recovery channel. The practical problem is simple: a new email address is only a claim until the application proves that the account holder can receive mail there. If the application treats the claim as trusted too early, a stolen session, typing mistake, or unsafe update flow can redirect security-sensitive messages to the wrong mailbox.

Tech 11 Sep 2026 10 min read

Variable Refresh Rate: What It Changes on a Display

A game can run at 60 frames per second one moment and 53 the next. A conventional display, meanwhile, may refresh on a fixed schedule. When those two rhythms do not line up, motion can show tearing or uneven pacing even when the average frame rate seems reasonable. Variable refresh rate (VRR) changes that relationship. Instead of requiring the display to refresh at one fixed interval, compatible hardware can vary the timing of refreshes so they follow frame delivery more closely.

Cybersecurity 11 Sep 2026 9 min read

Validate WebSocket Origins Before Accepting Browser Connections

A WebSocket connection can stay open for minutes or hours and carry commands in both directions. If a browser automatically attaches an authenticated session to the opening handshake, a hostile web page may be able to start that connection in the user’s browser unless the server checks which site initiated it. That creates a cross-site trust problem. The user can be signed in to app.example, visit another site in a separate tab, and still have the browser make requests that involve credentials associated with app.example. A WebSocket server that accepts the handshake based only on those credentials can give an untrusted page access to an authenticated channel.

Cybersecurity 11 Sep 2026 7 min read

Validate Origin Before Trusting Browser Requests

A web endpoint can receive a valid session cookie and still receive a request that the user did not intend to send. Browsers attach cookies according to cookie rules, not according to the intent of the page that caused a request. For sensitive state changes, that distinction matters. One useful defense is to check the request’s browser origin before accepting the action. An origin identifies the scheme, host, and port of the context that initiated a request. Comparing it with a small set of expected origins can reject requests arriving from browser contexts your application does not trust.

Cybersecurity 11 Sep 2026 9 min read

Validate Host Authority Before Trusting Request Metadata

HTTP applications often need to know which host a client intended to reach. Frameworks expose that value through fields such as Host, request.host, or a parsed request authority. It can look like infrastructure metadata, but at an application boundary it is commonly influenced by the client. That distinction matters when an application uses the value for security-sensitive work. A hostile authority can affect absolute links, redirects, cache entries, tenant selection, origin checks, or routing decisions if the application accepts it without a trust policy.

Cybersecurity 11 Sep 2026 10 min read

Validate File Uploads Before They Cross a Trust Boundary

File uploads turn data supplied by another party into something your application stores, processes, and often serves back later. A profile image, invoice attachment, or imported document can therefore cross several trust boundaries in one request. The common mistake is to treat a familiar filename or a browser-supplied media type as proof of what the file contains. Those values are useful hints, but the sender controls them. If later code makes security decisions from those hints alone, an unexpected file can reach an image decoder, document parser, web server, or other component that was never meant to handle it.

Software Engineering 11 Sep 2026 8 min read

Using a Facade to Reduce Dependency Surface

Using a Facade to Reduce Dependency Surface A feature starts with one call into a library. A few months later, every caller knows which three components to create, which methods must run first, which defaults belong together, and which low-level errors need translation. The subsystem still works, but its internal structure has leaked into the rest of the codebase. A facade is a deliberately simpler interface placed in front of a more complicated subsystem. Callers depend on the operations they actually need instead of coordinating the subsystem themselves. This article explains how to recognize that design problem, build a focused facade, and decide when the extra layer is useful rather than ceremonial.

Artificial Intelligence 11 Sep 2026 9 min read

Use Token Dropout to Train Robust Sequence Models

Use Token Dropout to Train Robust Sequence Models A sequence model can become too dependent on a few easy input clues. Remove one field, truncate a message, or corrupt a token at inference time, and a prediction that looked reliable on clean validation data may change sharply. Token dropout is a simple training-time corruption technique: randomly hide some input tokens while keeping the learning target unchanged. The model is forced to solve some training examples without every usual clue. Used carefully, this can reduce brittle dependence on individual tokens. Used carelessly, it can destroy information the task genuinely requires.

Tech 11 Sep 2026 7 min read

USB Host Mode on Phones and Tablets

A phone or tablet can sometimes use a USB flash drive, keyboard, mouse, card reader, audio interface, or another accessory without a computer in between. The connector alone does not make this possible. The mobile device has to take the USB role that a computer normally fills. That role is commonly called USB host mode. Once you understand it, several confusing situations become easier to explain: an accessory can fit the port yet remain undetected, a storage device can appear while another peripheral does not, and a powered hub can fix a connection that otherwise fails.

Artificial Intelligence 11 Sep 2026 10 min read

Understand Wide Neural Networks with the Neural Tangent Kernel

Understand Wide Neural Networks with the Neural Tangent Kernel A neural network may contain millions of parameters, yet a useful theoretical view asks a smaller question: when one training example changes the parameters, how does that update affect the prediction for another example? The neural tangent kernel (NTK) answers that question through gradients. It measures how similarly two inputs respond to an infinitesimal parameter update. In a particular infinite-width regime, this kernel becomes effectively fixed during training, turning a nonlinear parameter-optimization problem into a much simpler kernel process in function space.

Cybersecurity 11 Sep 2026 10 min read

Treat Recovery Codes as One-Time Authentication Secrets

Multi-factor authentication can lock out a legitimate user when a phone is lost, an authenticator is reset, or a security key is unavailable. Recovery codes give the user a controlled fallback. The risk is that this fallback can quietly become an easier way into the account than the authentication method it is supposed to recover. A recovery code is not just a convenience string. It is an authentication secret that may let someone bypass an unavailable factor. If an attacker obtains a valid code and the application accepts it, the application cannot tell that the person presenting it is not the legitimate user.

Artificial Intelligence 11 Sep 2026 10 min read

Train Through Discrete Decisions with the Straight-Through Estimator

Train Through Discrete Decisions with the Straight-Through Estimator Neural networks are usually trained by following gradients through a chain of differentiable operations. A hard discrete choice breaks that chain. Rounding a value, selecting a binary gate, or quantizing an activation can make the forward computation useful while leaving ordinary backpropagation with a zero or undefined derivative at the decision. The straight-through estimator (STE) is a practical workaround. It keeps the discrete operation in the forward pass but substitutes a simpler derivative during the backward pass. That makes optimization possible, at the cost of using a gradient that is not the true derivative of the forward computation.

Software Engineering 11 Sep 2026 9 min read

Tell, Don’t Ask: Keep Decisions with the Object That Owns the Data

Tell, Don’t Ask: Keep Decisions with the Object That Owns the Data A class can expose perfectly reasonable getters and still make a codebase harder to change. The trouble appears when callers fetch several values, interpret them, make a business decision, and then tell the object how to update itself. The data lives in one place, but the rule that gives the data meaning lives somewhere else. Tell, Don’t Ask is a design guideline for reducing that split. Instead of asking an object for internal state so a caller can decide what should happen, prefer telling the object the meaningful operation you want performed. The object can then apply the rules that belong with its state.

Software Engineering 11 Sep 2026 9 min read

Stable Dependencies Principle: Point Toward Stability

Stable Dependencies Principle: Point Toward Stability A dependency graph is not only a map of which component calls which other component. Its direction also determines which parts of a system can change independently. Consider a reporting component used by ten other components. Many callers depend on it, so changing its public contract can require coordinated work across the codebase. That reporting component has become relatively stable: not necessarily because its code rarely changes, but because many other components constrain how freely its contract can change.

Go 11 Sep 2026 6 min read

Sort Struct Slices in Go with slices.SortFunc

Sorting a slice of structs usually starts with a simple requirement such as “priority first, then ID.” The awkward part is expressing that ordering clearly enough that sorting, validation, and binary search can all agree on it. slices.SortFunc handles this directly. You give it the slice and a comparator that defines the order. It sorts the existing slice in place, so there is no separate result to assign. Sort a struct slice with slices.SortFunc Suppose a queue contains jobs that should be ordered by ascending priority and then by ID when priorities match:

Go 11 Sep 2026 7 min read

Sort Iterator Values Stably in Go with slices.SortedStableFunc

An iterator can produce values in an order that already means something: arrival order, file order, database order, or the order established by an earlier stage of a pipeline. If you need to sort those values by one key without scrambling equal-key groups, slices.SortedStableFunc handles both steps at once. It consumes an iter.Seq, collects the yielded values into a new slice, and sorts that slice with a comparator. When the comparator returns zero, the values keep the same relative order they had in the sequence.

Software Engineering 11 Sep 2026 8 min read

Shotgun Surgery: When One Change Touches Many Files

Shotgun Surgery: When One Change Touches Many Files A pricing rule changes from “free shipping above 50” to “free shipping above 75.” The rule is simple, but the pull request touches checkout, order previews, invoice generation, customer notifications, and tests in several modules. Miss one place and customers see contradictory behavior. That pattern is called shotgun surgery: one logical change requires many small edits scattered through the codebase. The problem isn’t the number of files by itself. The problem is that one decision has many owners.

Software Engineering 11 Sep 2026 10 min read

Shotgun Surgery: Reduce Scattered Change

Shotgun Surgery: Reduce Scattered Change A small requirement can produce a surprisingly large patch. Adding one order state means editing validation, formatting, notification, audit, and reporting code in different modules. Each edit may be simple, yet missing one can leave the system inconsistent. This recurring shape is often called shotgun surgery: one conceptual change forces small edits across many places. The practical problem isn’t the number of files by itself. It is that a single responsibility has been scattered, so developers must reconstruct the full change surface each time that responsibility evolves.