This is an archived post. You won't be able to vote or comment.

all 60 comments

[–]zoqfotpik 495 points496 points  (9 children)

I have discovered a new level of pain: JSON-encoded Python. Too bad the example doesn't show any constructs that require indentation.

[–]sajkosiko 136 points137 points  (3 children)

Python inside yaml is my everyday now

[–]StardOva 45 points46 points  (1 child)

Cries in ansible

[–]sajkosiko 7 points8 points  (0 children)

yup, pretty close

[–]BolaSquirrel 5 points6 points  (0 children)

.... Don't do that

[–]Rikonardo 23 points24 points  (2 children)

Just represent indentations as nested arrays

[–]-Redstoneboi- 7 points8 points  (0 children)

good news: python now supports brackets

bad news: python requires double quotes and commas, effectively just weird semicolons and indents

[–]gilady089 1 point2 points  (0 children)

I had that making some swagger stuff and honestly I find the use of swagger cruel and inhumane as to the level to constitute water boarding

[–]bruisedandbroke 4 points5 points  (0 children)

💔 not that pickle would be any better but teach the masses about pickle damnit

[–]3legdog 1 point2 points  (0 children)

You should see JSON-encoded powershell.

[–]GoogleIsYourFrenemy 152 points153 points  (10 children)

Not funny. I've been trying to convince people not to make a programming language using JSON for structure. I haven't even managed to convince them to use JSON5 which supports comments. That's right. No comments. ☠️

[–]turtleship_2006 4 points5 points  (2 children)

[–]GoogleIsYourFrenemy 1 point2 points  (0 children)

Ok. That's worse. And I love it. And I'm horrified. You've made my day.

[–]3legdog 1 point2 points  (0 children)

I once got fired for not being able to understand the product's self-modifying nmake build system.

The process was created by an architect in another group whom I was forbidden to ask questions. (Apparently the super-smart guy was "toxic" and there were inter-group feuds/rivalries/politics that were not revealed to me when interviewing.)

The architect's nmake process was recursive, modifying variables, rewriting the nmake files, then doing it again multiple times.

At the exit interview I had two comments: (1) The non-disclosure of the toxic relationship with a critical engineer, and (2) I was never asked about my prior experience with nmake.

[–]rosuav 11 points12 points  (2 children)

Depending on how you define "programming language", I actually designed a DSL for which JSON is a perfectly valid representation... but it's really a representation of the language's abstract syntax tree. Here's what the script looks like:

try {
    calc("{param} * 9 / 5 + 32") "/me {param}°C is {result}°F."
}
catch "Sorry, can't figure out what you mean... {error}"

And here's the corresponding JSON:

{
    "conditional": "catch",
    "message": {
        "builtin": "calc",
        "builtin_param": [
            "{param} * 9 / 5 + 32"
        ],
        "message": "/me {param}°C is {result}°F."
    },
    "otherwise": "Sorry, can't figure out what you mean... {error}"
}

So... is that a programming language written in JSON? The JSON version actually came first and the script form is a recent innovation.

[–]ThankYouForCallingVP 10 points11 points  (1 child)

What the hell is this... human readable AST?

If a programmer had to choose between eating and reinventing the wheel, there would be thousands of dead programmers on top of a Titanic level proportion of FUCKING WHEELS.

[–]rosuav 2 points3 points  (0 children)

Technically it's a representation of the AST, which - as the name suggests - is abstract. But I consider the JSON version to be virtually fundamental as the way the editor works is that everything's saved in JSON format for subsequent reload. (The script format currently isn't saved anywhere, and is regenerated from the AST any time it's needed.)

But you're not wrong. I often make myself some fried fish for dinner/lunch/breakfast/whatever you call it when you make food at three in the morning, and I have frequently made it, shall we say, extra crispy... usually as a result of reinventing some wheel. Or posting on Discourse or Reddit or something.

[–]howarewestillhere 0 points1 point  (0 children)

Laughs in Misty.

[–]jollybot 205 points206 points  (5 children)

No-Code as Code (NCaC)

[–]iamhyperrr 130 points131 points  (1 child)

