Skip to content

Archive / page 85

All articles

Every practical article from the Nalar archive, newest first.

Tech 02 Sep 2026 8 min read

What Screen Resolution Means and When More Pixels Help

Screen specifications often include numbers such as 1920 × 1080, 2560 × 1440, or 3840 × 2160. These numbers describe the display’s pixel resolution: the number of addressable picture elements arranged horizontally and vertically. More pixels can produce sharper text and finer image detail, but resolution alone does not tell you how large things will appear, how much workspace you will have, or whether the difference will be obvious in everyday use.

Tech 02 Sep 2026 8 min read

What Screen Refresh Rate Means in Everyday Use

A display specification may list a refresh rate such as 60 Hz, 90 Hz, 120 Hz, or 144 Hz. The number describes how many times per second the display can refresh the image it shows. A higher refresh rate can make motion look smoother and controls feel more immediate, but it does not automatically improve image sharpness or guarantee that every app will run at the display’s maximum rate. Understanding refresh rate is easier when you separate what the screen can display from how quickly the device can produce new frames.

Tech 02 Sep 2026 8 min read

What RAM Does and How Much Memory You Actually Need

Random-access memory, usually shortened to RAM, is one of the specifications people see when buying a computer, tablet, or phone. A device might have 8 GB, 16 GB, 32 GB, or more, but the number is easy to misunderstand. RAM is not the same as permanent storage. It is fast working memory that the system uses while applications, documents, browser tabs, and background services are active. More RAM can make a device handle heavier workloads more comfortably, but adding memory does not automatically make every task faster. The useful question is whether your workload regularly needs more memory than the device can provide efficiently.

Tech 02 Sep 2026 7 min read

What DNS Does and Why It Can Affect Browsing

When you enter a website address into a browser, your device usually needs to discover which network address belongs to that name before it can connect. The system that performs this translation is the Domain Name System, or DNS. DNS normally works quietly in the background. Because it is involved near the beginning of many internet connections, however, a DNS problem can make a healthy connection feel broken. A website may fail to open even though Wi-Fi is connected and other network services still work.

Tech 02 Sep 2026 7 min read

What Browser Cache Does and When to Clear It

Web browsers routinely save copies of some website resources on your device. This local storage is called a browser cache, and it exists mainly to make repeated visits more efficient. Caching is usually helpful. It can reduce unnecessary downloads, make pages feel faster, and lower network usage. But cached resources can occasionally become stale or conflict with a website that has changed, which is why clearing the cache is a common troubleshooting step.

Tech 02 Sep 2026 7 min read

What Battery Health Means on Phones and Laptops

Rechargeable batteries make phones and laptops portable, but they do not keep their original capacity forever. As a battery ages, the amount of energy it can store gradually falls, so the device may run for less time between charges. Many modern devices expose a battery health reading to describe this change. The number is useful, but it is easier to interpret when you understand what it measures, why batteries age, and which everyday habits have the largest effect.

Tech 02 Sep 2026 7 min read

What Airplane Mode Does on Your Phone

Airplane mode is a phone setting that quickly disables wireless radios used for cellular communication. It was created to make it easy to comply with rules for personal electronic devices during flights, but it is also useful in several everyday situations. The name can make the feature sound more absolute than it is. Turning on airplane mode does not shut down the phone, erase network settings, or necessarily prevent every form of wireless communication. On modern phones, you can often enable Wi-Fi or Bluetooth again while airplane mode remains active.

Python 02 Sep 2026 8 min read

Weak References in Python: Caches, Object Lifetimes, and Cleanup

A normal Python reference keeps an object alive. That is usually exactly what you want: if a dictionary contains an object, the object should remain available while the dictionary needs it. Some infrastructure has a different requirement. A cache, registry, or metadata table may want to refer to an object without becoming the reason that object stays alive forever. Python’s weakref module provides references and containers for that ownership model.

Database 02 Sep 2026 5 min read

Understanding Write Skew and Transaction Isolation

