Showing posts with label pascal. Show all posts
Showing posts with label pascal. Show all posts

Friday, 22 July 2011

Misfits of Science

University was a bit of a shock. I had a very heavy courseload in first year... more contact hours than I had in my last year of high school... and it fell to me to make sure that all of the prac classes and tutorials I would have to attend were timetabled correctly. I didn't actually know what a 'tutorial' was, and I wasn't much interested in finding out.

The other thing was the maths.

I had never enjoyed maths, but I was good at it. At High School, maths was one of my best subjects, at least in terms of grades. But apparently the university wasn't happy with the standard of maths from incoming students, and we were all subjected to a preliminary test before the first term began to prove our competence. And it was just as well. I scored 12 out of 15 on the test, but all three of the questions I got wrong were all the advanced trigonometry questions. My class at high school had done a different unit when others had done trig, and I hadn't learned any of the advanced stuff. So, on top of the heavy courseload, during first term I had to take extra classes in high school level trigonometry. But it paid off: when I resat the trig test and my marks went from 0 to 100%.

But all the classes were dull. They were teaching Pascal, which I was already bored with, and I didn't learn much in the first semester. My most difficult class was Deductive Logic, administered under the philosophy faculty by a lecturer, Hermann, who was no longer teaching any comp sci because he'd failed most of his students in his subject area in prior years.

Hermann taught us formal reasoning, and it was a lot more difficult than I had expected. They were small classes and I on one occasion fell asleep sitting in the front row, directly in front of him. By then I was starting to perfect the art of only working as hard as I had to, so I got through it with reasonable grades.

I soon found in the following semesters when we took boolean logic in maths and computer science units that I had already covered the material in much greater depth, and those subjects proved easy. A valuable subject, as much as I had disliked it.

But then I pretty much hated everything. I had made a few friends, but I wasn't enjoy  my subjects. I wanted to drop out every single semester. Later in first year we were taught about dynamic memory... pointers... and this was something at least new to me. I quite distinctly remember the a lecturer telling us that pointer arithmetic should be done on paper; it was too difficult to do it in one's head... which any commercial programmer working in a native language (at that time, the vast majority) will tell you is patent bullshit. But it was true that pointers were something many students couldn't master. Pointers, I think, are the first big conceptual leap you need to make in order to become a real programmer.

I did not, at that stage, appreciate that most of the people in my classes would never be able to be effective programmers in the real world: even if they could master the technical aspects, the ability to sit down and solve difficult problems all day long is not one that most people are wired for. For my part, I enjoyed the problem solving and I flat out just liked making things, but I felt like I'd already done all of these things before. I wanted to build Skynet, but nobody else was interested in that. It was data structures and algorithms I mostly already knew, employed in the service of meaningless tasks that had already been solved a thousand times. At the end of the day I was promised a semi-lucrative career maintaining ancient software on obscure hardware that would likely be used only by banks, for exciting banking purposes.

I wanted out, but I didn't really know what else to do.  I made the Dean's list in first year despite my misery. Second year my courseload was lighter. No more maths, no more deductive logic... but the comp sci classes were less interesting. We did a lot of hardware and operating systems subjects, the only one of which interested me was the brief unit we did in assembly programming. For the third time I found myself studying boolean algebra. I was still bored and I still wanted to drop out.

In third year we got to choose subjects. I knew I didn't want to take anything to do with networks; I was terrified that it would lead me to a career as a system administrator. Sysadmin, I reasoned, was the most miserable job in the world. If the network is running fine, nobody notices. If the network goes down... which they frequently did, and do... even if it's no fault of your own... everybody hates you. Not for me. I wanted to get out of university with as little work as possible, so I tried to sign up for a bunch of easy subjects... but those all had Databases as a prerequisite. I signed on for Databases and somehow then found there was no room for the easy subjects. Databases proved to be the second-most useful subject I took, although it was a long way from being my favourite.

I enrolled in COBOL. I wanted to do C++, but, owing to the strange degree I had enrolled in, I didn't have the prerequisite year of C programming. Third year had a lot less contac hours than first, so I went to the C++ lectures anyway. Within two weeks I decided that I had to find a way out of COBOL and into C++. If I learned COBOL there was the horrible possibility I would one day have to program it in the real world. By the same token, I knew that C++ was a viable language. COBOL was for retirees; C++ was for powerful young men. Besides: at that time the only language I was any good with was Pascal, and I knew that there were no careers in that.

I had to get into C++. There was nothing for it but to try it on, and see what I could get away with... but in the end it was no difficulty. The professor had seen me in his lectures and he just signed me into his subject, without even asking if I had the prerequisites. I dropped COBOL as quickly as I could.

This was the single best thing I ever did in my five years at University.

