The Artima Developer Community
Sponsored Link

C++ Community News Forum
The Problem with Programming

212 replies on 15 pages. Most recent reply: Dec 8, 2006 6:12 AM by James Watson

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 212 replies on 15 pages [ « | 1 2 3 4 5 6 7 8 9 ... 15  | » ]
Faui Gerzigerk

Posts: 13
Nickname: faui
Registered: Oct, 2006

Re: The Problem with Programming Posted: Nov 29, 2006 11:13 AM
Reply to this message Reply
Advertisement
> I have surveyed and even worked on "J2EE-like" solutions
> written in C++, and trust me, it was not pretty.
>
> Why? Because C++ doesn't have standard libraries for
> "modern programming" (multithreading, remotability,
> security, servlets, introspection, dynamic loading,
> etc...), so you end up reusing non-standard ones or
> rolling your own. Add this to the intrinsic complexity of
> the language, its non-portability and still very-buggy
> compilers, and you'll quickly find out why Java is more
> productive.

I agree that Java is today the most productive way to write cross platform software that needs to use a lot of facilities. The Java library is broad, robust and very useful. However, if you know you're going to deploy on Linux or Windows, there are platform specifc solutions for all of these things and they are, in some cases, better than Java's lowest common denomiator approach.

> > Dynamic languages provide more facilities for
> abstraction
> > as part of the language, but at a high performance cost
>
> It depends what kind of performance you need. If Java is
> good enough for the likes of Google, Yahoo and eBay,
> surely it's good enough for a lot of people...
>
> > and without any kind of compile time checking.
>
> How so? Both languages are equally strongly typed.

Sorry for causing confusion. I meant to talk about dynamic (as in dynamically typed) languages like Python or Ruby, not Java or C#.

I was thinking of meta programming techniques that are available in Python or Ruby, but not in Java or C#. C++ can do astonishing things with templates. Java has no means for more advanced abstractions with the language. You have to resort to the kinds of crutches I mentioned in my first post.

Alex Fabijanic

Posts: 71
Nickname: aleksf
Registered: Aug, 2006

Re: The Problem with Programming Posted: Nov 29, 2006 11:26 AM
Reply to this message Reply
> For those of us who have used both C++ and Java
> extensively (I think Cedric was on the C++ standards
> committee for example), BS comes across as anything but
> no-nonsense. He is emotionally coupled to C++ and refuses
> to think objectively about the advances that have occurred
> outside of C++.

I fail to see any significant language advances that have occurred outside C++. Garbage collection? Google returns close to million hits. Generics? Yes, I know, long error messages and buggy compilers etc, but the bottom line is - STL is a decade older than Java generics which, please correct me if I'm wrong, boil down to a fancy casting syntax. Reflection? RTTI. Exceptions? Got it. Closures? They're coming in C++0x. So, what exactly are those "advances outside C++"?

> Regarding the other comments on the thread, they are
> hardly anti-C++. Those of us that used it appreciate C++
> for what it is, and those of us that have moved to newer
> and arguably improved languages understand C++ for what it
> isn't.

Any language is for something and is not for something else. Java was intended for something completely different than for what it is mostly used nowadays. The topic of the interview was "The Problem with Programming" and I clearly see and agree with what Stroustrup is saying about the topic - there is a problem with programming and it's a lot of sloppy written code. Whether the software industry would benefit from a slower and more careful progress is something to think about.

James Watson

Posts: 2024
Nickname: watson
Registered: Sep, 2005

Re: The Problem with Programming Posted: Nov 29, 2006 11:27 AM
Reply to this message Reply
> > > Java, for example, was originally marketed
> > > as a language for non-programmers!
> >
> > Can you provide a reference? Java was originally
> created
> > for developing embedded systems. That's not really the
> > normal domain for non-programmers.
>
> I read this in an article, but I don't remember which one.
> It didn't refer to the original design of Java, but to its
> subsequent use as a Web development language and a
> language that will replace C++. That was around '96, '97.

I can believe that Sun marketing might have pushed that but it's clearly nonsense and wasn't never intent of the language by it's designers as far as I know.

James Watson

Posts: 2024
Nickname: watson
Registered: Sep, 2005

Re: The Problem with Programming Posted: Nov 29, 2006 11:33 AM
Reply to this message Reply
> How much Java does Google use? What do they use it for?
> Chris DiBona, who heads up Google's open source
> development and software technology acquisition (if I
> remember right) said recently at a conference which I
> attened that Google uses very little Java.

I don't know but when I scroll down to the bottom of this page I see:


