Sunday, August 25, 2013

The Mind of A Pragmatic Programmer

I have been programming for about four years now, and I still have a long way to go. When I started programming, I never understood how to approach a problem. I thought a programmer just sits behind his computer, and starts typing. When writing a large scale program, it is important to gather all the requirements first. For my senior project, I had to build an ecommerce site. The fictional company was called Taylor's Professional Services. It took me 8 weeks to complete the project. It was a fun project, and challenging at times because of debugging. I knew after spending a total of 80 hours in one week, programming was not just a job, but my passion.

Many spend countless hours trying to master every programming language. Truth is, knowing every language does not make you a better programmer. Understanding the concepts of programming are more important because you use these concepts for the rest of your career. A good programmer understands the problem that needs to be solved. Sometimes users are vague and very ambiguous about what they want. You have to play detective and gather every detail to assist them. Once you understand the problem, you can begin the development process.
 Some developers use a flowcharts to see a visual of how the program should execute. Depending on the size of the project, I use flowcharts. Sometimes I have so many ideas on what to name classes and variables, I have to write a list. Usually, when I am writing object-oriented programs, my class name is a noun, and the methods are verbs. For example, if I have a class name Baseball, I would create methods to perform specific computations. I could have a method called SwingBat(), and it will perform different swing stances depending on the player. Once I have an idea about my class and method names, I create a class diagram.
  My theory is that, you can write any program in any language. To prove this theory, I write my first computer program in every new language I learn. My first computer program was a business calculator. I believe every developer should have that one program engineered in multiple languages. When you engineer your program in multiple languages, it helps you gain confidence using that language. Also, you may discover different paradigms when using different languages.
 Every developer usually has one or two programming languages they are proficient in. I usually use the Java programming language to develop desktop, and mobile applications. For web development, I use the C#.net, MySql, and JavaScript. I encourage every developer to choose a programming language and champion it. Once you master one language, it is easy to learn a second language. Some languages offer certain features that others may not offer. If you find yourself unable to use certain libraries in a particular language, you should build it yourself. This is what I call programming in a language because you are building a library that doesn't exist. For example, java has a math library, but doesn't have a library to perform business calculations. I created a class in Java called Econ.java, and it contains functions to perform computations used in the business world. I can use this class in other programs I build.
 Sometimes it can be very frustrating writing code, especially if the requirements are very vague. I once had to eradicate over 2,000 lines of code. It can be discouraging to spend hours writing lines of code you will never use. If this ever happens, it usually means the project would have failed to meet the requirements. Start from scratch and divide the problem into small modules
 The reason I continue to write software is because I enjoy solving problems. I enjoy having scintillating conversations with other developers, and learning from them. I love the smell and taste of coffee while I try to solve an array of problems. I just simply love to program. If I ever lose the passion of being a programmer, it will be a sad day because I will no longer be a programmer. But, I don't ever see myself losing the passion because there is so much to learn. I will be 90 years old, and still writing code.