> - Function name Why, it's there right next to the comment isn't it?
> - what it does Yep
> - parameters > parameter name - what is is for and any restrictions on it (i.e., must not be null) No, parameter use should be obvious from the function context and their names. In my experience this covers the majority of cases. For those that aren't so clear, add a little extra to the function description. Why force people to add a description every time when it's rarely needed?
> - return value (all possible return values) Again this should be obvious from the function name and description. If not, pump up the description a bit. Similar reasoning to parameters.
>2. Add comments to each file you modify so that over time, the file becomes better documented Agreed, but only to the bit you modify - if you just change a constant value or something you shouldn't have to then comment the whole file!
>3. Add ASSERT() like comments and ASSERT() or equivalent to your code Maybe. But only where it's really useful. A lot of the time seeing this isn't actually any better than having the code simply crash, assuming you have a decent debugger.
>4. Use dividing comments like a line of dashes to seperate blocks of code Yep.
>5. Put in a '?' comment for code that you do not understand (good for function headers) Refactor code you don't understand until you understand it. This will be very easy if the code has proper unit tests associated with it. You do use Unit Tests? What's that, legacy code? Then you'll need to start with writing the unit tests first. The thing is, why do you need to understand it? Presumably you want to change it because it doesn't work or you need to extend it - so then you need the tests to (a) prove you haven't broken anything and (b) prove your new functionality works.
>6. Avoid stupid naming schemes for your local variables since that makes it harder to comment Avoid stupid naming schemes for *anything* since that makes it harder to understand!
>7. Review your code for both logic and comment completeness after you code it before committing it to version control Yep. Dare I mention Unit Tests again?
>8. Tag your bug fixes, code enhancements with a comment followed by a dash, date, and your initials. This is essential for large projects or for anything you will be working on for more than 6 months. Gah, big no no, really BIG no no. Have you seen code that's had this done to it for more than a few months. No, because you can't see the code any more, just these damned tag comments. I'm beggin' yer, I'm pleadin' yer, don't do this. Besides which, they are completely superfluous with any half decent revision control system. If you don't use one of those, then go install Subversion NOW!
>9. Format your comments so that multiple line comments line up on the left hand side (increases readability) Yep. It would be good if most tools did this, unfortunately most standard IDEs come with really crap editors, and even a good code editor doesn't always do this. This would be one of my main requests to code editor developers everywhere, please do auto-wrapping and alignment of long comments.
>10. Don't count on java doc or equivalent as being good enough code documentation. Yep.
My basic philosophy is to have clean code: make what you see in your code editor as simple as possible (but no simpler). That includes comments. So don't force people to always put a special extra line for each parameter even when it's really not needed. And don't duplicate stuff in the comment that you can see straight away from the code (e.g. function name).
>>the splintering of hundreds of different distros hasn't helped at all
>More than just not helped, I see this as a dominant problem.
On the contrary, this is a perfectly natural and desirable outcome of the whole way Linux is set up. Instead of having to cope with all requirements and be one huge monolithic jack-of-all-trades, anybody can customise it for their own use, or for their target market, and people often do this. This is a *good* thing. It encourages experimentation, competition, improvements, etc etc.
>If you tell somebody, you should try using Linux as your OS! They'll go to the store... they see boxes for Red Hat Enterprise, Suse, Lindows, etc.
Well if that's all you tell your friend, then shame on you. The very next thing you should do would be to recommend a distro. Unless they're well into hacking themselves, this should probably be one of the big ones such as Suse, Mandrake(see note 1) or Redhat, because they really do work out of the box (okay, mostly).
>Then, depending on the distribution they chose, they take it home and then get to decide between Gnome, KDE, or something else. More work on their part. Shame on you again. You need to help them install this thing, unless you think they're really competent enough, because even just the installer will already start talking about and doing things like repartitioning, which is not only scary for newbies, but can quite easily wipe their hard drive if they make the wrong choice. As regards Gnome or KDE etc, this is half the point of installing Linux in the first place isn't it? You get a choice! You get to make the environment look how you want it. And it's really not so hard to change between desktop managers and try a few out until you find one you like, or just stick with the default if you can't be bothered.
>cool game...*without* them having to compile it themselves Again! You have to tell people, if you want to install extra stuff not in the box, you will probably have to use a compiler at some point. Most major things come with RPMs etc now, but some still don't. Then you straight away say, but all this means is typing three little commands in the terminal, and that's it. Null problemo.
>Linux is a terrific OS. Don't think this means I don't like it. But I do the odd tech support for my family and friends, and I can only think of a couple of them that might be ready for Linux. There are too many choices for the average computer user right now. I agree with your first two sentences here, but as I said before, 'choice', or perhaps even better 'freedom', is one of the reasons you install Linux.
>The way I see it there are two fixes that need to happen. First, as this story's original poster is discussing, the back end of every Linux distribution needs to know how to talk the same language. The way I see it, this goes all the way to including standards on how applications are installed on the system. This will fix some of the problems. You're right, let's get back to the original point, and here we're in agreement. The LSB can only be a good thing.
>The rest of the problems need to be addressed by educating the public. I'm not just talking about public service announcements. This is true, but remember (see above), education starts with you, you've got to do more than just say "Buy Linux";-)
>I think that Red Hat, Suse, etc. need to make it very clear on the packaging that they are a offering a distribution of a Linux OS, not an OS all of their own. I'm fairly sure my Suse 9.3 update had the words LINUX emblazoned across the box in pretty large letters, I don't see your point here. This goes back to education again, people installing Linux had really better have some idea about what it actually is and isn't.
Well, I'd better recap because that all sounds pretty hard on you, and I don't mean to be. Basically what I mean is, I don't actually think ru
I can thoroughly recommend Uno Extreme (possibly known to you yanks as Uno attack). It's absolutely hilarious, at times turning into a sort of card version of russian roulette, and can also be played with children. Great for playing down the pub, or even at home.
After all: software companies die, but information lasts forever. If a company takes the secrets of unlocking your data to its grave, where will that leave you?
Going to its grave? Which company would that be then?
A 'virtual' desktop has a different size than the monitor you're using: usually bigger, and often an exact multiple e.g. twice the width and twice the height). There are various tricks to move around to the bits you can't currently see, such as simply moving the cursor up to the edge of the screen.
'Multiple' desktops means you can have one set of applications open on one desktop, and another set of applications open on another desktop, and you can quickly switch between the two sets of applications. These desktops may, of course, also be 'virtual'.
Keep in mind that a huge number of Linux developers have access to closed-source OS code which they're supposed to pretend they never saw
Keep in mind that a huge number of Closed Source developers have access to Linux OS code which they're supposed to pretend they never saw...
But of course nobody ever checks up on those guys.
And aside from everything else, let's face it, you'd have to be pretty dumb to directly copy somebody else's code line for line, and then *publish* it where the original developer can easily find it. Copying is much more likely to go the other way.
How about the damned Bookmarks menu *still* not being sorted. I've been waiting for a fix for this for about the last 3 versions, how hard can it be? Maybe for 1.0? Please?
Apart from that of course, I love it, and 0.9 starts up much faster now, it's almost there before you click the shortcut, and that's without any stupid "allow Mozilla to permanently remove a huge chunk of your memory" rubbish (or do they just hide that now?)
Did he? Did he really? I don't believe anybody has yet proven that such actions cause the band to lose sales. In fact, it's quite possible that this increases the band's sales because a lot more people get to hear of them, and hear their music. And remember it's very easy these days to produce a value added CD with extra goodies like photo albums etc, so that even if somebody does have a bootleg, and likes the band, they're quite likely to buy the official CD too. This has been said a lot of times before, but most people aren't criminals, they'll quite happily buy something if they think they're getting value for money. If they think they're being ripped off on the other hand...
Of course, this is exactly the situation that created InstantLive in the first place. Instead of saying to the public, no you can't have that, they simply made a better product, and actually gave the people what they want. And wow, they made even more money! Holy f**king sh*t batman, it's not rocket science (Of course how the f*ck they managed to get a patent on their business model is another matter).
Really! This is like, hey look, this is a CD and I can record data to it. Oh look music is data. Now I'm going to patent my incredible invention, "recording music onto a CD".
I reckon if this is the sort of standard of patent we're seeing now, every patent issued by the US patent office in the last twenty years ought to be declared invalid because obviously we can't trust any of them to actually be sensible!
Holy shit pal, you have heard of "the slashdot effect" haven't you? I mean, seriously, you know it can also manifest itself *physically* too?
And even if only 1% of the guys'n'gals here are crazy enough to take you up on your offer (which I would say is a very conservative estimate),well let's just say you're going to get to know your postman very well!
On second thoughts, it would be quite handy, I know I have tons of stuff I don't use any more, but I hate throwing stuff away, I would be glad to donate it to a worthy cause. You could maybe set something up with Oxfam or somebody to donate stuff even you don't want to third world countries or something? Maybe you have something after all...
As far as I remember Kipling talks about wolves and mongooses quite a bit, but I'm sure he doesn't swear much, they're meant to be children's books after all. And my friend Conrad is always very polite in his emails.
Aha, now I've got it. "Nixon!". The British variant being "Watergate", which is obviously derived from the word "water".
Oh no wait, something to do with "W" and "G", the swearword must be "Bush!". But where's the "N"? I guess it's in the same place as the "W", the "M", and the "D".
Well, at least that gives me another 9 or 10 years! If I'm lucky! And you know what, I'll still love them, in fact I'll probably just be jealous that I didn't get to do groovy stuff like that when I was that age.
Anyway, by that time I'll probably have left my family for some 16 year old hussy myself, so I won't be one complaining...no honey I was just joking, no, put down the knife, gently please, no wait eeerrrrggggggggggggggggghhhhhhhhhh............at least, aaaarrghhh, let me submit this firrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr.....................
Of course that's all true, and to prove it, do you know what my son did the other day, he... ha ha, just kidding.
Actually it's just evolution, you know how hard it is to raise kids, nature had to give you some incentive. I mean literally, after the first six months of becoming a parent, I was beginning to wonder how on earth the human race survived, why weren't our ancestors thrown out of the cave after the first few weeks of screaming?
But hey, it's not sad, it's just the way things are. And I know for sure, just to really get to you folks that are still on your own, my kids are the best thing that ever happened to me. I can't believe how much I love them, they are fantastic, wonderful darlings both of them, and I know they always will be, whatever they do. It may be just evolution, but heck, it sure feels great!
Testing ...testing...tests
I love you ....
>omgwtfbbqlol
Hey, like it, I must remember that one...
Oh my, where to begin...
>1. Comment each function
Yep.
> - Function name
Why, it's there right next to the comment isn't it?
> - what it does
Yep
> - parameters
> parameter name - what is is for and any restrictions on it (i.e., must not be null)
No, parameter use should be obvious from the function context and their names. In my experience this covers the majority of cases. For those that aren't so clear, add a little extra to the function description. Why force people to add a description every time when it's rarely needed?
> - return value (all possible return values)
Again this should be obvious from the function name and description. If not, pump up the description a bit. Similar reasoning to parameters.
>2. Add comments to each file you modify so that over time, the file becomes better documented
Agreed, but only to the bit you modify - if you just change a constant value or something you shouldn't have to then comment the whole file!
>3. Add ASSERT() like comments and ASSERT() or equivalent to your code
Maybe. But only where it's really useful. A lot of the time seeing this isn't actually any better than having the code simply crash, assuming you have a decent debugger.
>4. Use dividing comments like a line of dashes to seperate blocks of code
Yep.
>5. Put in a '?' comment for code that you do not understand (good for function headers)
Refactor code you don't understand until you understand it. This will be very easy if the code has proper unit tests associated with it. You do use Unit Tests? What's that, legacy code? Then you'll need to start with writing the unit tests first.
The thing is, why do you need to understand it? Presumably you want to change it because it doesn't work or you need to extend it - so then you need the tests to (a) prove you haven't broken anything and (b) prove your new functionality works.
>6. Avoid stupid naming schemes for your local variables since that makes it harder to comment
Avoid stupid naming schemes for *anything* since that makes it harder to understand!
>7. Review your code for both logic and comment completeness after you code it before committing it to version control
Yep. Dare I mention Unit Tests again?
>8. Tag your bug fixes, code enhancements with a comment followed by a dash, date, and your initials. This is essential for large projects or for anything you will be working on for more than 6 months.
Gah, big no no, really BIG no no. Have you seen code that's had this done to it for more than a few months. No, because you can't see the code any more, just these damned tag comments. I'm beggin' yer, I'm pleadin' yer, don't do this. Besides which, they are completely superfluous with any half decent revision control system. If you don't use one of those, then go install Subversion NOW!
>9. Format your comments so that multiple line comments line up on the left hand side (increases readability)
Yep. It would be good if most tools did this, unfortunately most standard IDEs come with really crap editors, and even a good code editor doesn't always do this. This would be one of my main requests to code editor developers everywhere, please do auto-wrapping and alignment of long comments.
>10. Don't count on java doc or equivalent as being good enough code documentation.
Yep.
My basic philosophy is to have clean code: make what you see in your code editor as simple as possible (but no simpler). That includes comments. So don't force people to always put a special extra line for each parameter even when it's really not needed.
And don't duplicate stuff in the comment that you can see straight away from the code (e.g. function name).
>>the splintering of hundreds of different distros hasn't helped at all
... they see boxes for Red Hat Enterprise, Suse, Lindows, etc.
...*without* them having to compile it themselves
;-)
>More than just not helped, I see this as a dominant problem.
On the contrary, this is a perfectly natural and desirable outcome of the whole way Linux is set up. Instead of having to cope with all requirements and be one huge monolithic jack-of-all-trades, anybody can customise it for their own use, or for their target market, and people often do this. This is a *good* thing. It encourages experimentation, competition, improvements, etc etc.
>If you tell somebody, you should try using Linux as your OS! They'll go to the store
Well if that's all you tell your friend, then shame on you. The very next thing you should do would be to recommend a distro. Unless they're well into hacking themselves, this should probably be one of the big ones such as Suse, Mandrake(see note 1) or Redhat, because they really do work out of the box (okay, mostly).
>Then, depending on the distribution they chose, they take it home and then get to decide between Gnome, KDE, or something else. More work on their part.
Shame on you again. You need to help them install this thing, unless you think they're really competent enough, because even just the installer will already start talking about and doing things like repartitioning, which is not only scary for newbies, but can quite easily wipe their hard drive if they make the wrong choice.
As regards Gnome or KDE etc, this is half the point of installing Linux in the first place isn't it? You get a choice! You get to make the environment look how you want it. And it's really not so hard to change between desktop managers and try a few out until you find one you like, or just stick with the default if you can't be bothered.
>cool game
Again! You have to tell people, if you want to install extra stuff not in the box, you will probably have to use a compiler at some point. Most major things come with RPMs etc now, but some still don't. Then you straight away say, but all this means is typing three little commands in the terminal, and that's it. Null problemo.
>Linux is a terrific OS. Don't think this means I don't like it. But I do the odd tech support for my family and friends, and I can only think of a couple of them that might be ready for Linux. There are too many choices for the average computer user right now.
I agree with your first two sentences here, but as I said before, 'choice', or perhaps even better 'freedom', is one of the reasons you install Linux.
>The way I see it there are two fixes that need to happen. First, as this story's original poster is discussing, the back end of every Linux distribution needs to know how to talk the same language. The way I see it, this goes all the way to including standards on how applications are installed on the system. This will fix some of the problems.
You're right, let's get back to the original point, and here we're in agreement. The LSB can only be a good thing.
>The rest of the problems need to be addressed by educating the public. I'm not just talking about public service announcements.
This is true, but remember (see above), education starts with you, you've got to do more than just say "Buy Linux"
>I think that Red Hat, Suse, etc. need to make it very clear on the packaging that they are a offering a distribution of a Linux OS, not an OS all of their own.
I'm fairly sure my Suse 9.3 update had the words LINUX emblazoned across the box in pretty large letters, I don't see your point here. This goes back to education again, people installing Linux had really better have some idea about what it actually is and isn't.
Well, I'd better recap because that all sounds pretty hard on you, and I don't mean to be. Basically what I mean is, I don't actually think ru
I can thoroughly recommend Uno Extreme (possibly known to you yanks as Uno attack). It's absolutely hilarious, at times turning into a sort of card version of russian roulette, and can also be played with children. Great for playing down the pub, or even at home.
After all: software companies die, but information lasts forever. If a company takes the secrets of unlocking your data to its grave, where will that leave you?
Going to its grave? Which company would that be then?
Yay, long live our new OOoverlords!
(Assuming you're not joking...)
A 'virtual' desktop has a different size than the monitor you're using: usually bigger, and often an exact multiple e.g. twice the width and twice the height). There are various tricks to move around to the bits you can't currently see, such as simply moving the cursor up to the edge of the screen.
'Multiple' desktops means you can have one set of applications open on one desktop, and another set of applications open on another desktop, and you can quickly switch between the two sets of applications. These desktops may, of course, also be 'virtual'.
But I don't want to get a migraine just from doing that. So please....
LBW, change the damned yellow/black chequered background. Just try looking at it while scrolling...Bleagh!
Dang, I was going to correct you by saying it was Goebbels, but apparently you're right!, it was Hitler.
Keep in mind that a huge number of Closed Source developers have access to Linux OS code which they're supposed to pretend they never saw...
But of course nobody ever checks up on those guys.
And aside from everything else, let's face it, you'd have to be pretty dumb to directly copy somebody else's code line for line, and then *publish* it where the original developer can easily find it. Copying is much more likely to go the other way.
I think it would be more accurate to say Defence goes around Palestinian territory...
How about the damned Bookmarks menu *still* not being sorted. I've been waiting for a fix for this for about the last 3 versions, how hard can it be? Maybe for 1.0? Please?
Apart from that of course, I love it, and 0.9 starts up much faster now, it's almost there before you click the shortcut, and that's without any stupid "allow Mozilla to permanently remove a huge chunk of your memory" rubbish (or do they just hide that now?)
The next article will be ready soon, but Slashdot editors can dupe it early!
>seeing how far I get :)
Have a few beers beforehand, you should be able to get six feet or more!!
>I do believe given the context, he had a point.
Did he? Did he really? I don't believe anybody has yet proven that such actions cause the band to lose sales. In fact, it's quite possible that this increases the band's sales because a lot more people get to hear of them, and hear their music. And remember it's very easy these days to produce a value added CD with extra goodies like photo albums etc, so that even if somebody does have a bootleg, and likes the band, they're quite likely to buy the official CD too. This has been said a lot of times before, but most people aren't criminals, they'll quite happily buy something if they think they're getting value for money. If they think they're being ripped off on the other hand...
Of course, this is exactly the situation that created InstantLive in the first place. Instead of saying to the public, no you can't have that, they simply made a better product, and actually gave the people what they want. And wow, they made even more money! Holy f**king sh*t batman, it's not rocket science (Of course how the f*ck they managed to get a patent on their business model is another matter).
Really! This is like, hey look, this is a CD and I can record data to it. Oh look music is data. Now I'm going to patent my incredible invention, "recording music onto a CD".
I reckon if this is the sort of standard of patent we're seeing now, every patent issued by the US patent office in the last twenty years ought to be declared invalid because obviously we can't trust any of them to actually be sensible!
No, that was just to teach you a lesson for going to a Pet Shop Boys concert!!!
And even if only 1% of the guys'n'gals here are crazy enough to take you up on your offer (which I would say is a very conservative estimate),well let's just say you're going to get to know your postman very well!
On second thoughts, it would be quite handy, I know I have tons of stuff I don't use any more, but I hate throwing stuff away, I would be glad to donate it to a worthy cause. You could maybe set something up with Oxfam or somebody to donate stuff even you don't want to third world countries or something? Maybe you have something after all...
Oh wait, that address is Alan Ralsky's right?
As far as I remember Kipling talks about wolves and mongooses quite a bit, but I'm sure he doesn't swear much, they're meant to be children's books after all. And my friend Conrad is always very polite in his emails.
Aha, now I've got it. "Nixon!". The British variant being "Watergate", which is obviously derived from the word "water".
Oh no wait, something to do with "W" and "G", the swearword must be "Bush!". But where's the "N"? I guess it's in the same place as the "W", the "M", and the "D".
OK I give up, I can't think of one. Is it:
Maybe it's some local word that us foreigners (I'm English) wouldn't understand?
./ obviously being the parody site of /.
./ decease and resist ... or something!
Hey you there on
Well, at least that gives me another 9 or 10 years! If I'm lucky! And you know what, I'll still love them, in fact I'll probably just be jealous that I didn't get to do groovy stuff like that when I was that age.
. ...........
Anyway, by that time I'll probably have left my family for some 16 year old hussy myself, so I won't be one complaining...no honey I was just joking, no, put down the knife, gently please, no wait eeerrrrggggggggggggggggghhhhhhhhhh............at least, aaaarrghhh, let me submit this firrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr.........
Of course that's all true, and to prove it, do you know what my son did the other day, he... ha ha, just kidding.
Actually it's just evolution, you know how hard it is to raise kids, nature had to give you some incentive.
I mean literally, after the first six months of becoming a parent, I was beginning to wonder how on earth the human race survived, why weren't our ancestors thrown out of the cave after the first few weeks of screaming?
But hey, it's not sad, it's just the way things are. And I know for sure, just to really get to you folks that are still on your own, my kids are the best thing that ever happened to me. I can't believe how much I love them, they are fantastic, wonderful darlings both of them, and I know they always will be, whatever they do.
It may be just evolution, but heck, it sure feels great!
Sorry to disillusion you pal, but you will. It's in the parents' charter or something.
(And yes, IAAP!).
No, it would just mean at least one of her parents was rather geeky ;)