Java Programming
Google is looking for Java experts.
Apply to Google New York today!
www.google.com/jobs

James Watson

Posts: 2024
Nickname: watson
Registered: Sep, 2005

Re: The Problem with Programming Posted: Nov 29, 2006 11:35 AM
Reply to this message Reply
> I fail to see any significant language advances that have
> occurred outside C++. Garbage collection? Google returns
> close to million hits. Generics? Yes, I know, long error
> messages and buggy compilers etc, but the bottom line is -
> STL is a decade older than Java generics which, please
> correct me if I'm wrong, boil down to a fancy casting
> syntax. Reflection? RTTI. Exceptions? Got it. Closures?
> They're coming in C++0x. So, what exactly are those
> "advances outside C++"?

I think you are missing the point and focusing on features. The advances are in easy of use and maintainability for the most part.

But does C++ support continuations? Just curious.

Cedric Beust

Posts: 140
Nickname: cbeust
Registered: Feb, 2004

Re: The Problem with Programming Posted: Nov 29, 2006 11:38 AM
Reply to this message Reply
> How much Java does Google use? What do they use it for?
> Chris DiBona, who heads up Google's open source
> development and software technology acquisition (if I
> remember right) said recently at a conference which I
> attened that Google uses very little Java.

If you can find a link, I'll make sure to personally chastise Chris for speaking in public while under the influence :-)

Google uses *a lot* of Java. A lot.

And more every day.

--
Cedric
http://beust.com/weblog

Cedric Beust

Posts: 140
Nickname: cbeust
Registered: Feb, 2004

Re: The Problem with Programming Posted: Nov 29, 2006 11:50 AM
Reply to this message Reply
> I fail to see any significant language advances that have
> occurred outside C++.

As does Bjarne, along with most C++ hardcore developers, which is unfortunate.

Garbage collection? Google returns
> close to million hits. Generics? Yes, I know, long error
> messages and buggy compilers etc, but the bottom line is -
> STL is a decade older than Java generics which, please
> correct me if I'm wrong, boil down to a fancy casting
> syntax. Reflection? RTTI. Exceptions? Got it. Closures?
> They're coming in C++0x. So, what exactly are those
> "advances outside C++"?

Again, you are focusing exclusively on language features which, as I mentioned earlier, are no longer what modern programming (as in "solving today's problems") is about. Besides maintainability, readability and productivity, here are some innovations that happened in the Java world first (and if you're lucky, eventually got picked up by C++, although it's a rare occurrence):

- Servlets, JSP and other templating frameworks
- Database bindings: JDBC, Hibernate and such
- Standard multithread library and heavily documented thread-safe Java patterns
- Simple remote marshalling protocols
- On-the-fly bytecode generation, dynamic proxies
- Advanced IDE's providing smart completion, refactoring, source control support, fast browsing, etc...
- Security
- AJAX and related technologies (e.g GWT)
- AOP
- etc...

> I clearly
> see and agree with what Stroustrup is saying about the
> topic - there is a problem with programming and it's a lot
> of sloppy written code.

Nobody will disagree with that, and I'm sure this quote applied ten years ago and it will still apply in ten years from now.

What Stroustrup is failing to see is that C++ is one of the main culprits for this sloppy code in the first place, and that while C++ served its purpose two decades ago, the world has now moved to a higher level of abstraction and I, for one, certainly wish Bjarne used his fantastic intellect to try to solve today's problems instead of clinging to C++0x which, if we're lucky, will probably have to be renamed C++1x by the time the spec gets released.

--
Cedric
http://beust.com/weblog

Alex Fabijanic

Posts: 71
Nickname: aleksf
Registered: Aug, 2006

Re: The Problem with Programming Posted: Nov 29, 2006 11:52 AM
Reply to this message Reply
> But does C++ support continuations? Just curious.

Sure. setcontext() et al. on *NIX and Set/GetThreadContext on Win32.

Alex Fabijanic

Posts: 71
Nickname: aleksf
Registered: Aug, 2006

Re: The Problem with Programming Posted: Nov 29, 2006 12:24 PM
Reply to this message Reply
> What Stroustrup is failing to see is that C++ is one of
> the main culprits for this sloppy code in the first place,
> and that while C++ served its purpose two decades ago, the
> world has now moved to a higher level of abstraction and
> I, for one, certainly wish Bjarne used his fantastic
> intellect to try to solve today's problems instead of
> clinging to C++0x which, if we're lucky, will probably

