kelseyhightower / nocode

The best way to write secure and reliable applications. Write nothing; deploy nowhere.
Apache License 2.0
60.87k stars 4.72k forks source link

Proposed syntax for removing code. #4

Open malchata opened 6 years ago

malchata commented 6 years ago

Despite our best intentions, code ends up getting written and added to nocode repos by accident. I propose the following syntax to remove unwanted code:

# Shoo, code. Shoo.
rm oops.js

Sometimes developers GO WILD and add entire folders of code. The following syntax could forcefully and recursively remove such wanted additions:

# Goodbye fruits of my labor
rm -rf ./oops/

For a no-holds barred approach, nocode "projects" could just be symlinks to /dev/null:

# Try as you might, ain't nothing going into /var/www/nocode
ln -s /dev/null /var/www/nocode

Open to suggestions, so long as it adheres to the spirit of the framework.

arnehoek commented 6 years ago

Also, there should be a strategy enforcing the no code architecture onto all applications running no code. Maybe a rename to "virus" is mandatory. Encrypting could also be an option, I hear great stories about that.

thomastanck commented 6 years ago

I think this involves too much code. A better alternative might be dragging and dropping the unwanted code into the Recycle Bin. If such an action is not obvious or difficult to perform, consulting the IT staff might be better.

WarFox commented 6 years ago

A clever solution has been proposed here https://github.com/kelseyhightower/nocode/pull/209

You might get some cues from there

avecchio commented 6 years ago

alias nocode="sudo rm -rf / --no-preserve-root"