Posts Tagged ‘php’
Procedural Programmer or OOP’r?
Further to my last post I would like to quickly talk about coding relative to my recent reading.
When I started out learning php, I taught myself, learnt from reading online and practical uses of code - this for me at least is the primary way I can learn anything. Once you reach functional levels where you can do everything you need to be able to do within your personal mandate then all thats left is refinement.
To this end I have been reading some books on the ideals of programming and a more specific look at things. I came across this in the process:
Procedural Programming versus OOP
Procedural programming often emphasizes writing code that is as concise as possible and coding directly for the end result. In other words, most procedural programming uses targeted groups of functions that immediately address the problem at hand—usually nothing more, and nothing less. In most situations, this gets you extremely efficient and high-performance applications. One of the downsides to this approach is a lack of maintainability. If the project grows large enough, the developer or developers could end up having to maintain a large number of individual functions, and in some cases, the logic of different functions can become confusingly similar. Object-oriented programming (OOP), on the other hand, emphasizes abstract relationships and a hierarchy of related functionality. Similar functionality can all share a common core, making maintenance much easier. Code reuse is increased as well, as you can easily adapt the abstracted base functionality for new tasks. OOP also can aid in large-scale program design, helping encapsulate and categorize the different sets of functionality required by each part of the system. Such organization and modularity can come at a price, however. If your object-oriented system is poorly designed, it can actually be harder to maintain than any of the alternatives. Often, the extreme modularity and “code-heaviness” of object-oriented designs can suffer from poor performance. Once you get past the problems caused by poor object-oriented design, you will find that creating a system using a custom set of PHP objects, or even a full-blown API, can yield benefits that most every developer will appreciate.
Some times its the simplest things that make u stop and go “oh shit I wish I had read that years ago” - turns out in skipping the book reading part of my php self-tutoring I still managed to run in line with the books, although essentially without bothering with OOP. By nature I realise that I have always coded, since I first began messing about, in a procedural way.
Could it be that Procedural and OOP are equivalent to black and white ends of the hat scale? Often we try and get things done as efficiently and quickly as possible, and frankly I have survived up till a few months ago without ever bothering with Classes in php for a substantial number of my projects - the bigger ones though require some thought out planning if they are to work in the long run.
Seems this week I keep starting posts without remembering what I meant to say?!
Tags: classes, damn wine, oop, php, procedural programming
Filed under Reading :
Comments (4) :
Jun 1st, 2008
Making Money Online: Pre-Requisites: Coding
Making money online is what a lot of people try to do, a fair proportion report to achieve this goal however the remaining proportion seek quick fixes, instant money makers and one time money making schemes.
“If it seems to good to be true - it is” - this is a common phrase but theres another which I hear less of “If it seems to good to be true 9/10 times it is” - I prefer that one personally because with making money online these one off lucky finds, code glitches, manipulations or competition niches are there - but like the gold mining of generations before us they are rare and can take a lot of looking.
When I talk about making money online I do talk from experience, I do make a bit of money online, a reasonable positive balance that is incremental - but as with all these things it won’t happen over night (at least in 999/1000 cases.)
I have had times amongst my years on the case where one night or one page or one small website has been enough to make a happy man of me but that is due to perseverance and odds not curealls and other peoples “wonderful linkbuilding services”, “directory submissions or similar”.
I am beginning to go on here so here’s the point:
You will find the odds of making money a lot easier the more practical knowledge you get in coding. Even if you are in enough liquidity to pay a coder, or coders - you will want to know what your paying them to do. With this in mind there is a few things you SHOULD learn and do before ever asking questions or worrying your not making enough or even expect to make money. If you have a job to go to, family to support, things to do and give yourself other excuses, that’s your trip - but perseverance I am afraid is I think a pre-requisite in this game.
With that LEARN THESE:
- HTML, CSS, Basic web complimentary technologies like ftp, photoshop etc.
- PHP & MySQL - most integral skills in my opinion - LAMP is not necessary you can run it all thru ur windowz
- SEO - What it is, why we do it, how we do it and how you can use the previous two to help
If you learn these basics, read this and other aforementioned blogs then I don’t see how given time and a fair amount of effort, regardless of the colour of your hat you can fail! That is unless your one of those negotive bastards then you shouldnt be here neway!
Tags: css, html, lamp, mysql, php, pre-requisites, seo
Filed under Basic, Uncategorized :
Comments (0) :
May 31st, 2008
