Follow Slashdot blog updates by subscribing to our blog RSS feed

 



Forgot your password?
typodupeerror
Note: You can take 10% off all Slashdot Deals with coupon code "slashdot10off." ×

Comment It's undefined in C/C++ (Score 1) 1067

In C and C++ it's not defined to throw an error. It's undefined behaviour and the compiler is free to do whatever it wants.

Typically that means doing nothing special, and on x86, the instruction itself traps when zero is the denominator. On powerpc, there's no trap and you get zero. Each processor has a different, defined behaviour.

However, if the compiler can prove that, along any particular path, the denominator is guaranteed to be zero, it's allowed to delete that entire path, as the program is undefined if that path is followed, so it can assume it isn't followed. It's not guaranteed that your program will execute normally up to the divide by zero. A soon as the divide by zero becomes inevitable, the program is undefined and the compiler is free to do absolutely anything.

If any of the above scares you, C and C++ aren't the languages for you. It always amazes me how many people write non performance critical code in C. But when you need speed/efficiency, there's no replacement for C or C++ and a good optimising compiler.

Also, to the original poster, no, defining it to be zero doesn't make sense. PowerPC did indeed do that. But the number desired isn't always zero. It's undefined in mathematics for a reason: in different situations, it logically should be a different value, and there's no way to resolve the contradiction. Hence if you do divide by zero, your program is seriously flawed.

Comment Go to college to actually learn something (Score 3, Informative) 306

While you shouldn't necessary pick a major based on the hottest job, you definitely need to pick something in consideration with how you will use it. And you sure as heck should go to college to learn and make yourself better--not just to receive a piece of paper. Racking up 5 or 6 figures of debt without learning anything of value is a terrible idea. Unfortunately, we haven't given students the tools or perspectives to understand the consequences of the decisions they are making. Everyone is always warning athletes coming into college "the chances of you making it as a pro are extremely rare". And yet, the chances of someone making it as a tenured history professor at a major university are probably just as rare. At least the athletes aren't going into massive debt.

Add onto the fact that we have massively watered down many majors to the point of uselessness. The reason liberal arts majors get a bad rap isn't that it is a useless subject. If people came out as hard working critical thinkers they would be valuable contributors. Unfortunately, it is filled with people who just want a piece of papers and do the minimum to get by. This is a generalization, of course, but I believe is backed up by stats on plagiarism http://www.huffingtonpost.com/...). And the courses are watered down to be worthless. For example you can graduate from Yale with an English without having a Shakespeare course (http://www.washingtonpost.com/news/grade-point/wp/2015/04/23/skipping-shakespeare-yes-english-majors-can-often-bypass-the-bard/). So in 4 years of education in English, you don't have to actually take a course in the most influential English writer in history. But, you know, he is challenging to read and understand. As an alternative you can take a course in Literature for Young People http://english.yale.edu/course... which includes J. K. Rowling and Dr. Seuss.

At least with Engineering/Math/Hard Science you have to demonstrate via projects and tests that you have actually learned something.

Comment Re:Replace English with English! (Score 1) 626

The core problem with spelling english phonetically is that english has multiple dialects and we all pronounce the same words differently. What is phonetic for one accent is not phonetic for all the others. And before you say "screw you, only America matters", the same holds *within* the US.

Comment Re:Insurance (Score 1, Informative) 217

It's not an investment platform, it's a begging platform with door prizes. Investors get ownership for their money and can demand accountability *during* the life of the project.

And startup investors invest a large sum of money for that ownership. You aren't going to get ownership for 5-100 bucks.

Comment Wow, that gamasutra article!! (Score 1) 724

"ÃGame cultureÃ(TM) as we know it is kind of embarrassing -"
"ItÃ(TM)s young men queuing with plush mushroom hats and backpacks and jutting promo poster rolls. "
"petri dish of people who know so little about how human social interaction"
"infantilized cultural desert of shitty behavior"
"You know, young white dudes with disposable income"
"atrocities committed by young white teen boys in hypercapitalist America"
"ItÃ(TM)s probably intense, painful stuff for some young kids, some older men."
"Gamers are over. ThatÃ(TM)s why theyÃ(TM)re so mad. "
"These obtuse shitslingers, these wailing hyper-consumers, these childish internet-arguers"

