Qbasicnews.com

Full Version: Couple Questions on Programmers In General
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
I don't know where to put this, and forgive me if I sound emo.

1. What makes a good programmer? I've heard a lot of "Well, you have to have good math skills" and "you should know how to structure your code correctly," but what really makes the good programmer tick? I assume it's having the willingness to take the time and effort to program perfect executables.

2. At what point does a person deserve to call himself/herself a "programmer?" I mean, you can't spend just five minutes in C++ and call yourself a programmer. That's just arrogance.

3. Do you guys know of any computer-related field that (a) doesn't require a Ph.D in Computer Science and (b) doesn't involve me giving tech support to computer illiterate morons? I wanted to go into game design, but I heard it's too competitive, and considering I'm a chronic procrastinator, I'd never make it. I assumed the software business was the same way.

I don't mean to start a flame war, and I apologize for posting this in the wrong thread. The reason I say this is because (as of now) I feel I don't have the mental, emotional, or physical capacity to improve my skills on programming. I automatically avoid complex languages like C++ because they're too hard and confusing, and on the same terms, I stick with ASCII graphics because 2D and 3D are too difficult to impliment.

I also suffer from "programmer's envy" where I end up comparing my skills to someone who is more advanced than I am, making me feel inadequate. Anyone else suffer from that?
Quote:1. What makes a good programmer? I've heard a lot of "Well, you have to have good math skills" and "you should know how to structure your code correctly," but what really makes the good programmer tick? I assume it's having the willingness to take the time and effort to program perfect executables.

2. At what point does a person deserve to call himself/herself a "programmer?" I mean, you can't spend just five minutes in C++ and call yourself a programmer. That's just arrogance.

3. Do you guys know of any computer-related field that (a) doesn't require a Ph.D in Computer Science and (b) doesn't involve me giving tech support to computer illiterate morons? I wanted to go into game design, but I heard it's too competitive, and considering I'm a chronic procrastinator, I'd never make it. I assumed the software business was the same way.

1. No executable is EVER perfect (except maybe Hello, world), so your assumption is wrong. To me, a "good programmer" is one who has the experience, intelligence, and knowledge to, within reasonable limits (such as time, limits of the programming language, etc.), solve just about any programming task thrown at them, without resorting to any copy-and-pasting.

2. In my opinion, a person deserves to call themselves a programmer when they can not only write code but understand it as well. For instance, if somebody wrote the most powerful game engine ever created, but the person doesn't understand even a line of what they wrote, and they just copied stuff off the internet or from books and lumped it together, I would not consider that somebody a programmer. On the other hand, if the code is pretty much all their own, then I would consider them to be a programmer. Basically, it comes down to understanding what the hell you're doing and what the computer is doing, not be able to write code.

