Want to read Slashdot from your mobile device? Point it at m.slashdot.org and keep reading!

 



Forgot your password?
typodupeerror
×

Comment Re:Oh yeah (Score 3, Interesting) 102

I ran into an issue not too long ago with a custom stateless unique_ptr deleter, when one of the interfaces I derived from (in a third party library) was placed ahead of my own interface class in the derived class declaration. My own interface had a virtual destructor, while the library interface did not (which I didn't notice at the time). The deleter was blowing up, and only after I noticed it was off by one was I able to figure out why it was happening: the code was unable to cast properly, so ended up at the wrong address in memory because of the v-table layout.

This was fixed by switching the order of the two interfaces which corrected the in-memory layout so it would work. Alternatively, a shared_ptr would have worked as well, albeit with unnecessary extra overhead in that case. It's not exactly a new gotcha, but the unique_ptr + deleter put enough of a new wrinkle on it to throw me off for a while.

C++ gives you a lot of power and speed, but it definitely comes at a price in terms of issues like this. No one who knows C++ would seriously claim the language doesn't have sharp edges that still trip up full-time professional C++ programmers. Still, I love the power and speed the language gives me, while still affording me protection from the sort of mistakes that crop up in C code. For me, C++11 has been an amazing win so far in terms of overall productivity and code safety.

Comment Good questions - interesting answers (Score 5, Insightful) 102

From someone in the trenches using C++, I can definitely tell you that C++ 11/14 has made a massive difference, along with the adoption of better programming practices that have occasionally been eschewed by game programmers because of speed concerns. I describe the new C++ as feeling like C#, except with far uglier syntax. It's fantastic to be able to almost completely eschew the use of raw pointers (at least ones which I have to use to manage memory). It almost feels like the language has garbage collection, except that RAII + smart pointers work wonderfully on resources as well as memory.

I've been working in what is essentially a version of C++ 98-compatible style for nearly my entire programming career. Modern hardware has really reached a point where game developers can effectively take advantage of some of the real advantages of modern C++. It's remarkable how much more productive you can be when you're not worrying about having to carefully manage memory, tracking down a ref-counted leak, or (worst of all) spending hours or even days searching for some memory stomp.

Best of all, a some of the newer features don't even require a significant amount of overhead, but really just put more work on the compiler instead of the programmer. And there are ways to mitigate some of the downsides of ubiquitous RAII-type design (the cost of creating lots of small object), though custom memory managers optimized for those sorts of scenarios.

I have to say, I agree with Bjarne's answers, especially his answer to the notion of dropping compatibility with older features. While it does make the language more complex to keep that cruft around, it's equally important to allow programmers to wrap up older libraries with newer interfaces, for example, and make sure the codebase still compiles cleanly. Since I started out on my own just a year and a half ago, I had the advantage of starting my game codebase from scratch, so I could use the most modern techniques, but I've worked at places with 10 to 15 year old codebases. There's just no way all of that is going to get rewritten in the near future, so backward compatibility is hugely important for the C++ community.

Overall, C++ gets a lot of grief for it's ugly syntax and nasty gotchas, but modern techniques have really eliminated a huge percentage of those. Personally, I tend to view C++ like an extremely sharp kitchen knife. It can be a dangerous tool for novices, and you certainly don't want to use it when a butter knife will do, but there are some jobs that simply demand it.

Comment Re: Surprise? (Score 1) 579

Hell, Windows is significantly different than Windows from one version to another. That's not why Linux fails on the desktop.

Linux for servers has a significant advantage when serving up internet-related traffic. The job it needs to do is largely platform-agnostic, because it's working with open standards. Given that it can do the exact same job that MS servers can for zero cost, suddenly it has a real advantage and no real downsides.

However, the desktop is a different story. It's not about the OS so much as the software. Linux has a lot of free software that's pretty good. Some of it is as good as their counterparts on Windows. In my experience, though, most are a far cry from what you can find on Windows. And worse, there are a lot of programs for which there are simply no comparable Linux products at all. The desktop is still about what sort of programs you can run locally, and Windows still completely dominates here.

Of course, like you mentioned, Microsoft did it's absolute damnedest to throw that away by inventing a brand new ecosystem incompatible with their old "legacy" desktop platform. They seem to be backpedaling enough that Windows 9 will probably be a decent OS, but we'll see. I'm just waiting for them to lose their square-blocked, flat shaded, primary colored, butt-fugly UI fetish.

Comment Re:What's the problem... (Score 1) 92

I believe those articles demonstrate several things, but it's impossible to tell in what proportions:

* Educational indoctrination from birth, censorship, and propaganda seem to be effective
* Some are afraid to say what they really think, especially when being quoted on the record
* Some don't mind authoritarian regimes or censorship

It's important not to draw conclusions solely from what people say when there are obvious external factors which may be influencing the truthfulness of their statements. The poll data linked in the second article indicated the information was gathered from phone calls and in-person interviews, which means the people responding could not be certain their opinions weren't being tracked or monitored in some way. If you can get in trouble for criticizing the government, and then poll people to see if they have any criticisms of the government, are you surprised when they tell you they have no real complaints?

Comment Re:Rise of the middlemen (Score 1) 127

That makes a lot more sense. I couldn't even imagine how load times could be 45 minutes. Those are build times, not load times.

Still, that wasn't their only complaint. Whatever their technical merits, the team ended up unhappy with Unity, and seemed much more happy with Unreal, apparently. In the end, we'll probably find out if the real problem was the tools or the developers who couldn't use them properly when we see the final game - the proof of the pudding, if you will.

Comment Re:Rise of the middlemen (Score 1) 127

If you read the article, the $500 fee isn't really the primary issue. It's only particularly galling because it appears that the fee is used to license a product that's more or less a workaround for an abysmally poor-performing editor. That fee is in *addition* to everything else, if I understand correctly. I mean, 45-minutes to load a project? Are you kidding me? How do you even manage that on modern hardware? There's nothing more frustrating than a clunky workflow or limited tools that you have no way of fixing yourself. That really seemed to be the driving factor in the switch.

I've worked on large games before (200+ developers). We used our own custom engine and tools, and our designers could start up the game editor and be working in about half a minute or so. It's not impossible to keep things nice and snappy for the end users, even with *massive* amounts of content. You just have to be a bit clever about things.

I think that's a potential problem with a company that does nothing but write engines for others to use. They don't have to actually talk to the people that are suffering because of poor decisions they made, or crappy limitations that they never bothered to address. It makes a big difference when you can walk down the hall and watch people at work using the tools you made. There's a pretty big difference between a fully featured game and little tech demos or samples.

Damn, I still can't get over that 45-minute+ load time. There would be blood flowing in the isles if we made our designers go through that, and rightly so.

Comment Re:While Buying Back $1.5 Billion In Stock (Score 1) 207

Someone who buys a product with others' tax money is still a drain on the economy, because not only was there a loss of revenue from an actual worker / producer used to buy that product, there was also overhead in the transfer of that revenue. It can no more be a net benefit back to the economy than a perpetual motion machine can sustain its own energy.

Whether or not you feel someone is "working" or not, if their capital is invested, that money is then being used to move the economy forward. Business borrow money in order to expand product lines or upgrade equipment. Individuals borrow money to purchase a car or a home. However, it's dependent on people having capital to invest. In other words, even if someone isn't working, their money probably is. And make no mistake, there's not enough wealth at the top to pay for the government's current spending levels. We could tax the top 10% at 100% rates and it wouldn't even fix our current deficit.

It's unwise to base fiscal policy on emotions such as jealousy towards wealthy people or a desire for social justice. Blaming the rich for not paying their fair share make for great politics but poor fiscal policy.

Comment Re:Does it matter? (Score 1) 151

The scientists and engineers that design the US nuclear weapons have computational problems that are measured in CPU months. A senior scientist was talking to a consultant, and explained the importance of these simulations.

"Just think about it.", he said. "If we get those computations wrong, millions of people could accidentally live."

-credit to the unknown US nuclear scientist who told this joke to Scott Meyers, who in turn relayed it at a conference.

Comment Re:Obvious (Score 1) 151

I think it's fair to say that we've reached a point where we're flying "fast enough" for most practical purposes. Flying to the other side of the world only takes about 18 hours or so, which is pretty amazing, and the fast majority of flights are much shorter hops. Once cost, safety, reliability, and noise all reach a point where they can't be easily improved, aerospace engineers will probably start pushing harder against the speed barrier again. It's not that there's no impetus, it's just that there are currently higher priorities.

I think there are some interesting parallels to the improvements of tech components. We may be approaching a stabilizing trend because our computers are becoming "fast enough" for darn near whatever most people need to do with them, and because the physics for making components smaller and faster are really starting to get in the way. At some point, computers will be fast enough that they'll do whatever people want them to do, and there will be very little impetus to make them significantly faster. Besides gaming or other high-end jobs, personal computers are already ridiculously overpowered for what the user actually demands of them. And a lot of performance issues can simply be blamed on poor software design or overly deep and inefficient software abstractions. Note how the last two Windows OSes have actually *improved* CPU and memory performance since Vista, which was a pretty notorious hog.

I suppose this explains why most people are probably better off with a smartphone or a tablet, and why PC sales are dropping. I think the PC isn't dying so much as finding a more appropriate niche within the computational power spectrum.

Comment Re:Some of us do still assemble, even now (Score 1) 294

In a large percentage of the projects I've worked on, most of the game code was in C++ too, with scripts used for more specialized tasks and customization. The trend of writing large portions of game logic (like AI) in scripts has fallen out of favor for the projects I've worked on, for a variety of reasons. That's not to say we didn't use them extensively in more focused areas though.

Comment Re:Stupid (Score 1) 561

Yeah, the fact that men just happen to be in the teaching jobs that get paid better is total coincidence.

I'm not sure what that had to do with what I was discussing. Just because I don't think affirmative action is morally justifiable or effective doesn't mean I believe women should be paid less. But what the heck, let's go there...

Simple economics factor can explain the discrepancy between K-12 and college professors. There are far fewer available tenured positions at colleges, and the educational requirements are tougher to become a professor. Highly trained specialists always get paid more. So of course a college professor will earn more than a K-12 teacher.

However, that doesn't explain the gender gap within the tenured professorship level. Note that fields such as science and engineering tend to command higher salaries, and since these are male dominated, it likely skews the results. We'd really have to see male/female salaries per department and at roughly equivalent experience levels and professional credentials / awards, or else we're comparing apples to oranges. If we compare apples to apples and see a disparity, then of course, that indicates a problem.

As far as K-12, all grades typically use the same pay scale, and of course, aren't different for men and women.

Did you just assume that high school teachers earned more than kindergarten teachers? Or are you suggesting that college professors earn more than kindergarten teachers simply because of sexism?

Slashdot Top Deals

Chemist who falls in acid is absorbed in work.

Working...