On the Fence? Major in CS

post by talisman · 2009-05-07T04:26:14.714Z · LW · GW · Legacy · 54 comments

Contents

54 comments

I talk to many ABDs in math, physics, engineering, economics, and various other technical fields.

I work with exceptional people from all those backgrounds.

I would like to unreservedly say to any collegians out there, whether choosing an undergrad major or considering fields of study for grad school: if you know you want a technical major but you're not sure which, choose Computer Science.

Unless you're extremely talented and motivated, relative to your extremely talented and motivated peers, you probably aren't going to make a career in academia even if you want to.  And if you want a technical major but you're not sure which, you shouldn't want to!  Academia is a huge drag in many ways.  When a math ABD starts telling me about how she really likes her work but is sick of the slow pace and the fact that only six people in the world understand her work, I get to take a nice minute alone with my thoughts: I've heard it over and over again, in the same words and the same weary, beaten-down tone.  You shouldn't be considering a career in academia unless you're passionately in love with your field, unless you think about it in the shower and over lunch and as you drift off to sleep, unless the problem sets are a weekly joy.  A lesser love will abandon you and leave you stranded and heartbroken, four years into grad school.

What's so great about CS, then?  Isn't it just a bunch of glorified not-real-math and hundreds of hours of grimy debugging?

Let's start with several significant, but peripheral, reasons:

None of that gets to my real point, which is the modes of thought that CS majors build.  Working with intransigent computer code for years upon years, the smart ones learn a deeply careful, modular, and reductionist mindset that transfers shockingly well to all kinds of systems-oriented thinking--

And most significantly to building and understanding human systems.  The questions they learn to ask about a codebase--"What invariants must this process satisfy?  What's the cleanest way to organize this structure?  How should these subsystems work together?"--are incredibly powerful when applied to a complex human process.  If I needed a CEO for my enterprise, not just my software company but my airline, my automaker, my restaurant chain, I would start by looking for candidates with a CS background.

You can see some of this relevance in the multitude of analogies CS people are able to apply to non-CS areas.  When's the last time you heard a math person refer to some real-world situation as "a real elliptic curve"?  The CS people I know have a rich vocabulary of cached concepts that address real-world situations: race conditions, interrupts, stacks, queues, bandwidth, latency, and many more that go over my head, because...

I didn't major in CS.  I saw it as too "applied," and went for more "elevated" areas.  I grew intellectually through that study, but I've upped my practical effectiveness enormously in the last few years by working with great CS people and absorbing all I can of their mindset.


54 comments

Comments sorted by top scores.

comment by MendelSchmiedekamp · 2009-05-07T13:21:28.584Z · LW(p) · GW(p)

I'm someone who has been educated in CS, as well as other fields. I both perform and manage industrial-scale programming and research programming, and I hire programmers of varying skill-levels for projects.

In my experience, there are a few caveats to your advice:

1) Strong programmers, fun side projects, and deep understanding comes from the pre-Computer interest which many of the die-hard CS people have. It is rarely, if ever, taught in academic programs and is something I specifically look for in my heavy-duty programmers whether or not their major is or was in CS.

2) My personal take on things is: The best programmers take innate talent and a lifetime of experience and turn it into super-star ability - don't expect to become one by majoring in CS. The second best programmers have a strong mathematics background (i.e. proof writing), because their code requires less debugging, which is the most costly part of software development. Any programmer can do better by analyzing their process and learning from that, but that form of software engineering seems to have become less popular, since it takes more work and makes you vulnerable to bad managers. Algorithm design is, of course, an entirely different matter.

In short, I'd suggest a CS/Mathematics double major. It's a good idea to be able to speak more than one technical language after all.

Oh and, my usual answer to:

When's the last time you heard a math person refer to some real-world situation as "a real elliptic curve"?

Well there was the time Heisenberg came back from his honeymoon where he had, of course, spent the entire time trying to puzzle out quantum mechanics. He was about to give up because of the non-commutative multiplication when he talked to a mathematician friend who said, "Wait, let me tell you about these things we call matrices."

Mathematics gives you very useful models, it just doesn't tell you how to use them. CS gives you the tools to implement solutions, but it tends to leave the solutions rather ad hoc. Bringing the two together is one good mix. I could suggest a half-dozen others - but this will do for now.

Edited to add: This is a mix if you want to achieve the goals laid out in the post. Not suggesting that it is either trivial to get such a pair of degrees or desirable for everyone to head in that direction.

Replies from: talisman
comment by talisman · 2009-05-07T13:50:05.542Z · LW(p) · GW(p)

I don't at all disagree that for those who can do it, the CS/math parlay is excellent.

