Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
Pollyanna
Mar 5, 2005

Milk's on them.


I just realized I’m about 7~8 years into the industry. :shepface:

I somehow ended up at a FAANG, so it’s not like my career is a failure or anything. Still, I didn’t end up where my father did - he is incredibly devoted to his job and has somehow stuck to it for decades, and continues to be energized by it. In contrast, I’m kinda not. I can program and l do tech stuff, sure, but it’s not my passion or what makes me happy or what I want to spend >1/3 of my life on.

I’m at the point where I really need to start thinking about what I want long-long term. Like, what is the point of working in tech, what do I need or want this income for, what do I see myself doing for the next 25-30 years.

I’m at a bit of a loss. There’s a lot more in life than my job and I want to focus more on it, so I wish I could save my time and energy for my hobbies and interests instead of for work. As is, almost all my energy is spent on something that doesn’t fulfill me.

Money-wise, I’d like to save up for and pay off a house, and keep saving for retirement, but I don’t need a lot of money otherwise.

Is this what they call a mid-life crisis? :gonk: I’m just sick of 8+ hours of my day being spent on something that isn’t really me. You never get time back.

Adbot
ADBOT LOVES YOU

New Yorp New Yorp
Jul 18, 2003

Only in Kenya.
Pillbug

Pollyanna posted:

Money-wise, I’d like to save up for and pay off a house, and keep saving for retirement, but I don’t need a lot of money otherwise.

The problem is that the whole "getting old" thing starts to throw a lot of curveballs at you as you approach your 40s/50s* and beyond. You honestly never know how much money you're going to need or how long you'll be able to work. My grandfather was pretty wealthy and lived into his 90s and the last ~10 years of his life consisted of basically nonstop medical care. That poo poo ain't cheap. Don't not pursue happiness because of it, but just acknowledge that "i don't need a lot of money" is better stated as "i don't need a lot of money right now and I am assuming that will continue to be the case forever", which is probably unrealistic.

*I say this as someone who is typing this while wearing a neck brace after having a two-level cervical fusion last Friday.

asur
Dec 28, 2012
Why can't you focus on your hobbies and interests while working? It also doesn't sound like you've considered if you want either financial independence or to retire early, FI and FIRE respectively. You don't need to work 25-30 more years if you have a high paying job relative to your proposed spending or you could also switch to a job you find fulfilling even if it pays terribly once your FI and not worry about money.

In my experience alignment of fulfillment and job is either luck or requires sacrifice. I also don't think it's required if you can tolerate your work and find fulfillment outside of it.

asur fucked around with this message at 16:25 on Oct 17, 2022

Pollyanna
Mar 5, 2005

Milk's on them.


New Yorp New Yorp posted:

The problem is that the whole "getting old" thing starts to throw a lot of curveballs at you as you approach your 40s/50s* and beyond. You honestly never know how much money you're going to need or how long you'll be able to work. My grandfather was pretty wealthy and lived into his 90s and the last ~10 years of his life consisted of basically nonstop medical care. That poo poo ain't cheap. Don't not pursue happiness because of it, but just acknowledge that "i don't need a lot of money" is better stated as "i don't need a lot of money right now and I am assuming that will continue to be the case forever", which is probably unrealistic.

*I say this as someone who is typing this while wearing a neck brace after having a two-level cervical fusion last Friday.

Yeah, you’re not wrong. The reason I’m still working and trying to maximize my income is that I have no idea how much money I’ll actually need, and so I stockpile it out of fear and doubt. It’s horrible, but in this world, you can never have too much money if you want to stay safe and secure. (How that impacts the world at large is a fun discussion.)

asur posted:

Why can't you focus on your hobbies and interests while working?

I’m tired. Work takes up 8 hours of every weekday and gets first dibs on my mental and physical energy. By the time I get home, my Adderall has worn off and my brain has neither creative energy nor focus. And any non-work time has to first be spent on upkeep like chores, errands, cooking meals, and taking care of myself and my cat. It’s halfway through October and most of my post-workdays this year have been spent mentally recovering on the couch, watching YouTube or cooking. I haven’t accomplished enough this year.

I’m also a binger. I focus hard on something for a relatively short amount of time, then move on to something else before eventually coming back for another round. With a 9-to-5, you instead have to be a grazer - a little bit each and every day for a very long time. That’s not my nature.

quote:

