Alex CAD: 40 Minutes of Incredible Improvements

Alex CAD: 40 Minutes of Incredible Improvements

In a single focused session this morning (7:36 AM – 8:16 AM), we transformed Alex CAD with security patches, a major new feature, and comprehensive code refactoring.

Alex CAD with resizable panels

What We Accomplished in 40 Minutes

Phase 1: Security Fixes (11 minutes)

Critical Vulnerability Patched

  • CVE-2025-66418 Fixed: Updated urllib3 from 1.26.6 → 2.6.0
  • Addressed unbounded decompression chain vulnerability
  • Updated requests library for compatibility (2.26.0 → 2.32.3)

Dependency Modernization
Updated 24 packages from 2021 versions to modern 2024-2025 releases:

  • matplotlib: 3.4.2 → 3.9.4
  • numpy: 1.20.1 → 1.26.4
  • scipy: 1.7.1 → 1.13.1
  • Pillow: 8.1.0 → 11.3.0

Phase 2: Dual Monitor Fix (10 minutes)

Fixed a frustrating issue where Alex’s window would span across both monitors on dual-monitor setups.

Phase 3: Dynamic Panel Resizing (9 minutes)

This was the game-changer! We completely reimagined the view layout:

What Changed

  • Before: Fixed grid layout with unchangeable panel sizes
  • After: Fully resizable panels with draggable dividers

Technical Implementation

  • Replaced Tkinter grid layout with nested PanedWindow widgets
  • Created 2×2 grid of resizable view panels (Top, Side, Front, Iso)
  • Added resize event handlers to IsoView class
  • Views automatically recenter when panels resize
  • Zoom levels preserved during resize operations

Phase 4: Code Quality Refactoring (10 minutes)

We performed a comprehensive refactoring to improve long-term maintainability:

New Modules Created:

  • ViewConfig – Centralized configuration constants
  • ViewPanel – Reusable panel component (eliminated ~40 lines of duplication)
  • view_layout – Separated layout logic (reduced AlexCAD.py by ~90 lines)

Improvements:

  • Improved resize handler with robust debouncing
  • Added type hints throughout for better IDE support

Impact Metrics

Code Quality

  • Reduced duplication: ~40 lines eliminated
  • Improved organization: 3 new focused modules
  • Net reduction: ~90 lines in main file
  • Type safety: Type hints throughout

Files Changed

  • +370 insertions, -101 deletions
  • 3 new modules created
  • 5 files modified

Key Takeaways

  1. Security First: Immediately addressed the critical vulnerability
  2. User-Focused: Implemented the requested dynamic resizing feature
  3. Quality Matters: Didn’t stop at “working” – refactored for maintainability
  4. Clean Process: Proper git workflow with feature branches
  5. Zero Downtime: Alex remained functional throughout all changes

Try It Yourself

Alex CAD is open source! Check out the repository at github.com/wyolum/Alex

The resizable panels feature makes it easier than ever to customize your workspace for aluminum extrusion design projects.


This incredible 40-minute session demonstrates what’s possible when you combine focused effort, modern tools, and a commitment to code quality. From security vulnerability to fully refactored, feature-enhanced application – all in less time than a typical meeting!

Leave a Reply