Quite educating. Somehow I thought sloppy code was a consequence of poor programming practices and could be produced in any language. What else is Stroustrup's fault? JFK assasination? Alien abductions?
I really only wanted to point out that the interview topic was addressed properly but got dragged instead into endless "your language is root of all evil and my language is better than yours" discussion.
So, I agree to disagree with you Java-guys. With that statement I shall conclude my further participation in this pointless exchange (still have to do some C++ coding today ;-)

Todd Blanchard

Posts: 316
Nickname: tblanchard
Registered: May, 2003

Re: The Problem with Programming Posted: Nov 29, 2006 12:59 PM
Reply to this message Reply
> I am already seeing the leading edge of the Java continent
> crumbling into the onrushing sea, so I hope to figure out
> what comes next
...
> I think C# is an excellent example of a
> result of myopic "here's how I would have done it"
> thinking.)
>
> I would suggest some general attributes of languages
> moving forward, as opposed to concrete predictions; note
> that I couch these vis-a-vis Java:

Outstanding set of predictions. You've done a bang up job of describing Smalltalk. Which I believe is as close to an ideal environment as any I have ever seen. Straight out of 1980 it remains the most advanced software development environment available. It is also, where I make my bread and butter out producing the Java acolytes.

I recently had the misfortune to revisit some Java code and I felt completely crippled working in IDEA. I was amazed at how depending I've gotten on simply being able to write a line, and execute it on the spot to see what it does to test my assumptions.

Want to know why software is mostly awful? It is because it is too hard to run it, too hard to debug it, too hard to experiment, too hard to play. The Java stuff had a small problem that took me 5 days to isolate. I could have isolated it in Smalltalk in minutes because of the live aspect of the Smalltalk system.

Smalltalk isn't perfect. It is just the best thing so far.

As for Stroustrup. He has done more than enough damage to the state of the software industry with his "correctness, efficient, minimal cost" dogma and frankenstein language. I say this as a recovering C++ master BTW. He is simply wrong and grows ever sadder with his refusal to let go of his monster.

He'd garner a lot more respect if he'd admit the thing was a failed experiment that taught us all a lot and suggested we move on and move forward on a replacement language to fill its niche.

Isaac Gouy

Posts: 527
Nickname: igouy
Registered: Jul, 2003

rewriting history Posted: Nov 29, 2006 1:04 PM
Reply to this message Reply
Cedric Beust wrote
-snip-
> here are some innovations that happened in the Java
> world first (and if you're lucky, eventually got picked up
> by C++, although it's a rare occurrence):
>
> - Servlets, JSP and other templating frameworks
> - Database bindings: JDBC, Hibernate and such
> - Standard multithread library and heavily documented
> thread-safe Java patterns
> - Simple remote marshalling protocols
> - On-the-fly bytecode generation, dynamic proxies
> - Advanced IDE's providing smart completion, refactoring,
> source control support, fast browsing, etc...
> - Security
> - AJAX and related technologies (e.g GWT)
> - AOP
> - etc...

I can easily believe that JSP and JDBC are "Java innovations" on account of the J in the acronym - but suspect that templating frameworks already existed in Perl and PHP, and gosh darn there was that ODBC thingy with C++ bindings.

On-the-fly bytecode generation has been around for decades, Bill Opdyke's thesis was about refactoring C++, the 1997 Aspect Oriented Programming paper talks about "a medium-level language like C, C++ or Java" and "we used C++ as the base aspect description language" ... these are not "Java innovations".

Have you heard about Google's search engine - it's really cool.



Posts: 19
Nickname: pmd
Registered: Oct, 2004

Re: The Problem with Programming Posted: Nov 29, 2006 1:53 PM
Reply to this message Reply
> > How much Java does Google use? What do they use it
> for?
> > Chris DiBona, who heads up Google's open source
> > development and software technology acquisition (if I
> > remember right) said recently at a conference which I
> > attened that Google uses very little Java.
>
> I don't know but when I scroll down to the bottom of this
> page I see:
>
>

> Java Programming
> Google is looking for Java experts.
> Apply to Google New York today!
> www.google.com/jobs
>


This gave me an idea. I went to www.google.com/jobs and did a simple search for Java (154 hits), C++ (179 hits), and Python (174). There's a lot of overlap. Many of the hits scanned just asked for the ability to program in one of any of these languages.

Alex Fabijanic

Posts: 71
Nickname: aleksf
Registered: Aug, 2006

Re: The Problem with Programming Posted: Nov 29, 2006 1:58 PM
Reply to this message Reply
This is too much, so I had to come back.

> As for Stroustrup. He has done more than enough damage to
> the state of the software industry with his "correctness,
> efficient, minimal cost" dogma and frankenstein language.
> I say this as a recovering C++ master BTW. He is simply
> y wrong and grows ever sadder with his refusal to let go
> of his monster.

You forgot to mention that he is also responsible for the crop circles ;-)

