|
Corla Plankun posted:this is a good strat but i feel obliged to tell you that you can do this with one branch (you can git reset to any commit in the git log, no branch names needed) yeah tbh i do it your way but sometimes i'll do the wip branch if i want to be more organized.
|
|
|
|
|
| # ? Nov 10, 2025 01:17 |
|
Corla Plankun posted:documentation is obsolete almost the second it is written and its a waste of time to try to fight technical debt with words nobody will ever read oh, hi senior architect from $(JOB-1) the guy who imposed that view on the team was the #1 by far source of bugs and awful code nobody understood. he would active delete any docs or unit tests he found and that fuckin job made me so mad basically what I’m saying is, gently caress that attitude and I hope I never have to work with you
|
|
|
|
Arcsech posted:he would active delete ... or unit tests he found ![]() ![]()
|
|
|
|
i've been the guy who writes pages of documentation at company where nobody writes any documentation and it was indeed a waste of time. the solution is to work someplace where documentation is valued.
|
|
|
|
hackbunny posted:I wish there was an easy way to split a commit into multiple commits without a ton of amends and squashes, though interactive rebase, edit the victim commit, git reset HEAD^, split into desired chunks and re-commit, git rebase --continue
|
|
|
|
Arcsech posted:oh, hi senior architect from $(JOB-1) deleting tests is brain damage, i'm not that guy at all documentation is just pseudocode with no tests so there's never going to be a guarantee that its any good tests are documentation that is guaranteed to be correct (or at least overtly incorrect when it is incorrect)
|
|
|
|
undocumented code is a far greater security issue than undocumented people imo
|
|
|
|
Sapozhnik posted:interactive rebase, edit the victim commit, git reset HEAD^, split into desired chunks and re-commit, git rebase --continue and don't gently caress anything up along the way
|
|
|
|
Sapozhnik posted:interactive rebase, edit the victim commit, git reset HEAD^, split into desired chunks and re-commit, git rebase --continue i easily manage this with the reset method i mentioned. i just craft multiple commits instead of a single commit.
|
|
|
|
DONT THREAD ON ME posted:i easily manage this with the reset method i mentioned. i just craft multiple commits instead of a single commit. aren't you an emacs guy? if you're an emacs user and not using magit you're loving up. tbh it's legit to install emacs only to use magit, also
|
|
|
|
Phobeste posted:aren't you an emacs guy? if you're an emacs user and not using magit you're loving up. tbh it's legit to install emacs only to use magit, also yah i started switching from spacemacs to real emacs a year ago and havent completed the transition. ive also been using a lot of langs where emacs isnt the best. i will very much go back but focusing on other stuff. i miss magit.
|
|
|
|
Corla Plankun posted:tests are documentation that is guaranteed to be correct (or at least overtly incorrect when it is incorrect) code:is a test guaranteed to be correct but has absolutely zero value and is one i would delete from a codebase in an instant if i found it
|
|
|
|
Corla Plankun posted:documentation is just pseudocode with no tests so there's never going to be a guarantee that its any good what the gently caress kinda docs are you writing that they’re “pseudocode” good docs should tell you 1) why a thing is the way it is, 2) what guarantees it provides that can’t be expressed through types, and 3) if necessary why a thing is NOT a certain way. the only time you should have pseudocode-y docs is in code that’s unintuitive for performance reasons, and this should be 1) rare, and 2) heavily reviewed and fail review if the docs aren’t updated when the code is Corla Plankun posted:tests are documentation that is guaranteed to be correct (or at least overtly incorrect when it is incorrect) also for public-facing documentation you should have doctests wherever possible to help correct this
|
|
|
|
it really depends on the kind of team and project you work on. trying to document a garbage heap is a futile endeavor. but like, don't spend your precious life energy on garbage heaps. DONT THREAD ON ME fucked around with this message at 18:11 on Feb 16, 2019 |
|
|
|
DONT THREAD ON ME posted:it really depends on the kind of team and project you work on. trying to document a garbage heap is a futile endeavor. I mean yeah if you’re working on shittr.io’s crud app for checking in to your dumps then do whatever but be more professional if you’re working on something that actually matters
|
|
|
|
Arcsech posted:I mean yeah if you’re working on shittr.io’s crud app for checking in to your dumps then do whatever
|
|
|
|
I've got an issue that is driving me crazy and I can't figure out what is causing it. I need to take a cell from a DataFrame, split it into a list it and then return copy of that DataFrame with a new row for each element of the split. At present I'm getting errors that the size of the new DataFrame and the size of the list don't match and I don't know how this can happen as all I am doing is row * size of list. Anyone got any ideas of what is going wrong here?code:
|
|
|
|
I am almost certain nobody reads the docs I write. much like my posts
|
|
|
vodkat posted:I've got an issue that is driving me crazy and I can't figure out what is causing it. I need to take a cell from a DataFrame, split it into a list it and then return copy of that DataFrame with a new row for each element of the split. At present I'm getting errors that the size of the new DataFrame and the size of the list don't match and I don't know how this can happen as all I am doing is row * size of list. Anyone got any ideas of what is going wrong here? Away from pc but I don’t think arr does what you think
|
|
|
|
|
cinci zoo sniper posted:Away from pc but I don’t think arr does what you think I will have a look at this again in the morning but I also tried pd.DataFrame([[row]] * len(column_list)) when trying to fix this and encountered the same error, so all I could think of was that for some reason the way in which the list is being counted is off? From having looked at some output this is normally by a factor of two, but not always, so totally baffled as to what this could be.
|
|
|
|
Powerful Two-Hander posted:I am almost certain nobody reads the docs I write. there is a fundamental law of software that states that the only documentation that ever turns out to be important is the documentation that didn't get written write docs? congratulations on wasting time, idiot. didn't write docs? now everything is on fire and it's your fault, idiot. the moral of the story is that programming was a mistake
|
|
|
|
Soricidus posted:the moral of the story is that humanity was a mistake
|
|
|
|
I extensively document a piece of code one week before it gets deleted. Every time.
|
|
|
|
Soricidus posted:there is a fundamental law of software that states that the only documentation that ever turns out to be important is the documentation that didn't get written if it takes the sting off, there’s probably a decent amount of (something that probably has a more official term but I’ll call) the sports referee effect: it’s only noticeable when there’s a problem. nobody thinks to mention the accurate, accessible, and timely documentation they just used to efficiently get their job done
|
|
|
|
Sapozhnik posted:I extensively document a piece of code one week before it gets deleted. Every time. Hmm. That's a net gain. Maybe you should document more code.
|
|
|
|
Doom Mathematic posted:Hmm. That's a net gain. Maybe you should document more code. yeah, i'd document the heck out of all of our code if I could get that kind of deal
|
|
|
|
Corla Plankun posted:documentation is obsolete almost the second it is written and its a waste of time to try to fight technical debt with words nobody will ever read quit your job commit messages document intent and context, they're historical data and by definition can't ever get obsolete. it's vital irreplaceable information that degrades fast if not written down, and you'll be sorry six months from now when a complex uncommented line that's blatantly stupid but you can't tell if it's related to the bug you're working on was added in a commit with message "bugfixes" in closing, quit your job Sapozhnik posted:git reset HEAD^ huh for no reason at all I thought you couldn't continue an interactive rebase after that Powerful Two-Hander posted:I am almost certain nobody reads the docs I write. write documentation that will be useful for yourself
|
|
|
|
my current employer has a head of engineering that believes engineers should write documentation, as "they are the ones that understand the code". this has * people good at writing code aren't necessarily, and often are not, particularly good with writing clear, readable prose. granted, half our engineering team are non-native english speakers and can't be blamed for this, but the native english speakers aren't much better. * the original designers of a user interface/workflow tend to bake a lot of assumptions about how that interface should be used and what knowledge its users will already have into their documentation. this makes the documentation bad because those assumptions rarely line up with reality. * any role whose primary responsibility is not documentation will focus on their primary responsibilities first. documentation is written in a rush before a release, exacerbating the above two issues. i pray for us to hire a technical writer
|
|
|
|
my technical writing is more aptly described as technically writing.
|
|
|
|
i try hard but bless my heart i will never be able to get tenses straight
|
|
|
|
I like to write documentation because I'm going to be the one who maintains what I put in, and I would really enjoy knowing why the hell it's written like that come 24 hours later.
|
|
|
|
I like to think whenever debates about stuff like documentation, unit tests comes up, people usually present their points but what we fail to take into account is the circumstances in which they operate in: A guy, who's codebase is testable and descriptive and logically constructed, "perhaps if we don't spend so much time on documentation that would be easily outdated if we forget to update them we can do other more productive stuff!" Me, stuck in idiot hellscape where classes are so needlessly complex a class does logging via instantiating another class to hold log output statefully, and aforementioned class will actually change execution logic depending on the contents of the statefull logger instance, "DO YOU WANT IT ALL TO GO TO HELL?!?!?!"
|
|
|
|
JavaScript code:quote:$ node oops.js i bet these are fun to debug (the exact async operation that causes execution to suspend is unimportant, just that there's nested async calls wrapped up inside nontrivial flow control)
|
|
|
|
hackbunny posted:
this is actually why I do it. anytime I've done something that I think is a) interesting/might be useful again or b) not particularly clear or described by comments in code I write it up then every so often I go and read my own docs and am like "Heh that is pretty cool
|
|
|
|
vodkat posted:
vodkat posted:I will have a look at this again in the morning but I also tried pd.DataFrame([[row]] * len(column_list)) when trying to fix this and encountered the same error, so all I could think of was that for some reason the way in which the list is being counted is off? From having looked at some output this is normally by a factor of two, but not always, so totally baffled as to what this could be. Think I've got to the bottom of this, it wasn't this code that was the issue but the way in which I was applying the function using groupby, which due to a duplicate index or something (which I didn't bother trying to figuring out) it was sometimes passing more than one row to this function. I think I've fixed this by stopping trying to be clever with groupby and apply and using the much slower df.iterrows() instead.
|
|
|
|
i had a python question too but i just figured it out while typing it out thx everybody lol
|
|
|
|
rubber duckie, you’re the one you make debugging so much fun
|
|
|
|
pokeyman posted:rubber duckie, you’re the one Elide the "you", then it scans
|
|
|
|
bob dobbs is dead posted:Elide the "you", then it scans Could do "you" as a semi-vocalized contraction? "Y'make"?
|
|
|
|
|
| # ? Nov 10, 2025 01:17 |
|
also ive been adding type annotations to as much as possible when im working on a file. helps a lot but its still ducky as heck
|
|
|


























