Shittier: Code formatting tool that makes your code look terrible
github.com
github.com
1. Convert leading indentation to tabs or spaces at random.
2. Insert trailing spaces.
3. Use varying indentation styles - pick at random from: https://en.wikipedia.org/wiki/Indentation_style#Overview
{
const { prop1: a, prop2: A, prop3: xTy } = obj
// …
{
const { prop1: A, prop2: xTy, prop3: a } = obj
// …
}
}
Something like that.And randomly add "-Decorator" suffix to class names.
Ages ago, I tried to diplomatically explain to our Senior Architect Grand Poobah (and my team lead) that one set of Decorators are actually Chain of Commands. And that they shouldn't be silently swallowing exceptions.
After a few minutes, he says "u/specialist, I'm surprised someone with your experience doesn't understand architecture." Then gets up and walks away.
It was horrendous to look at at first, but I’ve gotten used to it by now and just apply the same random style to whatever snippets I modify. :)
GitHub will use a file `.git-blame-ignore-revs` to allow blame to ignore commits that make those kind of changes. (This is the format used for the `--ignore-revs-file` option to `git blame`.)
function Make_List(firstString, second_string, chThirdString) {
var a = [firstString, second_string, chThirdString];
return a;
}Minify every third variable randomly.
So, Go?
To make it robust against such adversary attacks it should incorporate the teachings of “How To Write Unmaintainable Code” (https://github.com/Droogans/unmaintainable-code)
Impossible to maintain, but damn if he couldn't churn out some quality works. Bug laden, sure, but the core ideas were great – at times even brilliant. There was a certain beauty to the chaos.
Prettier wasn't around then, and code for matters weren't much of a thing at all really. Can't help but think if that would've helped or stymied his process. Certainly would've helped the rest of us though!
That doesn’t sound like quality work.
I’ve had colleagues like that, they’re a pain in the ass because they look productive at the cost of everyone else holding the bag, and while they’re useful for exploratory or prototypal work it can be difficult to make the stakeholder understand that no the bug-ridden mess with an injection per SQL query is not going into production ever.
I’ve wondered if forcing them to use a very restrictive langage could help channel the mess somewhat.
Why do you bother saving the stakeholder from themselves?
Unfortunately we’re living in a world where the doors are coming off airplanes mid flight.
StyleCop in C# (and ESLint/Prettier to a lesser extent in JS land) works extremely well for this. It's very quick to red squiggle your style problems when you're writing, can often automatically fix the problem, and keeps everyone committing code that looks one way.
It drove me nuts when I started doing work in a team, but I got used to it quick and we rarely bikeshed now.
This reminded me of that for some reason.
> Random indentation for a chaotic code structure.
One to add if it isn't there already: some blocks indented by tab, some by spaces, some mixed.
And yet, I'm sure some folks will find serious applications, like in cases of malicious compliance when having to share your code against your will.
Like allowing an application to use several different caching / database setups depending on values in property files.
Java / Spring has so much potential.
Howerver the main idea is very interesting.
People wrote everything without indentation, or with inconsistent spacing. Somehow this also carried over to the code that they'd write in the computer, so it was pretty much unreadable, since you couldn't glance at a block of nested loops and realize what goes where.
...just trying to be evil... :)
But seriously, if anyone is to maintain code like this, this will force the lowest possible cyclomatic complexity.
["foobar", "baz"]
into [
"foo"
"bar",
"baz"
]
to infuriate people further.Also possible in C and C++:
char * strings[] = {
"foo"
"bar",
"baz"
};What is this internet law about not knowing satire from "lunatics" called now again ...
printf( "count=%i"
"failed=%i"
"busy=%i"
"reqs=%i"
"rsp=%i",
count,
failed,
busy,
reqs,
rsp);Surprised I managed to do it at all, but it was circumstantial evidence for what each operation did that helped immensely, plus a few logical and mathematical lightbulb moments. Rewriting it in Nim has also helped me make it well-organized and self-documenting. I have a document full of pseudocode but it looks basically exactly the same as the Nim code!