Catch up on stories from the past week (and beyond) at the Slashdot story archive


Forgot your password?
Slashdot Deals: Deal of the Day - 6 month subscription of Pandora One at 46% off. ×

Comment Re:The old talent doesn't understand the new stuff (Score 1) 229

I agree with you. For my work I would like to use classes, polymorphism, overloading (functions not operators), and pure virtual functions. Anything else on an embedded system would probably lead to bloat fast, so no templates (and STL). I would also avoid a lot of the new features like lambda functions.

We're already using classes, and pure virtual functions. It just looks ugly because we're doing it in pure C.

The arguments I usually get into are with people who think that any sort of c++ code automatically bloats the code by hundreds of percent and slows it down by 50%. The big argument I'm having right now is when we change the file extension from .c to .cpp and use the c++ compiler that the object file is suddenly larger, so it must be larger on the target and must be slower. I usually fix that by extern "c" in the header files, but I still have the same argument over and over again.

Comment Re:The old talent doesn't understand the new stuff (Score 1) 229

I constantly have the c vs c++ argument at work. We use c because our 'customers are afraid of c++'. But we're also doing embedded frameworks where we want to easily swap in and out drivers that follow a specific interface. And what was chosen was to use a structure of function pointers to do the interface. Others got upset when I started to label my structures with vTable for the interfaces I was creating.

I'll fully admit that c++ has it's disadvantages but when you're writing object code in c, why not use it and limit what aspects are legal?

Comment Re:Huh? (Score 1) 219

I wonder if I had the same teacher. I remember getting told you couldn't subtract a big number from a small number. And then getting detention because I used the calculator I got as a prize for being the most improved in Math by that same teacher to show you could. Apparently the calculator was malfunctioning. That completely messed me up when my family moved and I got laughed at when I insisted you couldn't subtract a large number from a small one.

Or maybe its just the elementary school way of teaching math at the time.

Comment Re:CVS or Subversion (Score 1) 325

I'm fighting the fight right now of moving from SVN to Git/Bitbucket Server. So I'll give it a shot in explaining why Git is harder on newcomers than Svn, Cvs. I also work for a hardware company that isn't very good on software discipline. But we have a much larger project than what was explained above.

To start with, its Git's complexity. One of our customers (who pulls more weight with management than the engineers do), recommends that we don't move away from SVN to Git because 'Git is too complex for embedded engineers'. There is definitely something to this. The client/server architecture of SVN is easier to understand to people dealing with the basics of networking. It works very much like a filing cabinet that hardware centric engineers can wrap their heads around. You basically have a copy of what's on the server.

