I cheated!

I had heard this kind of story before and was very skeptical. I always said there is another side of the story. Well, now it happened to me. So here is the story...

I had a hard time following the school program. Sitting down, watching a teacher with no confidence talk about things that are supposed to be exciting much was not my idea of learning a new skill. I once read somewhere that the United States education motto is No child left behind. I felt like they were leaving me behind. I came to school to learn the minimum to be propelled into a career where I will be able to grow and never have to worry about bills, grocery price, or rent. But here was my professor talking about "Java or JavaScript", then she gave us code to copy and paste into a dot HTML file. None of this made sense to me.

Years before, when I was on my last year of high school in Cairo, I had taken a couple of programming classes. My father knew I loved technology so he did his best to expose me to it as much as possible. I went to high school in the morning, and in the evening I went to the American University. There I took two classes: Data structure and problem solving using C. These classes were very hard for me because it was in English and I was only fluent in French. I managed to pass and it gave me a good foundation for coding.

Programing using C and JavaScript is very different, but when you have a good foundation in one the other becomes much easier. One day in my JavaScript class, I had a bug that I could not fix. I spent the weekend on it in vain. I deleted the project and started anew only to reproduce the same bug over and over. I had created a link dynamically and every time I would click on it, the whole page would become blank. There were no errors. On the next day of class I told my teacher about my struggles. Imagine asking this question to someone that taught programming and yet still confuses Java and JavaScript. After looking at my code for a while, she went back to her desk, and tried running her teacher's version provided by the book. It worked. I asked, "Can you help me figure out what's wrong with mine?" and to this day I still remember her answer:

Well mine works.


I didn't really know how to respond to that. So she opened the dot js file in TextPad and hit the print button. 200 lines of monospace code wrapping around is neither pretty nor fun to read. This was the most I was going to get out of her. I only ever asked her one question after that: what is the keyword this in JavaScript. The answer deserve its own story, so let's just say I never asked her a question again. In some way I want to say that she helped me. In the sense that she didn't stop me from exploring my own solutions.

Sometimes the best way to find a solution for a bug is to put it aside and comeback later with a fresh mind, and I did just that. When I came back, I narrowed the issue to a smaller part of the code, then a few yahoo searches revealed the problem and I was on my way to the next assignment.

Solution: In case you are wondering what the problem was, using document.write in JavaScript after the document has finished rendering, causes it to overwrite the content. So instead, you can append a new object to the DOM.

This is the mentality I developed eventually:

If you can restructure the problem into a series of simple yes or no questions it is much easier to deal with it. Accumulation of small annoyances will stress you and make you react poorly when facing a challenge.

The next assignments were much easier to deal with. I completed all the exercises from our book in a month and went on to tutor the rest of the class for a modest price per head. At the same time I looked for freelance jobs.

At the end of this class, we had to make a group project. We had to use everything we learned from each chapter. Unfortunately, the rest of the class couldn't finish all the book so the chapter 10, 11, and 12 were not included. But I did. So in our project, I made use of Ajax which was only taught in chapter 12. Using Ajax on a local file system came with its own sets of problems. I didn't understand HTTP status code at the time but I read that you would need a local server running to make use of it correctly. Since all the computers at school are equipped with Visual Studio and IIS I did just that. Our project titled "The Coral Reef" received the highest praises, my teammates and I all got a shiny A.

I liked programming. I didn't care if the teacher was good or bad, because I could just register for a class and learn on my own. So I took a Server Side programming class with C# in the following semester. It was the same teacher. It was much harder, and there was no way in hell I was going to ask her to help me with anything. I learned about server side technologies and practiced on my own. When homework was due, I would just copy and paste code and send it... No I wasn't cheating, she provided the code. I got an A.

So I learned client side and server side programming. For web development, it was all I needed to get started. My financial situation wouldn't even allow me to continue going to school, so I had to be on my way to find real work.

