Follow Slashdot stories on Twitter


Forgot your password?
Slashdot Deals: Deal of the Day - Pay What You Want for the Learn to Code Bundle, includes AngularJS, Python, HTML5, Ruby, and more. ×

Comment Re:The real problem (Score 1) 299

No, an estimate isn't a gamble. It only becomes a gamble if you treat it as a target or a promise, and commit resources to it. The real problem may be not allowing an estimate to change as more information comes in.

I don't know how long it takes to build the average house, but I'd guess between a week and a year. I'm sure people who build them all the time have a pretty good idea (along with the uncertainties) assuming some implicit context like where you're having the conversation. If you expect a mansion in the desert on a mountain to take the same amount of time, you're an idiot. Of course the estimate will change if there are unusual requirements. Another problem with software engineering is that it's full of idiots like this, so we get frightened of providing the estimate.

Comment Re:It depends (Score 1) 486

The simple way to do it in Python is

>>> import time
>>> import random
>>> chars = [chr(random.randint(0,255)) for each in range(1000000)]
>>> stamp=time.time(); joined=''.join(chars); time.time()-stamp

So that's 1/9 of a second on a not very fast laptop. You can try it yourself. Obviously not as fast as C++ but not horrible.

Comment Re:Such potential (Score 1) 520

Types certainly matter, and Python has types. Yes, feeding the wrong type into a function probably won't work. It'll raise an exception and you'll see a traceback that helps you to fix your code.

If you want to check the types that are supplied to a function, you can do it with assertions. You can even go further and check the things going in have the properties you want. Type checks are a crude form of precondition. A function that expects a tuple will probably work with a list. A function that works with an iterable can accept a whole load of types without all the constipation of an explicitly coded interface to declare for all of them.

If you want the type errors picked up before you execute the code, you might be in luck. You could use the assertions, although I don't know of any tools that do this. There's also a convention for type specifications in docstrings. And official support for function annotations:

None of which addresses static typing as such, which says that after assigning an integer to a variable, you shouldn't be able to reassign it as a float.

There are, still, real advantages to static typing and languages that give you those benefits with type inference, so you don't have to put type declarations all over the place. There are also languages with better generics than void * in C or Object in Java. (C++ and Java are even two of them). Mixing the good features of Python with a good static typing system would certainly be a good thing.

Oh, and I've been programming for a good deal longer than 20 years. I can appreciate different languages for working in different ways.

Comment Re:What was it? (Score 1) 129

It's Debian with a coherent desktop built around Openbox, and an installer, and maybe some other choices different to the Debian defaults. It uses the Debian repositories as well as its own and even declares itself "Debian GNU/Linux" when you SSH in.

I happen to prefer the LXDE desktop now I can turn the bits I don't want off. I can understand the argument that Crunchbang isn't as important as it was. But enough people will prefer the Crunchbang style that they'll keep it going with a different name.

Comment Re:Just started using it (Score 2) 129

It isn't much more than a metapackage, anyway. Gnome, KDE, LXDE, and XFCE are all metapackages and Debian live images. There is a point to Crunchbang living on in some form because most of the desktop is different to LXDE (they both have Openbox). And it probably will live, but with a different name.

Comment Re:My FreeBSD Report: Four Months In (Score 1) 471

There is a standard for starting a service when you log in:

The autostart specification defines a method for automatically starting applications during the startup of a desktop environment after the user has logged in and after mounting a removable medium. Obviously, desktops could still do with a better way of starting services and making sure they stay running. Because that wouldn't be at all useful on servers or anything.

Comment Re:Jesus, we're fucked. (Score 1) 351

I have a vague memory of the DHMO project being about the presentation of science in the media, rather than public ignorance. It showed how people will get the wrong idea if you portray a scientific issue badly. Ironically, this story has been hideously portrayed in the media. We're told that 80% of Americans support labeling of food containing DNA, which is much the same as 80% of Americans supporting food labeling, which is an obviously good idea, so you wonder what the other 20% were thinking. But oh, no, let's make fun of these people who fell for a ludicrous scam without actually explaining what was ludicrous about it.

Comment Re:Better way? (Score 1) 289

The trouble is, the Internet is standardized on UTC. You can keep your system clock to TAI and use the "right" time zone files, but you have to deal with the offset between your clock and NTP, and the complexity of NTP broadcasting the leap second as it happens. (Or forego the convenience of NTP altogether, of course.)

There should be an RFC to decree that for networking purposes, we'll ignore this and future leap seconds and keep "Internet UTC" as a fixed offset from TAI. People who care about strict UTC (and it would, apparently, cost millions of dollars to fix critical military systems) can use libraries or time zones to get it. The rest of us will know our system clocks keep ticking away with minimal breakage.

What will probably happen is that we follow the leap second again, things break again, and any impetus to fix the underlying cause dies away by the time the next leap second comes around. And eventually UTC will be defined as consistent atomic time and the people who wanted UTC for what it was originally designed for will have to learn to call it something else.

Use the Force, Luke.