Ethical programming question

kag

Golden Member
May 21, 2001
1,677
0
76
www.boloxe.com
I was just wondering if it's common for programmers to use external ressources, like libraries developped by other people and stuff like that. I love to code in PHP and I see so many great libraries available for free, and I wonder why should I code my own when tested ones are available?
 

MrChad

Lifer
Aug 22, 2001
13,507
3
81
It's very common, and your rationale is the same as most people's. There's no ethical dilemma, as long as you abide by the original author's terms of use (many just want a line of acknowledgement in the source code).
 

Cerebus451

Golden Member
Nov 30, 2000
1,425
0
76
I always look to see if someone has already done it and use that if possible. No need to recode what has already been coded. Just remember to give proper credit. Read the license agreement that comes with the library and make sure to follow whatever guidlines are given for using the code. Sometimes people say it is okay to use their stuff so long as you don't profit from it, others will say it is okay to profit so long as you give proper credit for using their code.
 

UCJefe

Senior member
Jan 27, 2000
302
0
0
Yep, that's what libraries are there for... reuse. If people didn't want you to use them, they wouldn't be free and posted on the internet. I use 3rd party libraries all the time both for commercial applications and personal. Just make sure you abide by the original author's license and you're good to go.
 

kag

Golden Member
May 21, 2001
1,677
0
76
www.boloxe.com
Yeah, of course, I'm not gonna steal other people's work. I know it's the rational choice, but sometimes I tell myself that I wouldn't be proud of a site that I uses other people's code. But I guess employers don't care about that, as long as it works.
 

DaveSimmons

Elite Member
Aug 12, 2001
40,730
670
126
As long as you abide by the terms of use, it's perfectly ethical. If it saves you a lot of work you might send a "thanks!" email if an address is given, or some people ask for things like picture postcards from your area.

If you violate their terms, then of course it's unethical and probably illegal as well. And unwise if you're doing so in any professional context.
 

Barnaby W. Füi

Elite Member
Aug 14, 2001
12,343
0
0
Originally posted by: kag
Yeah, of course, I'm not gonna steal other people's work. I know it's the rational choice, but sometimes I tell myself that I wouldn't be proud of a site that I uses other people's code. But I guess employers don't care about that, as long as it works.

In that case, pride is getting in the way of being a good programmer. Reuse is one of the most important concepts in programming. Reusing something generally will make you look more competent than re-inventing a thousand half ass wheels.
 

kag

Golden Member
May 21, 2001
1,677
0
76
www.boloxe.com
Originally posted by: BingBongWongFooey
Originally posted by: kag
Yeah, of course, I'm not gonna steal other people's work. I know it's the rational choice, but sometimes I tell myself that I wouldn't be proud of a site that I uses other people's code. But I guess employers don't care about that, as long as it works.

In that case, pride is getting in the way of being a good programmer. Reuse is one of the most important concepts in programming. Reusing something generally will make you look more competent than re-inventing a thousand half ass wheels.

You are probably right. But the reason I like to code is because of the feeling I get when my application is working. But then again, using an existing library could implement features I haven't thought of, and my application could even more capable.
 

notfred

Lifer
Feb 12, 2001
38,241
4
0
Originally posted by: kag
Originally posted by: BingBongWongFooey
Originally posted by: kag
Yeah, of course, I'm not gonna steal other people's work. I know it's the rational choice, but sometimes I tell myself that I wouldn't be proud of a site that I uses other people's code. But I guess employers don't care about that, as long as it works.

In that case, pride is getting in the way of being a good programmer. Reuse is one of the most important concepts in programming. Reusing something generally will make you look more competent than re-inventing a thousand half ass wheels.

You are probably right. But the reason I like to code is because of the feeling I get when my application is working. But then again, using an existing library could implement features I haven't thought of, and my application could even more capable.

You know, even if you think you're implementing something yourself, you're almost always not actually doing so. Once upon a time I wrote a PNG decoder in Java. It was slower than any of the standard stuff that comes with Java or uses libpng, but it worked. It helped me understand the PNG format a lot better. However, I still used gzip compression libraries to decompress my files before decoding them. Did I write it myself? halfway. Do I really want to write my own unzip library? no. You can take that as far as you want. Why use the String class that everyone else uses in C++ when you could write your own. Why use Button in java when you could subclass awt.Component yourself? Unless you're writing in assembly, you're using other people's libraries all the time. Why not use them for higher level stuff?
 

