Cost Reasoning

Cost seems to be an inseparable part of our lives. We look at it when we buy stuff, pay taxes, purchase services. But it takes a bit of a backseat when it comes to computer science—especially during the academic years. It comes back once we join the workforce, though it often takes on an elusive form — at least in my IT experience. It doesn’t come naturally; it’s effectively forced on us through communication with the business side. To me, “cost” is so ill-defined that it’s often thrown around for emphasis rather than as something more or less concrete.

Even in personal life, cost is tricky. Let’s say a pen costs $1. Is that the real cost? Do we just buy it and move on? Well, here’s how I see it: the pen costs $1 + $0.13 (13% sales tax) = $1.13. Now factor in income tax—say, 30%—and the cost becomes $1.13 / 0.7 = $1.61 (rounded). So once we factor in both sales and income taxes, the cost jumps by about 61.4% from the sticker price. And that doesn’t even include the cost of earning that money in the first place. Do you drive to work? How long does it take? Do you pay for insurance? Is your car depreciating? If you run a business, you might write those expenses off—but if you’re an employee, you just eat the cost. By the time all’s said and done, you’re looking at a markup of over 61.4%—and that’s before environmental fees, dealer fees, or whatever else sneaks in at checkout. And finally: how much time does it actually take to make that money?

Now to the IT world. I remember a while back when agile cards (or T-shirts and such) were a popular tool to estimate work for a sprint. At some point, that idea took a dive—never to be seen again. Why? I believe it comes down to two things: inaccuracy and waste. You end up estimating in points that are hit or miss (most of the time, a miss). Then managers try to make sense of those points for that particular team and convert points to time. Eventually, they give up and just ask for time estimates instead. Next, all of that gets applied to project estimates, and finally, to the budget. Eventually, the whole exercise was written off as useless. Why waste time estimating when it doesn’t improve accuracy? It just ends up wasting time for no benefit—or in other words, increasing cost.

Next up: software craft. How do we reason about the cost of code? Do we think about execution cost? Development cost? What about refactoring, adding features, maintenance, or security upgrades and dependencies? Do we factor in code correctness? Recently I was part of an architectural decision-making process. We had two paths: develop a new feature using an old dependency or a new one. Let’s break them down.

Using a new dependency: faster, easier development, with future support. Risk: the new feature might not integrate easily with the legacy system.

Using the old dependency: easier integration. Risk: slower development, no support, potential security issues. And when the old system is retired, we’ll either have to rewrite everything or keep dragging around old dependency — bringing all the baggage with it.

Moreover, we know the old system is set to be retired within the next six months, while new feature delivery is targeted for the next twelve. Just from the timeline alone, it becomes painfully obvious that the risks of supporting the old system are already mitigated. From a development cost perspective, it makes far more sense to adopt the new dependency. Yet the issue keeps getting debated—because, well, “nobody gets fired for buying IBM.” The essential argument is that writing new feature code based on the old dependency will work “everywhere,” so the deadline will be met, and we’ll all be safe—no risk. But what about cost? It would take three times as long using the old dependency. What about future cost—what if we have to rewrite it later? How about support—dragging around an old, unsupported dependency isn’t free. And do we ever factor in security risks? How much will that cost? Yeah, at the beginning of the day, if we don’t consider cost—or worse, don’t communicate it to the business—we might feel “safe.” But the business can count. And usually, better than IT. So by the end of the day, cost questions will creep in—and by that point, no one will be safe.

The cost of software development is anything but trivial—it depends on a variety of factors. Maybe it’s a throwaway project. In that case, we can skip tests, write a mess of code, use bubble sort, and slap it all together just to get it running as quickly as possible. But should we do the same for a legacy project? What about a current production system? Do we write clean code so it pays off with the next feature set—or just duct-tape things together and leave it for someone else to debug at 3:00 a.m. on a Sunday during a production emergency? I believe a developer can make any choice—as long as it’s a conscious one, based on cost considerations. And to make that kind of decision, cost must be learned, understood, and applied—as part of both software education and everyday development.

Norbert’s Gambit