With beginners they look at the power that any VCS can provide and then go crazy with it. They store things that shouldn't be in there, because its convenient. Binary artifacts for instance (.a files, installers, pdfs, etc). With a new team just discovering the joys of VCS your repository is going to explode with these things, because they won't understand how it affects things. With a distributed repository like Git this will explode the repo that needs to be cloned. And people will not understand why its slower than SVN at least on the initial clone/checkout. I'm not saying there aren't any solutions to this (I'm deploying git-lfs backed by JFrog Artifactory to handle my binaries), but you have to make sure you have everything sorted out before you go to Git.

Branches are another problem, some engineers can't get their heads around it. In SVN it looks like just another copy in the repository. Almost like another directory. With Git its completely different, branches in Git are wonderful and probably its killer feature over SVN. But it adds in complexity and newbies won't appreciate them, and really know how to deal with them.

Git also gives you enough rope to hang yourself, and then gives you plenty more. You can treat it like a normal VCS system, but that removes a lot of its power.

Newbies also haven't had the pain of a malfunctioning VCS, or the pain of when it starts to go wrong. With the centralized repository the pain can be concealed better with SVN. Git rips off all the band-aids.

Git can be merciless when it comes the power it provides. A lot of the complexity can be trained away. The Pro Git book is a good place to start, but how are you going to make your developers read it and understand it? For my own migration I'll be training the entire team on how to use Git when working in our project along with JIRA, Bitbucket server and Bamboo. I think the training will last for 2 days or so. Do you have enough time to put together the training for your own team, and then conduct the training? If you don't need Git's features, SVN's simplicity is definitely easier to train for.

I hate to say it, but engineers and developers are stupider than they think when it comes to things outside their direct experience. Giving them SVN is like giving them a bike with training wheels. Its good for them to learn, and maybe you can take off the training wheels (using the CLI instead of GUI), but you wouldn't trust them out in the street. Giving them Git is like giving your 3 year old the keys to your SUV even with limiting them to a GUI. You want them to learn a bit before they get that power.

I'm moving my team from SVN to Git to get a better workflow together. With 2/3 of the team in India I have a very hard time keeping the builds clean. Running with SVN right now the developers have been instructed to commit all their changes at the end of the day. I want to find the guy who said this and shoot him, because we have people breaking the build, then running off home for the weekend, leaving the people 12 timezones away stuck. With Git, Bitbucket, and JIRA workflows set up (and permissions on who can actually commit to the MASTER branch and how it is done), I hope to isolate people's work and not having it break the build. I also hope that I'll be able to keep MASTER clean and always releasable. I can't do that easily with SVN, especially since IS has forbidden us from locking any files in SVN (because it slows the server down). My team has now had enough pain from build breaks that they're willing to learn Git and the power it has and how it will make their lives better. (For one thing I won't be yelling at them). A new team won't have this built up pain, and won't have the fear of the release manager yelling at them.

Comment Re:First... (Score 1) 167

I don't know for sure, but I don't think that Weis & Hickman own the copyright on Dragonlance. I know that both were employed by TSR when the books were written for TSR. Since they were published by TSR while Weis and Hickman were employed by TSR they'd be considered 'Works for Hire'. Which means that TSR -> WotC -> Hasbro owns the copyright on the Dragonlance novels and world.

There may have been a supplemental agreement that gave them ownership of Dragonlance, but if that doesn't exist that Hasbro owns it and they can do whatever they want with it.

Comment Re:"Other types of electromagnetic radiation" (Score 1) 529

This actually happened to my father when he was into HAM radio. It was back in the day when you assembled your own equipment. He put up the monopole antenna/tower first, and ran the coax back to the house. Industry Canada (or whatever it was called) came by about 2 weeks later with complaints about him causing people's TVs to go out and they had to inspect his equipment.

They did so, found it only half assembled, and the coax from the Antenna sitting bare without even the connector put on it yet. The inspectors rolled their eyes and filed the complaint as groundless by NIMBY people and left.

Its definitely the sight of the antennas that cause the bulk of the issue.

Comment Re:Summary is rather misleading (Score 4, Interesting) 193

You're assuming that that the games are all strictly a high level language like C, C++ or C#. A lot of game programmers will drop down to assembly to do some things as fast as possible. When I was in the industry I had to do that a few times, never for the xbox360 though so it may not be as big of an issue.

Game programmers also use a lot of intrinsics that are basically C macros around assembly calls. And these are very tied to the CPU architecture. They also do a lot of things based on cache line sizes. Making sure that structures or multiples of structures fit inside cache lines. Or play around with using a structure of arrays instead of an array of structures, or visa-versa it all depends on what turns out to be faster on the architecture, or CPU multi-threaded loading, or the cosmic rays hitting the box at the time. If a game team has a good set of optimizers on it they'll beat anything a compiler will do, and it will tie the performance of the game to the CPU and ensure you can't just recompile. Recompile will just throw error after error.

The CPU architecture is completely different. Pipeline depths, branch prediction, it uses SSE for its vector unit instead of the one in the xbox360. And that's all fairly custom code almost in the assembly level to force the use of the vector units. The GPU is different though I think they were both AMD GPUs so it shouldn't be too bad for the code to run on it, and it should be using Direct Draw 9.0c as the API so it shouldn't matter what the GPU is.

