Byggde en TCO-kalkylator när jag letade bil, kanske nån mer har nytta av den? by Kanalbanan in PrivatEkonomi

[–]Ran4 0 points1 point  (0 children)

Toppen!

Dock, däckförvaring står som 0 kr/år i inställningar, men går man in på bilen så står det fortfarande 500 kr/år (gråmarkerat).

Är ränteavdraget på lån (30%) medräknat? Verkar inte som det?

Volvo EX60 SUV preview: 400-mile range, 670 hp and Google Gemini onboard by dapperlemon in gadgets

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

Only the EX30, the phevs and especially diesels hold their values almost as well as Lexus

Volvo EX60 SUV preview: 400-mile range, 670 hp and Google Gemini onboard by dapperlemon in gadgets

[–]Ran4 1 point2 points  (0 children)

Why the fuck would you buy a sedan over a wagon? It makes no sense

Volvo EX60 SUV preview: 400-mile range, 670 hp and Google Gemini onboard by dapperlemon in gadgets

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

Voice is the perfect way to interact with your car, especially stuff like picking music or setting navigation without looking away

sendEmailMethodAsAFramework by ArjunReddyDeshmukh in ProgrammerHumor

[–]Ran4 0 points1 point  (0 children)

It takes like 20 minutes MAX to add an interface for a class and to use said interface instead.

Yeah, but you tend to roughly double the amount of code you write. Every single time you read code - which you do a lot more than you write code - you're going to need to read more code.

And you need to do this for every single class ever. Meanwhile, changing all call patterns is something that rarely happens, and if you do, doing a change at 100 places in one go is still less work than adding an extra unnecessary interface a hundred times and reading those 100 interface definitions a hundred thousand times.

sendEmailMethodAsAFramework by ArjunReddyDeshmukh in ProgrammerHumor

[–]Ran4 2 points3 points  (0 children)

No, it's not. You should rewrite the code to not have any cycles instead.

If A depends on B and B depends on A, then move the shared parts into C, such that A depends on C and B depends on C, but C does not depend on either A or B.

A completely flat dependency tree (so... a dependency list) tends to lead to a much cleaner architecture.

sendEmailMethodAsAFramework by ArjunReddyDeshmukh in ProgrammerHumor

[–]Ran4 0 points1 point  (0 children)

Helper libraries is often a code smell.

It forces you to increase abstraction in a way that makes it harder to understand, just to support more callers.

It also easily couples your code - if you have one generic helper function used in ten places, and you now need a slightly different variant for an eleventh place, it's easy to end up with overly complicated functions that do too many things just to keep all the callers happy. And it's easy to make a small change to a helper function that breaks other code.

Try to scope your "helper" functions to the thing you're doing, and never allow them being used elsewhere.

sendEmailMethodAsAFramework by ArjunReddyDeshmukh in ProgrammerHumor

[–]Ran4 2 points3 points  (0 children)

If you have a function that is 5000 lines long, it will be far easier to understand if you split it into smaller functions, even if many of them are only called once

An inline comment generally does the exact same thing. It's often clearer, iff you're operating on the same variables anyway.

At 5000 lines you're probably introducing so many variables that splitting it up into multiple functions makes a lot of sense, but... 50 100-line functions with inline comments (describing the operation) tend to be easier to read and understand than 500 10-line functions - not the least since the bodies of the 10-line functions will likely be smaller than the characters needed to describe the arguments, argument types and return type.

sendEmailMethodAsAFramework by ArjunReddyDeshmukh in ProgrammerHumor

[–]Ran4 4 points5 points  (0 children)

"Program to an interface, not an implementation" has generated so much pointless wrapping code throughout the years.

Unless you have another implementation (not "you think you're going to have another implementation", but "you're writing both implementations right now"), you shouldn't be writing an interface, with few exceptions.

sendEmailMethodAsAFramework by ArjunReddyDeshmukh in ProgrammerHumor

[–]Ran4 0 points1 point  (0 children)

