• augment_me 13 hours ago

    Documentation is the most valuable if it captures the design decision and intention at the time of the creation of the software, rather than the functionality of the software itself.

    Its pointless to write "This function splits the input data into two equally sized chunks, multiplies each chunk with Y and then adds it together"

    It makes more sense to write "The hardware X that this code runs on has a cache size of Y which makes this split necessary for optimal compute throughput".

    This provides the next person an understanding of why the code looks as it does, and if it should be changed at this new moment in time, when perhaps new hardware is available.

    I have seen so many design decisions being forgotten with time, and despite "documented code", a new engineer comes in and spends weeks trying to solve something that it inherently correct or is there for a good reason.

    • alexpotato 12 hours ago

      Excellent points on documenting the intention and design decisions, not just the "what".

      I also use the following metaphor using an airplane:

      There are three types of documentation:

      1. 800 page manual with page 1 being "Congratulations on purchasing your 747!"

      2. 10 page "How to change the oil in the engine"

      3. 5 item checklist "How to deal with a fire in the engine"

      Too many people think documentation is just one of the above. And if you are a developer, #1 feels overwhelming to write but the SREs may only want #3 (and may even help you write it).

      • decohen 11 hours ago

        This reminds me of the Diátaxis framework [0], which has a nice visual representation of the different types of documentation.

        They have a fourth type they call "Explanation" that's "Here's why we made the flaps behave this way, and how that relates to the theory of aerodynamics"

        [0] https://diataxis.fr/

        • percevalve 12 hours ago

          Agreed. I remember hearing very good talk from someone working on Django documentations that was very close to what you describe. Cannot find the reference to the talk, but indeed this is how the documentation is organized: https://docs.djangoproject.com/en/5.2/#how-the-documentation...

          • organsnyder 11 hours ago

            Playbooks are one of the most important documentation artifacts, IMHO.

        • dmos62 13 hours ago

          I think of this is answering the questions of what vs why. When what is being done is self-evident, that's readable code. When why it's being done is evident, that's good documentation. And, you need both.

          • bapak 12 hours ago

            "// Divides by 2" is the worst kind of comment and the unfortunate part is that thanks to "AI autocomplete" these will only be merged even more often [raises hand for forgetting to delete this instruction]

            • gopher_space 3 hours ago

              Part of the problem is that I’ve needed to add comments like that to someone’s clever one-liners (probably mine).

            • globular-toast 11 hours ago

              This is also why you should write your tests before you write the code. Far too many tests just test what the code already does. I don't care what it does, I care what it was supposed to do.

            • kaffekaka 18 hours ago

              Not a trick of the programming trade, but: life will not be clean, smooth and according to plan. Learn how to deal with things getting messy and derailed, and to accept that you "lost your streak" or whatever. Tomorrow is a new day, it is always ok to start over.

              Do optimize for the long term, but also realize you could be dead by next morning.

              • bionsystem 16 hours ago

                One life trick I learned way too late is that you're allowed to have fun, on your trade or on the side. One should enjoy a few light-hearted or relaxed moments every week. For some reason I was convinced that one should seek productivity at every moment, which is the fastest way to burn out.

                • swat535 11 hours ago

                  Another life trick I've learned is that you are also allowed to:

                  1. Say no and disagree with people

                  2. Walk away from any relationship (personal or professional)

                  3. Do what you like, believe what you like (as long as you are not harming yourself or others).

                  4. Move

                  5. Hire experts to work for you (if you can afford it)

                  6. Spend your money as you please

                  7. Engage in conversation with strangers

                  8. Drastically change your life (new career, new field of study, etc) 9. Talk to strangers.

                  It took me a long time to realize that being an adult means taking control of my life, make decisions and being okay with their consequences because _I_ made them.

                  • EasyMark 2 hours ago

                    #9 isn't on its own line, and it's wrecking my need for consistency

                    • piskov 21 minutes ago

                      Yet you are not bothered with the fact that it’s the same as #7

                  • kaffekaka 15 hours ago

                    I completely agree.

                    Enjoying life here and now is such an important aspect. For me, bouldering is such an activity. It demands maximum focus on tiny details in order to climb a piece of rock, which is completely pointless to do. Pure fun.

                    • bionsystem 13 hours ago

                      I do bowling now and read your post as if you did as well :) Completely pointless and quite fun too.

                      • edoceo 12 hours ago

                        If you're looking for a game with a point, try darts!

                        • garrickvanburen 12 hours ago

                          Or Kubb! It has a high silliness factor

                          • kaffekaka 12 hours ago

                            I enjoy the solitude of bouldering by myself out in the forest. Solo Kubb is possible but wouldn't feel the same.

                  • frontfor 16 hours ago

                    Some might object to this analogy, but I view life like investing in an index fund. It’s a diversified bet across many aspects of life and many projects (akin to how an index fund is a diversified bet across companies, sectors, geographies). Many of the bets will fail (much like many companies in the market will crash or delist), but some will deliver so much return they carry the rest, but you don’t know which ones and when ahead of time. It will be volatile, but if you persist and survive in the long run the expected outcome tends upwards.

                    • zigman1 15 hours ago

                      Not trying to be rude towards you, but I am always a bit shocked and a bit sad hearing people take their life as an investment strategy. I understand your point of view, but life also needs to be lived, not experienced as a constant chart moving up and right. My brother was/is like that, who is calculating profits and opportunities when hanging out with his friends, and will stay friend with someone as long as he will get something out of that himself. I find it a bit weird.

                      However, I understand if you are coming from a poor background, most of your life resolves around how to improve it, so me not knowing anything about you, I am not judging you for this, just find it different.

                      • OJFord 15 hours ago

                        That seems like a very different take on life than GP describes, that just happens to use the same analogy on the surface.

                        • quuxplusone 12 hours ago

                          frontfor described "life as an investment account" and recommended a long-term strategy investing in index funds. zigman1 described "life as an investment account" and gave anecdotal evidence that a short-term "day-trading" strategy could be a bad idea.

                          They're both saying the same thing... although zigman1 didn't seem to realize it. (Perhaps through being unfamiliar with jargon like "index funds" and how that differs from day trading.)

                    • apples_oranges 16 hours ago

                      Whenever I start thinking along these lines I end up imagining how damn difficult life must be for many others on planet Earth, and how easy we've got it.

                      • kaffekaka 15 hours ago

                        Yes indeed. I am truly grateful having been born in a peaceful, rich country. No bombs dropping, no famine, no crazy dictator.

                        • DSingularity 9 hours ago

                          Sad reality is some peaceful countries are peaceful but invest so much to destabilize other nations and thus ruin it for many millions of people.

                      • gchamonlive 13 hours ago

                        While we don't know what the purpose of life is, it is definitely not to beat death at the individual level.

                        Do things because you enjoy and care about them. This way if you have to start over it's yet another gift, because it's always your choice.

                        • martini333 15 hours ago

                          > Tomorrow is a new day

                          Today is a new day.

                          • cunac 13 hours ago

                            As immortal words of the master Oogway, "Yesterday is history, tomorrow is a mystery, but today is a gift. That is why it is called the present."

                            • brookst 11 hours ago

                              Or, as Yoyodyne Propulsion has it, “the future begins tomorrow!”

                          • wickedsight 13 hours ago

                            > you could be dead by next morning

                            I feel like this is often overlooked in financial planning. Everything is aimed at planning for (early) retirement. Meanwhile, the '$1 today is more valuable than $1 tomorrow' trope isn't just true for monetary value, but also for the value $1 might bring.

                            $1 today can buy memories for the rest of your life. It can bring experiences with family members and friends. Having $1 million in the bank in 40 years will never buy back time you may have wasted working to save that money.

                            I'm not saying that people shouldn't save or invest money for the long term, but I do think more people should take into account what they lose today by only focusing on the long term... Especially when that long term might never come.

                            • bombcar 13 hours ago

                              The “Die with Zero” book may go a bit overboard but I think the general message is a good one - do not OVER sacrifice today (and your youth) for a wealthy future you can’t enjoy.

                              The Bogleheads forum is full of “I scrimped and saved and now have millions but I can’t even bring myself to buy a used Toyota.”

                              It’s such an old problem it’s mentioned in Ecclesiastes 2:21-23!

                              Another way to look at it is you have time, effort, and savings; you need to balance them all because time will run out. A local college kid can do things that Buffett will never be able to do, because he has youth and years, and no billions can buy those.

                              • transportgo 9 hours ago

                                But Buffett can do things a poor old person cannot.

                              • bionsystem 13 hours ago

                                I agree, we hear too much about how to save and not enough about how to spend properly.

                                • alexey-salmin 12 hours ago

                                  My dad says basically "what you have seen and what you have eaten cannot be taken away from you".

                                  He burnt a lot of money taking us around: car trips, ski trips, windsurfing, camping, cycling. He never regretted it and now I try to follow suit and spend good time with my kids before they grow up. I could have saved the money but the money physically won't be able to buy the same thing 10 years from now. It's a race against time in a sense.

                                  • nyantaro1 2 hours ago

                                    In Mexico we say "Lo bailado, ¿quién te lo quita?" which roughly translates to "Who can take away what you've danced?"

                                  • kaffekaka 12 hours ago

                                    Agree. In the end there is no simple answer. One should save for the future, think about the long run (in Shaggy's words). But one should also enjoy the present - but that damn tent so your family can go camping.

                                    What should the balance be? Nobody knows. Making predictions is really hard, especially about the future.

                                    Like my plumber said: the best time to change the old drains and pipes in your house is the day before they break.

                                  • spacecadet 13 hours ago

                                    Just like all things, even when viewing the outcome of the long run, will see noise/errors along the way that just didnt have any real impact in the end.

                                    An insanely nerdy analogy lost to most... A car may run rough at idle but strong at high RPM, because any ground loop noise is lost in the high frequency output.

                                    • noreplydev 16 hours ago

                                      damn

                                    • augment_me 17 hours ago

                                      Temporary solutions will become permanent solutions unless you explicitly hold yourself to fixing it within a certain time window because it becomes harder the longer time has passed.

                                      This ranges from TODO's in codebases, to unpacked moving boxes, to replacing that sofa you got from your friend, to leaving a toxic relationship.

                                      After a while you acclimatize to the situation and no longer see the issue, and unless something is really broken, it grows harder to motivate yourself to change.

                                      • TobTobXX 14 hours ago

                                        This is maybe just me, but I need to remind myself of the opposite: All solutions are temporary and imperfect. So just do something, I can always go back and correct it.

                                        For me this means that I'm allowed to store away 3 things from the moving box, even though I don't know where to put the rest yet. To invite others even though I don't know what to cook yet or to write a bad implementation quickly, instead of spending hours figuring out the best one.

                                        I think a balance of perfectionism and can-do is important. But as people are predisposed differently, either advice might make sense in different circumstances.

                                        • dancek 13 hours ago

                                          > But as people are predisposed differently, either advice might make sense in different circumstances.

                                          This is a very good point. Life is a balancing act. Different people may need the opposite advice. Or you may need the opposite advice at different times. Not just in this case, but in life in general.

                                          • augment_me 13 hours ago

                                            I actually did not mean the post as a call to perfection/action but I can see why it could be seen as such. You can have a temporary solution that is good-enough for its purpose at a time. I advocate for the conscious effort to evaluate your intention so that you can feel a sense of agency around whatever happens afterwards because you are more likely to lose context, and the initial intention, as time passes.

                                          • lazyasciiart 16 hours ago

                                            Also, even after you learn this, other people will refuse to believe it, and will boldly agree to commit to months of work that is utterly pointless and even a net negative contribution to the world, because they will never do the other few months of work that was needed. And then when you say “no, we shouldn’t do this” to the 45th project plan, they get offended and swear on their own heart that they will force the second part to happen or, or, or nothing. And 6-12 months later they’ll do it again! Like fucking goldfish!

                                            • bdcravens 15 hours ago

                                              16 years ago when I was starting at my current employer as a contractor, they gave me some test data. I put it in a table called {domain}Temp. That table still exists, and about half of our production data flows through it. And yes, we've been talking about changing it for 15 years. (oof)

                                              • joquarky 10 hours ago

                                                To be fair, everything is temporary.

                                              • EasyMark 2 hours ago

                                                I'm kind of the opposite. I mark it as an issue or bullet somewhere to do and if it never happens or becomes a brain splinter, it probably never needed to happen.

                                                • atrettel 9 hours ago

                                                  This is a lesson that I've learned the hard way over the course of my life.

                                                  I do know a second way to prevent temporary solutions from becoming permanent solutions. You can just try out new things temporarily. Take your sofa example. If you choose to just try a different arrangement of furniture for a short time, that gives you can opportunity to remember to replace the sofa. The hard part is being willing to experiment with changes, but I find that it reframes things from fixing an old problem to trying something new, which can be more exciting and motivate additional improvements.

                                                  • UmGuys 12 hours ago

                                                    This is decent. Make tickets for the todos ahead of time and make sure your PM gives them priority.

                                                    • mettamage 15 hours ago

                                                      Oh damn.

                                                      I guess I've learned something.

                                                      Thanks :)

                                                      • noreplydev 16 hours ago

                                                        old codebases are always, plenty of these

                                                        • fmbb 14 hours ago

                                                          All successful code bases have this ”problem”.

                                                          You become successful by making priorities. All parts of your product do not need to be perfect.

                                                        • arkensaw 15 hours ago

                                                          this is great advice!

                                                        • pif 15 hours ago

                                                          Concerning professional software development:

                                                          Customers buy solutions. They don't buy specifications documents, they don't buy elegant code, they don't buy automatic test coverage. All of these are useful only as long as they help you deliver solutions to customers faster. Any effort more is better spent on actually building solutions for customers. Maintainability is nearly top priority; real top priority is to have something to maintain in the first place.

                                                          Corollary: quick-and-dirty exist for a reason. It's easy to say that quick-and-dirty is just dirty, and it's true: in the long run, quick-and-dirty takes longer than the-right-thing. But, there is a but: time doesn't always have the same value! Time just before a deadline is much more precious than the time after the deadline, when you can relax a bit and fix things before the next stress wave. Have it working and ship it now; we'll get it in better shape next week, while the customer will be happy playing with their new toy.

                                                          • theshrike79 15 hours ago

                                                            And telling a customer that what they want a) won't work and b) is not cost-efficient to build can also be a good idea.

                                                            You might "lose" a customer, but word will travel that you won't build crap that wastes clients money. Which in turn might bring in more business later on.

                                                            Also when building a quick-and-dirty solution, make it LOOK dirty.

                                                            A fancy UI with a janky back-end will look like polished software to the customer, keep the user experience in sync with the code progress.

                                                            If your backend is WIP, the UI should be only unstyled plain HTML components when demoing it to the customer. If there is no UI, the backend should print all kinds of janky-lookig debug messages that make it clear it's not ready for production.

                                                            • ChrisRR 13 hours ago

                                                              > Absolutely agree. It can be so difficult to explain to a customer why you've put together a prototype in 6 weeks but then struggle to explain why it'll take another 3 years to complete

                                                              • emushack 11 hours ago

                                                                Good luck convincing commission-based sales people of this.

                                                                • pif 3 hours ago

                                                                  Solution is extremely simple: commission-based sales people can only sell what already exists.

                                                                  Corollary: R&D must have the right of veto on any promise to any customer.

                                                                  • etothepii 11 hours ago

                                                                    Don't hire them. Commission-based sales people can only be used to sell transactional products.

                                                                • EasyMark 2 hours ago

                                                                  Definitely "documentation beyond "how to use this" is going to cost you more" is a policy I do for side business outside my day job. That said I do try to spend a bit of extra time to make the API easy to understand, well named, and expose only those things they need. But I just consider those good coding and time well spent when I have to revisit it. What lies beneath is not always be so pretty, depending on what the customer is paying.

                                                                  • SkyPuncher 6 hours ago

                                                                    > quick-and-dirty exist for a reason. It's easy to say that quick-and-dirty is just dirty, and it's true: in the long run, quick-and-dirty takes longer than the-right-thing

                                                                    I've started to view this as "quick and dirty pays the bills for me to clean up later".

                                                                    Yes, it'd be great to have an elegant solution right off the bat - but that's almost always going to take more time/effort. There's also a good chance what you build is completely wrong, so it might get thrown away.

                                                                    Of course, there are exceptions to this. Particularly, for well-known, well defined things or safety critical things.

                                                                    • denvrede 13 hours ago

                                                                      > we'll get it in better shape next week, [...]

                                                                      All of the above is only true if the quoted part is taken seriously and actually acted on.

                                                                      • pif 3 hours ago

                                                                        Sure, I agree with you!

                                                                      • flyinglizard 14 hours ago

                                                                        On that line, it's a good idea to optimize for the integral of business value delivered. It's better to deliver something partial and hack-y quickly so the business can start enjoying it rather than delivering all at once. Not to mention the invaluable interim feedback gathered from your users in the meantime.

                                                                        Also, it's not enough to build something; you need to make sure people are using it, and using it right, or else you leave value on the table. Run trainings, monitor user engagement, talk to your users. Make sure what you built is used to its full potential and delivers the maximal impact.

                                                                        • eszed 10 hours ago

                                                                          > Talk [alternately: listen] to your users

                                                                          Oh, how I wish the companies I work with did that. When I find one that does I'm immediately loyal for life... Or, well, until they IPO / exit - which, in my now repeated experience, is when they stop paying attention.

                                                                      • alexpotato 12 hours ago

                                                                        If you have a giant legacy code base with no unit tests, there are probably 2-3 unit tests you can write that will MASSIVELY improve delivery rate.

                                                                        Example:

                                                                        - owned a legacy system that deployed software to production

                                                                        - there were "deployment windows" for different applications

                                                                        - the "is now time to deploy app X?" logic was a giant rat's nest of if/then statements

                                                                        - AND it used datetime.now() in the function

                                                                        - that meant you had to wait for the window to actually hit to see if any changes worked

                                                                        - changed the function to be can_deploy(current_time = datetime.now()) so you could pass in a time

                                                                        - meant we could add unit tests

                                                                        - changes to the logic went from taking two people 45 minutes hand tracing to <30 seconds

                                                                        I tell this story whenever people say "I don't have time for unit tests!". I think they mean "I don't have time to write an entire suite of unit tests" which might be fair. But there is ALWAYS time to write a couple key tests.

                                                                        • treetalker a day ago

                                                                          The big one, for keeping my focus on the power of repeated, consistent action, and prioritizing my "future selves":

                                                                          What is likely to happen if I do (or don't do) this thing one thousand days (or times) in a row?

                                                                          Examples:

                                                                          - exercising 2h per day and eating right --> I'm going to look and feel great and my health will be far better than that of my peers

                                                                          - Should I buy these cookies along with the rest of my groceries? If I do that 1,000 grocery trips in a row …

                                                                          - spending 30+ minutes per day reading the highest quality material I can find; taking notes; and figuring out ways to implement the knowledge and ideas I gain --> …

                                                                          • theshrike79 15 hours ago

                                                                            I have a similar thing but for putting purchases in context.

                                                                            If I buy a good quality pair of jeans and I wear them 200 days every year for multiple years, its cost per wear is negligible even if I pay 100-200€ for them.

                                                                            On the other hand a pair of fancy suit pants I wear for that one wedding and maybe Grandma's birthday is going to have a massive cost per wear -> no need to get the top shelf stuff, maybe just rent? Grandma is fine with business casual so I can go in with a jeans and blazer =)

                                                                            The same works with subscriptions. Youtube Family isn't cheap - but we watch so much Youtube content that just the ability to skip all ads on every platform without addons or special clients is easily worth the time saved.

                                                                            (It's also interesting that kids under 13 can't be enrolled to a Family on Youtube and thus are inundated with unskippable ads...)

                                                                            • andrepd 13 hours ago

                                                                              > (It's also interesting that kids under 13 can't be enrolled to a Family on Youtube and thus are inundated with unskippable ads...)

                                                                              Welp, looks like the addons and special clients are useful after all x)

                                                                            • itsmevictor a day ago

                                                                              I like your approach to relating your daily choices to your broader life goals.

                                                                              I think you'd like Atomic Habits [1] if you haven't read it already.

                                                                              [1] https://www.amazon.com/Atomic-Habits-Proven-Build-Break/dp/0...

                                                                              • johnfn a day ago

                                                                                This is a good one. What's gonna happen if I respond to comments on HN for 1000 days in a row? Uh oh.

                                                                                • etothepii 15 hours ago

                                                                                  You will have high reputation and be able to change the background colour, down vote comments etc.

                                                                                • alper 16 hours ago

                                                                                  It takes altogether too long for many people to find out that they have a body.

                                                                                  • socalgal2 17 hours ago

                                                                                    how do you arrive at 2hrs a day? AFAICT 1hr a day gives you 90-95% benefit of 2hrs.

                                                                                    To put it another way, comparing to 2hrs

                                                                                        15mins = 50% benefit
                                                                                        30mins = 75% benefit
                                                                                        60mins = 90-95% benefit
                                                                                        120mins = 100%
                                                                                    
                                                                                    Everyone has their own thresholds but paying double for 5-10% more doesn't seem worth it to me personally.
                                                                                    • treetalker 17 hours ago

                                                                                      Real-life experience (over several decades). For me, one hour of even intense exercise is good but not enough to get me to, and keep me at, a point near my personal peak athletic performance. YMMV.

                                                                                      • _kb 15 hours ago

                                                                                        The secret is to have a very low peak. More of an athletic knoll really.

                                                                                    • jesterson 20 hours ago

                                                                                      > I'm going to look and feel great and my health will be far better than that of my peers

                                                                                      Comparing your health (or anything to that matter) to your peers is a great way to boost and maintain insecurities. There is always gonna be a healthier, sexier, younger and so on. Good luck chasing that.

                                                                                      At risk of sounding very banal, comparing yourself to your version from yesterday is the best approach.

                                                                                      • treetalker 18 hours ago

                                                                                        This is a fair point and I generally agree with you. That said, in this example I'm really using "peers" as a stand-in for where I or someone else in a similar situation will be with little or no regular exercise. (I'm a lawyer in Florida.)

                                                                                    • yummypaint a day ago

                                                                                      Most problems (including analytically intractible ones) can be modeled with a relatively simple monte-carlo simulation. Most simple monte-carlo simulations can be fully implemented in a spreadsheet.

                                                                                      Using timing coincidences in particle physics experiments is incredibly powerful. If multiple products from the same reaction can be measured at once, it's usually worth looking into.

                                                                                      Circular saws using wood cutting blades with carbide teeth can cut aluminum plates.

                                                                                      You can handle and attach atomically thin metal foils to things by floating them on water.

                                                                                      Use library search tools and academic databases. They are entirely superior to web search and AI.

                                                                                      • abetusk a day ago

                                                                                        I feel like the Monte-Carlo simulation modeling trick is one I picked up intuitively but only recently heard formalized. Do you (or anyone else) have a list of example problems that are solved in this way? Like a compendium of case studies on how to apply this trick to real world problems?

                                                                                        • bobbiechen a day ago

                                                                                          _How to Measure Anything_ by Douglas Hubbard includes a chapter on Monte Carlo simulations and comes with downloadable Excel examples: https://www.howtomeasureanything.com/3rd-edition/ (scroll down to Ch. 6)

                                                                                          The main example is, you're considering leasing new equipment that might save you money. What's the risk that it will actually cost more, considering various ranges of potential numbers (and distributions)?

                                                                                          I think it's harder to apply to software since there are more unknowns (or the unknowns are fatter-tailed) but I still liked the book just for the philosophical framing at the beginning: you want to the measure things because they help you make decisions; you don't need perfect measurements since reducing the range of uncertainty is often enough to make the decision.

                                                                                          • MrGilbert 16 hours ago

                                                                                            > I think it's harder to apply to software since there are more unknowns (or the unknowns are fatter-tailed)

                                                                                            Talking purely in agile software development, there is an idea of "Flow Metrics" [1] to use for estimation, basically boiling it down to "How many stories can we finish in the next timeframe (Sprint or whatever), and what is the uncertainty associated with this number?" I really like the idea, but haven't been able yet to test it.

                                                                                            [1]: https://www.prokanban.org/scrum-flow-metrics

                                                                                          • yummypaint a day ago

                                                                                            A simple example that highlights the strength of this method: a 137Cs point source is at the origin. A detector consisting of a right cylinder at arbitrary distance and orientation is nearby. What is the solid angle?

                                                                                            There may exist an analytical solution for this, but I wouldn't trust myself to derive it correctly. It would certainly be a huge mess.

                                                                                            If we add that the source is also a right cylinder instead of point source, and we want to add first order attenuation of emitted gammas by the source itself, the spreadsheet becomes only a bit more complex, but there will not be a pen and paper equation solution.

                                                                                            In this example every row of the spreadsheet would represent a hypothetical ray. One could randomly choose a location in the source, a random trajectory, and check if the photon intersects the detector. An alternative approach would be randomly choosing points in both target and detector, then doing additional math.

                                                                                            The results are recovered by making histograms and computing stats on the outputs of all the rows. You probably need a few thousand for most things at least. Remember roughly speaking 10k hits gets you ~1% statistics.

                                                                                            • LegionMammal978 a day ago

                                                                                              What annoys me with Monte Carlo methods is trying to get self-consistent statistics at multiple parameter values. E.g., in your example, what is the derivative of the solid angle as the detector is moved? Or more generally, if we have some 'net goodness' measure for a system depending on parameters, how can we efficiently maximize it, when simulations are noisy and basins are shallow?

                                                                                              My understanding is that these sorts of questions come up in ML, and there are ways of dealing with it, but they can't converge nearly as fast as simple iterations like Newton's method. Even if I have to take a series approximation instead of a simple formula, I'll be able to use autodiff (or at worst, symbolic differentiation) to get quick and precise answers to these questions.

                                                                                            • RossBencina 16 hours ago

                                                                                              Not a list, but a street fighting tactic is to apply this to finding counterexamples. Don't know whether a thing is true or false? Generate a bunch of random examples and check whether they all agree. Do this before you commit any energy to theoretical analysis. Obviously not a proof, but possibly gives a counterexample faster than you can think of one.

                                                                                              On the other hand, if you find yourself running 1hour+ numpy simulations for days on end you might want to consider an analytical approach.

                                                                                              • sceadu a day ago

                                                                                                not sure if it counts as a list of case studies, but a relevant and recent video nonetheless https://www.youtube.com/watch?v=KZeIEiBrT_w

                                                                                                also in general bayesian statistics

                                                                                                random medium article: https://medium.com/pythoneers/monte-carlo-simulation-ideas-a...

                                                                                                • thrawa8387336 a day ago

                                                                                                  Think of hard problems where sampling of outcomes could give you a better understanding

                                                                                                • aghilmort a day ago

                                                                                                  what do you consider top tier library search tools and academic databases these days?

                                                                                                  • btrettel a day ago

                                                                                                    I've used various commercial databases over the years. Some popular commercial databases relevant to HN readers include Web of Science, Scopus, and Engineering Village. When I worked at the USPTO, I used the less popular database Dialog, which I preferred. To my knowledge, none of these are available direct to consumers. I've only been able to get access from places with subscriptions. Some university libraries allow visitors where you can use these databases for free on-site.

                                                                                                    I would call these databases complementary, not "entirely superior". There are two main advantages. One is that these databases will contain many things that you can't find on Google. The second advantage of these databases is that they are designed for advanced searchers and have more powerful query languages. Google on the other hand is dumbed down and will try to guess what you want, often doing a poor job. You can get very specific on these databases in ways that you can't with Google.

                                                                                                    Related: I'm somewhat fascinated by more specialized bibliographic databases because they often contain things that can't be found on Google or the major commercial databases I listed above. I started keeping a list of them. https://github.com/btrettel/specialized-bibs

                                                                                                    • w4der 20 hours ago

                                                                                                      On a related note, if you studied and got a degree at a university, check if they have an alumni program. I pay a small yearly fee that lets me access the university's academic databases and their VPN, so I get some other perks as it looks like I'm connected through eduroam.

                                                                                                      • esperent 18 hours ago

                                                                                                        > none of these are available direct to consumers

                                                                                                        This is the big problem with this "trick of the trade". It's not a trick, it's gatekeeping that excludes anyone without a university affiliation.

                                                                                                        • aghilmort 9 hours ago

                                                                                                          Super helpful, thanks! Used to be up on the Databases when in school years ago, but it’s been so long. I wouldn’t actually know which ones are any good anymore did recognize scopus rest are new to me

                                                                                                      • 1oooqooq a day ago

                                                                                                        even wood tipped circular saw can cut Al plate...

                                                                                                        and academic/library search is indeed so underrated!

                                                                                                      • m463 19 hours ago

                                                                                                        good code may not look like you expect

                                                                                                        - duplicate code isn't always bad

                                                                                                        Sometimes* the same code copy/pasted or repeated is much easier to understand than pulling it all into a subroutine. It seems logical when writing code, but kills understanding when reading code. Predictable is better than compact a lot of times.

                                                                                                        - code should fail early

                                                                                                        Sometimes* "being robust", correcting errors or continuing after an error is the wrong thing to do. When something unexpected happens, failing, and failing quickly might be important.

                                                                                                        - explicit is better than implicit

                                                                                                        Sometimes* it is much better hardcode a list of things instead of constructing the list from whatever is there.

                                                                                                        concrete example would be a makefile that compiles .c vs a makefile that compiles one.c two.c three.c. Hardcode the list. Make it hard fail if something is missing or something is added. Yeah, it is more work, but the madness it prevents is worthwhile.

                                                                                                        there are probably thousands of these things. All are opinion, like camelcase sucks and indent should be 4, but not with tab characters.

                                                                                                        * not always

                                                                                                        • rhizome31 18 hours ago

                                                                                                          Strongly agree with your second point, too many times I had to figure out issues caused by code trying to handle errors but actually hiding them and making it so much harder to debug. The typical antipattern: catching SomeErrorType just to log "error of that type occurred", thus hiding the associated error message and the stacktrace. Even worse: trying to catch every error types.

                                                                                                          Don't catch errors unless doing something actually useful with them. Even then, it's often a good idea to re-raise.

                                                                                                          • ehnto 17 hours ago

                                                                                                            I also believe people throw way too many exceptions. You should be able to be explicit about the outcome of an error case, and not just throw exceptions in a panic.

                                                                                                            So alongside swallowed exceptions is throwing exceptions in scenarios that were entirely recoverable, and I think in both scenarios devs just don't understand their program enough and are choosing to panic, or ignore the problem.

                                                                                                            I think people often throw exceptions rather than write the code that handles the situation more gracefully. If you knew it could happen, then is it really an exceptional circumstance?

                                                                                                            • resonious 15 hours ago

                                                                                                              I think it's impossible to come up with a good rule of thumb for error handling. Sometimes catch-and-log is what you want. Sometimes catch-and-reraise is what you want. Sometimes let-it-fail is what you want. I really cannot come up with a good argument that one of these is the better default. Languages should force us to consider which failure mode we want for every function that can possibly result in error.

                                                                                                              The most egregious thing to me is the fact that most languages let any function throw any error it wants without requiring that be documented or part of the type system or anything.

                                                                                                              • brookst 10 hours ago

                                                                                                                100% agree. “Error” is as big and ambiguous as “success”. What should a successful function return? True / false? An object? A URI? Nothing?

                                                                                                                There is no rule of thumb because the scenarios are too varied and context matters.

                                                                                                                • organsnyder 11 hours ago

                                                                                                                  I try to make sure that the failure happens as close to the cause as possible. For instance, validate input when it's supplied rather than when it's used.

                                                                                                                • rusk 13 hours ago

                                                                                                                  I’d like to add a corollary to this

                                                                                                                  - Sometimes what’s best for the system isn’t what’s best for your job

                                                                                                                  Fail fast is a good ethic but all to often I’ve encountered applications that are only to happy to limp along for the sake of optics. If that’s the prevailing sentiment where you work I’d recommend against violating it off your own bat.

                                                                                                                • motorest 19 hours ago

                                                                                                                  > Sometimes* the same code copy/pasted or repeated is much easier to understand than pulling it all into a subroutine.

                                                                                                                  The Write Everything Twice principle is a much needed sanity check for absurd DRY practices. There are too many naive people arguing with a straight face that writing a base class and two specialization classes saves you the work of writing two classes.

                                                                                                                  • noufalibrahim 18 hours ago

                                                                                                                    That's one situation where it makes sense.

                                                                                                                    I had another recently where I need to implement an integration for a specific protocol. It's got a standard but most providers are not completely compliant and it's not mature enough to be exact. An expert consultant asked us to implement a pristine version and then subclass, add rules to change fields, behaviour etc. etc.

                                                                                                                    I suggested that it would make more sense to just copy/paste the implementation and make tweaks with comments that would accommodate the other providers. Worked like a charm and `diff`ing the files more or less gave us what's different. Got us from 0 to 60% without any problems.

                                                                                                                    • fmbb 14 hours ago

                                                                                                                      I have started to gravitate toward ”write everything 100 times” or at least ten.

                                                                                                                      I’m thoroughly convinced DRY is the most ill-applied of all programming dogmas. At every place of work I have been I have run into bugs introduced by changes in one of the cases someone decided to ”dry up” several times. I have never seen bugs being caused by code not being DRY, and I cannot believe someone theoretically in the future maybe forgetting to include a bug fix in some case is worth the hassle.

                                                                                                                      In very few cases you are solving an actually generic problem. These are usually low hanging fruit already solved in a standard library or are available as an open source package in your eco system of choice. Your business logic is not general.

                                                                                                                      • danparsonson 13 hours ago

                                                                                                                        Minor nitpick that the point is not to save on the upfront effort, but to reduce maintenance burden. If you need to make a change that touches multiple endpoints, then it's usually easier and safer if you only have to make that change in a single place.

                                                                                                                        • motorest 12 hours ago

                                                                                                                          > Minor nitpick that the point is not to save on the upfront effort, but to reduce maintenance burden.

                                                                                                                          There are multiple benefits beyond that. Perhaps the most important one is preventing premature abstractions, which means not only avoiding all the work required to roll them out but also avoiding the work maintaining all the technical debt it creates.

                                                                                                                          • danparsonson 9 hours ago

                                                                                                                            Sure, but not every abstraction is premature; with experience and care, it's possible to walk the line between too much and too little, and premature abstractions can be easier to undo than overdue abstractions (you can always do the copy-pasting after the fact, but if you have two classes that should have common code but have evolved in slightly different directions due to lack of oversight, it can be very difficult to unpick that cleanly)

                                                                                                                            • motorest 9 hours ago

                                                                                                                              > Sure, but not every abstraction is premature;

                                                                                                                              How can you tell if what you're task to do is to duplicate a class?

                                                                                                                              The wisdom in WET is that it prevents the accidental complexity created by premature abstractions while not preventing the introduction of abstractions later. In the process, development work is also simpler and lower in risk profile because duplicating code only causes the introduction of an independent code path while preventing regressions. Naive interpretations of DRY are renowned to needlessly cause problems due to those mistakes.

                                                                                                                      • theshrike79 15 hours ago

                                                                                                                        The Rule of Three: “When you’ve written the same code for the third time, that’s when you should stop and refactor it into an abstraction.”

                                                                                                                        I think it's from Martin Fowler's book Refactoring. (It's been a while).

                                                                                                                        The gist of it is that with one or two cases you might create the wrong abstraction. When you have three, you can abstract away the right bits without creating a monstrosity of optional parameters and booleans.

                                                                                                                        • diggan 14 hours ago

                                                                                                                          > The Rule of Three: “When you’ve written the same code for the third time, that’s when you should stop and refactor it into an abstraction.”

                                                                                                                          Small but very important change: "[...] that's when you should stop and consider refactor it into an abstraction". Sometimes it's needed, sometimes it's not, dogmatic following of that rule lacks the required nuance for real-life programming.

                                                                                                                          • rusk 13 hours ago

                                                                                                                            “If it ain’t broke don’t fix it”

                                                                                                                            I don’t believe it’s wise to add another iteration to working code just for the sake of aesthetics.

                                                                                                                            There will come a point where you will have to write a fourth implementation and at that point you really should be considering abstraction and reuse of your three earlier known good implementations.

                                                                                                                          • brookst 10 hours ago

                                                                                                                            There’s also an argument for abstraction instead of having three different people write three different implementations simultaneously. It lets you stub it out to unblock multiple teams, and centralize learning/iteration. Still imperfect and not always the solution, but worth considering in a move-fast environment.

                                                                                                                          • sharkbird2 18 hours ago

                                                                                                                            I like to think of it as that; you should have principles, such as trying to write DRY code, but any principle taken too far will end up being a bad thing. Don't be an extremist. Practice a sensible balance in everything you do.

                                                                                                                            This goes beyond programming as well, I think it goes for most things in life.

                                                                                                                            • funcDropShadow 8 hours ago

                                                                                                                              In every trade or art you start as an apprentice. That is the time when you learn the basics, the rules, the best-practices. When you have mastered the state of the art, you are a master. You know when to apply which rule and tactic to create masterful artifacts. The next step is to learn when you should break the rules and general wisdom. That is where true wisdom starts.

                                                                                                                            • mattnewton 11 hours ago

                                                                                                                              100%, on all of these. In basically every job where I worked with more than 5 people, I have regretted too many default arguments in functions that were trying to be overly dry, and code that tried too hard to not crash and carry on.

                                                                                                                              • Havoc 17 hours ago

                                                                                                                                Also sometimes copy paste is faster than trying to abstract a code block into something generalised

                                                                                                                                • __loam 17 hours ago

                                                                                                                                  Regarding your first point, I feel it's important to understand Liskov's substitution principle, which is basically, the code might look the same now, but it could diverge in the future if the contextual semantics around that code are different. Effectively that heuristic has made me a little more hesitant to do a bunch of consolidation that could end up increasing complexity by a lot if you need a bunch of special cases.

                                                                                                                                  • SV_BubbleTime 18 hours ago

                                                                                                                                    I think I had discussed every one of these items with my junior developer this week alone. Are you spying on me? Are we the same person?

                                                                                                                                  • seidleroni 12 hours ago

                                                                                                                                    I work in embedded systems, and the best advice I can offer is: resist the urge to speculate when problems arise. Stay quiet, grab an oscilloscope, and start probing the problem area. Objective measurements beat conjecture every time. It's hard to argue with scope captures that clearly show what's happening. As Jack Ganssle says, "One test is worth a thousand opinions."

                                                                                                                                    • MSFT_Edging 11 hours ago

                                                                                                                                      Another disagreeing voice, but I try to employ problem speculation when some problem arises. I'm working in a cross-company, cross-team project, where everyone's input interacts in interesting ways. When we come across a weird problem, getting folks together to ask, "what does x issue sound like its caused by?". This gets people thinking about where certain functionality lives, the boundary points between the functionality, and a way to test the hypothesis.

                                                                                                                                      It's helped a dozen times so far essentially playing 20 questions and being able to point to the exact problem and have it resolved quickly.

                                                                                                                                      This is a semi-embedded system. FGPAs, SoCs, drivers, userspace, userspace drivers, etc. Lots of stuff to go wrong, speculation gives a place to start.

                                                                                                                                      • organsnyder 11 hours ago

                                                                                                                                        Speculating is a great way to prioritizing what to investigate, but I've worked with many senior engineers (albeit not in embedded) that have made troubleshooting take longer because they disregarded potential causes based on pattern-matching against their past experiences.

                                                                                                                                        • razorfen 10 hours ago

                                                                                                                                          This has become a personal debate for me recently, ever since I learned that there are several software luminaries who eschew debuggers (the equivalent of taking an oscilliscope probe to a piece of electronics).

                                                                                                                                          I’ve always fallen on the side of debugging being about “isolate as narrowly as possible” and “don’t guess what’s happening when you can KNOW what’s happening”.

                                                                                                                                          The arguments against this approach is that speculation and statically analyzing a system reinforces that system in your mind and makes you more effective overall in the long run, even if it may take longer to isolate a single defect.

                                                                                                                                          I’ll stick with my debuggers, but I do agree that you can’t throw the baby out with the bathwater.

                                                                                                                                          The modern extreme is asking Cursor’s AI agent “why is this broken?” I recently saw a relatively senior engineer joining a new company lean too heavily on Cursor to understand a company’s systems. They burned a lot of cycles getting poor answers. I think this is a far worse extreme.

                                                                                                                                          • organsnyder 8 hours ago

                                                                                                                                            For me, it's about being aware of the entire stack, and deliberate about which possibilities I am downplaying.

                                                                                                                                            At a previous company, I was assigned a task to fix requests that were timing out for certain users. We knew those users had more data than the standard deviation, so the team lead created a ticket that was something like "Optimize SQL queries for...". Turns out the issue was our XML transformation pipeline (I don't miss this stack at all) was configured to spool to disk for any messages over a certain size.

                                                                                                                                            Since I started by benchmarking the query, I realized fairly quickly that the slowness wasn't in the database; since I was familiar with all layers of our stack, I knew where else to look.

                                                                                                                                            Instrumentation is vital as well. If you can get metrics and error information without having to gather and correlate it manually, it's much easier to gain context quickly.

                                                                                                                                            • MSFT_Edging 9 hours ago

                                                                                                                                              To me, it's the method for deciding where I put the oscilloscope/debugger.

                                                                                                                                              Without the speculation, where do you know where to put your breakpoint? If you have a crash, cool, start at the stack trace. If you don't crash but something is wrong, you have a far broader scope.

                                                                                                                                              The speculation makes you think about what could logically cause the issue. Sometimes you can skip the actual debugging and logic your way to the exact line without much wasted time.

                                                                                                                                              • sigbottle 7 hours ago

                                                                                                                                                Its probably different depending on how much observability you have into the system.

                                                                                                                                                Hardware, at least to me, seems impossible to debug from first principles, too many moving parts from phenomenon too tiny to see and from multiple different vendors.

                                                                                                                                                Software is at a higher level of abstraction and you can associate a bug to some lines of code. Of course this means that you're writing way more code so the eventual complexity can grow to infinity by having like 4 different software systems have subtly different invariants that just causes a program to crash in a specific way.

                                                                                                                                                Math proofs are the extreme end of this - technically all the words are there! Am i going to understand all of them? Maybe, but definitely not on the first pass.

                                                                                                                                                Meh you can make the argument that if all the thoughts are in the abstract it becomes hard to debug again which is fair.

                                                                                                                                                That doesn't mean any one is harder than the other and obviously between different problems in said disciplines you have different levels of observability. But yea idk

                                                                                                                                        • jdhwosnhw 12 hours ago

                                                                                                                                          I thoroughly disagree with this sentiment.

                                                                                                                                          In my experience, the most helpful approach to performing RCA on complicated systems involves several hours, if not days, of hypothesizing and modeling prior to test(s). The hypothesis guides the tests, and without a fully formed conjecture you’re practically guaranteed to fit your hypothesis to the data ex post facto. Not to mention that in complex systems there is usually 10 benign things wrong for every 1 real issue you might find - without a clear hypothesis, its easy to go chasing down rabbit holes with your testing.

                                                                                                                                          • seidleroni 11 hours ago

                                                                                                                                            That's a valid point. What I originally meant to convey is that when issues arise, people often assign blame and point fingers without any evidence, just based on their own feelings. It is important to gather objective evidence to support any claims. Sounds somewhat obvious but in my career I have found that people are very quick to blame issues on others when 15 minutes of testing would have gotten to the truth.

                                                                                                                                            • jdhwosnhw 9 hours ago

                                                                                                                                              Very reasonable, I fully agree on that front

                                                                                                                                          • cushychicken 2 hours ago

                                                                                                                                            Love this.

                                                                                                                                            The most dangerous words during debug are: “…but it should work this way!” This is a mantra I try hard to instill in all EEs I mentor.

                                                                                                                                            “Should” isn’t worth a damn to me. You test your way out of hardware bugs - you don’t logic your way out.

                                                                                                                                            • teiferer 12 hours ago

                                                                                                                                              Implicit or explicit, you need a hypothesis to be able to start probing. Many issues can surely be found with an oscilloscope. Many others can't and an oscilloscope does not help in any way. It's experience that tells you which symptom indicates which class of issues this could be, so you use the right tool for debugging.

                                                                                                                                              That's not to say that at some point you don't need to get your hands dirty. But it's equally important to balance that with thinking and theory building. It's whoever gets that balance right who will be most effective at debugging, not the one with the dirtiest hands.

                                                                                                                                              • fedeb95 12 hours ago

                                                                                                                                                this works also in general purpose corporate programming.

                                                                                                                                                • SkyPuncher 6 hours ago

                                                                                                                                                  Without speculation, what test do you decide to do?

                                                                                                                                                  Speculation is fine, but you need to ground it in reality.

                                                                                                                                                • shafyy 16 hours ago

                                                                                                                                                  There's a Germany saying "Auch nur mit Wasser kochen". Loosely translated, it means "they are also only cooking with water". What it means is that nobody knows shit and nobody is special.

                                                                                                                                                  • kaffekaka 15 hours ago

                                                                                                                                                    That's a good saying.

                                                                                                                                                    I once heard: adults are children with older bodies. People seem/try to be rational but we are all so influenced or downright controlled by emotions. The desire to be perceived as rational is one such driving force. Many things we do since "this is the right thing to do" are in fact done to reduce (or control) our anxiety. In this sense we are still children.

                                                                                                                                                    • 0x737368 16 hours ago

                                                                                                                                                      Very relevant to most advice one finds on HN

                                                                                                                                                      • defraudbah 16 hours ago

                                                                                                                                                        how did you make your comment in gray?

                                                                                                                                                        • shafyy 16 hours ago

                                                                                                                                                          Sick burn

                                                                                                                                                          • rambambram 16 hours ago

                                                                                                                                                            Thanks guys, this was the best read of the morning.

                                                                                                                                                          • apples_oranges 16 hours ago

                                                                                                                                                            Gray means the comment was downvoted

                                                                                                                                                            • alexey-salmin 12 hours ago

                                                                                                                                                              Only when you're viewing it from US, in other regions it looks grey

                                                                                                                                                              • noreplydev 16 hours ago

                                                                                                                                                                damn

                                                                                                                                                          • apples_oranges 16 hours ago

                                                                                                                                                            In programming however, the skill and foundational understanding varies greatly, and while everyone is cooking with water, there are big differences how you cook. :P

                                                                                                                                                            • brookst 10 hours ago

                                                                                                                                                              Yeah, good saying but I think GP misinterpreted it. It does not mean “nobody knows shit”, it means “you have the same tools they do so any difference in outcome is due to skill that can be learned”.

                                                                                                                                                              Its a rejection of gear lust and similar (“I can’t possibly achieve that result without [toy that I want]”)

                                                                                                                                                              • shafyy 9 hours ago

                                                                                                                                                                No, it's not what it means. It basically means "nobody is special". Whether that's true or not, is a different discussion, but that's how the saying is used.

                                                                                                                                                              • zwnow 11 hours ago

                                                                                                                                                                Don't tell this vibe coders without years of actual experience

                                                                                                                                                              • jenscow 15 hours ago

                                                                                                                                                                Everyone's shit smells the same

                                                                                                                                                                • ImHereToVote 13 hours ago

                                                                                                                                                                  Speak for yourself.

                                                                                                                                                              • rickcarlino a day ago

                                                                                                                                                                Git bisect. For certain classes of software regressions, it makes life easier. Many people (me) don’t know this feature exists and end up reinventing the wheel on their own. https://git-scm.com/docs/git-bisect

                                                                                                                                                                • koolba a day ago

                                                                                                                                                                  Whenever people try to argue that small and meaningful commits do not matter, I introduce them to git bisect. I’ve yet to meet someone familiar with it that does not agree.

                                                                                                                                                                  • pfg_ 13 hours ago

                                                                                                                                                                    Even when the bisect points to a large commit, it's usually not too difficult to find the source of the regression. Sometimes I've had to go into the original PR and bisect on its commits which is a bit harder. It doesn't seem worth it to me to try to maintain commit quality within a PR when as long as I commit often enough it doesn't really make a difference.

                                                                                                                                                                    • sethammons 14 hours ago

                                                                                                                                                                      I have used git bisect twice in 15 years and seen it used maybe three other times.

                                                                                                                                                                      I have burned hours upon hours on rebase conflicts over the years.

                                                                                                                                                                      I have settled on squash merging feature branches into main and no force pushes on anything shared, ever.

                                                                                                                                                                      • koolba 14 hours ago

                                                                                                                                                                        > I have burned hours upon hours on rebase conflicts over the years.

                                                                                                                                                                        Hate to say, "You're using it wrong", but if you haven't repeated conflicts rebasing, then your commits are probably just not small enough.

                                                                                                                                                                        A merge does not magically eliminate any of the conflicts either, you just do them all at once rather than point by point. And the smaller the changeset, the less likely you will have any conflict at all.

                                                                                                                                                                        Small changes, sorted lists (so parallel additions rarely conflict), allowing trailing commas (again to allow for parallel addition), splitting dependency updates from structural changes (to allow wholesale removing them if they were done separately), ... there's plenty of little changes to how you put together work that make this workflow easier.

                                                                                                                                                                        • ubercow13 11 hours ago

                                                                                                                                                                          Is this true? If the upstream changes some lines of code once, but your branch changes them 5 times in separate commits, iterating on the correct change to those lines, you will have to resolve conflicts 5 times. And 4 of those times you'll be expending effort to merge the correct code from upstream with code you know isn't correct/final on your branch.

                                                                                                                                                                          Likewise if multiple iterations on those lines were made upstream while your feature branch exists.

                                                                                                                                                                          Fundamentally expending any effort to find a coherent combination of two pieces of code where one of them you know isn't going to remain is a waste of time.

                                                                                                                                                                          The only advantage would be if those incremental changes actually make it easier to arrive at the final merge of the last changes on each branch but I'm not sure your above tips really guarantee that. IME it rarely happens.

                                                                                                                                                                      • pydry 14 hours ago

                                                                                                                                                                        i can count maybe 3 times in the last 15 years ive used git bisect and it didnt even catch the bug in at least one of those cases.

                                                                                                                                                                        It's one of those things that sounds super cool and advanced and i thought id be using all the time when i first learned about it but in practice 99/100 times to see when and where to bug was introduced it it's quicker and easier to just track it down manually in the code.

                                                                                                                                                                        • Karliss 11 hours ago

                                                                                                                                                                          On the other side of experiences - i have used git bisect at least 3 times just last week to track down source of regression. I was not the person who wrote the code originally or introduced the regression. All i knew that it worked in last version but not now. Bisect, do an easy fix, add the missing test and move on to next bug. No need to think hard.

                                                                                                                                                                          • Cthulhu_ 13 hours ago

                                                                                                                                                                            I suspect it depends highly on the size of the code, number of commits, number of committers, etc; I can imagine it can be very useful in e.g. Linux when you're trying to find when something was introduced when that may have been 15 years ago in a piece of code touched by hundreds of people / thousands of commits since then.

                                                                                                                                                                        • sureglymop a day ago

                                                                                                                                                                          Similar feelings about git worktree. Being able to check out multiple branches at once without having to deal with stash is a game changer.

                                                                                                                                                                          • benreesman a day ago

                                                                                                                                                                            And interactive rebase. Master interactive rebase and reflog until you can do it blindfolded.

                                                                                                                                                                            • Cthulhu_ 13 hours ago

                                                                                                                                                                              Interactive rebase is something I use a lot, but I should look into improving its ergonomics; sometimes I just want to apply the current changes to a previous commit. I did have a shortcut / script the one time but it was very finnicky and fragile.

                                                                                                                                                                              • pseudo_meta 21 hours ago

                                                                                                                                                                                I've only used reflog really to look up a hash and reset back to it. Is there anything else about it one should learn?

                                                                                                                                                                                • lanfeust6 a day ago

                                                                                                                                                                                  Agreed with interactive rebase, but what of reflog? I've checked that for commit hashes when things have gone very wrong but I don't know many commands.

                                                                                                                                                                                  • benreesman a day ago

                                                                                                                                                                                    It allows you to observe and interact with the history of refs like HEAD, so superficially destructive operations like amending a commit can be recovered, reverted, etc. It's kind of like meta-git, allowing version control operations on the version control system. It's a lifesaver when you botch a merge or something and allows you to do "destructive" operations fearlessly (up to a point, you can munge a git repo pretty bad if you try hard enough).

                                                                                                                                                                                • alper 16 hours ago

                                                                                                                                                                                  The amount of times I've used `git bisect` productively can be counted on one hand.

                                                                                                                                                                                  • apples_oranges 16 hours ago

                                                                                                                                                                                    It's a useful tool, but sort of a tool of last resort.

                                                                                                                                                                                    • lanfeust6 a day ago

                                                                                                                                                                                      Very useful. What we always say after the fact is "we need more tests".

                                                                                                                                                                                    • chthonicdaemon 21 hours ago

                                                                                                                                                                                      Most people really cannot tell you what they want in any reasonable way. So expecting good specs for software without a very laborious interview and review process is pure wishful thinking. People "know what they like when they see it", so spend time rapid prototyping.

                                                                                                                                                                                      Smaller and more recent: iTerm has deep tmux support. Just do `tmux -CC` to start your session or `tmux -CC a` to attach to it and you don't have to memorise all the tmux commands.

                                                                                                                                                                                      • sumtechguy 10 hours ago

                                                                                                                                                                                        > Most people really cannot tell you what they want in any reasonable way.

                                                                                                                                                                                        But build them something and suddenly they know exactly what they want and what you built isnt it.

                                                                                                                                                                                        • pydry 14 hours ago

                                                                                                                                                                                          Also half of those people will "tell" you what you need to build and you need to work backwards from there to figure out what their actual problem is before working forward again to figure out what you actually need to build.

                                                                                                                                                                                          • scruple 11 hours ago

                                                                                                                                                                                            Dealing with this at work right now. A newly promoted lead is struggling to delegate and all of the work coming out of his team right now is instructions on how to do what they believe they want. Very frustrating!

                                                                                                                                                                                        • gopalv a day ago

                                                                                                                                                                                          > What Trick of the Trade took you too long to learn?

                                                                                                                                                                                          "Everything worth doing is worth doing badly"

                                                                                                                                                                                          And as a corollary, every complex system that works came from a simple system that works.

                                                                                                                                                                                          I learned this in programming, but now I apply it on everything from motorcycle maintenance, home appliance repair to parenting.

                                                                                                                                                                                          --

                                                                                                                                                                                          Often the easier way to fix a complex system is to pretend that it could be simpler and then reintroduce the complexity-inducing requirements.

                                                                                                                                                                                          I had a professor who taught debugging as a whole another skill from programming and used to say "Most of programming is starting from an empty editor and debugging until your code works".

                                                                                                                                                                                          The debugging "lab" in Java course (in the year 2000) was one of my transformational after-school classes - where I got a java program which fits within 2-3 pages of print code with a bug and was told to go find it in print for ~20 minutes, then given 40 minutes with a debugger instead.

                                                                                                                                                                                          • mrheosuper 18 hours ago

                                                                                                                                                                                            Not always true. For example, if you work on your bike's brake, you should make sure the work is correct and well done. You dont want it stops working when cruising at 60mph.

                                                                                                                                                                                            • zigman1 15 hours ago

                                                                                                                                                                                              My new life motto, thank you very much! You just made a stranger's day better

                                                                                                                                                                                              • tstrimple a day ago

                                                                                                                                                                                                > And as a corollary, every complex system that works came from a simple system that works.

                                                                                                                                                                                                "Do the simplest thing that works" is one of the few core architecture principles I stick my neck out for time and time again. Why write a simple function when you can spend a week accounting for every imagined corner case and implement modular expansion capabilities! Please... stop...

                                                                                                                                                                                                I empathize with the debugger story. If you're super deep in a language it makes sense to know the debugger inside and out. But stdout is universal and I've never been a specific language developer rather than being able to jump into whatever is needed.

                                                                                                                                                                                              • malwrar 12 hours ago

                                                                                                                                                                                                This one took me years to develop: build minimal demos with all new technologies you want to use in a new project, _then_ begin thinking about how you’re going to build your project. You need to understand how a tech works and _if it even works the way you think it does_ before you use it. Otherwise, you’re gambling on hope and overconfidence.

                                                                                                                                                                                                Maybe I’m just dumb, but I always find that learning new tech while simultaneously trying to build with that new tech usually ends up in me rethinking the project repeatedly as I learn new tricks and techniques. I’ve dropped projects that I realized were too ambitious or just weren’t evolving right after months, years of effort. I’ve since learned that building needs to feel more like assembly than fabrication. You can dream, but it shouldn’t leave the whiteboard until _all_ of your technical assumptions not backed by experience are resolved into certainty. You move so much quicker and more predictably if you can predict success.

                                                                                                                                                                                                • Eduard 19 hours ago

                                                                                                                                                                                                  It took me two decades to finally decide to memorize "... | awk '{print $1}'" as a command pipeline idiom for filtering stdout for the first column (... "awk '{print $2}'" for the second column, and so on).

                                                                                                                                                                                                  All it required from me was to intentionally and manually type it down by hand instead of copy-pasting, on two purposeful occasions (within two minutes). Since then it's successfully saved in my brain.

                                                                                                                                                                                                  • penguin_booze 18 hours ago

                                                                                                                                                                                                    I'd like to give a shoutout to jq for (non-JSON) text processing, and also as an almost-replacement for awk:

                                                                                                                                                                                                      echo "foo bar" | jq -Rr 'split(" ")[0]' # prints foo
                                                                                                                                                                                                    
                                                                                                                                                                                                    I say 'almost', because jq right now can't invoke sub processes from within, unlike awk and bash. But otherwise, it's a fully fledged, functional, language.
                                                                                                                                                                                                    • wwader 15 hours ago

                                                                                                                                                                                                      Same! and jq's regexp functions are quite powerful for transforming text into something more structured:

                                                                                                                                                                                                        $ echo -e "10:20: hello\n20:39: world" | jq -cR 'capture("^(?<timestamp>.*): (?<message>.*)$")'
                                                                                                                                                                                                        {"timestamp":"10:20","message":"hello"}
                                                                                                                                                                                                        {"timestamp":"20:39","message":"world"}
                                                                                                                                                                                                      
                                                                                                                                                                                                      
                                                                                                                                                                                                        $ echo -e "10:20: hello\n20:39: world" | jq -Rn '[inputs | capture("(?<t>.*): (?<m>.*)$").m] | join(" ")'
                                                                                                                                                                                                        "hello world"
                                                                                                                                                                                                      
                                                                                                                                                                                                      Also using inputs/0 etc in combination with reduce and foreach it's possible to process streams of text that might not end.
                                                                                                                                                                                                      • Eduard 14 hours ago

                                                                                                                                                                                                        `jq -Rr 'split(" ")[0]'`? That would easily take me three decades to memorize ;-).

                                                                                                                                                                                                        for selecting the second column, PID, from `ps aux`,

                                                                                                                                                                                                            ps aux | awk '{print $2}'
                                                                                                                                                                                                        
                                                                                                                                                                                                        works for me, as gawk's default $FS field separator treats runs of whitespaces as a single separation of fields ( https://www.gnu.org/software/gawk/manual/html_node/Field-Spl... ), quite similar to "standard" Open Group/POSIX awk ( https://pubs.opengroup.org/onlinepubs/9799919799/utilities/a... ).

                                                                                                                                                                                                            ps aux | jq -Rr 'split(" ")[1]'
                                                                                                                                                                                                        
                                                                                                                                                                                                        on the other hand doesn't work here due to `ps aux` adding a variable number of spaces for formatting.

                                                                                                                                                                                                            ps aux | jq -Rr 'split("\\s+"; null)[1]'
                                                                                                                                                                                                        
                                                                                                                                                                                                        seems to work though.
                                                                                                                                                                                                        • penguin_booze 13 hours ago

                                                                                                                                                                                                          Yes, in awk, conveniently, whitespace means a run of whitespace. It gets a bit verbose in jq for the same effect; but on the other hand, you get slicing - more slices than `cut` can give you.

                                                                                                                                                                                                      • xorcist 7 hours ago

                                                                                                                                                                                                        People do this, but it feels a bit weird to start a whole new language interpreter which is much more powerful than the pitiful shell language we use, just to split a field. Why not write your whole program in awk, then? It's likely more efficient anyway.

                                                                                                                                                                                                        The canonical shell tool to split fields is cut. Easy to use, simple to read.

                                                                                                                                                                                                        For the very common use case to set variables to fields, use the shell built-in read. It uses the same IFS as the rest of the shell.

                                                                                                                                                                                                        • fainpul 10 hours ago

                                                                                                                                                                                                          These comments here about more or less clever text processing tools, each with their own syntax, feel like archaic hacks. Using something like Nushell or PowerShell makes this trivial.

                                                                                                                                                                                                          E.g. for the `ps aux` example, using PowerShell, selecting a certain column:

                                                                                                                                                                                                            gps | select id
                                                                                                                                                                                                          
                                                                                                                                                                                                          The output of gps is an array of objects. Selecting a property does this for all elements in the array.
                                                                                                                                                                                                          • apples_oranges 16 hours ago

                                                                                                                                                                                                            Now imagine what all the LLM copy pasting could do to our skills ..

                                                                                                                                                                                                            • cluckindan 19 hours ago

                                                                                                                                                                                                              Why not `… | cut -f1 -d ” ”` though?

                                                                                                                                                                                                              • efrecon 18 hours ago

                                                                                                                                                                                                                Because awk understands "columns" better.

                                                                                                                                                                                                                echo '999 888' | awk '{print $2}'

                                                                                                                                                                                                                prints 888

                                                                                                                                                                                                                • cluckindan 15 hours ago

                                                                                                                                                                                                                  How is that different from

                                                                                                                                                                                                                      echo '999 888' | cut -f2 -d " "
                                                                                                                                                                                                                  
                                                                                                                                                                                                                  except for the default delimiter being space for awk?
                                                                                                                                                                                                                  • Eduard 14 hours ago

                                                                                                                                                                                                                       echo '999  888' | cut -f2 -d " " # notice two consecutive spaces
                                                                                                                                                                                                                    
                                                                                                                                                                                                                    returns NULL.
                                                                                                                                                                                                                    • xorcist 8 hours ago

                                                                                                                                                                                                                      There are invalid column separators for awk too. To handle consecutive spaces in cut you have squeeze them:

                                                                                                                                                                                                                        echo '999  888' | tr -s " " | cut -f2 -d " "
                                                                                                                                                                                                                      • cluckindan 14 hours ago

                                                                                                                                                                                                                        Right, that would be expected though? I suppose awk is better for parsing formatted (padded) output.

                                                                                                                                                                                                                    • bregma 14 hours ago

                                                                                                                                                                                                                      How can it be "better" when it is exactly the same?

                                                                                                                                                                                                                    • stevekemp 18 hours ago

                                                                                                                                                                                                                      Speaking personally I find that I always use awk for printing (numbered) fields in shell-scripts, and when typing quick ad-hoc commands at the prompt.

                                                                                                                                                                                                                      The main reason for this is that it's easy to add a grep-like step there, without invoking another tool. So I can add a range-test, a literal-test, or something more complex than I could do with grep.

                                                                                                                                                                                                                      In short I can go from:

                                                                                                                                                                                                                             awk '{ print $2 }'
                                                                                                                                                                                                                      
                                                                                                                                                                                                                      To this, easily:

                                                                                                                                                                                                                             awk '$1 == "en4:" {print $NF}'
                                                                                                                                                                                                                      • cluckindan 11 hours ago

                                                                                                                                                                                                                        Yet using cut, even with extra piping to tr or grep before, is probably over two times faster than awk, which may or may not matter depending on what you’re doing.

                                                                                                                                                                                                                  • hintklb a day ago

                                                                                                                                                                                                                    Understanding the concept of Opportunity Cost and how it applies to everything in life.

                                                                                                                                                                                                                    - Buying a house: Is this the best return I can get on a downpayment. (Spoiler: It is not).

                                                                                                                                                                                                                    - Accepting a specific job offer: Is this the best way to spend 8 hours a day?

                                                                                                                                                                                                                    - Not making a successful trade, is as much as a loss than losing money explicitely on a trade.

                                                                                                                                                                                                                    - If you own something, you should consider what could you do with it's cash value if you sold it instead.

                                                                                                                                                                                                                    - If you have a paid off home, could you sell it and get a better ROI with the cash equivalent and rent instead? (The answer is yes and you should do it).

                                                                                                                                                                                                                    • lmm 20 hours ago

                                                                                                                                                                                                                      I'd say you may be missing the concept of Risk-Adjusted Return, which changes a lot of those calculations.

                                                                                                                                                                                                                      • hintklb 20 hours ago

                                                                                                                                                                                                                        And I would agree. There are a ton of second order effect and more complex concepts that I have learned about over the years. Opportunity cost is still the key one I go back to so often.

                                                                                                                                                                                                                      • mizzao 20 hours ago

                                                                                                                                                                                                                        Home ownership is a huge economic subsidy for the upper-middle class in the US: mortgage interest deduction, cheap leveraged borrowing, real-estate investment, up to $500k of free capital gains, and an inflation hedge. It's pretty hard to beat compared to alternative investments.

                                                                                                                                                                                                                        • hintklb 20 hours ago

                                                                                                                                                                                                                          That was the case initially.

                                                                                                                                                                                                                          Now the prices have skyrocketed due to offer and demand, and frankly because of the narrative that "Buying is always good", which ironically makes it a subpar investment.

                                                                                                                                                                                                                          Real estate is now a subpar investment. Especially today, and even with those advantages. It is also not diversified at all, absolutely not liquid and does not return even close to the SP500 (Even if you take the leverage into account, and leverages go both ways by the way...).

                                                                                                                                                                                                                          • jamil7 16 hours ago

                                                                                                                                                                                                                            I've looked at this a bunch of times, from a pure return perspective, yeah equities usually win. But there's enough benefits to homeownership outside of that lens that I think either side can make a pretty compelling argument (I say this as someone who rents). It also highly depends on which market we're talking about.

                                                                                                                                                                                                                            • bombcar 12 hours ago

                                                                                                                                                                                                                              The main thing is to look at it BOTH from a financial standpoint AND from a lifestyle choice, etc.

                                                                                                                                                                                                                              Too many people are too quick to dismiss renting because of the “conventional wisdom” - or think that only small apartments can be rented.

                                                                                                                                                                                                                              On the other hand, owning comes with comforts that can be hard to put dollar amounts on, for some.

                                                                                                                                                                                                                              • michaelrpeskin 8 hours ago

                                                                                                                                                                                                                                yes - I often think about what I would do if I "won the lottery" or similarly got a significant amount of cash. Even though I have a low mortgage rate (refied in the middle of COVID), I'd probably still pay off my house. I know it makes absolutely no rational economic sense, but not having a mortgage payment and knowing that I own my house would give me a piece of mind that as you say is hard to put a dollar amount on.

                                                                                                                                                                                                                                I know there are people out there that like maximize returns with leverage and all of that - and the math all makes sense! - but I'd prefer the simplicity of not dealing with it.

                                                                                                                                                                                                                              • HarHarVeryFunny 11 hours ago

                                                                                                                                                                                                                                Timing is huge part of it .. the real estate market goes in long term cycles, and if you buy at a good time you may do well over 10+ year timeframe, but if you buy at the peak then it may take that long just to break even if you sell (just in terms of house price, forgetting taxes/etc, and real-estate fees - 5-10% of price !).

                                                                                                                                                                                                                                Then of course you have all the expenses of home ownership, starting with real estate taxes ($20K/yr by me), maintenance (incl. costly items such as roof replacement), etc.

                                                                                                                                                                                                                                Deliberately investing in real estate, where you can choose the city/market, type of dwelling, need for renovation, etc, may have a higher chance of being profitable, although even there obviously buying at bottom vs top of the market makes a big difference. For people just buying a house to live in, conventional wisdom is not to expect it to be financially preferable (all told) than renting, even if sometimes - depending on timing - it may turn out to be.

                                                                                                                                                                                                                          • klntsky 18 hours ago

                                                                                                                                                                                                                            A house is something that fulfills your direct needs, unlike S&P500. You 'miss the opportunity' in exhcange for feeling safe about your future, which leads to more rational choices long term.

                                                                                                                                                                                                                            • bluecalm 15 hours ago

                                                                                                                                                                                                                              Or less rational like tying yourself to a place, missing opportunities in professional and personal life or opportunities to experience a different life.

                                                                                                                                                                                                                              Buying early in life is in my view almost always wrong.

                                                                                                                                                                                                                            • darick 6 hours ago

                                                                                                                                                                                                                              > - Buying a house: Is this the best return I can get on a downpayment. (Spoiler: It is not).

                                                                                                                                                                                                                              This depends entirely on how much the mortgage costs compared to the rent you'd otherwise be paying no? It is very much case by case depending on where you live and therefore completely wrong to state as a general rule? In my area mortgages are far cheaper than rent, even if you account for 10% annual returns on your house deposit when renting, you would still come out far behind in the long term

                                                                                                                                                                                                                              • hintklb 4 hours ago

                                                                                                                                                                                                                                it's a complicated calculation based on a lot of factors. Not only mortgage/rent difference, hence the calculators that are available.

                                                                                                                                                                                                                              • jwr 13 hours ago

                                                                                                                                                                                                                                > If you have a paid off home, could you sell it and get a better ROI with the cash equivalent and rent instead? (The answer is yes and you should do it)

                                                                                                                                                                                                                                Could you explain how that makes sense? I can't see it working except if you are willing to accept a huge risk by putting the money into financial markets. Banks offer around 0% in my country, and with 4.5% inflation keeping cash just burns a hole in your pocket.

                                                                                                                                                                                                                                • bombcar 12 hours ago

                                                                                                                                                                                                                                  It’s a uniquely American (which can include Canada) situation - some very nice places to live have extremely strong rental inversion markets; where it costs $4k a month to rent a place that would easily have $10k a month in mortgage and property tax.

                                                                                                                                                                                                                                  Landlords are willing to “subsidize” renters because appreciation has been so high. But it’s really only terribly high when leveraged and often the accounting is soft.

                                                                                                                                                                                                                                  The buy/rent discussion isn’t a clear cut one, and it’s more than financial, but it’s certainly not a “buying always wins” scenario as many seem to think it is.

                                                                                                                                                                                                                                  • pton_xd 8 hours ago

                                                                                                                                                                                                                                    Yep, this is exactly the situation in the Seattle area. Here it makes little sense to take on a mortgage when renting is so comparably cheap. But go anywhere else like say Atlanta where rents are roughly equal to a mortgage payment and the opposite is true.

                                                                                                                                                                                                                                    • hintklb 7 hours ago

                                                                                                                                                                                                                                      Generally you are right. VHCOL (Seattle, SF Bay Area), HCOL (California,...) and MCOL areas are better for renting and LCOL areas are better for buying.

                                                                                                                                                                                                                                      There are two factors really:

                                                                                                                                                                                                                                      - Rent to Buy ratio (or as you put it, rent compared to the mortgage)

                                                                                                                                                                                                                                      - Speculation on house price growth.

                                                                                                                                                                                                                                • ponector 17 hours ago

                                                                                                                                                                                                                                  >> Buying a house: Is this the best return I can get on a downpayment. (Spoiler: It is not).

                                                                                                                                                                                                                                  It may be the best return. You never know the future, what direction asset prices are going.

                                                                                                                                                                                                                                  • bluecalm 15 hours ago

                                                                                                                                                                                                                                    Yeah but it goes for housing as well. The property owners have been winning politically for a very long time now. It doesn't mean they will keep winning in the next decade.

                                                                                                                                                                                                                                    My view is that it's very hard to envision a world where stocks crash and real estate doesn't but it's very easy to image real estate getting cheaper while stocks do just fine.

                                                                                                                                                                                                                                    The latter scenario may happen with just a few policy changes or even without them if demography gets bad enough.

                                                                                                                                                                                                                                  • mvdtnz 21 hours ago

                                                                                                                                                                                                                                    It's really sad when you hear about people living this way. Life isn't about profit maximisation.

                                                                                                                                                                                                                                    • Dilettante_ 20 hours ago

                                                                                                                                                                                                                                      Maybe that's not something that's terribly fulfilling to you, but if one takes joy in the process itself then the act of saving a dollar on icecream can bring both more hedonic and eudaimonic pleasure than having the icecream would have, and pay off materially. Especially in the very-long term.

                                                                                                                                                                                                                                      In your head it's Ebeneezer Scrooge, but it can just as well look like ...err, Scrooge McDuck maybe? I struggle to really find a good example for what I'm talking about. But if you make a challenge to yourself, being frugal can be very fun and fulfilling, even moment-to-moment.

                                                                                                                                                                                                                                      Different people play different games!

                                                                                                                                                                                                                                      • augment_me 17 hours ago

                                                                                                                                                                                                                                        You can see it from other aspects than just money. For example, renting instead of owning frees up time and gives you much more predictable expenses. From not needing to fix the house to being able to be unemployed with predictable monthly costs.

                                                                                                                                                                                                                                        Home ownership in the west is seen as some sort of pinnacle and goal because of the perceived security it provides, but its also possible to see it as golden handcuffs that force you to stay at safe, predictable jobs for 20 years.

                                                                                                                                                                                                                                        • BoxOfRain 16 hours ago

                                                                                                                                                                                                                                          >From not needing to fix the house

                                                                                                                                                                                                                                          Someone unfamiliar with the 'landlord special' I see!

                                                                                                                                                                                                                                          • bluecalm 15 hours ago

                                                                                                                                                                                                                                            It's a good point that renting often sucks, especially renting from private individuals. I wish EU countries were more focused on civilising renting market instead of just home ownership.

                                                                                                                                                                                                                                          • hintklb 13 hours ago

                                                                                                                                                                                                                                            exactly the way I think. Home ownership is what you do when you act on autopilot.

                                                                                                                                                                                                                                            If you think this through, it is essentially spending more money and more time on something very materialistic that doesn't matter that much.

                                                                                                                                                                                                                                            Renting allows you to spend more time and resources doing things that really matter.

                                                                                                                                                                                                                                            I think most people would come to that same conclusion if they really think about this from first principle, but as a society we have been pushed and molded to believe that home ownership is the pinnacle of success and personal accomplishment somehow. I have been attacked left and right for even suggesting that owning a home is maybe not as big of a deal for personal happiness as we think. In the west and in the US it has been pushed as a core component of people's identities.

                                                                                                                                                                                                                                            • duggan 11 hours ago

                                                                                                                                                                                                                                              Renting is fine but it comes with a bunch of caveats.

                                                                                                                                                                                                                                              You can bounce around the place, maybe live in a much nicer place than you could afford to buy, more easily move cities, etc. In my twenties this was a no brainer tradeoff to me, plus a lot of people were in negative equity due to the financial crash.

                                                                                                                                                                                                                                              But you can also be forced to move prematurely. That nice place isn't your nice place, it's some other person's nice place, and maybe someday they want their brother or aunt to use it instead of you.

                                                                                                                                                                                                                                              Depending on your relative financial capability, maybe there won't be anywhere within your means to move to in the same area. Maybe you'll treat this as a grand adventure every time it happens, but as you get older maybe you'll want to actually live near your friends, family, favourite restaurants, cafes, parks, Padel courts, etc.

                                                                                                                                                                                                                                              At some point in your life you may not be earning money for a while (illness, career break, whatever) and certainly when you get older your finances may become more precarious – this is where owning tends to have more power than renting.

                                                                                                                                                                                                                                              I'm not sorry I didn't buy a house or apartment in my twenties, but when I eventually bought in my thirties it was a relief not to have to care any more whether some landlord would decide to "alter the deal" at any point.

                                                                                                                                                                                                                                              • ApolloFortyNine 10 hours ago

                                                                                                                                                                                                                                                >exactly the way I think. Home ownership is what you do when you act on autopilot. >If you think this through, it is essentially spending more money and more time on something very materialistic that doesn't matter that much.

                                                                                                                                                                                                                                                >Renting allows you to spend more time and resources doing things that really matter.

                                                                                                                                                                                                                                                Imo this is the classic argument of someone who doesn't own a home. I'm not sure how many issues you run into renting, but in home ownership they're relatively rare. And many of the issues are resolved the same way your landlord will resolve them, just paying someone to fix it (this is priced into your rent of course).

                                                                                                                                                                                                                                                It just reminds me of someone who said they were renting and when I asked why they mentioned not wanting to cut the grass. A task that takes 20 minutes twice a month 6 months out of the year.

                                                                                                                                                                                                                                                • augment_me 12 hours ago

                                                                                                                                                                                                                                                  Yeah... I have had a hard time with my friends on this topic. In general, in my country (Sweden), the system is kicking the can down the road. You have 65% of the people in the country owning, with an common housing mortgage at 85% of the purchasing price. Avgift(you pay a rent equivalent to your apt association)+interest+amortization requirement make up around 30-50% of the average income.

                                                                                                                                                                                                                                                  Average loan amortization rate is 25 years, with a 35 year roof.

                                                                                                                                                                                                                                                  Govt has approved 90% loans at the end of this year, meaning you will only need 10% as down-payment when you take a multi-million SEK loan, which will achieve nothing except for continued price growth and larger loans, and push up the average amortization rate closer to the roof.

                                                                                                                                                                                                                                                  The banks dont care, they would be fine with a 0% down payment rate, as they are immediately selling these loans and the associated risk to the pension funds.

                                                                                                                                                                                                                                                  Every year, you have new political patches to make the pyramid scheme palpable. Last year they had that homeowners can get services on their homes subsidized by 66% by the govt. The year before that they had that you can write off your taxes using loans as "economic losses". The year before that they capped the property tax, etc. You can as a housing owner (in an association) build your own in-house electricity distribution, essentially letting the renters pay for all the government electricity infrastructure. You can negotiate lower costs for internet, water, power in bulk with distributors.

                                                                                                                                                                                                                                                  As you can guess, since the homeowners with loans are the majority, its political suicide by any political party to not kick the can down the road. So no action is taken.

                                                                                                                                                                                                                                                  When I talk about this with my friends, they have not thought about this. Honestly, I would be more happy if they said "Oh yeah, I know, I believe that there is such a majority of people with loans that the government will have to bail us out, or increase inflation to eat the loans", but there isn't.

                                                                                                                                                                                                                                                  Even if we ignored the inevitable crash, and looked at the situation as-is in the current moment with all of the patches to improve house-owning, its STILL cheaper to rent. Its mind-boggling.

                                                                                                                                                                                                                                              • hintklb 21 hours ago

                                                                                                                                                                                                                                                So It's really sad to think about the value of time or things? Don't you implicitly do that every time you chose an activity over another? When you chose a job over another? when you chose to spend your time with a friend or with your wife?

                                                                                                                                                                                                                                                • __loam 17 hours ago

                                                                                                                                                                                                                                                  This kind of opportunity cost thinking can lead to things like overwork or ignoring your family. It makes sense up to a certain point but viewing your whole life through an overly simplistic heuristic can be a negative thing.

                                                                                                                                                                                                                                                  • hintklb 15 hours ago

                                                                                                                                                                                                                                                    I literally use opportunity cost as a reason to spend MORE time with my family. It is not about money strictly speaking but it is about maximizing what matters to you.

                                                                                                                                                                                                                                                  • mvdtnz 19 hours ago

                                                                                                                                                                                                                                                    I choose the things that bring me joy.

                                                                                                                                                                                                                                                  • bluecalm 15 hours ago

                                                                                                                                                                                                                                                    It's not but it's also not about dumping money into a sink or instant consumption. You can live a fulfilling life while making good financial decisions. As money gives you freedom and more choices I would argue it's easier to live fulfilling life this way.

                                                                                                                                                                                                                                                    • aspanu 21 hours ago

                                                                                                                                                                                                                                                      As usual, I'd like to bring up that it is until you have enough profit for it to no longer be only about that.

                                                                                                                                                                                                                                                      Also regardless of the quality of the examples, it may be the case that the point (opportunity cost is important to consider) is still valid.

                                                                                                                                                                                                                                                      • hintklb 21 hours ago

                                                                                                                                                                                                                                                        Thanks for clarifying. Being mindful of opportunity cost allows people to retire early, to spend more time with their loved ones, do better financial decisions.

                                                                                                                                                                                                                                                        I have seen too many of my loved ones work until their 70s because they didn't think about those concepts enough. That is what is sad.

                                                                                                                                                                                                                                                        • globular-toast 18 hours ago

                                                                                                                                                                                                                                                          Don't forget though there are things you won't be able to do at 50 even if you're retired. I'd hate to think of someone being a virgin hermit finally coming out the shell at 50 thinking the world is their oyster now. Some things you have to do when you are young.

                                                                                                                                                                                                                                                          • bluecalm 15 hours ago

                                                                                                                                                                                                                                                            My experience is that most decisions aren't of the type. It's not that you're choosing fun at 20 or longer fun at 50. Investing or not. Renting a cheaper place for a while or buying a bigger house right now. A lot of the time you will get more money and more fun if you do it right.

                                                                                                                                                                                                                                                            • hintklb 15 hours ago

                                                                                                                                                                                                                                                              I'm not sure what you are talking about? I did way more in my 30s and 40s than most of my peers that are not mindful of anything.

                                                                                                                                                                                                                                                              The whole point of opportunity cost is to be mindful of what you are spending your time and efforts on. It is not only about money

                                                                                                                                                                                                                                                              • esperent 18 hours ago

                                                                                                                                                                                                                                                                Probably far fewer things than you think, though, as long as you're healthy. You can still have love affairs, travel the world, go to festivals, climb mountains, learn to dance well into your 70s or even 80s, as long as you are healthy. Sure, you might be climbing a small mountain instead of Everest, but small mountains are beautiful too.

                                                                                                                                                                                                                                                                • bennyelv 17 hours ago

                                                                                                                                                                                                                                                                  True, but the chance of you being healthy diminishes strongly over time, and the chance of you being as healthy as your younger self is probably zero.

                                                                                                                                                                                                                                                                  • esperent 15 hours ago

                                                                                                                                                                                                                                                                    Health in old age is something that you invest in, much the same as wealth. Of course you can suffer an accident, or lose your investments from bad luck. But in both cases you're guaranteed bad results if you don't put the effort consistently and starting when you're younger.

                                                                                                                                                                                                                                                                    For health, this means making exercise, good sleep, and good diet a part of your daily routine. Much like investments, you can go as deep on that as you like, but if you start early all you need is basic knowledge.

                                                                                                                                                                                                                                                          • goodpoint 18 hours ago

                                                                                                                                                                                                                                                            It's more than sad - it's unhealthy.

                                                                                                                                                                                                                                                            • hintklb 15 hours ago

                                                                                                                                                                                                                                                              And so is your sad judgement of other people.

                                                                                                                                                                                                                                                        • david422 a day ago

                                                                                                                                                                                                                                                          When you buy a house and get a mortgage, you are going to be paying MUCH more in interest (than expected). Over the course of the mortgage, you are going to be paying MUCH more than the sticker price. Between closing costs and taxes and fees maintenance, you will need more cash than you think.

                                                                                                                                                                                                                                                          My advice is look at the numbers very carefully and choose something that is (below) or fits your budget. Sudden financial issues like the loss of a job or new vehicle purchase can put a big strain on all this.

                                                                                                                                                                                                                                                          • Etheryte 17 hours ago

                                                                                                                                                                                                                                                            This is a topic that often comes up, but once you pry, people usually overlook inflation. As an example, let's say you took out a $300,000 mortgage 30 years ago. The inflation adjusted cost of that today is $634,546 [0], so figuratively you end up paying more than double the sticker price just because of inflation.

                                                                                                                                                                                                                                                            [0] https://www.calculator.net/inflation-calculator.html?cstarti...

                                                                                                                                                                                                                                                            • Another_Act_ 11 hours ago

                                                                                                                                                                                                                                                              Eh? This is totally backwards. The amount you owe is fixed, e.g. 300k. Inflation means that that 300k is worth less and less as time goes on. Therefore, inflation is a good thing for debtors!!!

                                                                                                                                                                                                                                                              • Etheryte 11 hours ago

                                                                                                                                                                                                                                                                No, it isn't backwards when you consider the perspective of the bank. They give you 300k now, if you only paid them back 300k in total they would be incredibly deep in the red. Interest is there to offset that fact and then some. Even if the bank ended up at net zero after inflation, they would still be deep in the red because of the opportunity cost. In other words, inflation means what you're paying back to the bank is worth less and less as the time goes on. Banks are not in the business of charity, so the debtors have to cover the gap, plus profit.

                                                                                                                                                                                                                                                                • Another_Act_ 10 hours ago

                                                                                                                                                                                                                                                                  > In other words, inflation means what you're paying back to the bank is worth less and less as the time goes on.

                                                                                                                                                                                                                                                                  Well yes, that's exactly my point. The $1 you pay back to the bank 25 years ago is worth MORE than the 1$ you paid yesterday. But you still only need to pay back a fixed $300k.

                                                                                                                                                                                                                                                                  Obviously agree that interest paid is where the bank charges you for the loan, but your original point about inflation meaning your actually paying back the inflation adjusted value of the loan makes no sense.

                                                                                                                                                                                                                                                                  • Etheryte 9 hours ago

                                                                                                                                                                                                                                                                    I think this phrasing misses the point. If you paid back anything less than the inflation adjusted cost, the bank would lose money on the loan. Hence, the minimal amount you have to actually pay back is the inflation adjusted cost at the end of your mortgage, simplified to the 600k in the above comment. In the real world both inflation and interest happen continuously, but it's easier to exemplify without that fact.

                                                                                                                                                                                                                                                              • ninetyninenine 11 hours ago

                                                                                                                                                                                                                                                                The slower you pay off that loan the more you save because of inflation.

                                                                                                                                                                                                                                                                The faster inflation goes up the better a loan on an asset is. Because the asset doesn’t inflate.

                                                                                                                                                                                                                                                                Inflation is a reason why you want to buy a house.

                                                                                                                                                                                                                                                              • mitthrowaway2 a day ago

                                                                                                                                                                                                                                                                What do you do when the people you're bidding against don't understand this?

                                                                                                                                                                                                                                                                • hintklb a day ago

                                                                                                                                                                                                                                                                  it's called renting.

                                                                                                                                                                                                                                                                  Americans are obsessed with owning a home at all cost. This means that you are effectively bidding against people that do not even do the math. They are ready to spend Millions of dollar on something that is comparatively cheap to rent.

                                                                                                                                                                                                                                                                  The fact that absolutely everyone wants to buy pushed prices through the roof. The good news is that you can take the other side of this bet. it's called renting.

                                                                                                                                                                                                                                                                  Currently in most places in the US you will save literally millions over the 30 year mortgage by renting and investing in the market instead.

                                                                                                                                                                                                                                                                  Reminder that renting and owning is functionally almost exactly the same thing.

                                                                                                                                                                                                                                                                  Never trust your realtor and never trust other homeowner that most of the time never did the math (We all know those people: "I bought my home for 500k 15 years ago. It is now worth 1M$, therefore I made 500k$").

                                                                                                                                                                                                                                                                  In other words, let other people take the irrational side of this bet and take the rational side by renting. It's an arbitrage opportunity.

                                                                                                                                                                                                                                                                  • ameliaquining 21 hours ago

                                                                                                                                                                                                                                                                    An important fact that this doesn't account for is that, in the United States, living in housing that you own is highly tax-advantaged, at least if you can get a mortgage on it. For example, mortgage interest is tax-deductible for owner-occupied housing (whereas landlords usually can't deduct interest on their mortgages and so those taxes are passed on to renters), and mortgage rates for owner-occupied housing are far below market due to government subsidies and guarantees (whereas landlords have to pay higher rates that, again, they pass on to renters). This isn't good policy, but as long as it's the case, buying a single-family home is a smarter financial choice for most Americans than renting one.

                                                                                                                                                                                                                                                                    • hintklb 21 hours ago

                                                                                                                                                                                                                                                                      I live in the US and I'm aware of this. Those tax deductible interest should be calculated in the complex buy vs rent equation.

                                                                                                                                                                                                                                                                      In fact, even when taking them into account, it still doesn't make sense for most Americans to own. (In today's market).

                                                                                                                                                                                                                                                                      Renting and investing is still the way to go for at least 75% of Americans (this is slightly more nuanced for low cost of living areas, but hold true for any MCOL or HCOL areas).

                                                                                                                                                                                                                                                                      Eventually the math could make sense again, but right now owning is a huge luxury that will cost you millions in the long run.

                                                                                                                                                                                                                                                                      I invite you to play with this calculator: www.nytimes.com/interactive/2024/upshot/buy-rent-calculator.html

                                                                                                                                                                                                                                                                      • deanmoriarty 21 hours ago

                                                                                                                                                                                                                                                                        I am a renter so I don't have a horse in this race, but renting is many times the financially worse choice even in HCOL.

                                                                                                                                                                                                                                                                        Why? Because rent inflates like crazy over here! In the Bay Area 7%+ a year is completely expected, and 10% is not unusual. I have been all over the Bay Area for more than a decade (San Francisco proper, East Bay, South Bay) and know this well. It's been nuts.

                                                                                                                                                                                                                                                                        Random example: the 1 bedroom apartment that I lived in 2012 and was then going for $1,500 a month, is now going for $3,800 in the exact same building (with no/minimal renovations it seems, I just looked it up). An ~8% YoY increase. That will do it to any buy vs rent calculator, very easy to break even in under 5 years, and that's excluding the speculative ability to refinance if interest rates go down from the current 7%, in which case it becomes a huge boost.

                                                                                                                                                                                                                                                                        Renting as a long term choice just works in European countries where normal people can lock in 5+ year leases with no or minimal rent increases. America is too profit-seeking and greedy for that.

                                                                                                                                                                                                                                                                        I still rent for flexibility reasons, but I definitely see it as a luxury lifestyle choice, the most financially responsible thing would be to buy, even in HCOL.

                                                                                                                                                                                                                                                                        All this in my opinion and personal experience, totally fine if people see it differently.

                                                                                                                                                                                                                                                                        • hintklb 21 hours ago

                                                                                                                                                                                                                                                                          SF is the poster child of a HCOL where buying makes absolutely no sense.

                                                                                                                                                                                                                                                                          Even if rent increases a lot, the buy to rent ratio is so horrible that it could continue to increase for MANY more years before buying could make sense.

                                                                                                                                                                                                                                                                          I invite you to use the NYT Rent or buy calculator, It is clear as day: www.nytimes.com/interactive/2024/upshot/buy-rent-calculator.html

                                                                                                                                                                                                                                                                          • deanmoriarty 21 hours ago

                                                                                                                                                                                                                                                                            I just did, picturing exactly the situation I'm in right now:

                                                                                                                                                                                                                                                                            - Rent: $3,500

                                                                                                                                                                                                                                                                            - Home price: $700,000 (a similar unit just sold for this price a few months ago in my building)

                                                                                                                                                                                                                                                                            - Rent increase: 8%

                                                                                                                                                                                                                                                                            - All other parameters left as default, which seem reasonable (and as I said, there might be chances of refinancing over the next 10 years, which would drastically skew the picture, but I'm leaving that assumption out)

                                                                                                                                                                                                                                                                            The ratio of 0.5% monthly rent/price is common for non-luxury "dated" condos all over the city, so I think my situation reflects well the typical renter.

                                                                                                                                                                                                                                                                            Once again, in my personal experience, guided by a decade+ of living here, what people miss is the crazy rate of rent inflation. There is always a massive rent increase right around the corner, and God forbid if you are forced to move (because the landlord wants you to, it happened a couple times), then you take a gigantic hit at market rate. Once you factor in these occasional resets and the standard yearly increase, you get very close to 10% rent increase.

                                                                                                                                                                                                                                                                            • socalgal2 17 hours ago

                                                                                                                                                                                                                                                                              I think you're leaving out other expenses. You'll be paying HOA fees (one friend in SF pays ~$1000 a month and I've heard of worse). You'll also be paying property tax at around $650 a month. You'll probably be paying some maintenance that your landlord would have had to cover (though maybe HOA fees cover some of that?)

                                                                                                                                                                                                                                                                              • hintklb 20 hours ago

                                                                                                                                                                                                                                                                                Is this a condo with an outrageous HOA that you are not including? Many such cases that explain why condos are valued so much lower.

                                                                                                                                                                                                                                                                                In SF I have been renting a 1.6M$ townhouse for 4k$/month, and that is very typical of what you can find in SF and in SV.

                                                                                                                                                                                                                                                                                That has been my experience. Rent increase have been outrageous, but not as bad as the ratio between renting and buying. I would still rent even if my rent went up 50%...

                                                                                                                                                                                                                                                                                • exodust 19 hours ago

                                                                                                                                                                                                                                                                                  On a related note, how do routine inspections work in the US? Does someone walk through the house taking photos every 6 or 12 months, making sure you're keeping the place clean and no damage etc? That's how it is here in Australia, and is absolutely the worst aspect of renting IMHO.

                                                                                                                                                                                                                                                                              • archagon 18 hours ago

                                                                                                                                                                                                                                                                                If you live in rent controlled housing in SF, your rent increases are gonna be a lot less than 10% a year. And you're unlikely to ever be evicted due to a house sale.

                                                                                                                                                                                                                                                                                During our last apartment search, it was not particularly difficult to find a rent controlled apartment.

                                                                                                                                                                                                                                                                                I wish other cities would do the same thing.

                                                                                                                                                                                                                                                                                • bombcar 12 hours ago

                                                                                                                                                                                                                                                                                  Rent controlled housing (depending on how implemented) can effectively create “land gentry” who have access to a valuable asset at below market prices that they can’t sell.

                                                                                                                                                                                                                                                                              • silisili 21 hours ago

                                                                                                                                                                                                                                                                                It's not all numbers, though. Both have a lot of intangibles that can and should affect your decision.

                                                                                                                                                                                                                                                                                Owning can feel suffocating at times, and like a ball and chain at others. You can't just decide you don't like it or the area anymore and go. Maintenance is also no joke.

                                                                                                                                                                                                                                                                                Renting feels ephemeral. Getting kicked out at lease end sucks, it's hard to uproot everything and start over. Having inane rules and a landlord constantly drive by can make you feel both infantile and spied on.

                                                                                                                                                                                                                                                                                I've done both off and on and those are my own thoughts on the two.

                                                                                                                                                                                                                                                                                Financially only it's easy to pick a winner. But for some, one of these factors may be worth the extra however much money the difference is.

                                                                                                                                                                                                                                                                                • hintklb 21 hours ago

                                                                                                                                                                                                                                                                                  The best way to calculate those intangible is to associate a value to them, Most people love to say that owning is so good because they can decide on their own house improvement.

                                                                                                                                                                                                                                                                                  Ok, but how much do you really value this over? Is it worth 2M$ over 30 years? Because in a lot of cases this is what you leave on the table by deciding to own.

                                                                                                                                                                                                                                                                                  • silisili 18 hours ago

                                                                                                                                                                                                                                                                                    How much is your kid's smile worth because they are able to build a treehouse, or ride a go kart around the yard?

                                                                                                                                                                                                                                                                                    Breaking everything into some numerical value misses the whole point of life. But hey, who cares if you're rich when you're old?

                                                                                                                                                                                                                                                                                    • socalgal2 17 hours ago

                                                                                                                                                                                                                                                                                      I agree there are pluses to living in a house. One, you can rent a house. But also, there are benefits for kids living in apartments, condos as well. If we're just talking about money, maybe the things you can afford (more travel with your kids, more activities for your kids, more money for kids hobbies, etc...). More time (instead of spending time maintaining your house, gardening, mowing the lawn, etc... you can spend that time with your kids).

                                                                                                                                                                                                                                                                                      I'm not saying an apartment is better than a house. I'm only saying it's not about "rich when your old" vs "kids treehouse and go kart".

                                                                                                                                                                                                                                                                                      Thinking about all the things I loved about my house. Had a pool (but so do many apartment complexes). Could be much noisier than I can in an apartment. Had a garage for tools. I thinking most of the other things I liked have analogs in apartments/condos. But again, you can rent a house.

                                                                                                                                                                                                                                                                                      • hintklb 15 hours ago

                                                                                                                                                                                                                                                                                        I think you are missing the point entirely and have an "holier than you attitude"

                                                                                                                                                                                                                                                                                        The whole point of optimizing for some things is exactly so that I can spend more time with my kids and wife. I will be retired in the next year (in my 40s) and spend time with them while most people will continue to work in their 70s to pay their mortgage.

                                                                                                                                                                                                                                                                                        I am regularly traveling the world with my son and loved ones while most people use their weekend to "repair their homes".

                                                                                                                                                                                                                                                                                        The exact reason I do all of this is to spend way more time with my loved ones. Most people that act in autopilot mode never think about this and therefore end up not spending time with their kids (But Go Kart around the yard!)

                                                                                                                                                                                                                                                                                        You seem to think the only way forward is to provide a house to your family. I think retiring early, spending more time with them and experiencing the world is a good trade off for renting. I would invite you to consider different point of views

                                                                                                                                                                                                                                                                                  • gertlex 19 hours ago

                                                                                                                                                                                                                                                                                    Aww, they ~~paywalled~~ login-walled(?) the calculator since I last used it (my saved link of https://www.nytimes.com/interactive/2014/upshot/buy-rent-cal... also redirects to your 2024 version)

                                                                                                                                                                                                                                                                                    • ninetyninenine 11 hours ago

                                                                                                                                                                                                                                                                                      The strategy is to buy now. Because you can refinance in the future.

                                                                                                                                                                                                                                                                                      That calculator should include an interest rate change in the future.

                                                                                                                                                                                                                                                                                      • hintklb 8 hours ago

                                                                                                                                                                                                                                                                                        So take a bad deal now with the promise of maybe refinancing in 10 years. If that even ever happens again. And most of the interests are being paid upfront.

                                                                                                                                                                                                                                                                                        • ninetyninenine 8 hours ago

                                                                                                                                                                                                                                                                                          It will happen again. Look back like 10 decades. Interest rates oscillate. Follow the long term trend.

                                                                                                                                                                                                                                                                                          • hintklb 7 hours ago

                                                                                                                                                                                                                                                                                            Sure but almost never close to zero. And how much are you really going to save when they go from 6.5% to 4.5% in 10 years? While most of the interests will already be paid?

                                                                                                                                                                                                                                                                                            Hell, most people will not even want to live in the same place in 10 years.

                                                                                                                                                                                                                                                                                            Honestly this sounds like yet another argument from a realtor to push prices irrationally to all time high.

                                                                                                                                                                                                                                                                                            • ninetyninenine 6 hours ago

                                                                                                                                                                                                                                                                                              That's just perspective. The loan is 30 years. The monthly payment never changes right? So you can think of monthly payments as flat principle + interest that's constant.

                                                                                                                                                                                                                                                                                              It's the same thing. The only difference is in taxes.

                                                                                                                                                                                                                                                                                              If you refinance your monthly rate goes down. And you get a tax break.

                                                                                                                                                                                                                                                                                    • Cyph0n 21 hours ago

                                                                                                                                                                                                                                                                                      But mortgage interest is an itemized deduction, which means it only becomes a tax benefit when your interest + other deductions exceed the standard deduction. And if you do take the deduction, only the delta between it the standard deduction is a benefit.

                                                                                                                                                                                                                                                                                      • hintklb 18 hours ago

                                                                                                                                                                                                                                                                                        At this point, the so-called tax benefits are mainly a realtor talking point (the same as "Renting is throwing money away")

                                                                                                                                                                                                                                                                                      • PopAlongKid 11 hours ago

                                                                                                                                                                                                                                                                                        >whereas landlords usually can't deduct interest on their mortgages and so those taxes are passed on to renters

                                                                                                                                                                                                                                                                                        This is incorrect - landlords of course can usually deduct mortgage interest from their taxable income.

                                                                                                                                                                                                                                                                                      • ApolloFortyNine 10 hours ago

                                                                                                                                                                                                                                                                                        >Reminder that renting and owning is functionally almost exactly the same thing.

                                                                                                                                                                                                                                                                                        I don't even know where to start, but no, they are not the same thing. You get to live there, that's largely where the similarities end.

                                                                                                                                                                                                                                                                                        >"I bought my home for 500k 15 years ago. It is now worth 1M$, therefore I made 500k$").

                                                                                                                                                                                                                                                                                        Assuming 2k rent (for a 500k home), renting would have cost you $360000, and that's just a net loss. On a 30 year mortgage, the mortgage would be 2100 a month. You would have paid off $196000, be able to realize the gains, and it's incredibly unlikely you spent $196000 on repairs in 15 years. And your mortgage would not have increased in that time.

                                                                                                                                                                                                                                                                                        • hintklb 8 hours ago

                                                                                                                                                                                                                                                                                          I don't even know where to start. The math is incredibly more complex than the back of the napkin example you just gave. (downpayment, taxes, hoa, repairs, insurance, realtors, closing fees??)

                                                                                                                                                                                                                                                                                          But you are proving my point, you "think" you came ahead (while ending up paying way way more). Functionally you live in the same place, and the system managed to extract more money from you.

                                                                                                                                                                                                                                                                                        • globular-toast 18 hours ago

                                                                                                                                                                                                                                                                                          > Reminder that renting and owning is functionally almost exactly the same thing.

                                                                                                                                                                                                                                                                                          Erm, apart from the bit where you, you know, own the property meaning you can put pictures on the wall, and that's just the start...

                                                                                                                                                                                                                                                                                          But I've always said, if you have no desire to use the benefits of owning (ie. modifying it), then it's more of a liability as now you have to pay for repairs etc.

                                                                                                                                                                                                                                                                                          • hintklb 8 hours ago

                                                                                                                                                                                                                                                                                            > Erm, apart from the bit where you, you know, own the property meaning you can put pictures on the wall, and that's just the start...

                                                                                                                                                                                                                                                                                            Maybe, just maybe, those benefits are not as big as the house ownership social class has made us believe it is? Put pictures on the wall.

                                                                                                                                                                                                                                                                                        • cpursley 16 hours ago

                                                                                                                                                                                                                                                                                          I feel like most of the response to housing comments are from coastal US perspectives where the math really does not work at the moment. But that is not the case everywhere nor outside of the US.

                                                                                                                                                                                                                                                                                          • nothercastle 20 hours ago

                                                                                                                                                                                                                                                                                            You wait and invest In something else and you try to convince your spouse that living in a super nice neighborhood as a renter isn’t a bad deal. But sometimes you lose rational arguments on feels and that’s just life

                                                                                                                                                                                                                                                                                            • socalgal2 17 hours ago

                                                                                                                                                                                                                                                                                              2 anecdotes

                                                                                                                                                                                                                                                                                              * Met a guy who bought a place in Manhattan Beach LA. He said it was the best investment of his life. It was more than he and his wife could afford be she insisted. Of course maybe they just got lucky that nothing bad happened the would have forced them to sell.

                                                                                                                                                                                                                                                                                              * Have a friend that looked for over 20 years. He go out looking 2 or 3 times a month. Everything was always beyond what he was willing to spent, people out bid him etc. Finally he just came to the realization that if he didn't buy he'd never live in a house (one of his goals). So, he bought, higher than he would have. He seems pretty happy to have a house. He's been in it 6-7 years now and at least according to RedFin it's worth less than he bought it for but I don't think he cares. He's happy to be living in his own house and not an apartment.

                                                                                                                                                                                                                                                                                              PS: I'm not suggesting the alternative is worse.

                                                                                                                                                                                                                                                                                              • nothercastle 7 hours ago

                                                                                                                                                                                                                                                                                                I had the same outcomes as above it seemed overpriced but I bought in anyway and the forced savings made it a good investment anyways. But ultimately it was a good investment because my initial view of where the market was heading was completely incorrect.

                                                                                                                                                                                                                                                                                          • riffraff 11 hours ago

                                                                                                                                                                                                                                                                                            If you get a mortgage you're also getting extremely cheap credit compared to other options in many jurisdictions.

                                                                                                                                                                                                                                                                                            One should do proper accounting as things change wildly from one place to another.

                                                                                                                                                                                                                                                                                            • bozhark a day ago

                                                                                                                                                                                                                                                                                              Exactly, calculate total cost of loan vs. cost of purchase

                                                                                                                                                                                                                                                                                              • tootie 21 hours ago

                                                                                                                                                                                                                                                                                                Also, there's no shame in renting and it's frequently a better financial decision.

                                                                                                                                                                                                                                                                                              • suchoudh 15 hours ago

                                                                                                                                                                                                                                                                                                I took too much time to

                                                                                                                                                                                                                                                                                                1. Empathise about effect of menstrual cycle in women.Its so well hidden from boys (at least Indian). They wonder why girls behave erratically ( sex education needed much earlier at least in India as more kids are exposed to adult content)

                                                                                                                                                                                                                                                                                                2. be very careful when using rm command (use alias rm='rm -i' )

                                                                                                                                                                                                                                                                                                3. Have backup of backup of backup.

                                                                                                                                                                                                                                                                                                4. keep checking if backups restore correctly. (can have a very rude awakening if it does not work someday )

                                                                                                                                                                                                                                                                                                5. People who report to you are different on different days . Dont judge them on few events. (20+ chances at least be given before giving them negative feedback privately )

                                                                                                                                                                                                                                                                                                6. Friends are more useful than family. ( because you have similar priorities in life) They are a lifesaver after 50 so be in touch with school buddies and college buddies esp as its so much easier now. ( Lost few classmates in Covid who had less family support)

                                                                                                                                                                                                                                                                                                7. Learn to cook all your favorite recipes ( of your mom/wife/grandmother). You will never be sad. Make them at least for two people, share it.( right size the utensils you use regularly. not too small not too big)

                                                                                                                                                                                                                                                                                                8. Meet Reality as it is by using Vipassana. It is a super power to counter the unethical AI use. (just finished 10 day course in Bhopal, India New courses are across world ) * They are not paying me anything for this.

                                                                                                                                                                                                                                                                                                  I genuinely believe #Vipassana works. BTW Yuval Noah Harare (Wrote Sapiens and Nexus) has endorsed it as well.
                                                                                                                                                                                                                                                                                                https://www.youtube.com/watch?v=i1_YhlXiuxE

                                                                                                                                                                                                                                                                                                You can find course near you in this link. https://www.dhamma.org/en-US/courses/search?current_state=Ne... (Its free and runs on donations)

                                                                                                                                                                                                                                                                                                9. Keep a water bottle and flat tiffin (empty is also ok but can keep biscuits/leftover for later in day)

                                                                                                                                                                                                                                                                                                10. Remember to have fun. (we often forget) (kk.org has advice on how2)

                                                                                                                                                                                                                                                                                                • boccaff 14 hours ago

                                                                                                                                                                                                                                                                                                  >2. be very careful when using rm command (use alias rm='rm -i' )

                                                                                                                                                                                                                                                                                                  and treat mv/cp/rsync like rm

                                                                                                                                                                                                                                                                                                  • scruple 11 hours ago

                                                                                                                                                                                                                                                                                                    > 3. Have backup of backup of backup.

                                                                                                                                                                                                                                                                                                    > 4. keep checking if backups restore correctly. (can have a very rude awakening if it does not work someday )

                                                                                                                                                                                                                                                                                                    Your backups are only as good as your ability to restore them (under pressure).

                                                                                                                                                                                                                                                                                                  • oumua_don17 a day ago

                                                                                                                                                                                                                                                                                                    Start as early as possible in investing (in index funds) and otherwise being financially savvy. It is very beneficial to realise early on that growing your hard earned money and spending it wisely is way more important as it will in the future lead to some unexpected benefits. Freedom of thought and action!

                                                                                                                                                                                                                                                                                                    • Terretta a day ago

                                                                                                                                                                                                                                                                                                      Call Vanguard: 877-662-7447

                                                                                                                                                                                                                                                                                                      An investing prof at Chicago puts this on the whiteboard at the start of semester, saying this is really all most people need to know and this class is unlikely to learn anything in his or any class that will let them, personally, do better.

                                                                                                                                                                                                                                                                                                      • lurking_swe a day ago

                                                                                                                                                                                                                                                                                                        That’s good advice for a layman but most high earners can do much better if they care and are motivated. Most are neither though lol.

                                                                                                                                                                                                                                                                                                        Mostly on the tax side. Some specific examples:

                                                                                                                                                                                                                                                                                                        - after maxing out your 401k what should you do next? IRA? Mega backdoor roth? Something else?

                                                                                                                                                                                                                                                                                                        - If you have kids, how to best save for future education expenses? Hint: consider 529 plan.

                                                                                                                                                                                                                                                                                                        - HSA is technically the best tax advantaged account, most high earners don’t realize it and “waste” the HSA funds to reimburse typical medical bills. HSA has triple tax benefits: contributions are tax-free, growth is tax-free, and withdrawals are also tax-free after age 65 for any reason, not just medical expenses. So basically investing without any tax obligation. You can also withdraw tax free before 65, but for medical expenses only.

                                                                                                                                                                                                                                                                                                        i could go on…investing is great, but reducing your tax obligation is an even more powerful technique if you want to grow your net worth.

                                                                                                                                                                                                                                                                                                        • matt_s a day ago

                                                                                                                                                                                                                                                                                                          What you have stated is almost the same as call Vanguard, all those options are the same in the sense that they all involve investing, leaving it alone for a long time. Its just the vehicle thats slightly different and tax advantages.

                                                                                                                                                                                                                                                                                                          I wouldn’t consider those options needing much motivation or research. The key with all of them is investing early and leaving it alone.

                                                                                                                                                                                                                                                                                                          • lurking_swe a day ago

                                                                                                                                                                                                                                                                                                            If one is clueless with investing and taxes in general, and they call vanguard, their eyes will glaze over. It would be like me explaining software development to my 85 year old father.

                                                                                                                                                                                                                                                                                                            I do agree people should call vanguard. But just blindly following steps they give you is unlikely to be productive if you don’t understand why you’re doing those steps. Furthermore, those people who don’t understand _why_ will freak out every time there’s a huge market correction. They get scared - because they don’t understand any of it.

                                                                                                                                                                                                                                                                                                            I’m also curious, do they offer financial advice for your accounts outside vanguard? Genuinely curious since i’m unsure.

                                                                                                                                                                                                                                                                                                            • matt_s a day ago

                                                                                                                                                                                                                                                                                                              I’ve think the “call” part is a bit from the past, should be a setup account online with Vanguard, put it in VOO or VTSAX or the equivalent low fee market index fund and leave it alone.

                                                                                                                                                                                                                                                                                                              Replace Vanguard with any other firm but the key is picking low fee ETFs and leaving them alone. Vanguard tends to have a reputation for the lowest fees.

                                                                                                                                                                                                                                                                                                          • xhrpost a day ago

                                                                                                                                                                                                                                                                                                            Looked into HSA recently at work but legally you need a high deductible health care plan to be eligible. Looking at the options, just nothing looked good compared to my current $0 deductible/$0 co-pay plan. Hard to know for sure but just seemed like I would be paying a lot more out of pocket every year.

                                                                                                                                                                                                                                                                                                            • SlightlyLeftPad a day ago

                                                                                                                                                                                                                                                                                                              You have the unicorn health plan it appears

                                                                                                                                                                                                                                                                                                              • yieldcrv 20 hours ago

                                                                                                                                                                                                                                                                                                                Yeah get a high deductible plan as secondary insurance JUST for the HSA

                                                                                                                                                                                                                                                                                                                Max out contributions to the HSA

                                                                                                                                                                                                                                                                                                                all medical expenses (except for premiums) since the beginning of the hsa account’s existence are eligible for reimbursement, decades later

                                                                                                                                                                                                                                                                                                              • arjvik a day ago

                                                                                                                                                                                                                                                                                                                The HSA thing intrigued me and so I did some digging. It appears that post-65, you still have to pay income tax on non-medical withdrawals from an HSA? That is, besides the tax-free-for-medical-expenses part it reverts to a traditional IRA?

                                                                                                                                                                                                                                                                                                                One additional trick though is that it looks like you can pay for any HSA-eligible medical expenses (incurred after you created the HSA) out-of-pocket now, and reimburse your bills at any point in the future? Thus you can still earn interest on the cash before withdrawing it at any point in the future (treating it as tax-free liquidity).

                                                                                                                                                                                                                                                                                                                (I don't fully understand this so these are questions not statements, but hopefully I'm correct!)

                                                                                                                                                                                                                                                                                                                • lurking_swe a day ago

                                                                                                                                                                                                                                                                                                                  i replied below already, i misspoke. Apologies!

                                                                                                                                                                                                                                                                                                                  https://news.ycombinator.com/item?id=44793595

                                                                                                                                                                                                                                                                                                                  • shmerl a day ago

                                                                                                                                                                                                                                                                                                                    > The HSA thing intrigued me and so I did some digging. It appears that post-65, you still have to pay income tax on non-medical withdrawals from an HSA?

                                                                                                                                                                                                                                                                                                                    That's what I understood too. That claim that you can completely skip taxes looks wrong.

                                                                                                                                                                                                                                                                                                                    • sokoloff a day ago

                                                                                                                                                                                                                                                                                                                      You can completely escape taxes for any amounts that you have receipts for medical expenses incurred after the HSA was opened.

                                                                                                                                                                                                                                                                                                                      You can pay cash for a qualified medical expense in 2025 and take out that amount of money from the HSA decades later.

                                                                                                                                                                                                                                                                                                                      • slipnslider 19 hours ago

                                                                                                                                                                                                                                                                                                                        But does this mean I need to keep receipts around for decades? What if a claim gets denied and dr. is dead or no longer practicing?

                                                                                                                                                                                                                                                                                                                        Has anyone tested this HSA claim approval amd reimbursement of 30/40/50 year old medical work before? Is there a chance the rules could change and the medical care has to be recent?

                                                                                                                                                                                                                                                                                                                        • sokoloff 13 hours ago

                                                                                                                                                                                                                                                                                                                          The HSA is like a bank or investment account, not an insurance program; there's no claim process; you just withdraw the money whenever you want at your say-so. There is only an IRS audit process if they think you acted against the rules of the HSA.

                                                                                                                                                                                                                                                                                                                          For keeping receipts, we have a process where we dump our eligible receipts into a folder on the NAS and have the scanner/printer setup with a one-button "medical scan" that also dumps paper bills into that folder. You only need receipts to substantiate your position during an audit if they decide to do one, so a big pile of receipts and a spreadsheet with the annual amounts is enough for my taste.

                                                                                                                                                                                                                                                                                                                          For a reduction of taxes at our full federal tax bracket plus our state income rate, it's worth keeping a folder on the NAS and pushing a button on the scanner a couple handful of times per year.

                                                                                                                                                                                                                                                                                                                          > Is there a chance the rules could change and the medical care has to be recent?

                                                                                                                                                                                                                                                                                                                          There's always a theoretical chance, but any prior (or likely then-current year) medical bills would almost surely still remain eligible for reimbursement. The worst case that I can see as being likely is a rule change to require that a 2026 expense would have to be claimed by April 15, 2027. But I wouldn't expect that and think there's precedent that they couldn't change the reimbursement eligibility for expenses incurred prior to the law change. US v Carlton is one where specifically a one-year period of retroactive change was found to be "supported by a legitimate legislative purpose furthered by rational means" which suggests to me (IANAL) that longer periods of retroactive change would likely be found to violate due process.

                                                                                                                                                                                                                                                                                                                        • koolba a day ago

                                                                                                                                                                                                                                                                                                                          You can also use it to pay for Medicare premiums.

                                                                                                                                                                                                                                                                                                                          • hopelite a day ago

                                                                                                                                                                                                                                                                                                                            One thing to note!!!! Make sure to also keep records on the HSA start date and any transfers you may engage in, e.g., after leaving an employer or just changing providers. It is worth having that on record in case 20, 30, 40 years later your claims are rejected because the original opening date was lost in some transfer at some point.

                                                                                                                                                                                                                                                                                                                          • lurking_swe a day ago

                                                                                                                                                                                                                                                                                                                            i’m the parent. You are correct, my mistake! It’s too late to edit at this point. :(

                                                                                                                                                                                                                                                                                                                            What I should have said is that after 65 you can spend it on non medical stuff without penalty. BUT if you do so you’ll owe tax that year (withdrawal).

                                                                                                                                                                                                                                                                                                                            So to summarize, you can avoid all tax if it’s spent on medical stuff. For non medical (post 65) it’s still good, but not as good.

                                                                                                                                                                                                                                                                                                                            Still an amazing deal because old people tend to spend a lot more on healthcare.

                                                                                                                                                                                                                                                                                                                          • scarface_74 a day ago

                                                                                                                                                                                                                                                                                                                            Yes and you can invest your HSA funds just like anything else.

                                                                                                                                                                                                                                                                                                                          • d_burfoot a day ago

                                                                                                                                                                                                                                                                                                                            #1 Rule of Investing: you can't beat the market, but you can beat the tax man

                                                                                                                                                                                                                                                                                                                            • 1241231241 20 hours ago

                                                                                                                                                                                                                                                                                                                              Is is beating when taxes are setup in a way to incentivize investing ?

                                                                                                                                                                                                                                                                                                                            • davidivadavid a day ago

                                                                                                                                                                                                                                                                                                                              At that point get someone to do it for you for x% of what they're getting you back and live blissfully unaware of arcane tax code specifics.

                                                                                                                                                                                                                                                                                                                              • Jtsummers a day ago

                                                                                                                                                                                                                                                                                                                                At least the 401k, IRA, and HSA don't require knowing anything particularly arcane. Money goes in, don't touch until 59 1/2 (401k, IRA) or 65 (HSA).

                                                                                                                                                                                                                                                                                                                                529 plans can get a bit more complicated because you'll want one from your state (if your state has an income tax) and they may offer several, but then it's less about knowing tax code specifics than about what the differences are between their offerings.

                                                                                                                                                                                                                                                                                                                                • lurking_swe a day ago

                                                                                                                                                                                                                                                                                                                                  right, it’s not that arcane at all. I discovered all this over a couple weekends in my 20s. Started on reddit, then moved on to more official guides and books. I spent maybe 5 weekends in total doing this learning.

                                                                                                                                                                                                                                                                                                                                  It’s really not that hard and i don’t understand why more people aren’t interested. Let’s reframe for a minute…if i said a high earner could retire a year earlier, or maybe even a few years earlier just by learning some semi-advanced tax strategies. Should they do so? Yeah. They’d be crazy not to lol.

                                                                                                                                                                                                                                                                                                                                  • recursive a day ago

                                                                                                                                                                                                                                                                                                                                    For a beginner it's hard to tell which information is trustworthy and which is a sales pitch.

                                                                                                                                                                                                                                                                                                                                  • tylerflick a day ago

                                                                                                                                                                                                                                                                                                                                    529s are also capped based on the recipient, not donor.

                                                                                                                                                                                                                                                                                                                                  • laserlight 17 hours ago

                                                                                                                                                                                                                                                                                                                                    > what they're getting you back

                                                                                                                                                                                                                                                                                                                                    Even that is not a simple thing. What’s your benchmark? Is that the right benchmark for you and your goals? Agency has a cost.

                                                                                                                                                                                                                                                                                                                                    • taneq 17 hours ago

                                                                                                                                                                                                                                                                                                                                      Is it really x% of the profits? Most of the investment and financial advising services that I've had pitched to me (although that's not too many, tbh) seem to charge x% of your portfolio, and if their sage advice doesn't create a return greater than x% then sucks to be you.

                                                                                                                                                                                                                                                                                                                                    • 1oooqooq a day ago

                                                                                                                                                                                                                                                                                                                                      i tried that hack one year. Cigna just emptied my account on the first try with a provider charging 2 emergency room visits when I was there only for a xray.

                                                                                                                                                                                                                                                                                                                                      Cigna refused to lift a finger unless i sued them both.

                                                                                                                                                                                                                                                                                                                                      yeah, i wouldn't recommend that.

                                                                                                                                                                                                                                                                                                                                    • hattmall 21 hours ago

                                                                                                                                                                                                                                                                                                                                      An important part that could have been beneficial would have been to add, "today".

                                                                                                                                                                                                                                                                                                                                      I had a class where the teacher did something similar, but she showed that if you started a ROTH today and contributed only the 4 years you were in college and then stopped forever. You would have nearly the same amount of money as someone who started 1 year after they completed college and invested every year until retirement.

                                                                                                                                                                                                                                                                                                                                      Ultimately she was encouraging us to take out student loans and invest it or use any excess scholarship money to max out a ROTH IRA. She even advocated for investing all student loan money and opening credit cards tp actually pay for college, making minimum payments until graduation. Then moving away to a LCOL country and learn the language for 8-9 years while remaining in school taking 1 online class a year and travelling the world on student loans and not to worry about starting a career until 30 and start paying once you are back and start a job.

                                                                                                                                                                                                                                                                                                                                      • culopatin 20 hours ago

                                                                                                                                                                                                                                                                                                                                        The today does matter but just did the math on that and your teacher was whack.

                                                                                                                                                                                                                                                                                                                                        The gap is so big I’m going to be imprecise and won’t matter.

                                                                                                                                                                                                                                                                                                                                        A Roth allows 7k a year I believe. So 4 years of school, 28k total.

                                                                                                                                                                                                                                                                                                                                        Let’s be generous and say you start with 30k at age 18. At 65 you’ll have 700k.

                                                                                                                                                                                                                                                                                                                                        I started at 26, my salary has been increasing at 6k a year average. I don’t max it out, but hover around 10-15%, I get a 100% match on up to 7% of my salary. I’m 10x ahead of the 18yo on the same projection and 5x ahead 10 years earlier.

                                                                                                                                                                                                                                                                                                                                        Not even going to get into the interest rates and how you’re fucking up your finances tremendously for the rest of your adult life

                                                                                                                                                                                                                                                                                                                                        • karp773 21 hours ago

                                                                                                                                                                                                                                                                                                                                          ROTH IRA contributions have to be from earned income, though. The rest of the advice is of the same quality, imho. Beware!

                                                                                                                                                                                                                                                                                                                                          • yieldcrv 20 hours ago

                                                                                                                                                                                                                                                                                                                                            There are limited ways of acquiring money that can be contributed to a Roth IRA, this way is not one of them

                                                                                                                                                                                                                                                                                                                                          • scarface_74 a day ago

                                                                                                                                                                                                                                                                                                                                            This is generally not applicable to most people.

                                                                                                                                                                                                                                                                                                                                            1. Invest enough to get the company match in an S&P 500. It probably isn’t Vanguard that your company uses

                                                                                                                                                                                                                                                                                                                                            2. Pay off all of your debt except your house (and maybe your car)

                                                                                                                                                                                                                                                                                                                                            3. Max out your HSA - if you are married it’s - $8550

                                                                                                                                                                                                                                                                                                                                            4. Max out your 401K - again that’s probably not through Vanguard - $23500

                                                                                                                                                                                                                                                                                                                                            5. Step 5 - then call Vanguard and depending on your income just do a Roth up to $8000 (?).

                                                                                                                                                                                                                                                                                                                                            (Unless you are over 50 then do catch up contributions as 4.5)

                                                                                                                                                                                                                                                                                                                                            If you are under 50, you can do $40,500 tax advantaged and over 50 $48050

                                                                                                                                                                                                                                                                                                                                            • hattmall a day ago

                                                                                                                                                                                                                                                                                                                                              Step 0: Have enough extra money to do all that.

                                                                                                                                                                                                                                                                                                                                              • healsdata 21 hours ago

                                                                                                                                                                                                                                                                                                                                                And also Step 4a: Don't need to use the healthcare system.

                                                                                                                                                                                                                                                                                                                                                • scarface_74 9 hours ago

                                                                                                                                                                                                                                                                                                                                                  As much as I hate the American health care system as a senior citizen, there is an out of pocket maximum that you can budget for if you have all of the parts.

                                                                                                                                                                                                                                                                                                                                                  From what I understand it’s Medicare Part A+B and either Part C or Medigap.

                                                                                                                                                                                                                                                                                                                                                  Of course private insurance especially for older Americans like Part C and Medigap is Byzantine if you actually need it and some doctors don’t accept Medicaid (low income) and a few don’t even accept Medicare.

                                                                                                                                                                                                                                                                                                                                                  I don’t know much from either first hand or second hand experience because my mom and dad (83 and 81) are under my mom’s teacher’s retirement insurance and between them (two pensions + social security) medical expenses are more of a nuisance than something that they stress about.

                                                                                                                                                                                                                                                                                                                                              • bronco21016 21 hours ago

                                                                                                                                                                                                                                                                                                                                                Step 6 is the mega-backdoor Roth. Do after tax contributions to your 401k and have your 401k servicer do an in-plan conversion to Roth 401k.

                                                                                                                                                                                                                                                                                                                                                Also, on step 4, you may need to do a backdoor Roth IRA if you’re over the Roth IRA income limits.

                                                                                                                                                                                                                                                                                                                                                • scarface_74 21 hours ago

                                                                                                                                                                                                                                                                                                                                                  I’ve only had one employer that allowed after tax contributions (which for other people reading this is not the same as Roth 401K).

                                                                                                                                                                                                                                                                                                                                                  The issue is that most companies don’t allow it because of compliance reasons and rules regarding highly compensated employees. Of course the one company that did allow it was BigTech.

                                                                                                                                                                                                                                                                                                                                                  Not that I’m missing much. I doubt I will be in a higher tax bracket at retirement than I am now and I live in a state tax free state.

                                                                                                                                                                                                                                                                                                                                                  • bronco21016 21 hours ago

                                                                                                                                                                                                                                                                                                                                                    To me the primary benefit is when it comes to RMDs. Having a mix of traditional and Roth allows me to draw down the traditional in lower tax years to avoid RMD and have the Roth to fill in those later years or pass on to children. Plus, if you’ve maxed the $23,500ish of the traditional 401k and still have extra to save, it’s more tax advantaged in a Roth vs a taxable brokerage account.

                                                                                                                                                                                                                                                                                                                                                    These are obviously champagne problems but if you’re a high earning W2 it’s worth considering.

                                                                                                                                                                                                                                                                                                                                                    • scarface_74 5 hours ago

                                                                                                                                                                                                                                                                                                                                                      I think I should be able to do that post retirement by optimizing withdrawals with balancing tax brackets the first few years of retirement. I will have to put catch up contributions in a Roth 401K anyway starting next year (new tax law).

                                                                                                                                                                                                                                                                                                                                                • sgc 21 hours ago

                                                                                                                                                                                                                                                                                                                                                  For those of us very late to the investing game, what is the best strategy to try to catch up at least somewhat?

                                                                                                                                                                                                                                                                                                                                                  • scarface_74 18 hours ago

                                                                                                                                                                                                                                                                                                                                                    I can speak this as someone who is also behind because life…

                                                                                                                                                                                                                                                                                                                                                    https://news.ycombinator.com/item?id=44377380P

                                                                                                                                                                                                                                                                                                                                                    There is no secret. I’m 51 and the math says I won’t be able to retire until the earliest when I’m 66.5 and my wife turns 65 and probably won’t retire until I’m 68.5 and my wife turns 67. Since she will be claiming spousal social security (50% of mine) and that’s when hers doesn’t get any larger by waiting.

                                                                                                                                                                                                                                                                                                                                                    That’s with my projecting maxing out my 401K + catchup contributions + in a couple + in two years after another obligation falls off maxing out a Roth.

                                                                                                                                                                                                                                                                                                                                                    Don’t cry for me. I work remotely, we travel extensively and do the digital nomad thing sporadically. Like next year we are going to Costa Rica for a month and half in the winter and travel domestically in the summer. We live in a unit of a condotel we own and it gets rented out when we aren’t at home to cover the market.

                                                                                                                                                                                                                                                                                                                                                    The way I see it, no need to wait until retirement to travel and by the time I do, we will be doing longer stays in Costa Rica, Panama City, etc

                                                                                                                                                                                                                                                                                                                                                    I’m not rich, and I make around $200K as a staff consultant working at a third party cloud consulting company.

                                                                                                                                                                                                                                                                                                                                                    https://news.ycombinator.com/item?id=44162993

                                                                                                                                                                                                                                                                                                                                                    https://news.ycombinator.com/item?id=44159562

                                                                                                                                                                                                                                                                                                                                                • jkmcf a day ago

                                                                                                                                                                                                                                                                                                                                                  My millionaire, step-father-in-law, gave this advice to my brother when graduated.

                                                                                                                                                                                                                                                                                                                                                  I was lucky, my physics department administrator told me the same thing when I was graduating.

                                                                                                                                                                                                                                                                                                                                                  The 2ND best piece of advice is to rollover your 401k when you move to a new company -> this cost me at least 500k because they effectively stagnate when your company isn't paying the maintenance cost (AIUI).

                                                                                                                                                                                                                                                                                                                                                  • slapstick a day ago

                                                                                                                                                                                                                                                                                                                                                    > this cost me at least 500k because they effectively stagnate when your company isn't paying the maintenance cost

                                                                                                                                                                                                                                                                                                                                                    Is this true? My understanding is that the fees come out of the account itself. There's other good reasons to roll over (primarily investment flexibility) but I have not heard of something like this.

                                                                                                                                                                                                                                                                                                                                                    • bcyn a day ago

                                                                                                                                                                                                                                                                                                                                                      I don't think the point about 401k stagnation is true. At most fee structures and optionality of funds change. How did that cost you 500k exactly?

                                                                                                                                                                                                                                                                                                                                                    • dmichulke 19 hours ago

                                                                                                                                                                                                                                                                                                                                                      Especially, if you don't want to invest in a bitcoin ETF

                                                                                                                                                                                                                                                                                                                                                      https://markets.businessinsider.com/news/etf/bitcoin-etf-van...

                                                                                                                                                                                                                                                                                                                                                      • monkeyelite a day ago

                                                                                                                                                                                                                                                                                                                                                        Why are we advertising this particular broker?

                                                                                                                                                                                                                                                                                                                                                        • arjvik a day ago

                                                                                                                                                                                                                                                                                                                                                          Vanguard is one of the cooler-structured brokerages. Vanguard (the management firm) is owned by the mutual funds themselves, of which you are an investor of. So their shareholder obligation is genuinely towards "clients" of the individual mutual funds. As far as I'm aware, this is the only mutually-owned mutual fund firm.

                                                                                                                                                                                                                                                                                                                                                          It's definitely got a solid track record and good fees, but these are things I'd feel weird about advertising it on HN for.

                                                                                                                                                                                                                                                                                                                                                          • monkeyelite 12 hours ago

                                                                                                                                                                                                                                                                                                                                                            I’ve been a customer for 15 years:

                                                                                                                                                                                                                                                                                                                                                            - they have bad customer service - they have a bad website that hides important information - they don’t have cheaper funds than others - they were latest to the party on commission free trading.

                                                                                                                                                                                                                                                                                                                                                            It’s just a well-marketed brand.

                                                                                                                                                                                                                                                                                                                                                          • nemomarx a day ago

                                                                                                                                                                                                                                                                                                                                                            vanguards very large and they're a mutual fund, so they have a lower profit motive than most brokers for it. they're basically the standard retirement fund company now

                                                                                                                                                                                                                                                                                                                                                            • monkeyelite 20 hours ago

                                                                                                                                                                                                                                                                                                                                                              > lower profit motive than most brokers for it

                                                                                                                                                                                                                                                                                                                                                              This doesn’t make sense.

                                                                                                                                                                                                                                                                                                                                                              • gertlex 19 hours ago

                                                                                                                                                                                                                                                                                                                                                                What I think they're referring to is their sheer size (ratio of customers or $ invested to staff) has meant historically the annual % fees on mutual funds and other investments have been lower than at other institutions.

                                                                                                                                                                                                                                                                                                                                                                It's... less unique to Vanguard these days, as several of the large providers have equivalent low-cost funds you can invest in; but 15 years ago it was more significant, iirc.

                                                                                                                                                                                                                                                                                                                                                        • FristPost a day ago

                                                                                                                                                                                                                                                                                                                                                          I didn't start investing until I understood it.

                                                                                                                                                                                                                                                                                                                                                          This is a fantastic course. It covers a lot of ground.

                                                                                                                                                                                                                                                                                                                                                          If you want to actively invest, this will help you learn the mechanics. But in the end, what you really learn, is that you can't beat the market.

                                                                                                                                                                                                                                                                                                                                                          https://ocw.mit.edu/courses/15-401-finance-theory-i-fall-200...

                                                                                                                                                                                                                                                                                                                                                          • r0b05 21 hours ago

                                                                                                                                                                                                                                                                                                                                                            Excellent resource. The videos link to a YouTube channel with a treasure trove of content in multiple disciplines. Thanks for sharing!

                                                                                                                                                                                                                                                                                                                                                            • sitzkrieg 20 hours ago

                                                                                                                                                                                                                                                                                                                                                              buy vti and wait. thats it

                                                                                                                                                                                                                                                                                                                                                              • itake 19 hours ago

                                                                                                                                                                                                                                                                                                                                                                I think that works if you have less than $1m. But if you have more wealth and are older, you need to diversify a bit more.

                                                                                                                                                                                                                                                                                                                                                                • sitzkrieg 7 hours ago

                                                                                                                                                                                                                                                                                                                                                                  ok then buy a bond etf. its not difficult or complex. only if you talk to someone who makes money in mutual funds

                                                                                                                                                                                                                                                                                                                                                            • al_borland a day ago

                                                                                                                                                                                                                                                                                                                                                              My mistake was not starting early, because the numbers were small and it didn’t seem worth the time. The habit and systems are important to build, so that when the numbers do get bigger it goes to the right place.

                                                                                                                                                                                                                                                                                                                                                              • calvinmorrison a day ago

                                                                                                                                                                                                                                                                                                                                                                my mistake was to graduate in 2008 and then start a business right when covid hit.

                                                                                                                                                                                                                                                                                                                                                                • bongodongobob a day ago

                                                                                                                                                                                                                                                                                                                                                                  In other words, 2008 had no meaningful impact on you then.

                                                                                                                                                                                                                                                                                                                                                                  • bsimpson 21 hours ago

                                                                                                                                                                                                                                                                                                                                                                    I also graduated in 2008.

                                                                                                                                                                                                                                                                                                                                                                    Starting my adult life with the markets in freefall made it hard to get in the habit of investing. All through school, people told me "most people don't start investing until their 30s, and end up in a worse than they ought to because the time-value of money compounds a bunch if you add a few more years." I thought I knew better than to be one of those people.

                                                                                                                                                                                                                                                                                                                                                                    Instead, I ended up keeping a lot of savings in cash during years when the interest rates were approximately 0. I've tried to get better at putting money into the markets over the past few years, but my financials look very different than they might have.

                                                                                                                                                                                                                                                                                                                                                                    > In other words, 2008 had no meaningful impact on you then.

                                                                                                                                                                                                                                                                                                                                                                    People who graduated in the late 00s might not have accrued big financial losses, but it had a very meaningful impact on my comfort investing.

                                                                                                                                                                                                                                                                                                                                                                    • bongodongobob 21 hours ago

                                                                                                                                                                                                                                                                                                                                                                      I don't follow. The markets were low, great time to invest. Great time to buy a home. 2008 was bad for people who owned homes or were already investing.

                                                                                                                                                                                                                                                                                                                                                                      • widhhddok 20 hours ago

                                                                                                                                                                                                                                                                                                                                                                        You have to view it from a new investor's perspective. They have just started their career, earning (small amounts of) money for the first time, and investing would have them see a loss of 5-10% of their hard earned money, at least in the short term. They wouldn't know, or would have to believe that the loss will be outweighed by future returns at the time.

                                                                                                                                                                                                                                                                                                                                                                        It's tough to swallow.

                                                                                                                                                                                                                                                                                                                                                                        • gertlex 20 hours ago

                                                                                                                                                                                                                                                                                                                                                                          I seem to recall a bunch of folks lost jobs around that time. Hard to invest in that situation. Extra so as a new grad without a job.

                                                                                                                                                                                                                                                                                                                                                                          • Eduard 19 hours ago

                                                                                                                                                                                                                                                                                                                                                                            > The markets were low, great time to invest. Great time to buy a home.

                                                                                                                                                                                                                                                                                                                                                                            in the US maybe?

                                                                                                                                                                                                                                                                                                                                                                  • ropable 19 hours ago

                                                                                                                                                                                                                                                                                                                                                                    Compounding interest is a powerful force.

                                                                                                                                                                                                                                                                                                                                                                    • emmelaich a day ago

                                                                                                                                                                                                                                                                                                                                                                      Get a financial advisor that you trust.

                                                                                                                                                                                                                                                                                                                                                                      • culopatin 20 hours ago

                                                                                                                                                                                                                                                                                                                                                                        But to trust one you need to have the knowledge, might as well DIY at that point.

                                                                                                                                                                                                                                                                                                                                                                        • emmelaich 14 hours ago

                                                                                                                                                                                                                                                                                                                                                                          Use word of mouth. Or relative's recommendations. You're right that nothing is guaranteed.

                                                                                                                                                                                                                                                                                                                                                                    • jeremyscanvic 15 hours ago

                                                                                                                                                                                                                                                                                                                                                                      Writing code from bottom to top instead of from top to bottom. Usually the interesting stuff happens in the bottom part and the top part is merely prepping data and taking care of edge cases: it's way easier to write it once you know how you're gonna end up using it.

                                                                                                                                                                                                                                                                                                                                                                      • theshrike79 15 hours ago

                                                                                                                                                                                                                                                                                                                                                                        Rule #5 of Rob Pike's rules of programming[0][1]:

                                                                                                                                                                                                                                                                                                                                                                        "Data dominates. If you've chosen the right data structures and organized things well, the algorithms will almost always be self-evident. Data structures, not algorithms, are central to programming."

                                                                                                                                                                                                                                                                                                                                                                        [0] https://users.ece.utexas.edu/~adnan/pike.html

                                                                                                                                                                                                                                                                                                                                                                        [1] https://news.ycombinator.com/item?id=24135189 (HN Discussion from 8/2020)

                                                                                                                                                                                                                                                                                                                                                                        • Cthulhu_ 13 hours ago

                                                                                                                                                                                                                                                                                                                                                                          Counterpoint, if you're writing business logic - e.g. some math, a HTTP/JSON API, a database, etc - it may be better to start with your domain data and business logic. Write the most clear version of the business logic, then implement the details in their respective layers. That is, the layers may be replaced entirely over time, but your business logic shouldn't change if e.g. the data goes to GRPC instead of HTTP.

                                                                                                                                                                                                                                                                                                                                                                          • bluecalm 15 hours ago

                                                                                                                                                                                                                                                                                                                                                                            I was recently explaining to my non-programmer gf what programming is to me. I said that I first make some bricks and then when I have enough I try to assemble bigger bricks from small ones and then after a while build things from them.

                                                                                                                                                                                                                                                                                                                                                                            I agree 100%. Bottom up of the way to go if you're doing it without deadlines, requirements or investors with expectations looming over you.

                                                                                                                                                                                                                                                                                                                                                                            • pydry 14 hours ago

                                                                                                                                                                                                                                                                                                                                                                              Damn. I would have written the exact opposite.

                                                                                                                                                                                                                                                                                                                                                                              Moreover, it is counter intuitive, too. The instinct of most juniors is to build foundations first and it took me a long time to learn to do the opposite.

                                                                                                                                                                                                                                                                                                                                                                              Each layer serves as a customer for the layer above. If you havent figured out what the layer above needs precisely by building it you're probably going to provide the wrong thing to it in the layer underneath if you write it first.

                                                                                                                                                                                                                                                                                                                                                                              It's also more resilient to requirements mistakes and requirements changes - it's easier to change course on a feature after showing a UI to a stakeholder if you didnt build the lower layers.

                                                                                                                                                                                                                                                                                                                                                                              • jeremyscanvic 13 hours ago

                                                                                                                                                                                                                                                                                                                                                                                I think we have different things in mind here - I believe you're thinking of upper vs lower layers of code and I'm thinking of the code being literally at the top or bottom of a script or function. Thanks for sharing your thoughts anyway!

                                                                                                                                                                                                                                                                                                                                                                                • specialist 13 hours ago

                                                                                                                                                                                                                                                                                                                                                                                  Design top-down, implement bottom-up?

                                                                                                                                                                                                                                                                                                                                                                              • zappb a day ago

                                                                                                                                                                                                                                                                                                                                                                                Writing tests first is a good way to end up with testable code. If you skip that, retrofitting tests is incredibly difficult.

                                                                                                                                                                                                                                                                                                                                                                                • atomicnumber3 a day ago

                                                                                                                                                                                                                                                                                                                                                                                  While it can be a useful forcing function, I find it also just fits into a higher velocity workflow in general, one I would describe like so:

                                                                                                                                                                                                                                                                                                                                                                                  1. Make PRs small, but not as small as you can possibly make them.

                                                                                                                                                                                                                                                                                                                                                                                  2. Intend to write at least one nice-ish test suite that tests like 50-80% of the LOC in the PR. Don't try to unit test the entire thing, that's not a unit test. And if something is intrinsically hard to test - requires extensive mocking etc - let it go instead of writing a really brittle test.

                                                                                                                                                                                                                                                                                                                                                                                  3. Tests only do two things: help you make the code correct right now, or help the company keep the code right long term. If your test doesn't do either, don't write it.

                                                                                                                                                                                                                                                                                                                                                                                  4. Ok - now code. And just keep in mind you're the poor sod who's gonna have to test it, so try to factor most of the interesting stuff to not require extensive mocking or shit tons of state.

                                                                                                                                                                                                                                                                                                                                                                                  I've found this workflow works almost anywhere and on almost any project or code. It doesn't require any dogmatic beliefs in PR sizes or test coverages. And it helps prevent the evils that dogmatic beliefs often lead you into. It just asks you to keep your eyes open and don't paint yourself into a corner, short term or long term.

                                                                                                                                                                                                                                                                                                                                                                                  • AnimalMuppet a day ago

                                                                                                                                                                                                                                                                                                                                                                                    One more piece - if the test would be hard to write, use that to drive you to clean up the architecture of that piece of code.

                                                                                                                                                                                                                                                                                                                                                                                    • specialist 13 hours ago

                                                                                                                                                                                                                                                                                                                                                                                      I call this "outside-in programming". The synthesis of TDD and API design.

                                                                                                                                                                                                                                                                                                                                                                                  • HarHarVeryFunny 11 hours ago

                                                                                                                                                                                                                                                                                                                                                                                    I think it's easy enough to design code that is easy to test - simple single-purpose functions/methods that are self-contained and don't change any global state, etc, and obviously you need to document what the input/output guarantees are, and I would normally add assertions at time of coding to enforce those.

                                                                                                                                                                                                                                                                                                                                                                                    Where you are going to run into difficulty in testing is if your APIs are so complex that it's all but impossible to exercise all code paths by testing with different parameters, or if functions have global side effects (bad practice).

                                                                                                                                                                                                                                                                                                                                                                                    • socalgal2 17 hours ago

                                                                                                                                                                                                                                                                                                                                                                                      I'm not disagreeing with you but there's a large number of programmers who viscerally disagree with "test first".

                                                                                                                                                                                                                                                                                                                                                                                      https://www.youtube.com/watch?v=NyiMOmCqu00

                                                                                                                                                                                                                                                                                                                                                                                      • ryoshoe a day ago

                                                                                                                                                                                                                                                                                                                                                                                        Even if you aren't going to do the complete test code just writing down the expected checks for each test makes things so much easier

                                                                                                                                                                                                                                                                                                                                                                                        • deterministic 20 hours ago

                                                                                                                                                                                                                                                                                                                                                                                          And only write tests against the API you are responsible for.

                                                                                                                                                                                                                                                                                                                                                                                          Never let tests depend on implementation details.

                                                                                                                                                                                                                                                                                                                                                                                          • globular-toast 18 hours ago

                                                                                                                                                                                                                                                                                                                                                                                            I'll add that retrofitting good tests is almost impossible. Too many people write tests against working code that just tests what they know the code already does. At best these are regression tests. If you write tests first you are forced to think about what you want the behaviour of the software to be before you've gone deep into a solution and forgotten about the original problem.

                                                                                                                                                                                                                                                                                                                                                                                          • UmGuys 13 hours ago

                                                                                                                                                                                                                                                                                                                                                                                            The best programming advice I was ever given was given to me before I started while I was in college. It took me too long to appreciate how strong it made me. KEEP AN ENGINEERING JOURNAL. Keep it somewhere you have access to outside company property and update it daily with what you worked on learned. Bonus: take notes in every meeting. Also: how to make bad co-workers hate you.

                                                                                                                                                                                                                                                                                                                                                                                            • mercenario 7 hours ago

                                                                                                                                                                                                                                                                                                                                                                                              Could you expand on it? What are the benefits, what have you gained by doing this?

                                                                                                                                                                                                                                                                                                                                                                                              • UmGuys 2 hours ago

                                                                                                                                                                                                                                                                                                                                                                                                If you keep a journal of what you work on and learn each day it reinforces the concepts so you remember better. And you can use it for reference in the future. This is extra important for juniors starting out when everything is new. Taking good notes will accelerate your growth. It helps develop an understanding of the context you're working in faster.

                                                                                                                                                                                                                                                                                                                                                                                                Here's an example: the first time you learn a design pattern you can create a journal entry about that pattern with some psuedocode. Then next time you want to build something using that pattern, you can look at your journal. Even 10 years down the line and 3 companies later.

                                                                                                                                                                                                                                                                                                                                                                                                Does that help?

                                                                                                                                                                                                                                                                                                                                                                                            • MrDresden a day ago

                                                                                                                                                                                                                                                                                                                                                                                              Technical skills will only take you so far in most orgs. Learn to play the soft game.

                                                                                                                                                                                                                                                                                                                                                                                              • ipnon a day ago

                                                                                                                                                                                                                                                                                                                                                                                                When I stopped trying to be right and I started trying to be friends my career finally took off.

                                                                                                                                                                                                                                                                                                                                                                                              • bravesoul2 a day ago

                                                                                                                                                                                                                                                                                                                                                                                                Make use of L1 wetware cache by learning how to do common things and dont make AI do them.

                                                                                                                                                                                                                                                                                                                                                                                                • kevinqi 21 hours ago

                                                                                                                                                                                                                                                                                                                                                                                                  duplicate code is not that bad. reduce duplication over time as you find the common patterns/abstractions, instead of trying to build abstractions too early

                                                                                                                                                                                                                                                                                                                                                                                                  • ipnon 19 hours ago

                                                                                                                                                                                                                                                                                                                                                                                                    Duplicate or near-redundant functions are either no problem or even useful. But duplicate or near-redundant data structures are a plague on any codebase.

                                                                                                                                                                                                                                                                                                                                                                                                    The prophet Perlis declared: "It is better to have 100 functions operate on one data structure than 10 functions on 10 data structures."

                                                                                                                                                                                                                                                                                                                                                                                                    • roncesvalles 9 hours ago

                                                                                                                                                                                                                                                                                                                                                                                                      Most of the shitty code I've seen has been from poor attempts at reducing code duplication, usually resulting in some overfitted generalized solution or abstraction.

                                                                                                                                                                                                                                                                                                                                                                                                      Efforts to reduce duplication should be focused on chunking out reusable pure functions. Trying to dedupe the flow of logic is almost always a fool's errand.

                                                                                                                                                                                                                                                                                                                                                                                                      • socalgal2 17 hours ago

                                                                                                                                                                                                                                                                                                                                                                                                        Maybe obvious but also, don't deduplicate if it means adding options or making things too abstract. I don't know if I can think of a good example. Maybe you make a function that compares arrays of strings. Then you decide to add an option to make it case insensitive. Then someone comes along and decides they want to compare arrays of structs. So they had a comparison function option. Most times I've seen this pattern the code gets way harder to understand and more brittle. All the options etc cascade into spaghetti and changes start breaking things because so many paths expect some original behavior. Better to have just kept them separate, most of the time.

                                                                                                                                                                                                                                                                                                                                                                                                        • aitchnyu 18 hours ago

                                                                                                                                                                                                                                                                                                                                                                                                          Have you set up a copy paste detector that fails the build if you write too many duplicates?

                                                                                                                                                                                                                                                                                                                                                                                                          • gwlperl 21 hours ago

                                                                                                                                                                                                                                                                                                                                                                                                            Yes.

                                                                                                                                                                                                                                                                                                                                                                                                          • zwnow 15 hours ago

                                                                                                                                                                                                                                                                                                                                                                                                            That people in the industry barely code, its just stitching together 3rd party dependencies.

                                                                                                                                                                                                                                                                                                                                                                                                            • HarHarVeryFunny 11 hours ago

                                                                                                                                                                                                                                                                                                                                                                                                              There are some jobs like that, maybe especially in areas like web development, but obviously it depends on what you are building. If you are working in areas like embedded programming or robotics, for example, than obviously you are more likely to be mostly coding from scratch, even if there are libraries that you may be using.

                                                                                                                                                                                                                                                                                                                                                                                                              • zwnow 10 hours ago

                                                                                                                                                                                                                                                                                                                                                                                                                Yea makes sense, its also a total normal thing to use packages from people who are way more versed in a specific problem you are trying to solve. Just takes away the whole magic of building things for me.

                                                                                                                                                                                                                                                                                                                                                                                                            • rorylaitila 11 hours ago

                                                                                                                                                                                                                                                                                                                                                                                                              Don't think about the task at hand at all, like don't think about what you need to get done or how you're going to accomplish it, in advance. This creates anxiety. Just think about how good the end goal will feel to have done. Virtually eliminates procrastinating and analysis paralysis.

                                                                                                                                                                                                                                                                                                                                                                                                              • Minor49er 17 hours ago

                                                                                                                                                                                                                                                                                                                                                                                                                My most productive hours are towards the evening because the day is spent addressing points and problems that people have brought up since the previous day. Once others' activity has been addressed and everything has been caught up with, my mind is able to focus on technical details and achieve a state of flow

                                                                                                                                                                                                                                                                                                                                                                                                                • tibbar a day ago

                                                                                                                                                                                                                                                                                                                                                                                                                  You can memorize the correct opening moves in chess. For maybe my first year playing chess, I just YOLO'd the opening moves. My judgement there was probably not much worse than the rest of my play, but with other players playing engine moves in the opening, I was probably in a losing position early on in most of my games. I gained about, I think, 100 ELO after learning some 3 or 4 move opening combinations.

                                                                                                                                                                                                                                                                                                                                                                                                                  • Ericson2314 19 hours ago

                                                                                                                                                                                                                                                                                                                                                                                                                    We should all play Chess690 so we don't have to waste time learning openings, right?

                                                                                                                                                                                                                                                                                                                                                                                                                    • laserlight 17 hours ago

                                                                                                                                                                                                                                                                                                                                                                                                                      Chess960 is even better.

                                                                                                                                                                                                                                                                                                                                                                                                                      • Ericson2314 9 hours ago

                                                                                                                                                                                                                                                                                                                                                                                                                        ah oops I meant that, I didn't know there were two.

                                                                                                                                                                                                                                                                                                                                                                                                                        • laserlight 8 hours ago

                                                                                                                                                                                                                                                                                                                                                                                                                          I'm sorry that my deadpan delivery didn't work :) There aren't two, to clarify. There's only Chess960.

                                                                                                                                                                                                                                                                                                                                                                                                                          • Ericson2314 3 hours ago

                                                                                                                                                                                                                                                                                                                                                                                                                            Oh I googled too quickly and didn't realize it was auto-correcting me implicitly, and thought there was both!

                                                                                                                                                                                                                                                                                                                                                                                                                  • mrweasel 10 hours ago

                                                                                                                                                                                                                                                                                                                                                                                                                    Weird one for me, also not really a trick, I just never really thought about coding in that way. A former colleague showed of some code and it was completely reversed from how I'd write.

                                                                                                                                                                                                                                                                                                                                                                                                                    The code uses a library, which provides a number of classes. Rather than encapsulating those classes within his own code, he'd simple use them as base classes and overwrite and extend a needed. Again no tricks, but basic OOP, but I just never really considered doing it like that, but it saves a ton of code.

                                                                                                                                                                                                                                                                                                                                                                                                                    • postit 17 hours ago

                                                                                                                                                                                                                                                                                                                                                                                                                      It’s not about skill and knowledge, but networking and visibility

                                                                                                                                                                                                                                                                                                                                                                                                                      • thebeardisred a day ago

                                                                                                                                                                                                                                                                                                                                                                                                                        A shell script has to start with "#!" with no spaces before it. I spent about a week figuring that out 25+ years ago.

                                                                                                                                                                                                                                                                                                                                                                                                                        • procaryote 17 hours ago

                                                                                                                                                                                                                                                                                                                                                                                                                          Technically it doesn't... If you drop

                                                                                                                                                                                                                                                                                                                                                                                                                              echo "hello world"
                                                                                                                                                                                                                                                                                                                                                                                                                          
                                                                                                                                                                                                                                                                                                                                                                                                                          into a file and chmod +x it, it will run with /bin/sh

                                                                                                                                                                                                                                                                                                                                                                                                                          You technically only need the shebang to set a specific shell, or options.

                                                                                                                                                                                                                                                                                                                                                                                                                          ... This little quirk allows you to commit crimes like:

                                                                                                                                                                                                                                                                                                                                                                                                                              //usr/bin/cc -o ${o=$(mktemp)} "$0" && exec -a "$0" "$o" "$@"
                                                                                                                                                                                                                                                                                                                                                                                                                              #include <stdio.h>
                                                                                                                                                                                                                                                                                                                                                                                                                              int main(void){
                                                                                                                                                                                                                                                                                                                                                                                                                                  printf("hello world\n");
                                                                                                                                                                                                                                                                                                                                                                                                                                  return 0;
                                                                                                                                                                                                                                                                                                                                                                                                                              }
                                                                                                                                                                                                                                                                                                                                                                                                                          
                                                                                                                                                                                                                                                                                                                                                                                                                          which will autocompile and run on execution.

                                                                                                                                                                                                                                                                                                                                                                                                                          (don't)

                                                                                                                                                                                                                                                                                                                                                                                                                          • ramses0 21 hours ago

                                                                                                                                                                                                                                                                                                                                                                                                                            Similarly, it's `XXX=123`, and cannot be `XXX = 123` or `$XXX=123`.

                                                                                                                                                                                                                                                                                                                                                                                                                            Shellcheck (and Wooledge) are crucial!

                                                                                                                                                                                                                                                                                                                                                                                                                          • muzani 16 hours ago

                                                                                                                                                                                                                                                                                                                                                                                                                            Get a screenshot app. Shottr is awesome. CMD+SHIFT+CTRL+4 and I can take a picture. Paste UI on a GitHub PR. Paste Figma into a LLM. Paste bugs into Slack or a support tool. It does text recognition too, so whenever my wife sends me some kind of ID via a screenshot, I can just copy from that.

                                                                                                                                                                                                                                                                                                                                                                                                                            • chamoda 16 hours ago

                                                                                                                                                                                                                                                                                                                                                                                                                              For anyone interested, here’s how I achieve the same in i3wm: it works with the Print key and lets you select the area using only CLI tools.

                                                                                                                                                                                                                                                                                                                                                                                                                              bindsym --release Print exec "scrot -s '%Y:%m:%d:%H:%M:%S.png' -e 'xclip -selection clipboard -t image/png -i $f && mv $f ~/Pictures'"

                                                                                                                                                                                                                                                                                                                                                                                                                              • Bjartr 5 hours ago

                                                                                                                                                                                                                                                                                                                                                                                                                                On Windows WinKey+Shift+S opens a snapshot tool that lets you click+drag over part of your screen and puts it into your clipboard

                                                                                                                                                                                                                                                                                                                                                                                                                                • marliechiller 9 hours ago

                                                                                                                                                                                                                                                                                                                                                                                                                                  Is this advice also for mac users? If so, whats the benefit to using this over the built-in screenshot tool?

                                                                                                                                                                                                                                                                                                                                                                                                                                  • alper 16 hours ago

                                                                                                                                                                                                                                                                                                                                                                                                                                    Is it better than Cleanshot?

                                                                                                                                                                                                                                                                                                                                                                                                                                    • muzani 11 hours ago

                                                                                                                                                                                                                                                                                                                                                                                                                                      No idea. I got Shottr and it was just right. If Cleanshot doesn't have enough, then maybe give it a shot.

                                                                                                                                                                                                                                                                                                                                                                                                                                  • sriram_malhar 16 hours ago

                                                                                                                                                                                                                                                                                                                                                                                                                                    ================== No Frameworks

                                                                                                                                                                                                                                                                                                                                                                                                                                    Do not create a framework to encapsulate what you are doing. For example, given annotations in Spring one loses touch with the level of indirection, and by the time you figure out why performance sucks, you are too deep in the way that framework works.

                                                                                                                                                                                                                                                                                                                                                                                                                                    Instead, provide simple abstractions that do not dictate the control flow.

                                                                                                                                                                                                                                                                                                                                                                                                                                    =================

                                                                                                                                                                                                                                                                                                                                                                                                                                    Digital Dry Days

                                                                                                                                                                                                                                                                                                                                                                                                                                    I find that not looking at the screen (no mobile, no TV, no laptop) twice a week has helped me immensely. There is no automatic reliance on the internet or AI. Sometimes I have to prep in advance for a dry day, but there are plenty of books to read and lots of theory and rigor to be understood without distractions. More importantly, I find myself being actually more productive.

                                                                                                                                                                                                                                                                                                                                                                                                                                    I surf the web less, am distracted less and get a lot of non-work stuff done too.

                                                                                                                                                                                                                                                                                                                                                                                                                                    • rk65536 15 hours ago

                                                                                                                                                                                                                                                                                                                                                                                                                                      Dry days is a really interesting idea. I wonder if it’s doable to do this in a working day when you need to work at a screen, might be too tempting to procrastinate at work. But maybe 1 of the weekend days could already bring benefits like you describe.

                                                                                                                                                                                                                                                                                                                                                                                                                                      • sriram_malhar 14 hours ago

                                                                                                                                                                                                                                                                                                                                                                                                                                        It is esp. important on a working day. I thought I'd need to be responsive to emails and messages, but nothing that could not wait at least until evening. Every so often, I'd have to spend a half hour going through all messages to make sure nothing got dropped, but the rest of the day was dry.

                                                                                                                                                                                                                                                                                                                                                                                                                                    • closeparen 4 hours ago

                                                                                                                                                                                                                                                                                                                                                                                                                                      I used to puzzle over the limited information at my disposal and make trial-and-error code changes to solve a bug. Now I put all of my effort into getting the relevant information about what's actually happening in situ. It's dramatically more effective.

                                                                                                                                                                                                                                                                                                                                                                                                                                      • entrepy123 a day ago

                                                                                                                                                                                                                                                                                                                                                                                                                                        How do you maintain tests, in order for LLM edits to not keep breaking things?

                                                                                                                                                                                                                                                                                                                                                                                                                                          - As a formal test suite in the program's own language?
                                                                                                                                                                                                                                                                                                                                                                                                                                          - Or using a .md natural language "tests" collection that must pass, which an LLM can understand?
                                                                                                                                                                                                                                                                                                                                                                                                                                        
                                                                                                                                                                                                                                                                                                                                                                                                                                        
                                                                                                                                                                                                                                                                                                                                                                                                                                        To answer the OP, I learned use different models for reasoning vs. coding.
                                                                                                                                                                                                                                                                                                                                                                                                                                        • sgt101 14 hours ago

                                                                                                                                                                                                                                                                                                                                                                                                                                          Find out exactly what needs to be done.

                                                                                                                                                                                                                                                                                                                                                                                                                                          So often the assumed goals of for an activity are malformed or the result of misunderstandings. Spending time pinning down what has to be done, why, and what the value of it is enables many other questions to be asked such as "wouldn't it be better to do X instead." The answer to that can often be a simple "no, because Y" but sometimes knowing Y is extremely helpful, and sometimes the answer is "yes, you are right" which is much better.

                                                                                                                                                                                                                                                                                                                                                                                                                                          • commandersaki 20 hours ago

                                                                                                                                                                                                                                                                                                                                                                                                                                            It's easier to tell the truth then maintain a complex web of lies.

                                                                                                                                                                                                                                                                                                                                                                                                                                            • saaspirant 15 hours ago

                                                                                                                                                                                                                                                                                                                                                                                                                                              Also you don't have to remember your lies if you tell people the truth

                                                                                                                                                                                                                                                                                                                                                                                                                                            • bacon_fan123 18 hours ago

                                                                                                                                                                                                                                                                                                                                                                                                                                              You dont change through motivation, rather through your habits

                                                                                                                                                                                                                                                                                                                                                                                                                                              • treetalker 18 hours ago

                                                                                                                                                                                                                                                                                                                                                                                                                                                A related (restated?) point I like to keep in mind is: acting produces motivation, but you can't count on motivation to produce action.

                                                                                                                                                                                                                                                                                                                                                                                                                                                Taking even the smallest step (or working on something for even 30 seconds) often overcomes the inertia that keeps the task/project unfinished. A little nudge is all I need to start building the momentum that will carry through to completion.

                                                                                                                                                                                                                                                                                                                                                                                                                                                • socalgal2 17 hours ago

                                                                                                                                                                                                                                                                                                                                                                                                                                                  I'm not saying you're wrong but it seems so backward. I didn't love computing as a kid because I had a habit of computing already. I got that because I was motivated to play with the computers. The motivation came first, not the habit.

                                                                                                                                                                                                                                                                                                                                                                                                                                                  Same with learning a 2nd language. First I got motivated to learn it. I didn't get the habit first. In fact I can't name anything I got a habit for before being motivated.

                                                                                                                                                                                                                                                                                                                                                                                                                                                  Again, I'm not saying you're wrong. I've heard this advice many times. And maybe forming a new habit leads to motivation. It's just counter intuitive based on what think is most people's experiences.

                                                                                                                                                                                                                                                                                                                                                                                                                                                • padraigf 10 hours ago

                                                                                                                                                                                                                                                                                                                                                                                                                                                  Don't worry about impostor-syndrome (everyone has it).

                                                                                                                                                                                                                                                                                                                                                                                                                                                  It seemed like around the time I was graduating college, there was this kind of culture of hotshot programmers, which looking back was kind of toxic.

                                                                                                                                                                                                                                                                                                                                                                                                                                                  It was all this "he's good", "he's not good", and it kind made you afraid to admit you didn't know things (for me anyway).

                                                                                                                                                                                                                                                                                                                                                                                                                                                  And for a long time I went around with this imposter-syndrome, thinking I should know everything (and knowing that I didn't).

                                                                                                                                                                                                                                                                                                                                                                                                                                                  And now, with a bit more experience, I realise, not-knowing is the default. Things change so quickly, no-one can know everything. One person might be better in one area, a different person in another. There is no absolute ranking.

                                                                                                                                                                                                                                                                                                                                                                                                                                                  Better to admit this. We're all continual learners.

                                                                                                                                                                                                                                                                                                                                                                                                                                                  • cwmoore a day ago

                                                                                                                                                                                                                                                                                                                                                                                                                                                    Observe as much mastery as possible at what you would like to do.

                                                                                                                                                                                                                                                                                                                                                                                                                                                    • Terretta a day ago

                                                                                                                                                                                                                                                                                                                                                                                                                                                      Apprentice, journeyman, master: worked for millennia, will work for millennia more.

                                                                                                                                                                                                                                                                                                                                                                                                                                                      • dandano a day ago

                                                                                                                                                                                                                                                                                                                                                                                                                                                        But don’t fall into the trap of that’s all you do. This can lead to procrastination of the thing you’re trying to do.

                                                                                                                                                                                                                                                                                                                                                                                                                                                        • exodust 19 hours ago

                                                                                                                                                                                                                                                                                                                                                                                                                                                          True, but at least your procrastination activity is learning about the thing, as opposed to unrelated procrastination activities.

                                                                                                                                                                                                                                                                                                                                                                                                                                                          • cwmoore 10 hours ago

                                                                                                                                                                                                                                                                                                                                                                                                                                                            I wrote “observing mastery”…

                                                                                                                                                                                                                                                                                                                                                                                                                                                            Are you talking about watching YouTube?

                                                                                                                                                                                                                                                                                                                                                                                                                                                      • procaryote 16 hours ago

                                                                                                                                                                                                                                                                                                                                                                                                                                                        control-r

                                                                                                                                                                                                                                                                                                                                                                                                                                                        for reverse shell history search. Took me a couple of years of history|grep before I bothered to look it up

                                                                                                                                                                                                                                                                                                                                                                                                                                                        control-x *

                                                                                                                                                                                                                                                                                                                                                                                                                                                        to expand a glob pattern directly. So if you're writing "rm foo*" and you want to be sure what it will actually do, C-x * and you now have it explicit and editable

                                                                                                                                                                                                                                                                                                                                                                                                                                                        Works in bash at least

                                                                                                                                                                                                                                                                                                                                                                                                                                                      • hypertexthero 2 hours ago

                                                                                                                                                                                                                                                                                                                                                                                                                                                        When playing guitar, instead of gripping the neck tightly as if your hand was a vise, grip it lightly and pull the neck toward your body instead. Make sure the action of your guitar is not too high; if it is, get it adjusted.

                                                                                                                                                                                                                                                                                                                                                                                                                                                        Listening is more important than talking, but don’t automatically believe what you hear. Find out for yourself.

                                                                                                                                                                                                                                                                                                                                                                                                                                                        Observing animals and plants can teach one about humans and living in harmony with nature’s cycles.

                                                                                                                                                                                                                                                                                                                                                                                                                                                        Some people are not capable of feeling empathy. Learn to recognize them.

                                                                                                                                                                                                                                                                                                                                                                                                                                                        Your initial intuition is often wrong about numbers and statistics and many things, even if you are an expert. Double check. Triple check. Discuss with others you trust.

                                                                                                                                                                                                                                                                                                                                                                                                                                                        A little at a time goes a long way (understanding compound interest).

                                                                                                                                                                                                                                                                                                                                                                                                                                                        Certainty leads to insanity (regarding the “trade” of life).

                                                                                                                                                                                                                                                                                                                                                                                                                                                        References:

                                                                                                                                                                                                                                                                                                                                                                                                                                                        - The Creative Act by Rick Rubin

                                                                                                                                                                                                                                                                                                                                                                                                                                                        - The Listening Book: Discovering Your Own Music by W. A. Mathieu

                                                                                                                                                                                                                                                                                                                                                                                                                                                        - Braiding Sweetgrass by Robin Wall Kimmerer

                                                                                                                                                                                                                                                                                                                                                                                                                                                        - The First and Last Freedom by Jiddu Krishnamurti

                                                                                                                                                                                                                                                                                                                                                                                                                                                        - The Psychopath Code by Peter Hintjens

                                                                                                                                                                                                                                                                                                                                                                                                                                                        - Thinking, Fast and Slow by Daniel Kahneman

                                                                                                                                                                                                                                                                                                                                                                                                                                                        - Fingers Pointing to the Moon by Jane English

                                                                                                                                                                                                                                                                                                                                                                                                                                                        • vouaobrasil a day ago

                                                                                                                                                                                                                                                                                                                                                                                                                                                          I only learned this in the last five years: do less, automate less, do more by hand, and use the limited capability of the manual method to really choose projects that are worthwile, rather than aim for maximum efficiency.

                                                                                                                                                                                                                                                                                                                                                                                                                                                          • juliansimioni a day ago

                                                                                                                                                                                                                                                                                                                                                                                                                                                            Similar to this: if you want to optimize your productivity*, do so on a timescale of at least weeks if not months or years.

                                                                                                                                                                                                                                                                                                                                                                                                                                                            Simple example: Can you get more done working 12 hours a day than 8? Sure, for the first day. Second day maybe. But after weeks, you're worse off in one way or another.

                                                                                                                                                                                                                                                                                                                                                                                                                                                            It's easy to chase imaginary gains like automating repetitive tasks that don't actually materialize, but some basics like sleep, nutrition, happiness, etc are 100% going to affect you going forward.

                                                                                                                                                                                                                                                                                                                                                                                                                                                            * I actually hate that word, and prefer saying "effectiveness". Productivity implies the only objective is more, more, more, endlessly. Effectiveness opens up the possibility that you achieve better results with less.

                                                                                                                                                                                                                                                                                                                                                                                                                                                            • theshrike79 14 hours ago

                                                                                                                                                                                                                                                                                                                                                                                                                                                              In Finland we have flex hours or "working hours bank", basically you can do extra work now and get free time later. You can also go into negatives.

                                                                                                                                                                                                                                                                                                                                                                                                                                                              Usually the recommended range is -20 to +40

                                                                                                                                                                                                                                                                                                                                                                                                                                                              Some People(tm) go into the negatives and think it's easy to "just" do an extra few hours every day. It's not.

                                                                                                                                                                                                                                                                                                                                                                                                                                                              What I do is work ~15 minutes more every day so I bank about a hour a week, sometimes a bit more. It's a LOT easier and more manageable. Just sit on my computer 15 minutes earlier or if I'm at the office I take the later train back home.

                                                                                                                                                                                                                                                                                                                                                                                                                                                              This way I tend to have a day or two of flex hours banked if I need to take some quick time off.

                                                                                                                                                                                                                                                                                                                                                                                                                                                              • CrimsonCape 6 hours ago

                                                                                                                                                                                                                                                                                                                                                                                                                                                                Finland is a "high trust" country, isn't it? I can't see this concept working working when > 10% of the population would game the system to get more "off-the-record" free time.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                • theshrike79 3 hours ago

                                                                                                                                                                                                                                                                                                                                                                                                                                                                  The flex hours are usually only for office workers where performance can be measured - sometimes it replaces overtime.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                  So the employer can "suggest" you work longer hours now when there's a ton of stuff to do (like end of year rush in accounting or payroll) and then you take days off when it slows down.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                  But yea, it's not something that's easy to police.

                                                                                                                                                                                                                                                                                                                                                                                                                                                              • noreplydev 16 hours ago

                                                                                                                                                                                                                                                                                                                                                                                                                                                                it's not a 100 meters race, it's more like a marathon

                                                                                                                                                                                                                                                                                                                                                                                                                                                            • pyzhianov 16 hours ago

                                                                                                                                                                                                                                                                                                                                                                                                                                                              Finding the right balance between "zero dependencies, building everything from scratch", and relying too heavily on third-party code. Both extremes are full of misery and frustration, and it's so hard sometimes to get it right. But most of the time these days I find it easier to start with fewer dependencies and probe for balance from there

                                                                                                                                                                                                                                                                                                                                                                                                                                                              • 01HNNWZ0MV43FF a day ago

                                                                                                                                                                                                                                                                                                                                                                                                                                                                Always fix errors in reverse order, from the bottom of the file to the top. That way the line numbers don't change as you go.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                • procaryote 16 hours ago

                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Oh I learnt the opposite lesson, as later errors might be spurious and just exist because of earlier errors, especially in single pass compiled things like C

                                                                                                                                                                                                                                                                                                                                                                                                                                                                  But I also do M-x compile, and emacs is clever enough to still find the right line when doing next-error, even if I edit things before.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • godshatter 10 hours ago

                                                                                                                                                                                                                                                                                                                                                                                                                                                                    "Just fix the first error in the list" greatly reduced my anxiety about pages of errors being kicked out when compiling a C program.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • undebuggable 17 hours ago

                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Import transaction history into spreadsheet reversing the rows if necessary to start with 1st Jan at the top. This way you can make calculations mid year or mid month then complete them after receiving full statement only by appending rows, hitherto row numbers remain unchanged.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • ChrisRR 13 hours ago

                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Learn to debug efficiently. Don't just keep testing every little possibility just in case it's the one thing that's wrong, but try to test things which narrow the scope of your search instead

                                                                                                                                                                                                                                                                                                                                                                                                                                                                    It applies to both software and electronics

                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • pbamotra 10 hours ago

                                                                                                                                                                                                                                                                                                                                                                                                                                                                      First, Lean into pain

                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Ofcourse not every time is the right time to lean into it but every once in a while do “that” thing. Many people don’t realise their potential or just get too complacent. If there’s not one thing that put your mind into what-ifs spiral, you’re not pushing yourself hard enough.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Second, if you must distill life into absolute minimum - focus on relationships, health, and career. Don’t make excuses to yourself or others in either of these.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • blueflow 13 hours ago

                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Reading documentation. Knowledge transfer, both receiving and sending, is the most essential skill in engineering. Without it, institutional knowledge will be lost over time and end up inaccessible to mankind.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                        • hintklb 21 hours ago

                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Realizing that buying a house is absolutely not a good investment and that the whole society is on a narrative to convince more and more people to blindly buy (realtors, lenders, other homeowners, the governments, parents,...)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Doing the real math is the trick of the trade. The math for owning has been made so that it looks like a good deal while in reality it is not at all. Most people will literally compare mortgage to their rent, or "I sold my house I bought for 500k for 1M$, therefore I made 500k$".

                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Treat owning as a luxury item. The same way you would own a sport car or travel on a private jet. Do the (real) math and realize Owning is costing you money.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Also don't let yourself get emotional about buying a house. Society has made it look as if buying a house was a proof of success. A lot of research shows that once people buy they lose flexibility, feel more stuck, cannot access higher paying job in a different places etc. Renting has a ton of advantages.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                          This calculator get most things right. As an exercise, you can try to retroactively put the numbers for the house you bought and the rent equivalent. The results might surprise you: www.nytimes.com/interactive/2024/upshot/buy-rent-calculator.html

                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • vayup 21 hours ago

                                                                                                                                                                                                                                                                                                                                                                                                                                                                            As I grew older (and hopefully wiser), I have internalized investment returns is a lot more than sanitized numbers. I did the numbers and as a result did not buy much real estate when I was yonger. It was pretty clear, if I put the same cash outflow into stocks, I would come out ahead... Way ahead!

                                                                                                                                                                                                                                                                                                                                                                                                                                                                            The things is, I didn't put the same cash outflow in stocks. For various reasons. But mainly, it was just not psychologically palatable to max out my investments on equity by streching my finances. With hindsight, given the buffer in most real estate investments (left with tangible assets, banks shouldering some of the risk etc.) it would have been a lot more psychologically palatable to investment my max in real estate.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                            My point is not that real estate is "best". But merely, there is a lot more to returns than cold numbers. If you think you already understand it, and are under 30, you are likely underestimating the significance of that. I know I did.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • hintklb 21 hours ago

                                                                                                                                                                                                                                                                                                                                                                                                                                                                              This is the argument that buying a house serves as a subpar, forced investment for most people.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                              But I don't know if I agree with you, I understood in my twenties that housing was generally a bad investment. We are now 10 years later and I invested everything in the stock market instead and came way ... way ahead than if I bough one or more houses.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                              I personally find it way way more scary to buy an average 2M$ house that could crash and lose half of its value overnight than the whole American economy that is relatively diversified. What happens if there is a fire in your neighborhood? Or if your city is the next Detroit? We have been made to believe a house is a safe investment. I personally think it's the scariest least diversified investment you could ever make.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • itake 19 hours ago

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                The other factors beyond cost to consider are:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                1/ with renting, you might outlive your landlord (forcing you and your kids to move / switch schools).

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                2/ control over the health of your home (installing water filters, air quality sensors, fixing mold immediately instead of waiting for a landlord).

                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • bfg_9k 21 hours ago

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                You know I hear this all the time but it never quite makes sense to me. REA is inherently a better asset class than the vast majority of assets, simply because you can leverage up without a risk of being stopped out.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Doing the numbers on (most) developed economies, buying freehold housing is typically a worse investment than stocks before leverage, but after, RE almost always comes ahead. Nobody is going to let you mortgage a basket of stocks, but almost any bank will let you do that with a house.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                That said - I hate this idea because I think this kind of thinking is what has lead to many of societies problems in the developed world at the moment. But, from a rational point of view the numbers make sense.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • hintklb 20 hours ago

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  It's worse than that. Buying a house without leverage is a terrible investment.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  The leverage is absolutely required because all the fees that come with real estate (Realtors, Interest, HOA, Taxes, Insurances, Closing costs, Downpayment opportunity cost,...). The leverage makes it an OK investment, but still historically not on the level of a diversified basket of stocks.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  The leverage also works in both ways and essentially makes your house an even more risky asset. It supposes that it only ever goes up which has not always been the case historically.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • esseph 20 hours ago

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    VA loans with no down payment and 3.5-4.5% rates did a lot of good work for quite awhile.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    But, with the desires of builders to maximize profits, I don't see supply of homes (especially smaller ones of 1-3 bedrooms) easing anytime soon.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • alexey-salmin 18 hours ago

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                I find this logic shortsighted and I don't think the right chapter of math is being applied. You need the probability theory not calculus.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Yes, renting is often better than owning on average. However, as any good poker player knows, having a positive strategy on average is nothing unless you control the standard deviation. You need to have reserves deep enough and to be able to play long enough for your average to consistently manifest itself.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                In lifetime investment choices the human lifespan is the major limitation. You won't be able to live long enough to absorb multiple economical collapses and surges — which indeed had always been profitable in the end, just not necessarily for you. You draw your card and you play your hand. In such circumstances a strategy with less gains but also less variability is usually preferable.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                A good analogy is insurance: having insurance is always worse on average than not having one, otherwise insurance companies won't exist. Buying insurance for something small, some loss you can absorb yourself, like your phone or bicycle, is in most cases a bad idea. However, buying insurance for your house or your health is usually a good deal. You pay money to tap into reserves that are bigger than yours, you get slightly negative mean expectation with near-zero variance. Even the insurance companies themselves do it when they judge their reserves are not deep enough for a given contract — and resell parts of it to other companies to spread the load.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • hintklb 18 hours ago

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  I understand probability theories but I don't see how this applies here. I don't see either how the insurance concept applies for housing? There is a healthy rental market that will always exist, Are you arguing that you might get priced out and therefore you should buy (even if overpriced) to avoid that potential issue?

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Both housing and stocks will go down during an economical collapse. They are both correlated. You can actually make a point that housing being a highly leveraged asset is way worse during a downturn than being long on stocks.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • alexey-salmin 17 hours ago

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Stocks, deposits and currencies can all crash to zero while your primary residence never goes below the value of housing your spouse and kids (which is pretty damn high as far as I'm concerned). Some rental market will exist almost always but that's not necessarily true for your job and your savings.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    My parents lived through times like this and so will my descendants eventually. The probability of this happening to my generation is low but non-negligeable so I find it necessary to hedge against.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • hintklb 15 hours ago

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      your house is never truly yours. What happens if you stop paying taxes and HOA for example? You can never fully hedge against everything, live with it.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      There are no certainty in life and thinking that a house is yours forever is an illusion.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • alexey-salmin 13 hours ago

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Nothing is certain of course, but I estimate the probability of someone taking your house to be significantly lower than the probability of someone taking your savings and stocks. Therefore I prefer to have at least one permanent residence at all times.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        I base my estimation of probabilities on the crises I either saw myself or know well from the past. To add to the picture, the majority of stocks I've bought prior to 2022 are frozen with a chance of me never seeing them again. I'm rather glad that at the time I've had enough alternative assets to be able to relocate my family to another country and provide consistent quality of life throughout the whole process.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        So yes, I can't fully hedge against everything but I see no reason not to hedge against the things I can.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • solatic 17 hours ago

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  By and large, I agree with you. Especially if you are single, owning real estate represents a massive commitment, both financial and to the local place, that nobody forced you to take. People need to remember that the default for real estate is to fall into disrepair and turn back into the dust of the earth; as someone who owns real estate, you are responsible for fighting that entropy, as is everyone else in your neighborhood, as living in the only well-maintained house on a block full of abandoned blight isn't going to rescue your property value.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  With that said, sometimes you want to make that commitment, because it's a socially good choice, rather than a financially good choice. Children need stability. Moving houses, neighborhoods, schools is not good for them. Good parents make sacrifices for their children, including staying in jobs where they might make a little less compared to Yet Another Move.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  For most families who want to provide stability for their children, the choice is between purchasing a house, or a long-term rental of an apartment owned by a public housing authority that is bound by law or regulation to keep rent increases down and renters in-place, so long as they continue to pay their rent. In the US, most people do not have access to the latter, or the latter are only found in bad neighborhoods where the public housing authority was underfunded and mismanaged. That leaves purchasing real estate as the only option.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • lelanthran 12 hours ago

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    > People need to remember that the default for real estate is to fall into disrepair and turn back into the dust of the earth; as someone who owns real estate, you are responsible for fighting that entropy,

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    And that costs money. However, it still costs money as a renter, because whatever the house costs to keep, the landlord is going to pass that cost on to the renter.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    There is no landlord renting at a loss.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • solatic 7 hours ago

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      > There is no landlord renting at a loss.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Actually not true. Landlords are just as susceptible to speculation as everyone else and just as capable of not doing the math as everyone else. There are plenty of landlords who are taking a loss on the monthly rent compared to their mortgage bill because they can't find anyone to rent at a price where they would break even on the mortgage, and refuse to sell because they're speculating that housing prices will rise faster than their losses, and/or that the losses are simply part of the cost of building equity.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • hintklb 7 hours ago

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Exactly. Real estate is highly emotional and irrational.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        I personally know a ton of people that are keeping a house and renting it out at a loss (because of the market rate), because they cannot seem to emotionally agree to sell that house. This happens way more with real estate than with anything else. Half of the time they don't even realize they are losing money, the other half of the time they don't want to know they are losing money.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • hintklb 8 hours ago

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        You need to review your assumptions.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        > There is no landlord renting at a loss.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        there absolutely is. Again, most people don't do the math. It's no different for their rental property. They think it is "worth it".

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        > the landlord is going to pass that cost on to the renter.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Nope, there are a lot of studies on this. Rental prices are defined by offer and demand, not by costs for the landlord.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • pepinator 20 hours ago

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      This is obviously not true. You don't have to do the math to realize: when you pay rent, every moth, an important part of your salary simply disappears, leaving nothing for the future. When you pay a mortgage, your paying the house you'll own. Of course, there are interests and fees and whatnot, but you'd need to pay huge amounts so that it becomes unviable; I can't imagine a single scenario where that occurs.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • Swizec 19 hours ago

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        > This is obviously not true. You don't have to do the math to realize [rent is throwing money away]

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        This greatly depends on your specific numbers.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        We did the math with my partner: our current rent is 5k/mo. Our mortgage for the same place bought when we moved in would be 9k/mo + transaction cost + maintenance. It will take our rent almost 10 years to catch up to the cost of a mortgage. Max increases are capped in California.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Over those 10 years, investing the delta in index funds puts us about 200k ahead of buying in terms of net worth. We’re also not handcuffed by a mortgage for 30 years which gives us optionality.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Not buying has let us build about 700k net worth debt free in the last 10 years we’ve been together. We’ve also moved 3 times with essentially zero transaction cost. I think that’s fine

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        • hintklb 19 hours ago

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          you definitely came ahead by not buying and you did the math. Good for you!

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Generally, this holds true today for most HCOL and MCOL areas. It is still a good idea to buy in a few LCOL areas.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          What I have seen is that in high-earner areas (Bay area for example) buying completely outpaces renting in cost (buy to rent ratio_. Mainly because the pool of buyers outbid each other. This is mainly due to the narrative and social pressure to buy at all cost. Similarly, renting stays relatively low as people do not compete as much.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • Swizec 19 hours ago

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            > Generally, this holds true today for most HCOL and MCOL areas. It is still a good idea to buy in a few LCOL areas

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            We have friends who rent to live in SF and buy in LCOL as investment properties. Also seems to work well as a strategy.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            I think of primary residence as a consumption expense. It's not really an investment because you can't cash out[1]. So unless you put value on the act of owning itself, it's best to do whatever gives you a lower monthly. In our case that's renting.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            [1] yes I know about HELOCs. I'd rather get margin loans on index funds than risk getting kicked out of my home.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • hintklb 19 hours ago

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              I fully agree with you. I also think that there are as many good intangible argument for owning as for renting.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Renting allows you to be flexible for new opportunities. They allow you to focus on other things in life than your house, treat your landlord as a service provider, free your time to do more important things.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Frankly it is sad that as a society we value homeownership so highly and judge people that decide to rent so harshly.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • globular-toast 18 hours ago

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            With those kind of numbers it doesn't really matter what you do, you'll still come out ahead.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            1. Be rich,

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            2. Don't be poor.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • Swizec 11 hours ago

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Yes that’s a pretty good strategy achievable by most people who hang out on Hacker News. Lots of variance tho. Poorly timed life events can really mess it up

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • lesuorac 20 hours ago

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            In the majority of markets an individual that invested the down payment into the SPY500 as opposed to a house comes out a head. Especially if you sell the house on average every 7 years ...

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Just do the math yourself; it's pretty easy [1] [2] [3] [4].

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            That said, not every decision in life needs to be profit maximization. You can enjoy owning a house.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            [1]: https://research-tools.pwlcapital.com/research/rent-vs-buy

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            [2]: https://www.nerdwallet.com/calculator/rent-vs-buy-calculator

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            [3]: https://www.zillow.com/rent-vs-buy-calculator

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            [4]: https://www.calculator.net/rent-vs-buy-calculator.html

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • ternaryoperator 19 hours ago

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              This doesn't take into account that you need to live somewhere.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              If you spend $2K on rent (which gets no return) and put $1K into the SPY500 every month or put all $3K into your house, you will be far, far ahead with real estate.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • hintklb 18 hours ago

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                I don't know why you think this is not taken into account by those calculator. They obviously include the cost of rent for a similar place...

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • bluecalm 13 hours ago

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              You seem to be completely clueless about the issue. There are many resources to learn about it. One very good one is Ben Felix on YouTube. Search for his owning vs renting videos and spend some time trying to understand the analysis. It will be a bit difficult when you come from "rent is money disappearing" mindset but it will be worth it.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • hintklb 20 hours ago

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                if you buy a house today, you are literally paying a "huge amounts so that it becomes unviable". Check the concept of opportunity cost.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • esseph 20 hours ago

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  The problem is you still have to live somewhere, and buying is a real asset.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  I would like to take the Opportunity to not pay a fucking landlord, thanks.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • hintklb 20 hours ago

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    you obviously include the price of the rent-equivalent of the place you would buy in the math. Cannot even believe I have to say this.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • esseph 19 hours ago

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Recently I looked at what it would cost me to move.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      First, I would be giving up several acres of land, and my dog and cats would be very unhappy.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Second, for me to get a house with the same bedrooms, housing cost would almost DOUBLE, and on average it looks like I'd lose around 800sqft.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      I've been here for more than a decade. Moving would cost us a TON of money for no gain. (If we went to buy another home)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      And that calculator also agreed (on rent not being viable, either!)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • LeonM 15 hours ago

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        > I've been here for more than a decade.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        I think that is where the difference is.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        The buy-vs-rent discussion is more aimed at first-time buyers. If you already own a property that is largely paid off and has had the benefit of appreciation over the time you owned it, then yes, it may be more beneficial to keep the property, as you have seen from the calculator.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        If the answer was always that rent would be cheaper, then the calculators wouldn't have to exist ;-)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        > housing cost would almost DOUBLE

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Except that you will now have the profits from selling your previous property, which you can invest. That investment payout can partially or even completely offset the cost of renting, which means your monthly costs will be much lower.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Say you make 500k by selling your house, and invest that against 6% ROI, then you make 30k/year passive income, thats 2.5k/month. So deduct that from the rent you'd pay and compare again.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        • esseph 9 hours ago

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Except in a LCOL/MCOL you won't make $500k, in fact that may even be double the price of the home!

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • nothrabannosir 21 hours ago

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                *> Most people will literally compare mortgage to their rent, or "I sold my house I bought for 500k for 1M$, therefore I made 500k$".

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                I’ll bite: what’s the problem? If anything mortgage is even more favorable than rent because part of it goes to paying off the principal. Which is still your money, just in a different asset. But I guess you include this and still reach the opposite result?

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Are you talking about taxes or maintenance or something ? Which country / locality? What time span? How many places are there where you would’ve been better off renting than buying in recent memory… not where I’ve lived but you never know!

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • hintklb 21 hours ago

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Because the mortgage and the rent are completely different numbers.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  The rent is the maximum you will ever pay for that period. The mortgage is the minimum you will pay and doesn't include the downpayment, repairs, HOA, Insurance and tax increases. It also doesn't include the closing costs, realtor costs, all the fees.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  This is why the math is so complex. People easily forget all those fees and costs to make the math look simple.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  This also takes into account that you invest into the US market and equity with all the cash that you would have had to spend on your house.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  I'm talking about the US, but this holds true in multiple countries.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  To answer your last question: In almost all HCOL (SF, Seattle, ...) you would have been way better renting than buying, except if you time it perfectly. If you look at today's market you would almost definitely be better renting than buying (But nobody knows the future...)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • bigstrat2003 20 hours ago

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    This is just plain wrong. Let's break it down:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    * Insurance and tax increases: real and you have to deal with them, but they don't go up as fast as rent does. Advantage: owning

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    * HOA fees: don't buy an HOA home, problem solved. You should do that anyway just because HOAs suck ass.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    * Down payment: not a real cost, that money is yours in the form of equity

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    * Closing costs and other fees: real but completely negligible when amortized over the life of the home.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    * Repairs: real, and they suck. This is the only place renting can stack up superior, but you can do a lot to mitigate this by doing your due diligence up front and not buying a dud house. Overall, unless you get unlucky you should come out ahead, but you can lose the die roll.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    * Realtor costs: greatly depends. When we bought our house we paid zero, because the seller pays the buyer's costs. This can be a serious cost if you're changing houses a lot, but... just don't do that (for multiple reasons).

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Overall, after buying my house 7 years ago I'm coming out ahead month over month (thanks to rent going up like clockwork every year, while my mortgage has stayed the same). By the time I die, I will be significantly ahead, and that's not even taking into account unrealized gains in the value of the property. Which I don't count for much, because my home is a place to live and not an investment vehicle. But maybe someday it'll do me good, or my heirs.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Owning a home really is a great deal for the vast majority of people in the US. It's not some society wide conspiracy, it's not an ad to get others into the market so you can benefit, it's the truth.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • hintklb 20 hours ago

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      This is wrong in so many ways. Just using the buy or rent calculator demonstrate this. You are essentially repeating realtor talking points ("Renting is throwing money out of the window"). You need to use real numbers and compare them to the rent equivalent.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      * Down payment: not a real cost, that money is yours in the form of equity

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      The opportunity cost of the downpayment is the issue. The equity you gain from downpayment is nowhere close to the opportunity cost of investing it in the stock market.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Owning MIGHT have been an OK investment for most Americans 20 years ago. that is absolutely not the case today anymore.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Ah yes, so you timed buying your house perfectly due to the one time increase during covid ("7 years ago"), and you think this generalizes to anyone buying today.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      This is the same story as me anecdotally saying that I bought Nvidia 6 years ago therefore Stocks are always absolutely better.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      So let me ask you? Based on your logic there is no price at which buying makes no more sense? What is the cutoff for you? What if you could rent a 4M$ house for 4k$/Month? Is it still a great deal? What if that house only goes up 2% a year?

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Those are the only things that matter. The hard numbers! And right now they do absolutely not make sense.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • Group_B 20 hours ago

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Rent numbers aren’t making sense either though. I mean have fun renting if that’s what you prefer!

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        • hintklb 19 hours ago

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Oh I don't like renting, but so far it has saved me so...so much money that I will be able to buy as a luxury down the line something WAY better than if I bought directly.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          The difference is that I will treat it as a luxury. Not as an investment. The same exact thought process as if I bought a sport car.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • aakast 19 hours ago

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Did you account for leverage? I agree with you all the way, however, the top reason it can actually be beneficial to most people is the fact, that they can leverage their money.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Putting it a bit simple, it would mean, that for most people, ncr_(real estate)^t > c*r_investing^t

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  It all depends where in the world you are, but most places have easier access to loans for real estate than investment, and everything else being equal, the risk is also higher. There might be this line of thought in wake of the financial crisis, that real estate carries close to or as much as the same risk. It doesn't. It's just not zero, and that is the lesson learned.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • cloudbonsai 18 hours ago

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    The best argument I've heard (and I'm somewhat sympathic to) is to compare home equity with real estate investment vehicles.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    1) REIT is a diversified bet on a group of high-grade properties that has positive cash flow, levered with a commercial loan borrowed at 3-4%. It's as liquid as stocks, and managed by someone other than you.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    2) Home equity is an undiversified bet on a single residential property that has no cash flow, levered with a retail loan borrowed at 5-6%. It's fundamentally illiquid, and managed by you.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Here is a question: People normally consider it's dangerous to lever your REIT position. Doesn't it suggest that home ownership is actually risker than commonly perceived?

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • bluecalm 13 hours ago

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Leverage costs money and introduces risk.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      >>but most places have easier access to loans for real estate than investment

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Are there places where it's easier to get a mortgage than a margin account? Margin is also cheaper than a mortgage.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • hintklb 19 hours ago

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        All the calculators include leverage, yes.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        In fact leverage is absolutely required for real estate to even be considered an investment, and not even a good one. The fees, interest, etc are eating all the gains from the leverage.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        A leverage also goes both ways. Making the housing investment so much more risky if not well timed.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Houses in Denver for example went down close to 10%. Now imagine you leveraged this...

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        • aakast 13 hours ago

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Completely agree. I have always myself been a proponent of renting and investing in any other assets.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          I'm a dane, and we have a very unique mortage system, so I might not have as much feeling in that regard with the rest of the world.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          In this case, I just felt leveraging was left out of the equation in the discussions, so it was hard to follow.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • nothercastle 21 hours ago

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        There are a couple good resources on this. The nyt rent vs own calculator is good but also there is a great podcast episode (tailored for Canada but mostly the same in the us) https://rationalreminder.ca/podcast/323

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        • hintklb 21 hours ago

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          You are exactly right and I will add this to my post.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          This calculator get most things right. As an exercise, you can try to retroactively put the numbers for the house you bought and the rent equivalent. The results might surprise you: www.nytimes.com/interactive/2024/upshot/buy-rent-calculator.html

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        • NalNezumi 19 hours ago

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Another positive is that you're morally clean.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          "A place to live is an financial investment" is a perverse idea to begin with. You won't be a passive participant of one ill in the society. HN is quick to debate often about how housing is one core issue in many socially bad phenomenas but look at that, when you question the fundamental premise causing that everyone comes out trying to dismiss that. It's easy to lament "societal" issue when it's some other group (society) but it's all justifications that comes out when money is involved and it's pointed out that it's the individual actions that causes it (yours).

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Which is kinda why we are at the point we are. "everyone needs a house right?!?" and someone realized (artificial) scarcity is a way to milk money out of that. Everyone bought it. Now every middle class person and their bank are in the game. "housing always increase in price" is a goal that is turned to a belief/principle. It was made a social issue by all the people who bought in to it

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Go to a place where housing is not considered a financial investment but a consumable,(such as Tokyo) and you'll realize the mode is not as bad or an unalienable truth as many think. It's rather a symptom of a inefficient use of wealth, as a society.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • cco 19 hours ago

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            I just penciled out several home buying scenarios in HCOL, according to the calculators you posted, it only very recently became a questionable purchase if you don't plan on staying 7+ years in a home.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            At any other point in the last 20, maybe 30-40 years if you re-finance well, it was always better to buy if you intended on living in an area for any reasonable amount of time.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • pmg101 18 hours ago

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Let's simplify by assuming you can choose between two scenarios:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              1. The bank lends you £1m to buy a house, you pay them 5% interest for this service = £50,000 pa.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              2. You rent a £1m house from a landlord and pay £50,000 pa for this service.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Financially these are identical. And in either case if you stop paying you will lose your home - because it's not really yours, it belongs to the bank/landlord.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              However surely 1. is always preferable?

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              * You can make any change you like to your living environment up to and including moving walls around

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              * Assuming you do continue to pay you have the absolute right to live there and will not be forced to leave

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              * Rents can rise out of your control, even to the point you can no longer afford it. Mortgage rates can change over time too but you get to choose your level of risk appetite explicitly by fixing for the period you prefer.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • munksbeer 8 hours ago

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Those are not comparable scenarios. You are omitting a lot of detail, which most people do, but the detail is important.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                You need to give the bank $200k to get the $800k mortgage. Now you have $200k equity in the house, but you could have had that $200k equity in the stock market (compounding over the years).

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Most of the replies here are for the US context. They use 6% interest rates over 30 year term. So their monthly repayments would be $4,797. And they're saying that renting the equivalent house would be about $2,500. I have no idea if this is realistic or not, but I'm just showing you what you're omitting from your calculations. We must also keep in mind, rent will increase over time, while your mortgage won't.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                So now in the renting scenario, you have an initial $200k in the stock market growing at the nominal compound rate of say 8% each year. Then you're also investing the different between mortgage and rent (4,797 - 2,500 = 2,297) into the market each month, and that is also going to compound. Then you add in all the extra costs of home ownership over 30 years, then you calculate the value of your house that you now own outright at 30 years and compare it to the pot of money you put into the stock market while renting over those 30 years.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                If your pot of money at the end of renting is enough to buy the house outright at that point, with some left over, then renting wins. Otherwise buying wins. (speaking purely financially)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                I haven't done the calculations, but now you can see why your simple scenario is not sufficient.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • sladoledar 18 hours ago

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  These are not financially identical at all, at least where I live. If heating breaks down, it is landlord's financial burden. Sooner or later you'll have to replace the roof. You don't have this type of financial burdens if you rent.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • pmg101 17 hours ago

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Yes it'd be interesting to see all those kinds of decadal costs factored in.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    My head is still very much turned however by the fact that rents rise with or above inflation every year, meanwhile I'm still paying off my mortgage in 2012 pounds. But I'm quite willing to believe I'm behaving irrationally.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • buttercraft 9 hours ago

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Those costs are factored into the rent.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • hext 7 hours ago

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Exactly their point. That $50k of rent includes the cost of repairs & upgrades. The $50k you pay the bank does not.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • hintklb 18 hours ago

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      except that those are not the numbers we have today (in the US, I don't know in the UK).

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Rather, for a $1M house:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      1. The bank lends me $800k to buy a house with a 6.5% interest. you need to put 200k$ as a downpayment.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      2. The rent equivalent is 28000$ a year.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      The math is way more complex than this, but what really matter at this point is the gap between renting and buying a place.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • ropable 19 hours ago

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      I'd phrase this quite differently: realise that buying a house might not be the optimal investment strategy, depending on life circumstances, goals and economic conditions. Boiling it down to "not a good investment" is overly reductive IMO.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • esseph 20 hours ago

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        "Buying saves you $176,000 over ten years."

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Also the chart tells me that if your rent costs more than $1,000 a month, to buy.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        It also says if you stay longer than 5 years, to buy.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        I fucking signed up for this. Fuck. Now I get to go cancel...

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        • hintklb 20 hours ago

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Let me guess. You put 8$% of YoY house appreciation? 3% of YoY stock appreciation? 10% of yearly rent increase?

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • esseph 19 hours ago

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            No it just didn't cost my much to buy my home, I got a good rate that's locked in, and I have a family. Moving is not really something in the calculus. Rent is crazy, housing prices are crazy.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • tayo42 18 hours ago

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              > 10% of yearly rent increase

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Why call that out, that was my last 3 rent increases

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • lelanthran 17 hours ago

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            > This calculator get most things right.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            It's paywalled. I also doubt it gets most things right. I've been pointed to so many and I have not yet found that that takes into account all the variables (and there's so few, so if they're leaving it out I'm suspicious!)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            > A lot of research shows that once people buy they lose flexibility,

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            They lose that once their kids are in school.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            > feel more stuck,

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            They're stuck anyway, once the kids are in school.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            > cannot access higher paying job in a different places etc.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            They cannot do that anyway, once the kids are in school.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            All of those disadvantages you list are not even noticed by people with kids in school, hence they don't count as disadvantages.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            The only advantage you realistically realise from renting vs owning is the ability to move within a month's notice. If you have kids in school or a spouse who is working in-person, not remote, you won't be moving on a month's notice anyway.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            IOW, why optimise for the use-case "Hey, we can move on a months notice!" when that use-case won't come up anyway?

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            It's like a vegetarian optimising their life around access to meat-only burger joints. Or someone living 2000km from the nearest sea optimising their life for surfing.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            No one optimises their life for use-cases that won't come up.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • hintklb 15 hours ago

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              I have kids in school and none of your example holds.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • lelanthran 14 hours ago

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                > I have kids in school and none of your example holds.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Okay. Different question then, how many times have you yanked all your kids out of their peer groups, permanently?

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • alirezaxdehghan 14 hours ago

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  So you're implying that you can move to another city in a month? How's that possible? I need at least a 6 months window to move!

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • nikkwong 21 hours ago

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                This is of course true if your house is not income producing. If you rent out rooms of your house, the calculus changes considerably.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                …and now having viewed their calculator, I find it disingenuous that they haven’t added this as an additional configurable step, given how many bells and whistles their tool has. The takeaway from the tool is that you should never buy in HCOL areas, but renting out rooms in your unit is potentially a way to make it work out financially.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • hintklb 21 hours ago

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  I don't know if I agree. On average renting a room out of your place is the same as buying a place as a rental investment with the difference you can claim you live there (which gives you some small tax advantage).

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  In general, real estate rental investment are terrible subpar investment. How would this be different?

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • nikkwong 5 hours ago

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    I don't know, I hear this advice all the time and I think people are just not looking hard enough. I invested in Seattle between 2017-2022 and have several properties here that are cash flowing.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    For example, for an $800k house you would have to generally put down 160k. If you picked the right property, with enough rooms, you can cash flow around $1-2k on this which will net you around 10-20k a year, and that's not counting the tax advantage of depreciating the house which is substantial.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    When you throw in the fact that the asset could/should appreciate, the fact that you can borrow against it, leverage aggressively to buy more—don't know, my reasoning could be wrong, but it doesn't seem to always be an inferior investment vehicle.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • specialist 13 hours ago

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Yes and: Remodeling. So many regrets.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • motorest 19 hours ago

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    > Doing the real math is the trick of the trade. The math for owning has been made so that it looks like a good deal while in reality it is not at all. Most people will literally compare mortgage to their rent, or "I sold my house I bought for 500k for 1M$, therefore I made 500k$".

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Can you try to offer some explanation for your reasoning?

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    I mean, for blue collar or even white collar workers, lower monthly payments for a mortgage does increase disposable income. When you eventually pay off your mortgage your expenses drop to zero.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    > This calculator get most things right.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    I think you need to educate yourself. There are rent vs buy calculators that allow you to do parametric tests and eventually arrive at the rather obvious conclusion that renting is marginally advantageous only in short time windows (up to around <5years) whereas buying is advantageous beyond that point.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • hintklb 18 hours ago

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      I spend more time than 99.999% of people on this subject and I'm quite educated in economics.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      I'm not arguing that buying a house is never right. I'm arguing that on average, especially in today's environment it is extremely difficult to make the number work in favor of owning as an investment. As a lifestyle luxury for the intangibles? Sure. But as an investment, this doesn't really make sense anymore.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      >> Can you try to offer some explanation for your reasoning?

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Those two numbers simply do not represent the same thing. A mortgage is an absolute minimum that dismisses the opportunity cost on the downpayment, doesn't include all the fees and definitely doesn't account for the increase in taxes, HOA and insurances.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      >> When you eventually pay off your mortgage your expenses drop to zero. Who pays for Taxes, Insurance, HOA, Repairs? Who pays the 6% realtor fees the day you sell?

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Based on those questions, I would invite you to similarly get educated.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • archagon 19 hours ago

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      While financially this is true, it does not account for aggressive landlords deciding to spike rent and/or deciding to sell and evicting. Housing stability can be worth a lot. (Of course, strong tenant protections help mitigate this issue.)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • vishnugupta a day ago

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Making sense of probability and statistics and incorporating them in day to day life.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • quantdev1 21 hours ago

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Do you have any examples of ways you incorporate them into your day-to-day?

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • sagarpatil 21 hours ago

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Claude Code recently showcased how powerful it can be when you don’t have to memorize commands. My AI agent works similarly. It finds the right CLI commands instead of relying on Playwright or an MCP server to perform tasks. What’s interesting is that even the agent doesn’t know many commands upfront; it simply uses the help option to discover what’s available.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        • WalterBright a day ago

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          That macros ruin everything they touch. I used them extensively for maybe 15 years, stopped adding them, and then a bit later removed them all from my code. My C/C++ code was a lot nicer without them.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • jwrallie 16 hours ago

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Everything powerful is also potentially destructive. Macros have their places, but most of the time they are not the right solution. I too have removed most of my macros, and have a few that are worth to keep. Usually time saved with macro cleverness is paid off with time debugging with cryptic compiler behavior.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            When there is no other way, wrapping multi-line macros in a do while and #define constants in parenthesis can definitely help.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • peterfirefly a day ago

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              My early C code would have been awfully slow without them. We needed enums and good inlining before we could ditch (most) macros. When did Zorland/Zortech C become good enough?

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              There are still a few special cases where macros are useful, such as the multiple #include trick where a macro #defined before the #include determines what the macro invocations in the include file does -- really helpful for building certain kinds of tables.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • WalterBright a day ago

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Zortech had an inliner even before it was Zortech.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                The #include trick is called the "X Macro". I used it extensively, and eventually just removed it.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • peterfirefly a day ago

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Was it reliable enough?

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  (I have never played with it -- I saw the ads in Byte but I never met anybody who had tried it. It seemed so ridiculously cheap that I felt it had to be a scam ;) )

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • WalterBright a day ago

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    It was frequently better and faster than the others. Mine was the first (for the PC) to add data flow analysis.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • block_dagger 14 hours ago

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              It was written on the wall at a submarine sandwich shop: “it’s nice to be important but it’s more important to be nice.”

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              This trick of the trade called life will serve you and your associates well.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • Pinegulf 14 hours ago

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                More of a work-culture thing, but really useful:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                First you fix the problem then you look for the culprit and administer punishment if it's needed at that point.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • chilmers 12 hours ago

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Almost any task on a software project that you need to is worth doing as a script, if at all practical. Unless you are really, _really_ certain that it will be 100% a one-off, then writing and committing a script to do it will almost always save you and the rest of your team pain in future.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • tptacek a day ago

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Always have a stack of deli cups handy.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • elevaet 16 hours ago

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Name things well when writing computer programs.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • aitchnyu 17 hours ago

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        I took too long to accept rebasing and squash merging ie faking/rewriting history. In 2012, I was a fan of Git and Lucene (underlying DB of Elasticsearch and its predecessor Apache Solr) storing immutable data stuctures to disk and Scala which does gymnastics to avoid mutable data structures so I kept that dogma.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        • FinnLobsien 15 hours ago

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Most goal-setting and "systems" will not help you reach that specific goal, but are a forcing function to introduce momentum and get you moving in a direction where you often discover the real reward that activity brings.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • deezmofonutz 9 hours ago

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Putting the kabosh on GenZ’s ridiculous individual & management contributions.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • TMWNN a day ago

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              When I realized that a) `screen` exists and b) what it does, I felt like an utter fool for having gone for years—YEARS—without benefiting from it.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • lpa22 a day ago

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Can you please elaborate here?

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • cturner a day ago

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  It is a terminal multiplexer. You will be able to find youtube videos. The gp is talking about a tool called gnu screen. If you need a more distinct token to search on try “tmux”.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • sureglymop a day ago

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Pretty sure they mean GNU screen, a terminal multiplexer. Similar in functionality to tmux or zellj (a newer alternative) if you have heard of those.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • cjfd 15 hours ago

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                There are many more things that are interesting to do than there is time to do them. Pick one or a few and drop the rest.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • _kb 14 hours ago

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Counterpoint: there are many things that are interesting to do. Explore and learn from them.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • aghilmort a day ago

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  read something new every day before going to bed

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  journal before you start your day

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  buy some sort of electric kettle

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • davewasthere 18 hours ago

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    The fact that there's an entire country mostly unaware of the utility and ubiquitousness of a simple electric kettle, blows my mind. But then again, I'm a product of the Empire (British) not a North-American.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    But while the idea of using a stove top kettle (have done so in the past) is fine, the thought of using a microwave to heat up a cup of water for tea seems abhorent. (although it's really not)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    I guess it came about because 110V not being as efficient? Or more American's are coffee drinkers?

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • aghilmort 9 hours ago

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      intern suggested years ago and now electric kettle pretty much first thing buy anytime stay somewhere longer than a couple of weeks if doesn’t already have

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • sakesun 19 hours ago

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      I won't be able to have enough sleep then.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • sklargh 13 hours ago

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      A few big corporate things. These do not apply to small firms. They may apply to certain middle market shops. Nothing revelatory, just hoping to help a “me” at 21.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      1. For large corporations the most appropriate governance analytical model is usually a feudal state and you can think of business units like manors.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      2. Over the long run, proximity to revenue is usually a good proxy for survival.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      3. Most people just want to do their job, feel good about themselves, and go home.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      4. All things being equal, if people like you, you are far more likely to advance than if they do not like you.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • austin-cheney a day ago

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Measure everything. There are two benefits to this.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        1. Discarding the bullshit. A consistent practice of weighting assumptions and conclusions on evidence/numbers helps identify biases and motives from other people.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        2. Measures allow for value identification and performance. Most people just guess at this. Guessing is wrong more than 80% of the time and often wrong by multiple orders of magnitude.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Most people don’t think like this and find this line of thinking completely foreign, so I often just keep my conclusions to myself. To see a movie about this watch Money Ball.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        • quantdev1 a day ago

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          This is interesting. I’ve often thought about building a dashboard for my personal life, comparable to the dashboards I build for growth teams.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          And then iterating on it over time, and I find what’s valuable and what’s not.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        • mixmastamyk a day ago

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Environment variables can be expanded at the command line, just like files. Believe I started before it was a thing and never thought to check until twenty years later(?), when I hit the tab key by mistake. :-D

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • socalgal2 17 hours ago

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Since some of these responses are "life lessons" then mine would be, whatever you wanted to do, do it NOW! If you think, I'm going to take this job and then someday I'm going to do X, there's a high chance you'll never do X, whatever X is. You'll get into a groove and look up and see 10-15-20 year of your life disappeared. Your lifestyle changed. It's more expensive or you have kids or something that will prevent you from doing X. You might also have changed as a person and just not want to do X anymore even though you still feel X was your dream.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            The point is, don't delude yourself into thinking you'll someday do X if you wait.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • barrell 20 hours ago

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              “Everything around you that you call life was made up by people that were no smarter than you” Steve Jobs

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Id heard this a hundred times, but around 30 years old it clicked and has fundamentally changed how I view things.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • pmg101 19 hours ago

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                I like the quote up until the word "people" because it is quite an epiphany to realise that anything that was made can be remade.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                I don't buy the "no smarter than you" part though.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • kaffekaka 19 hours ago

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  To me the point of "no smarter than you" is that you should not baseline assume they were smarter than you because that leads to apathy.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Whether some people really were "smarter" than you (whatever that means) is not relevant to the point of the Jobs quote, I think.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • pmg101 18 hours ago

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Yes, I am apathetical because it seems self evident to me that the reason Jobs invented the smart phone and I never could is because he's smarter than me. I guess I call that humility.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Perhaps the point of the quote is to encourage people to falsely over-estimate their own smartness in order to maximise the likelihood they'll try to make a difference - because a tiny percentage actually will.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • vannucci 15 hours ago

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  My personal version of this was realizing that the bar for being a functional, relatively successful adult is FAR lower than I realized as a kid. Many adults can't get things which I find fairly rudimentary right and it explains a lot.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • tjmc a day ago

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Easy transfers between different people's iThings with Airdrop. I got my CompSci degree over 30 years ago and yet my 74yo aunt taught me this - the shame!

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • hirvi74 a day ago

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    One other benefit, if it happens to matter to you, is that Airdropped files like photos or videos retain their original quality as opposed to taking a slight hit to quality when being transferred via text or email.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • sureglymop a day ago

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Also good to know is that if you crop a picture in your iOS photos app and then airdrop it to someone, they can undo the crop in their photos app. It is a non-obviously non-destructive operation.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • AnonC 18 hours ago

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Make sure you select the “All Photos Data” in the Options, right at the top showing the selection in the share sheet. This has to be, somewhat annoyingly, done each time one Airdrops photos/videos.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        • esperent 17 hours ago

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          That's why I always zip anything important before sending.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • nicman23 12 hours ago

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        just start with something. you are always gonna have to do it twice and you are not going to know every edge case or usage pattern off the start.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        • KingOfCoders 19 hours ago

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Delegation.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • 65 a day ago

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            If you're selling something physical, always have free shipping. Include the price of shipping in the price of the product.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            I guess people now expect free shipping via Amazon and boy does this make things sell faster.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • brcmthrowaway a day ago

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              tmux

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • penguin_booze 18 hours ago

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                man tmux

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • deadbabe 13 hours ago

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Computer Programming is just turning data from one form into another. If you focus on the data structures you need everything else becomes fairly trivial.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • ropable 19 hours ago

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  That pretty much all modalities of resistance training work, no individual training session matters all that much, and what's really important is just doing it consistently for years.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • 762236 11 hours ago

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    How to exit Emacs

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • fedeb95 12 hours ago

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      don't always feel forced to express your opinion.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • Gud 8 hours ago

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Take a nap

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        • BilalBudhani 16 hours ago

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          learning the crux of

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          > Hard conversations, easy life. Easy conversations, hard life

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • jcgrillo 21 hours ago

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Learn how to stab your colleagues in the back and play petty mean spirited office politics games. That's most of what being employed in this industry actually is, and if you accept that now and optimize yourself around it you can save decades wasted trying to actually get good at doing tangible (albeit economically useless) things.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • Minor49er 17 hours ago

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              You must be my former colleague whose behavior convinced me to quit my job

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • deterministic 20 hours ago

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                That is not my experience at all (30+ years here working in different countries).

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                I have only experienced this kind of environment once. And the fix was to quit and join a functional company instead.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • wanda 11 hours ago

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Saying no.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • prashantgupta24 20 hours ago

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Persistence > skill.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • scarface_74 a day ago

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Learning that it is more important to know how to communicate, how to promote myself and the art of persuasion to get ahead than any technical skills I could know.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • lagniappe a day ago

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      CIDR

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • moralestapia a day ago

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Ship, even if it's crap.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        • penguin_booze 17 hours ago

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          To a friend but not to prod.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        • deterministic 20 hours ago

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          1. Write exhaustive automatic tests against the API you are responsible for.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          2. Don't write tests for anything else.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          If you are responsible for implementing a server/service, the API is the protocol for the server/service. If you are responsible for implementing a module/library, the API is the public interface to your module/library.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          The tests are basically a specification for how any implementation of the API needs to behave. So you can give the tests to another developer, who has never seen your implementation, and they should be able to re-implement everything based on your tests.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • ChaosMuppet 14 hours ago

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            I wholeheartedly agree! And would add:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            3. Make sure your API test suite runs fast, runs locally and is easy to use. Effort put into the test suite and tooling pays dividends for a long time.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • tootie 21 hours ago

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            You should never look at code and say "this should work". If it "should" work it would work. If it doesn't work, you definitely made a mistake. Poke every assumption one by one. Preferably with an interactive debugger.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            This may seem obvious but when I was younger I used to spin out in frustration at bugs.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • swader999 a day ago

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Scala

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • jshprentz a day ago

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Drum cards

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • jimsojim 21 hours ago

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Excellence in anything is a byproduct of having fun. Fun is a byproduct of understanding. Understanding is a byproduct of going slow. Going slow is a byproduct of curiosity. Curiosity is a byproduct of saying "I don’t know," of shunning beliefs and attending to what is in front, with zero baggage or impositions of your own—shunning the ego in the moment, moment by moment. Excellence comes when each piece is as equal as any other, when preference is shunned, when space is created to allow what is in the moment, without resistance, without insistence.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • fsckboy 6 hours ago

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  >Excellence in anything is a byproduct of having fun

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  absolutely not. fun is a byproduct of excellence.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  do people like playing the piano well? yes.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  do beginners like taking piano lessons and practicing in between? no.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  prodigies can enjoy lessons, that's why we have a word for them, they already excel due to some unusual internal wiring

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • smokel 19 hours ago

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    I don't think understanding leads to fun in most people. It probably is the case for most people here on Hacker News, but I doubt it's universal.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • Bluestein 19 hours ago

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      It is probably not universal. Whole point, I guess, is it should be (much as excellence itself, by the way...)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • 1718627440 19 hours ago

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        I think it does when the understanding follows couriosity.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • duckkg5 21 hours ago

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        This is relatable. Once one gets over the frustration of failing and making mistakes (thousands of times in some cases), it becomes fun and easier to stay curious.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        • ramraj07 19 hours ago

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          I've seen a lot of people play cricket and soccer all their lives, they had a metric ton of fun, and im sure I will not put them close to the word excellent in any aspect of their lives. Im not sure any of the statements you made are agreeable in fact.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • kaffekaka 19 hours ago

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            I don't think GP is saying that if something is fun you will become excellent at it. Rather, of you want to excel in anything it is a huge advantage if you enjoy doing it, so try to keep it fun.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        • kylebenzle a day ago

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Grow plant on plastic!

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          I fought it for years but now ALL my crops are under black plastic every year and it's made all the difference.