Transaction isolation is often explained with dirty reads and lost updates, but another anomaly is especially important for multi-row business rules: write skew. Write skew occurs when concurrent transactions read the same valid state, make decisions independently, and update different rows in a way that produces an invalid combined state. Because they do not overwrite the same row, ordinary write-conflict detection may not stop them. A simple invariant Imagine an on-call table where at least one doctor must remain available:

Python 02 Sep 2026 6 min read

Structured Concurrency in Python with asyncio.TaskGroup

Concurrent code becomes difficult to reason about when tasks can outlive the operation that created them. A request handler may return while background tasks are still running, or one task may fail while its siblings continue doing work that is no longer useful. Python’s asyncio.TaskGroup, available since Python 3.11, provides structured concurrency for related asynchronous tasks. Tasks created inside the group belong to a clear lifetime: leaving the async with block waits for them, and failures are handled as a group rather than as detached background events.

Tech 02 Sep 2026 7 min read

SSD vs Hard Drive: What the Difference Means in Everyday Use

When choosing storage for a computer or an external drive, two common options are a solid-state drive (SSD) and a hard disk drive (HDD). Both can store operating systems, applications, photos, videos, documents, and backups, but they work in very different ways. For everyday use, the biggest differences are speed, physical durability, noise, power consumption, capacity, and cost. Understanding those trade-offs makes it easier to decide where each type of storage fits.

Database 02 Sep 2026 7 min read

SQLite WAL Mode: Concurrency, Checkpoints, and Operational Pitfalls

SQLite is often chosen because it keeps deployment simple: an application can get transactional storage without operating a separate database server. As workloads become more concurrent, however, the default rollback journal can make read and write activity interfere more than expected. Write-ahead logging (WAL) changes that coordination model. Readers can usually continue while a writer commits changes, but WAL does not turn SQLite into a multi-writer database. Correct operation still depends on short transactions, sensible busy handling, and checkpoints that can make progress.

Database 02 Sep 2026 8 min read

SQLite Savepoints: Partial Rollback Inside a Transaction

A transaction normally gives application code an all-or-nothing boundary: either commit its changes or roll them all back. Some workflows need a smaller recovery point inside that larger unit of work. SQLite provides that recovery point with savepoints. A savepoint lets code mark a position inside a transaction, perform additional work, and later undo only the changes made after that position. The surrounding transaction can remain active. Savepoints are useful for batch processing, optional sub-operations, library code that may run inside an existing transaction, and workflows where one recoverable step should not discard earlier valid work.

Python 02 Sep 2026 7 min read

Single Dispatch in Python: Extensible Type-Based Behavior

A function that accepts several kinds of input often begins with a few isinstance() checks. That approach is straightforward when the cases are small and local. As the number of supported types grows, however, one function can become a long decision tree that mixes unrelated implementations. Python’s functools.singledispatch offers another design. It turns one function into a generic function whose implementation is selected from the runtime type of its first argument. Type-specific behavior can then be registered separately while callers keep using one public function.

Go 02 Sep 2026 7 min read

Short Reads and Exact-Length I/O in Go

Reading bytes in Go looks simple: allocate a buffer, call Read, and inspect the error. The subtlety is that io.Reader does not promise to fill the buffer in one call. A valid reader may return fewer bytes than requested even when more data will arrive later. That behavior matters for network protocols, binary file formats, framed messages, and any code that expects an exact number of bytes. Correct stream handling starts by matching the API to the requirement: use ordinary Read when partial progress is acceptable, and use helpers such as io.ReadFull when a fixed-size field must be complete.

Artificial Intelligence 02 Sep 2026 5 min read

Semantic Caching for LLM Applications Without Serving Stale Answers

Large language model requests are expensive compared with ordinary cache lookups. When users repeatedly ask questions with slightly different wording, an exact string cache misses even though the intended answer may be identical. A semantic cache uses vector similarity to decide whether a new request is close enough to a previous request that its answer can be reused. The idea is attractive, but the difficult part is not storing embeddings. It is deciding when reuse is actually safe.

