You're viewing a comment by SubStack and its responses.

December 01, 2009, 20:45

For people reading this article who see these tricks as harmful to readability and maintainability, these operators are great for saving strokes in code golf and also great for silly scripts and one-liners.

Comment Responses

April 17, 2010, 22:23


Rafi J Louis Permalink
April 11, 2014, 11:22

One liners are very valuable, never under estimate.

In my company, a guy wrote a 15 line (approx) shell script. Code was readable, tidy.

Another guy wrote the code for the same funtionality having regex and pipes, looked so messy and unreadable. (2 pipes i think).

First guy's code took about 2 hours to run on about 80-100 files of size around 500 MB each.
Second guy's script completed the run in 4 minutes 20 seconds.

First guy was an average coder who used loops, conditions and some pipes. Second guy, omg, was a plumber... (you know what i mean :D ).

Reply To This Comment

(why do I need your e-mail?)

(Your twitter handle, if you have one.)

Type the word "cloud_173": (just to make sure you're a human)

Please preview the comment before submitting to make sure it's OK.