Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
eriksencosta
searching Neon…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
7 ms
·
1.
▲
Terraform AWS Organization Foundation
(github.com)
2 points
by
eriksencosta
4mo ago
|
1 comments
2.
▲
by
eriksencosta
4mo 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.
3.
▲
by
eriksencosta
2y 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'
4.
▲
by
eriksencosta
2y ago
It's a shame I can't travel back in time. Anyway, thanks!
5.
▲
by
eriksencosta
2y ago
Not yet to Android (in the case of the library). Need to revamp some internal things.
6.
▲
by
eriksencosta
2y ago
I think it helps to have the inputs and outputs of the system fully representing a "money" (i.e., a monetary amount + its currency code in places like API resources, events, and so on). This way you can internationalize or support
7.
▲
by
eriksencosta
2y ago
HALF_EVEN by default using the minor units of each currency (based on CLDR/ICU datasets). Client code can disable rounding at all. Check for more: https://github.com/eriksencosta/money/blob/trunk/doc
8.
▲
by
eriksencosta
2y 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.percen
9.
▲
by
eriksencosta
2y ago
Excel macros.
10.
▲
by
eriksencosta
2y ago
Yep, it is. However, you must create a custom currency to arbitrarily define the minor units you need: https://github.com/eriksencosta/money/blob/trunk/docs/usage/...
11.
▲
by
eriksencosta
2y ago
I love to learn more about the history of computing. Thanks.
12.
▲
by
eriksencosta
2y 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 rat
13.
▲
by
eriksencosta
2y 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.
14.
▲
by
eriksencosta
2y 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() an
15.
▲
by
eriksencosta
2y ago
Great reference, Sam. I will definitely bookmark your library and learn with your implementation. For cryptocurrency data, take a look at the DTIF.org dataset: https://github.com/eriksencosta/money/blob/trunk&
16.
▲
by
eriksencosta
2y ago
You don't need if your solution fits your use case. The library is an implementation of Fowler's Money pattern: https://martinfowler.com/eaaCatalog/money.html
17.
▲
by
eriksencosta
2y 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() an
18.
▲
by
eriksencosta
2y ago
The library will throw an exception if doing an operation with different currencies: https://github.com/eriksencosta/money/blob/trunk/money/src/t... But I think I'll make it explicit in th
19.
▲
by
eriksencosta
2y ago
I'll introduce l10n support in a future release. My starting point was to make currency names and symbols unaware of the locale as I embedded cryptocurrency data in the mix. Anyway, the library uses the CLDR dataset through ICU: https
20.
▲
by
eriksencosta
2y ago
Languages indeed have support for currencies and decimal numbers. My implementation is based on Fowler's Money pattern. The Money object is thus a value object representing a monetary amount in a given currency. https://mart
21.
▲
by
eriksencosta
2y ago
You are right. Languages indeed have support for currencies and decimal numbers. My implementation is based on Fowler's Money pattern. The Money object is thus a value object representing a monetary amount in a given currency.
22.
▲
by
eriksencosta
2y ago
This is great!
23.
▲
by
eriksencosta
2y ago
Joda is impressive and has great performance. The examples were written using the infix notation but you can just use regular method calls. For example: val price = Money.of(100, "USD") val shipping = Money.of(5, "USD")
24.
▲
by
eriksencosta
2y ago
Thanks for the questions. Answers: 1. You get an exception 2. You may specify the rounding rule: https://github.com/eriksencosta/money/blob/trunk/docs/usage/... 3. It has some parsing capabilit
25.
▲
by
eriksencosta
2y ago
I think I will add a footnote on COBOL. COBOL is huge in Brazil, lot of insurance/financial companies are still using mainframes.
26.
▲
by
eriksencosta
2y ago
This is something I am aware but there is no support for this rounding scheme at the moment.
27.
▲
by
eriksencosta
2y ago
I couldn't agree more as someone who has been using more spreadsheets than actually coding in the last 10 years.
28.
▲
by
eriksencosta
2y ago
In Brazil (where I worked) we used Kotlin + Ktor. In Europe, they are heavy Kotlin users. References: Brazil: https://blog.eriksen.com.br/en/platform-engineering-n26 Europe: https://medium.com/insiden26
29.
▲
by
eriksencosta
2y ago
Oh sorry, that's a typo. Thanks for pointing out!
30.
▲
by
eriksencosta
2y ago
It uses BigDecimal. My first goal with the library was to provide a well-designed API. So to keep it simple for myself, I relied on BigDecimal for the calculations.
More ›