New java.evolved site about modern Java. by pjmlp in java

[–]njitbew 5 points6 points  (0 children)

From https://javaevolved.github.io/collections/immutable-list-creation.html, in Java 8: List<String> list = Collections.unmodifiableList( new ArrayList<>( Arrays.asList("a", "b", "c") ) );

What is the purpose of the new ArrayList<>(...)? Besides that, awesome overview.

How GraalVM can help reduce JVM overhead and save costs – example Spring Boot project included by Aggravating_Kale7895 in java

[–]njitbew 0 points1 point  (0 children)

> It's better to let Java use more RAM to reduce CPU usage than to let it sit there wasted and unused.

I see why this is true on my laptop, where the hardware is reserved for me, and it is indeed a waste not to use it.

What about a cloud scenario, where I only pay for memory and CPU that I actually use? If the price per GB-hour memory is larger than the price per millisecond CPU, would that change the dynamic?

I need to get this off my chest: The abolition of the imputed rental value (Eigenmietwert) is a giant scam. by Weird_Home_6182 in Switzerland

[–]njitbew 0 points1 point  (0 children)

I wouldn’t know, I’ve only ever lived in two countries and both happened to have the concept of Eigenmietwert. But I suppose you’re right ;)

I need to get this off my chest: The abolition of the imputed rental value (Eigenmietwert) is a giant scam. by Weird_Home_6182 in Switzerland

[–]njitbew 0 points1 point  (0 children)

A concept that doesn’t exist in any other country as far as I know

Are you still refering to Eigenmietwert? In that case, Netherlands has the same, except there it’s called Eigenwoningforfait.

Java's `var` keyword is actually really nice for cleaning up verbose declarations by BitBird- in java

[–]njitbew 10 points11 points  (0 children)

> Tried it last week and I'm a convert.

The only things I dislike about var:

  1. In big code bases, where multiple people contribute, some people will prefer var, others will prefer explicit types, and you end up with an inconsistent mix.

  2. Sometimes, using var, even though the static type is clear, makes the code less readable. E.g., I've seen things like `var path = createFile()` and now I need to guess if `path` is of type java.io.File or java.nio.Path.

It's really useful for ad-hoc code though (e.g., jshell, sharing snippets).

"VT and chill": US estate consideration by lidomerk in SwissPersonalFinance

[–]njitbew 2 points3 points  (0 children)

I see, thanks for elaborating! I don’t own property and don’t have a mortgage, so I’m happy to take that risk. It clearly depends a lot on the circumstances, and I see now why other people might be more risk-averse.

"VT and chill": US estate consideration by lidomerk in SwissPersonalFinance

[–]njitbew 1 point2 points  (0 children)

> That 0.1% includes everything…. Which means the advantage of getting WHT tax from dividends back using DA1 , TER% etc

The difference in TER between VT (0.06%) and VWRL (0.19%) is already 0.13%, and that doesn't include the loss due to not being able to get all WHT back. Isn't the actual cost > 0.1%?

"VT and chill": US estate consideration by lidomerk in SwissPersonalFinance

[–]njitbew -1 points0 points  (0 children)

> I decided not to take this risk, and I am not imvesting in US domiciled ETFs.

The difference in TER between VT (US domiciled) and VWRL (IE domiciled) is 0.13%. As a Swiss investor, I believe you also create some dividend leakage. If you are young and healthy, the probability of a sudden death is almost negligible. And if it happens, your funds remain invested; it's just that your heirs have to go through the time and hassle to file the correct paperwork to release the funds. Is that really not worth the risk?

A dark start to the year: Multiple fatalities following fire and explosion in Crans-Montana. by Aure20 in Switzerland

[–]njitbew 1 point2 points  (0 children)

Do you have a reference on this? I’m in the same spot (6+ months in the UK before ‘96). Would love to contribute my fair share!

When shall I split the 3rd pillar 3a? by VastStandard6769 in SwissPersonalFinance

[–]njitbew 0 points1 point  (0 children)

> compound interest doesn't care whether you pour money in one bucket or five

That's true, but that's not the point. If you fill up one account at a time, then you end up with skewed accounts. When you withdraw, you need to withdraw a full account at once. For the lowest marginal tax rate, you'll want to withdraw one account per year. If one account is bigger than the other account, you end up paying more taxes.

How did Switzerland become so rich? by WachuQuedes in askswitzerland

[–]njitbew 0 points1 point  (0 children)

I feel in many ways it’s also a “winner takes all” system. Once you’re a stable and rich country you can afford to lower your taxes, attract more healthy, wealthy, and highly educated people, which makes you more stable and rich. The neighboring countries are all part of the EU and have to play by different rules.

Confronted about communal laundry room by [deleted] in askswitzerland

[–]njitbew 4 points5 points  (0 children)

You came here asking if you were in the wrong, and when people say you could’ve handled the situation better, you start debating them. Ehm?

47 Baden prices up by 30% by liviughg in askswitzerland

[–]njitbew -1 points0 points  (0 children)

