"JSON supports strings, therefore JSON supports comments"
Also, Stack Overflow finally discovered how to convert binary numbers to decimal.
“JSON supports strings, therefore JSON supports comments”
So I suppose an example could look like this:
{
"dataField_": "this is a comment about dataField",
"dataField": "value"
}
On its own, this is just a moderately cursed hack. If someone whose job requires them to understand JSON files came across this in their code base, they would probably think that it’s some cruel joke, or a sign that it’s time to clock off for the day.
But what I think is actually interesting about people’s collective horror over this post is that it signals towards some shared etiquette, or social conditioning between developers. There’s things that we do and things that we don’t do, and sometimes we can’t even say exactly why. I was outraged by the JSON comment even before I took a couple minutes to actually think about why it’s a bad practice, and I get similar moments in my own life when I just know that I’m writing Bad Code, even if I don’t yet know why. I imagine that it’s a response that gets built up over multiple years of debugging shitty hacks. Maybe this is another reason why learning to code can be so terrifying for beginners, because you don’t yet have that sense for whether or not what you’re doing will catastrophically crash and burn later.
I was curious about whether or not other developers get this “shit code vibe”, and the responses were fairly affirmative:
Some people have pointed out that this is what a code smell is, which I think is right, but I’m talking less about the code itself and more about our collective ability to sense when it’s bad. I think this has more to do with operant conditioning by software bugs than it does with understanding design patterns. Is there a certain point in people’s careers where this starts? The Collective Consciousness Theory of Shitty Code needs more work. Anyway, please don’t put “comments” in your JSON code.
A good post
So, about VSinder…
In the latest trend of Ben Award ruining VSCode, there’s now a Tinder for developers. We all knew this was bound to happen eventually.
I signed up to check it out, and as you can expect, it’s completely full of very horny and very depressed tech dudes. I think I swiped for a solid few minutes before I saw a single woman. Either way, the app is exactly what I expected, so it gets a 10/10.
So far I’ve received 37 likes. I don’t know if that’s a lot. But if you did swipe on me, sorry! I’m too emotionally stunted to actually date.
Trans router
Trans router.
We finally discovered a way to convert binary to decimal
Have you ever needed to convert a binary number into a decimal number, but ended up abandoning the project instead because it was impossible? Many developers have faced this issue. But finally, the fine denizens of Stack Overflow have discovered a solution.
Now whenever I want to convert 00100000 to 32, I’ll just train a logical regression model. Thanks Stack Overflow!
Posts
Twitter: https://twitter.com/ctrlshifti
Tip jar: https://ko-fi.com/cainmaddox
Any typos in the above post are caused by bit flips and are not my fault.
Came for insight. Left with strong exhales through my nostrils. Thanks Kat this is my first exposure to your blog and I love it!
Content was very good. Thank you.