It really depends on the context. Some functions *must* be long because of what they do. Once you've nested more than two deep (and two deep is not that deep at all) you're in the risk of misunderstanding the code if it's complex enough - a memory jogger can save a few minutes of frustration when you're making modifications.
Those are the exceptions though. I generally see such comments on preprocessor statements like #else, which can get lost very easily because they can be quite a distance from their siblings. A mismatch in a #endif can be an absolute git to debug and comments like that really help the maintainer.
Depends on what you're doing. The best thing to do if you're doing anything complex is to start a transaction and work within that.. especialy if your changes span multiple tables and multiple SQL statements - a single statement is (supposed to be) atomic (not on all databases, alas, but for the major ones its true). Multiple statements aren't guaranteed to be so... which is why you have transactions to batch them into single operations.
One thing you can't do in SQL is do 'if x doesn't exist then do y' statements - because someone might create x halfway through your operation (unless you can guarantee that you're the only user of the database). If you find yourself trying to do that then think about changing the design.
In practical terms the longer a function is the more likely you're repeating something that should be broken out into functions.. although there are some tasks that can take pages of unique code - breaking those into functions just makes it harder to read (OTOH I've not found them that common).
The rules about the length of a function come from the days when we used 80x25 terminals and a long function couldn't be contained on the screen.. these days we can view 100+ lines in a window and it really isn't an issue.. and it's an asinine thing to make a rule about anyway - the code is there to do its job in the best way possible.. not to hang in an art gallery.
I once saw a case where someone had this rule drummed into them - they'd taken a perfectly working algorithm and broken it into 20 line functions, called 'fn_1', 'fn_2', 'fn_3' etc. and written a wrapper that called them in sequence. In the process they broke the algorithm.. just subtly enough that it didn't come out until quite late in testing.
DRMed content on external drives might not work simply because of the file size - the only open file format that everyone uses is FAT32.. so that's what Sony uses too on its external drive. That limits you to 2GB/file, which sucks somewhat for hidef stuff.
I wish they'd enable ext2 or ext3 (hey it's linux under the hood.. can't be *that* hard) but I guess they're thinking about the mass market who wouldn't know how to ext2 format a disk if it was explained to them in crayon. NTFS of course is not possible because it's microsoft proprietary and it really wouldn't surprise me if MS had protected it with a few patents, just to be sure.
If they can get into proper non-US video downloads before anyone else then they're onto a winner. Xbox live last time I used it (admittedly in November) had only a single episode of southpark for download.. itunes download is still mostly music plus the inevitable selection of pixar demos and about half a dozen programmes that have about 5 viewers between them - at £3 an episode (hence the apple TV doesn't really sell here - the local apple store has it switched off in a corner, because there's nothing to show).
If Sony can get in with decent films at a reasonable rental charge they'll clean up.
You don't have to do system updates to watch bluray, only to go online to PSN. You might have wanted to (for DTS-HD support in the latest firmware) but that was entirely your choice.
Considering they've been posting the same for years and under different aliases... either their 'ailing' business went under years ago or they're talking BS. I know what I'd bet.
Record shops I've seen are in fact doing well - they often specialise in vinyl amd/or rare recordings, but lower sales at higher margins works just as well as the cheap/low margin stuff they were doing 10 years ago. The bigger shops have diversified and do PC games, books, T shirts, etc. as well.
There are lots of other bugs, including what looks like a design flaw in trustzone that allows pwnage to work (trusted code has to call back to untrusted code to do various things).
Safari (and other applications) no longer run as root.. it took them until 1.1.3 to fix that but they eventually did.
Governments started demanding documents in open formats.. that threatened their monopoly, so they paid to get their XML schema called one.. now governments go back to buying exclusively Office again... MS Wins.
End users don't give a shit about open. Governments do but only on paper.. once it comes down to the buying decision all they need is a checkmark on a list. It doesn't actually have to mean anything (cf. Posix compatibility in NT4.. damned near useless but it was a requirement at the time).
Confusion? There was no confusion at all until some idiot decided to try to create one. We're just damned lucky no marketing droid has tried to sell 1.1MB memory sticks yet.
Then to call it the 'maybe byte' FFS... that guy must have been on some fairly strong medication.
Yeah the seventh day is Saturday. Jews rest on that day. Christians developed the habit of meeting on the first day of the week (Sunday) fairly early on, and that still largely applies.
It's a fairly common misconception to think Sunday is the rest day (in modern usage it probably is.. depends on how you define it I guess).
HDD manufacturers only started to use 10^3 comparatively recently... they did it because they could lie about the disk size basically.. marketing people make me sick sometimes.
Your natural tendency is to look left and right, not up and down.
I've heard this theory before but it's definately not true in my case, and I suspect a lot of other people (that's assuming the theory isn't complete BS). It seems to have been invented when they came out with widescreen TVs originally, a few years ago... salesmen used to use it as part of their patter.
I really notice the missing top/bottom on widescreen displays - sure they're cheaper but you've lost data.. instead of creating a 1280x1024 display they create a 1280x800 one, and get to call it the same size measured in inches.
Look at books and newspapers, or A4 printed material - all taller than it is wide. It's naturally easy to read and you don't call it 'thin'. If they printed a book sideways would it be as easy to read? Interesting test, if anyone's got a printing press handy...
I hear Win2008 Server is actually quite good.. although I haven't had chance to install it yet (will try that in a bit). It's vista without the crap, basically, and they let you optionally turn the crap back on if you really want to.
Vista pre SP1 is definately an early beta. Vista post SP1 isn't that bad - I'd put it down as a reasonable release with a few glitches that still need fixing.. of course it took them a year to get there.
That's just normal bolierplate. It basically means 'You post on a public forum, your problem.'. I run a few hobby lists and they have something pretty similar when signing up. I didn't used to, until some idiot threatened to sue because my *public* mailing list sent his message to all the subscribers (imagine that!) and I refused to travel around the world personally deleting each copy off everyone's machines, google, the wayback machne, etc...
A society where everyone pretty much knows whats going on with their friends/aquantences without all this victorian privacy bullshit sounds much more healthy.. and that's what's happening, slowly.
On a modern OS you have to work hard to make malloc fail. OSs will grant memory requests far above the amount of physical memory, and will even overcommit the virtual memory on the theory that you're not going to use all of it anyway.
The only way I've seen to get it to consistently fail is not on low memory but by asking for ludicrous amounts like 4GB at once on a 32bit system. Try it - get your system into a low memory condition and execute a few mallocs.. they don't fail - the OS merely continues to increase virtual memory and swap more and more.
That would be why nearly all spam references US companies and quotes the millions I could make in US dollars, then.
If you want more enlighenment I suggest you look at the list of the worlds most prolific spammers, and specifically what country they reside in: http://www.spamhaus.org/Rokso/
"we tested Pogo on a dual-processor, dual-core AMD Opteron 2210 with 1.80GHz CPUs, 2GB of RAM, and a NVIDIA Quadro FX 560 video card with 128MB of VRAM running Windows XP. On this machine, the remainder of Pogo's features actually displayed, but did not do much else. We found that with even minor use, the browser slowed to a crawl, animations built into the UI were laggy, and at some times, unusable. Performance was extremely poor when even trying to perform basic functions like clicking UI elements."
The reviewer had to go to a 4GB machine to get responsiveness.
Laptop 3G is really taking off here... the phone shops are pushing it like crazy at comparatively cheap prices. If I go into a cafe I see laptops with these dongles plugged in all the time.
A side effect is now when store's wifi breaks they never bother fixing it, becuase it's not getting used. Both the local starbucks now have no wifi, and the only wifi in the nearest town is a new costa coffee that charges more than the 3G data cost per hour...
It really depends on the context. Some functions *must* be long because of what they do. Once you've nested more than two deep (and two deep is not that deep at all) you're in the risk of misunderstanding the code if it's complex enough - a memory jogger can save a few minutes of frustration when you're making modifications.
Those are the exceptions though. I generally see such comments on preprocessor statements like #else, which can get lost very easily because they can be quite a distance from their siblings. A mismatch in a #endif can be an absolute git to debug and comments like that really help the maintainer.
Depends on what you're doing. The best thing to do if you're doing anything complex is to start a transaction and work within that.. especialy if your changes span multiple tables and multiple SQL statements - a single statement is (supposed to be) atomic (not on all databases, alas, but for the major ones its true). Multiple statements aren't guaranteed to be so... which is why you have transactions to batch them into single operations.
One thing you can't do in SQL is do 'if x doesn't exist then do y' statements - because someone might create x halfway through your operation (unless you can guarantee that you're the only user of the database). If you find yourself trying to do that then think about changing the design.
You've clearly never used SQL Server.. that deadlocks when the wind changes....
That's a but contrived though.. someone would use a delete+insert rather than an update? Talk about making your life hard...
In practical terms the longer a function is the more likely you're repeating something that should be broken out into functions.. although there are some tasks that can take pages of unique code - breaking those into functions just makes it harder to read (OTOH I've not found them that common).
The rules about the length of a function come from the days when we used 80x25 terminals and a long function couldn't be contained on the screen.. these days we can view 100+ lines in a window and it really isn't an issue.. and it's an asinine thing to make a rule about anyway - the code is there to do its job in the best way possible.. not to hang in an art gallery.
I once saw a case where someone had this rule drummed into them - they'd taken a perfectly working algorithm and broken it into 20 line functions, called 'fn_1', 'fn_2', 'fn_3' etc. and written a wrapper that called them in sequence. In the process they broke the algorithm.. just subtly enough that it didn't come out until quite late in testing.
DRMed content on external drives might not work simply because of the file size - the only open file format that everyone uses is FAT32.. so that's what Sony uses too on its external drive. That limits you to 2GB/file, which sucks somewhat for hidef stuff.
I wish they'd enable ext2 or ext3 (hey it's linux under the hood.. can't be *that* hard) but I guess they're thinking about the mass market who wouldn't know how to ext2 format a disk if it was explained to them in crayon. NTFS of course is not possible because it's microsoft proprietary and it really wouldn't surprise me if MS had protected it with a few patents, just to be sure.
If they can get into proper non-US video downloads before anyone else then they're onto a winner. Xbox live last time I used it (admittedly in November) had only a single episode of southpark for download.. itunes download is still mostly music plus the inevitable selection of pixar demos and about half a dozen programmes that have about 5 viewers between them - at £3 an episode (hence the apple TV doesn't really sell here - the local apple store has it switched off in a corner, because there's nothing to show).
If Sony can get in with decent films at a reasonable rental charge they'll clean up.
You don't have to do system updates to watch bluray, only to go online to PSN. You might have wanted to (for DTS-HD support in the latest firmware) but that was entirely your choice.
Considering they've been posting the same for years and under different aliases... either their 'ailing' business went under years ago or they're talking BS. I know what I'd bet.
Record shops I've seen are in fact doing well - they often specialise in vinyl amd/or rare recordings, but lower sales at higher margins works just as well as the cheap/low margin stuff they were doing 10 years ago. The bigger shops have diversified and do PC games, books, T shirts, etc. as well.
Not true - in the UK it is actually illegal to rip a CD in itunes.. format shifting is illegal.
For the last time this was looked at see http://www.guardian.co.uk/technology/2006/oct/30/copyright.news and http://news.bbc.co.uk/1/hi/uk/6095612.stm (both seem to be from the same source).
It was only in 2003 that the law was amended to allow timeshifting (recording broadcasts) and make transient (in-memory) copies legal.
See http://www.opsi.gov.uk/si/si2003/20032498.htm
I can't see either of those being NSFW. Maybe the second one if you were a bit prudish I suppose.
Just remember to get out of the way when they start shooting...
There are lots of other bugs, including what looks like a design flaw in trustzone that allows pwnage to work (trusted code has to call back to untrusted code to do various things).
Safari (and other applications) no longer run as root.. it took them until 1.1.3 to fix that but they eventually did.
Do ya think?
Governments started demanding documents in open formats.. that threatened their monopoly, so they paid to get their XML schema called one.. now governments go back to buying exclusively Office again... MS Wins.
End users don't give a shit about open. Governments do but only on paper.. once it comes down to the buying decision all they need is a checkmark on a list. It doesn't actually have to mean anything (cf. Posix compatibility in NT4.. damned near useless but it was a requirement at the time).
Confusion? There was no confusion at all until some idiot decided to try to create one. We're just damned lucky no marketing droid has tried to sell 1.1MB memory sticks yet.
Then to call it the 'maybe byte' FFS... that guy must have been on some fairly strong medication.
Yeah the seventh day is Saturday. Jews rest on that day. Christians developed the habit of meeting on the first day of the week (Sunday) fairly early on, and that still largely applies.
It's a fairly common misconception to think Sunday is the rest day (in modern usage it probably is.. depends on how you define it I guess).
HDD manufacturers only started to use 10^3 comparatively recently... they did it because they could lie about the disk size basically.. marketing people make me sick sometimes.
Your natural tendency is to look left and right, not up and down.
I've heard this theory before but it's definately not true in my case, and I suspect a lot of other people (that's assuming the theory isn't complete BS). It seems to have been invented when they came out with widescreen TVs originally, a few years ago... salesmen used to use it as part of their patter.
I really notice the missing top/bottom on widescreen displays - sure they're cheaper but you've lost data.. instead of creating a 1280x1024 display they create a 1280x800 one, and get to call it the same size measured in inches.
Look at books and newspapers, or A4 printed material - all taller than it is wide. It's naturally easy to read and you don't call it 'thin'. If they printed a book sideways would it be as easy to read? Interesting test, if anyone's got a printing press handy...
I hear Win2008 Server is actually quite good.. although I haven't had chance to install it yet (will try that in a bit). It's vista without the crap, basically, and they let you optionally turn the crap back on if you really want to.
Vista pre SP1 is definately an early beta. Vista post SP1 isn't that bad - I'd put it down as a reasonable release with a few glitches that still need fixing.. of course it took them a year to get there.
That's just normal bolierplate. It basically means 'You post on a public forum, your problem.'. I run a few hobby lists and they have something pretty similar when signing up. I didn't used to, until some idiot threatened to sue because my *public* mailing list sent his message to all the subscribers (imagine that!) and I refused to travel around the world personally deleting each copy off everyone's machines, google, the wayback machne, etc...
That's more likely.
A society where everyone pretty much knows whats going on with their friends/aquantences without all this victorian privacy bullshit sounds much more healthy.. and that's what's happening, slowly.
On a modern OS you have to work hard to make malloc fail. OSs will grant memory requests far above the amount of physical memory, and will even overcommit the virtual memory on the theory that you're not going to use all of it anyway.
The only way I've seen to get it to consistently fail is not on low memory but by asking for ludicrous amounts like 4GB at once on a 32bit system. Try it - get your system into a low memory condition and execute a few mallocs.. they don't fail - the OS merely continues to increase virtual memory and swap more and more.
That would be why nearly all spam references US companies and quotes the millions I could make in US dollars, then.
If you want more enlighenment I suggest you look at the list of the worlds most prolific spammers, and specifically what country they reside in: http://www.spamhaus.org/Rokso/
Nope.. from TFA:
"we tested Pogo on a dual-processor, dual-core AMD Opteron 2210 with 1.80GHz CPUs, 2GB of RAM, and a NVIDIA Quadro FX 560 video card with 128MB of VRAM running Windows XP. On this machine, the remainder of Pogo's features actually displayed, but did not do much else. We found that with even minor use, the browser slowed to a crawl, animations built into the UI were laggy, and at some times, unusable. Performance was extremely poor when even trying to perform basic functions like clicking UI elements."
The reviewer had to go to a 4GB machine to get responsiveness.
Laptop 3G is really taking off here... the phone shops are pushing it like crazy at comparatively cheap prices. If I go into a cafe I see laptops with these dongles plugged in all the time.
A side effect is now when store's wifi breaks they never bother fixing it, becuase it's not getting used. Both the local starbucks now have no wifi, and the only wifi in the nearest town is a new costa coffee that charges more than the 3G data cost per hour...
Depends on your country/state's specific laws on the matter. I'd get acquanted with them if I were you, just in case.
Here it's illegal (a form of theft) and if the owner decided to press criminal charges you could go to jail for it.