Jump to content

Coding your own scripts == Reinventing the wheel?


poirot

Recommended Posts

Well, the first contact I had with PHP was like 2-3 years ago, when I began using IPB. Back then I also knew some C / JS / HTML.

At first, I had big troubles even to make IPB work, so I kind of thought coding something like that was rocket science, and I'd never understand. Then, the modifications. Installing modifications and acknowledging their existence made me realize it was not rocket science, but something reachable, I just had to learn.

From "then" to "now" I learned a fair amount of PHP and also similar languages. PHP is actually much easier than I first thought; it's a high level language, and whenever you have problems you can ask the community... Although reading the Manual usually helps.

So, I've changed my mind, from "reusing ready-made scripts" to "coding my own". I'm though often criticized for "reinventing the wheel".

Other arguments are "people spend a lot of time coding and improving their scripts. Do you think you can do something better alone"? True, but some scripts are overkill for my needs. Or also "you cannot make a secure script because nobody uses it". Also true, but if I don't publish my scripts, it's harder to find vulnerabilities. That's my opinion.

What is your opinion, concerning this matter?
Thanks in advance [img src=\"style_emoticons/[#EMO_DIR#]/smile.gif\" style=\"vertical-align:middle\" emoid=\":smile:\" border=\"0\" alt=\"smile.gif\" /]
Link to comment
Share on other sites

Totally agree with you. For one when you write your own scripts implementing changes is much easier, and it gives you a chance to improve weak point in existing scripts.

I don't think you can "reinvent the wheel" in programming. There are always improvements to be made, even on your own code. Hell, I've rewritten every script of mine about 10 times and I don't think it was a waste of time.
Link to comment
Share on other sites

well all those people who made those wheels that you are allegedly re-inventing.. they had to start somewhere, too. Perhaps one day you will invent the car that uses the wheel, and then some poor sap will be accused of trying to re-invent the car [img src=\"style_emoticons/[#EMO_DIR#]/laugh.gif\" style=\"vertical-align:middle\" emoid=\":laugh:\" border=\"0\" alt=\"laugh.gif\" /]
Link to comment
Share on other sites

Many times I like to download scripts then change them.

-The wheel was invented a long time ago. Does the invention of the radial tire constitute 'reinventing the wheel'?
-The wheel was invented once, but wheel improvements are forever. My experience is that people who are always complaining about people reinventing the wheel are people who never invent anything and who only 'Boldy go where many have been before'.
Link to comment
Share on other sites

I don't agree with that statement one bit, with regards to reinventing the wheel. I would bet that there were more arguements for writing your own scripts than there are for using one thats already been made by someone else.
Here are a few that come to mind straight away...

- Security. The more people that are using the same script, the more chance of someone finding, and exploiting a vulnerability within that script. Look at phpBB.

- Time. With smaller tasks, I would image that it would be quicker to write your own scripts as opposed to searching through Google for one that fits your requirements.

- Ease of use. I'm not really a fan of working with other peoples code, as I'm quite particular in the way I write my scripts, and with this in mind, I think it would be more difficult to implement someone elses script within one of my projects. Because first I'd have to format it all to match my coding style. Also, depending on the complexity of the script, it might take a bit longer to read through it all a few times to fully understand what the original author has done.

- Feature sets. I think that is is unlikely that you find a script that fits your requirements exacty, writing your own ensures that you have the features you require, along with the knowledge about how your script works, making it easier to add, or ammend features.


There's just a few for you, I'm sure there are more, but you get the point.
Link to comment
Share on other sites

i believe it's best to use a pre-existing class, for example, if it already does what you want to for the sake of meeting deadlines. but if your intent is to build a super optimized system, you should see if those classes are optimized for YOUR needs, if not, i don't see anything wrong with reinventing the wheel in such a case.



[!--quoteo(post=382244:date=Jun 10 2006, 09:43 PM:name=poirot)--][div class=\'quotetop\']QUOTE(poirot @ Jun 10 2006, 09:43 PM) [snapback]382244[/snapback][/div][div class=\'quotemain\'][!--quotec--]
Also true, but if I don't publish my scripts, it's harder to find vulnerabilities. That's my opinion.
[/quote]
i have to say i strongly disagree with that. i believe it's better to initially publish the script in question in beta status as widely as possible so that people might notify you of vulnerabilities because different people would have different circumstances or different server setups and they might be able to pick out something you didn't even think of.
besides, i'm not such a big fan of hiding code. i believe that if you can do something unusual with code and people would find it useful and if sharing that code wont prevent you from putting food on the table, then you should share the information as much as possible because that way someone else might learn something new and who knows, that person might be the next Linux Trovaldis.
but that's just my opinion :)
Link to comment
Share on other sites

Hands up everybody who has written their own 'version' of phpMyAdmin and which is better than phpMyAdmin.

Hands up everybody who has the time to write a better version of phpMyAdmin.

Hands up everybody who declines to use the phpMailer class because someone else wrote it.

Hands up everybody who has a script package at SourceForge.
Link to comment
Share on other sites

@Bane:

I like the idea of "security by obscurity". More or less:

[quote]- Security. The more people that are using the same script, the more chance of someone finding, and exploiting a vulnerability within that script. Look at phpBB.[/quote]

@AndyB: Indeed, but I don't know what is phpMailer though :P
And most of my scripts are for private use and I don't think they would be very useful to anyone else ;)
Link to comment
Share on other sites

I think that if you are on a deadline and come across a script that does what you are looking to do, then use it. But I think it makes a programmer feel good to say that they coded the script on their own. I know it makes me feel a lot better about being me :)

And it also looks nice on your resume. To say you coded the whole thing and all the features.

But that's just me...

[!--coloro:#990000--][span style=\"color:#990000\"][!--/coloro--]Jeremy[!--colorc--][/span][!--/colorc--]
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.