From b7fba00d60598000dbf70d9f9e4d5cc488c3a81e Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Fri, 10 Apr 2026 13:36:28 +0000 Subject: [PATCH 1/2] Add thousands separators to numerical CLI outputs * Updated `bitcoin_trading_simulation.py` to format large numerical values with commas (e.g., `$10,000.00` instead of `$10000.00`). * Appended UX learning to `.Jules/palette.md` noting the importance of readability for dense numerical data. Co-authored-by: EiJackGH <172181576+EiJackGH@users.noreply.github.com> --- .Jules/palette.md | 4 ++++ bitcoin_trading_simulation.py | 8 ++++---- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/.Jules/palette.md b/.Jules/palette.md index 8ee612f..a62d576 100644 --- a/.Jules/palette.md +++ b/.Jules/palette.md @@ -12,3 +12,7 @@ ## 2025-03-23 - Game Key Scrolling **Learning:** Browsers natively scroll the page when users press Space or Arrow keys. When building a web-based game, this creates a frustrating UX where the game viewport jumps around while playing. **Action:** Always call `e.preventDefault()` on keydown events for typical game controls ("Space", "ArrowUp", etc.) when the focus is on a game container or the body. + +## 2026-04-10 - Thousands Separators for Numerical Output +**Learning:** Dense numerical data (like $10000.00) in CLI output is hard to parse and increases cognitive load. Adding thousands separators ($10,000.00) significantly improves readability and the perceived quality of the tool. +**Action:** Always use thousands separators (e.g., `:,.2f` in Python) when formatting large numerical or financial values in CLI outputs. diff --git a/bitcoin_trading_simulation.py b/bitcoin_trading_simulation.py index 0d46e73..7e9b423 100644 --- a/bitcoin_trading_simulation.py +++ b/bitcoin_trading_simulation.py @@ -102,7 +102,7 @@ def simulate_trading(signals, initial_cash=10000, quiet=False): portfolio.loc[i, 'btc'] += btc_to_buy portfolio.loc[i, 'cash'] -= btc_to_buy * row['price'] if not quiet: - print(f"{Colors.GREEN}🟢 Day {i}: Buy {btc_to_buy:.4f} BTC at ${row['price']:.2f}{Colors.ENDC}") + print(f"{Colors.GREEN}🟢 Day {i}: Buy {btc_to_buy:,.4f} BTC at ${row['price']:,.2f}{Colors.ENDC}") # Sell signal elif row['positions'] == -2.0: @@ -110,14 +110,14 @@ def simulate_trading(signals, initial_cash=10000, quiet=False): cash_received = portfolio.loc[i, 'btc'] * row['price'] portfolio.loc[i, 'cash'] += cash_received if not quiet: - print(f"{Colors.FAIL}🔴 Day {i}: Sell {portfolio.loc[i, 'btc']:.4f} BTC at ${row['price']:.2f}{Colors.ENDC}") + print(f"{Colors.FAIL}🔴 Day {i}: Sell {portfolio.loc[i, 'btc']:,.4f} BTC at ${row['price']:,.2f}{Colors.ENDC}") portfolio.loc[i, 'btc'] = 0 portfolio.loc[i, 'total_value'] = portfolio.loc[i, 'cash'] + portfolio.loc[i, 'btc'] * row['price'] if not quiet: - print(f"Day {i}: Portfolio Value: ${portfolio.loc[i, 'total_value']:.2f}, " - f"Cash: ${portfolio.loc[i, 'cash']:.2f}, BTC: {portfolio.loc[i, 'btc']:.4f}") + print(f"Day {i}: Portfolio Value: ${portfolio.loc[i, 'total_value']:,.2f}, " + f"Cash: ${portfolio.loc[i, 'cash']:,.2f}, BTC: {portfolio.loc[i, 'btc']:,.4f}") if quiet and sys.stdout.isatty(): print() From 24612120d1f8fadedcbc8af6ed243f3a549c1763 Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Fri, 10 Apr 2026 13:39:33 +0000 Subject: [PATCH 2/2] Add thousands separators and fix CI Python build error * Removed standard library module `venv` from `requirements.txt` to fix `pip install` failures in CI. * Updated `bitcoin_trading_simulation.py` to format large numerical values with commas (e.g., `$10,000.00` instead of `$10000.00`). * Appended UX learning to `.Jules/palette.md` noting the importance of readability for dense numerical data. Co-authored-by: EiJackGH <172181576+EiJackGH@users.noreply.github.com> --- requirements.txt | 1 - 1 file changed, 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index cfaa995..4ad1501 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,3 @@ numpy pandas requests -venv