Often people are driven to learn the art of computer programming because they have a great new revolutionary idea that they want to create. It may be the next addictive game, killer iPhone App, or amazing web service. They will ask their tech savvy friends what they should learn to achieve their goals. The answers they receive will vary drastically from programming languages and programming paradigms. But in the end most people usually get started on some form of C based language (C/C++/C#, Java, python, etc). The only issue is that the beginning fundamentals of programming never seem to have anything to do with their idea, or how to achieve it. But they are told to persevere, that there is a pot at the end of the rainbow. After time, many give up frustrated. While others do master the fundamentals of the programming language they have been tasked to learn, but still have no idea how to approach making their idea a reality. I find this all too often for budding programmers. There is a huge disconnect between high-level ideas for an application, and code syntax.
For those of you unfamiliar let me define high-level and low-level in a programming sense using a list going from high-level concepts down to low level.
High level
1. Once sentence description of what the product is and does
2. Feature list of the product
3. User requirements for the product
4. Technical requirements for the product
5. Architectural overview of the product
6. UML Diagram of the pieces of the architecture
7. Java/C++/Python code-the actual code- Classes/Functions/methods and algorithms used in the program
8. Assembly/byte code- the compiled or semi compiled product of the code that is the program executing
9. Registers/CPU- the hardware the program is running on
10. Transistors/capacitors/resistors/inductors- the components that make up the hardware
11. Electrons/Protons/Neutrons/Laws of physics- the things that make up everything (you have gone too low level at this point)
Low level
As a new programmer hopefully you will never have to go below level 7 on this list. It is very rare that you ever would. There are some low level programmers I know that can't think above level 7, or even really at it, who are great at what they do. But for the kinds of people I am targeting with this article I intend to ignore everything below level 7.
So lets talk a bit about programming. When you first start learning it you generally are taught the fundamentals of procedural programming; simple variable creation and manipulation, primitive variable data types, standard operators, flow control (if statements and loops), arrays of simple data types. You would hopefully get as far as functions before coming across too much trouble.
Now after learning functions generally there is the first hurdle to overcome for most people, classes. Classes and object oriented programming are pretty fundamental to the way most people program now, but the ideas of creating a blueprint for a data type and of having a variable which owns it own functions and inner variables is often lost on new programmers.
But lets say you overcome those issues and you learn classes and inheritance, polymorphism, interfaces, generics, namespaces, recursion, even lambda functions. You are a master at the fundamentals of programming. But you still can't make that application.
It's understandable. Very rarely in college do you actually put all of the pieces together to make a fully functioning application. More often you are tested on algorithmic problems, and sorting.
You take a class in Computer Graphics hoping to learn how to display a 3d world, get mouse and keyboard input, import animate and make 3d models. Instead they have you rewrite the OpenGL engine. Mind you, you do in the process learn displaying a 3d world and input using OpenGL, but creating importing and animating 3d models properly in a program is still beyond you.
You take a networking course with the hopes of making a waiting room/chat/host joining section of a game that you hoped to make multiplayer. Instead you learn how to send email via SMTP messages, how networks are structured, and how the TCP/IP stack works. You do glean how to set up socket communication between computers, which allows for basic network communication but it's not what you hoped.
Fundamentally the problem is the disconnect between level 7 and levels 2 and 3 in these people's understanding of how to approach their problem. They can write code and understand it, and they know what they want, but they don't know how to design it, or what the right design is for it.
To create a parallel, it is the equivalent of teaching a mechanical engineer how to machine any part, and then asking them to build an internal combustion engine. Or like teaching an electrical engineer how a resistor, transistor, capacitor, inductor, and battery all work, then asking them to build a radio. Needless to say this lack of knowledge can lead to terrible and or innovative designs.
Unfortunately there is no one book or quick remedy that will solve this problem (though looking up books on design patterns will be a big help). My suggestion is if you have an idea, just start doing it, and don't be afraid to start wrong. Find better programmers than yourself and ask them to review your code. You will make some terrible mistakes. Believe me, you should have seen the first time I tried writing a GUI based tic-tac-toe program in Java before I knew how event driven programming worked. You will have times when you have to completely throw out a weeks worth of work and start from scratch because your design was so wrong. But it's ok. Being a bad programmer when you start programming but asking for help and pushing yourself to do better and get it right the next time is infinitely better than being a bad programmer who is afraid to start doing anything because they don't know how.
Subscribe to:
Post Comments (Atom)
Hey Jesse!, you should blog more often. I enjoy reading you :)
ReplyDelete