This sounds like the mad rantings of a Freshman Gender Studies student who have never touched a video game, not the news director of a gaming website! It is nothing more than sexist, ageist, name-calling. It sounds like she not only hates her job but also hates the industry she is covering. No wonder Intel pulled their support, I can't imagine any corporation would want to be associated with this.

Comment Re:So-to-speak legal (Score 1) 418

The problem is that government is being used to choke out the competition, especially at a local level: http://www.wired.com/2013/07/w...

Comcast uses government regulation as a shield to block competition. So yes, the libertarian solution would be to remove these blocks and open up the options.

And you are naive to think that anyone in government, especially Democrats, will regulate Comcast. Obama has been in bed with Comcast for a while http://thehill.com/policy/tech.... And Comcast owns NBC, which owns MSNBC--the Fox News of the Democrat party.

Sorry to bust your Government/Democrats good Republicans/libertarians bad bubble.

Comment Re:"Undead" doesn't mean vibrant, though. (Score 1) 283

Sure... the only use for pass is to allow an empty block. But outside of canned examples and temporary debug hacking, empty blocks are not exactly used very often. Hence in the vast majority of cases, python has no "end-brace". Claiming that the pass keyword is a closing brace is disingenuous as it implies that it is always required. It *is* a no-op. You can use the pass keyword absolutely anywhere you want, and it will do nothing. It's only "useful" however in the largely useless case of empty blocks.

Comment Re:No winners economically (Score 1) 268

I have little sympathy for an industry that could have spent the last 40 years reducing their emissions.

Paying for extra emission reduction would put you at a competitive disadvantage against power plants who just did the bare minimum. Or, in a highly regulated environment, it might run you afoul of price controls.

Comment Re:The Religious Right will have your head on a pl (Score 3, Insightful) 470

You can't teach critical thinking in schools. The Texas state Republican party platform is explicitly opposed to it.

--
I piss off bigots

Your sig is ironic since your opinion is quite bigoted. There is a great deal of pseudoscience belief on both sides of the isle. The left has irrational beliefs on nuclear power, GMO foods, etc. There was an article in the Washington Post about Democrats believing in horoscope and astrology more than Republicans/Independents: http://www.washingtonpost.com/...

Comment Re: Solution - Face-saving way out (Score 1, Insightful) 482

The entire pro-choice movement is based on the concept of "My Body My Choice". You start forcing people to accept injections of anything into their bodies and you lose the moral basis for that argument. How do you "force" people to accept vaccines? Strap them down and inject them? Could anything be more frightening than the government forcing chemicals into someone's veins? That will make people even more anti-vaccine than ever.

I'm am very pro-vaccine. From childhood illnesses to flu to hpv, I want them all for myself and kids. And I have gotten into arguments with ignorant anti-vaccine people. What I have found is that they simply have lost all faith in "authority" because they have been lied to time and time again. WMD in Iraq! You can keep your insurance! Eat the food pyramid because you need to eat twice as much bread as you do veggies (not kidding, look it up). Leaders lie and lie and lie again to get what they want. Is it any wonder why people don't believe anything. In fact, it seems like the more forceful the denial the more likely the lie. You try and make vaccines mandatory you WILL make a bigger anti-vaccine movement.

Comment Re: First blacks, (Score 1) 917

Congratulations, your hateful vitriol against people who believe differently than you does more to justify the need for this legislation than any argument supporters could make....

Tolerance comes in both directions. If you can't see the difference between refusing to serve someone based on skin color and refusing to go to and participate in a ceremony that your religion disagrees with, I genuinely feel sorry for your blind hatred.

Comment IDE for search, refactoring, etc (Score 2) 627

I'm surprised that so many of the comments for IDEs are restricted to things like autocomplete. IDEs do far more than that. Things like smart refactoring (beyond GREP/Replace), code searches and navigation (find references, go up and down the object hierarchy, find impls), and debugging (attach to remote process, breakpoints, etc).

Comment Re:End of November (Score 1) 250

Not really. It sounds like a position that should have been filled from the beginning is just now getting filled.

The mythical man month does not directly cover the case of being under-manned until a month after release, then bringing staffing up to where it should be. And certainly if that is the entirety of your contribution, I have to assume you mean the most recognized portions of the concept.

Under-manned because they hired one more person? I haven't seen any evidence they were understaffed or under-manned. And someone I'm skeptical that a CEO guy with a BS in Political Science and no Software Engineering background is the key to turning this around.

As of next Thursday, UNIX will be flushed in favor of TOPS-10. Please update your programs.

Working...