> He'd garner a lot more respect if he'd admit the thing was
> a failed experiment that taught us all a lot and suggested
> we move on and move forward on a replacement language to
> fill its niche.

So, let me summarize this thread of discussion:

One hell of a stubborn person is holding a major part of the computing programming world hostage for the last couple of decades by refusing to admit that the programming language used to write majority of the world's software is a failure. How the heck does this guy manage to do that? By embedding Gremlins into C++ compilers?
Moreover, some of the correspondents in this thread suggested that the high demand for C/C++ programmers signifies nothing else but the fact that there is actually need for Java and C# programmers, so employers state they want C/C++ folks because Java/C# has similar syntax.
What's next? Everyone knows O.J. is innocent?

Let me get back to the original topic:

Yes, there is a problem with programming. It is because everyone and his brother think they can program computers and program well. This is resulting in enormous amounts of horrible code running in real world production and wreaking havoc. It has nothing to do with any programming language and everything to do with bad attitude, not enough effort and insufficient knowledge.

Carsten Saager

Posts: 17
Nickname: csar
Registered: Apr, 2006

Re: The Problem with Programming Posted: Nov 29, 2006 2:02 PM
Reply to this message Reply
As a former C++ evangelist I have a lot of sympathies for BS; today I don't like doing C++ anymore because it is so widely misused.

While this topic degenerated into a Java/C++ war: Both languages inherited the C-virus. None of the languages makes you writing OO-code like Smalltalk does. So what you end up in real-life projects is a likely to be a mess of COBOL-style programming convoluted with OO-patterns.

The FP trend aims to eliminate the procedural roots from programming, though I am not sure that this is what will used properly when I see what some people wrote as LISP programs.

I am missing in Java many things from C++ that would make the code more concise, OO is nice but gets pathologically complex if it is just a paradigm and not really in the language. Scala and Fortress are things I am observing very closely for quite opposite reasons (perhaps OO is as dead as procedural programming is believed to be).

BS' point is that it is not only the language but the larger picture. I believe that there is great COBOL software out there or to be more correct: There are not many people who can fulfill the promise to replace it with something written in "X" because of all the other factors that make good software. And even if it had been done, nobody can prove that the new solution can be maintained as well as it is known from the existing code.

I talked to a veteran spec-lead in our shop a while a ago who sees now the 3rd generation of the system and asked me why any new generation is worse (slower, less complete, less comprehensible). The only explanation I had is that the former generations designed the software to their abilities and not to the allegded abilities of the tools and languages they used.

The Agile wave expresses the same unease; we have amassed tons of tools, methologies and theories but the problem is still the same: Budget overruns and quality problems wherever you look. Like people turn religous when desperate,we have a sect the preaches simple life and promises happiness. BS seems to be opposed to that I am have to agree for the presumable large projects he is working on; they work well agile a long time before they tip and you transformed 160% of your budget in a fragmented codebase you cannot even throw away anymore.

Anyway: I predict that C++ will survive Java. Java will not dead but be reborn. I cannot tell which model will be the more effective one.



Posts: 19
Nickname: pmd
Registered: Oct, 2004

Re: The Problem with Programming Posted: Nov 29, 2006 2:03 PM
Reply to this message Reply
> > How much Java does Google use? What do they use it
> for?
> > Chris DiBona, who heads up Google's open source
> > development and software technology acquisition (if I
> > remember right) said recently at a conference which I
> > attened that Google uses very little Java.
>
> If you can find a link, I'll make sure to personally
> chastise Chris for speaking in public while under the
> influence :-)

Sorry, there's no link. It's deniable, but he said it in front of me and several hundred other witnesses, along with another derrogatory comment about Java that I won't repeat. :-)


> Google uses *a lot* of Java. A lot.
>
> And more every day.

Same can be said for C++, but OK, where do they use it, besides in some of their APIs, obviously? Can you give me a link?

Flat View: This topic has 212 replies on 15 pages [ « | 1  2  3  4  5  6  7  8  9 | » ]
Topic: Pantheios 1.0.1 full release approaching; beta 17 just released Previous Topic   Next Topic Topic: John Ousterhout on What Limits Software Growth

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use