I agree. C++ is a powerful, expressive language. I worked on a project where we allocated resources in constructors, deallocated them in
destructors, put objects on the stack or used smart pointers, and used container classes instead of open arrays. We had one problem when someone did not follow the standards but no other significant memory problems. Still, C# and Java are simpler, less error prone languages with most of the power of C++ for many applications.
It is possible to make software development easier. C++ is easier than assembler language and Java and C# are simpler and easier than C++. I was skeptical at first, but garbage collection, strong typing, large integrated class libraries, and the elimination of buffer overflows and dangling pointers can make a programmer's life easier. But it is possible to go too far. I have been required to use Visual Basic on occasion. Although VB is fine for simple tasks, it is a disaster when you try to do something sophisticated. Simplicity is good even when it requires a slight loss of efficiency but not when it requires a loss of power.
I have noticed the same trend. In America, the smart kids want to go into law or business rather than engineering or science. I have two Indian friends who came to America and got advanced degrees in engineering. After a few years working, they went back to school to get their MBA's. Americans dominance in science and technology may be comming to an end.
There have been a number of ground breaking scientific discoveries made since WWII, such as black holes, the microwave background radiation, Quarks, etc. But the more advanced a discovery, the more difficult it is to apply it for practical use. We may see mostly refinement for a long time.
If you define achievement as "contributing to the advancement of Western Science", then I think Europe is going to have a big advantage. For reasons that I can't figure out, modern science originated in Europe during the Renaissance instead of in more advanced societies such as Arabia, India, or China, or in ancient Greece or Rome. These other societies contributed the building blocks, in mathematics and philosophical thought, but the methodical application of the scientific method never really became ingrained in their societies until the modern era.
I'm running it on a 400 Mhz PII with 256 Megs of memory, Window XP, and it runs fine, even when starting up IE. The Task Manager says its taking about 20 Megs of memory and using about 15% of the CPU. Windows Media Player uses about 8 Megs and 15% of the CPU.
I was part of a project to write an image display system of about 100k lines of C++ code. Our coding standards required that we allocate resources in constructors, release them in destructors, and put objects on the stack when possible. When putting objects on the stack was not possible, we used smart pointers.
Towards the end of the project, we finally got our company to spring for Purify. We ran Purify on the code and found a few places where we forgot to release a graphics context, and one place where we didn't follow our coding standards, but no other memory leaks. We than ran purify on a comparable C system and found hundreds of memory leaks.
Proper use of constructors and destructors can make resource management virtually automatic.
Exactly. C++ would not be nearly as powerful without templates, but Java's object model makes templates unnecessary. However, many of us have been taught that casts are a Bad Thing, so templates are being added to assuage our guilt.
My company's product moved from UNIX to Windows several years ago. I have been programming in VB and C++/ATL/COM and hating it. Recently, I've been using C# and the.Net framework for desktop applications. It is really a joy to use compared with VB and/or COM. No more 7 different types of strings, "wizard" generated code, IDL, message maps, HRESULT, etc.
C# is basically Java with performance. It is very easy to program, but powerful. I hate GUI builders, but I have written a layout manager similar to Java's GridBagLayout and it is working out pretty well.
I have always hated IDE's, they hog too much screen space and the editors are always pretty lame compared to EMACS. However, Visual Studio.Net is a dream. It is highly customizable so I can put the non-editor windows in auto-hide mode and have programmed to the keys to be pretty close to EMACS. Now I can switch back and forth between editors without getting brain lock.
Of course,.Net ties you into Microsoft, which is not a good thing, but if you are developing for Microsoft only, it is the way to go.
I interview a lot of CS applicants and I consider a PhD a slight positive. At least it shows that the candidate has the intelligence, interest and dedication to get a PhD. However, the main impression a candidate makes is in the interview. I look for someone who has insight and in depth knowledge about something in CS. Also, I don't think we would pay more for a PhD.
I'm not sure if you can call our application area "business", but here is a good example from my last project. We developed an application that, among other things, displayed images. After the application was "finished", our client came to me with a request. It seems that they were using an image processing application that complimented our application. However, the two systems were using different image formats. I was asked to have our application read the images of the other images natively (as well as our own), instead of requiring a conversion. Because our image object was derived from an abstract image object, all I had to do was write another image object and plug it it. It would have taken me a month or more to plow through 100k lines of code, modifying every image access, if this were not the case.
I don't blame you for being skeptical about the benefits of object oriented programming. Designing an object oriented system is hard and requires experience and insight. I know my first few attempts at designing object oriented systems were only moderately successful. In my current project, we are using a third party software system that has "object" in its name but its objects are really just data structures. We are deriving none of the benefits that an object oriented API would have provided. However, I am firmly convinced that a properly designed object oriented approach is the method of choice.
I haven't read the book but I noticed one of the chapters is "Getting Your Requirements Etched in Stone". I have been adding last minute requirements to my programs my entire career. At first I thought we were doing something wrong. But after a while I realized that people are fuzzy about what they want, they communicate imperfectly, and requirements change. The more accurate your requirements, the better, but unless you are writing a compiler or something, incorrect requirements are a fact of life. If your requirements are etched in stone, you are writing shelf-ware that nobody wants.
Over time, I've learned to write more modular, object oriented code so that a change in requirements can often be dealt with in one object rather than requiring a large scale re-write. Changes in requirements doesn't bother me as much as it use to.
If only one thread is accessing the file, then having it deleted between checking and opening should be handled with an exception. If multiple threads are creating, deleting and accessing files (not the best design) then I would prefer using synchronization through a shared resource rather than using exceptions.
I'd be interested in anyone's favorite references on when it is better to report non-success status in return codes, and when it is better to throw an exception. That is a class design issue that comes up all the time.
It depends on how "exceptional" the circumstances are. For example, if a "file not found" condition is unexpected and requires error recovery, then it should be handled as an exception. If it is something that can occasionally happen during the normal flow of events, then the programmer should check for the existence of the file before trying to open it.
Early versions of C++ did not have exceptions, but exceptions are now part of the ANSI standard. Java exceptions are modeled somewhat after C++ exceptions except that Java throws an exception object, while C++ can throw any type/object.
Its unfortunate that Sun's JVM is about the slowest one out there. Hotspot has never lived up to its potential. The poor performance of the reference implementation is one of the reasons Java has a reputation of being slow.
Actually, IBM got a sweet deal on the MS DOS license. They just didn't get an exclusive deal. They didn't foresee that other companies would reverse engineer the BIOS and sell "IBM Compatible" computers at a price much lower than IBM. Microsoft then got rich selling the OS for all of the non-IBM computers.
It sounds like Apple Works will do the job. It does seem a little strange to buy the Porshe of computers with the Mercedes of operating systems to run the Ford Taurus of applications.
I agree. C++ is a powerful, expressive language. I worked on a project where we allocated resources in constructors, deallocated them in destructors, put objects on the stack or used smart pointers, and used container classes instead of open arrays. We had one problem when someone did not follow the standards but no other significant memory problems. Still, C# and Java are simpler, less error prone languages with most of the power of C++ for many applications.
It is possible to make software development easier. C++ is easier than assembler language and Java and C# are simpler and easier than C++. I was skeptical at first, but garbage collection, strong typing, large integrated class libraries, and the elimination of buffer overflows and dangling pointers can make a programmer's life easier. But it is possible to go too far. I have been required to use Visual Basic on occasion. Although VB is fine for simple tasks, it is a disaster when you try to do something sophisticated. Simplicity is good even when it requires a slight loss of efficiency but not when it requires a loss of power.
I have noticed the same trend. In America, the smart kids want to go into law or business rather than engineering or science. I have two Indian friends who came to America and got advanced degrees in engineering. After a few years working, they went back to school to get their MBA's. Americans dominance in science and technology may be comming to an end.
There have been a number of ground breaking scientific discoveries made since WWII, such as black holes, the microwave background radiation, Quarks, etc. But the more advanced a discovery, the more difficult it is to apply it for practical use. We may see mostly refinement for a long time.
If you define achievement as "contributing to the advancement of Western Science", then I think Europe is going to have a big advantage. For reasons that I can't figure out, modern science originated in Europe during the Renaissance instead of in more advanced societies such as Arabia, India, or China, or in ancient Greece or Rome. These other societies contributed the building blocks, in mathematics and philosophical thought, but the methodical application of the scientific method never really became ingrained in their societies until the modern era.
I'm running it on a 400 Mhz PII with 256 Megs of memory, Window XP, and it runs fine, even when starting up IE. The Task Manager says its taking about 20 Megs of memory and using about 15% of the CPU. Windows Media Player uses about 8 Megs and 15% of the CPU.
Without "syntactic sugar" you have to deal with expressions like this:
equals(a, plus(minus(c,(plus(d,e))),f))
How many judges have a "moderately fair background in Unix/Linux". The American legal system can be pretty random at times.
Here's why Anakin goes bad.
"Anakin, Meesa your father."
"Nooooooooooooooooooo!"
I was part of a project to write an image display system of about 100k lines of C++ code. Our coding standards required that we allocate resources in constructors, release them in destructors, and put objects on the stack when possible. When putting objects on the stack was not possible, we used smart pointers.
Towards the end of the project, we finally got our company to spring for Purify. We ran Purify on the code and found a few places where we forgot to release a graphics context, and one place where we didn't follow our coding standards, but no other memory leaks. We than ran purify on a comparable C system and found hundreds of memory leaks.
Proper use of constructors and destructors can make resource management virtually automatic.
Exactly. C++ would not be nearly as powerful without templates, but Java's object model makes templates unnecessary. However, many of us have been taught that casts are a Bad Thing, so templates are being added to assuage our guilt.
My company's product moved from UNIX to Windows several years ago. I have been programming in VB and C++/ATL/COM and hating it. Recently, I've been using C# and the .Net framework for desktop applications. It is really a joy to use compared with VB and/or COM. No more 7 different types of strings, "wizard" generated code, IDL, message maps, HRESULT, etc.
.Net is a dream. It is highly customizable so I can put the non-editor windows in auto-hide mode and have programmed to the keys to be pretty close to EMACS. Now I can switch back and forth between editors without getting brain lock.
.Net ties you into Microsoft, which is not a good thing, but if you are developing for Microsoft only, it is the way to go.
C# is basically Java with performance. It is very easy to program, but powerful. I hate GUI builders, but I have written a layout manager similar to Java's GridBagLayout and it is working out pretty well.
I have always hated IDE's, they hog too much screen space and the editors are always pretty lame compared to EMACS. However, Visual Studio
Of course,
I interview a lot of CS applicants and I consider a PhD a slight positive. At least it shows that the candidate has the intelligence, interest and dedication to get a PhD. However, the main impression a candidate makes is in the interview. I look for someone who has insight and in depth knowledge about something in CS. Also, I don't think we would pay more for a PhD.
I'm not sure if you can call our application area "business", but here is a good example from my last project. We developed an application that, among other things, displayed images. After the application was "finished", our client came to me with a request. It seems that they were using an image processing application that complimented our application. However, the two systems were using different image formats. I was asked to have our application read the images of the other images natively (as well as our own), instead of requiring a conversion. Because our image object was derived from an abstract image object, all I had to do was write another image object and plug it it. It would have taken me a month or more to plow through 100k lines of code, modifying every image access, if this were not the case.
I don't blame you for being skeptical about the benefits of object oriented programming. Designing an object oriented system is hard and requires experience and insight. I know my first few attempts at designing object oriented systems were only moderately successful. In my current project, we are using a third party software system that has "object" in its name but its objects are really just data structures. We are deriving none of the benefits that an object oriented API would have provided. However, I am firmly convinced that a properly designed object oriented approach is the method of choice.
I haven't read the book but I noticed one of the chapters is "Getting Your Requirements Etched in Stone". I have been adding last minute requirements to my programs my entire career. At first I thought we were doing something wrong. But after a while I realized that people are fuzzy about what they want, they communicate imperfectly, and requirements change. The more accurate your requirements, the better, but unless you are writing a compiler or something, incorrect requirements are a fact of life. If your requirements are etched in stone, you are writing shelf-ware that nobody wants.
Over time, I've learned to write more modular, object oriented code so that a change in requirements can often be dealt with in one object rather than requiring a large scale re-write. Changes in requirements doesn't bother me as much as it use to.
If only one thread is accessing the file, then having it deleted between checking and opening should be handled with an exception. If multiple threads are creating, deleting and accessing files (not the best design) then I would prefer using synchronization through a shared resource rather than using exceptions.
I'd be interested in anyone's favorite references on when it is better to report non-success status in return codes, and when it is better to throw an exception. That is a class design issue that comes up all the time.
It depends on how "exceptional" the circumstances are. For example, if a "file not found" condition is unexpected and requires error recovery, then it should be handled as an exception. If it is something that can occasionally happen during the normal flow of events, then the programmer should check for the existence of the file before trying to open it.
Early versions of C++ did not have exceptions, but exceptions are now part of the ANSI standard. Java exceptions are modeled somewhat after C++ exceptions except that Java throws an exception object, while C++ can throw any type/object.
Its unfortunate that Sun's JVM is about the slowest one out there. Hotspot has never lived up to its potential. The poor performance of the reference implementation is one of the reasons Java has a reputation of being slow.
Me Too. This has to be the funniest /. section I have ever read. I do feel a little sorry for Javed Ikbal though.
You might also want to see NRAO's Very Large Array between Datil and Socorro New Mexico. It is also out in the middle of nowhere, great for hiking.
I turn my keyboard upside down and shake out the cookie crumbs as least twice a day. It keeps me pretty buff.
I want a system where I can tell people my password when they torture me.
Actually, IBM got a sweet deal on the MS DOS license. They just didn't get an exclusive deal. They didn't foresee that other companies would reverse engineer the BIOS and sell "IBM Compatible" computers at a price much lower than IBM. Microsoft then got rich selling the OS for all of the non-IBM computers.
It sounds like Apple Works will do the job. It does seem a little strange to buy the Porshe of computers with the Mercedes of operating systems to run the Ford Taurus of applications.