Replies from: MendelSchmiedekamp
comment by MendelSchmiedekamp · 2009-05-07T17:20:09.808Z · LW(p) · GW(p)

But to be clear, if you're not already a showing talent as a programmer, and you want to be skilled as one, if you have to pick between mathematics and CS, pick mathematics and learn a programming language on the side (give yourself a challenging, sizable project which you care about - and get it done, even if it takes a year or two). The cognitive skills you will learn in mathematics will do more to cover for your gaps as a programmer than most CS programs will teach you.

Bear in mind, I'm talking about effectiveness, rather than credentials. Credentials are an entirely different matter - and like most status games it is a constantly evolving mess.

comment by MrHen · 2009-05-07T13:23:12.122Z · LW(p) · GW(p)

Whoa... you are suggesting that everyone else do what you didn't and the reasoning is a list of ideas with no data? No offense, but how do I know this is not a grass-is-greener, I-wish-I-would-have moment?

I would beware of other-optimizing. As soon as I graduated with a CS degree I realized I should have been in philosophy the whole time. I love my CS major and agree that it is an excellent choice and do not regret the work I put into the process. I also agree with your points. But choosing a major is not a small thing that should be tilted by a post based on anecdotal evidence from someone who didn't do it.

After watching math and physics majors struggle in CS101 I realized that CS is not an intuitive field for everyone. They were not stupid or lazy people. They just didn't "get it". You can graduate with a CS degree and never "get it" and not know jack shit about coding, systems, or any of the other great things you mentioned. I learned about those things. But right now I am working with someone who graduated with a CS degree and did not.

This isn't meant to be a rain-on-your-parade comment; I just want to warn the bloke who reads this post and thinks, "God, math is that useless? I guess I will go CS." The key part in your post they may have skimmed over is this:

You shouldn't be considering a career in academia unless you're passionately in love with your field, unless you think about it in the shower and over lunch and as you drift off to sleep, unless the problem sets are a weekly joy. A lesser love will abandon you and leave you stranded and heartbroken, four years into grad school.

If you are passionately in love with your field, go for it. If you are not, find a different field. CS is not something everyone can fall in love with and think about in the shower and over lunch and drifting off to sleep. Neither is Math, Physics, Engineering, Psychology...

Replies from: talisman, thomblake
comment by talisman · 2009-05-07T13:45:08.053Z · LW(p) · GW(p)

I am very successful in my secret identity life, so no, this is not some kind of grass-is-greener observation; rather, it's an attempt to give practical advice to my younger selves out there. I majored in math and physics, and did well, and am in the world now, and can concretely see the ways that a CS education would have helped me, ways that people less smart than I am think better!

As soon as I graduated with a CS degree I realized I should have been in philosophy the whole time.

I'm comparing CS only to other technical majors.

CS is not something everyone can fall in love with and think about in the shower and over lunch and drifting off to sleep.

I'm not proposing CS as an academic discipline, but as a discipline for training the mind for work in the world.

Do I know the intricate details of every reader's intellectual life? Do I claim that everyone who's currently majoring in math or econ drop it and switch to CS?

To quote Robin:

[S]harp people ... distinguish themselves by not assuming more than needed to keep the conversation going.

Replies from: MrHen
comment by MrHen · 2009-05-07T14:17:47.414Z · LW(p) · GW(p)

Fair enough. I just wanted to be sure. :)

comment by thomblake · 2009-05-07T13:30:00.145Z · LW(p) · GW(p)

As soon as I graduated with a CS degree I realized I should have been in philosophy the whole time.

This matches my experience. I was a CS major for a bit but ended up graduating with a degree in philosophy. It was much more relevant, even to working in computing.

Replies from: jscn
comment by jscn · 2009-05-13T22:03:39.488Z · LW(p) · GW(p)

Thirded. I completed half of my degree in CS before switching to Philosophy. I'm finding it significantly more stimulating. I don't think I learned anything in my CS classes that I couldn't easily have taught myself (and had more fun doing so).

comment by lix · 2009-05-07T05:34:26.611Z · LW(p) · GW(p)

As a post-doc biologist who works in a CS school and with a bunch of mathematicians and physicists - I partly agree. I do think the CS culture has an excellent combination of practical skills and rigorous training in abstraction. However, in my experience, many CS graduates are weak on empiricism; they can build fantastic systems, but they don't understand (or care) what data mean; they are lazy about analysis and hypothesis testing. Half my current batch of honors students didn't know what a hypothesis was. I'd encourage budding rationalists to take both some empirical science and some CS subjects and major in whatever they like most.

comment by AnlamK · 2009-05-07T05:17:53.318Z · LW(p) · GW(p)