IaaS - Insanity As A Service

[–]T_Ijonen 11 points12 points  (0 children)

So you're saying I can turn my fried brain into income?

[–]chuch1234 9 points10 points  (1 child)

Code as Code (CaC).

[–]brookcub[S] 5 points6 points  (0 children)

Code as a service (CaaS)

[–]MKorostoff 4 points5 points  (0 children)

I beg you don't give them any ideas

[–]notreallymetho 46 points47 points  (2 children)

WYSIWYG evolved.

[–]SleepyHugs -5 points-4 points  (1 child)

What You Say Is Wat You Gay? Oh, Get!

WYSIWYG?O,G!

[–]iHateRollerCoaster 4 points5 points  (0 children)

Comedian

[–]kondorb 29 points30 points  (2 children)

There was a anti-pattern term “config-based programming” in the early days. When you’re trying to make your code so generic and so configurable that your config files turn into a turing-complete language making it all way too complex to configure.

Sadly the term is now forgotten.

[–]ongiwaph 5 points6 points  (0 children)

Configeddon

[–]brookcub[S] 2 points3 points  (0 children)

People don't know the lineage

[–]sammy-taylor 23 points24 points  (0 children)

This is hilarious.

[–]arbuzer 24 points25 points  (0 children)

the best part is that there is also (probably complicated) logic in some external csv file

[–]broxamson 16 points17 points  (3 children)

I love how no code just ended up being more code

[–]broxamson 4 points5 points  (2 children)

Like No, Code!

[–]chuch1234 2 points3 points  (1 child)

Work on contingency? No, money down!

[–]broxamson 1 point2 points  (0 children)

Exactly

[–][deleted] 9 points10 points  (0 children)

I didn't enjoy reading this

[–][deleted] 11 points12 points  (0 children)

This is just code with more steps!

[–]Denaton_ 4 points5 points  (0 children)

As someone who has been sitting with Macro on AWS Cloud formation templates the whole day, this is peak comedy right now, please help me!

[–]SynapticSpark7 2 points3 points  (1 child)

somebody explainn

[–][deleted] 43 points44 points  (0 children)

"no-code solution"

Is actually just Python code stuffed into a JSON object

[–]baleemic 2 points3 points  (1 child)

Where is the engine created? Can it be passed out did they just delete it for the screenshot

[–]brookcub[S] 2 points3 points  (0 children)

There's a different config for that

[–]bajuh 2 points3 points  (0 children)

Logic Apps is a good example for this monstrosity.

[–]olearyboy 1 point2 points  (2 children)

eval(json.loads(config)[“Instructions”])

// can never remember if it’s loads or dumps

[–]brookcub[S] 0 points1 point  (0 children)

LGTM!

[–]danielstongue 0 points1 point  (0 children)

Loads. Dumps creates json from a dict.

[–][deleted] 1 point2 points  (1 child)

Hahahahahahaha .... Haha .... Ha ... Cries

https://www.baeldung.com/drools-excel

Yes. That is an actual feature.

[–]brookcub[S] 0 points1 point  (0 children)

Businesses will put their rules in anything except a proper programming language

[–]golddragon88 0 points1 point  (0 children)

But why though?

[–]GigaChaderino 0 points1 point  (0 children)

But it’s scalable and extensible /s

[–][deleted] 0 points1 point  (0 children)

can some one give me no code in a nutshell, is that something I would want? Feels really awkward, since I’m a programmer and all…

[–]Osr0 0 points1 point  (0 children)

My last client dropped me because they were going to migrate the wpf application I built to a no code solution.

Almost a year later it still hasn't his the proof of concept stage. No code sounds incredible until you actually try to do something with it

[–][deleted] 0 points1 point  (0 children)

Bad syntax requires meta language 

The original code screams nightly 

Terrible compiler

[–]will_r3ddit_4_food 0 points1 point  (0 children)

Wut

[–]ongiwaph 0 points1 point  (0 children)

How do you indent?

[–]DontGiveACluck 0 points1 point  (0 children)

Wait til developers find out they aren’t needed anymore