Published: May 24, 2024

Why I Left Ubuntu

I recently upgraded to Ubuntu 20.04 LTS, but my experience wasn't as smooth as I'd hoped. Here's why I decided to switch back to Windows and my setup process for an optimal development environment.

The Breaking Point

The upgrade to 20.04 LTS caused my system to stop working due to endless issues with NVIDIA drivers. Despite trying multiple versions (450, 460, 470), the problems persisted. I wasn't the only one facing these challenges.

The time I spent troubleshooting these issues on Stack Overflow and AskUbuntu could have been used more productively. This became the catalyst for reconsidering my entire development setup.

Why Windows Won Me Back

Proprietary Software Dependencies: I needed Adobe software for certain tasks, which meant dual-booting between Linux and Windows. This disrupted my workflow, especially when I had to switch for a quick edit. Alternatives like OBS Studio and GIMP just didn't match the functionality and intuitiveness of Adobe products.

Peripheral Support Issues: My peripherals, such as Razer Synapse and Logitech Studio, lacked proper software support on Linux. This limited advanced functionalities that are readily available on Windows. My camera stopped working on Ubuntu, and I had to switch to Windows to use it for calls.

Development Environment Friction: Although developing in the same environment as my deployment was beneficial, most of my work was containerized with Docker. Using Windows with WSL2 or Docker provided a similar experience without the extra hassle.

I faced issues with log management, where my syslog was getting too large, and I had to manually set up logrotate to force the logs to rotate and delete automatically. Setting up VPNs and other utilities was more cumbersome on Ubuntu compared to the seamless installation and integration on Windows.

Application Availability: The lack of certain applications, like Surfshark VPN and Notion, was inconvenient. While there are Linux alternatives, they often required additional setup and weren't as user-friendly.

Given these challenges, the benefits of using Ubuntu didn't outweigh the negatives for me. I decided to switch back to Windows, where I could focus more on coding and less on system maintenance.

Coming back to Windows, I set up the fresh 2TB NVMe I had Ubuntu on as a dedicated Dev Drive. This comprehensive resource helped me optimize my development environment on Windows.

Setting Up the Development Environment

For developers interested in optimizing their Windows setup, here's how I configured my environment for a seamless development experience.

Adding Git Bash to Windows Terminal

From this Stack Overflow post, you can add Git Bash to Windows Terminal by adding this configuration:

{
  "guid": "{00000000-0000-0000-ba54-000000000002}",
  "commandline": "%PROGRAMFILES%/Git/bin/bash.exe -i -l",
  "icon": "%PROGRAMFILES%/Git/mingw64/share/git/git-for-windows.ico",
  "name": "Bash",
  "startingDirectory": "%USERPROFILE%"
}

PowerShell Git Aliases

To achieve the same functionality as GitBash aliases in PowerShell, you can create functions. For example, a function that adds, commits, and pushes changes to your Git repository.

The GitBash equivalent used to be:

alias gacp='f(){ git add . && git commit -m "$1" && git push; }; f'

In PowerShell, open your profile script by running notepad $PROFILE and add the function:

function gacp {
    param (
        [string]$message
    )
    git add .
    git commit -m $message
    git push
}

Optimizing with Dev Drive

A Dev Drive utilizes the Resilient File System (ReFS) to optimize storage for development workloads, providing faster performance and customizable settings. ReFS is a newer Microsoft file system format designed to maximize data availability, scale efficiently to large data sets across diverse workloads, and provide data integrity with resiliency to corruption.

The Dev Drive enables you to initialize a storage volume specifically for development workloads, with ReFS optimizations that improve the performance of key developer scenarios.

Storage Strategy

What to Store on Dev Drive:

  • Source code repositories and project files
  • Package caches for faster dependency resolution
  • Build output and intermediate files

What Not to Store on Dev Drive:

  • Developer tools like Visual Studio, MSBuild, .NET SDK, etc.

Package Cache Configuration

A package cache is the global folder location used by applications to store files for installed software. These source files are needed when you want to update, uninstall, or repair the installed software.

Npm cache (Node.js):

  • Create an npm cache directory on your Dev Drive: D:\packages\npm
  • Set a global environment variable: setx /M npm_config_cache D:\packages\npm

Pip cache (Python):

  • Create a pip cache directory on your Dev Drive: D:\packages\pip
  • Set a global environment variable: setx /M PIP_CACHE_DIR D:\packages\pip
  • Move existing cache contents from %LocalAppData%\pip\Cache to this directory

Python Environment Setup

Python Installation:

  • Install all versions of Python via the Microsoft Store for automatic updates and easy management
  • Install pipx following the pipx documentation for isolated tool installations

Poetry Configuration:

  • Install Poetry for dependency management
  • View current configuration: poetry config --list
  • Set cache directory to Dev Drive: poetry config cache-dir "D:\\packages\\pypoetry"

This setup ensures your Python toolchain leverages the performance benefits of the Dev Drive while maintaining clean separation of concerns.

Final Thoughts

Switching back to Windows has streamlined my development workflow, allowing me to focus on coding rather than troubleshooting. While Linux has its merits, the stability and comprehensive software support of Windows make it a better choice for my current needs.

The combination of WSL2, Docker, and a properly configured Dev Drive provides the best of both worlds: the familiarity and stability of Windows with the development capabilities traditionally associated with Linux environments.

For developers considering a similar transition, the Windows development environment guide provides comprehensive setup instructions to optimize your workflow.