3. Well, you only need about a BS in Computer Science to get into most game studios as a game programmer (I did my research about a month ago, so that information isn't outdated yet). Where did you get this idea about Ph.Ds? Also, from what I've heard, the industry is only really competitive if you're a DESIGNER, and not a PROGRAMMER.

I'm a chronic procrastinator myself, especially when it comes to schoolwork. The key to overcoming chronic procrastination is to find something you really like (for me, it was programming and sailing) and just figuring out a way to do it for a living. Not that I've actually started yet, since I'm still in high school, but I already know what I want to do, and since I'm already a programmer, I'm well on my way to get there.

Okay, so maybe that doesn't solve the immediate procrastination issue. What I sometimes do is try to relate the assignment to a particular programming goal that I have in mind, sort of like "oh, I need to learn x in foo subject at school in order to be able to understand and do y in my programming project bar. That doesn't always work, so sometimes you just have to suck it up and eat your way through the procrastination.

Also, if you're ever suffering from "programmer's envy", then just remember: somewhere out there, there is somebody a hell of a lot worse than you. Tongue Also, if you're overcome by this "envy", then I suggest trying to learn from what they did. If possible, get the source code and study it for yourself. If that proves to be illogical or impossible, then try to think of ways that you could do what the other programmer did. If you can't think of a way, then suck up to them and see if they can get you to tell them. If you can... then more power to you, because if you can get it working yourself, you can improve on it and show the other guy up.
Quote:1. What makes a good programmer? I've heard a lot of "Well, you have to have good math skills" and "you should know how to structure your code correctly," but what really makes the good programmer tick? I assume it's having the willingness to take the time and effort to program perfect executables.
Willingness to code, experience, good structure, understanding of the approach you should take towards what you're programming, and the skills to do it.

Good programmers can think in computers kinda like they would in their native language. It's sorta the same way how all physicists will think in their native language, but be able to keep it in proportions with the math and science involved in their thoughts.

Quote:2. At what point does a person deserve to call himself/herself a "programmer?" I mean, you can't spend just five minutes in C++ and call yourself a programmer. That's just arrogance.
IMO, when you can code, understand, and have coded programs. You are not a programmer IMO if you no longer have this capability.
Quote:3. Do you guys know of any computer-related field that (a) doesn't require a Ph.D in Computer Science and (b) doesn't involve me giving tech support to computer illiterate morons? I wanted to go into game design, but I heard it's too competitive, and considering I'm a chronic procrastinator, I'd never make it. I assumed the software business was the same way.

Dude, you never have to do it all in the real business, unless you're a top position in programming. You get a job doing coding, graphics, blah blah blah. NOT ALL OF IT! You can get into gaming and leave all the complex competitive stuff to your bosses.

It should be mentioned that most businesses look more towards experience, not a degree, in programming. I'd still work towards a degree in CS if you were in the business...Depends on how long you want to stay in it and if you like sitting in a 3 x 3 cubicle.

You may want to start your own independent software business. It won't start out good, but if you have a job on the side it should work out just fine.

Quote:I automatically avoid complex languages like C++ because they're too hard and confusing
C and C++ is actually pretty close to BASIC Big Grin

Quote:I stick with ASCII graphics because 2D and 3D are too difficult to impliment.
Code it for sprites, have someone else draw them.

Quote:I also suffer from "programmer's envy" where I end up comparing my skills to someone who is more advanced than I am, making me feel inadequate. Anyone else suffer from that?
You have to realize sometimes the advanced things that people know in programming were learned one really small step at a time. One command and it's uses and so-forth.

If I compared my skills to everyone else all the time and stopped programming because of it, what's the point of comparing my skills at all?
People always talk about the technical aspects of coding, and of course they are important. But there's also a huge creative element, using your own ideas to come up with solutions to tasks, and thinking up different and better ways of doing thing; the computer is my theatre, I'm the director, and if I don't like the perfomance then I'll be changing the script! This is the side of coding I enjoy, personally I hate maths and equations and all that stuff - but I'm still a professional programmer, and get paid for coding.

Careerwise, Microsoft's .NET is a very lucratic field to get involved with right now, especially since the v2.0 release. There's a whole range of languages you can use with the framework,and VB.NET is as good a place to start as any. The language has it's roots in QB, and it's interesting to see some legacy features it still carries over.
You're not going to have any chance at all of getting into the industry if you don't at least know C++. That's the dominant language for the games field right now, and I don't forsee it changing for at least half a decade, because it has such a huge codebase.

C++ isn't actually that difficult and confusing if you take it slow. C++ is only as complex as you make it. The language and it's syntax itself is fairly easy to learn. It's learning how to use the language that takes practice. If you're ever stuck on something that isn't homework, or you don't understand a particular concept, just post on a webforum somewhere.

Okay, maybe there's a couple of things that a lot of people have trouble with in C; pointers, for example. A lot of people just can't seem to wrap their head around them, and thus stay away from C/C++ because of that. Personally, I had no difficulty understanding what pointers were or their syntax, and some people are like that; it was where and when to use them that was trickier to figure out.

Addendum to my past post: IMO a programmer is somebody who doesn't need to translate from their native language to a programming language when they sit down to write code. They can just think of how it would work, and then write the code. The best programmers IMO can literaly think in their chosen programming language. Since FreeBASIC and C are so close to each other structurally and paragdim-wise, thinking in one is pretty close to thinking in the other. Thinking in C++ is somewhat different, but it's not TOO different.


On a more immediate note, what about C++ seems confusing to you?
Quote:I also suffer from "programmer's envy" where I end up comparing my skills to someone who is more advanced than I am, making me feel inadequate. Anyone else suffer from that?
Yes, and in general it's a Good Thing because

1. unlike many programmers, who think that their code is divinely inspired, you're not living a lie

2. the feeling of inadequacy can push you to more study and practice, and combined with your knowledge of what you don't know, can help you set realistic goals for yourself.

Granted, inadequacy is probably not the most healthy of motivations to get you to learn more, but it can be a strong one. Remember, programming is an art as well as a science, but like all sciences, can be learned in a very straightforward and mechanical way. That's the bad part about "programming envy": it turns the ladder into a mountain, and it hides all of the steps necessary to reach the top. (there is no top, btw) So, here are some tips to try and avoid the envy:

a) look forward to talking with other programmers, especially those that are more experienced than you. think of it as an opportunity, not a competition.

