When you were in school ... at least
(koff, koff) when
I was in school ... you had to do a lot of stupid things. Such as, "implement a linked list." Or, "build a fully-functional B-tree implementation from scratch."
Today, I still see
far too many intrepid programmers trying to be Christopher Columbus: sailing away as though they were embarking on a voyage to an unknown world. Fully prepared to start with a
blank text-editor screen and an empty directory.
"Okay, school's out!"
Today, no matter what it is that you are setting out to do,
"it has already been done (to death)." Therefore, your project should be seen as a continuous re-play of this decision:
"Build, Beg, Borrow, or Steal?"
Fortunately, you don't have to beg, you don't have to borrow, and it's perfectly okay
(hey, I'm not speaking literally here ...) to steal. There is a vast amount of "contributed code" that is readily available for whatever programming language you are using. For instance, at this particular moment,
Perl's CPAN library contains
122496 Uploads, 35981 Distributions, 194527 Modules, 13336 Uploaders, and by the time you read this there will probably be more. Complete applications can be found at places like
GitHub. "Web frameworks" abound at every possible level of sophistication. Elegant
pre-existing solutions exist to almost every conceivable obstacle, in every language.
Thus, the first step in any project ... and, at every turn thereafter ... should be:
research.
Quote:
Originally Posted by Sage Wisdom:
Actum Ne Agas: "Do Not Do A Thing Already Done"
|
"Stuck in existing-application hell, but tasked to create a new feature?" You can
still go to these resources for source-code examples of good ideas.
- - -
And, in the same vein, when you think that you have to "write a
bash script" in order to implement "a new command,"
think again. If you take a look at the source-code of
most of "the scripts that you know and love," you will discover that most of them are
not "bash scripts!" They're programs written in some high-level programming language or another, prefixed by a
#!shebang line which causes bash to silently invoke the specified language to carry it out.
This, of course, means that we have come full-circle: if we don't have to use bash's primitive built-in scripting language to actually construct our new script, we can
leverage(!) great quantities of existing software to let us get the job done ... quickly.
- - -
Therefore, "now that school's out," re-arrange your mindset to
presume that, "whatever-it-is that you are faced with now,
you are not the first." (Nor will you be the last.) You should begin – not with "coding" but – with
research. Thousands of generous people have created things for you, and they don't mind in the slightest if you "steal"
what they did.
Whatever you do:
"Don't ... start ... from ... scratch."