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


Forgot your password?

How Much Python Do You Need To Know To Be Useful? 263

Nerval's Lobster writes: Since Python is a general-purpose language, it finds its way into a whole lot of different uses and industries. That means the industry in which you work has a way of determining what you actually need to know in terms of the language, as developer Jeff Cogswell explains in a new Dice piece. For example, if you're hired to write apps that interact with operating systems and monitor devices, you might not need to know how to use the Python modules for scientific and numerical programming. In a similar fashion, if you're hired to write Python code that interacts with a MySQL database, then you won't need to master how it works with CouchDB. The question is, how much do you need to know about Python's basics? Cogswell suggests there are three basic levels to learning Python: Learn the core language itself, such as the syntax and basic types (and the difference between Python 2 and Python 3); learn the commonly used modules, and familiarize yourself with other modules; learn the bigger picture of software development with Python, such as including Python in a build process, using the pip package manager, and so on. But is that enough?

Comment Re:Sort-of-worked. (Score 1) 54

They want to re-use this Dragon for an in-flight-abort test, using a Falcon 9 first stage launched from Vandenberg, so purposely introducing mechanical flaws seems risky. If it were a deliberate test, I would be simplest to just set the throttle to one of the motors to zero in software close to the end of the burn (to not ruin the overall test in case of problems), and then see if the control system can recover using the remaining 7 engines. Let's hope that Elon comments on this in the next days ...

Comment Re:Sort-of-worked. (Score 5, Insightful) 54

No, OP's remark was correct, he is not discussing the planned pitch over towards the sea after half a second, but a visible puff of smoke around the 4 second mark and some subsequent 'wobble', as if one of the 8 thrusters is switched of. See the zoomed video here. This proves the effectiveness of having 8 redundant thrusters, instead of having only 4. It is still not clear if this was a real engine failure (which might be verified via post-mortem examination of the motor), or if this was a deliberate, unannounced test of the 'engine out' capability. Credit: the discussion in the forum over at nasaspaceflight.com.

Comment Bigger issues (Score 1) 1089

I am neutral to mandatory voting. I believe they have this in Belgium, but it is not strictly enforced with sanctians, so the polical system works similar to neighboring countries. America has bigger political issues: 1) too large influence on politics of big money: by rich people via superPacs and by corporations via lobbying or outricht corruption. 2) Effective two party system, where everything is decided on a single left-right axis, so that non-issues like gun rights and being patriotic or christian enough decide all national politics. Fix these two issues first., then we can discuss mandatory voting.

Was Linus Torvalds Right About C++ Being So Wrong? 757

Nerval's Lobster writes: Perhaps the most famous rant against C++ came from none other than Linus Torvalds in 2007. "C++ is a horrible language," he wrote, for starters. "It's made more horrible by the fact that a lot of substandard programmers use it, to the point where it's much much easier to generate total and utter crap with it." He's not alone: A lot of developers dislike how much C++ can do "behind the scenes" with STL and Boost, leading to potential instability and inefficiency. And yet there's still demand for C++ out there. Over at Dice, Jeff Cogswell argues that C++ doesn't deserve the hatred. "I've witnessed a lot of 'over-engineering' in my life, wherein people would write reusable classes with several layers of inheritance, even though the reusable class wasn't actually used more than once," he wrote. "But I would argue that's the exception, not the norm; when done right, generic programming and other high-level aspects of C++ can provide enormous benefits." Was Linus going overboard?

Harrison Ford's Plane Crashes On Golf Course 117

First time accepted submitter dark.nebulae writes Harrison Ford's PT-22 crash landed on a golf course in Los Angeles. From the article: "Actor Harrison Ford was hospitalized Thursday afternoon after a single-engine plane he was piloting crashed onto a Venice golf course shortly after takeoff. Just before 4:30 p.m. a family member confirmed to NBC4 that the actor is 'fine' and suffered a few gashes. Aerial footage of the minutes after the crash showed the small single-engine vintage World War II trainer plane crashed on the ground at Penmar Golf Club, and one person being treated by paramedics and being transported to a hospital. Firefighters described his injuries were described as 'moderate.'"

Comment Re:The Secret of Nim (Score 2) 520

I completely disagree. I have worked extensively both with Matlab and Numpy, and I much prefer Python's 0-based indexing and half-open intervals over Matlab's 1-based indexing and closed intervals. Edsger Dijkstra, the famous computer scientist, explained why this is a good idea. E.g. splitting the first n items off an array in Matlab is head = x(1:n); tail = x(n+1:end) , while in Python it is head = x[:n]; tail = x[n:] . Even worse is when doing some computation over blocks within an array, in Matlab you do for i=1:n; y(i) = fun(x((i-1)*m+1:i*m)); end , while in Python it is for i in range(n): y[i] = fun(x[i*m:i*m+m]) . In Matlab, you always have to think careful about the extra +-1, which causes many off-by-one errors, while in Python you just write it down intuitively.

Comment Re:Twitter: Ran out of Hydralic fluid (Score 1) 213

The fact that he can make this claim only half a day after the fact (so I assume they had no time to piece together the debris) means that they did recover the most valuable part: the telemetry. Overall, they achieved probably 95% of the required challenges. With around 5 successful retro burns, 1 low-level flame out due to loss of roll control, 2 soft water landings, 1 bullseye impact on a boat and around ten successful low altitude tests with grasshopper, only extremely bad luck can stop them from making a good landing in the next few attempts.

Dish Pulls Fox News, Fox Business Network As Talks Break Down 275

An anonymous reader writes Fox News and Fox Business were pulled by Dish Network over the weekend, as both continue to argue over a fee agreement. From the article: "Dish said in a statement early Sunday morning that 21st Century Fox had blocked access to the two networks after Dish balked when rates for other networks owned by the media conglomerate were made a part of the negotiations. Tim Carry, executive vice president of distribution at Fox News Channel, countered in a statement that "Dish prematurely ceased distribution of Fox News in an attempt to intimidate and sway our negotiations. It is unfortunate that the millions of Fox News viewers on Dish were used as pawns by their provider. Hopefully they will vote with their hard earned money and seek another one of our other valued distributors immediately."

A rock store eventually closed down; they were taking too much for granite.