I liked C++. I had a bit to learn, but I was able to pick up most of it out of the book. I knew it would be valuable and I paid attention and that, more than anything, is the basis of my career in software. Naked C++.

The other big challenge of third year was the Software Engineering team project. I wound up on a team with one friend and four strangers. The project itself was dead boring... an inventory management database app... but we divvied up the work and I buried my head in my area, which was the User Interface. I took on board my task and decided to let everybody else get on with their own. This was a bad idea.

For all the time we spent in documentation, we really had no plan for how to integrate all of the pieces, and ground zero for this was my UI. When the time came, and I saw how inconsistent and flat-out terrible my teammates' work was, I had to get up and leave the lab. I wanted to punch someone. Did they have no pride int heir work? What the hell was I going to do with that mess? The team lead had flown off to China to look for a wife. The programmers who'd made the mess had no idea that they'd done anything wrong. That left me and the 'chief coder', Adrian, whose job it had been to oversee everybody else's work and make sure it would all integrate. I'd done my bit; I decided that it was on him.

This was very selfish of me, but I had big projects due in other subjects that the rest of the team did not. I went off to work on those and I left Adrian to it. Luckily, he rose to the occasion. Adrian worked long hours, day and night, and he got it done. He made it all work and I think our project scored better than anybody else's. I felt bad about having left Adrian to all the work and resolved to never do that again... and karma has since paid me back many times over.

I didn't make the Dean's list in third year, but I didn't go to many classes, either. All the same, I completed my degree with good enough marks that they offered me an honours year, which I accepted... and then deferred. I couldn't handle another year on that campus, with those subjects. Computer Science? What does that even mean? We don't say 'physics science' or 'chemistry science' or 'mathematics science'. A computer is a device, it's not a branch of science.

And what exactly had been scientific about my degree, really? What sort of research did we do, what new discoveries were we making? I had taken classes in other science disciplines, and even the 'soft' sciences were more research-oriented than CS. What I'd learned was really a kind of engineering, no matter how my degree was named. Since leaving I have never once had the word 'scientist' in my job title (although I would, for a time, hold the title of Advanced Researcher).

Did I want to be an engineer? Did I want to go and work for a bank? No, I decided.

I wanted to build killer robots.

Monday, 6 June 2011

Unbound

When I was a kid, I wanted to be a mad scientist.

I didn't particularly want to rule the world, or destroy it... I wasn't thinking about my ambitions that deeply. I wanted to make stuff, and the stuff I wanted to make was spaceships and killer robots and  giant lasers and computers that could think. That left me two options: science fiction author or mad scientist.

I had some other ideas, too, but when I turned ten and I was prescribed spectacles my ambitions to become a fighter pilot were dashed, and after some consideration I decided that I would be satisfied with becoming a recreational SCUBA diver if I got to make stuff in my real job.

I think I was eleven when I asked my mother to enrol me in a computer class at the local community centre. One day a week, I got to sit in a room full of Commodore 64s and learn how to program in BASIC. My recollection is hazy, but I think I was the youngest person in the class. The work itself was very low easy: arithmetical operations, reading input from the keyboard and displaying text on the screen, conditionals and gotos. I learned just enough that I could start writing text adventure games in the mode of ZORK and HITCHHIKER'S GUIDE TO THE GALAXY. None of my games went more than four screens deep. In one of the games, you were a Navy SEAL and in order to complete your mission you had to type in, verbatim, "RETURN TO RECCE SPOT, SET DEMOLITION CHARGES AND SWIM BACK TO RENDEZVOUS POINT FOR EXTRACTION."

After I completed the programming course, I enrolled in an electronics unit. You need hardware to build a killer robot, right? Electronics basically consisted of assembling circuits out of a Dick Smith book. It was fun while it lasted, but the interesting circuits always required components I didn't have, and I found it very difficult to be independently creative with what I learned there. I knew what resistors did, but I couldn't understand why they were necessary. Needless to say, none of the  gadgets I tried to invent on my own ever worked. I think even then it was clear that I was a Software guy.

Not too long after that my father decided it was time we owned a computer. I was puzzled as to why, but delighted all the same. With much ceremony, a man arrived at our house to set up our first system: an IBM PC compatible XT, with a 16 colour EGA monitor, 640 KB RAM and a 10MB hard drive. This beast of a machine was powered by an Intel 8088 CPU that could clock up to 10 Mhz in Turbo mode.

Event hough I hadn't been aware of what an IBM PC was prior to that, I loved the machine, which came fully loaded with all kinds of games as well as boring applications like MS Word and Lotus 123 and Paradox, but I was a little disappointed that I couldn't write BASIC programs on it. The command prompt LOOKED like BASIC, but you all you could do was annoying file system stuff there.