Microsoft also loves to change their APIs between SDKs, something compiling for June 2010 may not compile in June 2012. The only thing they guarantee is that something compiled on June 2010 of the XDK will run on June 2012 version of the flash. And only on the production boxes. I remember a few times where older games compiled for launch did not run on the latest flash on the dev kits. The dev kit flash was filled with lots of things to make development easy, so they stripped out deprecated functionality. They also stripped out the deprecated functionality to ensure that people didn't use it, because game developers would find a way to get at it if they really needed to, if it was in the flash they'd find it.

Also MS may only have source code for Microsoft Studios' games. They don't have the source code for any of the third party games. When submitting for certification and publishing all they cared about for the xbox360 was the ISO image. They may not even have the source code from their own studios available. Especially from the early games, the Xbox360 has been around longer than most companies store data. The company I worked for only kept the source code around for 5 years. That would put the earliest game to have published in 2010. They may not go back this far for their compatibility but it does cut out the earliest games.

I think they've finally got a Xbox360 PPC emulator that is fast enough to emulate what the xbox360 could do without dropping too much in the way of performance. And that wasn't ready at the launch of the Xbone.

Comment Re:Do It, it worked in AZ (Score 2) 886

It really depends on who you ask. When I sent out a novel of editing, it used the rules you stated, but the editor came back and said its no longer proper English, and that I should change all of those pronouns where the gender was not specified to they, them, and their.

The one the editor complained the most about was that the crew on the space ship I was writing for referred to the ship as 'she' and 'her'. I personally thought the object was stupid and rejected that change. Especially since there are reasons for calling a ship by the female pronouns. Historical reasons may be nullified by political correctness, but spiritual reasons not so much. Especially since the female pronouns refer to the soul of a ship as any sailor will tell you, and if you treat 'her' right 'she'll' see you home safe.

I sometimes feel like a stick in the mud and I realize that language evolves all the time. To me it will always he, him or his unless you know its female. They, them and their is plural.

Comment Re:Why not have devices get their time from GPS? (Score 2) 166

This works nicely for self driving cars which need GPS anyway. I have no idea why self driving cars were listed. And for the times that it can't get a GPS signal the internal clock shouldn't drift that much. Unless the self driving car is 100% underground it should be able to find a GPS signal to time sync to often enough.

Things inside a building might be harder. But there are things that take a GPS signal and put a NTP server on the network. All you need is on of these and you're fine for the local network. I used these 10 years ago when working on base stations, and they provided a very stable 10 MHz reference clock too. And they're not that expensive, I was looking for one for home because I'm a little anal about time some days.

Comment May not have to worry about taxes (Score 4, Interesting) 734

While working in Canada I had a boss who was a US citizen, but he had been born in Canada to US married parents. He had the tax id for his parents to claim him as a dependent till 18. But he did not have a SSN number. He refused to work in the states because he didn't want to get a SSN number and thus have to pay taxes for the rest of his life, but he was still a US citizen.

I have no clue if that was legal or not. And I have no idea if this matches your circumstances, but it may be something you want to look into. See if they will be forced to pay taxes even if they don't have an SSN number just the tax id (which is different for children, or so I've been told).

Comment Re:Jerri (Score 1) 533

I was talking to my wife about this a while ago. The problem is that the western countries won't commit to the timeline. It will take at least 3-4 generations of occupation for it to come to fruition. You need Great-Grandpa who was the die hard extremist to be dead not to influence the kids. You might even need Grandpa to be gone too.

Once there are jobs, once there is education, once there are 'good times' then you need to hold it long enough for the people doing the preaching about the 'evils of the west' to no-longer be relevant and no-one to have direct remembrance of them. Each succeeding generation will come to realize that they have more to live for then their virgins in heaven.

The US had to deal with the same problem with Japan after WWII. Before and during WWII Japan was very megalomaniac and that had to change. How long did it take for them to come back into the world community as a productive partner? It was at least the seventies, and in my mind it was the eighties when they really came back as a full economic partner. And they had a big advantage, they had a cultural leader (the Emperor) who wanted to push Japan in that direction, and it still took 30-40 years to do it.

