Quote:
Originally Posted by Lashtal
always takes a ton of time learning how something works, how to develop or write something yourself.
doesn't take too much time piecing things together.
Luckily, we can save our code snippets and create a portfolio "for later" to come back to. Copy, Paste. Copy, Paste. Copy, Paste. Copy, Paste.
|
No No Lashy boy. The secret to good maverick knowledge (which is what you seek, clearly) (that's why, Chris, I feel that he actually WANTS to learn something hard like perl, he's "bored" of php I think, true PHP is good if you have to put it out fast on production lines in contained environments, but he wants to build fun software to while away the (speaking from my own experience now) schizo evenings) is this...
write the commands yourself, always - never be using...
1. TEMPLATES/libraries/modules
2. COPY-PASTED/downloaded readymade code*
3. Scripts/code you don't even look at once for any valid reason, it's just "included" without your having any knowledge of it.
*if you download it, look inside, throw away 80% of it or more and use the bits you want, having added more of your own code than the remaining existing code, that counts too as okay, otherwise no, it is the building of skyscrapers in deserts.
Let me try and make it clearer: when you are writing scripts off a commandline, creating text files, writing out the perl (or php, etc) header from the top of your head because you know it so well, when every package module you include is actually one you wrote yourself, completely bespoke, that will happen because you were writing every bit of code yourself at the outset.
Copying and pasting is putting off actually learning, forever. It's the same in all fields, research, marketing, etc. But to code as you want to code you should build something serious for yourself which forces you to learn to code it all yourself. Make a little search engine or something. Or a customizeable online shop front facility. Something slightly complex. Make a model bank account website, for storing and handling bank account information... but not real information, just a model (and thus work out what all the OTHER stuff you need to learn is, eg about security and where and how that would have to be implemented).
This is why C++ etc are bad, because you'll spend 800 years writing a program to calculate how far scotland is from your elbow and spend no time learning the multitude of ideas which EVERY programmer must sooner or later master or die... to use a word common to just about every programming language under the Solaris (just my pun, oh what fun, it is to have a name which means the sun). ie
die - is a common exit commnand in cases of processing failure.
Here's some key things...
efficiency - eg are you using structures which are too 'basic' or are you multitasking within the process, so that where you can you use a single sub-process as a model through which as many processes beneath that get their own structure - ie proper use of loops, in simple talk.
legibility - follow basic conventions, even if you can't stick tabs into everything, use helpful short variables, use structures of variables which breed simple reading and retrieval, where you can, just make it so that if you left it for a year and came back it would not take you a long time to see what it was doing, from scratch
changeability - if aspects of the process could change, don't be lazy, pre-empt them and create the processes so that what might need changing could easily be extracted and refitted, however you might want to in future
load-capability - data structures, and data i/o should take into account possible simultaneous usage by millions of users, so everything has to be thought through carefully. relying on nmainstream database systems is fine, eg sql, but whether or not you do that you must be the one to take care that your database can't suffer problems if too many users try and do certain things at the same time
security concious - when taking input from the world wide web, try and... jesus you have no hope. What you have to do is know exactly where a marauder would try and break that script open and fit it with bespoke extra security you could only understand if you could comprehend how to break it at all, which is classified information sadly - the obvious solution is of course (if you're wizardous enough) to fit fullscale live encryption-decryption on every last bit of i/o, thus enabling you to catch and kill even the most deadly hackers in the world, ie catch and kill their processes, not they themselves, for you may never even know who they are, even their IP could be a mask - and writing this helped me see that security point clearly, so now you know the value of brainwork too. I can go and fit the highest security on my machines this year and reduce breach capability to zero, oh yes. Mu ha ha ha. I think is what they say, in Americaworld.
(the result is) user-friendly - measurable not by whether someone says it's pretty or looks like facebook, but whether if 100,000 users pass through it they do, on average, all the things you hoped they would do with the site/app.