Posted
by
CowboyNeal
from the eye-to-the-future dept.
newdaemon writes "Fortune
has a candid
interview
with Bill Joy about what he plans to do after leaving Sun and his opinions on many other topics, including his strong dislike of the C programming language and how the internet could evolve to take care of the problem of spam and viruses."
This discussion has been archived.
No new comments can be posted.
This article is one big "Java can solve all the internet's problems" troll. As if Microsoft's problem is because their code is written in C instead of Java. That's ludicrous.
A programming language can't change people's behaviour. Only PEOPLE can change people's behaviour. Bill Joy's obviously a smart guy, but his railing against what he calls "antiquated" languages and his lack of understanding on why programming languages have nothing to do with e-mail viruses being able to spread so easily shows why Sun is no longer in such a position of prominence.
His statement about how he "designed solutions for problems that people didn't yet know they had" either shows a complete lack of understanding of the way NORMAL people use technology or he's started believing his own marketing spin about Java and Sun's other technologies.
It makes me wonder if Joy is leaving Sun because he's bitter that Sun couldn't take down Microsoft and that Java, while a very powerfull programming language that definitely has it's place in certain types of projects, isn't the language of choice for programmers everywhere.
...and that, after some real calamity in your life, you have decided to go cold turkey.
Now, where would you rather go cold turkey? Locked in a liquor store, or locked somewhere free of alcohol?
A C compiler is the liquor store of systems programming. It reinforces all the bad habits and rewards none of the good.
C has no formal definition for exceptions (signals can't really count), it does not force good behavior in allocating memory/objects from the heap, the stdio library is slow because of multiple buffer copies (David Korn replaced it with sfio in ksh93), C is constantly beaten by Fortran in computation-intensive applications, Python has shown that C sylistically leaves much to be desired, and this is only the beginning of the criticism.
I like C a lot too, but ultimately, there is no future in it beyond low-level applications that need to work at a near-assembler level.
Can you really imagine C being used for systems work in 50 years?
Can you really imagine C being used for systems work in 50 years?
Sadly, yes. And maybe thats only because I'm either ill-informed or unimaginative.
Barring the low level stuff (Kernel stuff is de facto C, if not de jure), how else can you get performance? Ada is going the way of the Dodo (there are still a few huge legacy apps running around). Java can't take its place until a rock-solid JVM is common (is there one available?). There are far too many stories of applications running out of memory becau
Maybe your are ill-informed and maybe you aren't. Cobol and Fortran are still in heavy use. So is Basic. All have been declared dead before. As Bill Joy says in the interview, people don't necessarily recognize the economic value of something new and instead rely on an know, comfortable alternative (paraphrased, of course).
interesting comment. Of course, Joy doesn;t seem to recognise the economic value of the current stuff that works, rather than the expensive rewrite if it in the current 'new best thing'. (which assumes that the rewrite works, and isn't just an expensive failure).
Perhaps that's because he's juist talking up Java at the expense of everything else. Hands up if you've ever heard of a system rewritten in Java that failed atrociously.
From my understanding, Fortran has a heavy hold on scientific computing.
As for Cobol- I'm UN-informed. I thought the majority of its place in the market was just legacy support? Mind you, legacy support is a multi-billion dollar industry (thats what we do now with ADA). So is there a lot of new development in Cobol?
Fortran is easier to optimize and vectorize than C, which is why it has a strong hold on scientific computing. Optimizers can assume a great deal about Fortran programs that cannot be assumed about C.
Cobol is still alive and well in many business-oriented computing environments. There are Cobol programmers working in the office down the hall from me. New systems implementations in Cobol continue today.
Cobol is still alive and well in many business-oriented computing environments. There are Cobol programmers working in the office down the hall from me. New systems implementations in Cobol continue today.
Please tell me where. My mother is an out of work Cobol programmer. She can't find a job anywhere anymore.
Cobol is as good as dead. The jobs left are pretty much legacy support. Maybe your case is a special one but for the most part it's dead. Learning to program Cobol now is like learning sanscr
I work for a large financial institution. My brother works for another one. Both take 30-odd graduates on each year and start them off working in COBOL. Both do all of their mainframe work in COBOL.
There are intermediate steps between C and garbage collection. One I personally like is Cyclone [att.com] which delivers almost all the power of C and the ability to link directly to C code. There are plans to write a kernel in it, and they look very credible.
For user-land software, things like python are becoming very practical. Java is probably acceptable for daemons and such (so long as they're not massively performance critical) but isn't ready to be used for anything with a GUI or where startup time matters.
[Java] isn't ready to be used for anything with a GUI
*shrug*, it works for us.
We've switched almost entirely from Powerbuilder to Java, including writing fairly rich GUIs in it. (I personally think the Java GUIs look and feel better than the PB ones).
The big issue with Java GUIs is that it's almost impossible to do them in a "knock-up" way, (something that VB, PB and the like are good at).
People try it, and then end up with junk and blame it on the tool. It's true that if you want to throw a GUI together as cheaply and easily as possible, then Java isn't the right tool, but if you want to put together a GUI that fits into a well designed system, then swing works just fine.
As Gosling recently said,
"One of the design principles behind Java is that I don't care much about how long it takes to slap together something that kind of works. The real measure is how long it takes to write something solid."
Java... isn't ready to be used for anything with a GUI or where startup time matters.
This is a myth and it's been debunked so many times I stopped counting. Look at the Eclipse [eclipse.org] project -- the Win32 UI is native (written using SWT) and just as responsive as apps written in C++.
Java can't take Ada's place until the Real-Time extensions are mature enough. Currently, implementations are a bit thin on the ground and well enough tested to be entrusted with stuff that Ada is typically used for.
I really like your analogy. Alcoholism and bad programming practices...
The problem isn't the C language. The problem is, as always, language bigotry and poor breadth of knowledge.
Of course, that sword cuts equally in all directions. What language can you imagine as "the" systems language in 50 years? Can the future really hope to hang on to diversity? Where will we attain unity?
If we teach all the C programmers Java, and all the Java programmers C. Then we'll get world peace! (Oh wait, that's jus
The problem isn't the C language. The problem is, as always, language bigotry and poor breadth of knowledge.
...and laziness, lack of planning, lack of dedication, yada-yada-yada.
Joy is right that more structured languages reduce programming errors. When it comes to working with Java, you can feel when your code is getting ugly because it starts to deviate from the clean design of (most of) the language's libraries.
With C (for example), there are few standards upon which to measure the "cleanliness"
Exceptions in java are not "invisible" In fact, you have to check for declared thrown exceptions (but not 'runtime' exceptions). In the API declared thrown exceptions are caused by external problems (like a missing file, closed socket, etc) while Runtime exceptions are usually caused by programmer error (like null pointers), and can be avoided by poor programming.
If your python app is choaking on invalid input, it's because you can't program for shit, not because exceptions suck. If it was a C app, y
Indeed. Part of the interview is interesting, but the parts about Java and Windows are just market-speak. vi is a great editor, but Joy seems to have turned into a giant tool.
Not really. If one had to describe Windows' vulnerabilities in a few phrases, buffer overflows, untrusted code and uncontrolled access would be a reasonable summary.
These vulnerabilities are all properly and intrinsically addressed in Java. It is not possible to circumvent the controls by sloppy or malicious programming, therefore Java does enforce secure behaviour.
Joy's comments might represent an exaggeration or simplification, not unreasonable considering the intended audience, but t
As an MBA and proud founder of a failed startup, I read this more of a quote that I had memorized, but did not realize until we were packing it in: "they were a solution looking for a problem". Looking back and forward, I would much rather have a mediocre solution to a problem that people are desperate to resolve than a brilliant solution to a problem that nobody really cares about. If the customer is desperate, you only have to meet them half way with a fair price to make a quick sale. If the customer isn'
Ah, but you can go pester one Bret Silberman [uranus.com], who apparently purchased Uranus back in 1993. He is also not willing to sell Uranus, so "...don't bother asking."
Perhaps the best part of that page is "Uranus Headlines" on the right.;)
by Anonymous Coward writes:
on Saturday October 04, 2003 @09:06AM (#7132080)
Again, because that program is written in C, it's quite easy to design a virus to go through your e-mail address book and broadcast spam to all the people you know.
The problem with Outlook isn't "C," the problem with outlook is Javascript, VBScript, and Windows Scripting Host, which are PRECISELY the sorts of high-level languages [and their interpreters] that this little terd is advocating.
Or is he just a common liar? I dunno - you be the judge.
The problem with Outlook isn't "C," the problem with outlook is Javascript, VBScript, and Windows Scripting Host, which are PRECISELY the sorts of high-level languages [and their interpreters]
Err no. He's definetly not an idiot (SUN anyone?) and he's not a liar. What he means by this is that as Outook is written in C, buffer over/underruns can happen which is what most viruses exploit (they then proceed to use high level languages such as Javascript etc. to get the email addresses and broadcast spam and
The issue isn't with the programming language _per se_. Obviously some programming languages are more dangerous then others. Obviously some programmers are worse than others.
The issue is with secure and contained execution environments. Properly "jailing" software (whether a process in an operating system, or a thread and window box on a preview pane in Outlook) is the real answer. Engineering has long known that compartmentalisation is key to minimising risk and impact. Operating systems are getting better at doing it. Programming languages are gradually working towards it.
You can have all of the aforementioned and current problems with buffer overflows, language defects, etc: but if the impact is limited (say, to a display pane in Outlook) then the worst that can happen is psychological damage, nothing more. From one point of view, the preview pane should only be doing that: showing me a preview - it shouldn't be granting access to resources around it.
I think that one of the key technologies that Java brought to the computing landscape was the concept of a secure machine (JVM) for a programming language (at a lower granuality than for a monolithic operating system). Argue as much as you like about how succesfull this was (I do remember much debate and technical attention given to it in the early days of Java), but the concept is far more important than the incremental language innovations in Java (i.e. a next-generation SmallTalk or C++).
Give the guy some credit - he's done some very useful technical work - and Java will be one of the technologies in the timeline of the development of computer history. Even if Java itself wasn't succesfull, it's been an interesting experiment and a lot of learning has come out of it.
I recommend this paper as a good read on the bus, just so you can appreciate the technical innovations surrounding the language.
http://www.jot.fm/issues/issue_2003_09/column3 ps. It's obvious he's still pulling the Sun line, but what do you expect ? He put a lot of effort and passion into Sun's technical direction - only a fool would think he's going to drop that overnight.
No, it will throw an exception. Java doesn't allow direct access to memory, so buffers can't be maliciously overrun. Since this exception mechanism is not built into C at the language level, C is inherently more insecure. C opens the door to one of the most common kinds of attack, a buffer overrun, a type of attack to which Java software is immune.
Some languages actually prevent programmers from leaving certain security holes. C provides very littl
No, but you could easily write an e-mail client in Java that interpreted scripts in the body or header fields of an incoming mail by default, and allowed those scripts to do things they shouldn't. This is the single biggest problem with Outlook (Express) and the reason it's responsible for so many virus/spam problems. It has nothing to do with the language used to implement it, and everything to do with the flawed architectural and security policy decisions
because stuff written in antique programming languages like C [a widely used language created by Bell Labs in the early 1970s] is full of holes. Those languages weren't designed for writing distributed programs to be used over a network. Yet that's what Microsoft still uses.
The fundamentalism never ends man. I'm almost positive when I assert these three facts:
NT Kernel is in C but so is SunOS
SQL Server 2000 is *entirely* C++
I'm almost positive IE is largely, if not entirely written or at least compiled in C++
And what do you think a JavaVM is written in? C or C++ for sure.
Whatever it's written in it still compiles down to the instruction set of the CPU or would he rather all CPUs ran Java bytecode?
OO languages simply aren't suitable for all tasks, neither is C. It might shock people like Joy to know that machine code is still written, you sometimes need to to write it for embedded systems.
Of course for major commercial systems products you are still going to see C/C++, but those projects also have huge QA budgets. There are still a huge number of smallish projects in the open and closed worlds that used C/C++ but don't do any of the attendent QA. Thats the danger zone and Joy is correct to cite it.
It will be hard for programmers to let go of C/C++ - the religion of low-level programming has been hammered into a generation of programmers even though there are plenty of high level languages th
Don't you understand that C++ is nothing more than a cute object shim on top of C
No I don't. In fact, I can safely say that you probably haven't understood what C++ is at all. **At all**.
Also, dude, C++ is not Bill's creation. And so, as stupid as ad-hominem attacks are, misplaced ad-hominem attacks are even more stupid. I'm not going to defend bill to defend C++.
Ok, I will keep it short because I hate fucking engaging in napalming games on anonymous discussion threads where there are absolutely no scrupules.
First of all, C++ isn't just an extention of C as you might seem to think. You are probably thinking "C++ is just a set of runtime routines defined to support class construction and destruction".
The fact of the matter is that C++ has much more rigourous type checking, which is a big problem as a lot of people know. That's the first difference.
While I overall agree with you, especially with modern C++ compilers, there is some truth to the perception that C++ is a mere extension of C.
The first (partial) implementations of C++ was, if I recall correctly, the AT&T headers that extended a C compiler.
And although C++ does have stronger typing than C, it's not exactly bulletproof. If you define classes for all of your types, then you can enforce strict typing, but for the 'basic' types (shared between C and C++), code that looks correct and compi
I'm going to venture a bit out of my comfort zone saying this on/. but to me a language, be it computer or natural is a means of expression. The reason why I like C++ so much is because of its dexterity, of the fact that it's actually legal to turn off compiler checks. Although I wouldn't recommend it in a business object, you can come up with some extremely elegant 'hacks'.
Now that being said, I don't think C++ is the only language capable of doing this
<quote>I don't think you are fully aware of what you are talking about yourself, my friend.
C++ is merely an extension to C, and a fairly messy one at that.</quote>
The situation is that I've come to realize one thing in life in general: being complacenct to ignorance and fud is just as bad as spreading the same fud. What Joy said in that article is, IMO, more or less FUD. It's plain and simple "push you
if you're running a monoculture of software--duh, this is not good. People have studied how to make software systems more reliable by running three distinctly diverse implementations at the same time and then comparing the results. That's what they used to do in the space program, when not only were redundant systems built for, say, guidance, but each of them also ran on different computers with different software.
Who here runs their hosted sites on two round-robined boxes with distinct kernels and Apache versions?
Nature deals with breakdowns in a complex system with evolution, and a very important part of evolution is the extinction of particular species. It's a sort of backtracking mechanism that corrects an evolutionary mistake. The Internet is an ecology, so if you build a species on it that is vulnerable to a certain pathogen, it can very well undergo extinction. By the way, the species that go extinct tend to have limited genetic diversity.
Are you implying that Microsoft Windows is vulnerable to extinction precisely because it is so dominant?
He, and the article writer, are playing the circle-j*rk game by feeding each other soft-balls...
But the analogy is poorly 'implemented' at best. If anything, Microsoft's culture could be compared to a termite infestation (revel you little zealots - I've just insulted microsoft), but in no case is it actually on the road to extinction. Extinction right now is a bad looming shadow for *BSD and BeOS and OS/2 etc...
Why is the analogy broken? Because the oxygen and glucose of software is money. Not electricity and bandwidth as some might believe. These aren't real life forms, as such your model isn't bound by the same rules. Microsoft is actually from a market perspective WAAAAY more genetically diverse (it's spreading its market investment at an incredible rate) than any other software company out there. If anything, the slashdot people have figured it out: they are like the borg right now, assimilating any genetic makeup they can.
His analogy is fucking broken.
Fuck this shit, I've flipped the bozo bit on this guy...
Am I the only one getting tired of the "my language is better than your language" holy wars? Yes, Java can do some things by default that C can't, by default--buffer overflow checks, for example--but that doesn't make it necessarily "better". One could argue that Java's way of checking everything for you makes programmers lazy, and more likely to make mistakes that Java can't catch--cross-scripting holes, for example.
In the end, an experienced C programmer can get the same job done with the same quality in C as an experienced Java program can in Java, and that ought to be good enough for anybody.
In the end, an experienced C programmer can get the same job done with the same quality in C as an experienced Java program can in Java, and that ought to be good enough for anybody.
This simply isn't the case.
Studies have shown (if you're interested, the relevant studies are referenced in "Code Complete" by Steve McConnell) that programmers are capable of writing approximately the same number of lines of code per unit of time in whatever language they program in. Whether it's C, Java, or Sparc Assembler, they'll write pretty much the same number of lines of code in day.
The catch, however, is the expressivity of the languages used. A thousand lines of C will certainly "do more" than the same number of lines of Sparc assembler. Likewise (though arguably not on the same scale), a thousand lines of Java will certainly "do more" than the same number of lines of C. So disregarding errors for the moment, programmers are more productive in a higher level language like Java than they are in C or Sparc assembler.
Now, as far as errors go: it's true that experienced programmers (in whatever language) will make fewer mistakes than less experienced programmers. But they're still human, and even if you're Donald Knuth himself, you're still going to make mistakes. The fact is that mistakes in C are far more costly than mistakes in Java. You can have off-by-one errors in both languages. In Java, however, your program will raise an out of bounds exception and, at worst, halt. In C, such a mistake could easily lead to a buffer overflow security flaw that can be exploited for elevated privilege. The same error in C and in Java is far more costly in C than in Java.
With even higher level languages, entire classes of mistakes cannot even exist, but I don't have time to go into the advantages of such languages like SML or Haskell.
Programmers no matter how experienced, are going to make mistakes. What matters is how costly those mistakes are. And they cost a whole lot more in C than in Java.
I'm not sure how you'd have memory leaks in Java, since it's a garbage collected language. You claim it's a joke, but if you find leaving the garbage collector to do its own thing isn't working for you, you can call it explicetly. If you have a place where you drop a lot of objects for whatever reason, you can always tell the garbage collector to run then instead of letting things build up. I was recently writing a.Net library and ran into a similar problem to what you were describing, my solution was t
I use C every day. I love it. It's part of my weapons cache for solving daily problems. I also use VB and have some working Java knowledge. I also spend a good bit of time using process level shell scripting. I'm a systems programmer/admin/architect, and I manage a diverse collection of greater than 500 fully managed and secured user PC's.
I've been programming in C for years. Pointer problems aside, the main problem I've always seen with this little language is that there is no fundamental "string" d
You're definitely not alone. It seems rather childish really, to have a "strong dislike" for something like a programming language. This isn't politics, it's computer science. You can do the same thing in one language that you can in any other.
Oh well, I guess that's what makes people so interesting. The plethora of personalities. Doesn't mean he's right, though.
The whole Turing completeness argument is a straw man. If it were really true, we'd all still be coding individual 1s and 0s, since, after all, "You can do the same thing in one language that you can in any other."
The real issue is which language is more expressive. Since I can accomplish any task with any of the dozens of Turing complete languages, which language lets me accomplish the task at hand in the fewest lines of code?
The answer may vary from task to task, but if the task includes the requirement that the finished product be secure, then C loses, because it doesn't protect against one of the most common sorts of attack at the language level, buffer overruns. Common Lisp and Java do. To have this same sort of protection in C, I'd have to write all the additional lines necessary to implement my own runtime to prevent direct access to memory. Hey! I've just re-implemented *part* of Common Lisp, or *part* of Java.
Thus we come to Greenspun's 10th law of programming:
"Any sufficiently complicated C or Fortran program contains an ad-hoc, informally-specified, bug-ridden, slow implementation of half of Common Lisp."
You wrote: "Oh well, I guess that's what makes people so interesting. The plethora of personalities. Doesn't mean he's right, though." Bill Joy's opinion that C is a really dangerous language isn't a quirk of his personality. It's an evaluation based on decades of experience as a pioneer in the computer industry, and a deep understanding of the fact that different languages really are better or worse.
You are missing the point. It's not a matter of dislike. Preference doesn't enter into it. Buffer overflows are a fact of life in C. Anytime you have unchecked array access, you're going to have that problem.
That doesn't make C an awful, bad language, necessarily, but to it does imply that too many programs are written in C that would be better written in say, Python, or Ruby. If you're not in the kernel or doing something truly performance-sensitive like A/V work, you really shouldn't be using C. If you
I have never written any C or C++, as I went straight from BASIC and APL (woohoo APL, those little upside down triangles!) in high school to Pascal to ADA to Modula2 at University. I dropped out of uni when they said I had to learn fortran and cobol, and to be honest my knowledge of SQL is pretty damn limited (hooray for Hibernate). But i reallly got hooked on 68000 assembler, having been a 6502 geek for years, and I loved the raw thrill of coding in languages like RDL [possenet.org] and then using 4D to do web-fronted
Java can do some things by default that C can't, by default--buffer overflow checks, for example--but that doesn't make it necessarily "better".
Strange as it may seem, it does.
Of course, I should immediately qualify this assertion by adding "in the context of implementing general-purpose business information systems", but I doubt if that will be too far from the territory of most of the/. audience.
The reason is simple. While I can build a system that doesn't suffer from buffer overflows in C, the only
The difference is (and don't get me wrong here, I'm not a Java fan) is that Java checks the validity of the cast at runtime, where as C just does whatever you tell it to. It's perfectly possible to do things what can cause horrendously bad problems with invalid casts in C. Of course, I haven't seen many Java programs that will explicitly trap and try to recover from a badCast exception, so whatever.
Well, Java has to allow that since it doesn't support generics (at the moment). Otherwise, you'd only be able to get Object instances from the data structures and wouldn't be able to do anything useful with them. There's also the problem that designing software that doesn't cast to the extending/implementing class is very difficult.
I feel that the problem is that people try to write inappropriate things in C. Unless you absolutely need to have very high performance and you must keep memory usage down, there's little need to use low level languages for desktop applications. Take Something like an instant messenger client. Since they rarely do anything CPU or IO intensive, they wouldn't feel slow if they were written in Python, C# or Java.
Correct, Javascript is not Java... however cross-site scripting is when the web application allows unchecked injection of Javascript etc. into the output thus allowing one user to run scripts on another users browser, and a whole related host of fun stuff..
The problem here is with the web application, not with Javascript.
The solution is to fix the web application so it doesn't trust user input blindly.
The web application will be written in a language such as Java. The cross-site bug was introduced by a
Some wonderful conceptualisations and insights into technology closely followed by statements that make you wonder if Bill is actually in the same universe as us, nevermind on the same planet.
Anyway thanks for Java, its a fantastic development language, please stop telling us we are going to have/need JINI in every toaster, lightfitting and piece of cutlery we own and best of luck for the future.
One of the other tasks the article metions Joy working on is a long awaited rewrite of vi to include a slick Java Swing GUI interface and the migration away from moded operation to Ctrl key sequences.
According to Joy, "The Control key wasn't available when I wrote vi in the 70's. Back then it was the cent symbol key (you know, that little "c" with the line through it?). So we had to go with this kludgy insert mode thing that just, well, rather sucks."
I think they are just side-stepping the real news which is that Sun outsourced Bill Joy. The new Bill Joy is working for 1/10 the rate and lives in Punjab.
I wonder if people will describe the outsourcing trend by taking a cue from the allegedly cute US-to-India film industry comparisons and using the phrase "Silicon Bali"...
why not fix C and C++ instead of going on about it being buggy, etc.. fix what we current have, not make new implementations of it that require a mass change to use it, not to mention java is a ram whore.
anyways, I do like his idea on fixing common internet problems, however, a lot of that would be simple to fix, example, smtp has been a standard for decades, yet, it's one of the most exploitable protocols ever in existance, all is needed to be done is fix the mail protocol so it cant be so easily abused, (
I wrote about the Fortune's interview of Bill Joy a couple of days ago here [weblogs.com]. But I focused my summary on his comments about the article he wrote for Wired in April 2000, "Why the future doesn't need us [wired.com]," in which he said that rapid advances in genetic engineering, nanotechnology and robotics (collectively known as GNR) could endanger our lives. And in this long text [cio.com] published by CIO Magazine, Ray Kurzweil also writes about the dangers introduced by new technologies. More specifically, he also gives his view
But it doesn't come from Washington. It comes from Bentonville, Arkansas.
Wal-Mart, headquartered in Bentonville, Arkansas, runs about 3300 stores. It's the biggest retailer in the world. It's the biggest employer in the the US. It's four times the size of the #2 retailer (Home Depot). Wal-Mart's total revenue is over $200 billion. This is more than most small countries. And they're still growing.
Wal-Mart controls a bigger economy than Gosplan, the USSR's state planning agency for the civilian sector, ever did. And Wal-Mart's control is far tighter. Wal-Mart has far more computing power than Gosplan ever did. Wal-Mart tracks sales daily; Gosplan seldom did better than obtaining annual numbers. If sales of something go up, manufacturers are told within days to increase production. If sales go down, Wal-Mart pulls the plug on the maker just as quickly. Gosplan could only dream of control like that.
Wal-Mart's "Corridor of Doom" is famous in retailing. That's where you go to sell to Wal-Mart. There's a long hall with buyer's offices, and a waiting room with a pay-per-use coffee machine. Sales reps, and even CEOs, go there and grovel before a polite Wal-Mart buyer who, by tradition, opens with "And what can your company do for Wal-Mart today". The buyer, equipped with data on all of Wal-Mart's suppliers,
then squeezes the sales rep on price. Hard.
Companies that sell to Wal-Mart don't make big margins. If they do, Wal-Mart searches for an alternative supplier, and plays the suppliers off against each other. (That's why they push Linux.)
That's how the American consumer product economy really works today.
Bill Joy is just a typical old programmer full of whimsical opinions. The only reason he's being interviewed by Fortune is that he was in the right place at the right time and is therefore rich. If you read his "six phases" description you see that he basically stopped working in 1987. After that, he just putzed around. I think it's pretty obvious that with Sun in bad financial shape, McNealy finally kicked him out.
Joy comes close to saying Solaris should be re-written in Java. He's not very realistic. When I think of secure programs, I think of qmail, postfix and djbdns. All written in C. I can't even name a Java mailserver or DNS server off the top of my head.
Another reason spam is so bad is that so many companies use Microsoft Outlook for reading e-mail. Again, because that program is written in C, it's quite easy to design a virus to go through your e-mail address book and broadcast spam to all the people you know.
Outlook's numerous viruses are not caused by the program being written in C or C++. They are caused by Outlook's support for active content. The problem would still exist if Outlook were re-written in Java. I wonder if nobody in Joy's circle dares to correct him on this, or if he's been corrected and just didn't hear.
Take any random clever programmer over 30 and give him $100 million. He will wander off into the sunset, murmuring about his brilliant new idea for re-architecting the internet or something. He will never again do or say something relevant.
Java is only one of the languages that completely prevent stuff like buffer overrun exploits etc. In fact, pretty much every single language except C and C++ do.
He is correct, but it's really not all the feasable in the real world. For all the people that say programmers should be grossly ineffecient, and let the newer processors take up the slack, there are thousands of companies that can't get their important programs to run fast enough, even after spending millions on computer hardware... Making everything in Java is only going to make the situation a couple orders of magnitude worse.
If Sun, or someone else, would come along and modify C slightly by removing unsafe functions, and providing alternatives, you could have the best of both, while not having to completely rewrite all the old code.
For decades, "inefficiency" has been the excuse that programmers have used to justify a multitude of sins. Now that computers are thousands of times faster, it is still used to justify unsafe design and implementation decisions. Improvements in compiler technology have reduced the speed penalty for error checking, but that hasn't stopped people from implementing new systems in unsafe languages.
Don't tell me that leet programmers don't make those stupid mistakes, only idiots. Even if you are God's gift to
I am so tired of the canned responses on slashdot telling me that only dumb programmers produce errors, and that the entire industry of software tools only exists because we clearly aren't smart enough to catch on the the lowest facts grasped by posters.
I used to think like this too - when I was in college. Back when the coding projects I worked on were the dorky isolated projects assigned by my profs. Oh it was so easy to pontificate when I only had to code the travelling salesman problem.
It wasn't directed at you, it was a preemptive response to the common argument that the problem isn't the tool, it's the craftsman. Don't take it personally.
Depends on what you're doing, but Java most certainly can be 100x times slower than C. When Java was first introduced, 50-100x slower than C code was in fact the rule of thumb.
It's alot better now, of course, and it's hard to get clear performance profiles when you include semi-random things like garbage collection overhead, but in terms of "resources consumed for execution of X algorithm", Java can easily meet that 2 orders of magnitude figure. At least 1.
Myths stick for longer than facts. For example, are Lisp and Smalltalk slow? The answer is now, in fact some implementation of Lisp can beat C programs in speed contests for certain tasks. But people still like to believe that we live in the 60's when Lisp was only interpreted and was really slow. The same goes for Smalltalk.
Java is not very slow anymore. Typically a Java application is 3-4x times slower than a C application, which is perfectly accepteable considering all the safety stuff it gives yo
You are absolutely correct. Somehow, somewhere, programming langauges have become required to compensate for programmer laziness/productivity/whatever... Just because a programming language allows a programmer to do stupid things doesn't make it inferior. The things that allow you to do stupid things also make extrememly powerful. Write a device driver/embeded system/OS in Java... I don't think so.
Somehow, somewhere, programming langauges have become required to compensate for programmer laziness/productivity/whatever...
That "somewhere" just happened to be the point at which programs became so incredibly complex, that it would take a small army of programmers to ensure that it is secure, and free of serious bugs.
It's one thing if a language lets you do stupid things, it's quite another when a handful of some of the best programmers in the world (and millions of eyeballs), can't keep a single progra
But I'd feel more respect for his comments if he hadn't said
>so many companies use Microsoft Outlook for reading e-mail. Again, because that program is written in C, it's quite easy to design a virus to go through your e-mail address book and broadcast spam to all the people you know. As soon as your company starts using Outlook, you can see
Outlook's scriptability has nothing to do with its being written in C++.
Outlook's UI for attachment handling has nothing to do with its being written in C++.
Outlook's historical willingness to do dangerous things driven by HTML code in the preview pane has nothing to so with its being written in C++.
The problems Joy mentioned, of email forwarding itself to everyone in the address book, are not accidental buffer overflows. They're the malicious use of features intentionally designed into the program.
Everything? No, but a lot probably can. Personally I don't like python one bit, but I'd feel much safer if most of my day-to-day apps were written in it.
Except that's wrong. Running Hello World involves booting up what is, in effect, an entire operating system (the Java VM, with virtual memory, threading, everything, the works).
Ok, here's an experiment:
a) run Hello World in Java
b) run Hello World in C (including booting up Linux)
Except that's wrong. Running Hello World involves booting up what is, in effect, an entire operating system (the Java VM, with virtual memory, threading, everything, the works).
ARGH. This entire thread appears to be populated by people who have perhaps learned everything they know about programming from other slashdot posts. Every working programmer I know and respect doesn't even flinch at the suggestion that you should always use the highest level language you can get away with. I really would like to know the background and amount of working code posters here have on their resumes.
Actually, strangely enough, the latest versions of Java tend to roughly the same thing- they load the Java VM once when you run the first program, and then the next Java program loads and runs quickly.
And the 0.2 seconds become more and more insignificant in more interesting programs...
That's only true if the 0.2 second delay only happens once (or a few times) in the program. When that delay is inside a loop that executes a few hundred times... and there are hundreds of such loops in the program... suddenly you're sitting there wondering if your machine has crashed because it's taking so damn long to do anything.
But, then, the Solaris kernel is not a distributed program to be run over networks.
As long as a language is "faster" than the network, it'll be fast enough for that kind of use. E.g., there's no particular reason to write a browser in assembly because it spends almost all of its time waiting for the netowrk to do something.
Java doesn't have the speed to do many things efficiently.
Optimization is always the last thing that you should do on a project. This means that implementing the software in C/C++ should be the last resort. Most of the time, most of your software will run just fine in a safer, easier to use language. When you run into performance issues, that's when you port pieces of your program to C. Unfortunately, a lot of people just assume that they should always start coding in C or C++ right off the bat.
How? Dynamically typed languages know the types at runtime. They're not going to core dump just because you feed a string to a function that expects an integer. It will most likely raise an exception that you cleanly handle at an appropriate spot. I find that 99% of the time, this happens the first time you try to run the code; often sooner than your compiler would have finished rebuilding a static implementation. Look at the stack trace, go to that line of code, fix
This happens with any programming language. Microsoft Office manages to out-bloat itself on every release, and it's written in C++.
At the same time I have seen extremely lean effificent programs written in safe languages. And let me emphasise this again: Java is not the only safe language around, it's just the most popular right now, together with Python I guess.
If it was bad attitude on the programmers part to use development tools and languages to minimise errors and make us more effeient, we'd stil
"What is the actual cost of greenhouse gases, for instance? If you create a marketplace mechanism to solve that problem, you will probably end up creating wealth, and people would stop doing the stupid things they do now because it doesn't cost them anything. The Soviet Union collapsed not because of communism or central planning, but because of corrupt accounting. They couldn't organize the means of production because everybody was lying about everything. It was a game of fake numbers, and when you do that
Actually, this is standard practice, or should be, and not just in the IT industry either. By having a company engineer disconnect the network, collect any company owned kit, etc. there is an audit trail that exonerates the ex-employee from any allegations of misappropriation of those resources.
Sorry to break your bubble, but most of the time, large corporations have IT people to do stuff like this. It's not like Joy has the root password to the servers to go remove whatever email he wants. He doesn't, I don't (I work for Sun too), and while both of us are quite capable of managing that aspect, since it has nothing to do with what Sun pays us to do, we don't do it.
The kernel was re-written to be modular 15 years ago, which you'd know if you had read more than the first page of the article. As for the other layers of the OS, much of that is modular too; it's called "packages", quite similar to "rpms" that you might have heard of.
If the language makes it easy for the good programmer to screw up, there is a problem with the language.
C is a fine language for computing-intensive tasks and for low-level programming. But why in the name of God is it still used to program IM clients, IRC clients, and other user applications which do not need to be blazingly fast? Please use safer languages for these tasks (Python, Java, O'Caml, SML, whatever) and make sure that you don't expose your users to a myriad of security holes because one nigh
The problem with writing an im client in Java is that an im is something which always is runnig. There the heavy memmory requirement/usage of the java vm is a big problem, because you don't want 10-20MB memmory taken away by the im.
This problem would not be so big if only sun would make a vm which allowed many programs running in the same vm thus sharing the memmory usage.
And it actually flew, once, unlike most of the waffle we hear from people like Bill Joy.
Languages are just tools, and only an idiot blames tools for the things we make. Windows is (a) the most popular OS on the planet, and (b) written by large teams pushed to compete on features not security. No wonder it's worm heaven. If it was written in Java, it'd just be heaven for another class of parasite.
But Bill Joy is burnt out, his vision of Java Everywhere only came partly true because of massive hyping for
I don't know about the accounting portion, but it was corruption in general, and greed specifically that caused the Soviet system to fail. Communism and Socialism in an of themselves are wonderful economic models, they just require a form of government that isn't inherently greedy and/or corrupt. Greed will eventually be the undoing of the U.S. government, just as it has been the undoing of every major world power for all of human history.
> This problem is NOT fixed to any programming language. ANY large project will have problems with maintanance unless it is held together with a good project management package.
Actually it is. Programming languages like Java allow for scalability of the development. I'd rather maintain 20 million lines of Java than 20 million lines of C. With C you'd be fixing stuff most of the time that is handled by the JVM for you. This allows you to focus on other stuff (e.g. adding features, otimizing stuff). Of co
Joy may not be with Sun... (Score:3, Insightful)
This article is one big "Java can solve all the internet's problems" troll. As if Microsoft's problem is because their code is written in C instead of Java. That's ludicrous.
A programming language can't change people's behaviour. Only PEOPLE can change people's behaviour. Bill Joy's obviously a smart guy, but his railing against what he calls "antiquated" languages and his lack of understanding on why programming languages have nothing to do with e-mail viruses being able to spread so easily shows why Sun is no longer in such a position of prominence.
His statement about how he "designed solutions for problems that people didn't yet know they had" either shows a complete lack of understanding of the way NORMAL people use technology or he's started believing his own marketing spin about Java and Sun's other technologies.
It makes me wonder if Joy is leaving Sun because he's bitter that Sun couldn't take down Microsoft and that Java, while a very powerfull programming language that definitely has it's place in certain types of projects, isn't the language of choice for programmers everywhere.
Imagine that you are an alcoholic... (Score:4, Interesting)
...and that, after some real calamity in your life, you have decided to go cold turkey.
Now, where would you rather go cold turkey? Locked in a liquor store, or locked somewhere free of alcohol?
A C compiler is the liquor store of systems programming. It reinforces all the bad habits and rewards none of the good.
C has no formal definition for exceptions (signals can't really count), it does not force good behavior in allocating memory/objects from the heap, the stdio library is slow because of multiple buffer copies (David Korn replaced it with sfio in ksh93), C is constantly beaten by Fortran in computation-intensive applications, Python has shown that C sylistically leaves much to be desired, and this is only the beginning of the criticism.
I like C a lot too, but ultimately, there is no future in it beyond low-level applications that need to work at a near-assembler level.
Can you really imagine C being used for systems work in 50 years?
Re:Imagine that you are an alcoholic... (Score:2)
Sadly, yes. And maybe thats only because I'm either ill-informed or unimaginative.
Barring the low level stuff (Kernel stuff is de facto C, if not de jure), how else can you get performance? Ada is going the way of the Dodo (there are still a few huge legacy apps running around). Java can't take its place until a rock-solid JVM is common (is there one available?). There are far too many stories of applications running out of memory becau
Re:Imagine that you are an alcoholic... (Score:2)
Re:Imagine that you are an alcoholic... (Score:2)
Perhaps that's because he's juist talking up Java at the expense of everything else. Hands up if you've ever heard of a system rewritten in Java that failed atrociously.
Re:Imagine that you are an alcoholic... (Score:2)
As for Cobol- I'm UN-informed. I thought the majority of its place in the market was just legacy support? Mind you, legacy support is a multi-billion dollar industry (thats what we do now with ADA). So is there a lot of new development in Cobol?
Re:Imagine that you are an alcoholic... (Score:3, Insightful)
Fortran is easier to optimize and vectorize than C, which is why it has a strong hold on scientific computing. Optimizers can assume a great deal about Fortran programs that cannot be assumed about C.
Cobol is still alive and well in many business-oriented computing environments. There are Cobol programmers working in the office down the hall from me. New systems implementations in Cobol continue today.
Re:Imagine that you are an alcoholic... (Score:2)
Please tell me where. My mother is an out of work Cobol programmer. She can't find a job anywhere anymore.
Cobol is as good as dead. The jobs left are pretty much legacy support. Maybe your case is a special one but for the most part it's dead. Learning to program Cobol now is like learning sanscr
Re:Imagine that you are an alcoholic... (Score:2)
Re:Imagine that you are an alcoholic... (Score:4, Informative)
For user-land software, things like python are becoming very practical. Java is probably acceptable for daemons and such (so long as they're not massively performance critical) but isn't ready to be used for anything with a GUI or where startup time matters.
Java GUIs (Score:4, Interesting)
*shrug*, it works for us.
We've switched almost entirely from Powerbuilder to Java, including writing fairly rich GUIs in it. (I personally think the Java GUIs look and feel better than the PB ones).
The big issue with Java GUIs is that it's almost impossible to do them in a "knock-up" way, (something that VB, PB and the like are good at).
People try it, and then end up with junk and blame it on the tool. It's true that if you want to throw a GUI together as cheaply and easily as possible, then Java isn't the right tool, but if you want to put together a GUI that fits into a well designed system, then swing works just fine.
As Gosling recently said,
Re:Imagine that you are an alcoholic... (Score:3, Insightful)
This is a myth and it's been debunked so many times I stopped counting. Look at the Eclipse [eclipse.org] project -- the Win32 UI is native (written using SWT) and just as responsive as apps written in C++.
Re:Imagine that you are an alcoholic... (Score:3, Informative)
Better warn those C/C++ developers using Borland's C++BuilderX [borland.com] IDE.
It's written in Java and uses Swing, just as JBuilder has for years.
Re:Imagine that you are an alcoholic... (Score:2)
Neither is perfect. They are certainly different.
Both can be avoided, given painstaking control of memory life-cycles.
Re:Imagine that you are an alcoholic... (Score:3, Insightful)
Wow (Score:2)
The problem isn't the C language. The problem is, as always, language bigotry and poor breadth of knowledge.
Of course, that sword cuts equally in all directions. What language can you imagine as "the" systems language in 50 years? Can the future really hope to hang on to diversity? Where will we attain unity?
If we teach all the C programmers Java, and all the Java programmers C. Then we'll get world peace! (Oh wait, that's jus
Re:Wow (Score:3)
Joy is right that more structured languages reduce programming errors. When it comes to working with Java, you can feel when your code is getting ugly because it starts to deviate from the clean design of (most of) the language's libraries.
With C (for example), there are few standards upon which to measure the "cleanliness"
Huh? (Score:3, Insightful)
If your python app is choaking on invalid input, it's because you can't program for shit, not because exceptions suck. If it was a C app, y
Re:Joy may not be with Sun... (Score:4, Insightful)
- adam
Re:Joy may not be with Sun... (Score:3, Insightful)
Not really. If one had to describe Windows' vulnerabilities in a few phrases, buffer overflows, untrusted code and uncontrolled access would be a reasonable summary.
These vulnerabilities are all properly and intrinsically addressed in Java. It is not possible to circumvent the controls by sloppy or malicious programming, therefore Java does enforce secure behaviour.
Joy's comments might represent an exaggeration or simplification, not unreasonable considering the intended audience, but t
Re:Joy may not be with Sun... (Score:2)
After sun ... (Score:5, Funny)
(Oddly enough, there isn't a company that bears the name of the missing planet you're thinking of
Re:After sun ... (Score:3, Funny)
Perhaps the best part of that page is "Uranus Headlines" on the right.
Idiot or Liar? (Score:5, Insightful)
Again, because that program is written in C, it's quite easy to design a virus to go through your e-mail address book and broadcast spam to all the people you know.
The problem with Outlook isn't "C," the problem with outlook is Javascript, VBScript, and Windows Scripting Host, which are PRECISELY the sorts of high-level languages [and their interpreters] that this little terd is advocating.
Or is he just a common liar? I dunno - you be the judge.
Re:Idiot or Liar? (Score:2, Interesting)
Fortune Magazine- Who's the audience: PHBs. Who buys systems: PHBs. His candid interview is nothing but a sales pitch.
Re:Idiot or Liar? (Score:3, Informative)
The problem with Outlook isn't "C," the problem with outlook is Javascript, VBScript, and Windows Scripting Host, which are PRECISELY the sorts of high-level languages [and their interpreters]
Err no. He's definetly not an idiot (SUN anyone?) and he's not a liar. What he means by this is that as Outook is written in C, buffer over/underruns can happen which is what most viruses exploit (they then proceed to use high level languages such as Javascript etc. to get the email addresses and broadcast spam and
Re:Idiot or Liar? (Score:5, Informative)
The issue isn't with the programming language _per se_. Obviously some programming languages are more dangerous then others. Obviously some programmers are worse than others.
The issue is with secure and contained execution environments. Properly "jailing" software (whether a process in an operating system, or a thread and window box on a preview pane in Outlook) is the real answer. Engineering has long known that compartmentalisation is key to minimising risk and impact. Operating systems are getting better at doing it. Programming languages are gradually working towards it.
You can have all of the aforementioned and current problems with buffer overflows, language defects, etc: but if the impact is limited (say, to a display pane in Outlook) then the worst that can happen is psychological damage, nothing more. From one point of view, the preview pane should only be doing that: showing me a preview - it shouldn't be granting access to resources around it.
I think that one of the key technologies that Java brought to the computing landscape was the concept of a secure machine (JVM) for a programming language (at a lower granuality than for a monolithic operating system). Argue as much as you like about how succesfull this was (I do remember much debate and technical attention given to it in the early days of Java), but the concept is far more important than the incremental language innovations in Java (i.e. a next-generation SmallTalk or C++).
Give the guy some credit - he's done some very useful technical work - and Java will be one of the technologies in the timeline of the development of computer history. Even if Java itself wasn't succesfull, it's been an interesting experiment and a lot of learning has come out of it.
I recommend this paper as a good read on the bus, just so you can appreciate the technical innovations surrounding the language.
http://www.jot.fm/issues/issue_2003_09/column3
ps. It's obvious he's still pulling the Sun line, but what do you expect ? He put a lot of effort and passion into Sun's technical direction - only a fool would think he's going to drop that overnight.
Re:Idiot or Liar? (Score:2)
So If I tell Java to overrun a buffer, will it?
No, it will throw an exception. Java doesn't allow direct access to memory, so buffers can't be maliciously overrun. Since this exception mechanism is not built into C at the language level, C is inherently more insecure. C opens the door to one of the most common kinds of attack, a buffer overrun, a type of attack to which Java software is immune.
Some languages actually prevent programmers from leaving certain security holes. C provides very littl
Re:Idiot or Liar? (Score:3, Insightful)
No, but you could easily write an e-mail client in Java that interpreted scripts in the body or header fields of an incoming mail by default, and allowed those scripts to do things they shouldn't. This is the single biggest problem with Outlook (Express) and the reason it's responsible for so many virus/spam problems. It has nothing to do with the language used to implement it, and everything to do with the flawed architectural and security policy decisions
Oh dear lord... (Score:3, Interesting)
The fundamentalism never ends man. I'm almost positive when I assert these three facts:
NT Kernel is in C but so is SunOS
SQL Server 2000 is *entirely* C++
I'm almost positive IE is largely, if not entirely written or at least compiled in C++
Re:Oh dear lord... (Score:2)
Whatever it's written in it still compiles down to the instruction set of the CPU or would he rather all CPUs ran Java bytecode?
OO languages simply aren't suitable for all tasks, neither is C. It might shock people like Joy to know that machine code is still written, you sometimes need to to write it for embedded systems.
Re:Oh dear lord... (Score:3, Funny)
Internet Explorer is written in Algol but is compiled in Perl and linked in Smalltalk.
Also with attendant engineering processes (Score:2)
It will be hard for programmers to let go of C/C++ - the religion of low-level programming has been hammered into a generation of programmers even though there are plenty of high level languages th
Re:Oh dear lord... (Score:2)
Didn't Slammer exploit a buffer overflow in SQL Server 2000? A mere 376 bytes with a few in the wrong place, all because of buffer overruns...
Re:Oh dear lord... (Score:2)
No I don't. In fact, I can safely say that you probably haven't understood what C++ is at all. **At all**.
Also, dude, C++ is not Bill's creation. And so, as stupid as ad-hominem attacks are, misplaced ad-hominem attacks are even more stupid. I'm not going to defend bill to defend C++.
Are you fucking smoking Crack?
Re:Oh dear lord... (Score:2)
First of all, C++ isn't just an extention of C as you might seem to think. You are probably thinking "C++ is just a set of runtime routines defined to support class construction and destruction".
The fact of the matter is that C++ has much more rigourous type checking, which is a big problem as a lot of people know. That's the first difference.
The second d
Re:Oh dear lord... (Score:2)
The first (partial) implementations of C++ was, if I recall correctly, the AT&T headers that extended a C compiler.
And although C++ does have stronger typing than C, it's not exactly bulletproof. If you define classes for all of your types, then you can enforce strict typing, but for the 'basic' types (shared between C and C++), code that looks correct and compi
Re:Oh dear lord... (Score:2)
I'm going to venture a bit out of my comfort zone saying this on /. but to me a language, be it computer or natural is a means of expression. The reason why I like C++ so much is because of its dexterity, of the fact that it's actually legal to turn off compiler checks. Although I wouldn't recommend it in a business object, you can come up with some extremely elegant 'hacks'.
Now that being said, I don't think C++ is the only language capable of doing this
Re:Oh dear lord... (Score:2)
I won't let you go uncriticized though, you said:
<quote>I don't think you are fully aware of what you are talking about yourself, my friend.
C++ is merely an extension to C, and a fairly messy one at that.</quote>
The situation is that I've come to realize one thing in life in general: being complacenct to ignorance and fud is just as bad as spreading the same fud. What Joy said in that article is, IMO, more or less FUD. It's plain and simple "push you
Rant continued... (Score:3, Insightful)
Who here runs their hosted sites on two round-robined boxes with distinct kernels and Apache versions?
Nature deals with breakdowns in a complex system with evolution, and a very important part of evolution is the extinction of particular species. It's a sort of backtracking mechanism that corrects an evolutionary mistake. The Internet is an ecology, so if you build a species on it that is vulnerable to a certain pathogen, it can very well undergo extinction. By the way, the species that go extinct tend to have limited genetic diversity.
Are you implying that Microsoft Windows is vulnerable to extinction precisely because it is so dominant?
He, and the article writer, are playing the circle-j*rk game by feeding each other soft-balls...
But the analogy is poorly 'implemented' at best. If anything, Microsoft's culture could be compared to a termite infestation (revel you little zealots - I've just insulted microsoft), but in no case is it actually on the road to extinction. Extinction right now is a bad looming shadow for *BSD and BeOS and OS/2 etc...
Why is the analogy broken? Because the oxygen and glucose of software is money. Not electricity and bandwidth as some might believe. These aren't real life forms, as such your model isn't bound by the same rules. Microsoft is actually from a market perspective WAAAAY more genetically diverse (it's spreading its market investment at an incredible rate) than any other software company out there. If anything, the slashdot people have figured it out: they are like the borg right now, assimilating any genetic makeup they can.
His analogy is fucking broken.
Fuck this shit, I've flipped the bozo bit on this guy...
Re:Rant continued... (Score:5, Funny)
Java : C :: Emacs : vi (Score:4, Insightful)
Am I the only one getting tired of the "my language is better than your language" holy wars? Yes, Java can do some things by default that C can't, by default--buffer overflow checks, for example--but that doesn't make it necessarily "better". One could argue that Java's way of checking everything for you makes programmers lazy, and more likely to make mistakes that Java can't catch--cross-scripting holes, for example.
In the end, an experienced C programmer can get the same job done with the same quality in C as an experienced Java program can in Java, and that ought to be good enough for anybody.
Re:Java : C :: Emacs : vi (Score:5, Insightful)
This simply isn't the case.
Studies have shown (if you're interested, the relevant studies are referenced in "Code Complete" by Steve McConnell) that programmers are capable of writing approximately the same number of lines of code per unit of time in whatever language they program in. Whether it's C, Java, or Sparc Assembler, they'll write pretty much the same number of lines of code in day.
The catch, however, is the expressivity of the languages used. A thousand lines of C will certainly "do more" than the same number of lines of Sparc assembler. Likewise (though arguably not on the same scale), a thousand lines of Java will certainly "do more" than the same number of lines of C. So disregarding errors for the moment, programmers are more productive in a higher level language like Java than they are in C or Sparc assembler.
Now, as far as errors go: it's true that experienced programmers (in whatever language) will make fewer mistakes than less experienced programmers. But they're still human, and even if you're Donald Knuth himself, you're still going to make mistakes. The fact is that mistakes in C are far more costly than mistakes in Java. You can have off-by-one errors in both languages. In Java, however, your program will raise an out of bounds exception and, at worst, halt. In C, such a mistake could easily lead to a buffer overflow security flaw that can be exploited for elevated privilege. The same error in C and in Java is far more costly in C than in Java.
With even higher level languages, entire classes of mistakes cannot even exist, but I don't have time to go into the advantages of such languages like SML or Haskell.
Programmers no matter how experienced, are going to make mistakes. What matters is how costly those mistakes are. And they cost a whole lot more in C than in Java.
Jeremy
(P.S.: I'm a Python and SML fan, myself.)
Re:Java : C :: Emacs : vi (Score:2)
The problem with C... (Score:2)
I've been programming in C for years. Pointer problems aside, the main problem I've always seen with this little language is that there is no fundamental "string" d
Re:Java : C :: Emacs : vi (Score:2)
Oh well, I guess that's what makes people so interesting. The plethora of personalities. Doesn't mean he's right, though.
Re:Java : C :: Emacs : vi (Score:5, Interesting)
The real issue is which language is more expressive. Since I can accomplish any task with any of the dozens of Turing complete languages, which language lets me accomplish the task at hand in the fewest lines of code?
The answer may vary from task to task, but if the task includes the requirement that the finished product be secure, then C loses, because it doesn't protect against one of the most common sorts of attack at the language level, buffer overruns. Common Lisp and Java do. To have this same sort of protection in C, I'd have to write all the additional lines necessary to implement my own runtime to prevent direct access to memory. Hey! I've just re-implemented *part* of Common Lisp, or *part* of Java.
Thus we come to Greenspun's 10th law of programming:
"Any sufficiently complicated C or Fortran program contains an ad-hoc, informally-specified, bug-ridden, slow implementation of half of Common Lisp."
You wrote:
"Oh well, I guess that's what makes people so interesting. The plethora of personalities. Doesn't mean he's right, though."
Bill Joy's opinion that C is a really dangerous language isn't a quirk of his personality. It's an evaluation based on decades of experience as a pioneer in the computer industry, and a deep understanding of the fact that different languages really are better or worse.
Re:Java : C :: Emacs : vi (Score:3, Insightful)
That doesn't make C an awful, bad language, necessarily, but to it does imply that too many programs are written in C that would be better written in say, Python, or Ruby. If you're not in the kernel or doing something truly performance-sensitive like A/V work, you really shouldn't be using C. If you
Re:Java : C :: Emacs : vi (Score:2)
Re:Java : C :: Emacs : vi (Score:2)
Strange as it may seem, it does.
Of course, I should immediately qualify this assertion by adding "in the context of implementing general-purpose business information systems", but I doubt if that will be too far from the territory of most of the
The reason is simple. While I can build a system that doesn't suffer from buffer overflows in C, the only
Re:Java : C :: Emacs : vi (Score:2)
C++ has both options.
Re:Java : C :: Emacs : vi (Score:2)
Re:Java : C :: Emacs : vi (Score:2)
Re:Java : C :: Emacs : vi (Score:2)
Correct, Javascript is not Java... however cross-site scripting is when the web application allows unchecked injection of Javascript etc. into the output thus allowing one user to run scripts on another users browser, and a whole related host of fun stuff..
The problem here is with the web application, not with Javascript.
The solution is to fix the web application so it doesn't trust user input blindly.
The web application will be written in a language such as Java. The cross-site bug was introduced by a
Classic Bill Joy (Score:5, Insightful)
Anyway thanks for Java, its a fantastic development language, please stop telling us we are going to have/need JINI in every toaster, lightfitting and piece of cutlery we own and best of luck for the future.
vi (Score:5, Funny)
According to Joy, "The Control key wasn't available when I wrote vi in the 70's. Back then it was the cent symbol key (you know, that little "c" with the line through it?). So we had to go with this kludgy insert mode thing that just, well, rather sucks."
Re:vi (Score:2, Funny)
Bill Joy Outsourced To India (Score:5, Funny)
Re:Bill Joy Outsourced To India (Score:2)
well.... (Score:2, Interesting)
fix what we current have, not make new implementations of it that require a mass change to use it, not to mention java is a ram whore.
anyways, I do like his idea on fixing common internet problems, however, a lot of that would be simple to fix, example, smtp has been a standard for decades, yet, it's one of the most exploitable protocols ever in existance, all is needed to be done is fix the mail protocol so it cant be so easily abused, (
Ray Kurzweil and Bill Joy About the 21st Century (Score:2)
The US has central planning of consumer production (Score:4, Interesting)
Wal-Mart, headquartered in Bentonville, Arkansas, runs about 3300 stores. It's the biggest retailer in the world. It's the biggest employer in the the US. It's four times the size of the #2 retailer (Home Depot). Wal-Mart's total revenue is over $200 billion. This is more than most small countries. And they're still growing.
Wal-Mart controls a bigger economy than Gosplan, the USSR's state planning agency for the civilian sector, ever did. And Wal-Mart's control is far tighter. Wal-Mart has far more computing power than Gosplan ever did. Wal-Mart tracks sales daily; Gosplan seldom did better than obtaining annual numbers. If sales of something go up, manufacturers are told within days to increase production. If sales go down, Wal-Mart pulls the plug on the maker just as quickly. Gosplan could only dream of control like that.
Wal-Mart's "Corridor of Doom" is famous in retailing. That's where you go to sell to Wal-Mart. There's a long hall with buyer's offices, and a waiting room with a pay-per-use coffee machine. Sales reps, and even CEOs, go there and grovel before a polite Wal-Mart buyer who, by tradition, opens with "And what can your company do for Wal-Mart today". The buyer, equipped with data on all of Wal-Mart's suppliers, then squeezes the sales rep on price. Hard. Companies that sell to Wal-Mart don't make big margins. If they do, Wal-Mart searches for an alternative supplier, and plays the suppliers off against each other. (That's why they push Linux.)
That's how the American consumer product economy really works today.
Past his expiration date (Score:4, Insightful)
Joy comes close to saying Solaris should be re-written in Java. He's not very realistic. When I think of secure programs, I think of qmail, postfix and djbdns. All written in C. I can't even name a Java mailserver or DNS server off the top of my head.
Outlook's numerous viruses are not caused by the program being written in C or C++. They are caused by Outlook's support for active content. The problem would still exist if Outlook were re-written in Java. I wonder if nobody in Joy's circle dares to correct him on this, or if he's been corrected and just didn't hear.
Take any random clever programmer over 30 and give him $100 million. He will wander off into the sunset, murmuring about his brilliant new idea for re-architecting the internet or something. He will never again do or say something relevant.
Re:Uhhh (Score:5, Interesting)
Java is only one of the languages that completely prevent stuff like buffer overrun exploits etc. In fact, pretty much every single language except C and C++ do.
Re:Uhhh (Score:5, Insightful)
If Sun, or someone else, would come along and modify C slightly by removing unsafe functions, and providing alternatives, you could have the best of both, while not having to completely rewrite all the old code.
Inefficiency (Score:3, Interesting)
Don't tell me that leet programmers don't make those stupid mistakes, only idiots. Even if you are God's gift to
AMEN (Score:3, Interesting)
I used to think like this too - when I was in college. Back when the coding projects I worked on were the dorky isolated projects assigned by my profs. Oh it was so easy to pontificate when I only had to code the travelling salesman problem.
Now I respect pro
Re:Inefficiency (Score:2)
Re:Uhhh (Score:2)
Are you really suggesting java is 100x slower than C/C++. Or do you just not know what "a couple orders of magnitude" is?
Re:Uhhh (Score:2)
It's alot better now, of course, and it's hard to get clear performance profiles when you include semi-random things like garbage collection overhead, but in terms of "resources consumed for execution of X algorithm", Java can easily meet that 2 orders of magnitude figure. At least 1.
Re:Uhhh (Score:2)
Java is not very slow anymore. Typically a Java application is 3-4x times slower than a C application, which is perfectly accepteable considering all the safety stuff it gives yo
Re:Uhhh (Score:2)
Re:If C had had bounds checking (Score:2, Insightful)
Re:If C had had bounds checking (Score:2)
That "somewhere" just happened to be the point at which programs became so incredibly complex, that it would take a small army of programmers to ensure that it is secure, and free of serious bugs.
It's one thing if a language lets you do stupid things, it's quite another when a handful of some of the best programmers in the world (and millions of eyeballs), can't keep a single progra
Re:Uhhh (Score:5, Insightful)
>so many companies use Microsoft Outlook for reading e-mail. Again, because that program is written in C, it's quite easy to design a virus to go through your e-mail address book and broadcast spam to all the people you know. As soon as your company starts using Outlook, you can see
Outlook's scriptability has nothing to do with its being written in C++.
Outlook's UI for attachment handling has nothing to do with its being written in C++.
Outlook's historical willingness to do dangerous things driven by HTML code in the preview pane has nothing to so with its being written in C++.
The problems Joy mentioned, of email forwarding itself to everyone in the address book, are not accidental buffer overflows. They're the malicious use of features intentionally designed into the program.
Re:Uhhh (Score:2)
Re:Uhhh (Score:2)
Re:Uhhh (Score:5, Interesting)
Ok, here's an experiment:
a) run Hello World in Java
b) run Hello World in C (including booting up Linux)
Which one is faster? :-)
Re:Uhhh (Score:2)
Not true when you use VM sharing.
For more info, see Sun's project Barcelona [sun.com]
Woefully sadly misdirected on languages (Score:2)
Re:Uhhh (Score:2)
Re:Uhhh (Score:2)
Re:Uhhh (Score:3, Insightful)
As long as a language is "faster" than the network, it'll be fast enough for that kind of use. E.g., there's no particular reason to write a browser in assembly because it spends almost all of its time waiting for the netowrk to do something.
Re:Uhhh (Score:3, Interesting)
Optimization is always the last thing that you should do on a project. This means that implementing the software in C/C++ should be the last resort. Most of the time, most of your software will run just fine in a safer, easier to use language. When you run into performance issues, that's when you port pieces of your program to C. Unfortunately, a lot of people just assume that they should always start coding in C or C++ right off the bat.
I person
Re:Uhhh (Score:2)
How? Dynamically typed languages know the types at runtime. They're not going to core dump just because you feed a string to a function that expects an integer. It will most likely raise an exception that you cleanly handle at an appropriate spot. I find that 99% of the time, this happens the first time you try to run the code; often sooner than your compiler would have finished rebuilding a static implementation. Look at the stack trace, go to that line of code, fix
Re:Uhhh (Score:2)
Re:Insightful? More like ignorant! (Score:2)
At the same time I have seen extremely lean effificent programs written in safe languages. And let me emphasise this again: Java is not the only safe language around, it's just the most popular right now, together with Python I guess.
If it was bad attitude on the programmers part to use development tools and languages to minimise errors and make us more effeient, we'd stil
This sounds sensible... (Score:2, Interesting)
Re:Uhhh (Score:2)
Re:computer inept? (Score:2)
Re:computer inept? (Score:2)
"EMACS is a nice editor too, but because it costs hundreds of dollars, there will always be people who won't buy it."
How the world has changed since 1984...
Re:computer inept? (Score:4, Informative)
Or at least, that's the theory...
Re:computer inept? (Score:2)
Re:modular programming (Score:3, Insightful)
Re:C moron (Score:2)
C is a fine language for computing-intensive tasks and for low-level programming. But why in the name of God is it still used to program IM clients, IRC clients, and other user applications which do not need to be blazingly fast? Please use safer languages for these tasks (Python, Java, O'Caml, SML, whatever) and make sure that you don't expose your users to a myriad of security holes because one nigh
Re:C moron (Score:3, Informative)
that an im is something which always is runnig.
There the heavy memmory requirement/usage of the java vm is a big problem, because you don't want 10-20MB memmory taken away by the im.
This problem would not be so big if only sun would make a vm which allowed many programs running in the same vm thus sharing the memmory usage.
Martin
Re:C moron (Score:2)
Someone mod this guy up funny.
It was the Spruce Goose (Score:2)
Languages are just tools, and only an idiot blames tools for the things we make. Windows is (a) the most popular OS on the planet, and (b) written by large teams pushed to compete on features not security. No wonder it's worm heaven. If it was written in Java, it'd just be heaven for another class of parasite.
But Bill Joy is burnt out, his vision of Java Everywhere only came partly true because of massive hyping for
Re:He should stick to computers (Score:2)
Greed will eventually be the undoing of the U.S. government, just as it has been the undoing of every major world power for all of human history.
Re:He does raise some good points, then again... (Score:2)
Actually it is. Programming languages like Java allow for scalability of the development. I'd rather maintain 20 million lines of Java than 20 million lines of C. With C you'd be fixing stuff most of the time that is handled by the JVM for you. This allows you to focus on other stuff (e.g. adding features, otimizing stuff). Of co