QUESTION: Hello Alex,
I am a beginner in programming and my dream is to become a good programmer some day like you guys. I am trying to learn the language C# right now, I am still in high school and I can only make simple programs like calculators or that kind of stuff. I want to ask a professional programmer a few questions that i have been wondering about.
One of the things that i am worried about is that sometimes when i look up in the internet for some code that i have been wondering about, the code seems too complicated for me, like i would never be able to come up with that kind of an idea. I don't like this feeling, is this a normal thing?
The other thing that i wanna know about programmers is - when you get hired by a company or something, what are you doing as programmer? They give you a project and you are work on it all day?
The last thing that i want to know - is C# a good language to start with?
I am looking forward to receiving your reply.
ANSWER: Hi Daniel,
Your question is mostly outside of the scope of this QA section (the QBasic programming language), but I can help you out.
Programming, like engineering and mathematics, has fundamental information (like what is a variable, what is a pointer, etc.), and then information that builds off these fundamental ideas. The things that you want to learn may be more advanced than you think, so don't be discouraged. Learn to take on smaller problems, and solve them. Most larger problems are just a series of smaller ones. For instance, a lot of people get interested in programming to develop games. Games are a very large problem, because you are managing graphics, physics, AI, menus, overlays, story, game models, game mechanics, and a variety of other things specific to the game. These are all smaller problems, but they can be broken down more. For instance, Graphics can be broken down to the SDK/library that you use (like Ogre3d or Unity), and the graphical pipeline that the SDK/library uses (like OpenGL or DirectX). This is why a game can take over a year to develop with a number of people on staff; these problems are not all as simple as they may seem.
So, when you investigate how to do something in C#, you are seeing people solve maybe 5 or 6 smaller problems which then builds on the complexity of their code. If you are just learning, then it's understandable that their code is complex. Most times, when you face this type of code, start googling to see what their code does. If you see a function you don't understand, see if you can discover the problem it is solving. There is nothing wrong with trying to find the answer, because you'll find that some the programming community frowns at people that want to be spoon fed; for example, if you don't understand what function x() does, if you go to a programming forum and ask "what does x() do," people will get frustrated because it should be easy for you to look this information up, so you could be wasting their time, as well as yours. To be a programmer is to be resourceful - find some good tutorials and website documentation, and bookmark them for your own reference. There is no shame in asking something that you don't understand, though, just make sure you demonstrate that you've tried to understand it - people will always be more willing to help you then.
As far as what my work is like, I am a C developer for a small company in Canada where I do software for motorsports. My job also includes working on their PHP website, and offering technical support to customers. We have a long term project for the website that I have been working on for 8 months, and C software that I work on when the website gets slow, or I need to wait on other developers to finish their work.
I'm not a C# developer, so I couldn't exactly say whether or not it is a good starting language. It is a high-level language, meaning that the language itself deals with a lot of lower-level functions, like memory allocation, and hardware communication, so that may be a nice feature, but as a result, you won't be able to easily understand what it is doing for you. I personally started with QBasic, however, that language is now very dated, and may not be a good starting language. Languages like Python, or Ruby, are very practical, but they are scripting languages (meaning they don't get compiled), which may or may not work in your favor (depending on what you want do to as a programmer).
If you have more specific questions, I can probably answer those, too.
---------- FOLLOW-UP ----------
QUESTION: I really appreciate the answer, thank you Alex.
And well, i could ask you one more question if you don't mind.
I am looking forward to going in collage with software engineering after i finish with high school. Should i do that? Some people tell me that it's pointless and some that it's not. Could you tell me what is your opinion?
ANSWER: Hi again Daniel,
I can't speak for every employer, nor every school, but I can give you my opinion of education vs. experience. I did not go to school for software development, and have found that smaller companies were more interested in hiring me than larger corporations. I know many people who have a post-secondary education for software development that were not able to code very well, but larger corporations were willing to hire them.
I think post secondary would give you lots of good opportunities for software development, depending on the school you go to, and what you want to do when you get out of school.
If you are passionate about programming, and willing to learn it outside of your education, then I think you'll be a good programmer, whether or not you have post secondary. Whether or not you go, work on some programming projects, and host them on public code repositories like google code, or github, and that way you can start a bit of a portfolio. Employers will always be interested in code you have written in the past.
I hope that points you in the right direction,
---------- FOLLOW-UP ----------
QUESTION: Well, they how did you learn to code? Is it possible to become a good programmer, like you from youtube and google?
I started programming when I was 14 on a Commodore 64, so by the time I was ready to job hunt when I was done college, I had a lot of programming experience and projects that I could show to employers.
If you want to program, and have the motivation to learn on your own, then yes, you can become a good programmer. Having self-motivation is probably the best thing to have as a programmer, because all problems encountered in programming need to be solved quickly, so relying on a secondary source (like a QA website, or a friend) to solve your programming problem isn't going to work too well beyond a few problems.
I learned through some internet resource, but mostly library books and trial and error. There is nothing wrong with writing bad code if you able to find out why it is bad, and how to fix it. For instance, nearly 80% of my first attempts to solve a programming problem have errors in compiling, syntax, library linking, and everything else you could imagine that could go wrong. The real trick then, is to be able to diagnose the problems that I created and fix them.
There is a joke in the programming world that goes to the tune of "99 bottles of beer on the wall" that goes like this:
99 bugs inside of my code
99 bugs in my code
Fix one up,
Give it a run,
120 bugs inside of my code
Since code can have a lot of self-dependencies, you'll find that if you fix one thing to work a certain way, you will almost certainly break another function that depended on the first function to work the other way.
So, you should read up on the programming language of your choice. If you want to stick with C#, that's okay, there are a lot of good resources. Also, find books on how to debug your code - even if they are meant for different programming languages, because the general principles will almost certainly apply, and you may learn the basics of another programming language, as an added bonus.
I haven't used youtube as a programming resource, but it may help some people. I find them to be too slow, but by the time I was able to use youtube as a resource like that, I was already beyond the beginner level (Which most youtube programming tutorials seem to be geared to). But don't let that discourage you, everyone has differing learning styles, so find what works best for you and learn that way.
I hope that helps,