>While I’m not a QA or security professional, I have developed a knack for doing “stupid” things with software which causes it to malfunction. A person after my own heart. I've had many a dev go "why would you do that" In which I answer "it doesn't matter, but if you accept my input it's your job to ensure the app doesn't crash"
A favourite technique of one of my colleague's was just to mash the keyboard randomly to see if the app breaks. It's very crude and not at all foolproof. For the lack of sophistication it's shockingly effective at highlighting a huge amount of assumptions we make about how software is / can be used.
Null
41–50 of 196 posts
Re: Null
#42I worked on an API that regularly got requests from the mobile app for GET /users/(null). I think that's Swift, or Obj-C's way of to-string'ing a null? I have a generational suffix on my name. I often include it, and quite often as the proper Unicode character, e.g., "Ⅲ". (Assuming HN displays it after I post this, try to select it; that's one character.) That wreaks a fair bit of havoc. When I was in high-school, I…
FWIW macOS is perfectly fine with it. The FS (both HFS+ and APFS) can be configured to work in CI or CS modes. The default is CI. Since git uses the FS for part of its data storage, things break.
That’s more of an issue with Git not supporting CI FS, really.
Re: Null
#43>While I’m not a QA or security professional, I have developed a knack for doing “stupid” things with software which causes it to malfunction. A person after my own heart. I've had many a dev go "why would you do that" In which I answer "it doesn't matter, but if you accept my input it's your job to ensure the app doesn't crash"
Why do you require software to be more resilient than other things? If I pour water in the gastank of my car, it will also fail to drive. Or gas in the sprinkler tank. So the car should somehow prevent the enduser putting the wrong thing in the tank?
I'm confused why the parent comment is being downvoted. It's a valid question. It might sound naïve to some but it's still worth discussing.
Re: Null
#44Earlier quoted context omitted.
That’s how C usually prints it. Swift will print “nil”.
Huh. I feel like I distinctly remember it being both one of our mobile clients, and it being the string "(null)". Java, perhaps? (That was our Android app, of course.) Although we did have a desktop app (weirdly) and that was in C++.
Objective-C will do that with the format string "%@" if you pass it nil.
Re: Null
#45Reminds me of https://www.wired.com/2015/11/null/ Numerous cases of encoding out of band data as a special case of in-band data.
My browser is set to not accept cookies from sites I don't have a relationship with, because … well, frankly, I don't know why the rest of y'all still let shady people on the Internet use your hard disk for their ad tracking. So, that link (like so many), just plain doesn't work. It just loads a white screen. There are many sites like this on the Internet. Twitter waffles between working and "Ooops! something went wr…
Seems dumb not to use local storage (possibly with a cookies fallback though I wouldn’t even bother).
You can also disable LS, but I don’t know that that’s possible on a per-site basis so it’s an unlikely configuration (and you can fallback same as if cookies were disabled, probably).
Re: Null
#46What is a snap in this context?
Re: Null
#47> A year or so ago, at a company sprint I gave a lightning talk in which I wanted to make the tiniest possible snap What is a snap in this context?
Re: Null
#48> A year or so ago, at a company sprint I gave a lightning talk in which I wanted to make the tiniest possible snap What is a snap in this context?
Re: Null
#49Earlier quoted context omitted.
Why do you require software to be more resilient than other things? If I pour water in the gastank of my car, it will also fail to drive. Or gas in the sprinkler tank. So the car should somehow prevent the enduser putting the wrong thing in the tank?
> Why do you require software to be more resilient than other things? Because software by virtue of not requiring physical access is much easier for bad actors to mess with. Abuse of such also seems to be classified very differently than abuse of physical systems by human brains e.g. almost no rando would think of putting sugar in your gas tank while walking near your car, but nobody blinks at fucking with your input…
Re: Null
#50Declarative programming is something that helps deal with weird edge cases like this right? I'm learning Elixir currently and the subtle semantics around the 'traditional' assignment operator (=) are quite cool. It means you can ditch most if blocks and provide a list of pattern-matchable functions (matched on their arity) to define logic which helps deal with edge cases a little better. I'm curious how such a declar…
I don’t see how a string “null” would break anything besides a very stupidly written program (e.g., one which tries to eval() the input) or an ordinary program written in a very stupid language (e.g., one which tries to coerce strings to other types—PHP, is that you?). I’m a big fan of pattern matching (especially statically verified pattern matching so sorry elixir), but I don’t see how it would help here.