A bit like learning to roll a kayak, or shoot hoops, or juggling five balls, or programming in assembler, or most things on hack-a-day.
Not at all essential for day to day life, but challenging and fun. And just occasionally you will gain an insight that makes it even more worthwhile.
Or maybe on a kayak trip you might even meet a six foot six basket-baller of the opposite gender who likes somebody who is good with his [juggling] balls and finds computer geeks interesting....... but then again the odds are against it.
This may be so... I have heard an friend talk of a leading theoretical physicist who needed help from the university cafe staff to get the select the correct change to pay for his lunch.
I wonder if he had transcended numbers completely?
"cautioned", "education", and "auctioned" are all anagrams of each other.
It would be a Scrabbler player's wet dream to have an open 'o'+'n' on the board, and 'a', 'c', ‘d’, ‘e', 'i', 't', 'u' sitting in your tile rack... especially if it was on the bottom row so you could get two triple word scores
Having read "Word Freaks - : Heartbreak, Triumph, Genius, and Obsession in the World of Competitive Scrabble Players" you can see how the author starts with a writer's perspective on words, and through his attempts to become a competitive player he alters his brain. Towards the end of the book he is seeing anagrams everywhere and words become separated from their meanings...
"Jaxqiz" (n): An unlikely word that is only useful for playing scrabble with.
Pick up your copy of "The C Programming Language Edition 2" from 1988, and look at page 135 - sizeof operator can be used either with or without brackets.
And then look at section 8.7. The malloc implementation uses "sizeof(Header)" a few times. If it is good enough for K&R then it is good enough for me.
Agreed. It has got me worried that so many people screamed "you are so wrong" and the email is also marked "+4 informative"... I guess they brains are stuck in the "C source" level of abstraction.and believe C actually has strings. No wonder there is so much crappy code out there!
Picking up my copy of K&R Edition 2.. Page 30
getline puts the character '\0' at the end of the array it is creating, to mark the end of the string of characters. This convention is also used by the C language: when a string constant like "hello\n" appears in a C program it is stored as an array of characters containing the characters of the string and terminated with a '\0' to mark the end.
K&R says that null terminated strings is a convention, and that at runtime string constants are actually stored as arrays of characters.
Please ignore the null terminated string past to printf(), but the point is clear, you can define a character array that contains a length followed with character values that does not have a terminating null added by the compiler. It can also contain embedded null characters if you like.
#include <stdio.h >
char mystring[8] = "\x07One\0Two"; int main(int c, char *v[]) {
printf("Mystring is %i bytes, and %i characters long\n",
sizeof(mystring),mystring[0]);
return 0; }
I think my point stands. C does not force you to use null terminated strings (but I do agree that it is easy to).
After 25 years of using C, I don't mind the strings being terminated by nulls. If you want to do something else, just don't include string.h.
Terminating with a null is only a convention - the C language itself has no concept of strings. As others point out, it is either an array of bytes or a pointer to bytes.
it isn't forced on to you - you don't have to follow it.
1. My Linux boxes in Virtual Box seem to work perfectly well. If your VM is fighting for resources with 20 widgets showing the weather in Antarctica, 15 instant messaging clients and 20 bittorrent downloads then the fact you are running Windows is not the reason that you get nothing done.
2. What superior functionality am I missing out on when I bridge my VM networking? Do you run a "bond0" on your laptops two Ethernet ports? A couple of examples of this "superior functionality" that don't work in a VM would be nice.
3. You may have a point with file systems, but ZFS snapshots still work inside my VM, and I can also do snapshot of the VM if I want.
4. I find Virtualbox in full screen mode is identical, as long as you don't push right-control+F. And using Putty to access a VM is identical to a physical box - you do code like a real man, using just as your editor "vi".don't you?
5. This is completely false. The user may not learn everything (like what a pain Linux wireless and power management can be), but they can learn almost everything. They will not learn nothing.
Why not? Things have come a long way since VMware was released - things like VT/Pacifica extensions have made the whole setup a lot more stable, and relatively current CPUs have more than enough cycles to burn.
Although I spend all day supporting Linux and UNIX boxes my laptop and desktop both run Windows 7 natively. I then Linux inside of VirtualBox if/when I need it. I also run XP in VirtualBox too so I can be on customer's VPNs that don't have split tunnelling and still have access to local resources and the Web...
Believe it or not my desktop at work is a single core AMD Sempron 2.0GHz with 1GB RAM, and I have no problems (it's made out of bits and bobs I had lying around). The best thing is, when I can be bothered to upgrade it I just install Virtual Box and copy over my VMs and am back to 100% productivity.
The 7.1 earthquake that hit my back yard was equivalent to 671kT . Add a few more zeros for the Japan quake. Can you spend a trillion dollars to stop them happening too?
It would take 1,389 flip-flops and 4,610 4-input look-up tables. So that's maybe 700+ 74LS74s and a few thousand 74LS series AND/OR/NAND/NOR/NOT chips. At 4mA per chip you will need a 5A or 10A power supply.
The project contains a complete PDP-11 system: a 11/70 CPU with memory management unit, but without floating point unit, a basic set of UNIBUS peripherals (DL11, LP11, PC11, RK11/RK05), and last but not least a cache and memory controllers for SRAM and PSRAM. The design is FPGA proven, runs currently on Digilent S3BOARD and NEXYS2 boards and boots 5th Edition UNIX and 2.11BSD UNIX.
A $150 FPGA board will be a lot cheaper than a drawer full of TTL. And a USB cable is a very cheap power supply.
And you can have it up and running in a few nights.
As a consultant doing contract work, I must disagree with you. I don't receive kickbacks, and I care. I treat all customers as though their systems are my own... After all, if they have a big technical issue, it's me who has to work though the night fixing it!
Consultants and contractors have their place. Small IT shops don't often get the chance to build up the depth of skill and experience required for things like infrastructure upgrades (e.g. SAN Storage upgrades, VMware migrations, Database upgrades...).
Maybe you just a very poor judge of which people bring in to help you with things outside of your core business / skill set?
If it is that important to you stop moaning, go out and buy a 22" Viewsonic. Put a bloody great "Personal Property of..." sticker on it and plonk it on your desk. It will cost less than a cup of coffee per week.
That is exactly what I did - guess what happened? Everybody else in the office got company owned second monitors.
So I took mine home, and asked for a newer bigger one, as it was important to me.
I am not an a-bomb engineer, but it is 'fine' just to leave Uranium assembled in a supercritical core, sitting round for for a few ms before it explodes.
But Plutonium has a very high rate of spontaneous emission making it completely unsuited for gun-style devices - as pointed out the chain reaction will start before they are fully assembled. The original solution was to compress a sub-critical mass with explosives, to make it super-critical and able to support a chain reaction.
A neutron source is mandatory for an implosion device as it only stays compressed for a very short time. Because of this a well timed bust of neutrons is essential to kickstart the reaction. Original designs used a small amount of polonium (a neutron source) coated in beryllium (a neutron absorber) in the center, which mixed under compression releasing the neutrons into the Pu. The problem with this design is that that the half life of polonium is short, so you can't keep them sitting around on shelves for long, so modern 'stockpiled' devices use an neutron source external to the core.
But as Plutonium ages the ratio of long-lived to short-lived isotopes changes reducing the flux of neutrons (and it's heat output, making it hard for NASA to build Radio-thermal Generators (RTGs) for deep space missions). In the future it may be possible to make a Pu gun-style bomb, but only if you have some well aged Pu.
If you are in an earthquake, hurricane, eruption, ice storm , whatever and when there is no electricity, the supermarkets are closed, fuel is in short supply, and the roads are all closed at the first bridge, where exactly are you going to go?
You might as well just sit round with the neighbours and cook whatever is defrosting in the freezer on the camp stove or BBQ. You have far more resources at home then parked up at a roadend somewhere. If you stay you can also look after your property and help out others less able to cope than you are...
The majority of natural disasters don't require large scale evacuations of most people, and if you do have to flee from pending doom what you should take will completely different to what you think. You will want to take passports, insurance documents, medicines, photos, backup hard disk and not usual four tins of baked beans a fishing rod.
Another good thing is to have a decent first aid kit in a Pelican case and I keep it in the car. I haven't used it kayaking, but the first time I used it was at a funeral (somebody gashed their leg open on a chair), then when I had a nasty accident when running, and I had it with me during the recent earthquake. Oh, and a decent head torch or Maglite is a must too.
A bit like learning to roll a kayak, or shoot hoops, or juggling five balls, or programming in assembler, or most things on hack-a-day.
Not at all essential for day to day life, but challenging and fun. And just occasionally you will gain an insight that makes it even more worthwhile.
Or maybe on a kayak trip you might even meet a six foot six basket-baller of the opposite gender who likes somebody who is good with his [juggling] balls and finds computer geeks interesting.... ... but then again the odds are against it.
This may be so... I have heard an friend talk of a leading theoretical physicist who needed help from the university cafe staff to get the select the correct change to pay for his lunch.
I wonder if he had transcended numbers completely?
"cautioned", "education", and "auctioned" are all anagrams of each other.
It would be a Scrabbler player's wet dream to have an open 'o'+'n' on the board, and 'a', 'c', ‘d’, ‘e', 'i', 't', 'u' sitting in your tile rack... especially if it was on the bottom row so you could get two triple word scores
You should be cautioned, I't's more than education, and it can't be auctioned to the highest bidder.
(A top scrabble player would have a smile now - hint: look at the nine letter words).
Having read "Word Freaks - : Heartbreak, Triumph, Genius, and Obsession in the World of Competitive Scrabble Players" you can see how the author starts with a writer's perspective on words, and through his attempts to become a competitive player he alters his brain. Towards the end of the book he is seeing anagrams everywhere and words become separated from their meanings...
"Jaxqiz" (n): An unlikely word that is only useful for playing scrabble with.
Yes, but
char unterminated[9] = "Not always";
Well shoot me if I am Old Skool.
Pick up your copy of "The C Programming Language Edition 2" from 1988, and look at page 135 - sizeof operator can be used either with or without brackets.
And then look at section 8.7. The malloc implementation uses "sizeof(Header)" a few times. If it is good enough for K&R then it is good enough for me.
These pesky youngsters.... get off my lawn! :-)
Agreed. It has got me worried that so many people screamed "you are so wrong" and the email is also marked "+4 informative"... I guess they brains are stuck in the "C source" level of abstraction.and believe C actually has strings. No wonder there is so much crappy code out there!
Picking up my copy of K&R Edition 2.. Page 30
getline puts the character '\0' at the end of the array it is creating, to mark the end of the string of characters. This convention is also used by the C language: when a string constant like "hello\n" appears in a C program it is stored as an array of characters containing the characters of the string and terminated with a '\0' to mark the end.
K&R says that null terminated strings is a convention, and that at runtime string constants are actually stored as arrays of characters.
No, C has an easy way to initailize byte arrays with constants, and pathologically adds nulls to the end of them.
char mystring[8] = "\x07One\0Two";
Amazing - I've just defined a "Length byte plus data" string much like Pascal uses - and sizeof(mystring) returns '8', so it has no terminating null.
It is just a convention that can be rejected if needed.
Please ignore the null terminated string past to printf(), but the point is clear, you can define a character array that contains a length followed with character values that does not have a terminating null added by the compiler. It can also contain embedded null characters if you like.
#include <stdio.h >
char mystring[8] = "\x07One\0Two";
int main(int c, char *v[])
{
printf("Mystring is %i bytes, and %i characters long\n",
sizeof(mystring),mystring[0]);
return 0;
}
I think my point stands. C does not force you to use null terminated strings (but I do agree that it is easy to).
After 25 years of using C, I don't mind the strings being terminated by nulls. If you want to do something else, just don't include string.h.
Terminating with a null is only a convention - the C language itself has no concept of strings. As others point out, it is either an array of bytes or a pointer to bytes.
it isn't forced on to you - you don't have to follow it.
The BBC Science in Action podcasts are good listening. Find them on iTunes.
Very old skool - Basic, 8bits, a few kB of RAM and ROM. Moving it from 68K ASM to C was very un-retro of me.
Much fun trying to squeeze the code in, managing memory one byte at a time, no OS, no debugger, and it actually worked!
I respect your ID (wow! 437) but I call "BS".
1. My Linux boxes in Virtual Box seem to work perfectly well. If your VM is fighting for resources with 20 widgets showing the weather in Antarctica, 15 instant messaging clients and 20 bittorrent downloads then the fact you are running Windows is not the reason that you get nothing done.
2. What superior functionality am I missing out on when I bridge my VM networking? Do you run a "bond0" on your laptops two Ethernet ports? A couple of examples of this "superior functionality" that don't work in a VM would be nice.
3. You may have a point with file systems, but ZFS snapshots still work inside my VM, and I can also do snapshot of the VM if I want.
4. I find Virtualbox in full screen mode is identical, as long as you don't push right-control+F. And using Putty to access a VM is identical to a physical box - you do code like a real man, using just as your editor "vi" .don't you?
5. This is completely false. The user may not learn everything (like what a pain Linux wireless and power management can be), but they can learn almost everything. They will not learn nothing.
Why not? Things have come a long way since VMware was released - things like VT/Pacifica extensions have made the whole setup a lot more stable, and relatively current CPUs have more than enough cycles to burn.
Although I spend all day supporting Linux and UNIX boxes my laptop and desktop both run Windows 7 natively. I then Linux inside of VirtualBox if/when I need it. I also run XP in VirtualBox too so I can be on customer's VPNs that don't have split tunnelling and still have access to local resources and the Web...
Believe it or not my desktop at work is a single core AMD Sempron 2.0GHz with 1GB RAM, and I have no problems (it's made out of bits and bobs I had lying around). The best thing is, when I can be bothered to upgrade it I just install Virtual Box and copy over my VMs and am back to 100% productivity.
The 7.1 earthquake that hit my back yard was equivalent to 671kT . Add a few more zeros for the Japan quake. Can you spend a trillion dollars to stop them happening too?
Pretty please, with cherrys on it?
It would take 1,389 flip-flops and 4,610 4-input look-up tables. So that's maybe 700+ 74LS74s and a few thousand 74LS series AND/OR/NAND/NOR/NOT chips. At 4mA per chip you will need a 5A or 10A power supply.
But you could do it the easy way and configure an FPGA using http://opencores.org/project,w.11:
The project contains a complete PDP-11 system: a 11/70 CPU with memory management unit, but without floating point unit, a basic set of UNIBUS peripherals (DL11, LP11, PC11, RK11/RK05), and last but not least a cache and memory controllers for SRAM and PSRAM. The design is FPGA proven, runs currently on Digilent S3BOARD and NEXYS2 boards and boots 5th Edition UNIX and 2.11BSD UNIX.
A $150 FPGA board will be a lot cheaper than a drawer full of TTL. And a USB cable is a very cheap power supply.
And you can have it up and running in a few nights.
As a consultant doing contract work, I must disagree with you. I don't receive kickbacks, and I care. I treat all customers as though their systems are my own... After all, if they have a big technical issue, it's me who has to work though the night fixing it!
Consultants and contractors have their place. Small IT shops don't often get the chance to build up the depth of skill and experience required for things like infrastructure upgrades (e.g. SAN Storage upgrades, VMware migrations, Database upgrades...).
Maybe you just a very poor judge of which people bring in to help you with things outside of your core business / skill set?
If it is that important to you stop moaning, go out and buy a 22" Viewsonic. Put a bloody great "Personal Property of..." sticker on it and plonk it on your desk. It will cost less than a cup of coffee per week.
That is exactly what I did - guess what happened? Everybody else in the office got company owned second monitors.
So I took mine home, and asked for a newer bigger one, as it was important to me.
Like a Quadro 6000 (204W) or a GTX 580 at (244W)
Even the bleeding edge GTX590 is under 400W...
I am not an a-bomb engineer, but it is 'fine' just to leave Uranium assembled in a supercritical core, sitting round for for a few ms before it explodes.
But Plutonium has a very high rate of spontaneous emission making it completely unsuited for gun-style devices - as pointed out the chain reaction will start before they are fully assembled. The original solution was to compress a sub-critical mass with explosives, to make it super-critical and able to support a chain reaction.
A neutron source is mandatory for an implosion device as it only stays compressed for a very short time. Because of this a well timed bust of neutrons is essential to kickstart the reaction. Original designs used a small amount of polonium (a neutron source) coated in beryllium (a neutron absorber) in the center, which mixed under compression releasing the neutrons into the Pu. The problem with this design is that that the half life of polonium is short, so you can't keep them sitting around on shelves for long, so modern 'stockpiled' devices use an neutron source external to the core.
But as Plutonium ages the ratio of long-lived to short-lived isotopes changes reducing the flux of neutrons (and it's heat output, making it hard for NASA to build Radio-thermal Generators (RTGs) for deep space missions). In the future it may be possible to make a Pu gun-style bomb, but only if you have some well aged Pu.
Guess what? The people in ads are, well, actors.
And for the uber-naive, some online reviews are written by the product's manufactures!
If you are in an earthquake, hurricane, eruption, ice storm , whatever and when there is no electricity, the supermarkets are closed, fuel is in short supply, and the roads are all closed at the first bridge, where exactly are you going to go?
You might as well just sit round with the neighbours and cook whatever is defrosting in the freezer on the camp stove or BBQ. You have far more resources at home then parked up at a roadend somewhere. If you stay you can also look after your property and help out others less able to cope than you are...
The majority of natural disasters don't require large scale evacuations of most people, and if you do have to flee from pending doom what you should take will completely different to what you think. You will want to take passports, insurance documents, medicines, photos, backup hard disk and not usual four tins of baked beans a fishing rod.
Another good thing is to have a decent first aid kit in a Pelican case and I keep it in the car. I haven't used it kayaking, but the first time I used it was at a funeral (somebody gashed their leg open on a chair), then when I had a nasty accident when running, and I had it with me during the recent earthquake. Oh, and a decent head torch or Maglite is a must too.
Diesel goes stale too - bacteria can live in it an gunge up fuel filters.
We only keep enough in the generators at work to run for a couple of hours, and test the generators weekly to help move it on.
All that firepower would have proved very useful when I was crapping in hole in the back yard...