In my case, only recently I learned the value of getting an LLM to write and refine a plan.md architecture doc first, and for it to break that doc down into testable phases, and then to implement phase by phase.
Seems obvious in hindsight. But it took too long to learn that that should be my approach. I had been going phase by phase myself- no overarching plan.md for the LLM.
What Trick of the Trade took you too long to learn?
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.
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).
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/
Do optimize for the long term, but also realize you could be dead by next morning.
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.
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.
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.
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.)
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.
Today is a new day.
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.
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.
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.
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.
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.
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.
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.
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.
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.
I guess I've learned something.
Thanks :)
You become successful by making priorities. All parts of your product do not need to be perfect.
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 --> …
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...)
Welp, looks like the addons and special clients are useful after all x)
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...
To put it another way, comparing to 2hrs
Everyone has their own thresholds but paying double for 5-10% more doesn't seem worth it to me personally.My own science-based impression was that it's more important to break up sedentary time with activity, and reach higher than mild physical exertion at least a bit, than it is to target any specific amount of time.
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.
With the amendment it stands corrected indeed. Just added to make sure some people wouldnt take the idea of comparing themselves to peers as a generally good one.
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.
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.
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
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.
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.
On the other hand, if you find yourself running 1hour+ numpy simulations for days on end you might want to consider an analytical approach.
also in general bayesian statistics
random medium article: https://medium.com/pythoneers/monte-carlo-simulation-ideas-a...
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
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.
and academic/library search is indeed so underrated!
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.
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.
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.
Corollary: R&D must have the right of veto on any promise to any customer.
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.
All of the above is only true if the quoted part is taken seriously and actually acted on.
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.
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.
- 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
Don't catch errors unless doing something actually useful with them. Even then, it's often a good idea to re-raise.
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?
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.
There is no rule of thumb because the scenarios are too varied and context matters.
- 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.
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.
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.
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.
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.
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.
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.
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.
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.
This goes beyond programming as well, I think it goes for most things in life.
If you want to complete intermittent fasting or control your diet more easily, use water. When hunger strikes, drink water first. It helps reduce cravings, keeps you full, and resets your focus. Since water doesn’t convert to calories and just passes through your system, it won’t break your fast. Most hunger is manageable if you stay hydrated — water becomes a tool, not just a drink.
It's ridiculously effective, and fun! I never quite grasped what it meant until I experienced it. It's basically just business friends. You help each other informally, without contracts or invoices. You think of them and they think of you, and generally you both come out ahead. It's barter with intangible goods.
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.
When you test part of the circuit with the scope, you are using prior knowledge to determine which tool to use and where to test. You don’t just take measurements blindly. You could test a totally different part of the system because there might be some crazy coupling but you don’t. In this system it seems like taking the measurement is really cheap and a quick analysis about what to measure is likely to give relevant results.
In a different system it could be that measurements are expensive and it’s easy to measure something irrelevant. So there it’s worth doing more analysis before measurements.
I think both cases fight what I’ve heard called intellectual laziness. It’s sometimes hard to make yourself be intellectually honest and do the proper unbiased analysis and measuring for RCA. It’s also really easy to sit around and conjecture compared to taking the time to measure. It’s really easy for your brain to say “oh it’s always caused by this thing cuz it’s junk” and move on because you want to be done with it. Is this really the cause? Could there be nothing else causing it? Would you investigate this more if other people’s lives depended on this?
I learned about this model of viewing RCA from people who work on safety critical systems. It takes a lot of energy and time to be thorough and your brain will use shortcuts and confirmation bias. I ask myself if I’m being lazy because I want a certain answer. Can I be more thorough? Is there a measurement I know will be annoying so I’m avoiding it?
If you can grab an oscilloscope and gather meaningful data in 15 minutes, why would you spend several hours hypothesizing and modeling?
If you can't, then spending several hours or days modeling and hypothesizing is better than just guessing.
So I think that data beats informed opinions, but informed opinions beat pure guesses.
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.
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.
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.
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.
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
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.
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.
Speculation is fine, but you need to ground it in reality.
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.
But build them something and suddenly they know exactly what they want and what you built isnt it.
You can’t avoid building what they don’t want, so might as well do so as fast and cheap as you can.
uhh wait a min that was an utter rubish version. 'no no no its great'. now you are kind of stuck with it.
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.
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.
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.
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.
I've also tried git-absorb before. It was buggy at least back then. Uninstalled when it crashed and lost my changes, and even reflog didn't help.
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.
Its a rejection of gear lust and similar (“I can’t possibly achieve that result without [toy that I want]”)
"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.
"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.
When you feel like everything is falling apart — like rejection, failure, or hopelessness is too much — pause and imagine you're about to die in this very moment. Everything fades. Suddenly, all the pressure, shame, and fear lose their grip. What really matters becomes clear. You’re still here. You still have a chance to move forward, even if it’s just one step.
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.
for selecting the second column, PID, from `ps aux`,
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... ). on the other hand doesn't work here due to `ps aux` adding a variable number of spaces for formatting. seems to work though.E.g. for the `ps aux` example, using PowerShell, selecting a certain column:
The output of gps is an array of objects. Selecting a property does this for all elements in the array.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.
echo '999 888' | awk '{print $2}'
prints 888
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:
To this, easily: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.
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.
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.
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.
- 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).
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...).
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.
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.
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.
Buying early in life is in my view almost always wrong.
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.
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.
There are two factors really:
- Rent to Buy ratio (or as you put it, rent compared to the mortgage)
- Speculation on house price growth.
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
It may be the best return. You never know the future, what direction asset prices are going.
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.
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!
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.
Someone unfamiliar with the 'landlord special' I see!
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.
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.
>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.
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.
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.
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.
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
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.
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.
https://www.youtube.com/watch?v=i1_YhlXiuxEYou 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)
and treat mv/cp/rsync like rm
> 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).
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.
[0] https://www.calculator.net/inflation-calculator.html?cstarti...
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.
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.
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.
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
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.
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
- 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.
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%...
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.
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.
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.
Breaking everything into some numerical value misses the whole point of life. But hey, who cares if you're rich when you're old?
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.
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
That calculator should include an interest rate change in the future.
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.
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.
This is incorrect - landlords of course can usually deduct mortgage interest from their taxable income.
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.
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.
You have $196000 of buffer on all these (downpayment, taxes, hoa, repairs, insurance, realtors, closing fees??). This number doesn't even include the earnings if you sold the house, in your hypothetical example of the price doubling in 15 years, you actually have $696000 to play with here.
Though it's funny you mention taxes since deducting mortgage interest is one of the biggest tax benefits most people have access to.
Look I don't know why your so anti-house, but you really might want to run the numbers again. You provided two numbers, I did further math on them, and your reply was simply 'the math is incredibly more complex'. This is hardly a fruitful argument from my end.
>Functionally you live in the same place, and the system managed to extract more money from you.
I'm honestly sorry you feel this way. You are only hurting yourself.
https://www.nytimes.com/interactive/2024/upshot/buy-rent-cal...
We don't need to agree. You seem happy to think you came ahead financially, good for you.
Educate yourself and search online or on this thread.
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.
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.
* 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.
One should do proper accounting as things change wildly from one place to another.
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...
Also, which bonds? What about international exposure?
What about tax loss harvesting?
what about mid-term savings (like buying a house)?
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.
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.
I wouldn’t consider those options needing much motivation or research. The key with all of them is investing early and leaving it alone.
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.
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.
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
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!)
https://news.ycombinator.com/item?id=44793595
That's what I understood too. That claim that you can completely skip taxes looks wrong.
You can pay cash for a qualified medical expense in 2025 and take out that amount of money from the HSA decades later.
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?
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.
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.
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.
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.
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.
Cigna refused to lift a finger unless i sued them both.
yeah, i wouldn't recommend that.
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.
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
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
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.
Also, on step 4, you may need to do a backdoor Roth IRA if you’re over the Roth IRA income limits.
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.
These are obviously champagne problems but if you’re a high earning W2 it’s worth considering.
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
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).
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.
https://markets.businessinsider.com/news/etf/bitcoin-etf-van...
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.
- 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.
This doesn’t make sense.
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.
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.
It's tough to swallow.
in the US maybe?
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?
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.
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).
https://www.youtube.com/watch?v=NyiMOmCqu00
Never let tests depend on implementation details.
"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)
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.
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.
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.
The prophet Perlis declared: "It is better to have 100 functions operate on one data structure than 10 functions on 10 data structures."
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.
Only recently did I decide to learn the good and bad moves for my favourite openings. It can be much more fun that it sounds. Instead of only memorising, you can play with a chess engine and see, and hopefully internalise, why a move is bad or another move is better, e.g. stopping that pawn moving forwards any more is more important than getting a knight out.
And you can start with just a few openings - your favourite opening for white, and for black, just your favourite defence to each of the common openings.
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'"
You technically only need the shebang to set a specific shell, or options.
... This little quirk allows you to commit crimes like:
which will autocompile and run on execution.(don't)
Shellcheck (and Wooledge) are crucial!
Are you talking about watching YouTube?
But unless mastery of video production is the goal you are seeking, watching pre-recorded video is not the experience I recommended.
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.
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.
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.
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.
This trick of the trade called life will serve you and your associates well.
E.g., For understanding compensation for different job families I used to just look at the market salary range. Now I dig into the distribution. I am now more confident when I make an offer at a given percentile.
On a similar topic, someone says that a farmer here (in India) is making multiple of a typical SWE salary. I go back to distribution.
Or take quality of specialized food in cities (e.g., Biryani in Hyderabad, Dosa in Bangalore). When someone says Biryani in Hyderabad is great I now realise what it means. That the quality distribution of Hyderabad Biryani is to the right of Biryani in Bangalore i.e., the top 10% of Bangalore Biryani overlaps with bottom 10% of Hyderabad Biryani. It also means that I can walk into a random restaurant in Hyderabad and be confident that Biryani there will taste mind-blowingly better than Bangalore.
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
There are other commands to grab other arguments [0].
[0] https://stackoverflow.com/questions/4009412/how-to-use-argum...
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.
When there is no other way, wrapping multi-line macros in a do while and #define constants in parenthesis can definitely help.
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.
The #include trick is called the "X Macro". I used it extensively, and eventually just removed it.
(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 ;) )
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.
It applies to both software and electronics
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
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.
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.
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).
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.
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.
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.
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.
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.
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.
There are no certainty in life and thinking that a house is yours forever is an illusion.
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.
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.
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.
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.
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.
> 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.
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
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.
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.
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.
1. Be rich,
2. Don't be poor.
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
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.
I would like to take the Opportunity to not pay a fucking landlord, thanks.
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!)
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.
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!
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...)
* 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.
* 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.
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.
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.
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?
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...
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.
>>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.
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
"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.
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.
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.
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.
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.
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.
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...
Why call that out, that was my last 3 rent increases
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.
Okay. Different question then, how many times have you yanked all your kids out of their peer groups, permanently?
…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.
In general, real estate rental investment are terrible subpar investment. How would this be different?
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.
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.
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.
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.
First you fix the problem then you look for the culprit and administer punishment if it's needed at that point.
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.
And then iterating on it over time, and I find what’s valuable and what’s not.
journal before you start your day
buy some sort of electric kettle
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?
> Hard conversations, easy life. Easy conversations, hard life
Id heard this a hundred times, but around 30 years old it clicked and has fundamentally changed how I view things.
I don't buy the "no smarter than you" part though.
Whether some people really were "smarter" than you (whatever that means) is not relevant to the point of the Jobs quote, I think.
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.
Because, a lot of people like jobs had similar experiences in the early days, e.g. Palo Alto Research Lab around them - though, it was Jobs who came up with the idea, not any other of the SC veterans :)
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
In particular, I now own a string height gauge, which was very cheap and makes the action assessment more empirical.
Recommended to anyone starting to play.
If you stick with it eventually you learn to tune the instrument by ear.
The point is, don't delude yourself into thinking you'll someday do X if you wait.
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.
I guess people now expect free shipping via Amazon and boy does this make things sell faster.
I have only experienced this kind of environment once. And the fix was to quit and join a functional company instead.
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.
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.
This may seem obvious but when I was younger I used to spin out in frustration at bugs.
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
I fought it for years but now ALL my crops are under black plastic every year and it's made all the difference.