b) set some long-term goals for your studies, but only focus on what's there in the short-term (1-2 months). this will not only help turn the mountain back into a ladder, but make learning more fun (since you're not constantly thinking "but even when I learn this, I still have to learn ...").

c) constantly start very small projects you know you can finish in a short time (1-2 weeks). this gives you that much needed holy-grail of programming; satisfaction of the completed project. plus it allows you to try out the new skills you're learning, reinforcing them in your little brain Wink

d) Never sit down to write code without a plan (drawing it out first). You may be able to think in your programming language, but for anything more than the smallest of projects (< 750 LOC) you're just wasting time, and potentially screwing yourself by painting yourself in a corner because you failed to think ahead. It's a horrible feeling to realise that you're stuck in a crappy design, and that it could have been avoided. Always draw your design out before you touch your keyboard. You'll thank me later.

Well, d) is more of a general guideline to follow. It won't help you with the envy, but do it anyway. (I'm stressing it because it's one of the most important skills you will learn as a programmer)
@thegrogen:

When I said "perfect executables" I was being generic. I should've said "well-thought out programs almost free of bugs" or something. And I was exaggerating when I mentioned Ph.Ds I'm not planning on going into something difficult like computer engineering, so to prevent people from offering me that route I made the exaggeration.

Also, I DO plan on learning C++. I'm going to take a introductory community college class next semester. It's just at first sight C++ seems like a daunting task, and, from my standpoint right now, all these people talking about obscure stuff like memory allocation and pointers and how easy it is to screw up your computer with C++ kind of turns me off of C++.

However, I did get a book on C for Christmas and I've been trying to learn that, but end up using FreeBASIC most of the time. Every once in a while I skim through the book and the only thing that escapes me as of now is pointers. I mean, what's the point (no pun intended) of them? You can point foo to bar and give them the same memory slot, but what does that really do? And I've heard that the misuse of pointers can mess up your computer.

As of now, anyway, the entire concept of C++ confuses me, and lurking around the GameDev forums does little to alleviate that. Some people say you should start with C++ first, other people say take it slow, other people say screw it, use something else. So far I've decided to go my own pace and ignore what they say.

I appreciate the help, though. Thanks.
Quote:... from my standpoint right now, all these people talking about obscure stuff like memory allocation and pointers and how easy it is to screw up your computer with C++ kind of turns me off of C++.
That seems like a misinformed attitude to have. FreeBASIC has as much memory allocation as C or C++ does (C++ does most of it for you, too, as opposed to FB or C where you have to worry about those things yourself).

Quote:I did get a book on C for Christmas and I've been trying to learn that, but end up using FreeBASIC most of the time. Every once in a while I skim through the book and the only thing that escapes me as of now is pointers.
You'll get the hang of pointers, but only if you practice. Which means more than skimming through a book. If you want to learn C, use C, not FreeBASIC. Same goes with C++. It can be hard learning a new language - and you need to break that barrier. Exclusive use of that language is one way to do it.

Quote:So far I've decided to go my own pace and ignore what they say.
Good on ya. If you're taking an intro course in C++ shortly, I would put C on the backburner for a while. Learning C and C++ together is going to confuse you, and introduce bad habits into both languages. If you're serious about learning C++, you need to get some good books. gamedev.net has most of the material essential for a beginning c++ programmer. Get some books, do every excerise for every chapter, and in a few months you should be quite far along.
Quote:@thegrogen:
I mean, what's the point (no pun intended) of them? You can point foo to bar and give them the same memory slot, but what does that really do? And I've heard that the misuse of pointers can mess up your computer.

Note: the following is probably going to confuse you. If, however, you are curious as to why we use pointers, read on...

