|
I know of a company (not one I’ve ever worked for) that does most of its testing by diffing its logs against expected output. (I think they do at least run a sed script on the log first to clean it up a little.) Yes, this does indeed mean that almost all of the tests have to be updated whenever someone adds a new log line.
|
# ? Mar 6, 2022 05:28 |
|
|
# ? Jun 7, 2024 16:02 |
|
chglcu posted:Just write your free immediately after you write your malloc, you lazy poo poo. Only being semi-ironic here. Memory management just really isn’t that hard. The NSA thanks you for your commitment to their future
|
# ? Mar 6, 2022 13:53 |
|
Personal coding horror when I realize that the project ive spent several weeks on is but a piece of a project ive been trying to puzzle out for 3 years, and that I have to go back to the drawing board on all but the CSS and calculation models Curious how many lines of code ive written uselessly.
|
# ? Mar 6, 2022 14:01 |
|
All of it. It's code after all.
|
# ? Mar 6, 2022 14:27 |
|
I'd describe that as "finally made decisive progress on the much overdue next generation system design. Thank you, prototype, your tenure is respected. Now, off to the vivisection and refactoring plant you go."
|
# ? Mar 6, 2022 14:37 |
|
YanniRotten posted:While that's probably not what you'd start with on a green field project, yeah that kind of "what happens should happen" is absolutely a good approach if you're working on a legacy system either for a refactor or just maintenance. Yeah this is how jest snapshot testing works. Record the produced HTML from a render function, check it in, and then when it changes, review that during PR review. It’s fallen a bit out of favor now.
|
# ? Mar 6, 2022 17:09 |
|
ynohtna posted:I'd describe that as "finally made decisive progress on the much overdue next generation system design. Thank you, prototype, your tenure is respected. Now, off to the vivisection and refactoring plant you go." This is exactly the technobabble i needed to make it okayish in my head. I'm gonna pay for it though. Bunch of DB models need updating, bunch of code I didn't document or comment well, at least I use descriptive variable names
|
# ? Mar 6, 2022 17:17 |
|
There is no such thing as wasted effort.
|
# ? Mar 6, 2022 22:22 |
|
Bongo Bill posted:There is no such thing as wasted effort. *Looks back on a 25 year career* You sure about that?
|
# ? Mar 6, 2022 22:28 |
|
Bongo Bill posted:There is no such thing as wasted effort. bullshit i put in effort while wasted all the time, just ask my scrum master
|
# ? Mar 6, 2022 23:34 |
|
None of my effort is ever wasted since I bill for all of it.
|
# ? Mar 6, 2022 23:41 |
|
ynohtna posted:I'd describe that as "finally made decisive progress on the much overdue next generation system design. Thank you, prototype, your tenure is respected. Now, off to the vivisection and refactoring plant you go." The Konmari method applied to code. You thank the code for teaching you what doesn’t work, and trash it.
|
# ? Mar 8, 2022 20:21 |
|
Oh look. There I go assuming all data coming into the app will be structured exactly the same as my test data dumped from my personal NAV setup. Nope. Can't do simple index operations on these dataframes, I have to find the relevant values in the left column of the XLSB-to-dataframe conversions and get their respective index-1 values. Python code:
|
# ? Mar 14, 2022 19:22 |
|
The documentation is actually pretty impressive in that it looks useful at first glance, only when you read it do you realize it tells you absolutely nothing.quote:# Call the superclass __init__ to initalize `self.xl_data`. Aside from this. This is just delightfully pointless.
|
# ? Mar 14, 2022 22:01 |
|
Sometimes I over document since depending on the kind of brain day I'm having, I have legitimately forgotten how to use super(). Better safe than sorry I'll post the updated class tomorrow for even more theead relevant fun. I use exec() too until I figure out a better way EDIT: I'm also aware that should the app ever be deployed company wide, outsourced IT would probably want to pore over the code. I try to let my code be self documenting but to an outside audience perhaps unfamiliar with Python, things may not be immediately apparent. D34THROW fucked around with this message at 22:51 on Mar 14, 2022 |
# ? Mar 14, 2022 22:49 |
|
The problem here is that inline documentation shouldn't be telling me what it does, it should be telling me why it does what it does, if it's not obvious, and what's surprising. I can see that you're extracting the general sheet, and the invoicing sheet, etc. No need to tell anyone. The class and function docs get a pass, since it's good to have them regardless, although in this case they're not very useful. What's more useful might be comments explaining the typical sheet structure, and why you're pointing to line 65. "This is just how it is, see /path/to/sample/sheet.xls" might be a reasonable answer, since that gives the reader an example of what the actual sheet format is and why all of this stuff lives in wildly different areas. Does the bean throbber have a value that's actually under a label "bean prober" on the sheet? Let me know that there's a known discrepancy! Come at this from the angle of someone who's never actually seen this before, and is reading it for the first time. Volmarias fucked around with this message at 23:28 on Mar 14, 2022 |
# ? Mar 14, 2022 23:24 |
|
better still, put the 65 in a named variable like "rowIndex_ContractAmount" or something and put all those variables together somewhere obvious. That will mean that if the spreadsheet changes and your code breaks, it is obvious to someone looking at it what needs to be changed.
|
# ? Mar 15, 2022 10:26 |
|
Volmarias posted:The problem here is that inline documentation shouldn't be telling me what it does, it should be telling me why it does what it does, if it's not obvious, and what's surprising. Yeah, see, I'm doing this all by myself so nobody ever taught me this. I'll keep this in mind in the future and revise the existing comment base at some point, thank you Hammerite posted:better still, put the 65 in a named variable like "rowIndex_ContractAmount" or something and put all those variables together somewhere obvious. That will mean that if the spreadsheet changes and your code breaks, it is obvious to someone looking at it what needs to be changed. I actually had to move away from this system - while the format of the XLSB files that NAV outputs is predictable, in that it will always contain at a minimum the same information, the exact location of the information can be unpredictable. I have to find it in the dataframe.
|
# ? Mar 15, 2022 14:25 |
|
I don't mind knowing that xl_data was the only dependency being met by calling super(), because now when I inevitably break this subclass by changing the superclass, I'll more quickly see what broke. Though I'd probably phrase it as # populate xl_data or similar.
|
# ? Mar 15, 2022 14:48 |
|
D34THROW posted:Yeah, see, I'm doing this all by myself so nobody ever taught me this. I'll keep this in mind in the future and revise the existing comment base at some point, thank you Understandable, and it's brave of you to post your own self taught horrors. If you want more constructive criticism post in the general programming questions thread (or the python thread or whatever).
|
# ? Mar 15, 2022 19:53 |
|
Currently reviewing code I wrote years ago when trying to make a less-fragile watch-based file upload method to SharePoint 2016, running in Compatibility Mode for 2013 , I came across this in a huge commented-out section of code I spent hours trying to debug a half decade ago (I thought it was the compatibility mode screwing me over w/ contexts)code:
things are better now
|
# ? Mar 17, 2022 03:39 |
|
Junkiebev posted:SharePoint Why is this not spoilered with a tag
|
# ? Mar 17, 2022 04:17 |
|
Volmarias posted:Why is this not spoilered with a tag Microsoft was about a half-decade in front of the curve here with all commands being executed, within contexts and how data was capable of being queried within contexts but dear loving lord, was it awkward to use and lovely in terms of DevX and stack traces for quite some time!
|
# ? Mar 17, 2022 05:21 |
|
Volmarias posted:Why is this not spoilered with a tag It's called "Coding Horrors", not "Coding Hijinks".
|
# ? Mar 17, 2022 05:21 |
|
terraform and other such things roughly are as fumbly and awkward to use as sharepoint was in 2013 yea I said it
|
# ? Mar 17, 2022 05:23 |
|
Junkiebev posted:terraform and other such things roughly are as fumbly and awkward to use as sharepoint was in 2013 Also just as impenetrable as sharepoint to people who aren't already intimately familiar with the technologies. We sold some bizarre AKS + terraform thing to a customer because the sales engineer knew how to build it, he built it and handed it off to our service desk and our service desk promptly went "what the gently caress dude we do cisco and juniper poo poo as 90% of our business". Nobody understands how this thing works and the sales people are like "that's not our problem".
|
# ? Mar 17, 2022 05:31 |
|
Kazinsal posted:Also just as impenetrable as sharepoint to people who aren't already intimately familiar with the technologies. what a time to be alive <:-]
|
# ? Mar 17, 2022 05:42 |
|
Kazinsal posted:Also just as impenetrable as sharepoint to people who aren't already intimately familiar with the technologies. My take is that terraform is a solid infrastructure as code tool but things like the kubernetes provider are just overextending the tool and suck horribly to use. The "everything's a nail" lure is strong.
|
# ? Mar 17, 2022 06:24 |
|
New Yorp New Yorp posted:My take is that terraform is a solid infrastructure as code tool but things like the kubernetes provider are just overextending the tool and suck horribly to use. The "everything's a nail" lure is strong. It's a good thing for "Cluster Operators/Admins", but wholly opaque to Users and if that's the case, do you start looking at things like Fleet to solve your problems? Chaos Reigns.
|
# ? Mar 17, 2022 06:27 |
|
Is it typical that OSS libraries want you to use Discord for support? I found an existing issue in GitHub for an issue I was encountering, so I added all my debug info to the thing as another comment (there were already a dozen). They replied to me and asked me to discuss in Discord? Seems a little weird?
|
# ? Mar 17, 2022 16:29 |
|
Protocol7 posted:Is it typical that OSS libraries want you to use Discord for support? For better or worse, Discord is the spiritual successor to IRC, which was/is definitely used as a support forum.
|
# ? Mar 17, 2022 16:39 |
|
In my stubbornness to not turn to Discord for tech support of all things I've solved my problem on my own anyway.
|
# ? Mar 17, 2022 16:42 |
Protocol7 posted:Is it typical that OSS libraries want you to use Discord for support? In the past they'd have asked you to come onto IRC or their mailing list. Some use Slack too.
|
|
# ? Mar 17, 2022 16:43 |
|
The only problem is that Discord is terrible for that because the online identity I would for the stuff like filing bug reports is not the same as the online identity I would use for shitposting about video games or whatever, and there's no way short of using the web version in an incognito tab or something of using multiple Discord accounts simultaneously.
|
# ? Mar 17, 2022 16:44 |
|
im gonna become a Matrix Chat Guy e: even though i think it doesn't solve this ^ problem either
|
# ? Mar 17, 2022 16:45 |
|
Volte posted:The only problem is that Discord is terrible for that because the online identity I would for the stuff like filing bug reports is not the same as the online identity I would use for shitposting about video games or whatever, and there's no way short of using the web version in an incognito tab or something of using multiple Discord accounts simultaneously. That was an annoyance for me for many years, they've recently updated it so you can easily switch to (up to 4?) alts. Just click your profile picture on the bottom left. Maybe not on all platforms yet, but there's some coverage here.
|
# ? Mar 17, 2022 16:49 |
|
Absurd Alhazred posted:That was an annoyance for me for many years, they've recently updated it so you can easily switch to (up to 4?) alts. Just click your profile picture on the bottom left. Maybe not on all platforms yet, but there's some coverage here.
|
# ? Mar 17, 2022 16:51 |
|
I've seen open source projects move from gitter to discord recently. Gitter is open and free, and connected to your github account. But it's very basic as a chat app so yeah I kinda understand the consideration. Discord recently added a functionality to switch between accounts in the same instance of Discord, so if you decide to use Discord and have a bunch of different accounts for this you can do so now.
|
# ? Mar 17, 2022 21:59 |
|
Discord (and other similar tools) are very good at redirecting flow of people who don't have an issue, but rather have a question (often because they didn't read the docs properly ), and pinning an issue saying "Yo, use Discord if you only have a question" stopped a ton of useless issues getting open. OTOH it is amazingly lovely for dealing with actual code issues/bugs/etc, and I would question the sanity of anyone trying to use it for that.
|
# ? Mar 18, 2022 10:37 |
|
|
# ? Jun 7, 2024 16:02 |
|
I have seen JIRA move from good for programmers to bad for programmers. I have seen Slack move from good for programmers to bad for programmers. I am having a lot of fun with Discord, mostly with videogame stuff, and sometimes I want to post some code, and don't have a problem with that. Discord is good for programmers, I would hate to see Discord become another tool aiming at .. this guy. Discord is not a FAQ or a Wiki, and I would hate that people pour the information there, because is not great at searchability. We would be put again in the early internet era and have to reinvent FAQ's again.
|
# ? Mar 18, 2022 13:10 |