I very quickly decided that I wanted to buy an Amstrad PC-1512. It was even then an old machine, much lower spec than the XT, but I wanted another, different computer to play with... and I wanted it to be exclusively mine. why, specifically, the PC-1512? Because it was cheap and I thought I could get one. I have little doubt that my 'fun' with it would expired within a month. I would then have pulled it to pieces and there would have been no hope of ever putting them back together. I think my parents knew this, too. One day I'm going to own a dog named Amstrad, though. Or, maybe, a goldfish.

I eventually discovered that BASIC was an application you could run on any IBM compatible PC, and in fact I had two versions: GWBASIC and BASICA. I wrote some more text adventure games, and I bought a couple of computer magazines which contained source code for various programs. I spent hours typing in that source code, then hours more getting it to work (most were written for Commodore 64 and wouldn't work. Some wouldn't on any platform.) The resulting programs were invariably lame: the fun was all in making them work despite their puzzling use of GOSUB and the annoying REM statements that didn't do anything besides trying to explain what the program did.

The new PC wasn't all wine and roses. We had hard drive trouble and the poor bloke who sold it to us kept  having to come over to the house to try to work out why it had stopped booting properly and to run Spinrite diagnostic software over it, which would take upwards of 12 hours to examine all 10MB. After a while he replaced the drive, but that wasn't the end of the trouble... because I was now taking an active interest in what was broken and what I could do with it. I don't think I realized it, but I was starting to have more fun learning to fix the machine than I was playing games on it. I remember experiencing quite a bit of excitement the first time I ever saw a virus (Bouncy Ball), and in fact I recall waiting long periods of time sitting in front of the computer, waiting to see if it would manifest.

In year 9 I changed high schools, and we were required to take computer classes at the new school, which had a lab equipped with a couple of dozen BBC Microcomputers--even then, these were outrageously obsolete. I can't remember what we learned to do on the machines, but I do remember enjoying several nerd-a-licious hours hacking into other classmates' accounts and finding some very primitive games like Frak! that were loaded onto parts of the new work that I don't think we were meant to be aware of.

In year 11 and 12 we got to choose our classes, and I chose Information Systems. In this class, held in the new PC lab, we were taught to program in Pascal. That was pretty exciting for me. It wasn't much like basic, and I learned many good lessons there about primitive data types and procedural programming. I still have vivid remember the two Info Systems teachers teaming up to demonstrate arrays to us using a classroom method that I can only describe as Interpretative Dance. As a result of our snickering they refused to teach us about pointers, and as a result of that, we never really produced anything much more interesting than the BASIC programs I had written years prior... but, boring as they were, those Pascal programs were more typesafe and better structured.

We learned SQL, as well. I didn't enjoy it much, but it was easy. It wouldn't be until I started my first job that I would come to realize how important it was. My Info Systems class also spent some time learning a 4GL, but I don't remember which one. I don't remember anything else about it at all, other than that I hated it.

There were no programming tasks in any of the Information Systems exams, and I don't believe there were many in the assessable assignments, either. The subject was easy, but it quickly became a huge drag. I preferred English, Art and Chemistry, which were more more fun or more challenging. I wanted to make stuff, and the stuff I was making in Info Systems was boring. I took mathematics, to, and although I disliked it I was also more interested in it. In my marks it came second only to English.

By this time, if you asked me what I wanted to do when I grew up (I was in year 12, and the question was  frequent), I would have told you that I didn't know. 'Computer programmer' was still on the list, and I did attend the open days of various university computing departments, but by now I was beginning to think that I should be a painter. Or a sculptor. When it came time to choose a set of University degrees to apply for I spent a lot of time making a list, because Mad Science wasn't on offer anywhere that I could see. The result was probably one of the stranger lists that a student with decent marks submitted to the state assessment board. Computer science was on there, but I also applied for a number of fine arts programs. And straight science. And an obscure program in the Medical faculty.

Our results were published, and I did pretty well, without setting any records. I had aimed for what I thought was the maximum score required for any of the subjects on my list, and I beat it by a small margin... but the medical degree went up a slightly bigger one. The program I was enrolled in was one that would see me graduate as an Art Teacher, and the entry criteria were low.

I spent about ten minutes thinking about this before I decided that I did not want to be a teacher of any sort. I'd spent 12 years at school following three years of kindergarten, and I had at least another 3 years of University ahead of me... that was more than enough time spent in educational institutions. Besides, I remembered how we treated the Art teachers.

I changed to a different degree at a different University. This one had not been on my list of preferences at all, and I'm still not sure why I suddenly liked the idea of it... but my marks were more than sufficient to get me into the course and it seemed like a good idea at the time. Computer Science constituted about half of the coursework, with the rest from psychology, logic, philosophy and linguistics. I really had no interest in these latter subjects, but I guess I was hoping that all of them in conjunction would lead to some kind of mad science.

It never did, although there were many times coming during which I would, indeed, question my sanity.