Urgent.News

What's breaking now, across thousands of outlets.

Tech

Devbox: Portable and Isolated Development Environments

Introduction I am one of those people who need to have everything in its place to be able to do something. This applies, of course, when I work with a local or remote repository. I need to have all the dependencies installed and configured; moreover, the environment must be prepared with all the tools and with signaling showing the current status of the environment. By signaling, I mean the…

Introduction: The author, who is detail-oriented, shares their need for a well-organized development environment. This includes installed dependencies, configured tools, and a friendly terminal prompt.

Environment setup: The author uses a terminal with the iTerm and zsh, along with the Presto extension for enhanced functionality. They employ a Nix environment and a terminal multiplexer (Zellij).

Challenges with Nix: While Nix is a powerful tool for managing development environments, it has drawbacks. It creates global repositories for all installed packages, making cleanup difficult. Additionally, managing Nix requires learning a complex language.

Alternative solution: Devbox is presented as a better alternative to Nix for the author's specific usage. Devbox generates repositories by project and uses a JSON file called devbox.json for configuration, making it easier to share and automate environments.

Creating the environment: To set up Devbox, users need to install it using a shell command and create a directory for the project. The devbox.json file is automatically generated and can be reviewed for its contents.

Packages and dependencies: Devbox simplifies the process of adding packages and dependencies. Users can search for packages and specify versions using the at sign. Devbox also offers pre-configured configurations for various languages, making it more user-friendly compared to Nix.

Starting the shell: Users can start the Devbox shell by running the 'devbox shell' command. The terminal prompt changes to indicate the active environment. Users can check dependencies and test the virtual environment within the shell.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

The hashCode()-to-Array-Index Bug Almost Everyone Writes Once

"hash % capacity" looks trivial until you trace it by hand. Two separate bugs hide in that one line — and the fix for one of them has its own hole.

  • Modulo operator returns signed 32-bit integer, can be negative
  • Math.abs() fails for Integer.MINVALUE, no positive counterpart
  • Math.floorMod() ensures non-negative result for all integers

When SQL Has Nothing to Say: Understanding NULLs

NULL in SQL carry different meanings; missing value unknown value no value inapplicable data customer_id customer_name contact 101 Alice 0712345678 102 Brian NULL 103 Carol 0798765432 You shouldn't…

  • NULL in SQL signifies missing, unknown or not applicable values
  • SQL uses three-valued logic with TRUE, FALSE and UNKNOWN
  • IS NULL and IS NOT NULL functions retrieve rows with or without NULL values

Review Agent PRs for Silent Interface Drift

A checkout squad opened an agent pull request on Monday. The title claimed a small null-safety cleanup. The diff looked tiny in GitHub. The helper loadInvoice stopped throwing NotFoundError .

  • Agent PR changes return shape from NotFoundError to null
  • Staging converts missing invoices to HTTP 500 errors
  • Reviewers must manually inventory call sites to detect contract drift

More from Sunday 6 September →