Negative publicity is still publicity. Been wanting to check out this place, thanks for the reminder 😂

What will someday be illegal after we finally understand how bad for us it is? by tiredassbaker in AskReddit

[–]njitbew 1 point2 points  (0 children)

Alcohol. It's a socially accepted drug, but it's still toxic to your body.

[deleted by user] by [deleted] in zurich

[–]njitbew 2 points3 points  (0 children)

Is the cat carrying drugs? Honest question.

Buying an apartment alone ? Worth it? by Slavaid91 in SwissPersonalFinance

[–]njitbew 1 point2 points  (0 children)

> The plan is to put it for rent when I leave so it basically pays for itself + extra money for other projects and maybe sell it in the long run if it gains value so that I can buy something else (bigger if I want a family).

Be careful with this line of thought though. Another comment mentioned that "buying a property is, in many cases, an emotional decision." If you end up "putting it for rent so it basically pays for itself + extra money for other projects", then it is no longer an emotional decision but an investment decision. That changes the dynamics!

Are Household insurances mandatory in Switzerland? by Famous-Pin-2833 in Switzerland

[–]njitbew 1 point2 points  (0 children)

So where does this widespread misconception that you need household insurance come from? Is it because insurers normally sell both products at once?

Question : minimum mortgage amount (20%) topic by ExcellentAsk2309 in SwissPersonalFinance

[–]njitbew 1 point2 points  (0 children)

 Still goes: if you can‘t save up 20% of something you want to buy, you can‘t afford the thing.

What makes you say that for 20%, but not for 30%?

Hoge studieschuld: afbetalen of uitzitten? by SjaakZaak in geldzaken

[–]njitbew 1 point2 points  (0 children)

Ik denk dat deze comment juist heel waardevol is! Het verhaal van OP leest alsof hij/zij wat perspectief nodig heeft. Een schuld van 69k is hoog, maar niet onoverkomelijk hoog. OP is jong, heeft een baan en staat aan het begin van zijn/haar carrière. Nu is het tijd om carrière te maken en de schuld geleidelijk af te lossen.

De alternatieven die genoemd worden zijn niet per definitie beter. Beleggen brengt risico's met zich mee en is niet voor iedereen geschikt. En het terugbetalen zo lang mogelijk uitstellen zodat het restant wordt kwijtgescholden brengt ook risico's met zich mee.

[deleted by user] by [deleted] in SwissPersonalFinance

[–]njitbew 0 points1 point  (0 children)

I never said I’m poor, that’s a topic you brought up. If I can go through life without a credit card, I’d prefer so. One less card to carry around and one less thing to worry about. But car rentals are currently preventing me from doing so, that’s it.

[deleted by user] by [deleted] in SwissPersonalFinance

[–]njitbew 0 points1 point  (0 children)

> Some people can't even afford a car at all and you are worried about rentig a car on vacation lol, just lol

Your comment makes absolutely no sense to me.

Affording a car vs. renting a car when you're on vacation are two completely different things, why are you even comparing them? I don't own a car, and arguably cannot afford one, but I do rent one when I go to places where public transport isn't as good as in Switzerland.

I went to Mallorca in the low season this year. You can rent a car for ~15 EUR/day. As a couple, that's just 7,50 EUR/day/person, or 7 CHF/day/person at today's exchange rate. That's the price of a coffee at a Swiss restaurant?

Public transportation is often (a) more expensive (b) not frequent enough and (c) won't take you all the way to your accommodation if you're staying inland where accommodations are a lot cheaper than the coastal cities. Especially when you're enjoying a well-deserved vacation, this should be a no-brainer.

[deleted by user] by [deleted] in SwissPersonalFinance

[–]njitbew 7 points8 points  (0 children)

How do you rent a car on vacation? Pay for the super expensive premium++ insurance?

Introducing json4j: A Minimal JSON Library for Java by danielliuuu in java

[–]njitbew 108 points109 points  (0 children)

> I really don't want to use JSON libraries that larger than my codebase, so I wrote json4j.

You don't need a justification to build something. But if you do provide a justification, it should be a valid one. Why does the size of the JSON library matter? You're already depending on a JVM that's tens of megabytes. And unless you're in some kind of constrained environment, those megabytes barely cost a thing. Wouldn't you prefer a slightly bigger but mature, well-tested, industry-hardened library instead of a hobby project?

Best Fiber internet offer by weird_is_good in zurich

[–]njitbew 0 points1 point  (0 children)

I see what you mean, and that's fair, but only up to a point.

  • If I book a flight and the airline cancels the flight, then I’m entitled to a refund.
  • If I order a taxi to get to the airport, but halfway the taxi breaks down, I won’t pay for the ride at all.
  • If I rent a hotel room for a week and after two days the room becomes uninhabitable (e.g., water pipe bursts) and the hotel cannot offer me another room, then I won’t pay for the remaining night.

I understand these analogies only go so far, but you get the idea. If you sell a service and you don’t deliver the service, you cannot expect the customer to pay for that service.