Hey, Girls! Learn Computer Programming!
June 24, 2014

There is a strange article in this morning's Detroit Free Press: Breaking the code for girl geeks by Martha Mendoza (Associated Press). I'm writing this blog entry because I think I can give you better advice than what's in the article. If you're not a girl, you can still read this because actually I'd give pretty much the same advice to anyone. But I will offer a bit of critique along with advice.

A young woman is quoted, "Younger girls see men, not women, doing all the techie stuff, programming and computer science." The suggestion is that girls need to see grown up women doing something before they try it themselves. That is just baloney! Girls these days tend to do whatever they are interested in, whether it's auto racing, bull fighting, boxing, accounting, construction or anything else, including computer programming. Of course, there are fields that men are more drawn to than women, and vice versa. All of us hope to find work that suits us personally.

The article also suggests that girls can only take a girly approach to the subject of computer programming. It mentions women role-models "who write software to design cool fabrics or choreograph dances." Actually, if you want to be a fabric designer or a choreographer, you might be better off having someone else do the serious computer programming. You might want an application (or "app") to help you with those endeavors, but you would probably not be at all interested in gaining the expertise necessary to write the code for the app.

Here is some actual code written in the Perl programming language. (Different languages have different ways of doing similar things.)

	my $total = 0;
	my $count = 0;
	my $input;
	my $average;

	while ( $input = <STDIN> ) {
		$total += $input;
		$count += 1;

	$average = $total / $count;
	print "$count numbers with average of $average.\n";

I will explain. "$total" is a variable. Variables can be given different values over the course of a program. "my $total = 0;" declares that $total is a variable with an initial value of 0. "my $input;" is also a declaration, but it does not assign any initial value.

"$input = <STDIN>" reads a line from a text file and assigns the value of that line to the variable "$input". When there are no more lines in the file, the assignment will "fail" and the loop (the statements between "{" and "}") will end. "$total += $input" is a special kind of assignment statement. It means "Add the value of $input to the current value of $total and then set the value of $total to be this new number."

"$average = $total / $count;" is yet another variety of assignment. It tells Perl to compute the value of the expression "$total / $count" and then assign the result to the variable "$average". The final line is an output statement, which displays or prints the values you have computed.

There is little bit more to the example program than I have explained. There is a lot more to the whole Perl language. There are many languages other than Perl. And, of course, on today's computers, you can do all kinds of things much more interesting than mere "number crunching."

Now, if you find the code and my short explanations horribly tedious, maybe my writing sucks or maybe computer programming is just not your thing. But if you're thinking, "Oh, yeah, variables, inputs, loops, assignment statements, expressions, outputs! That's how those programs work!" well, you should buy a book or sign up for a course or something. You might be on your way to a rewarding career.

By the way, programming, like dancing, is a useful skill even if you don't make a career out of it. That leads to my final point. "Geek" has two main meanings. One is: a person who is very enthusiastic and proficient about something. Girls as well as guys can be that kind of positive geek. The other kind of geek is a person who is technically proficient and even obsessed with something, but who has, to put it politely, a somewhat underdeveloped personality. Simply knowing how to write computer programs does not make you or anyone that kind of geek.

Any readers with questions or comments can follow me on Twitter: 1069rhythm

Copyright © 2014

To link to this article, try copying and pasting:

<a href="http://m3peeps.org/04/hglcp.htm">Hey, Girls! Learn Computer Programming!</a>

Contact Information

[Go to m3peeps.org main index page]