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

 



Forgot your password?
typodupeerror
×

Comment Signals and slots (Score 4, Informative) 161

You can now use any C++ function as the target of a signal using the new QObject::connect() syntax. This is a huge win because with the new syntax the compiler and linker can check that the connections are valid instead missed connections just causing a run-time error.

The moc preprocessor is still required for QObject derived classes, mostly for the translation framework and also to provide support for the old signal/slot syntax which is still allowed. Qt5 doesn't require a C++11 compliant compiler, which is a good thing since there aren't yet any fully compliant compilers. I'm sure if there is a Qt6 it will require C++11 and use those features.

Some of the really cool C++11 features like move constructors aren't necessary with Qt because it's containers implement reference counted copy-on-write, so when you assign a QMap from another QMap no copy is made, and if the old QMap was an rvalue then there is never a need for the copy to be made when the new QMap is modified. One of the big improvements Qt4 made over Qt3 was to make container assignment atomic so this mechanism worked with threaded code and defensive deep copies weren't necessary anymore.

Submission + - Seas rising faster than projected (reuters.com)

zenyu writes: IPCC's 2mm per year sea level estimate rise at current CO2 levels proves way too optimistic. Sea levels have been rising 3.2mm per year in the last two decades. The IPCC's 50 cm — 100 cm projection for the next century may prove equally optimistic.

Comment Re:He's probably right. (Score 1) 881

I agree; if Mr. Romney wins, he'll be a custodian president because probably the Senate will remain Democratic and the country will remain split.

In the budget stand-off 68% of Democrats wanted Democratic leaders to make compromises to avoid the fiscal cliff, only 38% of Republicans wanted Republican leaders to make compromises. The congress follows the lead of their supporters and consequently Democratic congressmen are much more likely to compromise with a Republican president than the other way around.

http://msnbcmedia.msn.com/i/MSNBC/Sections/NEWS/A_Politics/_Today_Stories_Teases/11139%20April%202011%20Filled-in.pdf

Comment Re:But that's not the real problem. (Score 1) 1651

I once witnessed one of these low speed collisions of a car with a bicycle. The bicyclist head it the pavement HARD when the car ran over him. But he was wearing a helmet and I heard him scream in agony when the driver backed up and ran over his legs again. Consequently, I wear a helmet whenever I ride my bicycle and my bike is absolutely covered in blinkers. I've also learned to be very aggressive about taking the lane when safety demands it. The law in NYC is that if a car passes you within 3ft or the lane is narrow enough that there wouldn't be three feet of clearance for a passing car you must take the lane to prevent other vehicles from passing you. Or as a friend said, "If they honk that means they see you!"

Comment Re:The onion that will change the world (Score 1) 118

You are at least 68 years too late on that count. Iceland won its independence from Denmark with zero bloodshed.

Your number is off a bit, I believe estimates of the number killed in World War II ranges between 50,000,000 to 78,000,000. Just because it was Hitler's tanks rolling over Denmark and not Icelandic ones doesn't it peaceful.

Comment Re:Scalpers (Score 1) 295

Just curious: if I am a company, why would I care about scalpers?

The only thing I can think of would be items like a game console, where the console itself is not very profitable and may even be a loss-leader. In that case, you want as many different customers to own one as possible so you can make the money on games, streaming media and other services. But then, scalpers want to make money too, so pricing themselves above what the market will bear isn't in their interests either.

I think you pretty much explained it. Because you sell one expensive to produce product and many cheap to produce auxiliary products. You want to price the main product car, phone, printer, bicycle, stroller, pretty much any physical product low so as to get the consumer on the hook. Then you price the navigation system, screen protector, toner, light-weight wheels, cup holder, pretty much any auxiliary product with enormous profit margins. If scalpers buy up a significant portion of your initial production capacity it not only means your ultimate customers pay more and so they are less able to afford the add-ons it also means they didn't need to enter your store to buy the low margin product so you lost your best opportunity to sell the high margin add-ons.

Scalpers are necessary for an efficient market and shouldn't be discouraged by any good government, but there are plenty of reasons why a producer might not like scalpers in their market.

Comment ...totally meaningless... (Score 4, Informative) 633

The inexpensive American "beer" that is used in this calculation uses maize and rice instead of barley as the main ingredient, grasses that happen to be heavily subsidised here and hardly used to make beer anywhere else. If you want to drink beer that is made of the same base ingredients as the real stuff then it will cost about 2x as much in the supermarket here as it does at a bar in Amsterdam. There are a lot of breweries in the US that make some really good beer, especially ones founded in the last two decades, but that stuff ain't cheap, at least not yet.

Comment CFL (Score 1) 1080

I'm sorry to hear about your "energy audits". My experience has generally been positive with CFLs, I do a few things which may contribute to my positive experience: 1/ if I'm replacing a 60 watt incandescent I use a 75 watt "equivalent", 75 watt means I use a 100 watt "equivalent", etc. 2/ If the light needs to be dimmable I don't use a CFL, a halogen (a type of incandescent) is efficient enough to meet the current standards and works well. 3/ I buy the lightbulbs from a lighting store.

BTW Quick on CFLs are pretty common, but it is something you need to look for as a feature on the packaging. I assume it ads 25 cents to the manufacturing costs.

Comment Pricing Pollution (Score 1) 245

If you agree that CO2 is a problem, pricing CO2 emissions is the right answer.

Agree to the premise, disagree to the conclusion unless you add a second premise that we have the power to price emissions uniformly across jurisdictions, or at least the ability to prevent substitution of emissions from one jurisdiction to the next.