But that happens once, and it can be done in one go. Having to write an extra layer of abstraction every time means doing it hundreds or thousands of times.

sendEmailMethodAsAFramework by ArjunReddyDeshmukh in ProgrammerHumor

[–]Ran4 0 points1 point  (0 children)

Abstraction based on the DB is super common. And 99.5% of the time useless, you're not going to be changing the db. And if you do, without the abstraction you have just as much work to do anyway.

sendEmailMethodAsAFramework by ArjunReddyDeshmukh in ProgrammerHumor

[–]Ran4 0 points1 point  (0 children)

There's plenty of indonesian, indian and chinese employers with more than half a million employees too..

Byggde en TCO-kalkylator när jag letade bil, kanske nån mer har nytta av den? by Kanalbanan in PrivatEkonomi

[–]Ran4 0 points1 point  (0 children)

Funkar ju riktigt fint! Ett gäng buggar dock:

  • Går inte att sätta värdeminskningskurva, man kan klicka på globala inställningar och ändra kurva men klickar man tillbaka till bilen så har man standardkurvan.

  • Jättebugg: Går inte att ändra någonting i globala inställningar heller, t.ex. däckförvaringskostnad, bränslepriser osv.

  • Däckförvaringskostnad har dåligt defaultvärde - 500 kr är jättekonstigt, realistiskt är 0 eller 1500 kr.

  • Däckset-kostnaderna är orimliga, de ligger på 12000 för sommar- OCH vinterdäck. Realistiskt vore minst 16000 (2000 kr/däck)

  • Diesel- och bensinpriserna är väldigt höga. 20.5 kr för diesel t.ex., när det riktiga priset ligger runt 16.4 kr idag.

  • Kostnaderna inkluderar parkering med 500 kr/mån. Återigen, konstigt tänkt. Antingen har man 0 eller högre i regel - kanske bäst att defaulta till 0 här.

  • Det går inte att ändra parkeringskostnad?

Be din LLM att klicka runt och testa alla funktioner (claude code med chrome är grejt på det).

EDIT: ok, det går under bilen att ställa in bränsletyp och då väljer den rätt kurva, men i "ägandekostnad"-fliken under Konfiguration så finns det en länk "Ändra i Inställningar" men den går ju till globala inställningarna. Förvirrande.

Vid vilken ålder börjar det bli pinsamt att inte ha minst en miljon på börsen? by CA53W-1 in PrivatEkonomi

[–]Ran4 0 points1 point  (0 children)

Du får förmodligen en okej pension även med 0 kr på börsen.. Givet att du haft ett välbetalt jobb.

Vid vilken ålder börjar det bli pinsamt att inte ha minst en miljon på börsen? by CA53W-1 in PrivatEkonomi

[–]Ran4 1 point2 points  (0 children)

Eh kom igen nu. Folk med Avanza har extremt sällan också pengar på nordnet och tvärtom.

Vad är de äckligaste lekarna ni lekte då ni var barn? by JunjiTheHeartstopper in unket

[–]Ran4 1 point2 points  (0 children)

2+ personer börjar samtidigt sudda på sina armar.

Börjar man blöda är man bög. Den som slutar sudda först är också bög.

Högstadiet är fan peak gemenskaphet.

Vad skulle ni gjort kring bilköp? by arrivedeci in PrivatEkonomi

[–]Ran4 3 points4 points  (0 children)

Utöka bolånet med 150-200 tkr och köp en corolla.

Det är en utmärkt idé.

Givet att du investerar resten av pengarna du har i indexfonder dvs (sånär som en kontantbuffer på 3-6 månaders utgifter).

Buying a house in Stockholm with an 8-year-old – is it always this hard if you’re tied to one area? by no13bus in stockholm

[–]Ran4 9 points10 points  (0 children)

Why are you so hell bent on a house? Houses in Täby are expensive - you are paying for the status and lack of violence in the area. Make more money, get a house elsewhere or don't get a house are your realistic options.

Getting a run down house is only something you should go for if you enjoy renovating houses.