DaveSimmons

Elite Member
Aug 12, 2001
40,730
670
126
I've been coding for literally 2 decades now, and like BingBongWongFooey said, using components and libraries is part of being a good developer.

While you're still learning it can be instructive (and fun) to write your own function to read in a Bmp file, or use sockets to read from a POP3 mail server.

But once you're developing software professionally, it's more important to create reliable code as quickly as possible. At that point, paying Dundas or IP*Works for a TCP/IP library makes so much more sense than coding from scratch (for that same POP3 mail reader) since you get code that is the result of thousands of hours of work and which has been stress-tested in hundreds or thousands of other applications.

The applications I write at work use Dundas Grid, Wintertree's Sentry spelling engine, TX Text Control, and DynaZip, among others, and using them has given me many weeks more time to focus on solving problems rather than writing my own Zip library or grid class.
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
I will try to find a balance between understanding the inner working of something and being a "smarter" coder.

I think DaveSimmons and notfred covered just about everything, but all it comes down to is what are you trying to accomplish? Are you trying to write a high level app because you don't like the UI of what's out there (like all of the media players for Linux that just use the xine backend) or are you trying to write a low level decoding library because you think what's available is crap and you can do better (like the multiple xvid/divx codecs available)? Or hell, are you doing a clean room implementation of something because you don't like the license that the other stuff was released under (multiple Debian packages have done this)?

99% of what I do anymore is perl because it's usually system administration automation type stuff and I know that each project would probably have taken 5-10x as long had I not had access to all of the modules in CPAN. Why should I have to worry about all of the different facets of the FTP protocol like pasv vs port transfers, maintaining a control and data connection, etc when there's a perfectly good Net::FTP module available.

Are you not proud of your PC because you reused all kinds of hardware that other people built? Why use someone else's video card when you can build your own?
 

Kntx

Platinum Member
Dec 11, 2000
2,270
0
71
Originally posted by: DaveSimmons
The applications I write at work use Dundas Grid, Wintertree's Sentry spelling engine, TX Text Control, and DynaZip, among others, and using them has given me many weeks more time to focus on solving problems rather than writing my own Zip library or grid class.


NOooooooooooooooooooo I hate TX Text Control and everything about that god damned thing!!!!


...Just thought I'd add that to the disscussion.
 

drag

Elite Member
Jul 4, 2002
8,708
0
0
I can help to think about what programming REALY is, and what exactly code reuse REALY is.

Everytime you write a program to run on a Microsoft OS (for instance) you ARE USING MICROSOFT CODE.

You program with PHP you are using PHP's code inside your programs.

It's just all about the different levels of abstraction you have to deal with, but to the computer it's just all ones and zeroes. That's what OSes were originally created for, and are still used for, they provide a library or at least a massive resource of code that you use to run your programs.

For instance a person could write completely from scratch a HTML web browser, using only there 100% code. But the results are probably going to suck. You would have to write in machine code, your own assembler language, take that and form it into a compiler for a much higher level language such as C. Use that then to build a program to deal with boot up, low level hardware, network hardware + a custom TCP/IP protocol stack, memory management, a way to orginize this data on a harddrive, a way to deal with keyboard and mouse input, etc etc etc etc.

But that's all pointless re-inventing the wheel. So you use a system that does this + provides the neccisarry software libraries and we generally call these things operating systems.

So no matter how you shake it, you ARE going to be reusing other people's code in your programs even if you never use a PHP library file to pull functions from.

Just imagine the amount of work, the hundreds of thousands/millions of lines of code you use everyday to do something as simple as pump out one PHP "hello world" type program.
 

spunkz

Golden Member
Jul 16, 2003
1,467
0
76
what the hell is ethics anyway? ethics is based on some relativistic nonsense that all humans have certain rights. why not just do what you want?
 

notfred

Lifer
Feb 12, 2001
38,241
4
0
Originally posted by: spunkz
what the hell is ethics anyway? ethics is based on some relativistic nonsense that all humans have certain rights. why not just do what you want?

BTW, I borrowred your car.... actually, I think I'll just keep it.
 