Recently, I learned about Norbert’s Gambit, and it seems like a really nice way to avoid paying currency conversion fees. You still end up paying something, but depending on the amount you’re converting, the fees can be pretty small — I’ll illustrate this later.

So what is Norbert’s Gambit? Norbert’s Gambit is a strategy used to convert Canadian dollars (CAD) to U.S. dollars (USD) (or vice versa) by buying and selling interlisted stocks or ETFs — stocks that trade on both Canadian and U.S. exchanges. The idea is simple:

  1. Buy the stock in CAD on the Canadian exchange.
  2. Transfer the stock to the U.S. exchange.
  3. Sell the stock there in USD — effectively converting your money with minimal fees.

As I mentioned, this method helps avoid conversion fees that banks, brokers, and private exchanges charge. Here’s what I’ve seen:

  • Banks: Typically take 3–5 cents per dollar (3–5%).
  • Brokers (InvestorLine in my case): Around 2 cents per dollar (2%).
  • Private exchanges near me: About 1 cent per dollar (1%).

Fees of 1–5 cents per dollar might not seem like much at first, but they add up fast—especially for larger amounts. For example, if you exchange $10,000 CAD, the fees would be ~$300–$500 for bank, ~$200 for broker and ~$100 for private exchange. Now think about your entire retirement fund — suddenly, those fees don’t look so small.

Norbert’s Gambit isn’t completely free. Here’s what you still have to factor in:

  1. Trading fees: InvestorLine charges $10 per trade, so buying and selling costs $20 total.
  2. Stock price movement: Prices fluctuate, so there’s a chance the value changes before you sell.
  3. Market spread: The difference between bid and ask prices can result in a small loss.

That said, InvestorLine does automatic online transfers, so there’s no need to call anyone or wait a day — minimizing the risk of price movement. To test it out, I ran a small experiment:

  • Bought 1 share of BMO:CA for $138.17 CAD
  • Sold 1 share of BMO:US for $95.8516 USD
  • Effective exchange rate: 0.694
  • Market exchange rate at the time: 0.693

I actually gained about 10 cents per exchange, but that was just luck due to market fluctuations going my way. Now let’s extrapolate and assume things didn’t go in my favor. If I exchanged $13,817 CAD, I’d buy 100 shares of BMO:CA and sell them in USD at an effective exchange rate of 0.692 instead of the market rate of 0.693.

  • Norbert’s Gambit: 0.692 × $13,817 = $9,561.364 USD
  • Official exchange rate: 0.693 × $13,817 = $9,575.181 USD
  • Loss due to the exchange rate difference: $9,575.181 − $9,561.364= $13.817 USD


So, I lost $13.82 USD due to the slightly market volatility. If I had used a private exchange instead (charging 1 cent per dollar), the fees would have been: $9,575.181 –  (13817 * 0.683) = $138.17 USD. That’s 10 times more expensive than my $13.82 USD loss from Norbert’s Gambit! Now, let’s add in the trading fees: 20 USD + 13.82 USD (loss) = $33.82 USD total cost. Even after including the trading commission, the total cost is still way lower than the $138.17 fee from the private exchange.

In my mind, Norbert’s Gambit is an awesome strategy, especially considering that Canadian investors have to exchange currency at least twice in their lifetime — once to invest and again to cash out for retirement. This means Norbert’s Gambit can save Canadians around 2% on foreign investments.

3 Years Since the Full-Scale Invasion of Ukraine

It’s been three years of war, and it keeps on going. My naïveté is slowly being replaced with cynicism. Last year, I hoped the West would pull itself together—providing much more support to Ukraine while applying greater economic pressure on the other side. While there have been some increases, once again, it’s been too slow, too little, and in some cases too late.

To some degree, I’ve started to feel like the West is trying to preserve the aggressor. Yes, save the murderer—because otherwise, someone would have to deal with the fallout?! It’s astounding to contemplate such a scenario. It feels like there is no justice, no honor—it’s all about preserving the status quo. And by the way, the same seems to be happening in Israel. After the horrendous October 7th attack, somehow Israel is labeled the bad guy.

