SShortSingh.
Back to feed

How to test your app on a bad network from a Mac using free tools

0
·2 views

Networking bugs often go unnoticed on fast office Wi-Fi but surface on slow or unreliable connections. The article shows how to simulate poor networks for free on a Mac, using Apple's Network Link Conditioner for macOS, iOS devices, and the iOS Simulator. It also covers throttling the Android emulator and using Chrome DevTools for browser and web view testing. The guide emphasizes testing latency rather than just bandwidth, reviewing default request timeouts, and preventing duplicate submissions through retries and idempotency keys. It further recommends checking recovery after going offline and optimizing large responses for slow links before a release.

Read the full story at DEV Community

This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)

Log in to join the discussion and vote.

Log in

Related stories

0
ProgrammingDEV Community ·

FSCSS 1.2.3 Adds Derived Arrays for Reusing Method Output as Collections

FSCSS array methods such as .reverse, .list, and .length return strings rather than array objects, and they cannot be chained. Version 1.2.3 introduces derived arrays, where a new @arr declaration takes a method's output and resolves it into a proper array that can be indexed, looped over, and derived from again. The approach is illustrated with examples such as reversing a color list, building 1-based index sequences sized to a source array, and appending items with the mutation operator. The guidance recommends declaring a new array step whenever a result needs to be reused, since chaining is unsupported. The author notes that derived arrays add no new runtime type but make method results dependable for practical module patterns.

0
ProgrammingDEV Community ·

Hardening Local Reverse Proxies for AI Agent Sidecars and MCP Tools

Developers running MCP servers, local vector databases, and AI coding agents often expose many localhost services through reverse proxies such as Nginx, Caddy, or Traefik. A common docker-compose mistake maps ports to 0.0.0.0, which lets any device on the same local network reach internal agent tooling. Binding explicitly to 127.0.0.1 closes that exposure. The article also warns of DNS rebinding attacks, where a malicious site can use a rebound DNS record to make a browser send requests to local endpoints, and recommends strict Host header whitelisting as a defense. Blocking path traversal and access to sensitive dotfiles at the proxy layer is also advised.

0
ProgrammingDEV Community ·

Storing Money in Code: Integer Cents Versus Decimal Types

This lecture is aimed at developers who need to store prices, total carts, split bills, or convert currencies without losing a cent. It demonstrates that binary floating-point errors corrupt amounts: int(19.99 * 100) yields 1998 instead of 1999, and the same flaw appears in JavaScript and SQLite. The recommended approach is to store amounts as integer counts of each currency's minor unit, such as 1999 for 19.99 USD, which keeps arithmetic exact across languages and databases. Because minor-unit counts differ by currency (JPY and KRW have none, USD and EUR have two, BHD has three), the author found that locale formatters and runtime libraries disagree, so developers should maintain their own currency table. A small Python converter is provided that parses text with Decimal and rejects input with more decimal places than the currency allows.

0
ProgrammingDEV Community ·

AI-Suggested npm Package Didn't Exist, Exposing 'Slopsquatting' Risk

AI assistants sometimes recommend installable packages that do not exist, and attackers can exploit this by registering those names and publishing malicious code. This practice, called slopsquatting, was seen with a fabricated package named react-codeshift, which appeared in over 200 GitHub files after AI-generated instructions cited it. Security researcher Charlie Eriksen of Aikido registered the name first on January 14, 2026, as a harmless placeholder, though it still draws dozens of downloads weekly. The article demonstrates that npm lifecycle scripts like postinstall can execute automatically during installation, even without importing the package. It recommends checking a package's existence, age, and download count in the registry before installing anything an AI suggests.