How about: Is the true cost of burning fossil fuels only reflected in the pump price, or does it come with other costs such as pollution, road fatalities and foreign wars?
I enjoy the feeling of driving on country roads etc, but I don't like the result of everyone having a car (more roads, sprawl, loss of natual areas, traffic congestion, pollution) and so choose to pay higher city rental prices so that I can walk to work and the supermarket and so not own a car.
It depends on how deeply they look at the company and who they asked. From the outside my company (50-100 people) is a Microsoft partner, and uses Windows exclusively on the desktop.
But taking a closer look, we use a lot of open source software internally, every machine has Firefox, Eclipse, Ant & Tomcat installed. We have a few Linux servers: proxy, bugzilla and our main file server but not everyone knows (or cares) what OS those servers run.
My generation's defining film - two guys do a big cocaine deal, drop out of society, take drugs and have sex with beautiful women while crossing America on outrageous Harley choppers (Easy Rider)....your generation, two dorks on Segways...
Riding Harleys with Hendrix in the background might have been cool in its day, but today, give me a Segway blasting out "The Final Countdown".
>> so TFA is just some lucky writer who found a gullible editor to promote his stupid game.
TFA is David Braben, creator of Elite. Years from now, after procedural modelling of virtual worlds becomes the standard not the exception, Elite will be looked back upon as the breakthrough first example of how to generate massive worlds.
Ideas from Elite will be mentioned and discussed in lecture theatres 20 years from now.
>> >> get rid of crap like { foo f; init_foo (&f);... ; destroy_foo (&f) }. >> >> Which is obviously tedious and error prone. The list goes on and on.
>> Sounds like a hell of a lot of work to address problems that don't arise in other languages.
The problem of remembering to cleanup resources is not contained to just C and C++. It is not just memory, but also files, sockets, database connections, threads, etc.
in C:
FILE* f = fopen("foo", "r");// access file fclose(f);// have to remember
he meant in terms of world wide USEAGE. When you "corrected" them, you said:
"No, they aren't. C/C++ is still used for the widest range of applications, but in terms of numbers of commercial applications right now, Java dominates.
And "Number of applications that developers are paid to develop."
You redefined the criteria so that:
Windows XP: 1 FireFox: 1 Some internal app used by a dozen people: 1 Microsoft Word: 1 The Sims: 1 World of Warcraft: 1 Hello world: 1
Then claimed he was wrong. That's not very fair, is it?
(I didn't write the AC post above) You are getting silly now trying to defend your point. Please google for "duck typing".
You can't add methods to primitives (in C based languages, anyway) but because of operator overloading there are still options available. In fact combining Operator overloading and templates is quite cool:
template<class T> T min(T a, T b) {
return a<b? a : b; }
ie this would work for int, float, as well as your own matrix class (if you implemented operator<).
I once made a container that returned the average of all the objects in it (all things I hadn't made myself eg float, int, short, matrix, 2D vector etc). To do this you need to somehow reset a counter to zero, which is pretty hard if eg the matrix class can't accept an assignment constructor of 0. The solution of course is "*= 0", which works assuming that has been defined.
The only way to do that in C# would have been if someone had the foresign with all of those classes to have added a virtual.zero() method.
C++ is a better, superset of C. The features can be used individually without forcing you to use other ones or change programming paradigms and you do not pay for any features you do not use.
Are you sure that there are NO features in C++ that would make your life easier? For instance I can think of a few (and you can pick and choose) that drop straight into C programming with no overhead or change from C-style at all but make life much nicer:
-// comments -better compiler warnings -stronger type checking, no default int -ability to define variables throughout the scope, ie for(int i=0 ; i<10;++i) -namespaces -overloaded functions, default arguments
Some libraries that are more efficient that what you'd write yourself: -string vs C's char[] -list/map/vector etc
And some new ways to think about programming: -polymorphism/inheritance -templates -destructors and RAII
No need, the Unix way is not to compicate a program with features but instead to combine another small tool with it to together achieve the functionality. There are quite a few things around that could do this for you, Make, Ant, etc or even just the shell.
>> that is a renter in suburbia that is adamant that you can't make money in real estate.
What the hell is this about? What if he did the figures and found out that in the current environment renting is cheaper?
Does renting money from the bank to buy property make you more noble and mature than renting property from a landlord?
There was no else clause, so the 100% code of the code was covered.
The bug occurs when one branch is NOT executed (that run will have 75% coverage)
>> reaching a point of the last fish caught/last river polluted will never happen
I can see this happening before humans die out. I haven't caught a fish in years, but ate farmed tuna for lunch today.
>> Now the philosophical argument.
That's not particularly philosophical.
How about: Is the true cost of burning fossil fuels only reflected in the pump price, or does it come with other costs such as pollution, road fatalities and foreign wars?
I enjoy the feeling of driving on country roads etc, but I don't like the result of everyone having a car (more roads, sprawl, loss of natual areas, traffic congestion, pollution) and so choose to pay higher city rental prices so that I can walk to work and the supermarket and so not own a car.
So by turning it off for 10 hours you save 34W.
34 is approx 1/2 of 75, so turning it off will save you energy so long as it takes less than 1/2 an hour to boot.
>> Bring back the good old days, when wine had the same social status as lager, thats what I say!
My friend, I reccomend you try a Goonie Bag. Not only is it cheap (AU $10-12 for 4 litres) but once you're done, you can use it as a pillow.
>> It took me a year to get a full-time job (2001-2002) after interviewed about 20 times with different employers.
It was hard for everyone at that time.
You get happiness, just not now.
Now = bad, after death = good (this sums up most religions, actually)
>> The point is to be happy now
This is completely wrong. The first noble truth of Buddhism:
1. All worldly life is unsatisfactory, disjointed, containing suffering.
>> The weird thing is, it actually works...
How do you tell? When you're not reincarnated next time?
It depends on how deeply they look at the company and who they asked. From the outside my company (50-100 people) is a Microsoft partner, and uses Windows exclusively on the desktop.
But taking a closer look, we use a lot of open source software internally, every machine has Firefox, Eclipse, Ant & Tomcat installed. We have a few Linux servers: proxy, bugzilla and our main file server but not everyone knows (or cares) what OS those servers run.
>> the market tends to make corrections quickly
It takes 3-4 years and tens of thousands of dollars to train for a career.
You can argue about performance, but it is quite obvious that Java uses far more memory than C++. Just look at the underlying data structures.
1. The JVM seems to never release its memory back to the operating system.
2. In C++, a Vector of N integers is approx:
Overhead + N * 4 bytes
In Java, you can't put primitives in a collection so it is:
Overhead + N * 16 bytes
Which means it is 4 times as large as C++.
My generation's defining film - two guys do a big cocaine deal, drop out of society, take drugs and have sex with beautiful women while crossing America on outrageous Harley choppers (Easy Rider)....your generation, two dorks on Segways...
Riding Harleys with Hendrix in the background might have been cool in its day, but today, give me a Segway blasting out "The Final Countdown".
Exactly, SUVs are weapons in a sec/newton arms race.
the world's first USB flash wristband
Not really, what's a wristband but a watch that doesn't tell the time?
>> so TFA is just some lucky writer who found a gullible editor to promote his stupid game.
TFA is David Braben, creator of Elite. Years from now, after procedural modelling of virtual worlds becomes the standard not the exception, Elite will be looked back upon as the breakthrough first example of how to generate massive worlds.
Ideas from Elite will be mentioned and discussed in lecture theatres 20 years from now.
>> It's not like you can predict a golden age anyway.
Yes you can, you just need 2 Great People in the same city.
>> >> get rid of crap like { foo f; init_foo (&f); ... ; destroy_foo (&f) }.
// access file // have to remember
// access file
// have to remember
// file falls out of scope and destructor calls close
>> >> Which is obviously tedious and error prone. The list goes on and on.
>> Sounds like a hell of a lot of work to address problems that don't arise in other languages.
The problem of remembering to cleanup resources is not contained to just C and C++. It is not just memory, but also files, sockets, database connections, threads, etc.
in C:
FILE* f = fopen("foo", "r");
fclose(f);
in Java:
FileInputStream file = null;
try {
file = new FileInputStream("foo");
} catch (Exception e) {
} finally {
file.close();
}
in C++:
{
fstream file("foo");
}
When the original poster said:
"most commercial applications, games, utilities, OS's"
he meant in terms of world wide USEAGE. When you "corrected" them, you said:
"No, they aren't. C/C++ is still used for the widest range of applications, but in terms of numbers of commercial applications right now, Java dominates.
And "Number of applications that developers are paid to develop."
You redefined the criteria so that:
Windows XP: 1
FireFox: 1
Some internal app used by a dozen people: 1
Microsoft Word: 1
The Sims: 1
World of Warcraft: 1
Hello world: 1
Then claimed he was wrong. That's not very fair, is it?
(I didn't write the AC post above) You are getting silly now trying to defend your point. Please google for "duck typing".
.zero() method.
You can't add methods to primitives (in C based languages, anyway) but because of operator overloading there are still options available. In fact combining Operator overloading and templates is quite cool:
template<class T> T min(T a, T b) {
return a<b? a : b;
}
ie this would work for int, float, as well as your own matrix class (if you implemented operator<).
I once made a container that returned the average of all the objects in it (all things I hadn't made myself eg float, int, short, matrix, 2D vector etc). To do this you need to somehow reset a counter to zero, which is pretty hard if eg the matrix class can't accept an assignment constructor of 0. The solution of course is "*= 0", which works assuming that has been defined.
The only way to do that in C# would have been if someone had the foresign with all of those classes to have added a virtual
C++ is a better, superset of C. The features can be used individually without forcing you to use other ones or change programming paradigms and you do not pay for any features you do not use.
Are you sure that there are NO features in C++ that would make your life easier? For instance I can think of a few (and you can pick and choose) that drop straight into C programming with no overhead or change from C-style at all but make life much nicer:
-// comments
-better compiler warnings
-stronger type checking, no default int
-ability to define variables throughout the scope, ie for(int i=0 ; i<10;++i)
-namespaces
-overloaded functions, default arguments
Some libraries that are more efficient that what you'd write yourself:
-string vs C's char[]
-list/map/vector etc
And some new ways to think about programming:
-polymorphism/inheritance
-templates
-destructors and RAII
>> numbers of commercial applications right now, Java dominates.
I don't know about that, depends on how you classify "commercial applications right now"
-Number of stand alone applications running on people's PCs around the world? Definitely not.
-Number of programmers employed and/or counting webapps as applications? Probably yes.
No need, the Unix way is not to compicate a program with features but instead to combine another small tool with it to together achieve the functionality. There are quite a few things around that could do this for you, Make, Ant, etc or even just the shell.
DIR=/usr/local/strange_module-2.3.7
CFLAGS=$(DIR)/include
LIBS=$(DIR)/lib
And almost all of his important work was while he was young.