• 0 Posts
  • 118 Comments
Joined 1 year ago
cake
Cake day: June 1st, 2023

help-circle
  • Layers - get a good base layer, merino wool is the gold standard for these. You also want to get a neck gaiter, plus some merino wool socks, and some kind of cap. These will keep you warm and dry throughout most cold weather. Add more layers on top when outside, and remember to remove layers proactively if you feel yourself starting to sweat - it’s never a good idea to be wet in cold weather. The base layer will make physical exertion a pretty hot affair quite fast, so you’d be surprised how fast the sweat starts pouring.




  • I don’t think you necessarily need to have studied a lot of math to be successful in programming, but you will need it if you want to get a CS degree, which in turn can be a good lever to a fruitful programming career.

    My advice when it comes to math - math skills build upon the concepts you’re expected to have learned before, meaning that if you didn’t fully get everything in the past, then your foundation is not in great shape and you will struggle at higher levels. Going back and repeating the fundamentals just so that you fully understand everything is very helpful in my experience.

    I also think that understanding math is rewarding in itself, for what it’s worth!



  • I’m going to guess here and the poster can fill in details - I guess that they live in a rental owned by the municipality.

    The rents for these are not market-based but instead based on a fairly complex system of pricing based on the standard of the apartment, with rent increases being negotiated by the renters union.

    This system has some merits - it has definitely kept rents pretty low for rentals in Sweden generally - but has also been a part of shaping the very dysfunctional housing market we see in Sweden today.

    Basically, Sweden had low standards of housing in the mid-1900s, at which point the left-wing governments started a program called Miljonprogrammet, basically a housing program to build a million homes, which should be affordable and of high standard. This program started in 1965, hence my suspicion that the OP lives in this type of apartment.

    The program is considered a bit controversial today as the areas built under this program are now basically the high-crime areas in Sweden in many cases. This is not inherent to the program though, but instead a consequence of the fact that this program was so damn successful at fulfilling its job that Sweden had an affordable housing surplus for decades after that program was started. Affordable housing construction basically stopped once the program was over and only co-ops and houses were built after (an overstatement but broadly true). Later, right-wing governments ran programs to sell off this housing stock to private interests which managed them in a slumlord fashion, leading to their current reputation.

    Anyway, the current situation of housing in Sweden is that the housing market is bifurcated - you can apply for municipal rentals, which have waiting times upwards of 20 years in attractive cities, or you can get a massive loan and buy either a co-op apartment or a house. There’s generally a shortage due to the lack of building for so many years. If you manage to get a municipal rental, you can expect to pay a rent that is far lower than servicing a loan in a similar area, but the standard of the apartment will usually be lower.

    For what it’s worth, I think that reintroducing a program such as Miljonprogrammet again is the only true way to curb the housing market situation in basically every rich country with a housing crisis. The whole concept of gentrification only exists in the context of housing scarcity. It’s pitting workers against workers in a really nasty fashion. A better way forward is to build housing like there’s no tomorrow. Government-owned, high standard, low-cost housing.






  • Consider the following: You have a class A that has a few dependencies it needs. The dependencies B and C never change, but D will generally be different for each time the class needs to be used. You also happen to be using dependency injection in this case. You could either:

    • Inject the dependencies B and C for any call site where you need an instance of A and have a given D, or
    • Create an AFactory, which depends on B and C, having a method create with a parameter D returning A, and then inject that for all call sites where you have a given D.

    This is a stripped example, but one I personally have both seen and productively used frequently at work.

    In this case the AFactory could practically be renamed PartialA and be functionally the same thing.

    You could also imagine a factory that returns different implementations of a given interface based on either static (B and C in the previous example) or dynamic dependencies (D in the previous example).




  • Iceland runs plenty of these and has a nice culture of frequenting the public bathhouse. It’s one of the few things you can do that is actually affordable there.

    They do have the advantage of having essentially infinite clean energy in the form of geothermal heat. As do Japan in many cases, for that matter. I’m sure that has something to do with these institutions having staying power there.

    Anyway, I think this idea has merits, but not as an energy saving measure. The reason for this is that in order to maintain good water quality, you have to shower thoroughly before getting into the bath, negating the potential energy benefits of the initiative. We can bring it back for it being nice, though!




  • Understand what tradeoffs different solutions make, then inform your decision on that. A fairly general principle for example is that the more cross-platform compatible a solution is, the less well-suited it will be for any given platform in terms of looks/behavior/performance. This may or may not matter for what you’re building.

    There are inherent qualities to some solutions (for example, a particular library may make for good solutions on a certain platform), and some qualities will be situational (a particular library is good for you because you happen to know the language/patterns/framework/whatever).

    I personally like to build things in Kotlin and Jetpack Compose, but that’s because I primarily build mobile apps for Android and I like the reactive UI paradigm that underpins this library along with the language that it’s written in. I would perhaps reconsider if I were building a desktop app (not as well supported), and definitely reconsider if I were building a web app (definitely a poor fit).

    So yeah, start with what you’re building and what its requirements are. Then think about what you already know, and finally put those together when evaluating a UI solution.