I don't know of a cultural leader that is in the Middle-East who wants to push them into a productive member of the world. Instead they have people at the top who like being at the top and screw the people who aren't. There is a huge gap between rich and poor, leaving the poor without much hope, and nothing left to live for which is why they're willing to become suicide bombers.

It'll take 60-100 years of near lock down there, and building up the education and economy to fix it. We don't have the political leaders in the west who would be willing to make such a time consuming and costly commitment that in the long run will build an economic competitor.

Instead they want peace in the middle east, but no economic competitor. They can't have both for long before we start the cycle again.

Comment Re:GOTO is a crutch for bad programmers (Score 1) 677

if you're doing an init function you should match it with a deinit function.


int initFunc() {
if (!AquireResource1()) return deinitFunc(TERM_1);
if (!AquireResource2()) return deinitFunc(TERM_2);
if (!AquireResource3()) return deinitFunc(TERM_3);
return 0;

int deinitFunc(state = TERM_ALL) // Cheating with C++
        switch (state)
                case TERM_ALL:
                case TERM_3:
                        Cleanup3(); // lint intentional pass-through
                case TERM_2:
                        Cleanup2(); // lint intentional pass-through
                case TERM_1:
                        Cleanup1(); // lint intentional pass-through
        return -1;

I personally prefer the gotos but some people don't. I had to do the above pattern for something with a 24 step initialization process. Not all steps allocated resources of course but all of them could fail. The lead programmer hated gotos, so I had to do it that way. Which was also beneficial because I no longer needed to create a separate deinit function. To me it looks the same as gotos, *shrug* but to each their own.

I have used gotos in other cases. Mainly in driver development. I had something like 10 us between transmissions on a SPI bus and was trying to shrink that down. I replaced a continue with a goto and it saved me 90 ns. Made the code look horrible and ripped the goto out again to look for other ways to solve the problems. But sometimes when your optimizing and fighting for ns gotos are what's needed.

Comment Re:Fine, if (Score 1) 286

United is actually taking the monitors out, in favor of an app you have to download onto your tablet and wifi for their entertainment systems (if you had a PC then you could just hook right up to wifi and use the entertainment system). I think it was United but the disasters of Chicago and weather had me switching from American to United to US Airways during that trip. They were giving a trial run on the flight I was on, but I bet they'll go for out on it because it means they don't have to pay for the screens and don't have to worry about the bulky screens getting in the way of packing more cattle....passengers in the plane.

Comment Re:Boys are naturally curious... (Score 4, Interesting) 608

Very interesting, thanks for sharing. There were a few problems I had with the video.

It did make the guys who professed that biology had nothing to do with it look a bit like closed minded idiots, but that was mostly their own fault. With the two that were shown the studies contrasting their views starting to call the studies weak, and almost name calling.

The video alluded to many studies that proved that biology had something to do with it, but only really went into details with two of them, and those looked to be one off studies. If they had been repeated by other scientists then I would give them more weight.

The video was a bit bias in its selection on who to present. The 'biology has nothing to do with it' looked to be young and barely out of post grad and wanting to make a name for themselves. They also seemed defensive and emotionally invested in their views. The ones on the other side of the debate were older, and looking to be more established. This gave the 'there's a biological link' a more credible appearance.

Personally I'm with the guy who said that you can't ignore biology and you can't ignore culture. That's also known as the grey fallacy, but when you're trying to find the root cause of something like this you can't cut out one side of the argument, even if its bee proven wrong. You have to continue to prove it wrong with hard facts and understanding, and each time you do you promote more understanding of what the issue is.

The video was also nice in that it pointed out, it was only the scientists form the culture is everything camp that discounted the biological portion of it. The scientists from the biology is important camp didn't say that culture wasn't important.

"Love your country but never trust its government." -- from a hand-painted road sign in central Pennsylvania