If you increase the cost of emissions only in the US, the rational thing for emitters to do will be to substitute emissions somewhere else. A lot of steel gets made in China (with no pollution controls to speak of) and shipped to Europe (ironically, in dirty diesel powered freighters) because CO2 targets (and hence costs) vary across borders.

You can deal with this by simply applying a tarriff on products from countries that don't implement reasonable carbon controls. For a large power to pass WTO review you have to base this tarriff on an estimate of the amount of polution caused by producing the product in the exporting country. But the money raised from the tarriff would more than pay for the cost of estimating the amount of polution being generated in the exporting country. And in reality if a major trade block like NAFTA or the EU implemented such tarriffs others would quickly implement their own carbon dioxide controls. As long as the carbon dioxide emissions are being factored into the price, the exporting country would rather not have that done by the importing country collecting tarriffs.

I don't think that a carbon tax should be the only acceptable way to avoid the tarriff. If the exporter is lowering their emissions faster than the importing country through some other scheme then it would be unfair to apply the tarriff, be that through subsidy of alternate power sources or harnessing the power of the flying spagetti monster. But practically all economists agree that a carbon tax is the cheapest way to address the problem.

The truth is that if the US or Europe wanted to get real about CO2 they could. Maybe some smaller countries acting alone couldn't do this because they would be smaked down by the WTO, but they could try this and if enough small countries did this that would work too.

Comment Air Charter (Score 1) 190

If you can afford 1st class it's really worth looking into, especially if considering more than one seat. With a smaller plane many more airports are open to you, including all the ones without the security theatre. You arrive find your pilot in the lounge and you are on up in the air a few minutes later.

There is a reason airlines are reducing and eliminating their 1st class cabin on domestic routes (though they usually call their business class "domestic first class" or some such). Most of the 1st class seats are filled with upgrades from business class or miles redemptions. The 1st class seats that sell tend to only be on a few routes like NYLA because union rules require that actors be booked in the 1st class cabin. http://www.onesky.com/ and http://www.rsvpair.com/ can help you find a charter.

Comment This is a good and necessary step (Score 1) 319

For Weyland to work applications will need to support it and nVidia & AMD will need to support it. It needs to be available via a fairly simple install before I'll try to port my applications to it. I'm hoping the Weyland developers are actually talking to nVidia and AMD and Cannonical doesn't release this until they have at least beta drivers.

I'm not too worried about the network transparency even though I use it everyday. Most of the applications I use remotely are things like emacs that are a bit slower when sending images rather than text to be rendered but don't really need the performance X11 can give you with remote applications. Remote OpenGL is nice and I remember being annoyed when only SGI supported it, but no one explicitly writes to that because it has never been universally supported.

I'm not totally up on how Weyland will work but as I understand it the main push is to provide a simpler API that gets rid of stuff like having the X server render your fonts. Instead your application will do that using a toolkit like Qt and hand the image over to the Weyland server. I don't care if indexed color or binary bitmap support goes away, but if RGB/RGBA is the only bitmap supported that would be a problem. How things will things like XVideo and VDPAU will work? We can do YUV->RGB conversion in the application but it means pushing a lot more data across the bus and generally you don't even want video composited. Anyway being able to run Weyland easily will let me know what is already there and what I will need to convince the Weyland developers to add before it goes mainstream.

Comment Oh boy! (Score 1) 1086

In high school I didn't think math was all that important to programming. I was astonished at how wrong headed I had been by my sophomore year in college and tried to learn as much math as I could. You don't need to be a super math genious or anything. But algorithms are really just math and most of what a programmer does is string together algorithms to solve a problem. Some math has direct applications like Linear Algebra, Complexity, Logic and Set theory, while others like learning the transforms (Laplace, Fourier, etc) and other Calculus stuff or Probability is only used heavily in some subsets of the field. But they all sharpen the mind in ways that are useful for a programmer.

A programmer solves word problems. You get a sloppy problem defintion, you refine it and then you write out the formula for the computer to solve. The level of math required to come up with the formula depends on the complexity of the problem you are trying to solve. Most real world problems can be solved by simple algebra and logic, but the more math you have under your belt the more easily you can recognize problems that can be solved better. A transform can change an expensive O(n^2) algorithm into a O(n log n) algorithm. Knowing the math can tell you when that makes sense, and if you aren't good at that stuff you can at least know it and get the problem reassigned before you waste time on a bad implementation.

BTW A Programmer also spends considerable time debugging. This is often just reading the math that others (or an earlier you) has written and figuring out the disconnect between the intention and the reality of the formula. Other times it is figuring out what base assumption is wrong or proving the harware is broken.

Comment Do it (Score 1) 247

I think this is a great hobby to excersize the mind. It will probably help with your short term memory problems because programming relies so much on all types of memory. You should start with small problems, but more importantly write everything down. Paper is cheap, write down the requirements, then write down the design, then write down the algorithms you plan to use.. whenever you get lost go back to the paper.

Then there is debugging. By keeping the units small and writing unit tests for them you can minimize debugging to a degree, but there is always a need for debugging in any large program. Here I also recommend that you write down everything. Write down what the bad behaviour of the program is, write down your hypothesis, write down your steps to prove/disprove that hypothesis, perform the steps and record your results.. etc.. it's a slog, but debugging is always a slog.

As for the career.. Learning to play the violin to play in the NY philharmonic is just not likely to make you happy in the long run. Learning to play it so that you can make beautiful music will be more fulfilling.

Slashdot Top Deals

If you want to put yourself on the map, publish your own map.

Working...