DEV Community

Discussion on: What are some examples of "productive laziness"?

Collapse
 
habereder profile image
Raphael Habereder • Edited

If I have to create the same damn folder structure every other day, according to some stupid "guideline" that differs from the rest of the world, or best practices, you can be damn sure I will script the hell out of that and build a generator for it after the third time.

That way I'll just go

buildProject.sh projectname

Or

git clone urlToSkeletonProject.git

and be done with it :D

Or build metric tons of aliases like

alias ka="kubectl apply -n namespaceofmyteam"
Collapse
 
xanderyzwich profile image
Corey McCarty

custom aliases for the win! Also ssh keys for passwordl-ess logins. bash/python scripts are an amazing way to streamline repetitive tasks, and make huge problems quite small.

Collapse
 
habereder profile image
Raphael Habereder

I couldn't agree more.
If I look at the bashrc I crafted over the years, I couldn't live without it.
An alias to save a few keystrokes is probably peak lazyness.

Also ssh keys for passwordl-ess logins.

So much this, not only from a lazyness perspective, but also security. Forging a ssh-key is probably much harder than brute forcing a password (if you don't get banned after too many failures :p)

bash/python scripts are an amazing way to streamline repetitive tasks, and make huge problems quite small

Absolutely, though lately I prefer go, just for the benefit of not having to install a runtime anymore.

Thread Thread
 
xanderyzwich profile image
Corey McCarty • Edited

A couple of my favorites are the ls after cd script and this charm that I came up with that I insist be deployed everywhere that my app is running (along with a sensible multicolored prompt) what="echo `whoami`@`hostname`:`pwd`"

Thread Thread
 
habereder profile image
Raphael Habereder

I am absolutely going to steal that one!

A favorite of mine, even though it's absolutely useless

alias damnit="sudo !!"

It's just to create fun bash histories :D

Collapse
 
fluffynuts profile image
Davyd McColl

^ this

if there's something you have to do regularly, please, for the love of all that is good, find a way to automate it

As Scott Hanselman says: "we only have a limited number of keystrokes we can make in this life" -- so we have to make them count.