首页
25 条评论
merelysounds超过 1 年前
Feature requests:<p>1. Convert leading indentation to tabs or spaces at random.<p>2. Insert trailing spaces.<p>3. Use varying indentation styles - pick at random from: <a href="https://en.wikipedia.org/wiki/Indentation_style#Overview" rel="nofollow">https://en.wikipedia.org/wiki/Indentation_style#Overview</a>
评论 #39522869 未加载
评论 #39523659 未加载
评论 #39522894 未加载
评论 #39524800 未加载
评论 #39523066 未加载
Someone超过 1 年前
The problem with this tool is that it’s too easy to revert most of its work (everything except for the case changes in identifiers, AFAICT) using a prettifier.<p>To make it robust against such adversary attacks it should incorporate the teachings of “How To Write Unmaintainable Code” (<a href="https://github.com/Droogans/unmaintainable-code">https://github.com/Droogans/unmaintainable-code</a>)
mstade超过 1 年前
I used to work with a fella that wrote code similar to this. To him, code seemed to be a scratchpad, a place to jot down ideas and try them out. Once an idea worked out, he shipped it. Done.<p>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.<p>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!
评论 #39522698 未加载
评论 #39522960 未加载
Jemm超过 1 年前
Worked with a company that outsourced their code. Contract stated that source code must be provided so in an effort to be pricks, the outsourced company provided their code on fanfold dot matrix printouts using a line printer from the 80s. It arrived in three very heavy boxes not even folded neatly.<p>This reminded me of that for some reason.
评论 #39526196 未加载
russfink超过 1 年前
I could see someone triggering a proper obfuscator (not this) as a time bomb, rendering the code in a permanent frozen feature state - usable but unmaintainable by future employees. (The contract says only to “write code to do this feature…”.) Do contracts provide legal barriers to this?
评论 #39527052 未加载
评论 #39526837 未加载
评论 #39523953 未加载
dspillett超过 1 年前
I'm sure this wouldn't make half as much difference to my code as I'd like to think…<p><i>> Random indentation for a chaotic code structure.</i><p>One to add if it isn't there already: some blocks indented by tab, some by spaces, some mixed.
epipolar超过 1 年前
Cool, now I can copy highly structured and perfectly formatted code from LLMs and make it look I hacked it all on my own last night
评论 #39522506 未加载
sverhagen超过 1 年前
>Shittier is a purely satirical project<p>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.
评论 #39522775 未加载
评论 #39535497 未加载
评论 #39522486 未加载
madeofpalk超过 1 年前
If it was deterministic - everyone on your team uses it to produce the same formatting, no matter show shitty it is - it would still meet the same goals as Prettier.
评论 #39523018 未加载
luke-stanley超过 1 年前
Perhaps this could make useful synthetic data for improving large language models improving code, because you could have two pairs of code, better code, and the terrible code. This is probably already done internally at the top AI labs.
评论 #39523003 未加载
评论 #39523053 未加载
KronisLV超过 1 年前
This reminds me of seeing others' code in the first year of university. There was a pretty basic intro to some language constructs, but for some reason the first exams were done on paper.<p>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.
评论 #39522842 未加载
dusted超过 1 年前
This looks very much like the typescript formatter we use...
ajsnigrutin超过 1 年前
Is it possible to get something like this: <a href="https://i.redd.it/as700946ez9z.jpg" rel="nofollow">https://i.redd.it/as700946ez9z.jpg</a> , but without the indents? So a flat block of code aligned to the left, and all the brackets in a column on the right?<p>...just trying to be evil... :)
评论 #39530322 未加载
评论 #39522481 未加载
评论 #39522503 未加载
评论 #39524199 未加载
评论 #39522720 未加载
stabbles超过 1 年前
In Python it should turn a list of strings<p><pre><code> ["foobar", "baz"]
</code></pre>
into<p><pre><code> [
"foo"
"bar",
"baz"
]
</code></pre>
to infuriate people further.<p>Also possible in C and C++:<p><pre><code> char * strings[] = {
"foo"
"bar",
"baz"
};</code></pre>
评论 #39523227 未加载
seritools超过 1 年前
Needs a --check that enforces a minimum number of prettier violations per 100 lines :^)
bjclark13超过 1 年前
I know this is satirical, but I would actually use this with my web development students as an exercise if it introduced more subtle shittiness that they would have to fix.
sylware超过 1 年前
Having a code generator for each and everything mandating accutely expensive dependencies (massive and complex scripting language/templating SDK) is brilliant too...
schutt超过 1 年前
Please make sure to ship this as a prebuilt .exe file.
self_awareness超过 1 年前
Not nearly as shitty as the code I have to work with
netbioserror超过 1 年前
Sometimes the nightmare is some mix of organized and chaotic. I had the responsibility of rewriting from scratch a C codebase that was deliberately obfuscated. The spacing and bracketing and general code style was almost perfect. But every name was obfuscated into nonsensical single letters and contractions, and every ostensibly simple math operation was separated into a multiline series of single stateful operations on a variable. Plus, global variables.<p>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!
logtempo超过 1 年前
for when a company want the opensource label but is too selfish to share.
agilob超过 1 年前
A reminder that spaghettify exists too <a href="https://www.spaghettify.dev/" rel="nofollow">https://www.spaghettify.dev/</a>
评论 #39522904 未加载
callamdelaney超过 1 年前
Can you make it so it takes my beautifully arranged imports and mushes them together using brackets and commas? Oh wait..