There is something to be said for refactoring. The trouble I've experienced is that you seldom have time to. And hence, you wind up with spaghetti code that has grown almost unmanagable over time, even though the project may have started with a basic, good design.
But I think if you really want to teach the students about real world programming, they should be required to add functionality to a huge piece of nightmarish spaghetti code (you know, the kind with switch statements spanning many pages and dozens of variables at the top of the function, and hundreds of poorly documented global variables).
The new functionality requirments should be sizable, and the deadline ridiculous.
My question would be--sure the guy reduced the original code down by quite a lot, but why was the code written in such a way in the first place? Was it designed to be extensible and reusable? Did the junior programmer in question make the code run faster and more reliable? Did he just concatenate lines and strip out comments? Or was the senior coder just not competent?
1. Comment each function - Function name - what it does - parameters parameter name - what is is for and any restrictions on it (i.e., must not be null) - return value (all possible return values)
****
I really hate having parameters documented in a comment block above the function declaration, because it seldom gets updated when the function signature itself is changed.
I worked with a guy who used to format his functions like this:
void my_func(// My function does foo int arg1,// arg1 documentation char * arg2,// arg2 documentation ... ) { // Function guts go here }
The nice thing about this method, although the "look" of a function is broken up, is that when you add or change parameters, the programmer is a lot more likely to change the documentation as well.
When you're under the gun to get the code out, the less the developer has to do to change the docs, the more likely it is they will be changed.
We have absolutely lost any semblence of 'punishment fits the crime'. How can 3 years in jail be justified by sharing a single copy of a pre-release movie(?)
I agree with you 100%! WTF is happening?!
Granted it's theft, but theft of one $8.00 movie ticket at the most.
Infringing on copyright law is *not theft*. You have not deprived the original owner of any property, and thus have violated no property rights. You have infringed on a law, sure, but that law is not based on any universal right.
So, if this is a correct interpretation of the constitution, this law is completely bogus and has no business being on the books. It's a good example of government protectionism of corporate interest.
The reason for replacing O'Hare with Boxleitner had more to do with the story arc than with Boxleitner's name, at least, according to J. Micheal "That's My Story and I'm Sticking to It" Strazinsky.
He said his reasons were because he needed a character that was closer to the Shadows to pull off what he would do later. He realized when the first season was finished that Sinclair would be sitting around on his thumbs until season 3. Sheridan was strictly a story decision.
No joke. The harder the *AA tries to eliminate filesharing, the more fileshares will work to protect themselves. Essentially, the *AA will push it underground and copyrighted works will continue to be illegally distributed, despite their efforts.
Okay, I don't have a source for this--it's pretty second hand, but a guy I used to work for saw a television show where a man who was blind from birth was able to "see" a candle burn.
They had a camera hooked up to an elecromagnet which was connected to a bed of many tiny blunt nails (kind of like those novelty items that you can put your hand into and see an impression on the other side). The bed was pressed into the small of the man's back.
As the blind man trained the camera at the candle, he reported that he could see the shape and was amazed that fire actually had a visible shape.
What this showed was that the brain has the capacity for sight, even if the area for sight has never been used before. He was able to map somehow feeling sensations on his back into visual sensations in his mind. Amazing!
"And if you act today, you can help save a fledgling space television program, Enterprise, absolutely free! In addition to your monthly letter from a team scientist, you will also receive letters from a show writer and a producer keeping you informed of the latest budget cuts and plot lines.
"Save a space program, save a sci-fi show, and contribute to your children's future education and entertainment!"
DRM attempts to control the use of content, but that is the same as attempting to control your computer. Companies like M$ will always opposed open source because you can get around the imposed restrictions.
I think what scares me the most is the fact that the audience applauded, cheered and appeared to like it. I'm sorry, but I'm just embarrassed for the guy.
You know, you never would catch Linus doing something like that...
I'm seriously considering my next laptop to be Mac. I have lots of geek friends and many of them use Mac. Plus I got one for my wife, who is not very technical, and she's never looked back since.
Having said that, I do enjoy using Linux, and love having it on my laptop. But the biggest problem has been support for third party drivers (case in point, my Broadcom built-in wireless requires ndiswrapper...:-( ). The growing popularity of Mac means more hardware is opening up for us Linux users.
No, I'm just saying that shows like 24, Battlestar, etc. are proving that there is an audience for television programing with arcs and on-going story telling.
What was the name of that Star Trek cartoon series that was on in the 70's? I remember a scene of Spock as a boy being bullied by other Vulcans because he was a half-breed.
It gets even farther away from the short story format and turns the franchise into even more of a soap opera. And I, for one, cannot abide soap operas pretending to science fiction.
I think TNG started going the way of the soap opera near the end, and that's why I stopped watching it.
But, I think there is a fine line between soap opera and on-going, arc-based story telling. I've been watching more and more shows which are diverging away from the "short story" format that you mention and moving toward larger story arc. I guess we have Babylon 5 to thank for it.:-) Take 24, Battlestar Galactica, Farscape and Star Trek: Deep Space 9 as further examples. I haven't been watching it, but isn't Stargate like that too? Oh, and Gene Roddenberry's Earth: Final Conflict was arc-based too.
I personally find those kind of shows very engaging, and get thrilled with having over-arcing story lines. It makes the show's universe seem larger and more real, and much less like a collection of unrelated stories with the same characters who never develop over the course of many seasons.
There is something to be said for refactoring. The trouble I've experienced is that you seldom have time to. And hence, you wind up with spaghetti code that has grown almost unmanagable over time, even though the project may have started with a basic, good design.
But I think if you really want to teach the students about real world programming, they should be required to add functionality to a huge piece of nightmarish spaghetti code (you know, the kind with switch statements spanning many pages and dozens of variables at the top of the function, and hundreds of poorly documented global variables).
The new functionality requirments should be sizable, and the deadline ridiculous.
My question would be--sure the guy reduced the original code down by quite a lot, but why was the code written in such a way in the first place? Was it designed to be extensible and reusable? Did the junior programmer in question make the code run faster and more reliable? Did he just concatenate lines and strip out comments? Or was the senior coder just not competent?
Thanks for the tip!
1. Comment each function
// My function does foo // arg1 documentation // arg2 documentation
...
// Function guts go here
- Function name
- what it does
- parameters
parameter name - what is is for and any restrictions on it (i.e., must not be null)
- return value (all possible return values)
****
I really hate having parameters documented in a comment block above the function declaration, because it seldom gets updated when the function signature itself is changed.
I worked with a guy who used to format his functions like this:
void my_func(
int arg1,
char * arg2,
)
{
}
The nice thing about this method, although the "look" of a function is broken up, is that when you add or change parameters, the programmer is a lot more likely to change the documentation as well.
When you're under the gun to get the code out, the less the developer has to do to change the docs, the more likely it is they will be changed.
So, if this is a correct interpretation of the constitution, this law is completely bogus and has no business being on the books. It's a good example of government protectionism of corporate interest.
No kidding. I hate that theme so much, that I don't even know how it goes. All I can hear in my head is "It's been a long time..."
He said his reasons were because he needed a character that was closer to the Shadows to pull off what he would do later. He realized when the first season was finished that Sinclair would be sitting around on his thumbs until season 3. Sheridan was strictly a story decision.
See the War on Drugs for an example.
They had a camera hooked up to an elecromagnet which was connected to a bed of many tiny blunt nails (kind of like those novelty items that you can put your hand into and see an impression on the other side). The bed was pressed into the small of the man's back.
As the blind man trained the camera at the candle, he reported that he could see the shape and was amazed that fire actually had a visible shape.
What this showed was that the brain has the capacity for sight, even if the area for sight has never been used before. He was able to map somehow feeling sensations on his back into visual sensations in his mind. Amazing!
Sorry I don't have the reference!
Heh. I read that as "high quality Intel." I personally go for AMD. :-)
It's like the Libertarians say...if you give the government the power to give you something, it also now has the power to take it away.
"Save a space program, save a sci-fi show, and contribute to your children's future education and entertainment!"
I say, fair use needs to be taken into account.
You know, you never would catch Linus doing something like that...
/me looks for the Linux version, to no avail. :-(
/me notes parent mod "+5 Funny". :-)
Having said that, I do enjoy using Linux, and love having it on my laptop. But the biggest problem has been support for third party drivers (case in point, my Broadcom built-in wireless requires ndiswrapper...:-( ). The growing popularity of Mac means more hardware is opening up for us Linux users.
Heh. I really thought the parent message said "I always thought that bashing OS-X on BSD was a good move." Had to do a double take. :-)
<jack bauer>Damn it!</jack bauer>
No, I'm just saying that shows like 24, Battlestar, etc. are proving that there is an audience for television programing with arcs and on-going story telling.
What was the name of that Star Trek cartoon series that was on in the 70's? I remember a scene of Spock as a boy being bullied by other Vulcans because he was a half-breed.
But, I think there is a fine line between soap opera and on-going, arc-based story telling. I've been watching more and more shows which are diverging away from the "short story" format that you mention and moving toward larger story arc. I guess we have Babylon 5 to thank for it. :-) Take 24, Battlestar Galactica, Farscape and Star Trek: Deep Space 9 as further examples. I haven't been watching it, but isn't Stargate like that too? Oh, and Gene Roddenberry's Earth: Final Conflict was arc-based too.
I personally find those kind of shows very engaging, and get thrilled with having over-arcing story lines. It makes the show's universe seem larger and more real, and much less like a collection of unrelated stories with the same characters who never develop over the course of many seasons.
I guess that rules out Babylon 5, 24 and Battlestar Galatica...
Considering that Knoppix fits on one disc, that sounds more cost-effective to me.