I also want to ask: How can one lead an intellectually active life besides reading books? Is it common for non-PhDs to publish in some fields?

Replies from: ciphergoth
comment by Paul Crowley (ciphergoth) · 2009-05-07T08:08:50.553Z · LW(p) · GW(p)

I am effectively a cryptography dilettante: I have a handful of publications despite zero formal instruction or tutelage in crypto of any kind. So you don't have to be part of academia to participate in an academic field, so long as the field mostly publishes online.

(edited to add "in crypto" above in case it wasn't clear, sorry)

Replies from: AnlamK
comment by AnlamK · 2009-05-07T18:11:17.701Z · LW(p) · GW(p)

Wouw, that's really impressive and encouraging. Thanks for sharing.

comment by asciilifeform · 2009-05-07T15:49:54.302Z · LW(p) · GW(p)

I strongly disagree.

Statistically speaking, salt mines await most CS majors.

I regret my CS degree every day of the week.

Unless your grades are exceptional (or you have the business acumen and extroversion to deal with startups) a CS education dooms you to the career of a human robot.

I will also note that it is possible to be passionately in love with your field without also being passionately in love with homework or exams. For people like this, some of whom want to pursue a life dedicated to chasing knowledge possibly more than most of the academically excellent, universities offer only a savage self-esteem beating.

Replies from: Lojban, thomblake
comment by Lojban · 2009-05-07T19:43:53.651Z · LW(p) · GW(p)

Read your Reddit post. Wow, sad. I did computer engineering undergrad, and actually didn't get into CS grad school (pre-reqs I think). I ended up doing computer engineering masters. There's a lot of stigma with CS--I'm actually happy I never got stuck with the label.

comment by thomblake · 2009-05-07T15:55:30.121Z · LW(p) · GW(p)

I will also note that it is possible to be passionately in love with your field without also being passionately in love with homework or exams. For people like this, some of whom want to pursue a life dedicated to chasing knowledge possibly more than most of the academically excellent, universities offer only a savage self-esteem beating.

Fortunately, universities aren't about 'your field'. A university education exists to begin the path towards wisdom, in part through experiencing a wide variety of perspectives and methods.

Replies from: asciilifeform
comment by asciilifeform · 2009-05-07T16:11:33.313Z · LW(p) · GW(p)

A university education exists to begin the path towards wisdom

In practice, it is a credentials mill and "meatgrinder" filter.

Think realistically. If you want to spend your life's prime waking hours creating knowledge instead of languishing in an unrelated day job, academia (or something which demands similar credentials for admission) is the only ticket I know of.

So whatever else the university has to offer, it will be served with a generous helping of defeat, depression, and permanent career damage, if you aren't "grind" material (or intelligent enough to ace classes without grinding.)

Replies from: thomblake
comment by thomblake · 2009-05-07T16:57:11.993Z · LW(p) · GW(p)

If you want to spend your life's prime waking hours creating knowledge instead of languishing in an unrelated day job, academia (or something which demands similar credentials for admission) is the only ticket I know of.

This seems to contradict your sentiments. If academia is the ticket to the not-grind, then why is it also the source of the 'grind'?

In my experience, one can do passably well in university while giving little thought to trivialities like what your grades are. Of course, it depends upon the college program, and what you expect to get out of it. Some universities these days seem to be of the opinion that they're technical schools, out to train people for particular careers.

Replies from: asciilifeform
comment by asciilifeform · 2009-05-07T18:02:46.872Z · LW(p) · GW(p)

The contradiction you are seeing isn't in my post; rather, it is in the way academia (at least in the US) is actually structured. Ostensibly, graduate programs want to recruit candidates who will do creative, original research. Yet, the qualifications they demand (grades) have little to do with creativity and everything to do with being the best human emulation of a computer that you can be.

What undergraduate schooling mostly tests: excellence in rote memorization, speed of solving trivial problems, performance on demand and to spec every day, the willingness to carry out a meaningless task on somebody's say-so - these abilities are mostly orthogonal to aptitude for original research. And yet they are the primary entry criteria.

And doing "passably well" typically won't get you into a Ph.D. program.

Replies from: thomblake
comment by thomblake · 2009-05-07T18:52:24.501Z · LW(p) · GW(p)

What undergraduate schooling mostly tests: excellence in rote memorization, speed of solving trivial problems, performance on demand and to spec every day, the willingness to carry out a meaningless task on somebody's say-so

This is not my experience. It sounds to me more like you're describing elementary school. Of course, it could be that you went to an exceptionally bad school, or that I went to an exceptionally good one.

And doing "passably well" typically won't get you into a Ph.D. program.

No, but making the right kind of professional connections and being brilliant will get you into a PhD program, regardless of your grades. Though there are some schools that have a grade cut-off before the department is even allowed to consider a student; I think that sort of thing is criminal. If you find yourself in that unfortunate situation, consider entreating your professors to inflate your grades, or better yet, choose a different graduate school.

Replies from: asciilifeform
comment by asciilifeform · 2009-05-07T19:04:25.256Z · LW(p) · GW(p)

you're describing elementary school

I'm describing a large public US university which I attended, one considered fairly respectable in the sciences. And I have seen scarcely any reports of experience different from my own in this respect. The people with nothing to complain about tend to be the ones with sufficient rote learning / calculation talent to avoid having been burned in the way I describe.

consider entreating your professors to inflate your grades

Are you joking?

choose a different graduate school.

Almost every graduate program in the country has the GPA cutoff.

Replies from: thomblake
comment by thomblake · 2009-05-07T21:32:51.320Z · LW(p) · GW(p)

Almost every graduate program in the country has the GPA cutoff.

I'm not familiar with this. Do you have a citation / source / study to confirm this?

I'm describing a large public US university which I attended, one considered fairly respectable in the sciences. And I have seen scarcely any reports of experience different from my own in this respect.

Well my experience can be counted as one of the 'scarce' ones then, and I hadn't until now heard any reports quite like yours. I suppose I should mention then that I went to Southern Connecticut State University, for anyone interested in avoiding the sorts of things asciilifeform refers to, in case my university really was that unique. We do have some world-renowned departments, so I suppose I shouldn't be so surprised.

Replies from: asciilifeform
comment by asciilifeform · 2009-05-08T00:12:29.425Z · LW(p) · GW(p)

Do you have a citation / source

Only my own experience in trying to find places to apply to.

I hadn't until now heard any reports quite like yours

I suspect we might simply have different views on what constitutes meaningless gruntwork (as opposed to preparation for original research.) To me, this would be pretty much anything which asks for on-demand, closed-book performance, adherence to schedules, any activity involving memorization, and in essence anything short of unbridled freedom to pursue the topics which interest me at my own pace.

Replies from: thomblake
comment by thomblake · 2009-05-08T14:06:45.701Z · LW(p) · GW(p)

Indeed it seems we are just talking past each other. "unbridled freedom to pursue the topics which interest me at my own pace" is what you have outside of school. The university is there to expose you to different ways of learning and thinking about things, different sorts of tasks, different personalities and styles of work, and subjects that might not interest you at the moment.

A lot of the things you complain about are components of a happy and productive life.

I often claim that people go to college too young. One should develop the discipline and drive to appreciate a university education before undertaking it - otherwise, one will miss the point and it will just feel like more high school.

Replies from: Z_M_Davis
comment by Z_M_Davis · 2009-05-08T23:59:49.573Z · LW(p) · GW(p)

The university is there to expose you to different ways of learning and thinking about things, different sorts of tasks, different personalities and styles of work, and subjects that might not interest you at the moment.

To the extent that one judges that one ought to be exposed to different ways of learning and thinking, different sorts of tasks, and so forth, why not seek them out directly? It is sad but true that many people use autodidacticism as an excuse to be lazy--but it doesn't have to be.

Replies from: thomblake
comment by thomblake · 2009-05-10T00:26:27.748Z · LW(p) · GW(p)

To the extent that one judges that one ought to be exposed to different ways of learning and thinking, different sorts of tasks, and so forth, why not seek them out directly?

Because these things are assembled to the end of beginning wisdom. Until you've begun the journey, you don't know what to seek out. It's especially problematic if the sorts of people who have something to teach you are the sort you can't stand to be around.

Replies from: anonym
comment by anonym · 2009-05-10T22:51:14.211Z · LW(p) · GW(p)

In terms of knowing what to seek out, I've always thought that the greatest resource available to the aspiring lover of wisdom is the university bookstore, and the carefully selected and graded texts found therein. You can learn far more by working your way through the upper-division assigned texts of a wide range of disciplines than you will ever learn from the classes themselves. I consider myself an autodidact, in that most of my learning at university was self-directed and independent of my coursework, but the structure provided by the progression of courses and their assigned texts was absolutely invaluable. I think the university bookstore is why my self-directed studies were so much more effective once I started attending university than before.

comment by billswift · 2009-05-07T07:54:58.778Z · LW(p) · GW(p)

"The most valuable acquisitions in a scientific or technical education are the general-purpose mental tools which remain serviceable for a lifetime. I rate natural language and mathematics as the most important of these tools, and computer science as a third."

-- George E Forsythe, quoted in Donald E Knuth, "Selected Papers in Computer Science", p.9

comment by Jordan · 2009-05-07T05:32:20.728Z · LW(p) · GW(p)

Seconded. Random bits I couldn't manage to form into a cohesive comment:

I'm a math ABD on the verge of dropping out (to pursue a software project, no less) . I actually am doing really good research and probably have a promising academic career ahead, it's just not exciting.

I'm always dumbfounded by how much more interesting CS grad students seem (not necessarily their work though, the kings there would have to be the physical sciences).

Math has definitely restructured my brain in great ways. I program a lot too, and programming has done likewise. I think the best thing I've gained from math, though, is the perseverance necessary to do good research, which comes in handy elsewhere for sure.

My recommendation: if you major in CS, take some real math courses on the side.

Replies from: IlyaShpitser
comment by IlyaShpitser · 2012-05-25T19:45:39.370Z · LW(p) · GW(p)

Seconding this recommendation.

comment by bcheung · 2009-05-07T17:20:52.898Z · LW(p) · GW(p)

Thanks for writing this article. It would benefit the software development community to know more about this difference. I have a little more in depth description of the digital divide between programmers and computer scientists on my blog.

As an overly stereotyped generality, here are the differences I see between "computer scientists" and "programmers".

The programmer is someone writes code on a daily basis but is ignorant about how the compiler actually works. He is very familiar with the tools he uses but doesn't understand how they work or how to build them. The tools he uses is his world and he uses them to go about his daily work. He is also blinded by them and can't see past them. "If all you have is a hammer, everything looks like a nail". They never think there is a better way and just go about working on their problem the only way they know how.

In contrast, the computer scientist is someone who lives in the more academic world and understands the computer at a more fundamental level -- a machine for performing computations. He sees problems and is able to build a model to solve the problem.

In summary, the programmer uses the tools and the computer scientist makes the tools. The problem is that often these two individuals do not spend enough time in the day to day world of the other. So the programmer is ignorant that he can do things better (more efficient, elegant, etc) and the computer scientist doesn't spend enough time in the trenches to really know what would benefit the programmer or simply doesn't have an interest in solving the problem outside of intellectual curiosity.

Lisp is a great example of this. I recently learned it and it is an amazingly powerful language. Yet I find myself not able to use it because while it is interesting in and of itself, the people who worked on Lisp have done little to make it practical to use on a day to day basis. The learning curve is steep, documentation is poor (relatively) and trying to figure out how to get it up and running on a server in an easy and reliable manner is a P.I.T.A. I eventually gave up on it and switched back to PHP even though every part of me wanted to use it.

Look at PHP. Even though PHP pales in comparison with Lisp. PHP's superior documentation and ease of deployment have made it one of the most popular web development languages.

If the two communities can get together and live in each others' world more, maybe we can all benefit more.

The problem I have is that I am a self taught programmer with a keen interest in computer science but find that living in "computer science land" takes away from my ability to get real work done and pay the bills. I wish it wasn't the case. To my credit though, my PHP code has become a lot more elegant as I am able to take the CS concepts I have learned and apply them to my day to day work.

Replies from: jimrandomh, asciilifeform, MrHen
comment by jimrandomh · 2009-05-07T18:09:40.199Z · LW(p) · GW(p)

This is a false dichotomy. You suggest that software people can be naturally divided into programmers who don't know theory, and theoreticians who don't program regularly. However, programming skill and theoretical knowledge are independent, continuous and positively correlated. The common cases are people with both programming skill and theoretical knowledge, and people with neither. That's why "computer scientist", "programmer" and "software engineer" are so often used as synonyms - because being one usually implies also being the other two.

comment by asciilifeform · 2009-05-07T20:19:42.915Z · LW(p) · GW(p)

find that living in "computer science land" takes away from my ability to get real work done and pay the bills.

This is not an accident.

comment by MrHen · 2009-05-07T18:23:36.575Z · LW(p) · GW(p)

I eventually gave up on it and switched back to PHP even though every part of me wanted to use it.

I think the problem is that you wanted to use it without asking if it was the proper tool for whatever task you had. PHP and Lisp have very different purposes.

The problem I have is that I am a self taught programmer with a keen interest in computer science but find that living in "computer science land" takes away from my ability to get real work done and pay the bills. I wish it wasn't the case. To my credit though, my PHP code has become a lot more elegant as I am able to take the CS concepts I have learned and apply them to my day to day work.

I find it interesting that you admit to no formal training but are making blanket statements about an entire field. With all arrogance available to me, I claim that I am a good "computer scientist" and "programmer" under your definitions. As far as I can tell, they go hand in hand. When I get better at one I get better at the other.

If I had to make a semantic distinction, programmers are a subset of computer scientists.

comment by loqi · 2009-05-07T18:34:20.488Z · LW(p) · GW(p)

CS majors learn to really program

I can't really point to anything I learned while getting my CS degree that was particularly instrumental to being able to "really program", and for that matter I don't think I could "really program" until some time after I had graduated. Practice counts for a lot here, especially considering how ungrounded and unreliable the current pedagogy of "software engineering" is. Practice and perfectionism did much more for me as a programmer than any course I took in college.

I grew intellectually through that study, but I've upped my practical effectiveness enormously in the last few years by working with great CS people and absorbing all I can of their mindset.

From my vantage point as a CS grad who maybe wishes he majored in math, physics, or chemistry instead, it looks to me like you're getting the best of both worlds. CS programs tend to be very focused on producing capable programmers, but programming is largely an operational set of knowledge that can't yet be reliably taught in a classroom. My wife is currently pursuing a chemistry degree, and I'm downright jealous of the information density in her courses compared to mine. CS pedagogy is simply immature compared to older fields, full of conflicting opinion, heuristics, and transient industry buzzwords. An exercise: Ask three randomly chosen CS majors what object-orientation is and why it's so great, and compare their answers.

I'm waffling on the regret because the degree did lead directly to an enjoyable, well-paying job. But most of the time I spent in CS classes feels wasted in comparison to the maturity and density of math and science classes.

Replies from: whpearson, MrHen
comment by whpearson · 2009-05-08T00:12:18.445Z · LW(p) · GW(p)

Programming is maths in a way. As evidence I give you the Curry-Howard Correspondence

I really wish my CS degree had included type theory and Coq and the like.

comment by MrHen · 2009-05-07T19:01:16.613Z · LW(p) · GW(p)

As a simple counter-point, my experience is nearly the exact opposite of yours. I felt that I got a lot out of my CS classes. Not every CS class, mind you, but enough that myself without a CS degree and myself with a CS degree would barely be comparable.

An exercise: Ask three randomly chosen CS majors what object-orientation is and why it's so great, and compare their answers.

While we are not strictly random, I can give 1 of 3:

Object-orientated programming is the concept of designing code around simple, efficient, and reusable objects that can work together to accomplish a larger goal. Compare this against sequential programming, which is essentially a long list of code that is only useful for one specific task.

Replies from: pjeby, loqi, saturn
comment by pjeby · 2009-05-08T04:31:43.018Z · LW(p) · GW(p)

Object-orientated programming is the concept of designing code around simple, efficient, and reusable objects that can work together to accomplish a larger goal. Compare this against sequential programming, which is essentially a long list of code that is only useful for one specific task.

I think a more accurate instrumental description of OOP is that it's code that invokes operations in terms of abstract data types, while having code organization based on concrete data types.

This definition spans everything from prototype-based OO to inheritance to interface polymorphism and generic functions, and various combinations thereof.

That having been said, I don't know very many CS people or industry programmers who would give such a concise definition, unless they've seen OO done in say, Python, Java, JavaScript, Lisp, Haskell, Eiffel, Dylan, and C -- or at least enough other languages to see the OO forest distinct from the trees. Academics are likely to babble about a bunch of stuff that doesn't matter, while industry folks are likely to babble about how cool OO is or that it's just "how it's done".

comment by loqi · 2009-05-07T20:10:04.022Z · LW(p) · GW(p)

I should probably be downvoted for OT-ness, but...

Object-orientated programming is the concept of designing code around simple, efficient, and reusable objects that can work together to accomplish a larger goal.

I think this characterization is more affective than descriptive.

Compare this against sequential programming, which is essentially a long list of code that is only useful for one specific task.

This seems to be a non-standard use of the term "sequential", especially considering that most popular object-oriented languages are imperative, executing one statement after another in sequence. The usual comparison is against structured programming, which could possibly be described as the practice of designing code around simple, efficient, and reusable functions that can work together to accomplish a larger goal.

Replies from: MrHen
comment by MrHen · 2009-05-07T20:48:26.537Z · LW(p) · GW(p)

Fair enough. "Sequential" was a term from memory. I assume it came from my classes, but what you are saying makes sense. In all honesty, I am not one to define a term like OOP. I use it and know it, but mostly from the principle of "I know it when I see it" not from strict terminology.

"Sequential," to me, is not simply executing one statement after another in sequence. It is a confusing use of the word and possible non-standard. I am not one for terms in general, so take my descriptions with a lot of salt.

As for OT, I figured in a post on CS discussion CS is fair game. Especially this far down the thread. You're good in my book.

Replies from: loqi
comment by loqi · 2009-05-07T21:13:39.391Z · LW(p) · GW(p)

In all honesty, I am not one to define a term like OOP.

I'm not a big fan of the terminology myself. That's why I chose OO for the exercise... it's presented (at least it was when I was in school) as this critically important concept/technique/whatever, but in common use the term doesn't seem to denote much of anything. In comparison, I don't see much of this happening in chemistry or physics.

I am not one for terms in general, so take my descriptions with a lot of salt.

I'd caution against throwing the baby (concise terminology) out with the bathwater (vague industrial buzzwords) here. For example, I've seen a lot of cynicism directed at the term "ajax" because of its associated buzz, despite it having a relatively unambiguous, useful meaning. Good terminology facilitates effective chunking) and communication.

Replies from: SoullessAutomaton
comment by SoullessAutomaton · 2009-05-07T21:30:54.554Z · LW(p) · GW(p)

For what it's worth, in my experience about the only different between OOP and old-school structured imperative programming is that OOP design revolves around semi-atomic, opaque chunks of data, with limited sets of operations that are allowed on a given type of data. In contrast, non-OOP imperative programming typically revolves around a hierarchical breakdown of the task into subtasks implemented as procedures, which the programmer invokes sequentially and passes smallish, transparent bits of data to.

The two are essentially isomorphic, but one or the other may be more natural depending on how well your problem domain decomposes into either 1) a series of subtasks or 2) a collection of self-contained data with a limited range of sensible actions.

For instance, procedures like C's standard string functions would be more natural in an OOP system because they define a limited set of sensible operations on a fragile data structure, whereas things like Singleton objects and static methods in OOP languages are a hack for things that are more sensibly non-OOP.

Most other details about OOP (like inheritance) will inspire more religious wars than anything else.

Replies from: Cyan
comment by Cyan · 2009-05-08T02:08:02.744Z · LW(p) · GW(p)

OOP proponents usually claim that structured programming projects become too complex for any individual or group to manage at around 100,000 lines of code, but the only references my Google-fu was able to dig up for that claim are twenty-some years out of date:

  • C. Jones, Programming Productivity, McGraw-Hill, New York, New York, 1986.
  • C. Jones, Editor, Tutorial Programming Productivity: Issues for The Eighties, Second Edition, IEEE Catalog No. EHO239-4, IEEE Computer Society Press, Washington, DC, 1986.
