Recent submissions

Comment · 5 months ago
A production-ready AWS Organization foundation built with Terraform. This template codifies years of multi-account AWS best practices into a reusable, community-friendly blueprint.
Comment · 2 years ago
In my previous job, we had a mid-sized team of ~34 software engineers and Kotlin worked like a charm. We set common standards and practices early on and it paid off. The lone wolves will exist regardless of the programming language. I've seen them in different flavors: Ruby, Elixir, PHP, JS, Python, Perl, Java, Kotlin, and etecetera throughout my career. It's a matter of team dynamics.

Anyway, I'm not a Kotlin die-hard but I found it quite fun to code in the language. IMHO, it has a gentle learning curve and the community has plenty of great libraries (e.g., Ktor, Koin).

Nevertheless, I think I leaned too much on using the syntactic sugar of the language when writing the docs and the introductory article. But by no means users are bound to this way of coding.

Comment · 2 years ago
It's a shame I can't travel back in time. Anyway, thanks!
Comment · 2 years ago
Not yet to Android (in the case of the library). Need to revamp some internal things.
Comment · 2 years ago
Comment · 2 years ago
Comment · 2 years ago
What do you think of this? https://github.com/eriksencosta/money/blob/enum-percentage-s...

It is a (quick) spike solution, but I've implemented the currency codes as enums and added support for 20.percent.

Not so sure about supporting 50.btc and 25.3.usd. I need to check if doing so would affect code completion.

Comment · 2 years ago
Excel macros.
Comment · 2 years ago
Comment · 2 years ago
I love to learn more about the history of computing. Thanks.
Comment · 2 years ago
The currency exchange support is way simpler than this. The library only provides a method that will calculate the monetary amount given another Money object as the rate:

val amount = 1 money "USD" // USD 1.00

val rate = 5.4905 money "BRL" // BRL 5.4905

amount exchange rate // BRL 5.49

It's up to implementers to hook up in other datasets and to consume the rates. Exchange rates datasets differ from country to country and some foreign exchange companies offer short-term contracts to hold a transaction at a given rate (sort of "guaranteed rate/price"). I don't see myself supporting this use case.

Nevertheless, Java Money (Moneta) has this feature. Never used it so, I don't know how it works.

Comment · 2 years ago
I'm very grateful so far by the comments. I've learned a lot and it will help me on the next iterations of the library.
Comment · 2 years ago
Thanks for commenting! I'm still learning Kotlin and I overlooked the usage of get() with vals. This will be the next syntactic sugar into the mix. I think it makes sense.

When I was designing the API, I created methods like toUSD() and toEUR(). But with 306+ circulating/tender currencies and 2000+ cryptocurrencies, I thought it could lead to a bad experience when using code completion.

Comment · 2 years ago

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton