Follow Slashdot stories on Twitter

 



Forgot your password?
typodupeerror
×

Comment Re:Agree with court (Score 1) 341

"Plenty of humans would rather be a slave then to starve." All dogs would rather be a slave than to starve, not just plenty of. I wouldn't go with wolves as my counter example. I'd go with cats.

I wouldn't go with cats either. We've got three - one is practically wild, only ever shows up occasionally for food while another will cuddle up to any human around whether or not food/shelter is around, and come running if you whistle for him. The third is a little in-between those extremes. Cats are domesticated, some go feral, but many remain domesticated.

Comment Re:It could be worse (Score 1) 247


Simple fix: don't ever set your voicemail password.

I went over 10 years without enabling my dreaded voicemail, some people complained but I never budged. My current Director told me to set it up about six months ago. I did and used a random integer set from random.org as the password.

I can honestly say "I forgot my voicemail password" and let the thing fill up.

Comment Re:Why program in Python (Score 1) 277

They think it's great because, in a tragic case of hilarity, jumping into code with minimal design is what python is great at.

We think it's great because, among other things, it has first-class functions and a very high code:boilerplate ratio. This lets us write very concise, readable, and maintainable code.

That's the tragic case of hilarity I was talking about. You do realise that you're talking about a language that takes the law of least astonishment and throws it out the window? There are too many exceptions to the rule in Python, leaving most people writing things that fail and silently corrupt data, or fail and displays an incomprehensible message to the user. There are too many leaky abstractions, too many unexpected surprises, too many exceptions to the rule. All those things are bad, and python has them all in spades.

If you're a diligent programmer in python/php/javascript/etc then, in each function you write, you're going to double-check that the type passed in is correct, anyway.

Eww, no. I've never seen good Python code that asserts types because it's not the idiom for you to care. For instance, suppose you write a function like:

def get_contents_of(obj): return obj.read()

In this case, obj might be a file, or a web request, or a string (via the StringIO interface). Who knows? Who cares?

def foo (a, b) : return a/b * 100; That will eventually fail unless you put in checks to make sure that arguments are what you expect. This is what I meant by hilarious tragedy - python/javascript/etc programmers rely on the caller to read the code before calling the function. You need to know what each function takes and heaven forbid you forget - the damn thing will only fail at runtime, or worse, silently corrupt data without anyone realising it.

Python gives you that check for free when you try to call the method. Let it do the heavy lifting and concentrate on the parts of the problem you actually care about.

Well, except that it is you, the programmer, who is doing the heavy lifting. You have to make sure everything is specified, the language won't help you.

Exceptions are one of the worst things to have become common - an "error" is almost always only caught outside the scope that it occurred in, hence the stack has already been unwound and thus there is no sane way to fix the error and retry the operation that caused the exception.

Yeah, that would be terrible. You almost never use them in Python like that,

Okay, then how doyou use them? Show me one way for a library function to throw an exception for a reason that is fixed by the caller so that the library can retry the line that threw the exception?

I think it boils down to you not knowing idiomatic Python.

Unfortunately I've had to do lots of work in python over the years, both maintaining others' code and writing new code. The reason I know all these nasty-will-bite-you things is because I've run into them in various different programmers code, in various different companies. The problem with python is it's easy to pick up in a few minutes, but all those exceptions to the rule makes it hard to even guess what something might do at runtime. The most frequent problem I've seen is the insane way scope changes in a single line of code when a read of a variable is changed to a write of the same variable.

Changing "var_b = var_a" into "var_a = var_b" should not change the scope of either variable, but in python it does, and it is considered "pythonic". Other languages consider such a thing to be madness, but in python it is considered to be idiomatic rather than just idiotic.

That's OK. I'm ignorant about lots of things, too. But I think you'd find that you enjoy it more if you stop trying to write C or Java in Python, because that almost never works out well.

The problem with python is the same one that PHP has - it developed, not from careful design of well-understood and researched principles, but from the desire to get a language that appears simple. They've succeeded - it certainly appears simple, until you have to maintain it. Just for comparison, the grammar for python (a "simple" language) is roughly twice as large as the grammar for C (a "difficult" language). That's twice as many keywords, special symbols, operators, etc to remember, without even starting to remember the library functions, nor taking into account all the little 'gotchas' that resulted from little-to-no upfront design.

Comment Re:The best reasons to learn Python (Score 1) 277

For the best reasons to learn Python, see The Zen of Python. If Python happens to pay more, that's just gravy.

That said, it seems hard to believe that people would get paid extra to work in such a pleasant language. If so, maybe Adam Smith had it all wrong when he said:

First, The wages of labour vary with the ease or hardship, the cleanliness or dirtiness, the honourableness or dishonourableness of the employment...The most detestable of all employments, that of public executioner, is, in proportion to the quantity of work done, better paid than any common trade whatever.

Perhaps florists soon will be making more money than plumbers. Which would really stink.

I see no beauty, simplicity or elegance in the pythonic way variables are handled when shadowed (for example, global scope). You can read them BUT writing them fails silently! Explain how this is intuitive in any way.

Comment Re:Why program in Python (Score 1) 277

As a roundabout answer to your final question... when there is a "technology" (I use that word loosely when describing computer languages) that takes all of 5 minutes to grasp then you are going to get a lot of practitioners of that tech being the type who picked it up in 5 minutes or less. Had they spent the requisite number of years using different idioms in different languages in different industries you can be sure that they would have firmly placed python back down after playing with it for a few weeks.

Proponents think python is great because they're comparing it to PHP and/or Perl. They think it's great because, in a tragic case of hilarity, jumping into code with minimal design is what python is great at. Had they done some design and/or architecture upfront their Java/C++/Ada/etc project would have taken the same time as their python one.

I've never fully understood the whole "check types at runtime" thing. If you're a diligent programmer in python/php/javascript/etc then, in each function you write, you're going to double-check that the type passed in is correct, anyway. The only reason that python/php/javascript/etc code appears to be smaller for the same task in java/C++/Ada/etc is because the former omits all error-checking.

For dynamic languages I still prefer Common Lisp, and that's only because the error signalling mechanism is so much superior to the exception-handling mechanism that you can actually get away with inferred types. Exceptions are one of the worst things to have become common - an "error" is almost always only caught outside the scope that it occurred in, hence the stack has already been unwound and thus there is no sane way to fix the error and retry the operation that caused the exception. Who in their right mind actually thought that this was a good idea? Gosling, when working on Java, must have been on serious meds to forget all he learned when writing MockLisp. To add to this comedy of errors, Guy Steele was only called in after Java was implemented to write the Java spec. Had they called him in a mere 24 months prior to that we may never have had to endure the horrible wreck that is the Exception ...

Comment Re:But, as the feminists say.. (Score 1) 333

If that were true there would be a lot more male nurses and primary school teachers. Of course it isn't true, and your source is the Daily Fail, a newspaper well known for hating women.

Only if men chose profession based on promiscuity. An argument so stupid no one ever tried to push it before.

Comment Re:Which is why girls dominate game making... (Score 1) 312

The reality is that women have chosen NOT to be in this field... statistically. And as to why they have chosen not to do that... sexism is the least credible answer.

This should be fun.

Why do you believe sexism to be the least credible answer? Please include relevant citations.

Do you have an alternative explanation, which also explains the demographic shift we've seen since the early 1980's? Again, show your work.

The god-of-the-gaps argument doesn't hold for creationism and it doesn't hold for your argument either - just because the result is the way it is does not in any way imply sexism. In fact, in countries with institutionalised sexism there are more female scientists: you know, where females have *fewer* choices they choose maths and science. When they have more choices they choose other things. You need to show, at the very least, some sort of correlation between sexist countries and female participation.

Comment Re:Good thought. (Score 1) 53

if they replied with something like "Since Android One decided not to sell in physical stores during its launch, we as part of modern trade, have decided not to stock Android One either" we'd know their motivation.

If they spoke like you write we'd be none the wiser.

Indeed, but at least you'll be better informed :-)

(Parent quoted directly out of the article)

Comment Re:Bullshit Stats. (Score 1) 496

in India and Saudi, a woman can be killed or brutalized or ostracized for getting snippy

It seems that places with institutionalised sexism (like India) produces more females in tech than those without. Whatever the reasons for having fewer females in tech is, I highly doubt that sexism is amongst them.

Comment Re:Here we go again (Score 1) 496

The anger here is directed at professional-victims, self-righteous SJW's, self-hating white knights--and hypocrites in general.

You say that, but if you actually look at the majority of posts they are attacking women.

This is something that is easy for you to prove, so why don't you show us the evidence?

Comment Re:You probably want PC-BSD (Score 1) 267

While PC-BSD would work for a lot of people who want a desktop, it didn't work for me. There was simply too much cruft. I installed FreeBSD 10.1 and am much happier with it than I was with PC-BSD.

The problem with PC-BSD is not the system, but the add-ons installed-by-default things that I don't want, like the control panel, or the software centre. Now, I could have simply uninstalled those things but I wasn't sure what dependencies existed that might kill my install. With FreeBSD it is all terminal only, until you install Xorg and a window manager. It is simple to work things out without the extra user-friendly software. I found it much simpler to simply edit a few files than to make changes via a GUI - I never knew what changes were actually being made on disk.

OTOH, perhaps it is because I used PC-BSD first that I found FreeBSD a good desktop :-)

Comment Re:No, let's not (Score 1) 155

Slashdot, will you please end the fucking obsession with feminist gripes.

Not yet. Slashdot thrives on controversial stories, pitting ideologies against science and reason. Remember when they used to post Florian Muellers every article on Sco? Or when they used to post creationist stories? Or that brief period when we had at least one LGBT discrimination story a week? Bitcoin, even?

Slashdot fully understands that creationist/feminist ideologies are subject to a wide range of debunking methods. So /. wins when they post the stories so that the majority will debunk the very obvious lack of logic while the minority get to revel in being righteous against the haters.

It's actually a win-win-win situation. Slashdot gets eyeballs, the ideological minority gets to feel that their axe is finely ground and the rest get to point out logical fallacies by the ton (thus getting to feel superior to that religious minority). A winning formula.

Perhaps a betting pool on what logic-less ideology gets bumped into the headlines next year this time? My vote goes towards the coming recession :-)

Slashdot Top Deals

The hardest part of climbing the ladder of success is getting through the crowd at the bottom.

Working...