Not sure of the down sides of hydrogen. It has proven as safe or safer than gasoline. (The myth of the Hindenberg disaster is that it was the hydrogen that went up, it was the cloth, the hydrogen went up later after the thing was burning for awhile.).
The fumes disapate rather than hugging the ground looking for a spark. The hydogen/oxygen in fuel cell creates pure water, not other garbage.
This technology lends itself to distributed power. That democratizing of the power grid removed the monopoly of central power generation. People are looking at other things because they can't see how they can make the centralized mega-bucks they do now.
If you use wind and solar or hydro generation to store the energy in the water hydrogen/oxygen split, then you have an energy storage media that is environmentally friendly. And we can all participate and become more independent, we can utilize that wind and solar energy that bombards us all the time, for our own wealth creation but not in a greedy way.
Well the book does talk about converting cars to fuel cells (many car and oil companies working on that). Then plug in your car at home or work and use the fuel cell as a distributed power grid. No more blackouts, clean polution free power generation, make money off your old beater in the garage..
There was also a movie with Zato Ichi the Japanese blind samari meets the One Armed Swordsman (Chinese Martial arts star). The movie had 3 endings. One for Japan, One for Hong Kong and one for the rest of the world market. Guess which one had one or the other winning or a draw...
But if the code MSM added was for the purpose of protecting access to their copyrighted code then they can claim that circumvention of that code "IS" a violation of DMCA, as this is not just matching a protocol for interoperability.
I don't know if Yahoo changes contained Security features like Microsoft claimed for the new changes to MSM
I Agree, I think the recent "security" enhancements to MSM are setting up DMCA circumvention legal suits to those people who try to use their service. Yahoo my be able to do the same if the new "protocol" has security additions that are designed to prevent the service (copyrighted software) from being used by someone else.
Well isn't all that.asp.net stuff that standard, doesn't everyone have IE. Well then they should be required to or they can't use my web site. I don't want to be bothered with things I can buy from Microsoft. They invented the Web didn't they, no that was Gore, but they wanted to, so we should let them own it.
Can't wait till we need to apply for visas for our Passport access to other countries.
Well I agree that it is not Republican or Democratic polititians that are shipping the jobs offshore but it is the Republican Capitalistic businessmen and boards of directors that are making those decisions. I think you will find that the political allegence of this group is by and far Republican, not entirely but the great grand majority. It is that mind set of "ME FIRST, I WANT MY MONEY, AND I OWN THE COMPANY SO I CAN DO WHAT I LIKE" philosophy that sees profit as the only value and not community as value. They don't see that job creation in this country is valuable over buying cheap labor that is underpaid and in poor working condition and not environmentally responsible industries, because its only profit that is important to them.
It used to be that that worked for us. But now the rush is on and so many companies are sending their work offshore that it then becomes hard to be competitive without doing that. Which like when you are SCUBA diving and pass a certain point you go down faster and faster unless you put on the air brakes.
Its not the polititions per say, but an executive culture that is not healthly for us in the long term. The Republican party is their political advocate, their political country club if you will. It is a MBA cultural issue, the culture of objectification, and commoditizaton of jobs and work for pure profit that is the root problem.
There is a big difference between the Democrats and the Republicans on issues. A huge difference. The fact that politics is the art of negotiation and comprimise to get things done makes it look like there is little difference. But you don't find the Republican's wanting Social Security (unless it is privatized so they can benefit, so it is a money maker for them) or National Health care, (unless it is privatized so they can benefit, so it is a money maker for them), or keeping our air clean by legislating lower emissions standards for vehicles. I understand that in the US 54% of the oil consumed is for transportation. 17% of the worlds global CO2 comes from transportation. But hey we need our big gas guzzling SUV's especailly in the cities where we can get 15 miles to the gallon. We need to relax the taxes on the welthiest individuals, "a United Nations Development Program study found that the 358 richest people in the world have combined assests that exceed the total annual income of nearly half the people on Earth." (The Hydrgen Economy, Rifkin). There is a diffence in sensibilty , approach, basic priciples about the value and importance of individuals, government and business.
I also found a job I enjoy and it and my chance of continuing in this field seem also to be reduced on a daily basis. It is time we do something about it.
Sorry only have a minute to reply. Well the freedom to make a profit thing has its sad consequences as we can see with all the gas gusling SUV's helping to raise the Global temperature. Here is an example of a general policy that hurts not only us, but our children and all the people around the world. The economic thing is the same sort of cultural thing. No one thinks that there sending work to another country effects their own community. Until everyone has done it and its too late. Well why should they care, they got there money. This sort of greed has happened before and Unions were the response. It is no wonder they are making a comeback. This is not communism this is enlightened self interest. If a company can represent a group of people who work the group of people who work also represent the company dont you think. Or do you think that Owernship is so sacrosanct that owner should be allow to do anything they please. All those off shore companies well many, mis treat workers, and pollute the envrionment . That is where a lot of the savings comes from. In this country we would not stand for that.
As if you don't live in an economic ecology. It is unfortunely a product of the ME generation, I belive, that you only need to think of yourself. That you make money in a vacumn. That is the central problem with the current conservative movement. You can see how they are taking the money and running. From the head of the New York Stock Exchange to World Com, to Enron. Its all part of the same irresponsible attitude. And its killing us.
The latest, I'll take my money and run" trend is to move all the jobs offshore. Good for them but not good for us. Where are those Republican patriots? I guess they figure why not ME why can't I just pull the plug on all the jobs in a town. Let them find another job somewhere else, I'm going to make a bundle shipping computer work to India. So what if you worked for me for 20 years, and have a house and children to take care of. So what if you can't find a job because all my other CEO buddies at the country club are doing the same thing. We laugh about how much we are making over golf. So what if you end up on welfare and homeless. And Oh Yes I'm going to work real hard to market the idea to you that we should get rid of welfare and social security. Why should I pay for that. Thats your problem.
exhale...
Having worked for several family run business I know there is another way to run a company. Another way to make money with a community of people working together. This cras objectifiction of business has got to stop before our whole economy colapses under the weight of the weathy company owners. Let start teaching real ethics and morality in the schools again. We may have to start it in the kindegartens and work forward, because I think most of those comming out of business school today are a lost cause when it comes to community responsibility. (some notable exceptions)
well I dont think the overheads are anything like your claim.
For exceptions what type of overhead are you talking about? Run time execution? or time to code? or lines of code. If it is lines of code well that is the price for a structure that lets you remove endless complicated test conditions from code if you try and handle all the exceptions in another way. In some cases a slight change in error condition can cause a massive re-structuring of code to handle a condtion that wasn't handled but has been found to have been needed.
Especially if the condition should kill your code and the place to handle that rundown is 5 levels up. It is trivial to include the throws clause on the call on the 5 levels and add a try catch block at the top level. The alternative is massive coding. Especially if you have follow structured coding conventions. So that one feature alone, built into the language can save your butt.
I/O is always wierd in any language.
Listeners is a wonderful idea and if you have programmed with it and without it for complex things the structuring and hand waving you have to do to trap and route events in a complex application just disappears with listeners. You are actually coding an event network which I believe is actually similar to the way the windows systems operate anyway. So here is a facility to closely match their behaviour. A good impedance match.
Actually everything is an object in a sense. What you think an integer is not an object. The system just implements the common behaviour for all integers in terms of the functions you can provide and the instance of it (the int variable) holds the data. The compiler just knows to call on the integer class of math functions when the request is made to add or multiply the number. This general pattern is true for an value. The difference may be that some data types are built in and optimized already. Some classes like the given primative types are not subclassable. Well in Smalltalk they are but who's counting.
So the question is then what cant be thought of an abstract data type? for that is what objects are. The OOP's languages just give support for your adding more of them to the language extending it out to meet your application. That is the process of writting programs, extending given languages out to implement an application.
public class Test
{
public static void main(String[] args)
{System.out.println("Hello, world!");}
}
as opposed to what
#include
void main()
{
printf("Hello, world!\n");
}
The C version has one less line.. we are talking about a big overhead here.
Well all I can say is I use Oracle for my DB and I have tried with their prepared statements to do SQL injection. Haven't been able to break in yet.
Maybe you have never used prepared statements. You set up the statement before hand, usually hard coded in your code so not a problem. You have established the template for the query ahead of time and it is cached typically in the DB server saving the optimization compilation time.
When you do get around to using the statement then you fill in the fields individually. The usual injection schemes take advantage of the fact that you are concatinating text to build the SQL. In this case you have broken that process and there is not string concatination process, so most if all injection problems disappear.
So what DB did you think was a real DB?
Have you every done SQL injection with a prepared statement that the prepared statement part was not a concatination.
I dont know but other DB's might not do it the same way on the server side. If they don't than that is a problem. But does not seem to be one with Oracle.
"It enforces a particular style of programming (right down to naming convontions), it takes a specific programming 'paradigm' (OO) to an unnecessary extreme and it's chock full of trendy buzzwords and BiCapitalised MumboJumbo. Perfect for PHBs."
So whats your point?
If you are writting low level nose to the cpu clock code, then you use a prettied up assembler language alike C or C features of C++. If you are writting time critical applications (short time to customer) then you are writting in a highter level language, or in C++ using the OOP features. If you are using the OOP features in C++ then the proformance is comparable.
But at the end of the day, if you have a memory leak or if you have to go back and actually maintain or evolve your code over time (them most common business situation) then a clearer language and easier to change environment is where you want to be.
If you asked me if I wanted to reverse engineer someone else's code to modify it, and one case was a C or a C++ program and a Java program. Well no contest. I have a chance of getting home on the weekend if it is a Java program. The other and lets burn the late night oil just to understand it.
Well it is a matter of when compilations occurs. In C it has to happen all at once before you ever use it. With Java which is a much more dynamic language by design and with the new JIT compilers, compilation of the byte code (which you could think of as object code in the C envirionment) is turned into machine code segments that are cached by the JVM and run from there. This means that there is a little startup time for that delayed compilation but then the code runs close to C speeds. But then if you don't need to complile everything you don't.
There is some overhead due to the dynamic message passing, but then you have that in C++ as well and is something that would slow both languages down compared to C. The expressibility and re-usablility of the OOPS paragim means that design, and maintenance can be much better with Java than a C program over the entire life a a project for a great savings in time and money for everyone concerned.
Well that is not so much an indictment of Java as it is of the contain technologies that are not standard. The language itself is highly portable but the various containers do like to lock you in with features and libraries. The various servlet engines too do not have a standard for configuration. It is those not the Java part that are causing you problems. That is one reason while we wrote our own.. well ok we wrote it before J2EE was out, and we only have problems with configurations, when we move to new envirionments.
Well SQL is a good abstraction level to work if for no other reason than most DB used today talk in it (but not all). If you use JDBC then you need to talk in SQL. But what you can do is:
Have a separate set of classes that coral the SQL into a DB service ancestor class.
User Prepared statements (minimizes sql injection problems), where possible.
Subclass the basic DB service class to provide wrapper classes to specific DB tables. Have mneumonic java style access to the table and accessof and modifier methods for all fields. I have a field defintion class and the subclass for a table craates an array of these defintions which are used to automatically create the prepared statements for select, update and create, (when needed)
Any DB service class that accepts any SQL text like a where clause, have as a private method which can only be called directly from one of your wrapper classes.
Filter all parameters in for nasty characters to shield against sql injection issues.
What you end up with is applications that no longer have hard coded SQL in the business logic but have SQL in a controlled and central place. With a place you can put "adhoc" code where needed but still out of the business logic and under central control.
It is a very bad idea to embed SQL thoughout your business logic. We had a case where that happened then the DB data supplier changed and the table defintions and field names changed and hundreds of embedded SQL statements had to be changed. A real nightmare senario. The centralized pattern described here allows you to solve the SQL construction problem once in the DB service class, which although one might argue is 'hardcoded' still. It is no more harcoded than your Java statements. You have to have the code for talking to the DB in some form and SQL if carefully used and controlled is a good, expressive way to do it.
I don't like stored proceedures because your applicaton is now out of your control, and out of view, like say all those cells with formulas in an Excel spreadsheet. While things work, they can be very hard to debug and coordinate, often times between different teams in an organization.
" This is just so not true. C++ is a fully fledged language which requires discipline to write quality code in, but offers the most flexible and full solution to hardcore coding problems."
It is a full fledged language and is an extension of C which revels in obfiscated C code contests. I feel that there is syntax to the language like the array notation that actually implies allocation so that the same notation can not be used when passing parameters. You know the char** is usually an array, but is it? Maybe not. So code written to accept array, or arrays of arrays has a lack of clear syntax for what is actually needed to be passed, even it terms of the type. I contend that an array "IS" a type where in C++ you can allocate one and and you can use one, but you cant tell your function that thats what your passing. It is this sort of issue that I find a linguistic problem with C++.
The garbage collection issue problem comes up as a design issue. You have to decide who is responsible for deletion of an object. The problem comes up most severely because you can make different decisions about who has that responsibility and when someone else picks up your code and modifies it, because you found a better job somewhere else, they make a different decision and you introduce leaks that then require a thorough deep analysis of possibly the entire system to figure out what design decision were made so you can change them or change the decision you made.
"All in all I feel the sheer power and control that one gains from C++ more than makes up for it's difficulty...and yes, we C++ programmers are proud, but that's because the goods ones have reason to be proud:-)"
Yes the power is a heady thing and the cleverness we exhibit as programmers often only we can understand but keeps us warm againt the cold nights. But I am reminded of the lesson learned from Databases. They were much slower and much more costly than the petal to the metal fixed field record formats that programmers used prior to there introduction. But soon that cleverness became a moras of maintainece, new work all but stopped. The simpler, slower, more costly solution that introduced the seperation of the logical interface from the physical interface was adopted in a short period of time and almost overnight we were able to get back to the business of creating new systems.
It was not a problem with creating the systems in the first place, those systems ran fine and were effient to the max. Small code, well designed for that model. But it was when changes started happening that things feel appart.
I would say that the extreme expertise needed to program complex systems in C++ is a red flag, I would say the garbage collection problems with C++ is a red flag, I would say the need for profiling tools outside the language is a red flag, I would say that the ambiguities with the pointer semantics is a red flag, I would say that, as other commenters have talked about, the use/need to use Idioms to keep you out of trouble, is a red flag.
Of course C++ is Turing Complete so anything you want to program you can. But for many applications it is I feel inappropriate. Hell I have seen people write screen controlled database application compilers in Cobol. But you go with what you know best I guess.
Its a wonderful language, I have, my self, created wonderful and complex things with C++ but have moved on. My job is more about getting up systems that are 24/7/365 that also need to be able to be gotten up quickly, and cleanly, run in different envirionments without issue, and are easily changed, and run over networks. C++ is good for writting tools that need extreme perfomance, I can get away with getting bigger hardware and multi threading.
Of course C++ is Turing Complete so anything you want to program you can. But for many applications it is I feel inappropriate. Hell I have seen people write screen controlled database application compilers in Cobol. But you go with what you know best I guess. Viva Le Differance (or however the French spell it)
Yes sorry I was in a hurry and was thinking of the RTTI which was added to C++ to allow objects to be self aware and thereby programs to utilize this fact.This follows the purer Smalltalk objects know not only what to do but who they are philosophy.
"However, as it stands today (and has for many years) C++ is not a purely OO language, nor meant to be one. Keeping the fundamental types clear of the OO baggage is one reason compiled code in C++ can be so efficient."
This is true, but I would counter that C++ was never designed to be a purely OOPs language.
"templates probably should have gone in earlier."
I agree that the templates gave C++ something it lacked and made it a viable language for OOP type development. It also allowed re-use and with the STL some form of collection classes. Which are needed if you want to program at any level above assembler c-esk programming. Much of C++'s strength comes from its ability to couple these to very different paradigms. This is especially useful when you are writting code that has to have maximum performance. That perfomance is often a compromise of good coding practice.
" It maintains that everything is an Object, and non-OO programming is inferior. Hell, for years, Java evangelists have claimed that templates are a bodge and they don't need them. In that context, having your primitive types not being Objects is just plain out of place"
Well it is the paradigm and most any system can be coded as a series of ADT's as a veiw to algorithm creation. That everything is an Object really comes from Smalltalk for with everything really is an object from the programmers point of view. It is the compilers choice (an ADT if you will) to implement that more or less efficiently. Java having primative types I feel was a hold over from C++ and made some of the compiler choices probably simplier. After all it was originally designed for set top boxes.
"It leads to rather absurd concepts like the wrapper types, and those in turn to "boxing", which is a poor man's excuse in a language that doesn't properly distinguish between value and reference semantics."
Well this is true but gate back to my other comment about the compiler as and implimention of the ADT that is the language itself. It does not matter really what it does as long as the contract you have with it is maintained about the expected result. That is the compiler creates a program that is logically and/or mathematically equivalent to what you said you wanted done. The new autoboxing will make that disappear from view as it should. This feature like C++'s template should have gone in from day one. But you know what perfect hidsight looks like.
"And by the way, you seem to confuse the concepts of strong/weak type systems with static/dynamic ones. There's a very significant difference, and all four combinations are possible."
Well I don't really confuse them but thanks for pointing that out. C++ also allows seperating what I term "data polymorphism" from "functional polymorphism" i.e. allowing a variable to point to different objects, but some of the behaviour are not overridden by the sub-classes code. So you can get all sorts of combintions of questionally usefull and complex relationships in your programs. I think of it as OOP's rococo.
I prefer to keep the model simple. It is much easier to write, understand and maintain.
I appologize for my critcism of your being young. but I do feel that your programming world revolves around those application and problem domains for which C++ is a good fit. Mine does not and never has been. In that I have been involve in application that solved problems quickly or problems that needed to added to or maintained over relatively long periods of time. (you know those projects that started out as only to have 6mo lives but end up many years later still useful and in use). For what I do, the OOP paradigm saves much time, the language features in Java such as garbage collection mean that I don't have to spend time engineering things that have absolutely nothing to do with the task at hand. The OOP's modeling has a close fit for the problems (business problems) that need to be solved. So my experience comes up through, Fortran, algol, PLI, C C++ Smalltalk, Java, and all the side languages and scripting as well.
"Java has nothing about it. C# does have a ECMA standard as well, so Java is alone on the lack of standardization. Basically, Sun decide on it, and everybody has to follow. Now you can see why there are so many mis-features or lack-of-features in that language: it has never been beaten to death by vendors before it is set in stone."
Well Java has a Sun sponored "standard" that goes through the "Java Community Process" which includes many companies, deveoplers and interested parties to propose, review, prototype, and comment on any and all changes before they go into the language. It is just a different standards body if you will. There is one version out there with "reference" editions that allow you to validate that any new compilers or JVM implementations meet that standard.
I would venture to say retoric aside. That to code a transportable C++ project requires discipline and knowledge of what features and libraries are not standard. Without that programmer supplied discipline you havent a chance in hell of a transportable C++ program. That is not the case with Java. The only thing you have to worry about is version differences, of which you only have to worry about the standard Java version and not all the vendor versions and libraries.
Don't confuse that well healed and trained programmers ability to finally come up with a style of coding that can be run on different boxes and a programmers abiilty to write transportable code right out of the box.
"In Java, you can't even pull an object out of a container without a cast, and you can't even use a basic type in a generic container without some sort of wrapper object."
The Java generics solves this problem in a true type safe way (not a macro expansion such as Templates).
"In C++, the RAII idiom lets you ensure the safe release of any resource type."
This was a later add on to C++ and patched a serious hole in the language.
"Java is "more safe" than C++?"
C++ safe? now that is funny.
Any language that can't be reasonablly coded without the use of a profiler that checks for memory leaks. Any language that does array checking by giving you an run time error pointing to Georgia. Any language that makes you walk hunched over, with one hand behind your back, and your shoes on the wrong feet so your programs don't blow up. C++ requires a much deeper knowledge of the quirks of the language, of the storage scheme before you can get any program to compile. It is said that it takes maybe 18 months of programming before a C++ programmer is any good. I suspect the pride in the language is more pride in the programmer's archane knowledge of how to get the language to do anything. Programming is not hard, it can be complex, but a language like C++ can make it hard, especially large complex projects.
And give me Java's automatic garbage collection any day (Smalltalks for that matter). That alone saves millions of dollars in programmers time right there. Just think if you didn't have to worry about all those problems. Your code would be orders of magnitude "safer".
"Inheriting from Object only solves the absence of multiple inheritance in Java."
I beg to differ the inheritance from Object has nothing to do with the mulitiple inheritance problem with C++. Interfaces in Java which allow you to define the functionality of a type without the conconmitant problems with name ambiquities of commonly inherited instance variables.
The common Object class comes from Smalltalk where Object Oriented programming stems. It allows truely generic collection classes. That allows them to be written once and re-used as any ADT should. The generics added to Java allows the programmer to take advantage of the strong typing (they could with downcasting), and the re-use of the library. If you are concerned about code size. You could have an application in C++ with say 100 queues. With the template system in C++ you would have 100 different classes each implementing a queue. A major waste of runtime realestate. So Templates are not free.
Template solve the problem that C++ had before templates, You had little or no code reusue because of the strong typing. If you wrote a Queue, you had to copy and modify it to create a int queue or a queue of your own object types. This was very cumbersom and a major hole in the languages capabilities when it first came out. Without templates the language was not very useful. C++ did not have reflection until later either. So its OOPs capabilities were crippled at the start and patched.
It is true that C++ is usually used for non-oops or hybrid code that is designed to minimize overhead. There is a large class of problems, a very large class of problems that lend themselves to an OOP's approach. It depends on the job your in. You may just be solving problems that need extreme tuning. You probably just don't see the rest of the world.
The power of the OOPs model is similar to the power of Databases. When Databases first came in, they were hugely expensive and very slow. But the problem that they solved, that is disconnecting the logical interface from the physical implementation made companies adopt DB's even then. They were spending more time maintaining old "tuned" code that they were not able to get anything new done. Then IT took off because they had a model for data that was more expressive and safer and more maintainable and robust. OOPs is the same model for programs and has the same benefits. It is much more cost effective to write something as ADT's and buy faster hardware than to code in a less maintainable form on slower machines, certainly for the long term it is many orders of magnitude better.
Not sure of the down sides of hydrogen. It has proven as safe or safer than gasoline. (The myth of the Hindenberg disaster is that it was the hydrogen that went up, it was the cloth, the hydrogen went up later after the thing was burning for awhile.).
The fumes disapate rather than hugging the ground looking for a spark. The hydogen/oxygen in fuel cell creates pure water, not other garbage.
This technology lends itself to distributed power. That democratizing of the power grid removed the monopoly of central power generation. People are looking at other things because they can't see how they can make the centralized mega-bucks they do now.
If you use wind and solar or hydro generation to store the energy in the water hydrogen/oxygen split, then you have an energy storage media that is environmentally friendly. And we can all participate and become more independent, we can utilize that wind and solar energy that bombards us all the time, for our own wealth creation but not in a greedy way.
Well the book does talk about converting cars to fuel cells (many car and oil companies working on that). Then plug in your car at home or work and use the fuel cell as a distributed power grid. No more blackouts, clean polution free power generation, make money off your old beater in the garage..
Where do I sign up.
Well there may be a more complex answer found in the book..
"The Hydrogen Economy", Jeremy Rifkin, Tarcher/Penguin 2002
Not to mention the running out of oil very soon.
That was biting statire...
There was also a movie with Zato Ichi the Japanese blind samari meets the One Armed Swordsman (Chinese Martial arts star). The movie had 3 endings. One for Japan, One for Hong Kong and one for the rest of the world market. Guess which one had one or the other winning or a draw...
But if the code MSM added was for the purpose of protecting access to their copyrighted code then they can claim that circumvention of that code "IS" a violation of DMCA, as this is not just matching a protocol for interoperability.
I don't know if Yahoo changes contained Security features like Microsoft claimed for the new changes to MSM
I Agree, I think the recent "security" enhancements to MSM are setting up DMCA circumvention legal suits to those people who try to use their service. Yahoo my be able to do the same if the new "protocol" has security additions that are designed to prevent the service (copyrighted software) from being used by someone else.
Well isn't all that .asp .net stuff that standard, doesn't everyone have IE. Well then they should be required to or they can't use my web site. I don't want to be bothered with things I can buy from Microsoft. They invented the Web didn't they, no that was Gore, but they wanted to, so we should let them own it.
Can't wait till we need to apply for visas for our Passport access to other countries.
Well I agree that it is not Republican or Democratic polititians that are shipping the jobs offshore but it is the Republican Capitalistic businessmen and boards of directors that are making those decisions. I think you will find that the political allegence of this group is by and far Republican, not entirely but the great grand majority. It is that mind set of "ME FIRST, I WANT MY MONEY, AND I OWN THE COMPANY SO I CAN DO WHAT I LIKE" philosophy that sees profit as the only value and not community as value. They don't see that job creation in this country is valuable over buying cheap labor that is underpaid and in poor working condition and not environmentally responsible industries, because its only profit that is important to them.
It used to be that that worked for us. But now the rush is on and so many companies are sending their work offshore that it then becomes hard to be competitive without doing that. Which like when you are SCUBA diving and pass a certain point you go down faster and faster unless you put on the air brakes.
Its not the polititions per say, but an executive culture that is not healthly for us in the long term. The Republican party is their political advocate, their political country club if you will. It is a MBA cultural issue, the culture of objectification, and commoditizaton of jobs and work for pure profit that is the root problem.
There is a big difference between the Democrats and the Republicans on issues. A huge difference. The fact that politics is the art of negotiation and comprimise to get things done makes it look like there is little difference. But you don't find the Republican's wanting Social Security (unless it is privatized so they can benefit, so it is a money maker for them) or National Health care, (unless it is privatized so they can benefit, so it is a money maker for them), or keeping our air clean by legislating lower emissions standards for vehicles. I understand that in the US 54% of the oil consumed is for transportation. 17% of the worlds global CO2 comes from transportation. But hey we need our big gas guzzling SUV's especailly in the cities where we can get 15 miles to the gallon. We need to relax the taxes on the welthiest individuals, "a United Nations Development Program study found that the 358 richest people in the world have combined assests that exceed the total annual income of nearly half the people on Earth." (The Hydrgen Economy, Rifkin). There is a diffence in sensibilty , approach, basic priciples about the value and importance of individuals, government and business.
I also found a job I enjoy and it and my chance of continuing in this field seem also to be reduced on a daily basis. It is time we do something about it.
Sorry only have a minute to reply. Well the freedom to make a profit thing has its sad consequences as we can see with all the gas gusling SUV's helping to raise the Global temperature. Here is an example of a general policy that hurts not only us, but our children and all the people around the world. The economic thing is the same sort of cultural thing. No one thinks that there sending work to another country effects their own community. Until everyone has done it and its too late. Well why should they care, they got there money. This sort of greed has happened before and Unions were the response. It is no wonder they are making a comeback. This is not communism this is enlightened self interest. If a company can represent a group of people who work the group of people who work also represent the company dont you think. Or do you think that Owernship is so sacrosanct that owner should be allow to do anything they please. All those off shore companies well many, mis treat workers, and pollute the envrionment . That is where a lot of the savings comes from. In this country we would not stand for that.
As if you don't live in an economic ecology. It is unfortunely a product of the ME generation, I belive,
that you only need to think of yourself. That you make money in a vacumn. That is the central problem with the current conservative movement. You can see how they are taking the money and running. From the head of the New York Stock Exchange to World Com, to Enron. Its all part of the same irresponsible attitude. And its killing us.
The latest, I'll take my money and run" trend is to move all the jobs offshore. Good for them but not good for us. Where are those Republican patriots? I guess they figure why not ME why can't I just pull the plug on all the jobs in a town. Let them find another job somewhere else, I'm going to make a bundle shipping computer work to India. So what if you worked for me for 20 years, and have a house and children to take care of. So what if you can't find a job because all my other CEO buddies at the country club are doing the same thing. We laugh about how much we are making over golf. So what if you end up on welfare and homeless. And Oh Yes I'm going to work real hard to market the idea to you that we should get rid of welfare and social security. Why should I pay for that. Thats your problem.
exhale...
Having worked for several family run business I know there is another way to run a company. Another way to make money with a community of people working together. This cras objectifiction of business has got to stop before our whole economy colapses under the weight of the weathy company owners. Let start teaching real ethics and morality in the schools again. We may have to start it in the kindegartens and work forward, because I think most of those comming out of business school today are a lost cause when it comes to community responsibility. (some notable exceptions)
I'll check into that. Thanks for the info
well I dont think the overheads are anything like your claim.
For exceptions what type of overhead are you talking about? Run time execution? or time to code? or lines of code. If it is lines of code well that is the price for a structure that lets you remove endless complicated test conditions from code if you try and handle all the exceptions in another way. In some cases a slight change in error condition can cause a massive re-structuring of code to handle a condtion that wasn't handled but has been found to have been needed.
Especially if the condition should kill your code and the place to handle that rundown is 5 levels up. It is trivial to include the throws clause on the call on the 5 levels and add a try catch block at the top level. The alternative is massive coding. Especially if you have follow structured coding conventions. So that one feature alone, built into the language can save your butt.
I/O is always wierd in any language.
Listeners is a wonderful idea and if you have programmed with it and without it for complex things the structuring and hand waving you have to do to trap and route events in a complex application just disappears with listeners. You are actually coding an event network which I believe is actually similar to the way the windows systems operate anyway. So here is a facility to closely match their behaviour. A good impedance match.
Actually everything is an object in a sense. What you think an integer is not an object. The system just implements the common behaviour for all integers in terms of the functions you can provide and the instance of it (the int variable) holds the data. The compiler just knows to call on the integer class of math functions when the request is made to add or multiply the number. This general pattern is true for an value. The difference may be that some data types are built in and optimized already. Some classes like the given primative types are not subclassable. Well in Smalltalk they are but who's counting.
So the question is then what cant be thought of an abstract data type? for that is what objects are. The OOP's languages just give support for your adding more of them to the language extending it out to meet your application. That is the process of writting programs, extending given languages out to implement an application.
public class Test
{
public static void main(String[] args)
{System.out.println("Hello, world!");}
}
as opposed to what
#include
void main()
{
printf("Hello, world!\n");
}
The C version has one less line.. we are talking about a big overhead here.
Well all I can say is I use Oracle for my DB and I have tried with their prepared statements to do SQL injection. Haven't been able to break in yet.
Maybe you have never used prepared statements. You set up the statement before hand, usually hard coded in your code so not a problem. You have established the template for the query ahead of time and it is cached typically in the DB server saving the optimization compilation time.
When you do get around to using the statement then you fill in the fields individually. The usual injection schemes take advantage of the fact that you are concatinating text to build the SQL. In this case you have broken that process and there is not string concatination process, so most if all injection problems disappear.
So what DB did you think was a real DB?
Have you every done SQL injection with a prepared statement that the prepared statement part was not a concatination.
I dont know but other DB's might not do it the same way on the server side. If they don't than that is a problem. But does not seem to be one with Oracle.
I'm curious about what conventions you think that Java enforces that take 5x to 10x the amount of lines of code.
"It enforces a particular style of programming (right down to naming convontions), it takes a specific programming 'paradigm' (OO) to an unnecessary extreme and it's chock full of trendy buzzwords and BiCapitalised MumboJumbo. Perfect for PHBs."
So whats your point?
If you are writting low level nose to the cpu clock code, then you use a prettied up assembler language alike C or C features of C++. If you are writting time critical applications (short time to customer) then you are writting in a highter level language, or in C++ using the OOP features. If you are using the OOP features in C++ then the proformance is comparable.
But at the end of the day, if you have a memory leak or if you have to go back and actually maintain or evolve your code over time (them most common business situation) then a clearer language and easier to change environment is where you want to be.
If you asked me if I wanted to reverse engineer someone else's code to modify it, and one case was a C or a C++ program and a Java program. Well no contest. I have a chance of getting home on the weekend if it is a Java program. The other and lets burn the late night oil just to understand it.
Sometimes conventions pay off big time.
Well it is a matter of when compilations occurs. In C it has to happen all at once before you ever use it. With Java which is a much more dynamic language by design and with the new JIT compilers, compilation of the byte code (which you could think of as object code in the C envirionment) is turned into machine code segments that are cached by the JVM and run from there. This means that there is a little startup time for that delayed compilation but then the code runs close to C speeds. But then if you don't need to complile everything you don't.
There is some overhead due to the dynamic message passing, but then you have that in C++ as well and is something that would slow both languages down compared to C. The expressibility and re-usablility of the OOPS paragim means that design, and maintenance can be much better with Java than a C program over the entire life a a project for a great savings in time and money for everyone concerned.
Well that is not so much an indictment of Java as it is of the contain technologies that are not standard. The language itself is highly portable but the various containers do like to lock you in with features and libraries. The various servlet engines too do not have a standard for configuration. It is those not the Java part that are causing you problems. That is one reason while we wrote our own.. well ok we wrote it before J2EE was out, and we only have problems with configurations, when we move to new envirionments.
KISS is a good pattern to follow.
Well SQL is a good abstraction level to work if for no other reason than most DB used today talk in it (but not all). If you use JDBC then you need to talk in SQL. But what you can do is:
Have a separate set of classes that coral the SQL into a DB service ancestor class.
User Prepared statements (minimizes sql injection problems), where possible.
Subclass the basic DB service class to provide wrapper classes to specific DB tables. Have mneumonic java style access to the table and accessof and modifier methods for all fields.
I have a field defintion class and the subclass for a table craates an array of these defintions which are used to automatically create the prepared statements for select, update and create, (when needed)
Any DB service class that accepts any SQL text like a where clause, have as a private method which can only be called directly from one of your wrapper classes.
Filter all parameters in for nasty characters to shield against sql injection issues.
What you end up with is applications that no longer have hard coded SQL in the business logic but have SQL in a controlled and central place. With a place you can put "adhoc" code where needed but still out of the business logic and under central control.
It is a very bad idea to embed SQL thoughout your business logic. We had a case where that happened then the DB data supplier changed and the table defintions and field names changed and hundreds of embedded SQL statements had to be changed. A real nightmare senario. The centralized pattern described here allows you to solve the SQL construction problem once in the DB service class, which although one might argue is 'hardcoded' still. It is no more harcoded than your Java statements. You have to have the code for talking to the DB in some form and SQL if carefully used and controlled is a good, expressive way to do it.
I don't like stored proceedures because your applicaton is now out of your control, and out of view, like say all those cells with formulas in an Excel spreadsheet. While things work, they can be very hard to debug and coordinate, often times between different teams in an organization.
" This is just so not true. C++ is a fully fledged language which requires discipline to write quality code in, but offers the most flexible and full solution to hardcore coding problems."
:-)"
It is a full fledged language and is an extension of C which revels in obfiscated C code contests. I feel that there is syntax to the language like the array notation that actually implies allocation so that the same notation can not be used when passing parameters. You know the char** is usually an array, but is it? Maybe not. So code written to accept array, or arrays of arrays has a lack of clear syntax for what is actually needed to be passed, even it terms of the type. I contend that an array "IS" a type where in C++ you can allocate one and and you can use one, but you cant tell your function that thats what your passing. It is this sort of issue that I find a linguistic problem with C++.
The garbage collection issue problem comes up as a design issue. You have to decide who is responsible for deletion of an object. The problem comes up most severely because you can make different decisions about who has that responsibility and when someone else picks up your code and modifies it, because you found a better job somewhere else, they make a different decision and you introduce leaks that then require a thorough deep analysis of possibly the entire system to figure out what design decision were made so you can change them or change the decision you made.
"All in all I feel the sheer power and control that one gains from C++ more than makes up for it's difficulty...and yes, we C++ programmers are proud, but that's because the goods ones have reason to be proud
Yes the power is a heady thing and the cleverness we exhibit as programmers often only we can understand but keeps us warm againt the cold nights. But I am reminded of the lesson learned from Databases. They were much slower and much more costly than the petal to the metal fixed field record formats that programmers used prior to there introduction. But soon that cleverness became a moras of maintainece, new work all but stopped. The simpler, slower, more costly solution that introduced the seperation of the logical interface from the physical interface was adopted in a short period of time and almost overnight we were able to get back to the business of creating new systems.
It was not a problem with creating the systems in the first place, those systems ran fine and were effient to the max. Small code, well designed for that model. But it was when changes started happening that things feel appart.
I would say that the extreme expertise needed to program complex systems in C++ is a red flag, I would say the garbage collection problems with C++ is a red flag, I would say the need for profiling tools outside the language is a red flag, I would say that the ambiguities with the pointer semantics is a red flag, I would say that, as other commenters have talked about, the use/need to use Idioms to keep you out of trouble, is a red flag.
Of course C++ is Turing Complete so anything you want to program you can. But for many applications it is I feel inappropriate. Hell I have seen people write screen controlled database application compilers in Cobol. But you go with what you know best I guess.
Its a wonderful language, I have, my self, created wonderful and complex things with C++ but have moved on. My job is more about getting up systems that are 24/7/365 that also need to be able to be gotten up quickly, and cleanly, run in different envirionments without issue, and are easily changed, and run over networks. C++ is good for writting tools that need extreme perfomance, I can get away with getting bigger hardware and multi threading.
Of course C++ is Turing Complete so anything you want to program you can. But for many applications it is I feel inappropriate. Hell I have seen people write screen controlled database application compilers in Cobol. But you go with what you know best I guess. Viva Le Differance (or however the French spell it)
"Do you know what the RAII idiom is?"
Yes sorry I was in a hurry and was thinking of the RTTI which was added to C++ to allow objects to be self aware and thereby programs to utilize this fact.This follows the purer Smalltalk objects know not only what to do but who they are philosophy.
"However, as it stands today (and has for many years) C++ is not a purely OO language, nor meant to be one. Keeping the fundamental types clear of the OO baggage is one reason compiled code in C++ can be so efficient."
This is true, but I would counter that C++ was never designed to be a purely OOPs language.
"templates probably should have gone in earlier."
I agree that the templates gave C++ something it lacked and made it a viable language for OOP type development. It also allowed re-use and with the STL some form of collection classes. Which are needed if you want to program at any level above assembler c-esk programming. Much of C++'s strength comes from its ability to couple these to very different paradigms. This is especially useful when you are writting code that has to have maximum performance. That perfomance is often a compromise of good coding practice.
" It maintains that everything is an Object, and non-OO programming is inferior. Hell, for years, Java evangelists have claimed that templates are a bodge and they don't need them. In that context, having your primitive types not being Objects is just plain out of place"
Well it is the paradigm and most any system can be coded as a series of ADT's as a veiw to algorithm creation. That everything is an Object really comes from Smalltalk for with everything really is an object from the programmers point of view. It is the compilers choice (an ADT if you will) to implement that more or less efficiently. Java having primative types I feel was a hold over from C++ and made some of the compiler choices probably simplier. After all it was originally designed for set top boxes.
"It leads to rather absurd concepts like the wrapper types, and those in turn to "boxing", which is a poor man's excuse in a language that doesn't properly distinguish between value and reference semantics."
Well this is true but gate back to my other comment about the compiler as and implimention of the ADT that is the language itself. It does not matter really what it does as long as the contract you have with it is maintained about the expected result. That is the compiler creates a program that is logically and/or mathematically equivalent to what you said you wanted done. The new autoboxing will make that disappear from view as it should. This feature like C++'s template should have gone in from day one. But you know what perfect hidsight looks like.
"And by the way, you seem to confuse the concepts of strong/weak type systems with static/dynamic ones. There's a very significant difference, and all four combinations are possible."
Well I don't really confuse them but thanks for pointing that out. C++ also allows seperating what I term "data polymorphism" from "functional polymorphism" i.e. allowing a variable to point to different objects, but some of the behaviour are not overridden by the sub-classes code. So you can get all sorts of combintions of questionally usefull and complex relationships in your programs. I think of it as OOP's rococo.
I prefer to keep the model simple. It is much easier to write, understand and maintain.
I appologize for my critcism of your being young. but I do feel that your programming world revolves around those application and problem domains for which C++ is a good fit. Mine does not and never has been. In that I have been involve in application that solved problems quickly or problems that needed to added to or maintained over relatively long periods of time. (you know those projects that started out as only to have 6mo lives but end up many years later still useful and in use). For what I do, the OOP paradigm saves much time, the language features in Java such as garbage collection mean that I don't have to spend time engineering things that have absolutely nothing to do with the task at hand. The OOP's modeling has a close fit for the problems (business problems) that need to be solved. So my experience comes up through, Fortran, algol, PLI, C C++ Smalltalk, Java, and all the side languages and scripting as well.
"Java has nothing about it. C# does have a ECMA standard as well, so Java is alone on the lack of standardization. Basically, Sun decide on it, and everybody has to follow. Now you can see why there are so many mis-features or lack-of-features in that language: it has never been beaten to death by vendors before it is set in stone."
Well Java has a Sun sponored "standard" that goes through the "Java Community Process" which includes many companies, deveoplers and interested parties to propose, review, prototype, and comment on any and all changes before they go into the language. It is just a different standards body if you will. There is one version out there with "reference" editions that allow you to validate that any new compilers or JVM implementations meet that standard.
I would venture to say retoric aside. That to code a transportable C++ project requires discipline and knowledge of what features and libraries are not standard. Without that programmer supplied discipline you havent a chance in hell of a transportable C++ program. That is not the case with Java. The only thing you have to worry about is version differences, of which you only have to worry about the standard Java version and not all the vendor versions and libraries.
Don't confuse that well healed and trained programmers ability to finally come up with a style of coding that can be run on different boxes and a programmers abiilty to write transportable code right out of the box.
"In Java, you can't even pull an object out of a container without a cast, and you can't even use a basic type in a generic container without some sort of wrapper object."
The Java generics solves this problem in a true type safe way (not a macro expansion such as Templates).
"In C++, the RAII idiom lets you ensure the safe release of any resource type."
This was a later add on to C++ and patched a serious hole in the language.
"Java is "more safe" than C++?"
C++ safe? now that is funny.
Any language that can't be reasonablly coded without the use of a profiler that checks for memory leaks. Any language that does array checking by giving you an run time error pointing to Georgia. Any language that makes you walk hunched over, with one hand behind your back, and your shoes on the wrong feet so your programs don't blow up. C++ requires a much deeper knowledge of the quirks of the language, of the storage scheme before you can get any program to compile. It is said that it takes maybe 18 months of programming before a C++ programmer is any good. I suspect the pride in the language is more pride in the programmer's archane knowledge of how to get the language to do anything. Programming is not hard, it can be complex, but a language like C++ can make it hard, especially large complex projects.
And give me Java's automatic garbage collection any day (Smalltalks for that matter). That alone saves millions of dollars in programmers time right there. Just think if you didn't have to worry about all those problems. Your code would be orders of magnitude "safer".
"Inheriting from Object only solves the absence of multiple inheritance in Java."
I beg to differ the inheritance from Object has nothing to do with the mulitiple inheritance problem with C++. Interfaces in Java which allow you to define the functionality of a type without the conconmitant problems with name ambiquities of commonly inherited instance variables.
The common Object class comes from Smalltalk where Object Oriented programming stems. It allows truely generic collection classes. That allows them to be written once and re-used as any ADT should. The generics added to Java allows the programmer to take advantage of the strong typing (they could with downcasting), and the re-use of the library. If you are concerned about code size. You could have an application in C++ with say 100 queues. With the template system in C++ you would have 100 different classes each implementing a queue. A major waste of runtime realestate. So Templates are not free.
Template solve the problem that C++ had before templates, You had little or no code reusue because of the strong typing. If you wrote a Queue, you had to copy and modify it to create a int queue or a queue of your own object types. This was very cumbersom and a major hole in the languages capabilities when it first came out. Without templates the language was not very useful. C++ did not have reflection until later either. So its OOPs capabilities were crippled at the start and patched.
It is true that C++ is usually used for non-oops or hybrid code that is designed to minimize overhead. There is a large class of problems, a very large class of problems that lend themselves to an OOP's approach. It depends on the job your in. You may just be solving problems that need extreme tuning. You probably just don't see the rest of the world.
The power of the OOPs model is similar to the power of Databases. When Databases first came in, they were hugely expensive and very slow. But the problem that they solved, that is disconnecting the logical interface from the physical implementation made companies adopt DB's even then. They were spending more time maintaining old "tuned" code that they were not able to get anything new done. Then IT took off because they had a model for data that was more expressive and safer and more maintainable and robust. OOPs is the same model for programs and has the same benefits. It is much more cost effective to write something as ADT's and buy faster hardware than to code in a less maintainable form on slower machines, certainly for the long term it is many orders of magnitude better.