|
Corla Plankun posted:if you cant articulate them they're not questions they're just pointless anxiety hth don't patronize me, I may be a testing noob but I know the data domain really well regarding file paths, I won't bore you with details, just read this pretty comprehensive article: https://googleprojectzero.blogspot.com/2016/02/the-definitive-guide-on-win32-to-nt.html (tldr: the syntax of Win32 paths defies formalization or normalization). also never ever loving use wcsicmp to compare two file paths, not even in the "C" locale (sloppy path normalization/comparison is the least of this code's problems though as I'm like 90% sure, from what I've seen, that I can craft a filename that injects a DROP TABLE and completely and silently breaks everything ) do you trust your IPv4 address parser? does it only accept the canonical syntax with three dots, or does it also accept the two, one and zero dot BSD-style variants? do your tests account for it? even something as innocuous as parsing a number is fraught with peril. if you use humble strtoul/wcstoul, you're silently allowing whitespace, '+', '-', leading zeroes and potentially trailing garbage in your syntax, at best making your data representation ambiguous maybe I know too much about anomalies and too little about their effective exploitability for my own good. like, I know that ambiguities are bad in general, but I'm loathe to figure out if they're relevant to my case. hell, I don't want to think about it, I want to punch numbers in computer and let it figure it out hackbunny fucked around with this message at 22:27 on Mar 9, 2019 |
# ? Mar 9, 2019 22:24 |
|
|
# ? Apr 25, 2024 20:32 |
|
the problem isn't that I don't know where to start with writing tests but that I don't know where to stop. and code freeze is coming up
|
# ? Mar 9, 2019 22:40 |
|
Maybe look into boundary testing and equivalence partitioning? There's also CFG, Metamorphic, and so on but I don't really know your use case and also I'd have to check my notes to see what the hell was what
|
# ? Mar 9, 2019 23:04 |
|
hackbunny posted:windows hell at this point i half wonder if you wouldn't get better results from fuzzing and creating manual cases from things the fuzzer finds instead of trying to handcraft more tests around ...that pr chat: we have it set up so that pr's need at least two reviewers, and one of them has to be a senior from the relevant area. works pretty well for us so far. i do like the idea of enforcing that juniors are involved too, might suggest it Night Shade fucked around with this message at 00:10 on Mar 10, 2019 |
# ? Mar 10, 2019 00:07 |
|
i'm programming in go and the reason this language frustrates me so much is that it would be good if it werent for the dumb stuff that i have nothing new to say abouti. if it had a repl it would make a great plang. with a repl+needed features it would be a the ultimate plang.
|
# ? Mar 10, 2019 00:41 |
|
if you're not already using them, I strongly recommend switching to go modules so you don't have to clone your project into ~/src/go/github.com/my_org/my_project/src/go or whatever that bullshit is
|
# ? Mar 10, 2019 00:47 |
I've been learning kotlin lately and I like it
|
|
# ? Mar 10, 2019 01:04 |
|
Night Shade posted:at this point i half wonder if you wouldn't get better results from fuzzing and creating manual cases from things the fuzzer finds instead of trying to handcraft more tests around ...that you know, thinking about it, I think I'll simply define a subset of the syntax and only accept inputs that are already normalized, maybe flag as suspicious any inputs that don't match. seems safer as I believe I mentioned, I'm implementing a noise-reduction whitelist for an event logger; event fields that can be matched by the whitelist are things like paths, ip addresses, domain names, etc. now, false negatives are relatively benign, the backend will just have to deal with more noise than expected. users would also have immediate feedback that something's wrong, and fix their rules (or open a support ticket if the rules are fine but my implementation is buggy). false positives, ie whitelisting the wrong events, would be disastrous, so strictness would actually be good: the less I catch, the better now, user-defined whitelisting rules are one input. the other input to the system is the stream of events itself, which comes from the aforementioned kernel driver. it receives (partially) pre-normalized paths from the OS, and it only deals with the registry and disk filesystems, so insane special cases like named pipes, where a filename can contain a backslash, don't apply. so I generally don't have to worry about weird inputs from that side... if we ignore "normal weirdness" like the fact that invalid unicode (undefined codepoints, unpaired surrogates, etc.) is valid in filenames, or the ntfs syntax for accessing alternate data streams and/or named attributes. but since the product is, at its core, an anomaly detector, I can simply flag anomalies as... anomalous, instead of going insane trying to normalize the unnormalizable. the ball would then be in the court of backend developers and data scientists
|
# ? Mar 10, 2019 01:27 |
|
c autism status: it’s 1:45 am and I’m compulsively coding again but this time it’s actually fun because I’m writing my own terrible scripting language sad that every existing scripting language manages to make itself unsuitable by doing at least one of: - disappearing into a cloud of dsl farts - being so dynamic that it’s impossible to have any kind of useful member completion - forgetting what scripting languages are for and trying to be suitable for large scale programs and becoming a nightmare to integrate with an existing application - being lua but hey writing parsers is fun so maybe it’s good that I couldn’t find anything existing I could use?
|
# ? Mar 10, 2019 02:47 |
|
Soricidus posted:writing parsers is fun lol
|
# ? Mar 10, 2019 02:55 |
|
PokeJoe posted:I've been learning kotlin lately and I like it google ‘kotlin platform types’ before it’s too late
|
# ? Mar 10, 2019 03:50 |
|
kotlin owns
|
# ? Mar 10, 2019 05:02 |
|
TheFluff posted:listening to music harms concentration and i have no idea why everyone insists on doing it while coding. maybe for you but for me it's hard to focus without music.
|
# ? Mar 10, 2019 05:41 |
|
hackbunny posted:so one the one hand I'm mostly writing the tests for my future self, on the other hand I want them to be more than that, but I might be overdoing it. on the other, other hand, I've already caught several bugs writing tests for your future self is good and useful and it has saved my rear end before having already caught bugs with your tests means that they’ve already basically paid for themselves too go you
|
# ? Mar 10, 2019 06:04 |
the talent deficit posted:google ‘kotlin platform types’ before it’s too late i know about these, i've been writing production code in kotlin tacked on to a java android app. i just don't consider myself particularly good at it yet. CRIP EATIN BREAD posted:kotlin owns it's conciseness has really improved our code review time compared to java
|
|
# ? Mar 10, 2019 06:42 |
|
aardvaard posted:maybe for you but for me it's hard to focus without music. for me anything with lyrics is super distracting but instrumentals are great, particularly through a good set of noise cancelling headphones but i'm not really listening to it so much as having it be background noise instead of the office chatter, which is also super distracting
|
# ? Mar 10, 2019 08:07 |
yeah my best focus zone is just natural quiet of my home. i will sometimes play music at work, but it will be one of those newly popular “low-fi jazz/hiphop beats” things that drowns out office chatter without particularly drawing attention to itself
|
|
# ? Mar 10, 2019 08:42 |
|
aardvaard posted:maybe for you but for me it's hard to focus without music. Currently enjoying listening to this guy's mixes while this plays more quietly in another tab https://www.youtube.com/watch?v=Qo4JIT8jMtI
|
# ? Mar 10, 2019 10:31 |
cinci zoo sniper posted:yeah my best focus zone is just natural quiet of my home. i will sometimes play music at work, but it will be one of those newly popular “low-fi jazz/hiphop beats” things that drowns out office chatter without particularly drawing attention to itself same on both counts. no idea why 100% of these streams video is some anime laying in bed though
|
|
# ? Mar 10, 2019 10:45 |
|
One of the more annoying part of web scraping an API is all the stuff where I'm not sure what it means, but maybe I'll find out if save it anyway after running the statewide or national scan for store locations using cached responses, like 'curbside': 'Y' in the JSON. There's a 'mobile': 'Y' which might be 'On-the-Go Mobile Ordering' but there's also a 'adv_ord': 'Y' which might also be 'On-the-Go Mobile Ordering'. There's also loyalty: 'Y' which I'd guess to be the same thing as dunkincardenabled: 'Y'. A lot of this stuff doesn't look like it's even used in the website's store locator GUI. I'll figure it out eventually. It'll probably take a few more hours, though. Right now my dad is outside in a wheelchair smoking and I'm going to need to wheel him back in, and I'll wait until I can concentrate more
|
# ? Mar 10, 2019 11:00 |
|
cinci zoo sniper posted:yeah my best focus zone is just natural quiet of my home. i will sometimes play music at work, but it will be one of those newly popular “low-fi jazz/hiphop beats” things that drowns out office chatter without particularly drawing attention to itself i think someone posted this in another thread but someone has made a data center noise generator which is pretty good at making a really benign hum to drown out open plan office hell without being distracting https://mynoise.net/NoiseMachines/dataCenterNoiseGenerator.php
|
# ? Mar 10, 2019 11:42 |
PokeJoe posted:same on both counts. no idea why 100% of these streams video is some anime laying in bed though it’s because the recent popularity surge of the genre is something high schoolers/college extremely internet crowd are responsible for, which makes shaded circle when you plot a venn diagram against anime weaboo population Penisface posted:i think someone posted this in another thread but someone has made a data center noise generator which is pretty good at making a really benign hum to drown out open plan office hell without being distracting might try this one, i usually do flavour of the week rain noises when i want a noise generator per se. sadly, i do in general just suffer office noise for the most of it, since our office is small and im in managerialish position, with all the consequences wrt the frequency of people wanting something from me
|
|
# ? Mar 10, 2019 12:25 |
|
lol if you aren't listening to thumping techno beats 24/7 to drown your internal worries that you don't know what you are doing
|
# ? Mar 10, 2019 12:45 |
|
gently caress any noise. i would literally choose to work in a sensory deprivation chamber if i could persuade my employer to build one. admittedly that's mostly because my brain is broken tho
|
# ? Mar 10, 2019 12:49 |
|
Powerful Two-Hander posted:lol if you aren't listening to thumping techno beats 24/7 to drown your internal worries that you don't know what you are doing
|
# ? Mar 10, 2019 12:56 |
Powerful Two-Hander posted:lol if you aren't listening to thumping techno beats 24/7 to drown your internal worries that you don't know what you are doing i listen to all sorts of dnb/edm type music and it all leaves me too distracted from working, im just staring at the monitor while i think “drat, that’s a sick drop. let’s google if this artist had more stuff” Soricidus posted:gently caress any noise. i would literally choose to work in a sensory deprivation chamber if i could persuade my employer to build one. admittedly that's mostly because my brain is broken tho i saw a cool demo at local steelcase dealership, they make portable cabins like that. subdued ceiling light, sound-proof door, and a bench with shelf for one person to sit and place laptop on - all interior is some matte black velvet type thing
|
|
# ? Mar 10, 2019 13:07 |
|
cinci zoo sniper posted:i saw a cool demo at local steelcase dealership, they make portable cabins like that. subdued ceiling light, sound-proof door, and a bench with shelf for one person to sit and place laptop on - all interior is some matte black velvet type thing they sell those for east asian kids for studying, it's a thing but somewhat hard to google. I'm guessing it would work okay for programming?
|
# ? Mar 10, 2019 15:08 |
Private Speech posted:they sell those for east asian kids for studying, it's a thing but somewhat hard to google. I'm guessing it would work okay for programming? the one i “test drove” (test sat???) would be okay for coding in hourly increments, provided your laptop is the only thing you need to work. it’s meant to be a conference call booth for open office spaces, so there’s nothing for long term comfort in it (also, airplane-tier legroom)
|
|
# ? Mar 10, 2019 15:16 |
|
cinci zoo sniper posted:the one i “test drove” (test sat???) would be okay for coding in hourly increments, provided your laptop is the only thing you need to work. it’s meant to be a conference call booth for open office spaces, so there’s nothing for long term comfort in it (also, airplane-tier legroom) here's the one I've seen before, maybe it's a bit bigger I'm not sure from you description, it has a few bookshelves and lights and such
|
# ? Mar 10, 2019 21:54 |
|
toiletbrush posted:tbf the loudest and most idiotic jump-up dnb I can find is my second choice for coding music this but also techno at insane bpms and small doses liquid dnb is good too but everything in moderation
|
# ? Mar 10, 2019 22:06 |
Private Speech posted:here's the one I've seen before, maybe it's a bit bigger I'm not sure from you description, it has a few bookshelves and lights and such https://www.ocs-steelcase.nl/en/framery-phonebooth-o I was either in this one or something nearly identical
|
|
# ? Mar 10, 2019 22:06 |
|
cinci zoo sniper posted:https://www.ocs-steelcase.nl/en/framery-phonebooth-o I was either in this one or something nearly identical ahh okay yeah that's tiny now that I think about it my university had similar soundproof booths for students to do group work/programming in, they were pretty great e: also Frankfurt airport has these "silent chairs" (demonstration robot not included), but I can't remember if you can close them completely I think I did type out some code there while waiting for a plane connection once e2: pinterest has a huge amount of booths like that Private Speech fucked around with this message at 22:26 on Mar 10, 2019 |
# ? Mar 10, 2019 22:09 |
i don't think i would like working in the quiet porta potty
|
|
# ? Mar 10, 2019 22:16 |
|
cinci zoo sniper posted:https://www.ocs-steelcase.nl/en/framery-phonebooth-o I was either in this one or something nearly identical ugh that website. god forbid they just have clear pictures of the product that you can see, nope gotta make it all moving and zooming all the time and weird angles and closeups and poo poo. i managed 15 seconds before i had to close the tab because it was making me seasick
|
# ? Mar 10, 2019 23:12 |
|
gonadic io posted:if you're not already using them, I strongly recommend switching to go modules so you don't have to clone your project into ~/src/go/github.com/my_org/my_project/src/go or whatever that bullshit is i hadn't tried them yet but i just did and holy poo poo from a usability perspective this is so much better.
|
# ? Mar 10, 2019 23:51 |
|
DONT THREAD ON ME posted:i hadn't tried them yet but i just did and holy poo poo from a usability perspective this is so much better. if by "much better" you mean "approaching usable" then yes. the vscode integration is good too. it kind of feels like a more annoying/limited but faster python now
|
# ? Mar 11, 2019 00:03 |
|
cinci zoo sniper posted:i listen to all sorts of dnb/edm type music and it all leaves me too distracted from working, im just staring at the monitor while i think “drat, that’s a sick drop. let’s google if this artist had more stuff” actually if I'm honest my go to is actually 3 hour long gently caress/disco mixes off soundcloud and it oooowwwnnnnss for getting work done
|
# ? Mar 11, 2019 01:16 |
|
Powerful Two-Hander posted:actually if I'm honest my go to is actually 3 hour long gently caress/disco mixes off soundcloud and it oooowwwnnnnss for getting work done Interesting choice but whatever helps. Personally I just get horny waiting for my builds to finish
|
# ? Mar 11, 2019 01:27 |
|
gently caress r.e. my previous story of using a logging library (monolog, PHP) to generate statefully held html to output back to page. Today I found out that there was a monkey patched property being attached to the logger class, a property called "max_debug". It was used something like this: PHP code:
Putting aside the questionable sanity of having a logger collect html for output, Basically everybody knows you can have various output levels for logger classes (i.e. warning, info, debug). Instead of using info for info and debug for debug, this code uses debug for EVERYTHING and the monkey patched Boolean flag is there to represent a custom level lower than debug.
|
# ? Mar 11, 2019 04:18 |
|
|
# ? Apr 25, 2024 20:32 |
|
I’m sorry this is happening to you, but I’m not sorry I get to read about it here also, just today I was considering logging everything at one level because the console app won’t show you debug or info messages from the iOS simulator no matter what you do gives a whole new meaning to "unified logging". more like unified level logging! boom gotem never thought of the monkeypatched trace level though, that’s pretty clever
|
# ? Mar 11, 2019 04:48 |