If you attack, kill, or kidnap—you are the aggressor, the murderer. It should be plain and simple. Yet, this concept seems too difficult for some to grasp—or so it seems. Another concept that apparently baffles people is democracy, liberalism, and freedom. Some places have them; others don’t. Ukraine and Israel have them. And the opposing sides? Let’s see: one place has had the same “president” for over 24 years—marked by repression and political killings. The other hasn’t held elections in the last 19 years, and political opposition tends to end up flying out of windows shortly after speaking up. But again, this concept seems too hard to grasp. Who are the bad guys in this situation? Somehow, we’ve bent the truth so far that Ukraine supposedly started the war and Israel is somehow the aggressor.

I’m tired of watching these horrific events unfold, but I don’t dare look away. It’s a reminder of how people operate, how disinformation spreads, and how evil prevails. But we cannot give up. We must keep fighting—keep going until the very end.

Source

Slava Ukraini.

Radon Test – Don’t Waste Money in Ontario

Recently, I started worrying about radon exposure in my house. So, after a quick trip to Home Depot, I picked up a short-term radon test kit for about $20. The clever marketing got me—I thought I was buying a complete kit. Well, turns out I was wrong. To actually get the results, you have to pay another $40 for lab analysis. Lol, “paid envelope included” – yeah, sure, the envelope is free, but the test results aren’t!

When I got my results back, I was horrified—radon levels were almost four times the recommended limit. Naturally, I wanted to retest before jumping into any drastic (and no doubt expensive) solutions. But spending another $60 on another test? No thanks. So, I started researching my options.

Turns out, instead of buying one-time test kits, you can get an electronic radon detector for around $150. A much better option, especially if you want to test multiple locations. Sure, you can find cheaper ones, but who knows if those cheap Chinese knockoffs actually work or just make you feel better? So, my thought was: either buy a proper one or nothing at all. But then I wondered—do I even need to buy one? Can I rent instead?

Do NOT Buy or Rent If You Live in Ontario!

Here’s the best part: you can borrow a high-quality radon detector for free from a public library! Apparently, radon became a big enough concern at some point that the government provided libraries with free detectors for public use. All you need to do is go to your local library, register (if you haven’t already), and borrow the device for up to three weeks.

I found this program through the Windsor-Essex County Health Unit, but I’m pretty sure it’s available across Ontario and possibly beyond. So, don’t buy, don’t rent—just borrow it for free from your library!

Hope this helps!

Email with custom domain

I remember a while back when you could purchase your own domain and connect it to Gmail for free. Unfortunately, that’s no longer the case. However, it appears there is a workaround. It requires some effort and navigating through Gmail’s deep settings, but the option is still available and functioning.

I’m including a link and backup here in case someone wants to connect their domain name to their Gmail account – How to user your own custom domain with Gmail for free.

Inequality and Risk

I’ve been slowly making my way through Paul Graham’s essays, and for the most part, I’ve been enjoying the journey. Recently, I came across his essay, “Inequality and Risk,” and it gave me a few thoughts. As Paul said: “The word ‘essay’ comes from the French verb essayer, which means ‘to try’”, so let me try.

“Like many startup founders, I did it to get rich. But not because I wanted to buy expensive things. What I wanted was security. I wanted to make enough money that I didn’t have to worry about money. If I’d been forbidden to make enough from a startup to do this, I would have sought security by some other means: for example, by going to work for a big, stable organization from which it would be hard to get fired. Instead of busting my ass in a startup, I would have tried to get a nice, low-stress job at a big research lab, or tenure at a university.

That’s what everyone does in societies where risk isn’t rewarded. If you can’t ensure your own security, the next best thing is to make a nest for yourself in some large organization where your status depends mostly on seniority.”

Paul Graham

I understand that startups are incredibly risky—it’s a fact. People investing in startups also take the same risk as founders, or perhaps even more. So if the reward isn’t worth it, then investment—and therefore startups—won’t be worth it, which means development stagnates. I agree with this argument.