It also doesn't sound like you've considered if you want either financial independence or to retire early, FI and FIRE respectively. You don't need to work 25-30 more years if you have a high paying job relative to your proposed spending or you could also switch to a job you find fulfilling even if it pays terribly once your FI and not worry about money.

Too early. I don’t feel comfortable making a decision re: FI/RE before I completely own property, since that’s the biggest purchase of your life. It’s far easier to do the math once that’s out of the way.

quote:

In my experience alignment of fulfillment and job is either luck or requires sacrifice. I also don't think it's required if you can tolerate your work and find fulfillment outside of it.

Yeah, basically. My dad was lucky, or at least managed to buy into the whole thing. I just don’t wanna end up like my mom who is basically forced to stick with her depressing job because of some financial dumbassery :(

Artemis J Brassnuts
Jan 2, 2009
I regret😢 to inform📢 I am the most sexually🍆 vanilla 🍦straight 📏 dude😰 on the planet🌎
Speaking from the perspective of someone who followed their passion: life costs money and you can’t pay in passion. I’ve spent the past 20 years in AAA games and it turns out what I really wanted was to make my own ridiculous, unmarketable indie games, not “implement some auteur’s vision”. Could I still make my own games that sell 6 copies on itch while working at FAANG? Probably. Would I lament not being “gameplay programmer #80” on Call of Duty? Probably not.

My wife’s dad wanted to be a painter and became a doctor instead. Now he has a huge house by the beach to hang his paintings in. As long as the job doesn’t suck the life out of you or take over your life, I think it’s totally okay to just let the job finance your dreams.

Hadlock
Nov 9, 2004

Pollyanna posted:

Is this what they call a mid-life crisis? :gonk: I’m just sick of 8+ hours of my day being spent on something that isn’t really me. You never get time back.

I think so yeah

My thoughts have been wandering in this direction for a while. At this point I've just accepted that this is the only thing I know how to do that people will pay me as much to do

If I could like, do, like, structural TIG welding or run an artisan pottery shop or neighborhood garden center specializing in orchids and carnivorous plants for the same money and financial security, I would

But in the mean time it pays the mortgage and I'm building a go kart and funds my other hobbies and my wife doesn't yell at me for being unemployed so it'll have to do for now

prom candy
Dec 16, 2005

Only I may dance

Pollyanna posted:

I’m tired. Work takes up 8 hours of every weekday and gets first dibs on my mental and physical energy. By the time I get home, my Adderall has worn off and my brain has neither creative energy nor focus. And any non-work time has to first be spent on upkeep like chores, errands, cooking meals, and taking care of myself and my cat. It’s halfway through October and most of my post-workdays this year have been spent mentally recovering on the couch, watching YouTube or cooking. I haven’t accomplished enough this year.

I think this is something you can work on. For me it mainly means scheduled activities so that I don't have to rely on feeling like doing something in the moment. I have rec sports nights and music night and invariably on the day of I don't want to go, but because it's scheduled and there's social pressure I do and then I have a lot of fun and I don't feel like I'm wasting my life away. I also ideally have a couple nights each week where I don't have anything scheduled so I can recharge. YMMV though and I don't know how schedulable your hobbies/interests are.

That said I can't imagine doing this job 8 hours a day if I didn't like coding so I'm definitely not saying just stick it out for another 25 years. But whatever job you get you're probably going to be tired at the end of the workday.

Red Mike
Jul 11, 2011

Pollyanna posted:

I’m also a binger. I focus hard on something for a relatively short amount of time, then move on to something else before eventually coming back for another round. With a 9-to-5, you instead have to be a grazer - a little bit each and every day for a very long time. That’s not my nature.

Speaking from personal experience, it's very easy to dismiss things as "not my nature" when you (consciously or not) receive a sense of fulfillment out of it that would be uncertain otherwise. When my own ADHD pills kick in, the fact that I can consciously choose to direct my focus means that I could very easily choose to focus "hard" on work tasks and spend a lot of energy. And it feels good to get the satisfaction out of it/do a good job/be praised/feel like I earn my salary; although it took me a while to admit this to myself because I didn't think I could be that simple to please. At the same time, doing too much of that will drain me to the point where I can't do anything after work without forcing myself to the point of exhaustion.

Not long ago, I thought this was unavoidable and "just how I act/it's my nature" because I spent so long with my main source of productivity being draining hyperfocus that usually comes when I'm already mostly exhausted anyway.

Then I found a secondary interest (that's unrelated to work and that I wouldn't be able to do during work hours) which convinced me against my initial reflex to... not focus so hard at work. Maybe I'd still focus "hard" once a day when I had a good chunky task to get through, or when I genuinely needed to put in the effort to get something done on time; in-between I'd take longer and more regular breaks as well as sink (only a bit) of energy into things that also relax me like catching up on work-related news or checking in with colleagues. Over time I continued tuning it up and down until I found a rate that left me with more than enough energy to do my hobbies/life things, while also managing to feel like I'm stockpiling some longer term energy even.

It felt very uncomfortable, literally every day at the start (because it felt like I was "slacking off" as well as "wasting valuable focus time"), then once in a while, and now I feel comfortable with it; because I realised that generally that's what people do at work unless you're working for a tiny start-up/independent gig where your work on the product directly translates to money in your pocket/a better product.

And in the end anyway it made no difference to the actual work result, I was still praised for my work rate even as I basically did less and less, no-one even noticed that things had changed other than actually appreciating that I checked in more often and had interesting things to share about my hobbies.

e: Also it's easy to fall into the trap of thinking about "8 hours a day I'm spending on things I don't care about"; but with time management and caring for your own energy as above, you can turn it into a lot less than that. Sure, maybe you can't work on your own projects while you're at work. If you're not remote, maybe you can't do housework then either. But you can take breaks in which you catch up and do your budgeting in between tasks. You can spend some time socialising with colleagues to not feel like you have to do all of it outside of work. Or even call/message/etc non-work friends to socialise with them. There's an unavoidable amount of time lost because you do have to spend it head down working on a task, but your goal should be to find a balance where you're happy with that amount of time in the day.

Red Mike fucked around with this message at 17:56 on Oct 17, 2022

StumblyWumbly
Sep 12, 2007

Batmanticore!
If you're too tired because work takes 40 entire hours a day, take 2 weeks off and figure your poo poo out.

I've seen folks get themselves into trouble because they blamed their problem on their job and it was a deeper issue.

Pollyanna
Mar 5, 2005

Milk's on them.


I too would be tired if I worked 40 hours in the span of 24 hours. :v:

Message received, I’ll think about this more. Probably one of them mindfulness things people talk about.

Achmed Jones
Oct 16, 2004



when i started doing l5 work that's a lot more unblocking-others and project-managing and writing feature requirements than sitting down and implementing stuff in code, i noticed not being so tired after work. for people that go ham on tasks (like you, like me) it's really easy to spend all your mental energy on coding and have nothing left over at the end of the day

also, taking breaks to play with your toys helps a lot. at least when you have a work from home day. i spent half an hour or so yesterday fuckin around with a new camera lens i got from goodwill and i gotta say it felt good. but first you have to get up and walk away from the computer. im still trying to figure out how i can do daw-music stuff easily (i only have one ergo keyboard type setup) without having to do the old switcharoo (right now the big obstacle is a separate audio interface for my work computer and desk space for a second monitor)

leper khan
Dec 28, 2010
Honest to god thinks Half Life 2 is a bad game. But at least he likes Monster Hunter.
After I got a management job, i have functionally infinite energy for my hobby projects

Opulent Ceremony
Feb 22, 2012
How do I indicate on my resume that my current job is just an extension of my previous one? Previous company was acquired by the new company, so a different name appears on my paychecks but I didn't actually change jobs in the 'individually sought out and switched companies' way. Is the distinction worth making?

Motronic
Nov 6, 2009

Opulent Ceremony posted:

How do I indicate on my resume that my current job is just an extension of my previous one? Previous company was acquired by the new company, so a different name appears on my paychecks but I didn't actually change jobs in the 'individually sought out and switched companies' way. Is the distinction worth making?

If you title did not change I most often see that line on a resume as "NewCo (formerly OldCo)".

redleader
Aug 18, 2005

Engage according to operational parameters

StumblyWumbly posted:

If you're too tired because work takes 40 entire hours a day, take 2 weeks off and figure your poo poo out.

I've seen folks get themselves into trouble because they blamed their problem on their job and it was a deeper issue.

what should you do with those two weeks to "figure your poo poo out"?

Opulent Ceremony
Feb 22, 2012

Motronic posted:

If you title did not change I most often see that line on a resume as "NewCo (formerly OldCo)".

So a single blurb for both? In my case, the title did change.

EDIT: Probably I can put '(formerly OldCo)' as well on the new one, I think that will work too, thank you.

Motronic
Nov 6, 2009

Opulent Ceremony posted:

So a single blurb for both? In my case, the title did change.

EDIT: Probably I can put '(formerly OldCo)' as well on the new one, I think that will work too, thank you.

So if the title changes you have your oldco entry/title under OldCo, then a the new one for your new title with exactly what is in your edit....NewCo (formerly OldCo).

StumblyWumbly
Sep 12, 2007

Batmanticore!

redleader posted:

what should you do with those two weeks to "figure your poo poo out"?

Huge question and the answer depends a lot on the person and the specifics of the situation. Op says they need to figure out their long term life plan, so they can do that. I've also known people who thought their job was miserable and holding them back, so they quit and it turned out they had depression with deeper roots than their job. And it turns out depression + unemployment is just a harder hole to dig yourself out of.

The big point is that while op's job may be the least interesting part of their life, getting buckets of money for working 40 hours a week is not actually holding them back in other areas. Maybe I'm responding to my own history more than the actual op.

downout
Jul 6, 2009

Ihmemies posted:

So I was an x-ray tech but job prospects were slim to none in Finland for six years, so I went to university this fall to study computer sciences: https://www.tuni.fi/studentsguide/curriculum/degree-programmes/uta-tohjelma-1705?year=2022&activeTab=1

Now I'm wondering what to do next summer. There won't be school in Jun-Aug, probably not much in May either.

What kind of work could an old guy (I'm 37 heh) get after 1 year of CS? I can't get even temp jobs as an x-ray tech so it must be something else. Flipping burgers maybe?

First year of CS consists chiefly of mandatory courses like programming 1-3, functional programming, some math & statistics, intro to software development, maybe techniques in C programming language, a git course.

Prog1-3 have python, c++ and java respectively.

I could probably choose other courses too if necessary (they have a big list: https://www.tuni.fi/en/students-guide/curriculum/course-units?year=2022 )

Maybe I should do a roguelike and share the git repo with potential employees? No idea how this works really.

I might have good suggestion for you. PM me.

downout
Jul 6, 2009

Pollyanna posted:

I just realized I’m about 7~8 years into the industry. :shepface:

I somehow ended up at a FAANG, so it’s not like my career is a failure or anything. Still, I didn’t end up where my father did - he is incredibly devoted to his job and has somehow stuck to it for decades, and continues to be energized by it. In contrast, I’m kinda not. I can program and l do tech stuff, sure, but it’s not my passion or what makes me happy or what I want to spend >1/3 of my life on.

I’m at the point where I really need to start thinking about what I want long-long term. Like, what is the point of working in tech, what do I need or want this income for, what do I see myself doing for the next 25-30 years.

I’m at a bit of a loss. There’s a lot more in life than my job and I want to focus more on it, so I wish I could save my time and energy for my hobbies and interests instead of for work. As is, almost all my energy is spent on something that doesn’t fulfill me.

Money-wise, I’d like to save up for and pay off a house, and keep saving for retirement, but I don’t need a lot of money otherwise.

Is this what they call a mid-life crisis? :gonk: I’m just sick of 8+ hours of my day being spent on something that isn’t really me. You never get time back.

What else would you like to spend your time on?

Love Stole the Day
Nov 4, 2012
Please give me free quality professional advice so I can be a baby about it and insult you

Pollyanna posted:

I’m also a binger. I focus hard on something for a relatively short amount of time, then move on to something else before eventually coming back for another round. With a 9-to-5, you instead have to be a grazer - a little bit each and every day for a very long time. That’s not my nature.

The reason it's not your nature might be because of this part:

Pollyanna posted:

my Adderall has worn off
I hope you were joking about having a drug dependency in order to do your job. If not, then maybe the real problem is imposter syndrome.

edit: also look at me giving advice in this thread wtf hell is freezing over

New Yorp New Yorp
Jul 18, 2003

Only in Kenya.
Pillbug

Love Stole the Day posted:

I hope you were joking about having a drug dependency in order to do your job.

Taking a drug prescribed by a medical professional to treat an attention disorder is not a "drug dependency", wtf. (well, okay, it is, but not in the pejorative street drug sense)

Adderall is a very common prescription for ADD/ADHD. I know a shitload of people who are on it (or an analogous drug like Vyvanse), and you probably do too.

bob dobbs is dead
Oct 8, 2017

I love peeps
Nap Ghost
my doctor made me substitute potassium salt substitute for some of my salt intake a week ago and my productivity touchin computers outside of work went up a ridiculous amount, if we're on medicine and productivity chat

i dunno what thats about. maybe it's something else

luchadornado
Oct 7, 2004

A boombox is not a toy!

New Yorp New Yorp posted:

Taking a drug prescribed by a medical professional to treat an attention disorder is not a "drug dependency"

Fixed. Shaming prescription use can re-enforce mental health stigmas. It's common for people to be frustrated that they "need the crutch" of any prescription drug, and they could skip diagnosis/prescription or stop taking medicine that could be beneficial.

biceps crimes
Apr 12, 2008


It is literally a drug dependency, but having a drug dependency shouldn’t be something that’s stigmatized

Splinter
Jul 4, 2003
Cowabunga!
Yeah, and a large percentage of the workforce has a caffeine dependency

kayakyakr
Feb 16, 2004

Kayak is true

Love Stole the Day posted:

The reason it's not your nature might be because of this part:

I hope you were joking about having a drug dependency in order to do your job. If not, then maybe the real problem is imposter syndrome.

edit: also look at me giving advice in this thread wtf hell is freezing over

This is a terrible take. Truly awful.

StumblyWumbly
Sep 12, 2007

Batmanticore!

bob dobbs is dead posted:

my doctor made me substitute potassium salt substitute for some of my salt intake a week ago and my productivity touchin computers outside of work went up a ridiculous amount, if we're on medicine and productivity chat

i dunno what thats about. maybe it's something else

I'm curious about this, are you on some kind of keto diet, or do you just not eat fresh foods or veggies?

E: To be clear, not trying to tease you or anything. I know folks who take potassium supplements because they were on keto. But if its the kind of thing folks may need because of a lot of takeout food or something, I have a friend I may suggest it to. It does sound like the kind of thing that really helps if you need it

StumblyWumbly fucked around with this message at 19:55 on Oct 20, 2022

bob dobbs is dead
Oct 8, 2017

I love peeps
Nap Ghost

StumblyWumbly posted:

I'm curious about this, are you on some kind of keto diet, or do you just not eat fresh foods or veggies?

E: To be clear, not trying to tease you or anything. I know folks who take potassium supplements because they were on keto. But if its the kind of thing folks may need because of a lot of takeout food or something, I have a friend I may suggest it to. It does sound like the kind of thing that really helps if you need it

its cuz i eat a korean-level amount of salt. lots of veggies, but almost all of them salted and fermented

Bruegels Fuckbooks
Sep 14, 2004

Now, listen - I know the two of you are very different from each other in a lot of ways, but you have to understand that as far as Grandpa's concerned, you're both pieces of shit! Yeah. I can prove it mathematically.

Splinter posted:

Yeah, and a large percentage of the workforce has a caffeine dependency

I was diagnosed with ADD after I had already graduated from college and grad school.

Apparently, normal people don't need to drink 10 cups of coffee a day to function in a classroom/work environment, and the job where I had unrestricted access to make as much coffee as I wanted was the first job where I excelled.

ultrafilter
Aug 23, 2007

It's okay if you have any questions.


Our profession has a lot of people with ADHD tendencies. Like, a lot.

Hadlock
Nov 9, 2004

30-40% is my wild rear end guess

prom candy
Dec 16, 2005

Only I may dance
You don't have to be neurodivergent to work here, but it helps.

awesomeolion
Nov 5, 2007

"Hi, I'm awesomeolion."

Anyone have tips for how to improve my architecture and design skills? I tend to jump in and try stuff rather than sitting back in my rocking chair and comparing every possible architectural option. So that's one issue I think. But when I sit there brainstorming architecture options it feels like it doesn't matter and I get sleepy.

I have been writing unit tests this year for the first time. It's helping me understand why protocols and abstractions are so important. So maybe I should learn more about TDD and try to commit more to that style?

I've read sections of Designing Data Intensive Applications and it's not really relevant to me as an iOS engineer. A lot of suggestions from books like Clean Code are just kind of cringe and feel counter productive... I don't want 70 two line functions thanks. Anyways if there are books or methods for improving my software design skills please let me know, preferrably not by Robert Martin or backend/server focused.

gbut
Mar 28, 2008

😤I put the UN🇺🇳 in 🎊FUN🎉


awesomeolion posted:

I have been writing unit tests this year for the first time. It's helping me understand why protocols and abstractions are so important. So maybe I should learn more about TDD and try to commit more to that style?

I've found that the whole idea of TDD does not really work in large orgs, especially if those orgs like to shuffle engineers around different teams every 6 months or so. It all ends up being a soup of low-hanging fruit that is also tightly coupled with implementation, mocks that don't implement the service interfaces well, and business-crucial stuff being skipped over because it's too hard to test due to complexity. I work in web space, so take this with a giant Himalayan salt rock.

Not saying that TDD doesn't have value (it definitely does), it's just that 90%+ of orgs I've had pleasure working with do it superficially so that a Director or a VP can check-off a box.

E: the point I was trying to make, but didn't: if you like it, go for it. It's not that much different or harder, just requires a bit more forethought. And always question tests you see in the repos you touch: there's a great chance they are not very good.

gbut fucked around with this message at 14:41 on Oct 22, 2022

lifg
Dec 4, 2000
<this tag left blank>
Muldoon
What problems are you encountering in your code? Like, is it hard to debug, not scaling well, is adding new features a pain?

Things like Domain Driven Design and Test Driven Development have stood the test of time for me, even if I don’t use them fully all the time.

If you like reading somewhat-short case studies, poke around The Architecture of Open Source Applications.

gbut
Mar 28, 2008

😤I put the UN🇺🇳 in 🎊FUN🎉


All of the above, plus more. The tight coupling to implementation seems to be the biggest issue, which removes the most beneficial part of TDD: easy refactoring.
The second largest problem in my experience is indiscriminate testing (chasing the 100% coverage), which focuses less experienced devs to do the easy tests first, usually foregoing the more complex/important ones as the crunch intensifies.
A 70% coverage can mean anything from well formulated tests that cover all the important parts of your application, all the way to sprinkling with tests that don't really add to any confidence in code, and everything in between.

It's not a theory problem, it's the practice one, as usual. IMHO, TDD requires discipline and domain knowledge that are not easily found in heavy turnover places.

E: thanks for the link, I will check it out.

gbut fucked around with this message at 15:49 on Oct 22, 2022

awesomeolion
Nov 5, 2007

"Hi, I'm awesomeolion."

Thanks for thoughts and the link, it looks interesting.

Things like ease of use (eg. for the caller of my code / api), ability for other engineers to tell what the code is doing, maintainability, ability to reuse my code is all important. Also important is getting other people that I work with to think that the code I write is well structured and architected. Because they're the ones giving feedback that I need to improve so I need to make them happy in a sense. I guess I could chase down more detailed feedback to try to figure out exactly what they saw that gave them a negative impression.

gbut you make some good points about TDD. I've been thinking about it as "enforce that the public methods are doing what they are supposed to do". But with multiple queues and multithreading it gets hard to test anything but the simplest things so my tests are kind of brittle and superficial for sure. I might need something more like end to end or integration tests rather than unit tests.

TooMuchAbstraction
Oct 14, 2012

I spent four years making
Waves of Steel
Hell yes I'm going to turn my avatar into an ad for it.
Fun Shoe
The value of TDD is twofold. First is the tests themselves, of course, which help catch regressions before they hit your clients. But second is that they force you to write testable code. If your code is a mess of long-lived threads and classes that reach deep into each others' pockets, then you have a lot of work to do before you can start writing useful tests.

Ideally (for TDD), all of your code should be organized into relatively small units that each have an "API" that encompasses the entirety of their dependencies. I.e. each exposed function is stateless aside from the state that the function's parameters provide. That lets you write unit tests by injecting mock dependencies.

Adbot
ADBOT LOVES YOU

leper khan
Dec 28, 2010
Honest to god thinks Half Life 2 is a bad game. But at least he likes Monster Hunter.

TooMuchAbstraction posted:

The value of TDD is twofold. First is the tests themselves, of course, which help catch regressions before they hit your clients. But second is that they force you to write testable code. If your code is a mess of long-lived threads and classes that reach deep into each others' pockets, then you have a lot of work to do before you can start writing useful tests.

Ideally (for TDD), all of your code should be organized into relatively small units that each have an "API" that encompasses the entirety of their dependencies. I.e. each exposed function is stateless aside from the state that the function's parameters provide. That lets you write unit tests by injecting mock dependencies.

One of the problems with TDD is that neither of your benefits are necessarily realized to implement TDD. The tests can have negative value and the code doesn't need to be testable. These issues compound themselves.

My problem is that it's a technical solution to a social problem that lets people believe they can paper over the real challenges in designing for reliability and maintainability systematically in ways that often hinder one of not both of those goals.

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply