Read all of that great list but "How to solve it."
>> Gerald Weinberg's The Psychology of Computer Programming.
This book is great, it touches on some things nobody else has studied before, but it is very dated.
I wish someone would write a new version with updated holywars. We've moved from Batch vs Interactive terminals and Microcode vs Assembly through Asm/C and now Non-GC/High Level languages. Have we learnt anything, though?
>> Abelson and Sussman, Structure and Interpretation of Computer Programs.
I've been watching a few lectures every night, you can download free videos of the lectures. Fancy production value for 1980s, too!
CBoN is fascinating, when I first got it I buried myself in it then spent ages mucking around with all the sample programs. Now I grab it about 5-10 times a year to flip through on my bus ride to work and I always find it entertaining to daydream about some ideas in it.
The author Garry William Flake said something in there that he wrote it for a younger version of himself so he could give an introduction to things he himself has found interesting over his working life.
A really excellent book for anyone who into abstract computer science, fractals etc. I'm really interested in procedural generation of computer game content, and it is like this book was made for me.
Re:This one has it all - sony, the queen, arrows,
on
The 2005 IT Year In Quotes
·
· Score: 2, Informative
I ran a perl script over the CIA world factbook, looking for Independence > 1926 and got:
total: 273, younger than queen: 132 = 48.3%
So yeah, you're probably pretty close (depending on how one counts countries, and ages etc)
Development costs: wages, licencing, rent, hardware, other.
wages: 200 people costs more than a few guys in a garage. Most of the staff are not programmers, but artists and testers who produce and verify CONTENT. A DVD can hold more than a 8k cartridge, and gamers expect it to be full of content.
licencing: It costs money to have a hardware company test, then master discs, then take royalties for your console game. Even though it's for the worse, many games now incorporate expensive licences from Movies (Harry Potter), Sport (NHL,NBA,Tiger Woods), Celebrities (Olsen Twins), Cars (if you use real life ones, also hence why cars cannot be dented - bad advertising) etc.
rent: 200 people and decent security to protect physical and intellectual property isn't free. And costs more than a garage.
hardware: PCs may be cheaper, but console developers don't just need PCs, they also need devkits and testkits. Devkits are tens of thousands of dollars.
Development costs have gone up, I don't know why I had to write it out, because they just HAVE.
If you wanted to make pacman today, you could do it in a high level language with 0 optimization needed in about 1 developer week. The trouble is, gamers today demand, and buy, games with massive amounts of content. Content costs money.
C doesn't have destructors, I was talking about the order of destructor calls.
In C++ it is guaranteed that the destructors in the following scope will be called "here" in the following order: ~Bar. ~Foo {
Foo foo;
Bar bar; }// here
Order is also guaranteed when objects are inside other objects. If you think about it, destructors are really just a way of saying "run this code just before this object is deleted". Since (efficient) GCs are non-deterministic and lock-the-world, if you wanted to run the code when an object is deleted, you'd have to be non-deterministic (ie you couldn't batch up deletions which is one of GCs performance advantages) and be forced to unlock the world, run the code, switch back to GC for every object with a destructor. This would not be very fast at all.
>> you can write "destructor's" in a garbage collected language
You mean like Java's Object.finalize()?
The same one that causes significant performance problems fundamental to how GCs work, and is not guaranteed to execute in any specific order, or even at all?
Baby, Gonna make you happy tonight. Gonna make you happy tonight, Oh, sugar. Give my love to you, Oh baby.
Gonna make you feel so right. Gonna make you, make you happy, Oooh, sugar. Yeah!
Spend some time with you, Do the things you want me to. Gonna make some sweet, sweet love, sugar.
So get ready, Oooh, get ready, get ready. Get ready for lovin', Tonight. Before we get down to love, Before we get down...... I just gotta finish this level.
You see, I got a high score tonight. And I just want to save my game.
Well, I'll be with you in a minute, Sweet darling, baby, honey. I love how you dance for me. Oooh, la la la la la la la la... Could you move a little to the left, baby? I can't see the TV.
Baby, I can't want 'till we start, It's just that the save points are quite far apart, In this game, baby.
Oooh, la la la la la la la... This bit's got a multi-player section, honey, Maybe you can operate a turret with me. Would you like that, baby?
Games give you hand-eye co-ordination, And spacial intelligence, together with...... map-reading skills. Oh, sugar.
Turn the lights down low... Turn the lights down, just a little bit lower, baby. Turn the lights down low... Turn the lights down low... Turn the lights down low... It's just that it helps me feel like I'm in a spaceship.... Baby. Have you brushed your teeth yet? Take your time, no hurry. It's just that I'm not tired. Are you tired?
I'll see you in the bed, then. You might want to take a book. You know I can't stop thinking about you, baby. And all of the magic coins that I need to collect.
See, I just gotta find one more point of armour class, And then I can take on the robots of Zirgon B, And then we can make love... I think this X-Box, Is the best present I ever bought for you, Baby!
In many Australian cities during summer there can often be a week where every day it reaches 40C (104 degrees F) and often goes over 45 (113F).
And yet we are expected to wear clothes based on the finery 19th century European noblemen sported for cold Northern Hemisphere winters. This is really dumb.
In order to keep cool and yet still look professional for clients, my work recently adopted a corporate uniform of open collars, (optional) short sleeves and natural cool fibres. Long sleeves and ties are ridiculous in the Australian summer.
Re:Thats the whole point of the "puzzler"
on
Java Puzzlers
·
· Score: 1
> Why should a primitive byte be signed, but not a primitive char?
Because that's the way Sun defined it (duh)
> And why can't I have an unsigned int primitive in Java?
Because Sun doesn't think you're smart enough for it.
> Primitives in Java are a real pain to work with compared to most languages.
I've never had any problem with primitives as such... The thing I hate is the unnatural division between primitives and objects. Going back 50+ years, lisp-like functional languages build new definitions on top of previous ones. The answer to which of "if" or "cond" is built in, and which is defined in terms of the other is "who cares". It all looks the same.
You can look at the whole history of computer languages as refining the idea "let the user create abstract data types that work as seamlessly in the language as the primitives".
Except for Java.
You can't define operators on your objects, so you end up horrific code like anything to do with BigDecimal. Centuries of refinement of arithmetic symbols and operations by mathematicians is tossed in the trash (sorry, garbage collected) with Java's.add() and.equals() which produce the ugliest code since COBOL.
Objects are not just crippled compared to primitives, but primitives are crippled compared to Objects! You can't put them in containers!
This has been bandaided over with autoboxing, but this comes at a cost of class hierarchies, increased compiler magic and performance (especially memory) cost. Autoboxing and the Integer/Float objects are a total hack to get around the bad decision to make primitives and objects distinct. To reduce the memory bloat Integers from -128->127 are stored in a static pool on the JVM while the others are on the heap.
There are lots of ways to store numbers on computers. Fixed point, floating point, signed/unsigned, 2's compliment, etc, but to store them as 16+ byte lockable objects that reference static pools of "number" in the JVM is certainly be the most retarded.
The only reason I can see for the awful primitive/object split is for those laughable tests using primitives which "prove" Java is as fast as C++. For 99% of stuff, who cares? I'd rather Java be twice as slow if it wasn't so damn ugly.
And that warrants tariffs on all imports and stuff?
Doesn't happen.
And what do you do against diseases that don't come from other countries (and there's no reason why they should)?
No, no reason at all - not since most diseases are made in secret underground germ labs, not passed among humans and livestock as the liberal media portrays. In fact, that's the reason for quarantine and bugspray on airplanes. It's a protectionist plot to prop up the local germ industry!
I'm pissed off that I can't just buy whatever I want from foreign countries and have it delivered to me.
Like child-brides, dirty bombs, insect pests or anthrax? Or maybe you should just shut up about other people inspecting things brought into their country.
The hardware may be fast (lets even assume that the video card is never the bottleneck anymore) but it can only render as fast as the application can send data to it via the bus.
To maximise 3d throughput the application code must send the card data as efficiently as possible. This involves heaps of techniques that Java can do too, but also techniques like vertex buffers, packed data formats (ie pointers to raw memory with nicely aligned data the video card can just plow through)
-JVM uses network byte order, not what is on the local machine, which means you can't just chuck the video card a pointer to a lot of floats. -You don't have pointers anyway. -Garbage collection can be more efficient than manual collection IF ANY ONLY IF the amount of usable memory is massively (5-10x) larger than the applications memory. Console/mobile phones etc only have =64mb -Garbage collection is non-deterministic, and must "stop the world" which ruins pipeline performance. Ie the graphics card may be starved of data when the gc fires, meaning the graphics card must wait on the cpu too. -Collections/containers (can't build a large app without them) must cast back from object. Dynamic casts are slow and will always be slow. Templates don't have this problem, autoboxing and generics HIDE this problem. -Small devices often don't have JITs
Just as a thought experiment, consider what the SNES and GBA did with C and asm, and compare that to Java games on the much more powerful mobile phones of today.
Are you joking? The JNI call overhead is extremely large which means that any gains through faster lower level code are lost, unless you are performing masses of computation at once.
Plus of all the cross language linking I've seen (C++/Python/C/.NET) it is by far the ugliest to write.
The folks who designed Java are almost religious in their beliefs. I would not be suprised if they made JNI deliberately ugly and slow to discourage people to not to write in Java, the language they spend so much on marketing and selling.
Sadly our boys and girls in harm's way is the only restraint on the US military's actions at present. The mass media, politicians, mainstream public sentiment etc do not care about the deaths of foreigners, only of Americans.
Almost all calls for troop withdrawl from Iraq mention the thousand or so US soldiers deaths, not Iraqui civilians, even though there are 100x more of the latter. The Vietnam withdrawl had more to do with the deaths of tens of thousands of soldiers than the millions of Vietnamese civilians. This is not specifically an American sentiment, it works pretty much this way in all countries.
If the US can invade other countries with no negative consequences back home, what will put an upper limit to the force exercised overseas? If Americans can move joysticks and program computers to kill man shaped blobs from hundreds of kilometres away, what's to make them feel bad when they shoot at a slightly smaller, child shaped one?
When wars are waged where casualties are massively one sided, the side suffering the greatest losses will feel cheated and opressed and desire to move the conflict to "spread the pain and grief around". This would probably means more civilian attacks against the US - "Why should our children be the only ones to die?"
Edit [HKEY_CURRENT_USER\Software\Microsoft\Command Processor]
Value Name: CompletionChar Data Type: REG_DWORD
Data: 09 = (TAB Key)
>> There are some really nice APIs out there for computational work.
) .subtract(xfer);) .add(xfer);
/dev/null
Yep, except all the code looks like:
BigDecimal balance1 = new BigDecimal("123.45"),
balance2 = new BigDecimal("678.90"),
rate = new BigDecimal("0.05"),
xfer = new BigDecimal("99.99");
balance1 = balance1.multiply(BigDecimal.valueOf(1).add(rate)
balance2 = balance2.multiply(BigDecimal.valueOf(1).add(rate)
if (balance1.compareTo(BigDecimal.valueOf(0)) < 0) {
throw new InsufficientBalanceException();
}
Instead of:
decimal balance1 = 123.45, balance2 = 678.90, rate = 0.05, xfer = 99.99;
balance1 = balance1 * (1 + rate) - xfer;
balance2 = balance2 * (1 + rate) + xfer;
if (balance1 < 0) {
throw new InsufficientBalanceException();
}
Examples thanks to
Lisp (1959), you're stuck with some seriously dead-end knowledge...
--
argumentum ad ignorantiam Fallacy of taking a statement not provably false and implying that it is therefore true
You mean like saying Lisp is dead-end knowlege?
Read all of that great list but "How to solve it."
s ussman-lectures
>> Gerald Weinberg's The Psychology of Computer Programming.
This book is great, it touches on some things nobody else has studied before, but it is very dated.
I wish someone would write a new version with updated holywars. We've moved from Batch vs Interactive terminals and Microcode vs Assembly through Asm/C and now Non-GC/High Level languages. Have we learnt anything, though?
>> Abelson and Sussman, Structure and Interpretation of Computer Programs.
I've been watching a few lectures every night, you can download free videos of the lectures. Fancy production value for 1980s, too!
http://swiss.csail.mit.edu/classes/6.001/abelson-
I would like to add a "me too".
CBoN is fascinating, when I first got it I buried myself in it then spent ages mucking around with all the sample programs. Now I grab it about 5-10 times a year to flip through on my bus ride to work and I always find it entertaining to daydream about some ideas in it.
The author Garry William Flake said something in there that he wrote it for a younger version of himself so he could give an introduction to things he himself has found interesting over his working life.
A really excellent book for anyone who into abstract computer science, fractals etc. I'm really interested in procedural generation of computer game content, and it is like this book was made for me.
I ran a perl script over the CIA world factbook, looking for Independence > 1926 and got:
total: 273, younger than queen: 132 = 48.3%
So yeah, you're probably pretty close (depending on how one counts countries, and ages etc)
And then on a channel 10 dancing show.
I live here, and I advocate non-violent overthrow of the Australian government, next election.
He didn't mention any performance limits in his post.
And by database I don't mean say, ASE, MSSQL, Oracle or DB2. You can get very small, very fast in-memory databases.
Instead of:
Webapp Your App
Consider:
Webapp Database Your App
Now you have 2 simpler problems: get your app to get its data from a database, and get your webapp to display and modify values in the database.
>> but costs overall do not go up
Development costs: wages, licencing, rent, hardware, other.
wages: 200 people costs more than a few guys in a garage. Most of the staff are not programmers, but artists and testers who produce and verify CONTENT. A DVD can hold more than a 8k cartridge, and gamers expect it to be full of content.
licencing: It costs money to have a hardware company test, then master discs, then take royalties for your console game. Even though it's for the worse, many games now incorporate expensive licences from Movies (Harry Potter), Sport (NHL,NBA,Tiger Woods), Celebrities (Olsen Twins), Cars (if you use real life ones, also hence why cars cannot be dented - bad advertising) etc.
rent: 200 people and decent security to protect physical and intellectual property isn't free. And costs more than a garage.
hardware: PCs may be cheaper, but console developers don't just need PCs, they also need devkits and testkits. Devkits are tens of thousands of dollars.
Development costs have gone up, I don't know why I had to write it out, because they just HAVE.
If you wanted to make pacman today, you could do it in a high level language with 0 optimization needed in about 1 developer week. The trouble is, gamers today demand, and buy, games with massive amounts of content. Content costs money.
Just like programming: what's the thickest "how to program" book you've ever seen that didn't talk about one language?
(Looks up to his bookshelf)
Design Patterns - Almost 400 pages.
Code Complete - Almost a THOUSAND pages
C doesn't have destructors, I was talking about the order of destructor calls.
// here
In C++ it is guaranteed that the destructors in the following scope will be called "here" in the following order: ~Bar. ~Foo
{
Foo foo;
Bar bar;
}
Order is also guaranteed when objects are inside other objects. If you think about it, destructors are really just a way of saying "run this code just before this object is deleted". Since (efficient) GCs are non-deterministic and lock-the-world, if you wanted to run the code when an object is deleted, you'd have to be non-deterministic (ie you couldn't batch up deletions which is one of GCs performance advantages) and be forced to unlock the world, run the code, switch back to GC for every object with a destructor. This would not be very fast at all.
>> you can write "destructor's" in a garbage collected language
You mean like Java's Object.finalize()?
The same one that causes significant performance problems fundamental to how GCs work, and is not guaranteed to execute in any specific order, or even at all?
By Tripod, an Australian comedy band:
... I just gotta finish this level.
... map-reading skills. Oh, sugar.
... Baby. Have you brushed your teeth yet?
Baby, Gonna make you happy tonight.
Gonna make you happy tonight, Oh, sugar.
Give my love to you, Oh baby.
Gonna make you feel so right.
Gonna make you, make you happy,
Oooh, sugar. Yeah!
Spend some time with you,
Do the things you want me to.
Gonna make some sweet, sweet love, sugar.
So get ready,
Oooh, get ready, get ready.
Get ready for lovin', Tonight.
Before we get down to love,
Before we get down...
You see, I got a high score tonight.
And I just want to save my game.
Well, I'll be with you in a minute,
Sweet darling, baby, honey.
I love how you dance for me.
Oooh, la la la la la la la la...
Could you move a little to the left, baby?
I can't see the TV.
Baby, I can't want 'till we start,
It's just that the save points are quite far apart,
In this game, baby.
Oooh, la la la la la la la...
This bit's got a multi-player section, honey,
Maybe you can operate a turret with me.
Would you like that, baby?
Games give you hand-eye co-ordination,
And spacial intelligence, together with...
Turn the lights down low...
Turn the lights down, just a little bit lower, baby.
Turn the lights down low...
Turn the lights down low...
Turn the lights down low...
It's just that it helps me feel like I'm in a spaceship.
Take your time, no hurry.
It's just that I'm not tired. Are you tired?
I'll see you in the bed, then.
You might want to take a book.
You know I can't stop thinking about you, baby.
And all of the magic coins that I need to collect.
See, I just gotta find one more point of armour class,
And then I can take on the robots of Zirgon B,
And then we can make love...
I think this X-Box, Is the best present I ever bought for you, Baby!
In many Australian cities during summer there can often be a week where every day it reaches 40C (104 degrees F) and often goes over 45 (113F).
And yet we are expected to wear clothes based on the finery 19th century European noblemen sported for cold Northern Hemisphere winters. This is really dumb.
In order to keep cool and yet still look professional for clients, my work recently adopted a corporate uniform of open collars, (optional) short sleeves and natural cool fibres. Long sleeves and ties are ridiculous in the Australian summer.
> Why should a primitive byte be signed, but not a primitive char?
.add() and .equals() which produce the ugliest code since COBOL.
Because that's the way Sun defined it (duh)
> And why can't I have an unsigned int primitive in Java?
Because Sun doesn't think you're smart enough for it.
> Primitives in Java are a real pain to work with compared to most languages.
I've never had any problem with primitives as such... The thing I hate is the unnatural division between primitives and objects. Going back 50+ years, lisp-like functional languages build new definitions on top of previous ones. The answer to which of "if" or "cond" is built in, and which is defined in terms of the other is "who cares". It all looks the same.
You can look at the whole history of computer languages as refining the idea "let the user create abstract data types that work as seamlessly in the language as the primitives".
Except for Java.
You can't define operators on your objects, so you end up horrific code like anything to do with BigDecimal. Centuries of refinement of arithmetic symbols and operations by mathematicians is tossed in the trash (sorry, garbage collected) with Java's
Objects are not just crippled compared to primitives, but primitives are crippled compared to Objects! You can't put them in containers!
This has been bandaided over with autoboxing, but this comes at a cost of class hierarchies, increased compiler magic and performance (especially memory) cost. Autoboxing and the Integer/Float objects are a total hack to get around the bad decision to make primitives and objects distinct. To reduce the memory bloat Integers from -128->127 are stored in a static pool on the JVM while the others are on the heap.
There are lots of ways to store numbers on computers. Fixed point, floating point, signed/unsigned, 2's compliment, etc, but to store them as 16+ byte lockable objects that reference static pools of "number" in the JVM is certainly be the most retarded.
The only reason I can see for the awful primitive/object split is for those laughable tests using primitives which "prove" Java is as fast as C++. For 99% of stuff, who cares? I'd rather Java be twice as slow if it wasn't so damn ugly.
And that warrants tariffs on all imports and stuff?
Doesn't happen.
And what do you do against diseases that don't come from other countries (and there's no reason why they should)?
No, no reason at all - not since most diseases are made in secret underground germ labs, not passed among humans and livestock as the liberal media portrays. In fact, that's the reason for quarantine and bugspray on airplanes. It's a protectionist plot to prop up the local germ industry!
I'm pissed off that I can't just buy whatever I want from foreign countries and have it delivered to me.
Like child-brides, dirty bombs, insect pests or anthrax? Or maybe you should just shut up about other people inspecting things brought into their country.
No thanks, we'd like to keep disease level as close to the 18th century as possible.
In America, if you go on television and make jokes that offend Christian advertisers, you will be censored
For a bit of fun try running the outside loop in Java and the increment in JNI! You might want to leave it overnight... :)
With C++ you can refer to objects 3 ways: pointer, reference and value. 2/3rds of these do not have the copy constructor overhead.
The hardware may be fast (lets even assume that the video card is never the bottleneck anymore) but it can only render as fast as the application can send data to it via the bus.
To maximise 3d throughput the application code must send the card data as efficiently as possible. This involves heaps of techniques that Java can do too, but also techniques like vertex buffers, packed data formats (ie pointers to raw memory with nicely aligned data the video card can just plow through)
-JVM uses network byte order, not what is on the local machine, which means you can't just chuck the video card a pointer to a lot of floats.
-You don't have pointers anyway.
-Garbage collection can be more efficient than manual collection IF ANY ONLY IF the amount of usable memory is massively (5-10x) larger than the applications memory. Console/mobile phones etc only have =64mb
-Garbage collection is non-deterministic, and must "stop the world" which ruins pipeline performance. Ie the graphics card may be starved of data when the gc fires, meaning the graphics card must wait on the cpu too.
-Collections/containers (can't build a large app without them) must cast back from object. Dynamic casts are slow and will always be slow. Templates don't have this problem, autoboxing and generics HIDE this problem.
-Small devices often don't have JITs
Just as a thought experiment, consider what the SNES and GBA did with C and asm, and compare that to Java games on the much more powerful mobile phones of today.
Are you joking? The JNI call overhead is extremely large which means that any gains through faster lower level code are lost, unless you are performing masses of computation at once.
Plus of all the cross language linking I've seen (C++/Python/C/.NET) it is by far the ugliest to write.
The folks who designed Java are almost religious in their beliefs. I would not be suprised if they made JNI deliberately ugly and slow to discourage people to not to write in Java, the language they spend so much on marketing and selling.
Sadly our boys and girls in harm's way is the only restraint on the US military's actions at present. The mass media, politicians, mainstream public sentiment etc do not care about the deaths of foreigners, only of Americans.
Almost all calls for troop withdrawl from Iraq mention the thousand or so US soldiers deaths, not Iraqui civilians, even though there are 100x more of the latter. The Vietnam withdrawl had more to do with the deaths of tens of thousands of soldiers than the millions of Vietnamese civilians. This is not specifically an American sentiment, it works pretty much this way in all countries.
If the US can invade other countries with no negative consequences back home, what will put an upper limit to the force exercised overseas? If Americans can move joysticks and program computers to kill man shaped blobs from hundreds of kilometres away, what's to make them feel bad when they shoot at a slightly smaller, child shaped one?
When wars are waged where casualties are massively one sided, the side suffering the greatest losses will feel cheated and opressed and desire to move the conflict to "spread the pain and grief around". This would probably means more civilian attacks against the US - "Why should our children be the only ones to die?"