Non-portable? I'm not sure how whitespace changes from platform to platform. Am I misunderstanding something there? Anyhow, it doesn't matter whether a block is indented by a tab, one space, two, four etc. as long as everything at that level is indented consistently. Does this help?
Even if code sent through Yahoo groups/in the body of an email can't be easily copied-pasted-and-compiled (is that what you are referring to?), I don't really see that as a huge disadvantage. You could just attach the file.
I'm open to suggestion - perhaps those that like freedom in indentation have a point, but I just can't see it. Trade a penny in freedom of block layout and get back a pound in consistency and readability.
Guido could _easily_ put in some sort of pragma to allow other types of blocks, it's only a matter of arrogance that stops him- coding with whitespace is the "right" way to do it.
There is are very good reasons for having indentation indicate a block.
Firstly, code written by different programmers is consistently indented. C and Java programmers could argue for a millennia about where to put the curly brace, but in the end the argument is just trivial. If everyone did it the same way code would be much more readable. Sure, the language gives you freedom to work the way you want but it does so at the expense of readability.
Another reason is that indentation easily shows that one block is the child of another. Again, this makes Python code much more readable than it otherwise would be without it.
I don't think the decision was a matter of arrogance at all. It's logical, and it makes sense. Programming is often said to be part art, part science, but trading a little bit of expression in the way you indent your code for readability (and hence maintainability) makes sense to me. It does take a bit of getting used to, sure, but it is worth the effort when you come back to the code at a later date, or try to understand someone elses.
I'd rather see a reduction in cost per watt than an increase in efficiency
Aren't the two related?
Also, FTFA:
This breakthrough may lead to systems with an installation cost of only $3 per watt, producing electricity at a cost of 8-10 cents per kilowatt/hour, making solar electricity a more cost-competitive and integral part of our nations energy mix.
Exactly! This "Linux retraining cost" is bogus. I seriously doubt corporations are going to pay to train their staff on anything but complex, specialised software they buy (say maybe Macromedia/Adobe products), custom software they have made for them (which may need to be ported which is a legitimate cost but has nothing to do with training), or software which they resell or support. Certainly not the core OS or Office package however.
If I wanted/needed to. sure. I would love to sit down and learn Lisp sometime (there are excellent freely available books and video lectures for Lisp). As for Flex, XML and AJAX, sure if I was required or wanted to do some web development using these tools then I would.
I also don't understand the retraining costs with Linux. There are millions of office workers who use Windows and Office every day and I seriously doubt every one of them have gone through a training course to get there.
I don't see the problem here - the camera has a defect, and they are willing to repair defective cameras for free (I assume by replacing the defective parts). Provided they do this for all effected cameras, regardless of warranty status or where you are at the time, then this is a good thing. Provided hardware faults are rare, I don't think there is any reason to get all worked up over this. Get your camera repaired, take pictures again, ???, profit.
I would take the Perl job over the.NET job in an instant. Work is somewhere you will spend at least 40 hours a week at, and if you're not doing something you enjoy for that time you will be miserable. You will still be making more there than your current job, so money shouldn't be an issue.
Python has a for loop, as you're probably aware e.g:
list = ['a', 'b', 'c'] for item in list:
print item
will print:
a b c
But it doesn't have the C initialisation syntax. That's not necessarily bad, it's just "not C". It's also great to be able to say "for each object in some list" rather than "for each index into the array" - it makes your code cleaner. But you can index into lists of you really want.
Also, you'll find as you get more experienced with python, you will use lists in interesting ways more and more where you would once have used for loops. Not only is this more elegant, but more efficient in python too.
If you still want to use ending conditions however, you can use while statements instead or break out of the loop on some condition. I'm not that experienced a python programmer.. there may be better ways.
You idiot, he is talking about forcing better behaviour in the sense of doing as little harm as possible to the environment, not about forcing good social behaviour. What a juvenile and ridiculous response.
You've spotted me again! If only I had remembered that old saying in Tennessee -- I know it's in Texas, probably in Tennessee -- that says, fool me once, shame on -- shame on you. Fool me -- you can't get fooled again.
Your points are correct, in general, but Microsoft is a speacial case. Personally, I find the biggest problem with them is that the quality of their software is horrible, and with the kind of profits they are raking in they can afford to improve them. When they finally do, they usually focus on features customers want, but not the ones they really need (for example, IE 7 still doesn't support web standards, and this causes immeasurable harm to the web development industry, but they didn't forget to include tabbed browsing because they will draw in the users).
Businesses don't just have obligations to their shareholders, but also to their industry and society. Microsoft fails to deliver quality software yet monopolies the desktop market. The situation would be very different if Microsoft wiped the floor with their competition on quality and price, and for that reason was numero uno.
MS' operating profit is about 12.6 billion dollars.... Windows is a de-facto standard on the desktop, and is what just about everyone uses just about everywhere?
Don't you get it? They make insane, unhealthy amounts of profit and have a monopoly on the desktop. Why are you even trying to defend them?
By definition, cliques don't let new people in easily. Here's the dictionary definition:
clique |klk; klik| noun a small group of people, with shared interests or other features in common, who spend time together and do not readily allow others to join them.
Hey dork, most PC gamers aren't teenagers... you must be new around here.
Hey dork, my UID is lower than yours;)
I know of very few people who do "work" on their home PC. Maybe you'd like to qualify that statement a bit more.
Well by work I meant things like programming for fun or on an open source project, checking and responding to email from colleages and clients (one of the reasons companies love giving their employees laptops), studying or working on assignments in the case of students etc.
I'm glad that you feel high and mighty about having "better things to do" in your spare time
I don't feel high and mighty, I'm just saying that I'm past the age where games are the number one thing in my life, and probably most adults are like this too. C'mon, you must remember doing nothing but playing games, eating and sleeping for days on end when you were a kid. I might do this a few times a year now, but it's not the kind of thing that would stop me from using a Mac or Linux.
but when it comes down to it Joe Sixpack likes TV and gaming.
I'd say Joe Sixpack likes TV and sports before I'd say TV and gaming, but you'd have to ask him to be sure.
And your forgetting the number 2 use of a home PC today... Games...
BS. Amoungst teenagers maybe, but most adults, when not using their computer for work or study, might use it to send email, browse the web, etc. etc. and maybe then play a game.
Really whenever I hear someone claiming that one of the main reasons people don't use Macs to the degree they use Windows is that they want play computer games, makes me think they must be a high school kid who spends all their free time playing games. I used to spend nights/weekends trying to complete a game when I was that age, but now I don't because either I have work/study to do or I just have better things to do with my time. Games are not holding back Mac (or Linux) adoption, seriously.
In this way I also seperate the real nerds from the 'wannabes'. A real nerd uses crack, cracking and cracker and hacking means slapping something together instead of really thinking and engineering a solution.
Then read the docstring, read the comments, read the tutorial.... usually the rtfm response is to someone who hasn't put a scrap of effort to help themselves, and would rather ask someone else to spend their time doing it for them.
Ah OK guess you're right there... actual editing and accountability is a good thing! I was assuming that the Slashdot editors edited the story (i.e. Posted by) so wondered why a second editor was mentoned, but now that I think about it, it means Pinto did the editing and Taco just posted it (while bain sumitted the article).... ok great, that *is* an improvement:)
Anyhow... I, for one, welcome our article editing overlords.
Non-portable? I'm not sure how whitespace changes from platform to platform. Am I misunderstanding something there? Anyhow, it doesn't matter whether a block is indented by a tab, one space, two, four etc. as long as everything at that level is indented consistently. Does this help?
Even if code sent through Yahoo groups/in the body of an email can't be easily copied-pasted-and-compiled (is that what you are referring to?), I don't really see that as a huge disadvantage. You could just attach the file.
I'm open to suggestion - perhaps those that like freedom in indentation have a point, but I just can't see it. Trade a penny in freedom of block layout and get back a pound in consistency and readability.
Firstly, code written by different programmers is consistently indented. C and Java programmers could argue for a millennia about where to put the curly brace, but in the end the argument is just trivial. If everyone did it the same way code would be much more readable. Sure, the language gives you freedom to work the way you want but it does so at the expense of readability.
Another reason is that indentation easily shows that one block is the child of another. Again, this makes Python code much more readable than it otherwise would be without it.
I don't think the decision was a matter of arrogance at all. It's logical, and it makes sense. Programming is often said to be part art, part science, but trading a little bit of expression in the way you indent your code for readability (and hence maintainability) makes sense to me. It does take a bit of getting used to, sure, but it is worth the effort when you come back to the code at a later date, or try to understand someone elses.
Aren't the two related?
Also, FTFA:
Yeah I've seen Domino, and I think it was intended to be funny (as was!)
Exactly! This "Linux retraining cost" is bogus. I seriously doubt corporations are going to pay to train their staff on anything but complex, specialised software they buy (say maybe Macromedia/Adobe products), custom software they have made for them (which may need to be ported which is a legitimate cost but has nothing to do with training), or software which they resell or support. Certainly not the core OS or Office package however.
If I wanted/needed to. sure. I would love to sit down and learn Lisp sometime (there are excellent freely available books and video lectures for Lisp). As for Flex, XML and AJAX, sure if I was required or wanted to do some web development using these tools then I would.
I also don't understand the retraining costs with Linux. There are millions of office workers who use Windows and Office every day and I seriously doubt every one of them have gone through a training course to get there.
I don't see the problem here - the camera has a defect, and they are willing to repair defective cameras for free (I assume by replacing the defective parts). Provided they do this for all effected cameras, regardless of warranty status or where you are at the time, then this is a good thing. Provided hardware faults are rare, I don't think there is any reason to get all worked up over this. Get your camera repaired, take pictures again, ???, profit.
I would take the Perl job over the .NET job in an instant. Work is somewhere you will spend at least 40 hours a week at, and if you're not doing something you enjoy for that time you will be miserable. You will still be making more there than your current job, so money shouldn't be an issue.
More details here (from the book Dive Into Python - it's both free and very good!):
http://www.diveintopython.org/file_handling/for_l
Also, you'll find as you get more experienced with python, you will use lists in interesting ways more and more where you would once have used for loops. Not only is this more elegant, but more efficient in python too.
Here's a good example:
http://divmod.org/trac/wiki/PotatoProgramming
And the section on lists from the aforementioned book:
http://www.diveintopython.org/native_data_types/l
If you still want to use ending conditions however, you can use while statements instead or break out of the loop on some condition. I'm not that experienced a python programmer.. there may be better ways.
You're right... Now that I think about it, the correct accusation for the grandparent post is "strawman argument" :)
You idiot, he is talking about forcing better behaviour in the sense of doing as little harm as possible to the environment, not about forcing good social behaviour. What a juvenile and ridiculous response.
Perhaps our newly neutered laywers could use a pair of Neuticles?
http://slashdot.org/article.pl?sid=06/09/15/17172
You've spotted me again! If only I had remembered that old saying in Tennessee -- I know it's in Texas, probably in Tennessee -- that says, fool me once, shame on -- shame on you. Fool me -- you can't get fooled again.
Thanks to the summary authour for provding a great protest chant!
"Don't scan my can!"
Your points are correct, in general, but Microsoft is a speacial case. Personally, I find the biggest problem with them is that the quality of their software is horrible, and with the kind of profits they are raking in they can afford to improve them. When they finally do, they usually focus on features customers want, but not the ones they really need (for example, IE 7 still doesn't support web standards, and this causes immeasurable harm to the web development industry, but they didn't forget to include tabbed browsing because they will draw in the users).
Businesses don't just have obligations to their shareholders, but also to their industry and society. Microsoft fails to deliver quality software yet monopolies the desktop market. The situation would be very different if Microsoft wiped the floor with their competition on quality and price, and for that reason was numero uno.
Don't you get it? They make insane, unhealthy amounts of profit and have a monopoly on the desktop. Why are you even trying to defend them?
By definition, cliques don't let new people in easily. Here's the dictionary definition:
clique |klk; klik|
noun
a small group of people, with shared interests or other features in common, who spend time together and do not readily allow others to join them.
Ha that's hillarious! That must explain all the ripped execs you can find on the golf course!
Ooops! That's the comment ID! Anyway, you can think of AC's has having a UID of infinity.
Hey dork, my UID is lower than yours
Well by work I meant things like programming for fun or on an open source project, checking and responding to email from colleages and clients (one of the reasons companies love giving their employees laptops), studying or working on assignments in the case of students etc.
I don't feel high and mighty, I'm just saying that I'm past the age where games are the number one thing in my life, and probably most adults are like this too. C'mon, you must remember doing nothing but playing games, eating and sleeping for days on end when you were a kid. I might do this a few times a year now, but it's not the kind of thing that would stop me from using a Mac or Linux.
I'd say Joe Sixpack likes TV and sports before I'd say TV and gaming, but you'd have to ask him to be sure.
BS. Amoungst teenagers maybe, but most adults, when not using their computer for work or study, might use it to send email, browse the web, etc. etc. and maybe then play a game.
Really whenever I hear someone claiming that one of the main reasons people don't use Macs to the degree they use Windows is that they want play computer games, makes me think they must be a high school kid who spends all their free time playing games. I used to spend nights/weekends trying to complete a game when I was that age, but now I don't because either I have work/study to do or I just have better things to do with my time. Games are not holding back Mac (or Linux) adoption, seriously.
I think most hackers would disagree with you on that one. http://www.paulgraham.com/gh.html
Then read the docstring, read the comments, read the tutorial.... usually the rtfm response is to someone who hasn't put a scrap of effort to help themselves, and would rather ask someone else to spend their time doing it for them.
Ah OK guess you're right there... actual editing and accountability is a good thing! I was assuming that the Slashdot editors edited the story (i.e. Posted by) so wondered why a second editor was mentoned, but now that I think about it, it means Pinto did the editing and Taco just posted it (while bain sumitted the article).... ok great, that *is* an improvement :)
Anyhow... I, for one, welcome our article editing overlords.
This is third article today that ended with some shameless plug about a guy called Saied Pinto who is editing LinuxWorld for the day.
There are already advertisements at the top of the page. Do we need them in article summaries too?