comment by saturn · 2009-05-07T23:59:20.451Z · LW(p) · GW(p)

Object-orientated programming is the concept of designing code around simple, efficient, and reusable objects that can work together to accomplish a larger goal.

Removing the 'fluff' from this sentence, we get: "Object-orientated programming is designing code around objects," which looks awfully close to a tautology.

Replies from: MrHen
comment by MrHen · 2009-05-08T00:39:16.321Z · LW(p) · GW(p)

Mmm... well, the "fluff" was there for a reason. "Simple" means easy to understand and not particularly complex; "efficient" means the object does one thing and one thing well; "reusable" means the object is not tied down into any particular infrastructure; "work together to accomplish a larger goal" means that an object is designed to work with other objects, not designed to solve a big problem. I suppose I could have expounded on the terms but I didn't figure anyone cared enough.

I'm still not terribly convinced anyone actually cares enough.

Replies from: anonym
comment by anonym · 2009-05-10T22:03:18.792Z · LW(p) · GW(p)

The qualifiers -- simple, efficient, reusable -- distinguish good OO code from bad OO code. They have nothing to do with OO in general. Bad programmers will write object oriented code that is complex, inefficient, and non-reusable. Likewise, "working together to accomplish a goal" applies just as much to subroutines in an imperative language or functions in a functional programming language.

