bleistift2

@bleistift2@sopuli.xyz
2 Post – 29 Comments
Joined 1 months ago

Or even funnier: It gets parsed in octal, which does yield a valid zip code. Good luck finding that.

11 more...

I’ve also never seen any piece of software that would treat a single leading zero as octal

I thought JavaScript did that, but it turns out it doesn’t. I thought Java did that, but it turns out it doesn’t. Python did it until version 2.7: https://docs.python.org/2.7/library/functions.html#int. C still does it: https://en.cppreference.com/w/c/string/byte/strtol

I refuse to validate data that comes from the backend I specifically develop against.

Yes, I know the field isn’t nullable in the database. I’m asking you what you are sending me, jack——

(Directed at a colleague)

the rule is flagging a false negative

false positive?

I’m not sure if you’re getting it, so I’ll explain just in case.

In computer science a few conventions have emerged on how numbers should be interpreted, depending on how they start:

  • decimal (the usual system with digits from 0 to 9): no prefix
  • binary (digits 0 and 1): prefix 0b, so 0b1001110
  • octal (digits 0 through 7): prefix 0, so 0116
  • hexadecimal (digits 0 through 9 and then A through E): prefix 0x, so 0x8E

If your zip code starts with 9, it won’t be interpreted as octal. You’re fine.

5 more...

I wouldn’t have thought that content suitable for talesfromtechsupport would be acceptable here. As the description says,

This is a place where you can post jokes, memes, humor, etc. related to programming!

Customer support is not usually related to programming.

they also pay 3000$/mo for a moldy apartment

I’m sad that there are people who call themselves developers who need to be told this.

Hell, no. If I wanted to save bytes, I’d use a binary format, or just fucking zip the JSON. Looking at a request-response pair and quickly understanding the transferred data is invaluable.

Somehow I can tell that this story didn’t go down in the US.

PHP and Node definitely do.

Node doesn’t.

> parseInt('077')
77
  1. If the input string, with leading whitespace and possible +/- signs removed, begins with 0x or 0X (a zero, followed by lowercase or uppercase X), radix is assumed to be 16 and the rest of the string is parsed as a hexadecimal number.
  2. If the input string begins with any other value, the radix is 10 (decimal).

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/parseInt

Hey, IT, I imported this data set twice, and now there are a lot of duplicates. Is there something wrong with the tool?

– Yes, that happened.

1 more...

In my experience it’s the other way around.

1 more...

For those who don’t know:

Speaking at a software conference in 2009, Tony Hoare hyperbolically apologized for "inventing" the null reference:[26] [27]

I call it my billion-dollar mistake. It was the invention of the null reference in 1965. At that time, I was designing the first comprehensive type system for references in an object oriented language (ALGOL W). My goal was to ensure that all use of references should be absolutely safe, with checking performed automatically by the compiler. But I couldn't resist the temptation to put in a null reference, simply because it was so easy to implement. This has led to innumerable errors, vulnerabilities, and system crashes, which have probably caused a billion dollars of pain and damage in the last forty years.

https://en.wikipedia.org/wiki/Tony_Hoare

Sure, Java can tell the difference. But that doesn’t mean that the guy writing the API cares whether or not he adds a key to the dictionary before yeeting it to the client.

Speaking of rate limits: Github recently blocked me because I went over a ‘secondary rate limit’ by visiting the site for the first time in a month. Has anybody experienced this?

Chocolate production is infested with slave labor, child labor and child slave labor.

https://www.youtube.com/watch?v=FwHMDjc7qJ8

14 more...

I’m amazed that no-one has complained that the graph’s data points are on the borders between categories rather than inside the category bars.

With that out of the way: WTF is wrong with that graph?

1 more...

I used to think that at least the parts that are Fairtrade wouldn’t be affected as much.

For long hair it helps with combing. Just like the old silicone spray for ballpoint mice, it reduces friction with the comb.

Is an alternative spelling to extroversion and more close to the original Latin root.

Start servicing millions of users. Then we’ll talk.

The Wall

The Berlin Wall? Pink Floyd’s The Wall? The US-Mexico border wall? More details, please.

1 more...

I’m not saying WalMart wouldn’t do this on purpose (because I have never interacted with them), I can tell you as a software developer that’s it’s entirely possible for a single functionality of an app to malfunction while everything else works.

Never attribute to malice that which is adequately explained by stupidity.

https://en.wikipedia.org/wiki/Hanlon's_razor

Thanks, that’s enough details.

The libraries underneath will still allow nonsense at runtime

Only if you use a badly written library. Most libraries have types provided by DefinitelyTyped. Those who don’t are (in my experience) so tiny that you probably aren’t using them; or, if you really wanted, can check yourself.

In the end, if you encounter a bug, it’ still 99% of the time not a library’s fault, even if it’s written in plain JS.

If I can control my fans and my GPU in Linux the way I can in Windows I will.

1 more...

I’ve seen this guy referenced twice today. If only he knew how to write instead of giving talks…