Two years and many gigs after, I worked in a large company. It was a stable job. I knew that every other Friday there would be a paycheck waiting for me.

I learned to write much better and more structured code. Surrounded myself with good mentors that helped me learn more in a shorter timespan. At the same time, I was given space to grow. I worked on projects with no hard dead line. I had the opportunity to write enterprise level tools from scratch. Designed the database schema. Wrote the web server rules. Wrote a caching strategy. Built fancy reports both on the back end and front end. I was the go to guy, for any obscure bug encountered, whether it be on the client-side or server side. It was exciting, even though everyone complained about the low pay, what I learned at this company is simply priceless.

Then came a Monday morning when I got a call from an old classmate. She was still in college and she was an assistant to the old professor. They needed my help regarding our old group project. A couple days later, I received an email from the professor asking me if I could come to one of her class with my final project if possible. I responded with enthusiasms.

On that day I went home and opened up my old code. The project was written and tested on IE6. So naturally I updated a few things to some more modern code. I also updated the Ajax code to work without the need of a web server.

I went to school. The teacher's assistant was also my team mate on the final project. The problem was that the teacher wanted to show her students an example of a working project that they could do for their final. They tried to run my project and they couldn't get it to work. If only she had taken the time to debug it. So instead she had me come in to fix it. IIS was disabled. Instead of trying to fix the code, I pushed my USB drive in and copied the new code. She asked me what was the problem. I explained that the response code for the Ajax request was 0 when you try to make a request on the local file system. For it to match the book I had to use a web server like IIS.

When I said server, she freaked out. She said, students are not allowed to use a server. So you guys cheated.

I laughed and thought, "OK, where are the cameras, you guys got me". There was not a shadow of a smile on her face, she was dead serious. Deep down I knew why she was mad. She was ashamed. She was mad because she wanted to show her student a good working project and she couldn't. She tried to debug it and she couldn't. So to look good in front of her class, she has to blame someone, a student, not her inability to figure out code like any respectable hacker would do.

After all the accusations and threats of taking back our grades, she cooled down and said she will let it pass this time. Her reason was, I helped a lot of students pass her class. So I showed the students the different parts of the projects, how it works and left.

I met the teacher's assistant, later to discuss it. She was more freaked out than me because she would be in more trouble since she was still attending the school. I was just a drop-out. But since we had the teacher's "forgiveness" we were fine.

At work, when I find clever hacks to get something to work I am applauded and in some occasions even given a raise. In school, I used a solution that was only taught in a chapter the teacher didn't get to yet and I was called a cheater. You go figure!

So the verdict is simple. I cheated. I found a clever way, not so clever, to make Ajax calls on my school project.

When I was learning programing in my high school years, the teacher was an experienced programmer. He had real software in the market. He would open his IDE on the projector make modifications and show us the results. You couldn't copy and paste from the book because there was no one universal solution to the problems. Some students would use (n(n+1))/2 to find the some of an array of numbers, while others would use a for loop and add each number. You are free to use the method that makes sense to you. The computer is the machine doing the science and student tells it what to do.

Unfortunately Programming is not really taught in school. If it is, it is viewed as a science. It is not. Programming and computer science are two different things. Most students graduating with a Comp Sci do not necessarily know how to program. I would know, I interviewed and worked with a few of them. Programming is an art. It is the art of solving a problem with code. Programming is not just the code part, like any language it is a also a culture.

So this is my story of how I cheated in school. I have to make a confession though. I cheat everyday. Also, I use other people's code. I don't even ask them. I find it on their website and I take it. I use it at home, at work, or when I teach someone else. I can't stop it and I won't stop it. Every time I meet a new graduate, I tell her to cheat. I tell her to use her creative mind to find a solution to problems. If she can't then she can use Google. Ask a question on Stackoverflow. Find a working solution even if it is unconventional. That is how you learn. That is how you advance in your career. That is how you become a rock star developer.


There are no comments added yet.

Let's hear your thoughts

For my eyes only