Friday, July 27, 2007
Project Pages - Powerwheels Robots
Monday, July 16, 2007
The Dearly Departed: My Poor Bicycle
This morning I awoke (at noon) to find my bicycle stolen. Ack! That's what I get for using a cheap Walmart chain to secure a valuable item. The thieves didn't even have to cut it; they just pulled and the traitorous links separated without protest. They left the chain, broken, on the ground.That's my brother riding it in this picture. It was a 1962 Huffy; an English bicycle with a 3-speed hub. Completely irreplaceable - a collector's item these days. I liked it because I hate dérailleurs; with a 3-speed hub there's no chain derailing and you can change gears at any time, even at a dead stop. Despite half a century of age and neglect, the bicycle was in perfect working order. It had brand-new tires and I'd just installed all new cables.
I actually noticed the chain out of place a second before I put two and two together: "Hmmm... If I'm holding the chain... and the chain is broken... and it was on my bicycle last night... and today it was on the ground... Holy Crap! WHERE'S ME BICYCLE?"
It's a strange feeling one gets at this moment of realization. It reminded me of when I was three and let go of my balloon on accident. As I watched it disappear into the sky, I somehow understood that there was nothing that could be done to retrieve it. Something ought to be done - yet nothing could be done.
You let go of your balloon - it goes up and away. Simple physics. You leave your bicycle chained outside in a neighborhood of juvenile delinquents - it gets vandalized. Cause and effect.
Wednesday, July 11, 2007
An Opinionated Review of the Orlando Presentations
But it's more fun to attack the bad ones.
By far the worst presentation I saw was blue text on a lime green background. In ALL CAPS. Incredible. It was so bad, I couldn't look away. It was like a cheesy horror movie. I can't remember at all what the research was about, but I was so fascinated by the abomination that I just had to make a spoof of it. See it for yourself.
Oh but it wasn't just the slides; his presentation style was... unique. Picture this: this guy loads his slides up on the projector and you can tell from his title page that it's going to be a terrible presentation. He steps out in front of the crowd, and says... nothing. He looks at us through round coke-bottle glasses a gives that deer-in-the-headlights look that only public speaking can inspire. (Did you know some people fear public speaking more than death?)
So this poor guy steps out and just looks at us for two minutes and I'm thinking, poor fellow, he's going to die of pure fright right there in front of me. When he finally spoke it was barely more than a mumble through the whole presentation.
A different presentation that struck me as funny was not bad in the usual sense, in fact it was a polished presentation and the speaker was well-practiced. Problem was, it didn't look like a research talk. It looked like a coporate motivational presentation. Straight out of Dilbert. "In order to maximize your profits, you want to minimize your costs and maximize your revenues!" Complete with a histrogram showing costs that are down and revenues that are up, but the chart doesn't mean anything because there is no Y-axis and no units! It was also full of motivationally meaningless phrases like, "The future is tomorrow's now!" and "Today is yesterday's tomorrow!"
That presentation was supposedly about data mining - stick to your subject, please!
Another presentation was about the effectiveness of a new teaching method. This was a good presentation but here I consider the work itself questionable. The researcher gave a pre-test to a student on a subject they were doing badly in, spent one hour tutoring the student, and then administered a post test. Naturally the students did better. Based on this data, the researcher declared the teaching method a resounding success.
Wait, no way. How is this science? Setting aside the issue that he has hand selected his subjects (it is not random) the form of the experiment is also bad. He has an experiment with a variable but no control. I suppose he thinks the pre-test is a control. That's not a control, it's your baseline for your measurements. A control would have been to administer the pre-test and post-test with one hour in between in which you did nothing. Or to compare it to doing the pre-test and post-test with a different tutoring method for one hour. Only then can you get a real comparative analysis.
I told the presenter I personally liked his teaching method, but I can't consider it objectively if he doesn't compare it to anything else. He said that in all of the previous literature, the other researchers in this field are doing what he does - comparing pre-test and post-test only for their own method.
In other words, it's ok because everyone is doing it.
(How much science would a scientist chuck if a scientist could chuck science?)
Some other things I found hilariously bad in other presentations:
- Slide transitions that make it take ten seconds for everything to finish. The speaker is trying to make her point but words are flying around like helicopters.
- Talking with your hands in your pockets. Good: you don't wave your hands around like a madman. Bad: Makes you look sheepish. "Ah gee shucks Mr. Wilson, I didn't mean nuthin' by it."
- Getting defensive over questions. The moment you get defensive, you've lost all credibility with the audience.
Tuesday, July 10, 2007
Paranoia and Computer Science in Orlando
There is something odd about this conference.
I showed up Monday morning bright and early to check in for the conference right on time. I arrived to find nothing set up, and a sole conference organizer surrounded by unopened boxes. He told me "it was hot" so he "didn't feel like unpacking the registration materials." Come back later, he said.
It was on my way out of the room that I noticed the conference sign was written in magic marker. Like a lemonade stand.
To kill time I ate a continental breakfast in the hotel diner. Everything was stale. Usually continental breakfasts - especially at conferences - are complimentary; this one cost $4.70.
I was more concerned whether or not there was salmonella on the week-old boiled eggs.
I came back and registered for the conference. If you didn't have a receipt, they gave you a bank account number where you could transfer $ to attend the first day; when you find your receipt, they promised to refund your extra payment. But it was abundantly clear that it was very important that they get payment, and they wouldn't complain if someone wanted to pay twice.
Luckily I had my receipt, and a transcript of an email with Prof. J E which documented that I would be presenting a paper for my colleague. I was never to meet the mysterious JE, but I did get in to the conference with no trouble.
This is my first conference so I didn't know what to expect, but I was sure that I could expect a printed copy of the proceedings - that is, a printed schedule and a book containing all of the papers submitted to the conference. I got no such item. They gave us a CD, with the conference proceedings on it. Ok, this is the 21st century, I can dig this. Paper is dead. Long live digital media! Yet... it seems somehow an insult to hand us a mere CD when we were promised a book. Like they couldn't be bothered to print it out for us. What about a schedule? - they didn't even print that. It is a pain to pull out your laptop every time you want to know what's happening next, and I wanted to circle the talks I wanted to attend. You can't (easily) do this with a PDF.
The conference organizer (J E) did not show up; there was no explanation.
At least the rest of the proceedings began innocently enough. We had a guest speech called Forty Years in the Software Trenches. I love hearing stories about the early days of computing, and this guy's been around since the days of punch cards.
After the speech, BP, the assistant organizer, popped in to say that it was break time, and that there would be free breakfast food during the break times. (I'd just paid for breakfast. D'Oh!) I asked him if we could get our money back if the hotel erroneously charged us - he said, "Next time, if you're not so hungry, you can just wait until break time!"
I took break; what the heck, might as well snack again, since it's free. I loaded my plate with some petrified cinnamon buns and the archeological remains of a danish. "That'll be $4.70" I thought it was free! "No, not this - that. Only that side. The conference organizers only paid for what's on that side." D'Oh!
What was on "that side" of the buffet was: ice water, burnt cookies, and stale tortilla chips. Breakfast of champions, yes?
I considered coffee, but I'd made some in my room this morning. Good thing. A.B., from Tunisia, approached the coffee percolator. A hotel staff physically blocked her, dashing to place his body between her the percolator just as she reached for the spigot. "Can't have that," he said. WTF? "The conference organizers didn't want to pay for you guys to have coffee. So you can't have any. You can only have the ice water or the coke." (A fellow attendee later informed me that even the coke was cut with a great deal of water to make it go farther.)
AB and I sat at the same table and during the break discussed our disappointment in some aspects of the way the conference had been organized. BP, who you will remember was the assistant organizer, asked if he could join our discussion. I felt a little sheepish - had he heard us? - but AB took the opportunity to confront him (tactfully). "No coffee allowed at the coffee break? I never heard of such a thing!" she said. BP said, "No you see, different people have different tastes, yes? And you can't please everyone. So really, we can only give water." Amil said, "Yes, but no coffee? I've been to conferences in many countries, and this is the first I've seen that." BP said, "Yes but you see... in other countries, they are more hospitable. They are not so hospitable in America. So you see we cannot provide coffee."
Huh? That doesn't even make sense.
This wasn't getting anywhere, so I asked him my question: "You know, I was disappointed to not receive any printed proceedings, or a schedule." BP had a justification for everything: "Yes but you see this is better, because this way you can print out just what you want. You can go on the CD, you see, and click click click and get right to the paper you want to see."
Thanks. I know how a document on a CD works.
AB said to him, "Wait, he's got a point! Some of us don't even have our laptops here. How are we supposed to review the papers before the talks? It's not like you provided a PC available for us to use to at least view the CD." BP went on the offensive now: "Well I went to a conference in India and there they told us to bring our own laptops and I am not responsible if you didn't bring your own laptop. So you see it is really your own fault that you don't have your laptop with you." Amil countered, "But the rules for this conference don't say to bring your own computer!" BP had his story and stuck to it: "It is your fault!" he declared, "And as for us providing you a computer to view it on, that is not our fault either, ha ha, it's not like we can force the hotel to provide you with a PC."
Huh? Strange logic, these Indians have.
The content of the presentations varied widely in both quality and topic. There seemed to be no rhyme or reason to the selection criteria for papers.
There is a common scam involving books of poetry, in which gullible young writers are led to believe that their poetry is so good that a publisher wants to include it in their next book. Anyone will be accepted; as long as they buy a copy of the book. The book is expensive.
The basic concept appears over and over - short story contests, the who's who of students, etc. Might someone do that with a conference? Might someone have done that with this research conference? I haven't a bloody clue.
But I do know this: if they had, they would have made $400 - $800 off every person here.
Honestly this conference is not really a scam. It would be better to say that: it borders on scandalous. Hopefully the conference organizers learn to do better next time, and I know all of us attendees have learned an important lesson about being selective where we publish.
Monday, July 9, 2007
Thoughts from the Airport
I’m flying to
Airport security, however, is one of the things I do not enjoy about traveling. The process of checking in through airport security gets more odious and invasive every year. I’ve traveled through many airports while I was in the Marines, but it has been many years since the last time I flew. I wasn’t sure what new pointless rules would have been added in my long hiatus from travel, but I knew to expect a sour experience.
After searching my bag the security guard informs me that my toothpaste, hair crème, and shaving cream are potentially dangerous chemicals and that I will only be allowed to take one of them with me, and in a quantity no greater than 3 ounces. And it has to be in a plastic bag. He kindly offered to escort me back out of security, so that I can go home and retrieve a plastic bag to carry my three ounces of the gel of my choice.
If they are afraid of allowing these things on the plane, why allow 3 ounces of it? Why not just ban it? Nevermind that I can’t imagine what one could do wrong with these. Perhaps they are afraid I will shave the pilot, or give a pretty flight attendant a permanent bad hair day with my hair crème. I can’t even speculate what good the plastic bag does.
Monday, June 18, 2007
That Contest I Didn't Win (But Could Have)
It looks like the judge's choice for the contest winner was the most "believable" entry; it contains code that is strange, but strange in a way that you might actually see in a real project. Perhaps I overshot the mark then. My entry was pervertedly clever, but was a little too strange to be believable. I didn't expect to get the "crowd favorite" award either; that clearly belonged to the OMGOCR calculator. But last I checked, my entry was doing 1 percent worse on the polls than the votes for "None of the above!"
Despite the fact that Alex gave my entry a great write-up, there was quite a bit of material I wrote to him that he had to leave out of his article due to space limitations, and I've obtained his permission to post that material here. (Alex Papadimoulis is editor of www.worsethanfailure.com, the site which held the contest.) I've been too busy to blog for several weeks, but with the contest getting over, I figured I'd better make it snappy with this post before it became old news. Here is the full text of the conversation I had with Alex about my contest entry:
• Where did you grow up and where do you live now? Anything fun/interesting about these locations? Do you have any kids, family, etc?
When I was twelve, my parents moved for the last time. My father got a settlement on his social security disability and bought a tiny house in a very small town in rural western Oklahoma. After a lifetime of wanderlust, he is content to never move again. I emphasize with him; I too am sick to death of moving. But my journey is just beginning.
I could not stay in that small town. If you live in western Oklahoma, you will be a farmer, or a rancher, or work in the oil fields. There was no place for me there. When I was seventeen I joined the Marines for no other reason than to get away from the life I felt trapped in. I did not believe I would ever go to college. Growing up in a family with no money, I was raised to believe that it just wasn't in the cards for me.
I became a Small Computer Systems Specialist in the Marine Corps. I went to school in California and was stationed in Washington, D.C. (I loved D.C!) Working alongside civilians, I came to realize that the only difference between their opportunities and mine was the degree. I liked my job, working with computers, but I did not take well to military life. I also really wanted to be a programmer, but my duties only included network administration. If I went back to school, I could do what I really wanted to do, and be a civilian.
I could have gotten a tuition scholarship on academic merit without having to join the military, but that would not provide money to live on. After I got my honorable discharge, the G.I. Bill money enabled me go to college. I chose a small college (Southwestern Oklahoma State University) because it was close to where my family lives. Since then I've been blessed by many great opportunities. I got an internship writing business software, a summer fellowship doing undergraduate research in machine learning and robotics, and most recently I became the first student from a regional university to get a NASA internship. I also met the love of my life, Melissa, in college. We will be married next year, after I graduate. For the moment I'm living in Norman, Oklahoma, finishing the second summer of my undergraduate research program at the OU.
• When and why did you get into the field of computer programming? What college/university did you attend (if any)?
It wasn't until I was twelve that I got my own computer. Someone gave me an Epson QX-10, which was an old 8-bit Z80 machine with 256K of RAM. It was older than DOS; instead, it ran CP/M. To put this in perspective, I was running CP/M on a Z80 while my schoolmates were running Windows 95 on 586 Pentiums. My cousin asked me if my computer was a dinosaur; I told her that it wasn't even that evolved, "more like a trilobyte computer!" I loved it though.
(This topic parallels something I recently wrote in my blog: http://dennisferron.blogspot
Most people get their start in programming by learning BASIC. I've never met anyone else who learned to program in dBASE II. Unlike most 8 bit computers, my Epson did not come with BASIC. It did come with a scattering of business software disks, including the dBASE programmable database software, and a slim, friendly introduction to programming in dBASE script. We're talking a book less than 100 pages and a language that only let you have 80 integer variables - that's all I got. But it rocked my world. As I read about if-statements and loops and variable assignments, I did not so much learn the material as experience divine revelation. I wanted to shout it from the rooftops. I would read about an algorithm and shout, "Aha! Of course! THAT'S how it's done!" Everyone thought I was nuts.
There was literally not a single soul in my small school who was interested in programming, besides me. I learned to rely on myself to overcome problems and answer questions, because there just wasn't anyone else around to ask. You learn to be resourceful that way; a child can shirk responsibilty for hard problems onto the shoulders of an authority figure, but when it came to computers I was the highest authority I had. So if I ran into something I didn't understand how to fix, I went at it like a dog with a bone until I figured it out myself.
dBASE was ultimately too limiting a programming environment to write games on. Just as I was nearing the end of what I could do with dBASE, my uncle built me a 486 machine with Win95 to replace my Epson CP/M machine. On the Windows 95 CD, tucked away in an obscure folder, I found my next great love: QBASIC. If I could not get my friends interested in programming itself, I could get them interested in the games that can be written in QBASIC. It was shortly after discovering QBASIC on my own machine that the realization hit me that not only were the Gorillas and Nibbles games on the school computers written in QBASIC, they came in source code form. I spent countless hours at school hacking those two games which came on the school computers, and my friends actually enjoyed watching me program. I learned the uncommon skill of entertaining an audience while programming, which is something that has helped me immensely whenever I have given code reviews in my professional life today. I also learned to program while explain what I was doing to someone watching over my shoulder, and still to this day I write code as though I have someone watching, trying to understand what I am doing.
Since then I've had a passion for learning every computer language I can. I'm now studying for a bachelor's in Computer Science at Southwestern Oklahoma State University. At the risk of upsetting my professors, I have to say I haven't really learned anything in class that I hadn't already picked up before I came here. But what I have had is the wonderful opportunity to do internships and participate in research activities, and it was through my university that I was enabled to do this. And furthermore I stress the words in class because while I get nothing out of lectures, I have had classes which featured projects we had to do, and I certainly learned things after class while doing those projects.
• What is your job title and where do you work? How long have you been there?
• How long have you been a reader of WTF? Have a favorite article/story? Submit any?
I've never submitted an article, but I've been a long time reader of the site. I seriously thought about submitting this story: a coworker of mine designed a new user interface for submitting data in a grid (a problem which has obviously never been solved before). The grid featured different colors for validated rows depending upon whether they were new, old, canceled, or "uncanceled". (The system had appointments you could cancel or undo cancellation on.) If you hit "OK," the form saves the data. If you hit "Cancel" he wanted it to ask, "Are you sure?" Apparently it was tongue-twister Friday that week because he came up with a slightly different way of phrasing the question. Here's the message box the application brings up if you hit cancel: "The rows which were uncancelled that are now cancelled are highlighted in white. The rows which were cancelled that are now uncancelled are now highlighted in gray. Are you sure you want to cancel the uncancelled rows and/or uncancel the cancelled rows?"
He couldn't understand what I found wrong with that. I told him to say it three times fast.
• What drew you to the OMGWTF contest?
• How did you come up with the idea?
When I saw the calculator contest, I realized it would be fun to try to simulate this situation in C++. Of course the trouble is that under normal circumstances the "petrified values" language I described wouldn't actually be useful. However, for some time I have been aware of the concept of template metaprograms in C++. See, it turns out that C++ templates are so complex that they are actually Turing complete! They can be used as a pure functional, recursive language that "runs" at compile time. Since templates act on types, it should be possible to write C++ templates which perform recursive programmatic functions on types. Instead of passing the value 2 to a normal function, I pass the type Two to a C++ template.
Which brings me to my next point. Although I didn't actually have to use any true template metaprograms in my code (my templates are similar to metaprograms, but not really), when I found out that template metaprograms were possible in C++, it brought a startling and abrupt end to my love affair with C++. You see, the cardinal rule of good software design is to implement the same feature only once. Once I learned of the existence of template metaprograms, I understood that C++ implements two Turing-complete languages. One language runs at run time (normal C++), and it is classified as an imperative language. The other language, templates, runs at compile time but is a pure functional language. Though they are locked in a perverse embrace, the two languages could not be more different from one another. It begs the question, why would you have one language that runs one time only (templates that run at compile time), and another language whose code runs every time? That was how I came to understand that templates are just a poor work-around for the real underlying problem: you only need templates because the static typing is too limiting. A language which uses dynamic types does not need templates because you can do operations on types at run time with the same language you use for other problems.
I could go on but I'll suffice it to say that I designed the calculator to be an example of what I think it wrong with inheritance and static typing, and I also wanted to push the boundaries of what is possible with the C++ language. For instance, in the project I actually invented a new kind of method dispatch which selects base functions by namespace with the aid of templates.
• How long did it take for you to develop?
Me: "Um, it's supposed to be a scheduler, right?"
Boss: "Sure!"
Me: "Well, I don't see any calendar in here, or any code that has to do with calendars or appointments..."
Boss: "Oh, I had them do administrative and maintenance forms until you got here. You know, all the icky support stuff. Don't worry! I have faith in you!"
Two weeks to go and the application had not one line of code that actually dealt with what the app was supposed to do! Egads. In two weeks - I had it done. Didn't sleep for days and my girlfriend thought I disappeared from the Earth, but I shipped it, baby!
(This is the same place I worked where I picked up the moniker Steely Eyed Code Slinger, which I used as the name of my blog. I talk more about what that means in this entry: http://dennisferron.blogspot
• Were you inspired by any WTFs that you encountered in your professional programming?
That does not, however, mean that you can't do badly in every possible facet. My use of classes was narrow and deep (deep inheritance, but few classes at each level). His use of classes was broad and shallow (short inheritance, many classes at a level). The architecture of my calculator takes the worst of both our methods - it uses many more different classes than it should and inherits as deeply as possible. Instead of 1 x Height or Width x 1, a structure that is both deep and broad results a Height x Width rectangle! According to the garbage collector inside the calculator program, instantiating an object of type NinetyNine results in the instantiation of about 2700 other objects.
• What challenges did you face in creating your solution?
• Would you replace calc.exe on Windows with your calculator?
P.S. Let me know if you'd like a WTF sticker.
Thursday, May 24, 2007
Phosphor Green
I spent many months in the cool glow of its green monochrome screen, learning to program. Gosh I loved that computer. At first I used my electronics skills to keep it running, but when it finally deteriorated past the point of my ability to repair it, I am ashamed to say I cannibalized it for parts. Like Shel Silverstein's story of The Giving Tree, where a boy cuts from his favorite childhood tree until all that's left of it is a sad stump, I chopped pieces from the computer to build other projects, until there was nothing left. When I was 12 it seemed impossible that anyone could understand the entire workings of such a complicated device; now at 23, with much greater electronics experience, I look back and realize that I could keep such a simple computer in repair forever, if only I had left it intact. The only thing I still have from it is a 3 inch long piece of black plastic and silicon - the Z-80 CPU that was at the heart of the system.
Nostalgic Apple II owners and Commodore 64 enthusiasts can now download emulators of their old systems, but no one ever made an Epson QX-10 emulator. I suppose it just wasn't a common enough system.
However, while perusing a computer museum site, Dave's Old Computers, I found he has CP/M emulators (scroll to the very bottom of the page). I always thought that a CP/M program would be for CP/M on a QX-10, or CP/M on a Kaypro, etc. In other words, since CP/M runs on many different computers, I assumed that the programs would need to be both written for CP/M and be for that particular type of computer. But it seems that any CP/M computer can run a program for any other CP/M computer, at least as long as both computers use the Z-80 processor. So even though it might not be emulating the QX-10 per se, it seems to run the programs anyhow.
With emulators in hand, I went looking for CP/M software. I found the CP/M Commercial Software Archive, which even has a version of dBASE II, the environment I first learned to program on. I was disappointed that I couldn't find Valdocs in their downloads section. Although it was written years before Microsoft Office was ever thought of, I could do anything with Valdocs that you can do today with Word and Excel, and I often got compliments on how nice my homework assignments looked when I did them with Valdocs. I kept many of my old disks, but in agreement with Murphy's law, it happened that the disks I still have are mostly blank or worthless, while important ones, such as my own copies of the Valdocs disks, are all missing.
There's still a surprising amount of CP/M software around. The Unofficial CP/M Web Site even includes source code downloads. By far the most eyebrow-raising download of all is option to download the entire source code for the CP/M operating system itself! There is also a "mostly finished" version 3 of CP/M which was being written for the Motorola 68000 processor. The nice thing about this version is that the source code is in C, so it could be compiled for something other than the 68000 as well; one of these days I would like to try taking that C code and porting it to another computer. That would be fun.