But here’s my question: does progress and development only happen with big rewards? Paul says it isn’t about the money but about security. There are different ways to achieve security: one way is to make lots of money, and another is to get a secure job—a low-risk, low-stress position that’s stable and reliable. So if there’s no risk and no reward, does that mean all brilliant minds would gravitate toward secure jobs in big companies, research institutions, or government?

What about Albert Einstein? He made it. Now, for the sake of argument, what if security were already provided? Let’s wave a magic wand and imagine you receive enough money to live well. Wouldn’t you then want to dedicate yourself to what you do best—perhaps to development and innovation? Maybe one could be driven purely by a desire to innovate, rather than by the promise of big rewards or security. Not everyone becomes a doctor just to make loads of money. Some people genuinely want to help others and improve lives. Shouldn’t pure curiosity and the desire to improve be enough motivation?

I get it—there’s no magic wand. There’s resource competition. Effectively, this is all about security and resources: if you don’t secure yours, someone else will. It’s funny (and sobering) how quickly the argument can devolve back to a Stone Age-level mentality—it’s either you or them. But that seems to be what Paul is describing in his essay. We need inequality and risk to drive development and stay ahead, which in turn allows us to secure and gain more resources.

I’m not saying Paul is wrong, and I don’t claim to have better ideas. I’m just pointing out these dynamics and wondering out loud if there’s a better way. Ultimately, it might be the only way—our technology, biology, and language may simply be inadequate for any other existence.

The word “essay”

The word “essay” comes from the French verb “essayer”, which means “to try”. An essay, in the original sense, is something you write to try to figure something out. This happens in software too. I think some of the best programs were essays, in the sense that the authors didn’t know when they started exactly what they were trying to write.

Paul Graham

The Chronicles of the Fallers

The last time I picked up a Peter F. Hamilton book was about a year ago. Unfortunately, Misspent Youth wasn’t very impressive compared to the rest of the Commonwealth Universe. However, it gave me a goal: to finish all the books in the Commonwealth Universe. Jumping ahead, I must say: I love the Commonwealth Universe. It might start slow with Misspent Youth, but it picks up steam quickly in the following books and doesn’t stop until the very end.

The final series, The Chronicles of the Fallers, consists of two books: The Abyss Beyond Dreams and Night Without Stars. The story takes place both within the Void and outside it, recounting the tale of humans trapped with a highly hostile alien race and their desperate struggle to survive. The author masterfully weaves an intriguing story about a society that once thrived on advanced technology but is forced back to 21st-century tech levels as it attempts to return to the Commonwealth—all while fending off the Fallers.

The series brings back two main characters: Nigel Sheldon and Paula Myo, who both work to rescue humans from the Void and the Fallers. Hamilton expands on the inner workings of the Void, giving the story an exciting twist while managing to keep the Void series on its own unique path. Additionally, he delves into how the Void’s mechanics became so convoluted and expansive by the end of the Void series.

I enjoyed The Chronicles of the Fallers immensely. It connects beautifully with the previous books while developing a new, exciting storyline. The entire Commonwealth Universe is a sublime experience, and I wish Peter would continue working on it, but otherwise, it is a great place to stop.

I know I haven’t discussed much of the plot, but I feel I wouldn’t do it justice. The Chronicles of the Fallers must be read as a sequel to the earlier stories. That way, you’ll be fully immersed in the experience. If you enjoyed the previous books, you won’t be disappointed—I certainly wasn’t.

In a nutshell:
+: Well-written and easy to read
+: Continuation of the Commonwealth Universe
+: Old characters in a new setting
+: New and exciting storyline
+: A wonderful finale to the entire universe
=: Excellent books, but I highly recommend reading them only after finishing the previous series

Title: The Chronicles of the Fallers
Author: Peter Hamilton
Cover:

The Software Architect Elevator

I never read books about architecture or architects, and reading this book wasn’t my idea. However, once I commit to something, I see it through. I purchased the book a few months ago, new, for about $66 (Canadian dollars). I’ll come back to the price later. The book itself is relatively small and short, a bit over 300 pages with a well-sized font, ample space between chapters, and the smallest page area I’ve ever seen in a technical book.