DaveSimmons

Elite Member
Aug 12, 2001
40,730
670
126
Originally posted by: Kntx
Originally posted by: DaveSimmons
The applications I write at work use Dundas Grid, Wintertree's Sentry spelling engine, TX Text Control, and DynaZip, among others, and using them has given me many weeks more time to focus on solving problems rather than writing my own Zip library or grid class.

NOooooooooooooooooooo I hate TX Text Control and everything about that god damned thing!!!!

...Just thought I'd add that to the disscussion.
I hear you. Sadly it's the best WYSIWYG editing library or control available for Windows. It gets the job done, and was a lot better than writing a visual editor with Rich Text, Word, and HTML import/export filters from scratch. I really wish Dundas offered a competing product though, since having Dundas' Grid as C++ source instead of a lib or OCX has let us do some low-level customization we just can't do with TX.
 

oboeguy

Diamond Member
Dec 7, 1999
3,907
0
76
Code re-use is the "holy grail" of coding, so please, use others' libraries! (but give correct and proper acknowledgement) I worked on a Open Source project this summer with the goal of researchers in my field not having to re-code stuff.
 

Firus

Senior member
Nov 16, 2001
525
0
0
Originally posted by: kag
Originally posted by: BingBongWongFooey
Originally posted by: kag
Yeah, of course, I'm not gonna steal other people's work. I know it's the rational choice, but sometimes I tell myself that I wouldn't be proud of a site that I uses other people's code. But I guess employers don't care about that, as long as it works.

In that case, pride is getting in the way of being a good programmer. Reuse is one of the most important concepts in programming. Reusing something generally will make you look more competent than re-inventing a thousand half ass wheels.

You are probably right. But the reason I like to code is because of the feeling I get when my application is working. But then again, using an existing library could implement features I haven't thought of, and my application could even more capable.

Sounds like you are a CS student perhaps? I don't mean that in a bad way, I too am one and I know exactly what you mean with the pride issue. I always like to have that feeling of doing it myself, but it seems almost like I came into the industry way too late and everything has been done...but even in classes they always taught us "Don't reinvent the wheel"
 

kag

Golden Member
May 21, 2001
1,677
0
76
www.boloxe.com
I *was* a CS student I graduated last April but I still don't have a job. My teachers also often told us the advantages of buying classes, because a lot of work has already been done with those classes and you save an enormous amount of time.

Since I don't have a job, all of my current projects are personal, maybe this is why I don't like to use other people's libraries, the point of doing what I do is to learn. When money will be involved, then I'll try to save time and effort.
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
My teachers also often told us the advantages of buying classes,

That was one of the things that always annoyed me when I tried to do development on Windows, all of the 3rd party components cost money to use. Obviously I see why people do this and it makes sense, but when you're just playing around at home it's not feasible to pay even $20 for a component of a project that won't make you any money. Luckily most perl libraries are free even on Windows and since the majority of my time is now spent in Linux, I don't have to worry about not being able to find a free version of whatever I need.
 

Descartes

Lifer
Oct 10, 1999
13,968
2
0
I've arrived late to the discussion, so I have nothing constructive to add on what has already been correctly stated.

I write my libraries at a much higher level of abstraction than those that are readily available for download; in other words, libraries that encapsulate a particular problem domain with which I am working. The library in this context serves only to distill the problem domain into a collection of reusable entities. The more specific to a problem domain you get, the less likely you'll find a library available that accommodates your needs.

I've always followed the software componentry philosophy largely ushered into modern development by those with Unix backgrounds: components, libraries, or classes that do one thing well, and nothing more; one set of cohesive responsibilities, and nothing more. Some call this orthogonality, myself included, and it's witnessed a rebirth in the recent year or so with service-oriented architectures; pipes, filters, orthogonality, etc. are all derived from the foundation provided by earlier Unix pioneers.

With that said, I still sometimes create my own fundamental libraries even when I acknowledge others are available. I do this under the following situations:

- When I consider a library to be nonorthogonal. I despise libraries that could equally serve multiple problem domains, because I find myself with code bloat resulting from superfluous responsibilities in the library. In addition, I find it an encumbrance to reuse as it can't be orchestrated as efficiently as otherwise orthogonal components. You'll note how many of newer Linux OSS projects have moved away from the software componentry ideal (if indeed it can be called that) and instead produce swiss-army programs; programs that do twenty things fairly well, and perhaps one really well.

