1

This intro is only my naive attempt at a mile-high snapshot helping me to position my question. Any user trying to answer my question, that tries to nail down one aspect of programming, will have to overcome my naive understanding, simply because of my idiosyncratic education. So here I'm placing my subject in the array of topics outlining programming and software activities:

  1. Fundamentals of programming (software design patterns, idioms, models)
  2. Code reuse and integration (libraries, frameworks, apis)
  3. Continual development (documentation, commenting, version control)
  4. Maintenance best practices (systems administration)

I'm interested to focus my programming skills on code reuse and integration topics. This topic may certainly begin with software programming languages and the differences between functional and object-oriented programming. However, what I wish to focus on in detail and at some length are the variety of uses of libraries, frameworks, and apis.

My programming education comes from what I can readily find on the internet and in books. Earlier this year I enrolled in a class on fundamentals at Coursera, Programming Languages, by professor Daniel Grossman, which attempts to prepare students for programming in any language. Reuse was mentioned only as a property of functions and object. You can start your search for 'reuse and integration' in fundamentals and not get close.

Since I started learning some Ruby, php I've put together a better understanding of 'reuse and integration', but its all cobbled and patchwork. Published materials are mostly #1 and then some idiosyncratic mix of #2-4. You can read a lot of books and still not understand how all of these abstractions fit together.

I've even participated in a discussion here at p.se on the pedagogical problem of cargo-cult programmer students who "...copy-paste code from previous, similar-looking assignments..." While my own answer to this reflects my appreciation for the OP's concern, and yet my imagination can't help envying these students who can draw with such ease from previous projects just a little bit.

I've not read the book or participated in a class or heard a discussion which attempts to survey the reuse and integration paradigms in their totality.

Where in computer science education does “reuse and integration” find comprehensive coverage?

xtian
  • 217
  • 2
  • 9

2 Answers2

5

I think you're confusing computer science with software engineering. Computer science is more concerned with theories, algorithms, data structures and proofs. Software engineering is the discipline that studies software architecture and construction. A computer science degree program may have software engineering courses, but they're not necessarily part of computer science per se.

