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

 



Forgot your password?
typodupeerror

Comment Re:Write-only code. (Score 1) 757 757

> The sample code will copy a and b twice, once to put them in the lambda closure, and then to pass them as arguments to do_something. Some may consider this wasteful (the easiest fix is to modify do_something to take the values as const references).

No, the easiest fix is for a & b to be moveable types, which they may well be, in which case one of those copies becomes a move, and all is right in the universe.

Comment Re:Write-only code. (Score 1) 757 757

> So we all program in different dialects, and then scratch our heads when we read other peoples' code.

The practice of programming in dialects is more a function of the origins of the language than the size of the language. Stroustrup's most recent book does a marvelous job of demonstrating how little you have to know to program in C++ effectively: http://www.stroustrup.com/prog...

C++'s C compatibility is both its strength and its weakness, and the weakness primarily comes from people treating it as a bunch of add ons to C. If you scrap that attitude, it is entirely possible to be proficient in the language after a year of use and capable of reading most anyone's code (assuming they aren't shooting for obscurity) in another year or two. That's longer than some simpler languages, but it is hardly sufficient to excuse people's ignorance.

Comment Re:C++ Downfalls, Compiler and Internationalizatio (Score 1) 757 757

Regarding repeatability: the language is fully deterministic, and compilers have as much of an incentive to be consistent as they do otherwise. If you can't get repeatable builds, then the problem is with your build environment/process more than anything else. Aside from hardware entropy sources, computers are, by design, deterministic, so if you can't reproduce a build it is because you haven't constructed a proper build closure. Certainly there is nothing about C++ that makes builds any more non-deterministic than say, C. Debian actually has a project for this: https://wiki.debian.org/Reprod..., and you may find some helpful information there. You'll notice nothing they've run in to is specific to C++.

Regarding code-to-binary structural coverage analysis. Certainly I can imagine the argument that as you get to higher and higher levels of abstraction, it becomes harder for humans to track all the transformations all the way through to assembly. One solution is to restrict the levels of abstraction you work with. I would argue that is still error prone and you are better off with using theorem prover type automated solutions (and in general, languages built around provability like ML or Coq) rather than manual verification. Even better would be to perform the verification on the compiler itself rather than the code it compiles. That said, C++ compilers do a pretty good job of tracking the origin of each bit of code they generate, which ought to make it easy to have the machine inform you of the origin of any particular code block, and C++ also does a great job of letting the programmer decide what level of abstraction they want to work with and only making the runtime pay for the abstractions they are using. Its stronger type safety also helps ensure that there aren't "hidden" code paths do to programmer error. Of course, optimizers really complicate this, so you may need to turn them off as you mentioned.

Internationalization. That sounds like an old project... one that predates the C++ standard (which means a lot of bad C habits are involved). C++ is actually very well set up for internationalization, particularly because it is so agnostic about how stings are handled. Languages like Python, Perl & surprisingly Ruby have made all kinds of unfortunate decisions around internationalization that make it look like you are fine with internationalization, but it actually blows up in your face. As an example, ICU is probably one of the foremost libraries out there, and its primary language targets are C++ & Java. The C++ target has the virtue that you can pretty much just drop in ICU strings in to a well structured C++ program and all is well in the world, where as the Java one is a bit of a pain to take advantage of (fortunately, Oracle periodically syncs the ICU code in with the JDK, but that means you have to wait for a JDK update to get the latest ICU solution).

Comment Re:ignorant hypocrites (Score 1) 347 347

"Creativity" of software development is way overstated. It is not creative work in most cases.

Making yet another CRUD GUI is not exactly creative. Neither is any kind of usuall application you would be creating in business setting. Those mazes come presolved and you just trace line on paper.

In other cases, if you do not learn about problem being solved enough to be able to give good estimate - why are you professional? You should have business design document and technical design document and almost all gotchas covered already. What should remain is implementation itself and that is not much of creative work either - even if you have to wrestle with programing language to implement some concepts.

United States

Department of Justice Harvests Cell Phone Data Using Planes 202 202

Tyketto writes The US Department of Justice has been using fake communications towers installed in airplanes to acquire cellular phone data for tracking down criminals, reports The Wall Street Journal. Using fix-wing Cessnas outfitted with DRT boxes produced by Boeing, the devices mimic cellular towers, fooling cellphones into reporting "unique registration information" to track down "individuals under investigation." The program, used by the U.S. Marshals Service, has been in use since 2007 and deployed around at least five major metropolitan areas, with a flying range that can cover most of the US population. As cellphones are designed to connect to the strongest cell tower signal available, the devices identify themselves as the strongest signal, allowing for the gathering of information on thousands of phones during a single flight. Not even having encryption on one's phone, like found in Apple's iPhone 6, prevents this interception. While the Justice Department would not confirm or deny the existence of such a program, Verizon denies any involvement in this program, and DRT (a subsidiary of Boeing), AT&T, and Sprint have all declined to comment.
The Almighty Buck

Mayday PAC Goes 2 For 8 224 224

An anonymous reader writes: Lawrence Lessig's Mayday.us project had a bold goal: create a super PAC to end all super PACs. It generated significant support and raised over $10 million, which it spent endorsing a group of candidates for the recent mid-term elections and the primaries beforehand. The results weren't kind. Only two of the eight candidates backed by Mayday won their elections, and both of those candidates were quite likely to win anyway. Lessig was understandably displeased with the results. In a post on the Mayday site, he said, "What 2014 shows most clearly is the power of partisanship in our elections. Whatever else voters wanted, they wanted first their team to win."

Kenneth Vogel, author of Big Money, a recent book on the rise of super PACs, was critical of of Mayday's efforts, saying, "While voters do express high levels of disgust about the state of campaign finance and the level of corruption in Washington, they tend to actually cast votes more on bread-and-butter economic issues." Still, Lessig is hopeful for the future: "We moved voters on the basis of that message. Not enough. Not cheaply enough. But they moved."
The Media

Ferguson No-Fly Zone Revealed As Anti-Media Tactic 265 265

The AP (here, carried by the San Francisco Chronicle) reports that recorded conversations reveal flight restrictions requested in August by the police force of Ferguson, MO, and agreed to by Federal aviation safety officials, were specifically intended to limit the access of journalists to the area, rather than purely in response to safety concerns. One FAA manager in Kansas City was recorded saying police "did not care if you ran commercial traffic through this TFR (temporary flight restriction) all day long. They didn't want media in there." "There is really ... no option for a [Temporary Flight Restriction] that says, you know, 'OK, everybody but the media is OK,'" he said. The managers then worked out wording they felt would keep news helicopters out of the controlled zone but not impede other air traffic. The conversations contradict claims by the St. Louis County Police Department, which responded to demonstrations following the shooting death of 18-year-old Michael Brown, that the restriction was solely for safety and had nothing to do with preventing media from witnessing the violence or the police response. Police said at the time, and again as recently as late Friday to the AP, that they requested the flight restriction in response to shots fired at a police helicopter. But police officials confirmed there was no damage to their helicopter and were unable to provide an incident report on the shooting. On the tapes, an FAA manager described the helicopter shooting as unconfirmed "rumors."

Comment Re:For 3rd party batteries, I've had good luck wit (Score 2) 131 131

I bought Anker batteries for my (now Ancient) Thinkpad T42p and Macbook Pro 4,1. Prior to the purchases, I bought some cheep ones for the thinkpad and dropped (a lot of) money on the OEM replacement for the macbook and the Anker battery is actually better than Apple's.

This was over a year ago and half ago, and They're still in use.

Electronic Frontier Foundation

EFF: US Gov't Bid To Alter Court Record in Jewel v. NSA 78 78

The EFF is only today able to release details of an attempt by the government to alter the historical record in the case brought by the EFF against the NSA in Jewel v. NSA. "On June 6, the court held a long hearing in Jewel in a crowded, open courtroom, widely covered by the press. We were even on the local TV news on two stations. At the end, the Judge ordered both sides to request a transcript since he ordered us to do additional briefing. But when it was over, the government secretly, and surprisingly sought permission to "remove" classified information from the transcript, and even indicated that it wanted to do so secretly, so the public could never even know that they had done so." As you'd expect of the EFF, they fought back with vigorous objections, and in the end the government did not get its way, instead deciding that it hadn't given away any classified information after all. "The transcript of a court proceeding is the historical record of that event, what will exist and inform the public long after the persons involved are gone. The government's attempt to change this history was unprecedented. We could find no example of where a court had granted such a remedy or even where such a request had been made. This was another example of the government's attempt to shroud in secrecy both its own actions, as well as the challenges to those actions. We are pleased that the record of this attempt is now public. But should the situation recur, we will fight it as hard as we did this time."

My mother is a fish. - William Faulkner

Working...