Rust 02 Sep 2026 4 min read

Rust Iterator Ownership: iter, iter_mut, and into_iter

Rust iteration becomes much easier once iterator choice is connected to ownership. For a collection such as Vec<T>, the central question is whether the loop should borrow values, mutate them in place, or consume the collection. The common methods are iter(), iter_mut(), and into_iter(). Borrow with iter() iter() produces shared references: fn print_names(names: &[String]) { for name in names.iter() { println!("{name}"); } } Inside the loop, name has type &String.

Data Science 02 Sep 2026 5 min read

Robust Outlier Detection with Median Absolute Deviation

Outlier detection often begins with a rule such as “flag values more than three standard deviations from the mean.” That works reasonably well for approximately normal data without severe contamination, but the same extreme observations you want to detect can move both the mean and the standard deviation. Median absolute deviation, usually abbreviated MAD, provides a more robust alternative. Why mean and standard deviation can be fragile Consider response times in milliseconds:

Python 02 Sep 2026 4 min read

Request-Scoped State in Python with contextvars

Applications often need small pieces of context to follow a request through several layers: a request ID, tenant identifier, locale, or tracing field. Passing every value through every function is explicit, but can become noisy when the value is cross-cutting rather than part of the function’s business input. Python’s contextvars module provides context-local state designed to work with asynchronous code. Why a normal global is unsafe A module-level variable is shared by all concurrent requests:

Rust 02 Sep 2026 6 min read

Recovering Safely from Poisoned Mutexes in Rust

A mutex protects shared data from concurrent access, but mutual exclusion alone does not guarantee that the data remains valid. A thread can panic halfway through a multi-step update and release the lock during unwinding, leaving the protected value in a state that other threads should not blindly trust. Rust’s standard Mutex records this situation through poisoning. A poisoned mutex is still lockable, but acquiring it returns an error that forces the caller to decide whether continuing is appropriate.

Go 02 Sep 2026 4 min read

Reading Streams Correctly in Go with io.Reader

Go’s io.Reader interface is tiny: type Reader interface { Read(p []byte) (n int, err error) } Its small surface hides an important contract: a read is allowed to return fewer bytes than the buffer can hold, and it can return useful bytes together with an error. Correct stream processing must handle both cases.

Python 02 Sep 2026 9 min read

Python memoryview: Zero-Copy Access to Binary Buffers

Binary-processing code often needs only a small region of a larger byte buffer. A normal bytes or bytearray slice is convenient, but it creates a new object containing copied data. When buffers are large or slicing happens repeatedly on a hot path, those copies can become unnecessary allocation and memory traffic. Python’s memoryview provides a different model. It exposes data from an object that supports the buffer protocol and lets Python code work with that data without first copying it into a new bytes object.

Python 02 Sep 2026 9 min read

Python Descriptors: Reusable Attribute Behavior Without Magic

Python properties are useful when one class needs a managed attribute. When the same attribute behavior must be reused across many fields or classes, repeating nearly identical properties becomes harder to maintain. Descriptors provide the protocol underneath properties, bound methods, classmethod, staticmethod, and other familiar Python features. A descriptor is an object stored on a class that can participate in reading, writing, or deleting an attribute. Descriptors are powerful because they integrate with normal dotted access such as obj.width. They are also easy to misuse if you do not understand where descriptor instances live, how values should be stored, and which lookup rules Python applies.

Software Engineering 02 Sep 2026 9 min read

Preventing Lost Updates with HTTP ETags and Conditional Requests

Two clients can read the same resource, make different edits, and then save them seconds apart. Without a concurrency check, the later write can silently replace the earlier one. This is the lost update problem. HTTP already provides a protocol-level mechanism for avoiding that failure: validators such as entity tags (ETags) combined with conditional request headers. Used correctly, they let a client say, “apply this change only if the resource is still the version I read.”