|
|
 |
December 02, 2003
Back to Iraq, the sequel!
You may have read the blog of my friend Chris Allbritton -- the web's first indie war correspondent, at Back To Iraq. Back in the spring, he raised $13,000 in donations from readers of his blog, to pay for a reporting trip to Iraq during the war. It was an incredibly cool experiment -- since he had no editors calling the shots, he was able to write all manner of interesting essays and reports about life in Kurdistan and Baghdad during and just after the American attack. It was all posted on his blog, free, for anyone to read. The stories are still there if you ever want to read them again -- as well as some remarkable photos.
Today, he got the following letter:
Mr. Allbritton:
As a contributor to your trip to Iraq earlier this year, I wish you would return to Iraq and provide an outlet for the collective voice of the Iraqi people.
I have always been against the invasion of Iraq. I continue to oppose our administration’s policies. I feel that we are imposing our will rather than respecting the wishes of our fellow human beings.
Would you consider returning to Iraq with the purpose of finding out just what the Iraqis want from us at this point?
So now Chris has announced he's going Back to Iraq again. He got a letter today from a reader and a former donor, asking him to head back and provide some more stories from a fully independent point of view. Chris posted the letter, and already he's received about $700 in new donations in the last couple of hours alone -- including one from me.
If you want to see another dynamic example of public-minded journalism, drop by and join the "coalition of the willing," as he calls it, heh.
Posted by Clive Thompson at December 02, 2003 05:52 PM
Trackback Pings
TrackBack URL for this entry: http://www.collisiondetection.net/mt3/mt-tb.cgi/663
Listed below are links to weblogs that reference Back to Iraq, the sequel!:
Tracked on March 15, 2005 7:30 PM
Used Cars>; check out all used Cars here! They have all the Cars, including Certified Acura Cars, Certified Audi Cars, Certified BMW Cars, Certified Buick Cars, Certified Cadillac Cars, Certified Chevrolet Cars, Certified Chrysler Cars, Certified Daewoo Cars, Certified Dodge Cars, Certified Eagle Cars, Certified Ford Cars, Certified Geo Cars, Certified GMC Cars, Certified Honda Cars, Certified Hummer Cars, Certified Hyundai Cars, Certified Infiniti Cars, Certified Isuzu Cars, Certified Jaguar Cars, Certified Jeep Cars, Certified Land Rover Cars, Certified Lexus Cars, Certified Lincoln Cars, Certified Mazda Cars, Certified Mercedes-Benz Cars, Certified Mercury Cars, Certified Mitsubishi Cars, Certified Nissan Cars, Certified Oldsmobile Cars, Certified Pontiac Cars, Certified Plymouth Cars, Certified Porsche Cars, Certified Saturn Cars, Certified Subaru Cars, Certified Suzuki Cars, Certified Toyota Cars, Certified Volkswagen Cars, Certified Volvo Cars. They have some of the most comprehensive info on Cars available. That is really cool. He is pretty corageous to say the least....
Posted by: Chris Pollimer at December 10, 2003 4:27 PM
Posted by: Online Casino at January 16, 2004 4:31 PM
Note the new asterisks whenever we reference favoriteNumber, except for that new line right before the return.
Posted by: Joshua at January 19, 2004 9:51 PM
A variable leads a simple life, full of activity but quite short (measured in nanoseconds, usually). It all begins when the program finds a variable declaration, and a variable is born into the world of the executing program. There are two possible places where the variable might live, but we will venture into that a little later.
Posted by: Christian at January 19, 2004 9:52 PM
Note the new asterisks whenever we reference favoriteNumber, except for that new line right before the return.
Posted by: Court at January 19, 2004 9:52 PM
When Batman went home at the end of a night spent fighting crime, he put on a suit and tie and became Bruce Wayne. When Clark Kent saw a news story getting too hot, a phone booth hid his change into Superman. When you're programming, all the variables you juggle around are doing similar tricks as they present one face to you and a totally different one to the machine.
Posted by: Lionel at January 19, 2004 9:52 PM
Let's take a moment to reexamine that. What we've done here is create two variables. The first variable is in the Heap, and we're storing data in it. That's the obvious one. But the second variable is a pointer to the first one, and it exists on the Stack. This variable is the one that's really called favoriteNumber, and it's the one we're working with. It is important to remember that there are now two parts to our simple variable, one of which exists in each world. This kind of division is common is C, but omnipresent in Cocoa. When you start making objects, Cocoa makes them all in the Heap because the Stack isn't big enough to hold them. In Cocoa, you deal with objects through pointers everywhere and are actually forbidden from dealing with them directly.
Posted by: Gabriel at January 19, 2004 9:53 PM
Note first that favoriteNumbers type changed. Instead of our familiar int, we're now using int*. The asterisk here is an operator, which is often called the "star operator". You will remember that we also use an asterisk as a sign for multiplication. The positioning of the asterisk changes its meaning. This operator effectively means "this is a pointer". Here it says that favoriteNumber will be not an int but a pointer to an int. And instead of simply going on to say what we're putting in that int, we have to take an extra step and create the space, which is what does. This function takes an argument that specifies how much space you need and then returns a pointer to that space. We've passed it the result of another function, , which we pass int, a type. In reality, is a macro, but for now we don't have to care: all we need to know is that it tells us the size of whatever we gave it, in this case an int. So when is done, it gives us an address in the heap where we can put an integer. It is important to remember that the data is stored in the heap, while the address of that data is stored in a pointer on the stack.
Posted by: Stephen at January 19, 2004 9:53 PM
The most basic duality that exists with variables is how the programmer sees them in a totally different way than the computer does. When you're typing away in Project Builder, your variables are normal words smashed together, like software titles from the 80s. You deal with them on this level, moving them around and passing them back and forth.
Posted by: Eli at January 19, 2004 9:55 PM
Let's take a moment to reexamine that. What we've done here is create two variables. The first variable is in the Heap, and we're storing data in it. That's the obvious one. But the second variable is a pointer to the first one, and it exists on the Stack. This variable is the one that's really called favoriteNumber, and it's the one we're working with. It is important to remember that there are now two parts to our simple variable, one of which exists in each world. This kind of division is common is C, but omnipresent in Cocoa. When you start making objects, Cocoa makes them all in the Heap because the Stack isn't big enough to hold them. In Cocoa, you deal with objects through pointers everywhere and are actually forbidden from dealing with them directly.
Posted by: Cadwallader at January 19, 2004 9:55 PM
The rest of our conversion follows a similar vein. Instead of going through line by line, let's just compare end results: when the transition is complete, the code that used to read:
Posted by: Margaret at January 19, 2004 9:55 PM
For this program, it was a bit of overkill. It's a lot of overkill, actually. There's usually no need to store integers in the Heap, unless you're making a whole lot of them. But even in this simpler form, it gives us a little bit more flexibility than we had before, in that we can create and destroy variables as we need, without having to worry about the Stack. It also demonstrates a new variable type, the pointer, which you will use extensively throughout your programming. And it is a pattern that is ubiquitous in Cocoa, so it is a pattern you will need to understand, even though Cocoa makes it much more transparent than it is here.
Posted by: Oliver at January 19, 2004 9:55 PM
Posted by: julia at January 24, 2004 6:58 PM
Post a comment
| | |
Used Cars>; check out all used Cars here! They have all the Cars, including Certified Acura Cars, Certified Audi Cars, Certified BMW Cars, Certified Buick Cars, Certified Cadillac Cars, Certified Chevrolet Cars, Certified Chrysler Cars, Certified Daewoo Cars, Certified Dodge Cars, Certified Eagle Cars, Certified Ford Cars, Certified Geo Cars, Certified GMC Cars, Certified Honda Cars, Certified Hummer Cars, Certified Hyundai Cars, Certified Infiniti Cars, Certified Isuzu Cars, Certified Jaguar Cars, Certified Jeep Cars, Certified Land Rover Cars, Certified Lexus Cars, Certified Lincoln Cars, Certified Mazda Cars, Certified Mercedes-Benz Cars, Certified Mercury Cars, Certified Mitsubishi Cars, Certified Nissan Cars, Certified Oldsmobile Cars, Certified Pontiac Cars, Certified Plymouth Cars, Certified Porsche Cars, Certified Saturn Cars, Certified Subaru Cars, Certified Suzuki Cars, Certified Toyota Cars, Certified Volkswagen Cars, Certified Volvo Cars. They have some of the most comprehensive info on Cars available.
That is really cool. He is pretty corageous to say the least....
Posted by: Chris Pollimer at December 10, 2003 4:27 PM
Nice site. thx.
Posted by: Online Casino at January 16, 2004 4:31 PM
Note the new asterisks whenever we reference favoriteNumber, except for that new line right before the return.
Posted by: Joshua at January 19, 2004 9:51 PM
A variable leads a simple life, full of activity but quite short (measured in nanoseconds, usually). It all begins when the program finds a variable declaration, and a variable is born into the world of the executing program. There are two possible places where the variable might live, but we will venture into that a little later.
Posted by: Christian at January 19, 2004 9:52 PM
Note the new asterisks whenever we reference favoriteNumber, except for that new line right before the return.
Posted by: Court at January 19, 2004 9:52 PM
When Batman went home at the end of a night spent fighting crime, he put on a suit and tie and became Bruce Wayne. When Clark Kent saw a news story getting too hot, a phone booth hid his change into Superman. When you're programming, all the variables you juggle around are doing similar tricks as they present one face to you and a totally different one to the machine.
Posted by: Lionel at January 19, 2004 9:52 PM
Let's take a moment to reexamine that. What we've done here is create two variables. The first variable is in the Heap, and we're storing data in it. That's the obvious one. But the second variable is a pointer to the first one, and it exists on the Stack. This variable is the one that's really called favoriteNumber, and it's the one we're working with. It is important to remember that there are now two parts to our simple variable, one of which exists in each world. This kind of division is common is C, but omnipresent in Cocoa. When you start making objects, Cocoa makes them all in the Heap because the Stack isn't big enough to hold them. In Cocoa, you deal with objects through pointers everywhere and are actually forbidden from dealing with them directly.
Posted by: Gabriel at January 19, 2004 9:53 PM
Note first that favoriteNumbers type changed. Instead of our familiar int, we're now using int*. The asterisk here is an operator, which is often called the "star operator". You will remember that we also use an asterisk as a sign for multiplication. The positioning of the asterisk changes its meaning. This operator effectively means "this is a pointer". Here it says that favoriteNumber will be not an int but a pointer to an int. And instead of simply going on to say what we're putting in that int, we have to take an extra step and create the space, which is what does. This function takes an argument that specifies how much space you need and then returns a pointer to that space. We've passed it the result of another function, , which we pass int, a type. In reality, is a macro, but for now we don't have to care: all we need to know is that it tells us the size of whatever we gave it, in this case an int. So when is done, it gives us an address in the heap where we can put an integer. It is important to remember that the data is stored in the heap, while the address of that data is stored in a pointer on the stack.
Posted by: Stephen at January 19, 2004 9:53 PM
The most basic duality that exists with variables is how the programmer sees them in a totally different way than the computer does. When you're typing away in Project Builder, your variables are normal words smashed together, like software titles from the 80s. You deal with them on this level, moving them around and passing them back and forth.
Posted by: Eli at January 19, 2004 9:55 PM
Let's take a moment to reexamine that. What we've done here is create two variables. The first variable is in the Heap, and we're storing data in it. That's the obvious one. But the second variable is a pointer to the first one, and it exists on the Stack. This variable is the one that's really called favoriteNumber, and it's the one we're working with. It is important to remember that there are now two parts to our simple variable, one of which exists in each world. This kind of division is common is C, but omnipresent in Cocoa. When you start making objects, Cocoa makes them all in the Heap because the Stack isn't big enough to hold them. In Cocoa, you deal with objects through pointers everywhere and are actually forbidden from dealing with them directly.
Posted by: Cadwallader at January 19, 2004 9:55 PM
The rest of our conversion follows a similar vein. Instead of going through line by line, let's just compare end results: when the transition is complete, the code that used to read:
Posted by: Margaret at January 19, 2004 9:55 PM
For this program, it was a bit of overkill. It's a lot of overkill, actually. There's usually no need to store integers in the Heap, unless you're making a whole lot of them. But even in this simpler form, it gives us a little bit more flexibility than we had before, in that we can create and destroy variables as we need, without having to worry about the Stack. It also demonstrates a new variable type, the pointer, which you will use extensively throughout your programming. And it is a pattern that is ubiquitous in Cocoa, so it is a pattern you will need to understand, even though Cocoa makes it much more transparent than it is here.
Posted by: Oliver at January 19, 2004 9:55 PM
Posted by: julia at January 24, 2004 6:58 PM