Is it kind of tacky or poor practice when programmers use an unusual amount of libraries/frameworks to accomplish certain tasks? I'm working with someone on a relatively simple programming project involving geolocation queries. The guy seems like an amateur to me. For the server software, this guy used Python, Django, and a bunch of other crazy libraries ("PostGIS + gdal, geoip, and a few other spatial libraries" he writes) to create it. He wrote the entire program in one method (in views.py, nonetheless facepalm), and it's almost unreadable.

Is this bad? Is this really tacky and amateurish? Am I the only minimalist out there these days?

Many good questions generate some degree of opinion based on expert experience, but answers to this question will tend to be almost entirely based on opinions, rather than facts, references, or specific expertise.
If this question can be reworded to fit the rules in the help center, please edit the question.

4

Check the FAQ for the types of questions to ask and not ask here. "This is what I feel, am I the only one?" isn't a real question: there's no problem someone else can help you solve. Do you have a specific, practical problem you're trying to solve?
–
user8Mar 9 '11 at 6:03

5

@Mark Trapp - to be fair, replacing "Does anyone else think it's kind of tacky or" with "Is it" seems to yield a legitimate question. This seems like one in need of rewording.
–
InaimathiMar 9 '11 at 15:27

Using standard wheels is a good practice, though it can be taken to extremes. But usually it is good. For instance in this case, do you think that this amateur would have produced something nearly as good if he didn't use some of the other things to do the heavy lifting?
–
btillyMar 9 '11 at 18:40

@Mark Trapp I'm asking about an approach to a problem, not a "does anyone else" question. Sorry if it was worded that way. I'll save "practical problems to solve" for SO (that's why I'm using Programmers instead).
–
ZannethMar 9 '11 at 21:41

11 Answers
11

Writing an entire program in one method is probably bad. That being said, utilizing tools that already exist can definitely help speed up development times. I hope I misinterpreted your wording as it seems to imply that Python or Django should be looked down upon as outside help. Both are extremely useful tools for developers. I think we can agree that for most cases, a developer who implements a linked list to use instead of using a provided standard is a bad idea. This can apply to more complex things as well, like TCP sockets, and maybe even GeoIP.

Agreed, sometimes when people incorporate external modules/libraries in a product things can get messy, especially when there are multiple modules and you start getting into dependency nightmares. These need to be managed appropriately, and yes, sometimes it is better to code things yourself. I wouldn't judge a developer on if they use "outside help", as much as how they use outside help and integrate it with the rest of the system.

I write all my programs inside of Main ;)
–
WuHoUnitedMar 9 '11 at 12:46

1

"Writing an entire program in one method is definitely bad." Depends on how big that method is! Haskell is all about getting programs down to one (very concise, recursive, curried, point-free, refactored) method.
–
CodexArcanumMar 9 '11 at 16:11

Good answer. You are right, I didn't mean that using Python/Django should be looked down upon. What I meant is that sometimes when you have a simple web application, it is overkill and likely extra load on the server to run an entire web framework underneath it. It's also just tacky in my opinion. I think we're in agreement in that the amount of outside help in relation to the project size is what is at question here. Thanks again.
–
ZannethMar 9 '11 at 21:32

@Zanneth I agree, that does sound like overkill :)
–
JeffMar 9 '11 at 21:53

In general that is considered good if the programmer has exposure to a multitude of libraries . if you can do the task using an efficiently written algorithm already available in the library does it not save time and effort?.
But it would depend on the situation if the libraries and dependencies are to obscure and do not fit the design requirements or if the task can be done with a simple routine. Time saving is definitely a factor.

Agrees, the important thing is does it do the needed job? And is it done in an efficient, scalable and secure manner?
–
crosenblumMar 9 '11 at 15:35

I agree that time saving is important, but I think project scale needs to be taken into consideration. Is it really necessary to include a huge web framework into your project when most of what it is doing is something like HTTP requests?
–
ZannethMar 9 '11 at 21:39

I'd rather people used existing, tried and tested, tooling to create things than going out and write everything from scratch, with the inherent risks of doing so, the extra time needed to test things we can know are tested by our suppliers if we buy it, etc. etc.

Writing a program in one method: definitely bad (unless it's a trivial program, but I don't think that's what you mean).

Using lots of libraries: it depends.

There's a balance to be struck between re-inventing the wheel and doing zero work. If the attitude is "unless there's a library for [x], I'm not implementing it", that's certainly bad. Just keep in mind that the other extreme is (for example) "I know jQuery can do this in three lines, but I'm going to roll my own [y] functions".

Basically:

Use frameworks and other abstractions where they significantly reduce effort and errors

Don't use frameworks as a way to avoid learning about the thing they implement

Don't use the lack of a framework as an excuse to avoid tackling a task

I absolutely agree. While I definatley lean towards 'reinventing the wheel' too often, there is a point where you've got to be able to think for yourself.

Most projects need a handful, at most, of well written and fitting libraries. If your project turns out to be little more than a collection of widgets and other people's code, it usually isn't very good.

There are... a few exceptions, but I'd rather not accept that.

Being aware of libraries and frameworks is good, but relying on them almost entirely, not a good sign in my experience.

I highly endorse the use of libraries and frameworks. However, there is a limit where they are used because they exist, rather than because they are needed. Use of several geo-spatial libraries leads me to believe they are being overused.

Of more concern to me is the unreadable nature of the code. A few features I look for in good code:

Clear easy to read code. (A manager with minimal understanding of the language should be able to understand the code.)

Small modules which are have one clear purpose and limited dependencies. (high cohesion and low coupling).

Well formatted code which is easy to scan.

Comments explaining what is being done where necessary.

Limited duplication of code, no duplication of functionality.

Consistent use of the languages standard libraries.

Appropriate use of frameworks and libraries. (These should be project/organization standards.)

Unfortunately, there are a lot of developers who haven't leaned to value of the above factors. No matter how complex the problem, it should be broken down into simpler components that are assembled into a solution. Any components which remain complex should have a documented reason why it is done the way it is. (There should be a valid reason.)

EDIT: If the entire solution is less than 60 lines long, then it may be appropriate to do it in one method. The source file should have several methods all of which are of a reasonable size. If there are longer methods, it likely they need re-factoring. I am concerned with the number of geo-spatial libraries being used for a simple problem. (However, I have seen some simple problems for which the solution is very complex.)

One more thing to consider: is your colleague using the tool as a crutch to compensate for the fact that they don't understand the problem domain as well as they should? This could be a good opportunity to sit down with him/her to go over what tools they use, why, and get an idea of how they're looking to tackle the problem. Either they really don't know what they're doing and just throwing tools at the problem. Or if they do then that toolbox might be something you'd be interested in adding to your own set of tools.