It's a simple question of motivation. If they're brilliant and they have motivation, then of course they could write great software. They just don't.
Make no mistake, people from schools like Cal Poly SLO (a state school, and my alma mater) who excelled in their CS programs can software engineer circles around most. Why? Because Cal Poly has no research program, three quarters of their faculty come from industry, and their faculty have no job requirements outside of teaching. They literally had us managing five to ten thousand line software projects with teams of students in year two.
Even currently, a tremendous amount of the cutting-edge work in optimization and others is done at the university level: METIS for graph partitioning, and convex optimization work being done by Stephen Boyd et al. They care deeply about the implementation because quality and speed of solution are of utmost importance. A number (like Geoffrey Hinton and Sebastian Thrun) have moved into the private sector, but after contributing a lot via academia.
In the 70's it would have been physicists, mathematicians or engineers writing code to solve a problem for them and their colleagues. Their code needed to be maintainable so they could share it in their academic community, and get things done with it.
Today, the people teaching computer science view code as the proof of concept. Much of the work is in the idea behind the code, and the code is just proof that it can be implemented in practice - and most importantly, isn't designed to be actually used.
The idea that the code is just the proof of concept then carries over to the students, and the mindset becomes not, "let's build this thing to do X', but "can we build a thing, in way Y to do X".
Our EE program has something like that where you choose a team and build something with them over the course of a semester while having an "advisor". At the end you make a report and present it to the advisor and the rest of the committee. It's a requirement for graduation. I think that's awesome and CS definitely needs something akin to that.
Engineers take what scientists discover and create and design solutions based on that. Computer science is not about engineering a large software solution. Rather it's about discovering and creating algorithms and techniques that engineers can use to design solutions.
Much of the comments to this article seem to be happy to mix the roles of "technician", "engineer", and "scientist" when they are in fact very, very different.
Even the very term itself has often been described as a misnomer, not necessarily having anything to do with "computers" or with "science".
I think the reason people mix such things around so much is because what "computer science" is has been ambiguously defined all along.
It is an education in understanding computation and software development.
I'd also argue it is not an engineering discipline either. It's unfortunate the terms "Computer Science" and "Software Engineering" were ever accepted. They're holding us back; we're stuck in an outdated view of the subject.
Whilst UML is an abstraction language, I would hesitate to compare it to a mathematical calculus. Regardless, we do not subsequently carry out empirical experimentation in the same way as science does. There is no "ground truth" that UML is modelling when developing software (ignoring edge cases) - it's a design tool.
The result was that a finite and compact set of concepts could be used to account completely for almost any design architecture, past or future. To me, this is pretty scientific.
The corollary to that is "but the technician is the one who really understands it :-) "
I studied a bachelors in molecular biology, took a few years out (realised I didn't like the subject much) and studied a one years masters in IT a few years later. It was taught by the Computer Science department (Glasgow University in Scotland), but the focus was on writing good quality software - readable, maintainable, usable code.
There was an optional data structures and algorithms course which I assume is more geared towards traditional comp science. I took it, but in ten years of work, I rarely use this stuff (though its good to have a background so you know which library is a better choice).
One thing they didn't teach us was networkinq, which I am completely self taught. I can get stuff working, but I think having a formal education in things (like I do in OOP) can teach you where to focus to get things done in a professional manner.
- 1.5 years experience isn't very much to base an opinion like this on
- Finding other people's code hard to read is pretty common, no matter how good those coder's are. Your own code generally makes perfect sense to you, same as your writing. But communicating so that all can understand it is hard. That's why flame wars occur. You probably think your comment is a reasonably argued piece of writing, just like you think your code is nicely refactored and understandable. The fact that people disagree and downvote proves the point I think.
I would have ignored your comment were it not for you mentioning that you write javascript. I started learning it on and off a few weeks ago, and yesterday I installed spidermonkey as a standalone shell. What I have noticed is that a lot of the syntax that controls flow is very similar to C, which is notorious for being gibberish. I'm guessing the same will apply to js. I do not have a CS degree, but would you say that this is readable? This is a function for extraction of nodes in a double linked list that I am currently kicking into shape.
/*
* extract *p__ from p__.
* but original *p__ is shifted left or right \
* if there is still space.
* extracted ndi* is returned, but the remainder of the list \
* is sewn back up.
*/
ndi *extract_ndi(ndi **p__, const int dec) {
ndi *q_=*p__;
if(dec>=_PREV_) {
*p__=*(q_->lnk+dec); /* the shift */
if(*((*p__)->lnk+!dec)=*(q_->lnk+!dec)) { /* sew up */
*((*(q_->lnk+!dec))->lnk+dec)=*p__;
*(q_->lnk+!dec)=NULL; /* burn ends of extraction */
}
*(q_->lnk+dec)=NULL;
} else if(dec==_LONE_) /* final possibility is that *p__==NULL */
*p__=NULL; /* ie. dec==_DEAD_, no which ain't it not worth man */
return q_;
}
What the hell was I smoking when I wrote this? I can't even read it myself.Writing convoluted code is more to do with a certain state of mind. You should ask your coworkers where they obtain LSD, not where they got their degree. I haven't come across any acid for about a dozen years, I think it has gone out of fashion.
Of course if this was Perl it would be even worse.
It's what you get for being lazy (non judging here, I'm guilty of it too) and not naming your variables accordingly. When you write the code you probably know what ndi, q, p, lnk, etc. are supposed to mean. But then you leave the code for some time and when you return you are lost. Just write out variable and function names so that your code reads like english - programming Obj-C for some time really helped me there :)
And with pointer-heavy code I tend to create aliases for offsets so I don't have to write out things like *(q->lnk+!dec) every time I reference that specific address.
Yes, maybe it will cost me wizard points with colleagues because they start to understand my code but my sanity is it worth to me ;)
(Also trailing/leading underscores are the devil!)
Sigh. Sadly, it has become fashionable to bring up Perl only to ridicule it even when there is absolutely no context or need.
Take a look at this implementation [1] of doubly linked list in Perl. Tell me how that is worse [2].
Now, I will go back to my corner to being productive using Perl or whatever language I need.
[1] https://metacpan.org/source/LEONT/List-DoubleLinked-0.003/li...
[2] Of course, I have no way of knowing if it is an exact or even close translation of your code, but it does implement doubly linked lists.
A lot of people ridicule C, I just laugh my head off.
Apologies, I assure you that I am not ridiculing it. The elegance of a language is not my concern. In fact, your comment has made me decide to put some effort into learning a bit more Perl, but I will have to find some time.
Good practise though.
typedef struct dll__ {
struct dll__ *lnk[2];
void *dat;
}ndi;
I've seen some examples on the web, but I haven't seen it done this way. I have a suspicion it might be slower than the traditional technique, but I'll have to check that. What is not evident from the code snippet is that I'm trying to make the code handle both fixed end and looped lists.Your whole post is full over hand waving and overgeneralization. You've never met a CS major who wrote clean code without resorting to fascinating technical tricks? You haven't met a non-CS major who did his or her due diligence to learn the mathematical fundamentals?
Please cut the hyperbole.
Be careful, everybody writes worse code than you, because you wrote the code. And these is a difference in writing nice simple code, and rewriting the same function to work on a bunch of different machines that does the core of the application, and you have until the end of the week until it goes live.
Best practices are easier to digest when you've experienced the problem they're meant to solve.
After enough projects, you get used to navigating codebases that are layered with multiple styles and grungy bits from years of effort. At that point, you have some hope of knowing what can and can't be maintained.
There's a difference in approach between academic CS and practical software engineering, yes, but a decent CS grad should be able to pick up both.
Sounds like you worked with people who just weren't as good as they thought they were at that part of it :)
There can also be a bit of an attitude, like the person is thinking "of course this is good, I went to Stanford". But maybe that's my imagination. Another explanation is that these people are just so good that they are able to read messy and convoluted code no problem, and us mortals need to step up our game.
On the other hand, these people would easily be able to reason about complex performance and security issues beyond me. I think that the hardcore CS issues are a science, while writing clean code in a web framework, browser, and API design is more of a craft.
If you hire too many computer scientists, your code base could be full of fascinating technical tricks, but creaky and hard to work with. Too many craftsmen, and you'll get stuck on simple problems. It's a balance.
EDIT: Downvotes? Please explain. Perhaps I am not able to fully comprehend the issues at hand.