- When I wish to better understand how a given library works. Many years ago I dissected a C-written barcoding library to better understand the protocols, so in combination with written specifications I was able to acclimate myself more expeditiously. Of course I didn't actually use my library, because that would be irresponsible.

Meh, I can't think of any more.
 

Firus

Senior member
Nov 16, 2001
525
0
0
Originally posted by: kag
I *was* a CS student I graduated last April but I still don't have a job. My teachers also often told us the advantages of buying classes, because a lot of work has already been done with those classes and you save an enormous amount of time.

Since I don't have a job, all of my current projects are personal, maybe this is why I don't like to use other people's libraries, the point of doing what I do is to learn. When money will be involved, then I'll try to save time and effort.

That's funny, I graduated in April as well. I was able to score a co-op job, but it's borderline computer science related...Software Support. Deal with SQL quite a lot, but no development by any stretch - mostly just answering phones "yes, you have to click here and type this...". I asked about possibly moving into Dev, but "they" determined they prefer more school. So, I'm going back in January Around here getting a development style job is next to impossible, even with experience/education. there just aren't that many, this is why I can totally see it from your perspective as I too do all of my development on a personal level - I could use libraries and such, but then its alll done and you don't learn anything.
 

kag

Golden Member
May 21, 2001
1,677
0
76
www.boloxe.com
I hear you. I almost got a PHP developper job two weeks ago. I was called for an interview, drove 8 hours away... the guy rated my interview as "extra"... but they didnt pick me for a second interview because another candidate knew ASP.Net. They did not develop in ASP.Net but sometimes they have to maintain sites that are coded in ASP.Net. I almost cried when I learned I was "discarded"...


Nothinman, when I said to buy classes, I meant for commercial projects. Obviously no one is gonna buy something when they're not making any money out of their project.
 
sale-70-410-exam    | Exam-200-125-pdf    | we-sale-70-410-exam    | hot-sale-70-410-exam    | Latest-exam-700-603-Dumps    | Dumps-98-363-exams-date    | Certs-200-125-date    | Dumps-300-075-exams-date    | hot-sale-book-C8010-726-book    | Hot-Sale-200-310-Exam    | Exam-Description-200-310-dumps?    | hot-sale-book-200-125-book    | Latest-Updated-300-209-Exam    | Dumps-210-260-exams-date    | Download-200-125-Exam-PDF    | Exam-Description-300-101-dumps    | Certs-300-101-date    | Hot-Sale-300-075-Exam    | Latest-exam-200-125-Dumps    | Exam-Description-200-125-dumps    | Latest-Updated-300-075-Exam    | hot-sale-book-210-260-book    | Dumps-200-901-exams-date    | Certs-200-901-date    | Latest-exam-1Z0-062-Dumps    | Hot-Sale-1Z0-062-Exam    | Certs-CSSLP-date    | 100%-Pass-70-383-Exams    | Latest-JN0-360-real-exam-questions    | 100%-Pass-4A0-100-Real-Exam-Questions    | Dumps-300-135-exams-date    | Passed-200-105-Tech-Exams    | Latest-Updated-200-310-Exam    | Download-300-070-Exam-PDF    | Hot-Sale-JN0-360-Exam    | 100%-Pass-JN0-360-Exams    | 100%-Pass-JN0-360-Real-Exam-Questions    | Dumps-JN0-360-exams-date    | Exam-Description-1Z0-876-dumps    | Latest-exam-1Z0-876-Dumps    | Dumps-HPE0-Y53-exams-date    | 2017-Latest-HPE0-Y53-Exam    | 100%-Pass-HPE0-Y53-Real-Exam-Questions    | Pass-4A0-100-Exam    | Latest-4A0-100-Questions    | Dumps-98-365-exams-date    | 2017-Latest-98-365-Exam    | 100%-Pass-VCS-254-Exams    | 2017-Latest-VCS-273-Exam    | Dumps-200-355-exams-date    | 2017-Latest-300-320-Exam    | Pass-300-101-Exam    | 100%-Pass-300-115-Exams    |
http://www.portvapes.co.uk/    | http://www.portvapes.co.uk/    |