Replies from: anonym
comment by anonym · 2009-05-13T03:00:34.992Z · LW(p) · GW(p)

Hmm, parent is at -2. I would be curious how anybody could actually believe (and justify) that OOP

is the concept of designing code around simple, efficient, and reusable objects that can work together to accomplish a larger goal.

comment by newerspeak · 2009-05-07T18:23:55.664Z · LW(p) · GW(p)

I migrated in the opposite direction -- I double-majored in EE/CS as an undergraduate, then flirted with solid-state physics before settling on a mix of theoretical and applied math. Now I'm on leave working on a startup, my third.

Although I agree with most of what's been said here so far, the discussion seems lopsided, so I'm assuming the role of devil's advocate. For simplicity, I'm going to gloss over an idea I believe strongly [1] so I can make consistent use of terms already in use (e.g. "distinctions between" math and CS).

Points:

  • CS is a young field, so most of the theory that exists is still shallow. There's nothing like, say, Lebesgue's theory of measure and integration -- an old, hard, important problem, done wrong for a long time, that was ultimately exhaustively solved in a way that created lots of practical applications. Obviously, taking integrals in spaces where you can't do addition isn't interesting for everyone. But most people who make it this far in math discover some of the inconsistencies in the naive theory for themselves, and then can follow the solutions to those problems as they emerged historically. You can learn a lot about problem solving in general by doing this. Most programmers don't.

  • Related to the above, CS rewards thinking hard about specific cases (debugging) more than it rewards thinking hard about theory-building or problem-decomposition.

  • CS instruction is under pressure from powerful interests. The curriculum is heavily influenced by big companies who want to hire entry-level grads who have already been exposed to their way of doing things. They also attempt to direct research towards incremental improvement of existing technologies that will upset as few of the internal empire-builders as possible back at the home office. Manifestations in undergrad CS include the perverse fixation on Java as a teaching language, the dogged insistence that students who have never coded before do so according to certain standards of style, and the requirement that graduates be fluent in the latest fads^W developments in the theory of "Software Engineering." [3] In math, there is very little cause to worry that the material you've been taught is bullshit intended to convert you into an epsilon's worth of market share. [4]

[1] i.e. that math as practiced today, with its many colloquialisms-made-explicit [2] is what programming languages will look like in the future, when the long-sought "sufficiently smart compiler" is finally made available. In other words, doing math is running programs ("expressing ideas") written in a language that targets the human brain.

[2] e.g. defining abstract entities like positive or negative infinity, adjoining them to the real numbers, and then claiming that integrals, when unbounded, are "equal to infinity."

[3] This may sound like a rant, but it's not. It turns out this kind of thing happens every time a new field gets profitable early. GE and Westinghouse more or less invented the occupation of electrical engineering with their subsidies to MIT. They needed technicians to do the upkeep on their power lines, and methods for maintaining stability in big electrical distribution networks. Most of the reference literature in organic chemistry is printed in German because German chemical companies hired armies of the new "PhD's" in search of the next aniline dye. And even during Bell Labs' postwar tenure as the high temple of American technology, a substantial portion of every issue of the Bell System Technical Journal was devoted to the subject of creosote.

[4] Sadly, the damage done here persists long after graduation, in the form of the "nobody ever got fired for using X" argument.

comment by SoullessAutomaton · 2009-05-07T10:42:55.295Z · LW(p) · GW(p)

I would add to this a couple things, from personal experience.

First, make sure to get a breadth of exposure to CS concepts. A computer science department is an unholy abomination glued together from fragments of math and electrical engineering, and you want to understand both. Learn to speak in terms of Turing and Von Neumann as well as Church and McCarthy). Understand both the gritty details of digital logic families and the transcendent beauty of Y, the fixed-point combinator.

Second, learn something else, too. And I don't mean math--CS alone makes for interesting toys, but the true power occurs when you apply CS concepts to solving problems in other fields. Learn the ropes in some other domain, and then apply what you've learned from CS to it. Learn and apply aggressively the Three Great Virtues of a programmer in everything you do.

comment by MichaelVassar · 2009-05-08T13:35:08.392Z · LW(p) · GW(p)

Simply put, most people who I know who major in CS, or especially who pursue a PhD in it, come to regret it.
As a rationalist, the plural of non-selective anecdote is data... OTOH, non-selective data within me may be selective data to you, since if I didn't object to this post so strongly I might not have commented.
I'll try to correct by commenting with simple enthusiastic agreement some time soon.

Replies from: MichaelBishop
comment by Mike Bishop (MichaelBishop) · 2009-05-08T14:05:15.388Z · LW(p) · GW(p)

Why do you think this is so? Your alternative recommendations?

comment by AnlamK · 2009-05-08T01:34:51.147Z · LW(p) · GW(p)

Haha... No. I'm EE - and I'm just annoyed by the deluge of CS job ads. 8-)

comment by asciilifeform · 2009-05-07T15:46:02.981Z · LW(p) · GW(p)

I strongly disagree.

Statistically speaking, salt mines await most CS majors.

I regret my CS degree every day of the week.

Unless your grades are exceptional (or you have the business acumen and extroversion to deal with startups) a CS education dooms you to the life of a human robot.

I will also note that it is possible to be passionately in love with your field without also being passionately in love with homework.

comment by AnlamK · 2009-05-07T05:02:45.487Z · LW(p) · GW(p)

Just to add my own two cents. The market for CS majors is excellent. I guarantee you; you won't have any trouble finding a job if you are a CS major. Nowadays, there isn't a company that doesn't have software people.

Replies from: talisman
comment by talisman · 2009-05-07T05:23:26.645Z · LW(p) · GW(p)

True, but what I want to emphasize is that the CS way of thinking is extremely valuable outside of the software field.