I’ve never held an architectural position, and in fact, I have a fairly limited understanding of an architect’s role in the first place. With over a decade as a software engineer, I tend to see architects as people to avoid whenever possible, as they often say “no” to technical or design proposals more than “yes.” Granted, software engineers can be overly eager to make unnecessary changes or introduce new shiny tech that ends up causing more problems or becoming redundant. But to this day, I only approach an architect when all other options are exhausted and never with new ideas or proposals.

“It is often easier to ask for forgiveness than to ask for permission.”

Grace Hopper

Given all of the above, expressing an opinion on this book is challenging, as I have nothing to compare it to. However, I’ll share my thoughts and feelings about it

The Good: The book is easy to read and understand. The author does not waste time stretching out discussions unnecessarily. The list of topics is solid and covers many critical areas of any IT organization. I found a few nuggets that resonated with me, such as automation, standardization, version control, diagrams, and feedback. While I have minor disagreements on automation, I generally align with the author and hope modern IT organizations follow these ideas and recommendations. The book also includes plenty of references to other materials, books and movies.

Ugly bits: While the references to other resources are appreciated, there is an underlying irony: if you’ve read some of the books mentioned, you likely don’t need to read this one at all. Kent Beck, Robert C. Martin and Martin Fowler, for example, provide enough practical knowledge, discussions, and examples that render many subjects covered here self-evident and redundant. Furthermore, while the book covers a broad range of topics, it often lacks depth and detail. It feels like reading an abstract with a bit more substance; the subjects are clear and touched upon, but there’s little practical detail to learn from. It feels like a lot of knowledge but practically little comes to fruition.

The Bad: The author frequently explains concepts through analogies, drawing from non-tech areas. While analogies can be effective, some of these were poorly chosen. Occasionally, the analogies were overly simplistic; at other times, they were unnecessarily complex. In rare cases, the analogy was worse than the technical explanation itself. For instance, the author used forensic/police sketch artists as an analogy for architectural mapping/diagrams. This was frustrating—it felt irrelevant, and I have no interest in, nor do I understand, police work. Another annoyance was the inclusion of URLs for diagrams in a printed book. Why not print them? The chapter on diagrams seemed interesting but ultimately uninspired, as if the authors added just enough content to make it feel important but not enough to fully explore the topic or provide more examples. I found it perplexing that the book relied so heavily on unrelated analogies, considering it isn’t targeted at novices. Surely, any software engineer or architect reading this book would have a baseline understanding of IT. The author could have used this space to provide more detailed discussions and practical examples instead. Lastly, the book’s treatment of hiring and staffing was minimal. While it mentions the importance of interactions across organizational levels, it barely touches on better hiring practices and only in passing. It’s ironic that the author can talk about communicating between the “engine room” and the “penthouse” but neglects to elaborate on Human Resources.

So, what’s the verdict? Let’s go back to the $66 price tag. For that amount, I expected at least 400 full-sized pages of deeper, more practical knowledge. I’m not sure who this book is for. Is it for the ivory tower architect who lost touch with tech a decade or two ago? Or for the new architect who has only heard of Git, pipelines, and containerization in passing at a conference? The book isn’t bad, but I can’t say it’s good either. Would I buy it again? No. Would I recommend it? No. You could gather the same knowledge by locking yourself in a room with YouTube for 10-20 hours and watching IT conference talks by top industry architects. I would give the book a green light for $20, as it is short and has a few valuable nuggets, but not for $66.

In a nutshell:
+: Easy, fast, and short read
+: Covers various relevant IT topics
+/-: Includes many references and broad topic coverage
-: Heavy reliance on analogies, not all effective
-: Lacks depth, details, and practical discussion
=: Don’t waste your money. If you can pick up the book for $20 and are interested in the topic, go for it. Otherwise, spend time on YouTube learning from top industry architects for 10-20 hours, and you’ll likely be better off.

Title: The Software Architect Elevator: Redefining the Architect’s Role in the Digital Enterprise
Author: Gregor Hohpe
Cover: