Please don't confuse the SPUs (the eight coprocessors on the Cell die) with the PPU (the main CPU core). The PPU is also part of the Cell, so don't call the SPUs "Cell CPUs". There is also no MIPS core -- the PPU is a 3.2GHz PPC core with two hardware threads. The SPUs also run at 3.2GHz, but are not considered "real" CPUs since they can't bootstrap themselves, they have to be given tasks from the PPU.
SPU programming forces a model on you as a developer -- modularize your tasks with as few synchronization points as possible and treat the SPUs like a thread pool. What's the problem here? This is a good model even if you're not limited to the SPUs. Developers who move more and more tasks to the SPUs will find themselves in a much better position next generation when parallelization is more massive, regardless of whether the Cell or something like it is involved.
Actually, since I played a mage, it was much worse than that for me. Mages received a ton of nerfs for the expansion to force one of the original 2 pure dps classes into the position of doing only average damage. At that point, why play a mage, and since it was obvious that Vivendi doesn't understand how to run or balance their game, why bother playing? Mages in particular are now inferior in every way to warlock character. Less dps, more downtime, less hit points, less pvp viabilitiy, worse AoE. If I was running a hard core raiding guild, I wouldn't take more than 1 mage into a 25 man instance, and the mage would be there solely to buff warlock dps with scorch (and hand out food and water and AB). I played the class, and that would be my recommendation.
I don't know what kind of crack you're smoking, but I play a mage too. Most of my new gear is green, with a few blues, and one socketed item. I'm only 65, with 42 points in frost and 14 in fire (it's going to be 0/19/42). I'm out DPSing (70) warlocks, BM hunters, shadow priests, and sometimes rogues. Now, given the original position of the mage in beta, and before the nerfs, I've fallen a couple ranks on the DPS charts -- mages used to out-DPS EVERYONE, with rogues only being able to win on fights that went for more than 10 minutes or so. I do run out of mana pretty quickly, but that's because of how I've min-maxed my gear (+dmg, +crit, stam, int, then spi). Just about every fight I pull out my extra 200 DPS pet, and every 90 seconds I've got 15 seconds of pure 2500 frostbolt crit magic thanks to trinkets. Warlocks don't touch me. Of course warlocks are going to have more HP than you, this is by design. But that doesn't mean they've got more pvp viability -- try taking a warlock against a melee class. Mages, on the other hand, completely wreck warriors, paladins, and rogues, and have good success against shamans. And AoE? How long can a warlock really do RoF? Mages can blizzard till the cows come home, and then take the rest of them out with CoC and AE. L2P.
I never had an 85, so I can't attest to how they did it (but google 85-hack.txt and you should find it). But on the 82 they inserted a 1x1 matrix variable into the backup, with the element being stored at $IMPORTANT_ADDRESS. Then they had a BASIC program called A which stored a value in that element. TI-OS would use the address stored in $IMPORTANT_ADDRESS as a key-handling routine, so you ran A, which put some address in $IMPORTANT_ADDRESS, and then pressed a key, and TI-OS would jump to that address (which was the start of the shell program) to handle the keypress. Or something like that. I might be rusty.
When TI started putting out graphing calculators, especially the TI-82 and TI-85, they were a relatively closed platform. They had a BASIC dialect for writing programs in, but it was essentially useless for writing anything longer than the quadratic formula. When you can only see seven lines of code, and you only have one letter variables and no comments, it's not exactly aimed at structured programming. They ran on Z80 processors, had a decent amount of RAM, and everything else... but no one could figure out how to run assembled programs. Eventually people spent way too much time with the TI-85 and were able to hack up a BASIC program that would basically overwrite memory containing an address to jump to, so they could load an arbitrary program. They did the same with the TI-82, eventually, and the TI calculator assembly world was born. TI apparently thought it was a great idea, because when they made the TI-83 and 86, the successors to the 82 and 85, they had a command called Asm(), which took a program file that was an assembly program, and ran it. Of course, they didn't support it, but they sure made it a hell of a lot easier. Some of my first memories of using the internet were to download reams and reams of z80 assembly tutorials and source. It really gets you thinking, when there's long winded debates about the best integer multiplication routine to use.
A question we commonly ask is "look at this function on the board. It takes as input a filename and a Camera*. It then gets a frame of video from the camera in a loop, encodes it, and writes it out to the file. What's wrong with it?"
There's plenty of things wrong with it -- The code doesn't gracefully handle the file not existing, doesn't check for NULL, the loop is written as a for when it would be more clear as a while, variables are named things like x when they should be named things like currentFrame. It's a very open-ended question, it weeds out people who aren't willing to think about edge cases, but gives a lot of room for mentioning improvements. I've never seen anyone address *everything* that could be fixed -- but then again, I have seen people who had very valid arguments about something we'd never thought of.
In other words, "what's the business model? Well we scam money from investors, and have a damn good time spending it. When the money runs out, we get new jobs on the high-flier reputation of running a multi-million dollar venture."
Actually, the business model is that Jimbo Wales spent the early part of his life making disgusting amounts of money in the futures market. It's not so much "what's the business model" as "when is the time going to run out?" I don't think Jimbo is really concerned with making money -- if he was, Wikipedia, one of the most popular sites on the internet, might have an ad or two on it.
Uh, the BitTorrent spec is fully available in about a million formats. There's a lot of projects with efficient implementations that you can use, or make your own. I suggest the open sourced libtorrent from Rasterbar. There's no need to subject yourself to the steaming pile of crap that is Azureus.
How on earth is anything on Horde easy? Have you seen the top raiding guilds? 9 out of 10 are Alliance. 2 words: aggro management. 3 more words: easier to level. Hopefully the Paladin lorelol swap will fix this mess.
Try PvP sometime. War Stomp. WotF. Orcs with 5% pet damage and stun resist. Berserking. A class that drops buff/debuff auras, heals, wears mail, can crit a huge nuke that hits multiple people on command, crits melee for 1k (and then procs windfury and does it two more times), and can self-rezz. I feel for the Horde in PvE, but that's mainly because of pally buffs (which Horde gets in BC) and Fear Ward. It's really lame that no horde priests get fear ward in the expansion, but another alliance race gets it. But the Horde has a clear advantage in PvP -- Horde racials are geared towards PvP, and Alliance racials are geared towards PvE. Oh, and you'll figure this out in a couple months, but 99% of paladins suck and can't play their class. I happen to know a few good ones.
I'll slightly raise my hand, cause it was last year. Hooray for universities who only support 3 of the worst mail clients -- Eudora, Pine, and SquirrelMail.
If your high school won't offer technology classes, see if you can get credit for taking them at a local college. A community college would be fine, for introductory classes. Encourage like-minded peers to do the same. If enough kids do this, your school district will be inclined to offer such classes. A kid a few years older than me did this at my high school, and singlehandedly created the computer science program at my school. I was lucky enough to be a few years younger, so I could reap the benefits of this.
What? I'm all for freedoms of just about everything, and whatever porn you want to watch is your business. I also drink, and I'm all for freedom to drink. Because no one's getting harmed. Look at the number of deaths every year from drunk drivers. Completely different thing.
for character in string do
. . . if uppercase(character) add character to uppercasestring
. . . else if space(character) increment spacecount
. . . else add character to otherstring
print uppcasestring otherstring space x spacecount
Sorry, should have been more specific. Assume that the string takes up most, say, 90%, of your memory. You can only use constant (not O(n)) extra memory. So you need to do it in place.
It's totally possible, and it's an interesting problem, but the one-pass solution is actually slower than a 3-pass solution. Remember that O(3n) == O(n). The one-pass solution uses much more extra memory, and many more instructions per character than the 3-pass solution.
I've been doing interviewing now, and I'd much rather see (for the purposes of what I do) questions about design, refactoring, comprehension of code. We work in a code base that's about 3 million lines, and 90% of what we do is refactoring, small additions to the code base, and integration -- often times integrating changes from fork A into fork B, where lots of the structure has been rewritten.
But through having friends who work at Microsoft, I learned that there's a lot of things I don't like about the environment there, and it's not really the place for me. If it's the place for you (my friends seem to like it), more power to you. Maybe their interview process is two-sided; I got to see how they think as well:)
As for the node deletion, one good answer is to copy the contents and link of the next node into the present, and delete the next node. This should work in all cases except the last node.
That's not safe. There may be other objects, threads, etc., who have a pointer to the next node.
Yeah, that's the solution, and it's ingenious at that, but if I was reviewing code and saw that, there'd be a trip down to HR in someone's future.
What an idea to acquire such a terminally dumb company.
Please don't confuse the SPUs (the eight coprocessors on the Cell die) with the PPU (the main CPU core). The PPU is also part of the Cell, so don't call the SPUs "Cell CPUs". There is also no MIPS core -- the PPU is a 3.2GHz PPC core with two hardware threads. The SPUs also run at 3.2GHz, but are not considered "real" CPUs since they can't bootstrap themselves, they have to be given tasks from the PPU. SPU programming forces a model on you as a developer -- modularize your tasks with as few synchronization points as possible and treat the SPUs like a thread pool. What's the problem here? This is a good model even if you're not limited to the SPUs. Developers who move more and more tasks to the SPUs will find themselves in a much better position next generation when parallelization is more massive, regardless of whether the Cell or something like it is involved.
SPAWN MORE OVERLORDS
If this is the level of problems you're having problems with, you're a few steps ahead of most CS graduates already.
I don't know what kind of crack you're smoking, but I play a mage too. Most of my new gear is green, with a few blues, and one socketed item. I'm only 65, with 42 points in frost and 14 in fire (it's going to be 0/19/42). I'm out DPSing (70) warlocks, BM hunters, shadow priests, and sometimes rogues. Now, given the original position of the mage in beta, and before the nerfs, I've fallen a couple ranks on the DPS charts -- mages used to out-DPS EVERYONE, with rogues only being able to win on fights that went for more than 10 minutes or so. I do run out of mana pretty quickly, but that's because of how I've min-maxed my gear (+dmg, +crit, stam, int, then spi). Just about every fight I pull out my extra 200 DPS pet, and every 90 seconds I've got 15 seconds of pure 2500 frostbolt crit magic thanks to trinkets. Warlocks don't touch me. Of course warlocks are going to have more HP than you, this is by design. But that doesn't mean they've got more pvp viability -- try taking a warlock against a melee class. Mages, on the other hand, completely wreck warriors, paladins, and rogues, and have good success against shamans. And AoE? How long can a warlock really do RoF? Mages can blizzard till the cows come home, and then take the rest of them out with CoC and AE. L2P.
Please. If you want to avoid buffer overflows, burn your own EEPROMs with a couple of leads and a 9v.
http://www.shadowprotectorate.net/forums/viewtopic .php?t=3174
Parsing Lisp is even simpler since it has no syntax. I accidentally dropped a pen on my keyboard and it wrote a Lisp parser.
I never had an 85, so I can't attest to how they did it (but google 85-hack.txt and you should find it). But on the 82 they inserted a 1x1 matrix variable into the backup, with the element being stored at $IMPORTANT_ADDRESS. Then they had a BASIC program called A which stored a value in that element. TI-OS would use the address stored in $IMPORTANT_ADDRESS as a key-handling routine, so you ran A, which put some address in $IMPORTANT_ADDRESS, and then pressed a key, and TI-OS would jump to that address (which was the start of the shell program) to handle the keypress. Or something like that. I might be rusty.
When TI started putting out graphing calculators, especially the TI-82 and TI-85, they were a relatively closed platform. They had a BASIC dialect for writing programs in, but it was essentially useless for writing anything longer than the quadratic formula. When you can only see seven lines of code, and you only have one letter variables and no comments, it's not exactly aimed at structured programming. They ran on Z80 processors, had a decent amount of RAM, and everything else... but no one could figure out how to run assembled programs. Eventually people spent way too much time with the TI-85 and were able to hack up a BASIC program that would basically overwrite memory containing an address to jump to, so they could load an arbitrary program. They did the same with the TI-82, eventually, and the TI calculator assembly world was born. TI apparently thought it was a great idea, because when they made the TI-83 and 86, the successors to the 82 and 85, they had a command called Asm(), which took a program file that was an assembly program, and ran it. Of course, they didn't support it, but they sure made it a hell of a lot easier. Some of my first memories of using the internet were to download reams and reams of z80 assembly tutorials and source. It really gets you thinking, when there's long winded debates about the best integer multiplication routine to use.
There's plenty of things wrong with it -- The code doesn't gracefully handle the file not existing, doesn't check for NULL, the loop is written as a for when it would be more clear as a while, variables are named things like x when they should be named things like currentFrame. It's a very open-ended question, it weeds out people who aren't willing to think about edge cases, but gives a lot of room for mentioning improvements. I've never seen anyone address *everything* that could be fixed -- but then again, I have seen people who had very valid arguments about something we'd never thought of.
Jimbo Wales is the VC. He's absolutely loaded. Wikipedia ran for years out of his own pocket.
Uh, the BitTorrent spec is fully available in about a million formats. There's a lot of projects with efficient implementations that you can use, or make your own. I suggest the open sourced libtorrent from Rasterbar. There's no need to subject yourself to the steaming pile of crap that is Azureus.
Less space than the Nomad. No WiFi. Yawn.
If you don't want to PvP, play Zelda. It's World of WARcraft. Or just play on a carebear server and never flag.
Try PvP sometime. War Stomp. WotF. Orcs with 5% pet damage and stun resist. Berserking. A class that drops buff/debuff auras, heals, wears mail, can crit a huge nuke that hits multiple people on command, crits melee for 1k (and then procs windfury and does it two more times), and can self-rezz. I feel for the Horde in PvE, but that's mainly because of pally buffs (which Horde gets in BC) and Fear Ward. It's really lame that no horde priests get fear ward in the expansion, but another alliance race gets it. But the Horde has a clear advantage in PvP -- Horde racials are geared towards PvP, and Alliance racials are geared towards PvE. Oh, and you'll figure this out in a couple months, but 99% of paladins suck and can't play their class. I happen to know a few good ones.
Yeah. We all know Spielberg hates the Jews. He even made a movie where six million of them die.
Mutt FTW.
I'll slightly raise my hand, cause it was last year. Hooray for universities who only support 3 of the worst mail clients -- Eudora, Pine, and SquirrelMail.
If your high school won't offer technology classes, see if you can get credit for taking them at a local college. A community college would be fine, for introductory classes. Encourage like-minded peers to do the same. If enough kids do this, your school district will be inclined to offer such classes. A kid a few years older than me did this at my high school, and singlehandedly created the computer science program at my school. I was lucky enough to be a few years younger, so I could reap the benefits of this.
Acer 24" LCD - $680
Norton AV - $40
You're paying for OS X, yes, but you're also paying for what you *don't* buy.
What? I'm all for freedoms of just about everything, and whatever porn you want to watch is your business. I also drink, and I'm all for freedom to drink. Because no one's getting harmed. Look at the number of deaths every year from drunk drivers. Completely different thing.
Sorry, should have been more specific. Assume that the string takes up most, say, 90%, of your memory. You can only use constant (not O(n)) extra memory. So you need to do it in place.
It's totally possible, and it's an interesting problem, but the one-pass solution is actually slower than a 3-pass solution. Remember that O(3n) == O(n). The one-pass solution uses much more extra memory, and many more instructions per character than the 3-pass solution.
I've been doing interviewing now, and I'd much rather see (for the purposes of what I do) questions about design, refactoring, comprehension of code. We work in a code base that's about 3 million lines, and 90% of what we do is refactoring, small additions to the code base, and integration -- often times integrating changes from fork A into fork B, where lots of the structure has been rewritten.
But through having friends who work at Microsoft, I learned that there's a lot of things I don't like about the environment there, and it's not really the place for me. If it's the place for you (my friends seem to like it), more power to you. Maybe their interview process is two-sided; I got to see how they think as well :)
That's not safe. There may be other objects, threads, etc., who have a pointer to the next node.
Yeah, that's the solution, and it's ingenious at that, but if I was reviewing code and saw that, there'd be a trip down to HR in someone's future.