View Full Version : Johnny can so program
The_Penguin
07-21-2006, 04:55 PM
Posted in its entirety by the permission of the author.
"America is slipping!"
It's become a standard lead, guaranteed to grab readers' attention. Add in a few alarmist quotes from self-serving lobbyists with hidden agendas, along with the obligatory conclusion that "Education is the answer," and you've got the economic horror movie that Americans love so much to watch.
CNET News.com has got this formula down pat. Its piece, Can Johnny still program?, laments that in the annual collegiate programming contest held by the Association for Computing Machinery, the best that any American team could do this year was a miserable 17th place. The United States hasn't won a world championship since 1997--"an ominous sign for the U.S. tech industry," News.com fears.
"Oh my god," readers must have thought. "How could the quality of American computer-science students have sunk so quickly in the short time span of just eight years?" It's an absurd conclusion, of course, but readers have been conditioned to believe any claim, no matter how outlandish, about the decline of the U.S. educational system.
But let's see what News.com didn't tell you.
Start with what it means statistically to perform well in this contest today. News.com didn't tell you that the number of teams competing has grown nearly sevenfold from 1994 through 2005. In other words, for a team to finish at, say, third place, in 1994 would be equivalent to finishing 21st this year. So a hypothetical team that News.com would have lauded in 1994 would now be dismissed as having badly "slipped" in 2005, even though it would be of the same quality.
Second, News.com seems to have forgotten the history of the Olympics. Long before Olympic athletes from all countries became quasiprofessionals, the Eastern European countries were seeing to it that training for the Games was their athletes' full-time job, giving them a major advantage over other nations' athletes.
Some nations, or some individual universities, make similar time commitments in the ACM contest. Xu Jun, a public-affairs officer at the school, which fielded this year's first-place team in the programming contest from Shanghai Jiao Tong University, put it in Olympian terms: "All their time was spent in preparation except for their class work."
A faculty colleague of mine who is a veteran coach in the ACM contest estimates that many foreign teams devote at least 10 times the amount of time to practice as do American teams. Xu's statement suggests that the factor is much greater than 10.
-snip-
The_Penguin
07-21-2006, 04:59 PM
As someone who married into a Shanghai family, I congratulate the bright, dedicated members of the winning Jiaoda team, which also took first place in 2002. But it would be wrong to view their victories as measures of general superiority over other schools, let alone other nations. Indeed, a number of ethnic-Chinese universities that are considered far more prestigious than Jiaoda weren't in even the top 10, such as Peking University (11th place), Tsinghua University (13th place) and National Taiwan University (Honorable Mention, below 30th place).
In a companion editorial, News.com Executive Editor Charles Cooper repeated the lobbyists' favorite example, the seemingly poor showing of American kids at the grade-school level on international math and science tests. Yet it has been repeatedly pointed out by education experts that differences in test scores are primarily due to America's struggle to deal with a social underclass.
Consider the Trends in International Mathematics and Science Study eighth-grade science test, for instance, and the scores achieved by Colorado, Connecticut, Iowa, Maine, Massachusetts, Minnesota, Montana, Nebraska North Dakota, Oregon, Utah, Vermont, Wisconsin and Wyoming. Had these states--none of which has a substantial underclass--been treated as separate nations, each of them would have been outscored only by Singapore. (China, the nation that produced the ACM contest winner this year, has refused to participate in TIMMS.)
So the American showing in the ACM contest does not mean that the states are losing their technological mettle. To News.com's credit, after I brought some of these points to its attention, it did include them in a follow-up piece on April 19. But it is a shame that News.com did not cover the real threat to American technological competitiveness--a threat that comes from the very entities News.com quoted as saying that the contest means America is doomed.
The earlier CNET article, for instance, quoted Jim Foley, chairman of the Computing Research Association, David Patterson of the ACM and former Intel CEO Craig Barrett, all of whose organizations have hidden agendas in playing the education card. And those interests, I contend, form the real technological threat to the states. Here's why:
In the late 1990s, the computer industry claimed a desperate labor shortage. No independent study ever confirmed that shortage, but the hidden agenda behind the shrill shortage claims was to push Congress to increase the yearly cap on the H-1B work visa program, which enabled industry to import cut-rate engineers from abroad. Government data show, for instance, that Intel, which claims that its H-1Bs have master's degrees and Ph.D.s, pays them far less than the national medians for engineers with these degrees.
University computer science departments used the "labor shortage" claims to get more faculty, more doctoral students, and more research dollars from Congress and industry. Since research funding and Ph.D. production are key to prestige in universities, the claims of a labor shortage were manna from Heaven, and a number of prominent academics rushed to publicly support the industry's push to expand the H-1B program to remedy the "labor shortage."
To be sure, research should indeed be an integral part of a university's work. But academics long ago abandoned the noble notion of scholarship for the less noble goal of empire building, a transition that should have been better covered in News.com's interviews with Foley et al.
Congress, openly admitting that it was responding to industry campaign donations rather than the popular will, complied by increasing the H-1B cap in 1998 and 2000, the latter action coming at the time the mass layoffs began. This past December, despite a continuing abysmal tech labor market, Congress enacted another expansion of the program.
Contrary to these parties' putative goal of maintaining American technological competitiveness, H-1B has brought great harm. How can American engineers compete with cheap, imported labor? And now the industry, notably including Barrett, is promoting the offshoring of tech work (in which the H-1B program also plays a key role), obviously even more harmful to maintaining America's technological skills. And yet these guys now have the nerve to make the claim that the solution to all the layoffs of engineers is to have our educational system produce more engineers. Sadly, News.com never questions such "Alice in Wonderland" claims.
Nor does News.com challenge the rich hypocrisy of those whom it quotes. Foley, who now cites the results of the programming contest as signifying America's decline, told the same News.com reporter last August, "It does not make sense to become a programmer...(because) programming jobs will continue to go offshore."
No, Johnny's ability to program hasn't slipped. What has slipped, though, is his respect for our cherished major American institutions--industry, academia, Congress and, most sadly, the press.
http://news.com.com/Johnny+can+so+program+-+page+2/2010-1007_3-5700858-2.html?tag=st.next
Oh so very true.
Mickey Shane
07-21-2006, 06:39 PM
Geez, like that's really a factor. I can program (my real name isn't Johnny) in assembly, Cobal, C++, Visual C & Basic. New languages sprout up so fast that the one's that I've mentioned were passe' in the tech biz world five years ago.
I like to program every once in a while. To do that work year in and year out is akin to shingleing roofs.
Let the Indians knock themselves out. It's way too monotonous for me.
Scaryclouds
07-21-2006, 06:55 PM
I'm doing my part!!!!
#include <iostream>
#include <string>
#include <cctype>
#include <cstdlib>
using namespace std;
int main()
{
char phrase[80] = {"The name"};
bool riddle = false;
int len, chances = 5, correct;
len = strlen(phrase);
char * answer = new char[len];
char input;
//shows the phrase in dashes
for (int z = 0; z <= len; z++)
{
if(z < len && isalpha(phrase[z]))
answer[z] = '-';
else if (z < len && (!isalpha(phrase[z])))
answer[z] = ' ';
//sets final element in array to null value to prevent garbage letters
else if (z = len)
answer[z] = '\0';
}
cout << answer << '\n';
//request user input
for (int y = 0; y < len; y++)
{
correct = 0;
cout << "Please enter a letter: ";
cin.get(input);
if (input != '\n')
cin.ignore();
//validates user input
if(isalpha(input))
{
for (int x = 0; x < len; x++)
{
//determines is user inputted proper letter, if not user looses one chance
if (input == phrase[x])
{
answer[x] = input;
correct += 1;
}
}
}
else
{
correct = 1;
chances -= 1;
cout << "Invalid input! You have " << chances << " chances remaining\n";
}
if (answer == phrase)
{
cout << "Congratulations you solved the riddle!";
riddle = true;
}
else if (correct < 1)
{
chances -= 1;
//display number of chances user has left if they gave an incorrect response
cout << "Incorrect letter given you have " << chances << " chances remaining\n";
}
//displays number of chances the users has left
else
cout << "You have " << chances << " chances remaining" << endl << answer << '\n';
}
while (chances > 0 && answer == false);
//displays failure message if user is unable to figure out the phrase
if (chances >= 0)
{
cout << "You failed to answer the phrases correctly, the man has been hung!" << endl;
cout << "The correct answer is: " << phrase << endl;
}
else
cout << answer;
return 0;
}
Mickey Shane
07-21-2006, 07:26 PM
A little crack the pass game. Clever.
I'm glad that chick in your avatar isn't dating Liberals anymore. She makes ugly look good. Toss her a bone for me, K? Bowwowwowwow-bark
Edit: BlackIce for 5 minutes and I'd hand you your password. 15 minutes in DOS debug. As a reverser I'm gwizard. Pleased to meet another coder.
mataj
07-21-2006, 08:13 PM
Who cares. Programming is for Indians & Chinese anyway.
Scaryclouds
07-21-2006, 10:57 PM
A little crack the pass game. Clever.
I'm glad that chick in your avatar isn't dating Liberals anymore. She makes ugly look good. Toss her a bone for me, K? Bowwowwowwow-bark
Edit: BlackIce for 5 minutes and I'd hand you your password. 15 minutes in DOS debug. As a reverser I'm gwizard. Pleased to meet another coder.
Thanks, C++ so far is my favorite language its very powerful and I find it easy to use. Though I need to get back to programming more I want to finish that game up. The basic what you might call "engine" is mostly complete (theres a couple of bugs I'm still having and I want to add a few new features). Mostly what is left for me to do is flesh it out with more phrases, and a random number generator to "choose" a phrase. Speaking of which do you know any good ones? So far the ones I found havn't been all that random;
As for the girl I feed one rotten fish a day and a bucket of pond water, it keeps her going but destroys her spirit ;);
Hopefully a few other coders wiill chime in here I'm pretty sure we have 2 or 3 more who post regularly;
P.S;
Theres a programming joke in there see if you can catch it (its fairly obvious);
The_Penguin
07-22-2006, 01:42 PM
Geez, like that's really a factor. I can program (my real name isn't Johnny) in assembly, Cobal, C++, Visual C & Basic. New languages sprout up so fast that the one's that I've mentioned were passe' in the tech biz world five years ago.
I like to program every once in a while. To do that work year in and year out is akin to shingleing roofs.
Let the Indians knock themselves out. It's way too monotonous for me.
If you don't give a damn, then why did you even bother posting a response?
mataj
07-22-2006, 02:42 PM
Who cares. Programming is for Indians & Chinese anyway.Oh, yea, and for women and ******* (aka minorities) as well.
http://news.research.ohiou.edu/news/index.php?item=105
http://news.com.com/Study+finds+too+few+women+and+minorities+in+tech/2100-1022_3-5758177.html
http://www.redorbit.com/news/technology/454390/speakers_diversity_needed_in_it_field/index.html?source=r_technology
http://www.networkworld.com/news/2006/051706-women-in-it.html
http://uk.builder.com/0,39026540,39252817,00.htm
etc, etc, etc, etc ...
http://www.google.com/search?hs=psL&hl=en&lr=&safe=active&&q=women+minorities+%22it+field%22&btnG=Search
Mickey Shane
07-22-2006, 02:44 PM
Thanks, C++ so far is my favorite language its very powerful and I find it easy to use. Though I need to get back to programming more I want to finish that game up. The basic what you might call "engine" is mostly complete (theres a couple of bugs I'm still having and I want to add a few new features). Mostly what is left for me to do is flesh it out with more phrases, and a random number generator to "choose" a phrase. Speaking of which do you know any good ones? So far the ones I found havn't been all that random;I would just use the rand() function for a hangman game. It's in the c++ standard library. IMO software is not capable of doing a truely random number generator. It's like limits in calculus. Deep Blue could get really close with a large program. True random number generators are usually built with peripheral hardware circuits that the CPU can read from. It's the imperfect operation of discrete components that makes it act randomly.
As for the girl I feed one rotten fish a day and a bucket of pond water, it keeps her going but destroys her spirit ;);
That would certainly explain the expression on her face.
Hopefully a few other coders wiill chime in here I'm pretty sure we have 2 or 3 more who post regularly;
There may be an antarctic bird on this site that programs for a living. I think I touched a nerve.
P.S;
Theres a programming joke in there see if you can catch it (its fairly obvious);I'm not getting it unless it's the "if input is not equal to Enter" decision statement. ???
Mickey Shane
07-22-2006, 02:49 PM
If you don't give a damn, then why did you even bother posting a response?I have read and re-read the forum rules. Giving a damn is NOT required for posting a response.
The monotony thing only applies to me. I know people that truely love to program all of the time. The plus side is being able to go off on your own, contract program from your house, and make the big bucks all at the same time.
Scaryclouds
07-22-2006, 05:25 PM
would just use the rand() function for a hangman game. It's in the c++ standard library. IMO software is not capable of doing a truely random number generator. It's like limits in calculus. Deep Blue could get really close with a large program. True random number generators are usually built with peripheral hardware circuits that the CPU can read from. It's the imperfect operation of discrete components that makes it act randomly.
How would it be written? (Initialized)
I'm still fairly new to C++ :p
I'm not getting it unless it's the "if input is not equal to Enter" decision statement. ???
I'm sad and I thought it was so clever and you even had it in each of my quotes. Oh well I was referring to all the ";" at the return lines. I guess I wasn't that obvious now that I think about it. Oh well...
Mickey Shane
07-22-2006, 06:01 PM
How would it be written? (Initialized)
I'm still fairly new to C++ :p
I'm sad and I thought it was so clever and you even had it in each of my quotes. Oh well I was referring to all the ";" at the return lines. I guess I wasn't that obvious now that I think about it. Oh well...
Ok, I see the unnecessary semi-colons now. It's harder to read code in messageboard boxes because of the lack of identation.
There's a pretty simple little tutorial on this page that discusses using the rand() function:
http://www.daniweb.com/techtalkforums/thread1769.html
EDIT: If you can use the rand() function successfully, look into Common Object Modelling (COM) over here:
http://www.sunny-beach.net/random_numbers/manual/134.htm
mataj
07-22-2006, 08:18 PM
My advice to all of you C++ coding monkeys: Download this http://msdn.microsoft.com/vstudio/express/visualcsharp/download/, and try it out, it's free. Highly recommendable. I've spent about 20 years of my professional career coding C/C++, needed less than a week to learn the essentials of C#, and less than a month or two to start making money out of it. It was a love of first sight, so to speak. I ain't going back to C++ if at all possible. If grew far too lazy & burned out to do all of that typing required to make things work in C++.
Let's be civil gentlemen. The article does make a point. And it was posted in good faith. Please, treat it as such.
Scaryclouds
07-22-2006, 10:45 PM
....ummm we are being civil. I think mataj was joking with the monkies part. As for C# it was the first language I actually learned but so far I think C++ has an edge.
Mickey Shane
07-23-2006, 07:55 PM
My advice to all of you C++ coding monkeys: Download this http://msdn.microsoft.com/vstudio/express/visualcsharp/download/, and try it out, it's free. Highly recommendable. I've spent about 20 years of my professional career coding C/C++, needed less than a week to learn the essentials of C#, and less than a month or two to start making money out of it. It was a love of first sight, so to speak. I ain't going back to C++ if at all possible. If grew far too lazy & burned out to do all of that typing required to make things work in C++.Thanks, I bookmarked it for now because it wants you to uninstall your C++ first. I need to study it first to see if I want to try it out (c#).
Ruby is the one I'm interested in now. It supposedly takes the best of Perl and Lisp and whatever. I don't know yet. I don't program for a living per se', yet it's good for an atta boy at work whenever someone needs something simplified. People are inpressed by programming skills, when in reality, it's pretty simple now-a-days.
Dinner's calling. adios
mataj
07-24-2006, 03:28 AM
....ummm we are being civil. I think mataj was joking with the monkies part.So, that was the problem! Men, are we touchy here.
"Coding monkey" or "Code monkey" is an established jargon term. It shouldn't be offensive in any case, and in this case, it certainly wasn't meant to be.
http://en.wikipedia.org/wiki/Code_monkey
http://www.jonathancoulton.com/lyrics/code-monkey
http://tcm.co.uk/
http://www.codingmonkeys.de/
http://www.codemonkeypublishing.com/
http://www.thecodingmonkey.net/
http://www.newtechusa.com/ppi/main.asp
As for C# it was the first language I actually learned but so far I think C++ has an edge.It depends on what are you going to use it for.
C's primary design goal was to lower the overhead to the lowest possible level, to be as close to the machine as possible. C++ followed the same philosophy. That makes C++ a great language for drivers, operating system kernels, and mission critical stuff. For everything else, it's so so (http://64.233.183.104/search?q=cache:PFfJAY13oU4J:www.disintegration.org /~blimey/jokes/cpp.html), for business programming it's nightmare.
I'm not familiar with the C# design goals. It's strictly object oriented, that's for sure. IMHE, one can get things done clean, fast, and mainteinable in C#. If you are programming for money, that's the only thing that matters.
vBulletin v3.6.1, Copyright ©2000-2008, Jelsoft Enterprises Ltd.