Essentially, as you probably already know, a pointer is a variable that contains the memory address of another variable. This means that a pointer is really a 4-byte long integer that contains the memory address of a certain place in RAM (in most cases, a variable). A pointer is sort of like a street address; a street address refers to where the house is located, not what it contains. Likewise, a pointer refers to where in memory something is, and not what it contains. That's why if you try to use a pointer like a normal variable, it will just point to something else and you'll end up accessing the wrong data. It would be like giving your mailman the address of somebody and then changing it right before he leaves; the package would go to the wrong place. It's the same way with pointers and memory, the pointer is the mailman, and the memory is the house he's delivering mail to.

The thing it's used for most is dynamic memory allocation.Let's say you are writing an RTS game, and you want to create a new unit. This comes in handy, because all you do is make a new pointer and allocate some memory for it. If you used a normal variable, that memory would be there from the start, and not only would your executable be bigger but you would have a limit as to how many units you can create, and the game would be slow. Have you ever noticed how slow an RTS game can get when there is a lot of units in the game at once? If you didn't have dynamic memory allocation, it would be slow ALL THE TIME instead of SOME OF THE TIME. That's one place pointers come in handy.

Another usage is passing parameters to functions. For example, let's say you're passing a very large variable (say, around 16 bytes) to a function. If you passed all 16 bytes to the function, it would be a lot slower, because under the hood the program would be copying those 16 bytes into 2 or 3 places when you call the function. A pointer, on the other hand is 4 bytes, so already your function is 4 times faster.

Another thing that pointers are essential for is accessing video memory, which you might have to do when you get into graphics (not necessarily, though). In this case, the pointer points to a pixel on the screen, and writing data to that address essentially puts a pixel onto the screen. It's more complicated than that, but that's the best way that I can explain it.

A misuse of pointers can only screw up your program if you are using a modern OS. If you're using Win9x, then it might bluescreen or something, but that's about it. You're not going to damage the hardware by using pointers, and it's almost impossible to do any damage to the OS or other programs by using pointers.

I hope that helped you out, this stuff is important for almost everyone to know. It's good that you've decided to work at your own pace; work any faster and you won't learn anything very well.

Anonymous

yeah, good words from the posts here, also let me reassert that YOU'RE NOT gonna mess up your computer by missing pointers ;p windows will catch it. i have NEVER recieved a bluescreen from an fb program, and i have f***ed up pointers more times than you have used them ;P

i wrote you a lil code =)


Code:
Dim As Integer Ptr int_array
Dim As Integer i

'/'
'    CAllocate wants the number of BYTES.
'    since there are 4 bytes in an Integer,
'    Len( Integer ) will return 4. 4 * 20
'    will give 80 bytes, the mem required to
'    hold 20 Integer variables
''/
int_array = Allocate( Len( Integer ) * 20 )

'/'
'    now we access it just like an array,
'    except, we use [] instead of ().
'  
''/

For i = 0 To 19
'' 20 total, 0 counts as the first one.

  int_array[i] = 20 - i
  
Next

For i = 0 To 19
  Print int_array[i]; "  ";

Next


'/'
'    now comes the juice. with pointers,
'    the memory you allocate is dynamic.
'    that means that the memory isn't given
'    until you run your program, and it executes
'    the CAllocate() command. we can get as much
'    as Windows (or other OS) can give us!
'
'    Let's try 20,000 integers.
'  
''/

int_array = Reallocate( int_array, Len( Integer ) * 20000 )

'/'
'
'    When you ReAllocate, or plain Allocate, the
'    memory returned is *completely random*.
'    Your memory sits around in RAM, and it
'    isn't always cleared after it's used!
'    so you could get anything! make sure you
'    set every single one. One day you'll learn
'    about a handy function called MemSet ;)
'  
''/


For i = 0 To 19999

  int_array[i] = 20000 - i

Next

Print "That finished quickly, didn't it??? :o"

'/'
'
'    ALWAYS deallocate any pointer you CAllocate, or Allocate. Always.
'  
''/

Deallocate( int_array )


int_array = CAllocate( Len( Integer ) * 10 )


'/'
'
'    Now to show you what happens when you go
'    out of bounds of a pointer you allocated.
'    I Promise this isn't going to cause damage
'    ;) this application will crash, however.
'    
'    10 integers, it'll go past that very quickly.
'  
''/
i = 0
Do
  
  ? int_array[i]; "  ";
  i += 100
  
Loop
Pages: 1 2