TMN
  • 11,313
  • 1
  • 21
  • 31
  • 4
    Ah, I see. The whole "astronomers don't use telescopes" thing. – Robert Harvey Oct 10 '13 at 18:48
  • 3
    +1000 if I could, just for "confusing CS with software engineering". This must be one of the Top 10 misconceptions here at programmers.se. – Andres F. Oct 10 '13 at 18:49
  • @AndresF. Despite the glee that programmers take at pointing out there is a difference, it's meaningless in the context of this question, since the OP is asking where to learn it, not what the definition of computer science is. I personally don't think there is a difference, unless you intend to be some sort of "ivory-tower" software architect, and never intend to touch a computer keyboard (a misguided attitude, if there ever was one). – Robert Harvey Oct 10 '13 at 18:49
  • @RobertHarvey I disagree. At least in my case, it's not glee. Confusing CS with SE is the first step in the road to disappointment. It also leads to people thinking CS is worthless, just because they failed to understand it's _scientific_ education, not _engineering_, and picked the wrong career path. – Andres F. Oct 10 '13 at 18:51
  • @AndresF. Nevertheless, a computer scientist that never touches a computer is every bit as ineffectual as the astronomer who never looks through a telescope. – Robert Harvey Oct 10 '13 at 18:52
  • @RobertHarvey Sorry to use this card, but I have friends with PhDs in CS, and I can almost bet you (and I, I'm not belittling you) wouldn't understand a thing they work on. It's closer to math than to programming. Of course, CS -- like math -- has practical consequences for software engineering, but it's not the same, and expecting it to be leads to serious disappointment. They do use keyboards and do program, by the way. – Andres F. Oct 10 '13 at 18:53
  • @AndresF. That's a straw man. I never claimed that I knew what they do. I do, however, know things that some of them don't, like how to stand up a web application. – Robert Harvey Oct 10 '13 at 18:53
  • @RobertHarvey I'm saying what they do is not at all related to software engineering. This is not snobbery. You have to be familiar with real work on CS to understand just how different a discipline from software engineering it is. Both interrelate of course, but they are distinctly different! – Andres F. Oct 10 '13 at 18:54
  • @AndresF. Then why bother learning it? As I've pointed out elsewhere, if it doesn't have anything to do with computers, it probably shouldn't be called computer science. – Robert Harvey Oct 10 '13 at 18:55
  • @RobertHarvey That's... not what I said at all. I said it's highly distinct from _software engineering_, and an entirely different discipline. Where did I say it has nothing to do with computers? (Why bother learning math, by the way?) – Andres F. Oct 10 '13 at 18:57
  • @AndresF. I'm quoting Dijkstra (“Computer science is no more about computers than astronomy is about telescopes.”). I guess my point is that walling off such information into it's own silo, calling it computer science, and then saying it doesn't have anything to do with computers (or at least the subject at hand) doesn't really help anyone. – Robert Harvey Oct 10 '13 at 18:58
  • @RobertHarvey I seriously doubt Dijkstra said "why bother learning it", though. CS is closer to Math, which of course has serious implications for computers. The difference is important because, given the misunderstandings shown here at P.SE, the wrong people are likely to pick CS instead of SE, and viceversa. This is a _tremendous_ misunderstanding for a site like P.SE! – Andres F. Oct 10 '13 at 19:01
  • @AndresF. Yes, my point exactly. – Robert Harvey Oct 10 '13 at 19:02
  • 1
    @AndresF. This discussion would make a good entry for the [Programmers blog](http://programmers.blogoverflow.com/). – Robert Harvey Oct 10 '13 at 19:15
  • 1
    @RobertHarvey: I was pointing out that OP would do better to look for software engineering courses than computer science ones, since software engineering tends to focus more on system architecture and software design (including issues of design for reuse and interfaces as contracts). – TMN Oct 10 '13 at 19:15
  • @TMN: Yes, but regardless, you're not really providing an answer to the OP's question. OK, I won't find my answer in Computer Science curricula. Now what? – Robert Harvey Oct 10 '13 at 19:16
  • 1
    @RobertHarvey: Like I said, survey the software engineering courses. Unfortunately, it appears that Coursera is not very rigorous with their classification system (at least, I wouldn't put Sedgewick's _Algorithms_ in the same category as _An Introduction to Programming for Musicians and Digital Artists_, but maybe that's just me). I didn't really see anything appropriate to OP's question in their catalog, – TMN Oct 10 '13 at 19:29
  • 1
    I'm sorry that I can't endorse this answer, although I have throughly enjoyed this debate, for the reason that I'd gladly change the title's term 'computer science' to a more _general term_ if the *practical* objectives of authoring software and using libraries were united under one classification. I'm _customizing_ other people's open source software for my use, and developments in abstraction, modularity, interoperability are outpacing the educational tracks I have available to me. I am and will remain behind the curve in CS; For this is a missing piece problem... – xtian Oct 10 '13 at 21:15
  • ...I understand the idea here is the missing pieces are in software engineering, but can you be more specific? Maybe give me some kind of roadmap from my learning of fundamentals as cited above to this piece? – xtian Oct 10 '13 at 21:17
  • 1
    @RobertHarvey: There is no "astronomers don't use telescopes" thing. There is an "astronomy is not the study of telescopes" thing. – Michael Shaw Oct 10 '13 at 23:36
  • 1
    @MichaelShaw And there's no such thing as premature optimization either, 3 percent of the time. Anyway, that just proves my point: Computer Science should be called something else. Nobody calls the study of celestial bodies Telescopy. – Robert Harvey Oct 11 '13 at 01:18
  • @RobertHarvey How about "[A New Kind Of Science](http://www.wolframscience.com/)"? haha – xtian Oct 11 '13 at 19:01
  • @TMN, I should like to say my peace. (^_^) This discussion has split in a 3rd century BC sort of way: "Aristotle held that there were three basic activities of man: theoria, poiesis and praxis." [(Wikipedia)](http://en.wikipedia.org/wiki/Praxis_%28process%29) The distinctions of telescopes is clearly an example of the first activity, and I'm looking to the last activity--praxis. Geez. – xtian Oct 12 '13 at 16:10
  • @RobertHarvey Um, why? Computer _Science_ is the study of the science concerned with what can be done with computers. _Engineering_ (which some claim is a misnomer when used in relation to Software Engineering) is distinct. The _problem_ is that many look to CS when they're really interested in SE, but that's a matter of education. – Andres F. Oct 12 '13 at 23:10
  • @AndresF. *Computing* Science, maybe. But not Computer Science. Not while people like Dijkstra are around. – Robert Harvey Oct 13 '13 at 05:59
  • @RobertHarvey [Computer Science IS Computing Science](http://en.wikipedia.org/wiki/Computer_science#Name_of_the_field), and Dijkstra was certainly a proponent of that interpretation. It's not about the hardware but about _computation_. – Andres F. Oct 13 '13 at 13:55
2

What you described as "reuse and integration" is mostly embodied in a practical way using the concept of modularity.

Modularity takes a number of forms. In some languages there are actually modules, and in many others there are concepts of modularity that take the form of individual files, namespaces and other similar organizational mechanisms. Object-oriented classes are a form of modularity, as are simple functions.

To achieve reusability and ease of integration with various systems, software must be generic enough to be applicable to a wide variety of programmer scenarios. This is achieved by high cohesion and loose coupling. Generics allow collections to be used with arbitrary objects.

In short, reuse and integration are achieved by understanding fundamental programming principles, and how these concepts can be applied to develop software that is easily reused and integrated. You have to know the fundamentals first, in other words.

Robert Harvey
  • 198,589
  • 55
  • 464
  • 673
  • Drat. My copy 'n paste dreams are only that? Thank you for your answer. Of course the short of it is keep going on the fundamentals track, but I think the reality is more complex. I see this from concurrent study and use of frameworks built _on top of programming languages_. I hate to out myself for fear of alienating purists, but Drupal is very usable and customizable with novice knowledge, but a maze of interdependencies – xtian Oct 10 '13 at 17:43
  • Programming always involves tradeoffs like this. Like any other form of fine art, the experts make it look simple, but in reality a lot is going on under the hood to maintain that illusion of simplicity. Copy/pasting does have its merits, but eventually you need to *refactor* instead. Otherwise, as you probably already expect, you will eventually be left with an unmaintainable mess. – Robert Harvey Oct 10 '13 at 17:47
  • True. And this was largely the reason for my 'snap shot'. The facts are I continually ask some version of this question annually, while I continue my programming education. There exists some point where I will have attained the necessary formal training to understand what does seem like a simple and oft repeated concept, reuse is itself a fundamental of programming. – xtian Oct 10 '13 at 18:03
  • 2
    Reuse is indeed an aspiration, but it's not a fundamental. Encapsulation is a fundamental; it supports reuse, but it's not sufficient, in and of itself. – Robert Harvey Oct 10 '13 at 19:08