Become a fan of Slashdot on Facebook

 



Forgot your password?
typodupeerror
×

Comment Re:Unit Tests are Not Optional Anymore (Score 1) 447

Nope. It's a waste of time.

Compared to what? Updating the firmware on millions of production routers and servers because a critical flaw made it into production? Paying out claims against the company that resulted from security breaches associated with the bug? Going back, after the code has already been designed, written and deployed to fix a bug that would have been tens of thousands of times cheaper to fix had it been caught instead by unit tests well before release? Testing has a cost, yes, but gambling that your code will get by without it can wind up costing you more than you'd ever imagined was possible. How would you feel about driving a car with software written according to that philosophy or banking software that get's it mostly right but every once in a while zeros out your balance for some strange reasons?

Comment Re:Unit Tests are Not Optional Anymore (Score 1) 447

How do you know each type?

You refuse to accept types that you cannot identify at runtime or you use a type safe language. Accepting void pointers or the like is just asking for trouble.

What if your bug occurs if one parameter is 37? How do you know in advance that this is a different type to be tested?

Then you test for that. You wrote the code for a specific reason and purpose, right? Well, then you ought to be able to prove that with tests. Knowing what tests you need and how to write them is itself a skill and a worthwhile one at that.

Comment Re:Unit Tests are Not Optional Anymore (Score 1) 447

Unit testing would only have caught this if someone had thought to test for an invalid payload length in the incoming request.

Sounds like a good test to me. The length of the payload was an input in this case and it should have been asserted against the true length of the buffer in a test.

Thing is, for networking, those tests need to be right there in the code. Any data coming in off the web needs to be treated like a TSA officer treats a hippie in a 'Legalise Dope' T-shirt.

That is yet another reason why we separate concerns in our code, so that we can plug in mocks and stubs as needed to simulate inputs into or outputs from a module of code. This enables unit testing, but it also leads to better organized and more clearly written code that accurately and concisely expresses the intent of the module. The existence of unit tests is a necessary, although not a sufficient, condition for good code.

Simple code review shows that OpenSSL wasn't doing that.

In hindsight yes but this code was reviewed (supposedly) and this was missed. Code review alone is not enough, you must prove it with tests.

Comment Re:And they've already stopped (Score 2) 632

Incorrect. They suspended enforcement while they review the matter. However, if the IRS finds, as a matter of law, that they're obligated to collect these debts, per the meaning of the statute, then they must attempt to collect them unless the law is changed or the courts rule otherwise. I've often heard from those on the left, "Oh, don't worry they're not going to enforce that" or "they're only going to use that against the right people", but here is the perfect example of why the law isn't always the best instrument to use in pursuit of social policy goals. There can be no mercy under the law. It binds all, whether they be high or low, equally. Anything less and the law fails to defend our individual rights and freedoms against the mob or the corrupt rule of the strong over the weak.

Comment Re:"Unwanted" Methane? (Score 3, Informative) 256

It depends upon what sort of fuel you're trying to produce. Methane can definitely be burned as a fuel, on your stove for example, but it's not a good aviation fuel. The idea here is to skip methane and go straight to ethane or propane which can be up-converted to even longer chain hydrocarbons via more heat and pressure, eventually yielding jet fuel. Artificial hydrocarbon fuels themselves are nothing new. The basic processes have been known since the early part of the 20th century, but because it's way cheaper to simply refine naturally occurring petroleum pumped out of the ground, nobody does synthetic hydrocarbons unless they have to. For example, Germany produced synthetic aviation gasoline from coal during WWII as supplies of oil were gradually cut off and South Africa produced diesel fuel from coal during the sanctions of the Apartheid era.

Comment Re:They do. (Score 5, Insightful) 256

