There's been some talk in my office lately about the practicality of always building API (Application Programming Interfaces) backends for our apps. Some of my teammates argue that it ensures portability, that we can move to newer technologies more readily. Others agree, but say the primary reason is to provide a layer of abstraction between the code and the data (since enough abstractions can solve many problems). I personally have a much more basic problem. I'm at a crossroads, and I need your help, dear reader, to put an end to an endless argument I've been having with myself.
Our latest major project has an API backend (specifically an HTTP REST service) that handles the data and business logic. This was implemented primarily because we have 25+ data sources (including SQL Server databases, Oracle databases, WCF services, and other APIs) that we need to consume and display to our users through a single, unified web app. My team and I figured that providing a layer of abstraction between the web app and the data sources would greatly help separation of concerns and, in general, make this project easier to maintain in the future. It will do both of those things, I'm sure. I designed it to do those things.
And yet... I hate it.
I hate this API because it will only ever be consumed by one application. It seems like cruft, like code that doesn't serve a purpose other than to artificially divide two pieces of a project (web layer and data layer) that probably don't need to be divided since they won't be reused outside this project. On some level, I want to believe that this API is not needed and should be gone. I want it gone.
Longtime readers will recall that I'm an extreme deletionist. I would much prefer if all code everywhere was deleted, because at least then it couldn't break. I want to think that building this API is a waste of time and code. I want to, I've tried to convince myself that I'm right and I can delete it, and I can't. I find myself forced to reconsider my deletionist tendencies, because I can't quite shake the conviction that always building an API is a good idea.
I don't enjoy having this thought. It goes against my very nature. And yet it draws me in, its siren song slowly turning me mad, persuading me that always building an API, even if it will only ever have on consumer, is correct, is needed, is right.
There are many arguments that can be made in favor of always building an API:
- Doing so enables movement to other apps. Even if, at the moment, only one app will consume the API, merely having said API will enable other apps to use it in the future.
- It provides an extra layer of abstraction, which can be changed independently of other layers (promoting separation of concerns).
- It promotes the Microservices architecture, in which many small APIs or services can be used to build a large, complex app (more specifically, many large complex apps with lots of reuse in the service layer).
To be fair, there's also arguments to be made against always building an API:
- YAGNI. In many situation, you simply don't need an API, especially for simple apps.
- The more layers you have in an app, the more difficult it becomes to debug it (though this can be mitigated).
- It's tacky and I hate it (see the first bullet).
The deletionist part of my brain tells me it's just not necessary! while the rational developer part says who cares, it helps separation of concerns! I can't quite reconcile the two.
So I need your help, dear readers. Please tell me why we programmers should or should not always build an API in the comments below. Not just "yes" or "no" but why and for what reasons. Convince me that my deletionist tendencies are spot on and we don't need to always build an API. Alternately, convince me that my rational developer brain has the right of it and we do want APIs all the time. I want to see arguments for both sides.
I'll gather all the comments into a future post where I see if all of us (me and my readers) can come to a definitive conclusion as to whether or not it is a good idea to always build an API. So let me know what you think!
Happy Coding Opinionating!
Is any 3rd pillar a good option? Your money are anyway stuck there until retirement (or in case you leave Switzerland for good, or buy an house..) and the taxes you saved while you increase the 3rd pillar are anyway due at the moment of the withdrawal. Isn’t better just to put those money in an global index found? You gain flexibility (withdrawal anytime you want in case you struggle) and it might be cheaper to maintain then any other 3rd pillar
Hi, can you offer any advice on Pillar 3b? This has been suggested to me recently as an option in addition to pillar 3a, but I can't find any information on this on your blog - I would be really interested in your views on this. Thanks!
Here some valid VIAC codes :) you pay no administration fee on your first CHF 1’000.00 pension assets - for a lifetime!
YBTnGiX
GZA7ecZ
tXuT7X9
Dear MP,
How many times I have moaned thinking about the worst financial decision of my life. Exactly, a 3a pilier life insurance (why is this even legal ? :( ) . It's already been 3 full payments and I am wondering if it makes sense to keep the paying to the minimum (around 600.-/year and start with Viac with 6000.-/year or so. I guess that I'll have to do the math, but AXA has not yet given me the information that I want.
As you've said making the math does remove part of the pain of accepting loosing half of your 3a savings... Thank you, I'll follow your advice.
This is not an equivalent. It is an insurance after all. It gives you a piece of mind in case you get disabled or die. So you should at least subtract the cost of equivalent life insurance. If you are the only income producer in the household you should definitely think of some sort of life insurance, so that your family is taken care of in case something happens to you. I know I sound like an insurance agent right now, but this is how I personally feel. Another point is that you can use the guaranteed premium as part of your mortgage payment, so in a short term you might be able to afford a better house, just something to consider as well.
Insurance is ok but don't couple it to a savings plan. Pillar 3a or just investing is a much better choice. For such insurance savings deals, almost everything is bad: the huge finder's fee, the bad investment choices, the lack of performance, the penalty on monthly payments and the unrealistic returns above 4%. I've also been ther and done it. Total rip-off!
hi. I just wanted to share this with a friend, who only speaks German. Unfortunately, the title in German suggests the opposite: You should immediately make a life insurance. It is translating "close" as "abschliessen" instead of "kündigen".
Thanks for the comment, just go back to the blog and first blogpost, it's all fixed now 😅
Perfect. Thank you!
My story has started (ended thank God! 🙏🏼) with exiting my bounded life insurance here:
https://forum.mustachianpos...
Transferring to VIAC is a no-brainer after these calculations ☝🏼👀
I've moved all my 3rd pillar to VIAC 3 years ago and never looked back again - and gained 20% (ok, also thanks to timing). Kind of no brainer... I'd suggest anyone to join.
If you decide to do so, these codes will save you management fees on the first 500chf invested:
pC8ZGLA
GCX2xgC
VCbeGsU
Ciao a tutti! Get your first 1000 CHF managed for free on Viac! 🙌 Simply use one of my freshly backed referral codes: NfTJ6DT QGuwMQg wGkezgV Thank you and have a fantastic day ahead!
Here some more VIAC codes in 2023. You permanently pay no administration fees on your first CHF 1’000.
JhbrTFH
hSFEFZS
I know that this post is a couple of years old by now, but still relevant. I, a newly minted expat in CH, unknowingly took one of these policies with Baloise. Google reliable informed me I had just thrown a lot of money away. Thankfully, I had only paid one year’s premium of CHF6k+. After seeking after and trying to get out of the contract (unsuccessfully), I agreed with Baloise to pay the minimum of 1k per year. Then the plan is to close the account at a later date, since my losses would be significant given I have only just opened the account. Is this a sensible approach, since I would still benefit from the insurance element of the product? Or do I need to just cut my losses and run?
Cut your losses and run. Better earlier than later. At least that's what I did (and would do today still).
HI, I am an expat who moved in CH in 2016. In 2021 I made this mistake and signed with a life insurance. I have two in place that will end one in 2041 and the other 2042. I am 48 years hold and still 17 years of work (in theory). I did the calculation based on what I can retraive vs what still need to pay.. Though, it looks I will still get a benefits. Of course much less considering I started late. Would you still suggest me to resign from my life insurance? thanks a lot
Welcome to the club... ^^ Maths do not lie. And it's rarely a good solution to keep such a scam product.
Hi, your compound rate calculator is a scam - it does not include any management costs, and also VIAC has a management cost, eg. VIAC Global is a 0,40% management cost.
i don't question your logic of switching from helvetia to viac, but if you share an advice to switch, make sure you compare apples to apples, and don't fake the VIAC returns by ignoring the TER on VIAC funds.
Once the real numbers are included the comparisons might look different , eg. follow the steps: 1 - my 3a at another insurer (not sharing names on purpose) has an all in TER of 0.47%, with 90% in equties on a global investment fund ... and with guaranteed amount of 200k. Surrender values basically reflect my savings after year 7 (before it's a loss, but for me acceptable, %-wise it's a lot compared to saved amount, but absolute numers it's 5 - 10k loss)
2 - Viac global 100 TER is 0.40% - that's 0.07% cheaper than insurance. In my scenario (i'm a foregner and started doing 3a late at the age of 37) that's ca. 5k - 10k more in VIAC that with the insurer at the end of contract... not a material difference.
3 - however, the guaranteed amout in VIAC is 2.5k per 10k invested.... i would need to have 800k in their account to have same guaranteed amount as with the insurance. Being the only bread-winner for tha family, i go with the insurer, because the gives my family security if i die.
= it's worth for me to stay with the insurer, i'm happy with the 10k less return, for the increased safety.
Funds performance is of course another thing....
People - don't believe general statements that one or the other solution is better or worse. always do the math yourself!
Hey there :) I feel scam is rather strong, but hey, your perception! Mine would be an "error" at most.
Now to the fact: I'm actually not sure Helvetia numbers removed their management fees and other TERs from their scenarios. I will check with my reader, although I fear Helvetia won't provide much more transparency, but worth a try! Yet, anyway, the big difference here comes from the performance in the end.
As for the life insurance part, I'd recommend separating it from the 3a, no matter what. It's been proven time and again that insurers just push you what makes them bigger bonuses...