frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Show HN: Quantifying opportunity cost with a deliberately "simple" web app

https://shouldhavebought.com/
18•b0bbi•18h ago
Hi HN,

A while ago I had a mildly depressing realization.

Back in 2010, I had around $60k. Like a "responsible" person, I used it as a down payment on an apartment. Recently, out of curiosity, I calculated what would have happened if I had instead put that money into NVIDIA stock.

I should probably add some context.

For over 10 years I've worked as a developer on trading platforms and financial infrastructure. I made a rule for myself - never trade on the market.

In 2015, when Bitcoin traded about 300 usd, my brother and I were talking about whether it was a bubble. He made a bold claim that one day it might reach $100k per coin. I remember thinking it sounded unrealistic - and even if it wasn't, I wasn't going to break my rule.

That internal tension - building systems around markets while deliberately staying out of them is probably what made the "what if?" question harder to ignore years later.

The result was uncomfortable. The opportunity cost came out to tens of millions of dollars.

That thought stuck with me longer than it probably should have, so I decided to build a small experiment to make this kind of regret measurable: https://shouldhavebought.com

At its core, the app does one basic thing: you enter an asset, an amount, and two dates, and it gives you a plain numeric result - essentially a receipt for a missed opportunity.

I intentionally designed the UI to feel raw and minimal, almost like a late-90s terminal. No charts, no images, no emotional cushioning - just a number staring back at you.

What surprised me wasn't the result, but how much modern web infrastructure it took to build something that looks so simple.

Although the app is a single page with almost no UI elements, it still required:

- Client-side reactivity for a responsive terminal-like experience (Alpine.js)

- A traditional backend (Laravel) to validate inputs and aggregate historical market data

- Normalizing time-series data across different assets and events (splits, gaps, missing days)

- Dynamic OG image generation for social sharing (with color/state reflecting gain vs loss)

- A real-time feed showing recent calculations ("Wall of Pain"), implemented with WebSockets instead of a hosted service

- Caching and performance tuning to keep the experience instant

- Dealing with mobile font rendering and layout quirks, despite the "simple" UI

- Cron and queueing for historical data updates

All of that just to show a number.

Because markets aren't one-directional, I also added a second mode that I didn't initially plan: "Bullet Dodged". If someone almost bought an asset right before a major crash, the terminal flips state and shows how much capital they preserved by doing nothing. In practice, this turned out to be just as emotionally charged as missed gains.

Building this made me reflect on how deceptive "simplicity" on the web has become. As a manager I know says: "Just add a button". But even recreating a deliberately primitive experience today requires understanding frontend reactivity, backend architecture, real-time transport, social metadata, deployment, and performance tradeoffs.

I didn't build this as a product so much as an experiment - part personal curiosity, part technical exploration.

I'd be very interested to hear how others think about:

Where they personally draw the line on stack complexity for small projects?

Whether they would have gone fully static + edge functions for something like this?

How much infrastructure is "too much" for a deliberately minimal interface?

And, optionally, what your worst "should have bought" moment was?

Happy to answer any technical questions or dig into specific implementation details if useful.

Comments

eru•1h ago
Wouldn't this need to know what I actually did instead?

When I use it, it tells me that the form was incomplete. I tried to figure out how much I regret having bought 0 bitcoin so far.

Perhaps needs a better error message? I think it actually doesn't like the zero, but prevents it doesn't like incomplete data. Zero is also a number.

> CAUSALITY_ERROR: You cannot SELL before you BUY.

https://en.wikipedia.org/wiki/Short_(finance)

Needs at least a better error message that short sells aren't supported, instead of trying to be too clever by half about causality.

b0bbi•1h ago
Thanks for the "zero", it really does matter in a calculator like this.

Fair point on the shorting - I definitely prioritized retro drama over actual market mechanics there!

PowerElectronix•1h ago
The first thing one has to do when analysing past money decisions is to judge the decision based on the information available at the time.

I too watched from the sidelines as btc, nvda and others went to the moon. But with the information available at the time, investing in those was not a sound strategy.

hsbauauvhabzb•1h ago
There are plenty of people that thought WeWork would go to the moon, too.
b0bbi•1h ago
It's true.

In my experience, you'll be able to evaluate the correctness of your actions today in about five years, when you have more data and results.

cs02rm0•52m ago
Survivor bias again - these are the few that made it while many others did not.
renewiltord•51m ago
Oh good grief. $2.5m. That’s pretty funny. Hard to imagine I would have held through the ride but a pretty penny nonetheless. Not as bad as my buddy who sold his $200k grant in 2017 to buy a San Jose townhome that costs exactly the same today hahaha!
b0bbi•6m ago
Ouch, that San Jose townhome story is actual physical pain.

WELCOME TO REALITY. IT’S EXPENSIVE.

endymion-light•51m ago
This is quite a fun website, what have you used for the backend, i've been wanting to get more deployments for small web tools but the hug of death always worries me
con•47m ago
Why stop at financial loss? I did https://whentheywere.com - enter your DOB and get a feel on how you compare to Einstein, Michael Jordan, Steve Jobs and others.

Here's one for 01/01/1990: https://whentheywere.com/?date=1990-01-01

You can subscribe to a calendar and get notified when you are exactly the age someone was, when they achieved something.

Bishonen88•45m ago
hindsight is 20/20. If I'd known that Nvda, Aapl, Amzn etc. would go up, it's easy to now to regret how much money we'd have. Same thing with "RSU's" we get at FAANG. I often hear from coworkers that if they wouldn't have sold them when they got them, they'd be rich right now. Yes, they would be - but in an alternate universe, they'd have little/nothing and wouldn't have bought the car/camera/vacation they got out of the money when they sold the RSUs.

I added something related to this idea to my life-planning app: what if for projections. I track all my expenses/incomes/investments in my app. I then can with 1 click run a scenario where I move certain expenses to investments. I.e. cancelling netflix for 10 years, or xbox gamepass etc. and seeing what it would actually do to my 10 year projection (which already accounts for ETFs/Stock with variable return rates etc.). i.e.:

Exclude Recurring Expenses Simulate cutting these expenses and investing the savings Redirecting €19.99/month to investments

Then I see black on white what would happen if I get rid of all the 'small' subscriptions, on a visual chart. It's eye opening when one selects items that add up to a ~100 Euro ++ a month.

b0bbi•15m ago
I tracked every single daily expense for a few years, until I hit a point where I realized I already knew exactly where my money was going and how much I could realistically save. It just comes down to discipline.

I really appreciate the idea and saved it for potential future features! My only hesitation is that adding practical projection tools might make shouldhavebought lose its fun, curious spirit and turn it into a serious financial app.

Bishonen88•1m ago
You're right of course. For me the difference maker is in seeing on a projection chart that if I just cancel 2x zwift, disney and netflix, I can save up to:

Savings from Cuts

€11,048

€60/mo @ 8%

within 10 years. That's HUGE! While the 60 Euro a month seems kind of irrelevant on its own.

dvh•41m ago
Is it $149 or $149000?
b0bbi•13m ago
if the system wrote $149 this mean $149 or you found a bug. Please let me know if found a bug.
jbjbjbjb•23m ago
Most reasonable people will not have enough conviction to make a serious amount of money even if they’re right. I think a better question is how much would you have invested to make $500k/ $1mn (or whatever a life changing sum is for you) on the investment then you can consider whether you had the stomach to do that.

LLM=True

https://blog.codemine.be/posts/2026/20260222-be-quiet/
48•avh3•1h ago•41 comments

Show HN: A real-time strategy game that AI agents can play

https://llmskirmish.com/
7•__cayenne__•8m ago•0 comments

I'm helping my dog vibe code games

https://www.calebleak.com/posts/dog-game/
919•cleak•16h ago•282 comments

Meta problem with URPF our bundle in Boca raton

https://metafixthis.com/
20•synthesis5x•1d ago•1 comments

Pi – A minimal terminal coding harness

https://pi.dev
379•kristianpaul•12h ago•167 comments

Japanese Death Poems

https://www.secretorum.life/p/japanese-death-poems-part-3
40•NaOH•2d ago•9 comments

Show HN: Quantifying opportunity cost with a deliberately "simple" web app

https://shouldhavebought.com/
18•b0bbi•18h ago•16 comments

Turing Completeness of GNU find

https://arxiv.org/abs/2602.20762
46•todsacerdoti•4h ago•5 comments

Show HN: Moonshine Open-Weights STT models – higher accuracy than WhisperLargev3

https://github.com/moonshine-ai/moonshine
245•petewarden•12h ago•52 comments

Mercury 2: Fast reasoning LLM powered by diffusion

https://www.inceptionlabs.ai/blog/introducing-mercury-2
224•fittingopposite•11h ago•97 comments

Cl-kawa: Scheme on Java on Common Lisp

https://github.com/atgreen/cl-kawa
38•varjag•2d ago•8 comments

Mac mini will be made at a new facility in Houston

https://www.apple.com/newsroom/2026/02/apple-accelerates-us-manufacturing-with-mac-mini-production/
516•haunter•12h ago•501 comments

Hacking an old Kindle to display bus arrival times

https://www.mariannefeng.com/portfolio/kindle/
265•mengchengfeng•14h ago•66 comments

Show HN: Emdash – Open-source agentic development environment

https://github.com/generalaction/emdash
159•onecommit•16h ago•60 comments

I pitched a roller coaster to Disneyland at age 10 in 1978

https://wordglyph.xyz/one-piece-at-a-time
461•wordglyph•21h ago•165 comments

Show HN: Scheme-langserver – Digest incomplete code with static analysis

https://github.com/ufo5260987423/scheme-langserver
5•ufo5260987423•1d ago•0 comments

Nearby Glasses

https://github.com/yjeanrenaud/yj_nearbyglasses
331•zingerlio•16h ago•131 comments

Steel Bank Common Lisp

https://www.sbcl.org/
216•tosh•15h ago•85 comments

Amazon accused of widespread scheme to inflate prices across the economy

https://www.thebignewsletter.com/p/amazon-busted-for-widespread-price
434•toomuchtodo•9h ago•147 comments

30 Years of Decompilation and the Unsolved Structuring Problem: Part 1 (2024)

https://mahaloz.re/dec-history-pt1
3•userbinator•3d ago•0 comments

Half million 'Words with Spaces' missing from dictionaries

https://www.linguabase.org/words-with-spaces.html
63•gligierko•1d ago•99 comments

Sovereignty in a System Prompt

https://pop.rdi.sh/sovereignty-in-a-system-prompt/
58•0x5FC3•20h ago•34 comments

Cell Service for the Fairly Paranoid

https://www.cape.co/
97•0xWTF•11h ago•95 comments

Corgi Labs (YC W23) Is Hiring

https://www.ycombinator.com/companies/corgi-labs/jobs/ZiEIf7a-founders-associate
1•leastsquares•9h ago

Anthropic Drops Flagship Safety Pledge

https://time.com/7380854/exclusive-anthropic-drops-flagship-safety-pledge/
319•cwwc•9h ago•136 comments

Hugging Face Skills

https://github.com/huggingface/skills
169•armcat•16h ago•47 comments

We installed a single turnstile to feel secure

https://idiallo.com/blog/installed-single-turnstile-for-security-theater
337•firefoxd•2d ago•163 comments

Aesthetics of single threading

https://ta.fo/aesthetics-of-single-threading/
82•todsacerdoti•3d ago•21 comments

Stripe valued at $159B, 2025 annual letter

https://stripe.com/newsroom/news/stripe-2025-update
210•jez•19h ago•215 comments

3D-Printed electric motor via multi-modal, multi-material extrusion

https://www.tandfonline.com/doi/full/10.1080/17452759.2026.2613185
18•westurner•3d ago•7 comments