There's no doubt that manufacturing fuel on board is desirable from a logistics standpoint. The question is cost, not just monetary but energy. As you're no doubt aware, hydrocarbon fuels are incredibly energy dense which means that an equal amount (and probably more) energy most go into their creation from scratch using the most basic raw materials, H2, CO2 and CO. The question is how much space is available onboard for production scale versions of these reactors and how much steam and electric power will the reactor have to supply to make this work. I don't know, but I would guess lots. This fuel production sounds like an energy hungry process. How much power and steam can be spared from other onboard needs to power fuel production? Would this stress the reactors, possibly reducing service life or requiring more frequent nuclear refuels? There are trade-offs here, it's not a slam dunk.

Comment Re:Any chemists want to weigh in?? (Score 2) 256

I was under the impression that electrolysis isn't a fast process but the article does mention some kind of patented "electrolytic cation exchange module", perhaps combined with some kind of "bicarbonate" reactant? In any case, it seems clear that they've found a way to substantially speed up H2 and CO2 production from seawater. From there it's not much of a stretch to produce CO and then hydrocarbon fuels, jet fuels in this case, via the well understood Fischer-Tropsch process or similar.

Comment Re:Just like Nuclear Fusion (Score 5, Informative) 256

You do realize that what they're producing here is artificial jet fuel, right? It's not "biofuel" because it isn't produced by bacteria or algae or other direct biological process. No, what they're talking about here is essentially the water gas shift reaction whereby dissolved CO2 in the seawater is combined with water vapor (aka steam) and carbon monoxide (produced via this "bicarbonate" reactant?) to yield carbon monoxide, carbon dioxide and hydrogen which more heat and pressure (steam) in the presence of an iron catalyst converts these products into short chain hydrocarbons (alkenes), probably ethanes (CH3) and propanes (CH4), and from there longer chain hydrocarbons with more heat and pressure until the desired blend is cooked up, jet fuels of CH9 to CH16. However, these processes don't really transition us away from fossil fuels or at least not into something besides a hydrocarbon fuel, whether produced artificially as in this case or refined from naturally occurring crude oil that we've pumped out of the ground.

Comment Re:They do. (Score 2, Informative) 256

It's unlikely that this would obviate completely the need for external supplies of fuel. At best it would probably only marginally decrease the depletion rate of on board stocks allowing for a somewhat longer cruise before a resupply is needed. There are probably other downsides to using this system too. For example, there are parts, maintenance and possibly extra wear and tear on the reactor which now not only has to propel the ship but also power an energy intensive conversion process from seawater to jet fuel. Indeed, the initiation energy for some of those chemical reactions is quite high which probably explains why somebody isn't already doing this on a large scale for profit here on land.

Comment Re:I'm not sure that any company can beat it (Score 1) 246

I wish I could find the Warren Buffet quote on this matter.

I doubt that you will find one because Warren's whole investment philosophy revolves around the concept of "durable competitive advantage" which is a fancy way of saying that some companies are superior to others and able to maintain that superiority over long periods of time. Buffet made his fortune by finding these companies, buying them at the right price and then holding them as long as they continued to have that competitive advantage. In some cases he has held positions for decades or even longer as profits mounted into the thousands of percent gain and counting. This also has the advantage of deferring capital gains taxes far into the future since no taxes are owed until the asset is actually sold. That's the basic theory anyway. Whether or not you believe that is up to you I suppose, but it's hard to argue with Buffet's lifetime results.

Comment Re:I've worked in financial firms for my entire li (Score 1) 246

Except that you're basically forced to participate in the US because they've rigged the tax laws so that it's very difficult to have tax deferred retirement savings in any significant amount without playing their 401K games, fees and all. If the US Government really wanted to make things fair, they would allow up to the maximum 401K contribution to be split among any number of like tax deferred plans, either personal IRA or plan offered by your employer. However, that will never happen because Wall Street always lobbies hard against anything that might allow individual savers to escape or minimize their fees.

Comment Re:day trader loses to second traders (Score 1) 246

How does that hurt the individual investor buying or selling with limit orders? With limit orders you can get the price you want or the trade doesn't happen. If your offer is reasonable it's unlikely that your trade will be forever in limbo due to repeated auto-cancels.

Slashdot Top Deals

"You know, we've won awards for this crap." -- David Letterman

Working...