Jump to content

  • Log In with Google      Sign In   
  • Create Account


Are some people not cut out for programming?


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
35 replies to this topic

#1 rAm_y_   Members   -  Reputation: 273

Like
5Likes
Like

Posted 11 March 2014 - 07:51 AM

So I decided to write a c++ parser, lots of string manipulation, plenty of substr's and find_first_of \n \t \f et al.

 

I was up to about 500 lines of code, with quite a few functions such as trim and various splitting functions, tailored for certain situations such as if you are parsing pre-processor  directives you can have whitespace after the # to the directives keyword, such as '#323232include', all this has to be taken care of, so many little situations like this that the code just bloats up and this is just for comments and macro and only just checking that a PP directive is found and is valid never mind actually checking if the statement itself is valid.

 

Then I decide to load up all the gcc source and look at the lexical and parser sections and apart from the horrendous notation in gcc, you can see right away that it is in a different ballpark, the code and comments show this, making my code look like script kiddies JavaScript.

 

I also load up the NASM source, which is nicely written code, but, and even though it is a full compiler/assembler and the parser parts are only a fraction overall, it's obvious that I am a long way away from the understanding and coding efficiency that these guys have. I also see that Boost has a lexical analyzer and parser, part of their Spirit library, which again, after reading through a bit of it seems so far from what I am doing, they have a complete academic understanding and design of parsing, tokenizing and validation of source code.

 

Quite demoralizing I must say, I would make a good scripter I think, but I do wonder if I am cut out for this, and if I will ever progress to the levels of this compiler source I am talking about. Is it mainly practise and hard work or are some people just born to code at these high levels?

 

 



Sponsor:

#2 RobTheBloke   Crossbones+   -  Reputation: 2295

Like
16Likes
Like

Posted 11 March 2014 - 08:05 AM

The way you become 'good' is by:

  1. Coming up with a 'good design' you think will work.
  2. implement the code.
  3. Ship the result
  4. Spend the next 6 months fixing all the terrible flaws in your 'good design'

No one is born a software engineer, it's just something you get better at with experience....



#3 Karsten_   Members   -  Reputation: 1448

Like
2Likes
Like

Posted 11 March 2014 - 08:29 AM

If you want to go into language parsers in a big way, the "dragon" book will be a great asset.

http://dragonbook.stanford.edu/lecture-notes.html

Also, perhaps you might want to have a look at a slightly simpler implementation of a C (not C++) parser.

http://code.google.com/p/picoc/source/browse/trunk/parse.c

More than likely not as robust but since you are probably a games developer and want to make games rather than language parsers, it might be a better starting reference.

Mutiny - Open-source C++ Unity re-implementation.
Defile of Eden 2 - FreeBSD and OpenBSD binaries of our latest game.


#4 Olof Hedman   Crossbones+   -  Reputation: 2647

Like
19Likes
Like

Posted 11 March 2014 - 08:43 AM

It's also a good idea to NOT compare the code you've worked on for a few days/weeks as your first attempt at a solution, with code worked on by dozens of experts for many man-years, not counting the hours they spend on similar problems, and writing scientific papers about it.

 

It's like you would compare yourself with olympic runners after your first lap on the track.

 

Getting really good takes lots of time and effort in any field (worth getting really good at)



#5 axefrog   Members   -  Reputation: 273

Like
6Likes
Like

Posted 11 March 2014 - 08:44 AM

So I decided to write a c++ parser, lots of string manipulation, plenty of substr's and find_first_of \n \t \f et al.

How long have you been coding for? I've been at it for over 15 years and I am still improving to this day. Generally speaking, and based only on my limited observations, it takes 5 years to become reasonably competent and 10 years to get past your desire (and failed attempts) to overarchitect things and reinvent wheels, and start to feel really competent. And even at 15 years you'll feel a lot more competent than you did at ten years of experience. Best advice is to not lose heart, keep coding, do the best you can and accept that you'll have to go through all of the failures, mistakes, different types of development processes, and so forth, in order to truly understand what you're doing and what the implications of any of your decisions will truly mean. Learn by doing and improve with each attempt.


I'm blogging about my journey to learn 3D graphics and game programming: http://nathanridley.com


#6 TheChubu   Crossbones+   -  Reputation: 3698

Like
2Likes
Like

Posted 11 March 2014 - 09:35 AM

It's also a good idea to NOT compare the code you've worked on for a few days/weeks as your first attempt at a solution, with code worked on by dozens of experts for many man-years, not counting the hours they spend on similar problems, and writing scientific papers about it.

This. Seriously this.

 

You're comparing yourself, to one of the oldest and most prominent codebases in Unix world that compiles most of the software out there. Their parser must have been tweaked by hundreds of different coders.

 

Hell, if your code remotely resembled that, you'd probably be a friggin programmer genius.


"I AM ZE EMPRAH OPENGL 3.3 THE CORE, I DEMAND FROM THEE ZE SHADERZ AND MATRIXEZ"

 

My journals: dustArtemis ECS framework and Making a Terrain Generator


#7 rAm_y_   Members   -  Reputation: 273

Like
0Likes
Like

Posted 11 March 2014 - 10:49 AM

 

It's also a good idea to NOT compare the code you've worked on for a few days/weeks as your first attempt at a solution, with code worked on by dozens of experts for many man-years, not counting the hours they spend on similar problems, and writing scientific papers about it.

This. Seriously this.

 

You're comparing yourself, to one of the oldest and most prominent codebases in Unix world that compiles most of the software out there. Their parser must have been tweaked by hundreds of different coders.

 

Hell, if your code remotely resembled that, you'd probably be a friggin programmer genius.

 

 

Good point, I knew plenty of people were working on it and also as it's open source people can post in suggestions/fixes, so in that case it's got a head start, however, I do think you should be able to reproduce similar code of the top of your head. My code works, string manipulation is easy enough, as I said you could do it in java-script, however there was no overall architecture to my design, only to start with the pre-processor directives and work it out from there, start building more and more generic functions. It will be interesting to try and validate a class with multiple inheritance,  

 

I will soldier on.


Edited by rAm_y_, 11 March 2014 - 10:50 AM.


#8 TheChubu   Crossbones+   -  Reputation: 3698

Like
3Likes
Like

Posted 11 March 2014 - 11:18 AM

You're mistaken. As soon as you try bigger applications you realize that, in software development, there are things that just can't be done by a single person. No matter how good you are.

 

Its just the reality of it. Could John Carmack code all of IdTech 5 himself? Could Tim Sweeney code all of UnrealEngine 4 himself? I doubt it.

 

I do recommend one thing, do the things you like, for the rest, there is always a library made by someone who liked to do that particular thing.


"I AM ZE EMPRAH OPENGL 3.3 THE CORE, I DEMAND FROM THEE ZE SHADERZ AND MATRIXEZ"

 

My journals: dustArtemis ECS framework and Making a Terrain Generator


#9 Mussi   Crossbones+   -  Reputation: 1699

Like
6Likes
Like

Posted 11 March 2014 - 11:24 AM

The only people that aren't cut out for programming are the ones that don't enjoy programming. It takes years, dare I say decades, to become an expert programmer. Even then, you'll look at your code and think you could do better. In the end, the best code is code that works.



#10 BHXSpecter   Members   -  Reputation: 1113

Like
3Likes
Like

Posted 11 March 2014 - 11:43 AM

 

Are some people not cut out for programming?

I always catch flak for this, but I truly believe what I'm about to say. 

 

There are some who are naturally good at problem solving, but that is a skill that can be learned over time. That said, I don't believe there is such thing as a naturally gifted programmer or being cut out to be a programmer or not. Every programmer has busted their butts to be where they are and it is extremely bad form to compare your individual projects and tinkerings to that of a large group of programmers working together for hours a day over the course of months and years. It just takes time and dedication to become a programmer and anything you run into that is difficult just requires the drive to learn it and move forward.


Edited by BHXSpecter, 11 March 2014 - 11:50 AM.

"Through vengence I was born.Through war I was trained.Through love I was found. Through death I was released. Through release I was given a purpose."


#11 Aardvajk   Crossbones+   -  Reputation: 5268

Like
2Likes
Like

Posted 11 March 2014 - 01:10 PM

It's all about motivation and persistence. Everything flows from that in my experience.

I'm always baffled by newcomers on here asking people to suggest a project. I've had a zillion things I wanted to do since they gave me a ZX Spectrum.

Clear, focused goals are good, but so is dreaming big as long as you can cope with the let downs of reality.

#12 Durakken   Members   -  Reputation: 501

Like
1Likes
Like

Posted 11 March 2014 - 01:50 PM

Yes... some people are just not cut out for doing certain things.

 

Whether you are or not is another question that only prolonged interaction with you would really be able to determine.

 

If you understand the basics of what you are doing and can do it decently then more than likely you just need practice, but if you don't understand it no matter how much you try or you understand it but after a long time can't get it right, it's more than likely you're not cut out for it...at least at the moment.

 

On top of the above there is also some things out there that you may "know" but until something happens it just won't sink in to the understanding level. And then when something like that, which is usually transformative on more than one area, happens, you might suddenly become cut out for it with some things. This is the case with programming as it is a logic thing, which a lot of people don't get for a long time, and then suddenly get it which causes them to be able to then understand programming better.



#13 Ravyne   Crossbones+   -  Reputation: 6765

Like
4Likes
Like

Posted 11 March 2014 - 01:51 PM

I would say that its true that there are people who just aren't cut out for programming -- just in the same way there are people who aren't cut out to be astronauts, firefighters, theoretical physicists, or professional wrestlers. I know we live in a world where most of us grew up hearing that you could be anything you set your mind to, but its honestly not true. We shouldn't prematurely limit ourselves, or our kids, by telling them all the things they'll never do, but part of growing up is exploring and discovering your aptitudes and where they intersect with your interests, and as we settle into adulthood we ought to have a realistic handle on what we were cut out for. Please don't mistake this attitude for being defeatist, I merely acknowledge that a lifetime of butting one's head against the same wall, just because of some wrong-headed notion that breaking it down is the only way one will ever enjoy their life, is a waste of something really precious. Life is too short to spend it trying to disprove nature.

 

That said, you shouldn't at all expect to code like an old-hand right out of the gate. I'm a careful and involved programmer, but still my own skills are a small candle compared to the shining beacons that some are, and likewise, despite considering myself rather more intelligent that the average person, I would have no expectation of being able to perform surgery next to a great surgeon, or to play basketball next to Michael Jordan.

 

If its something you want to do, don't worry about how you compare to others. As long as you are able to meet your own needs for your craft, and to learn, and to grow, and be satisfied, then great. Take it as far as your natural abilities will take you and push even beyond them. But your boundaries may be such that you simply aren't competitive with those who are more able by nature.

 

In general, the characteristics that make good programmers are the ability to reason logically, attention to detail, the ability to break big problems down into a series of smaller ones, and a tenacious drive to find and squash even minor problems. It would be hard for someone without those traits to become a programmer, and while they are the basis needed, they're also just the tip of the iceberg.

 

To add one last thought though -- C++ is a complex language that is notoriously difficult to parse, mostly owing to its piecemeal, inconsistent nature, and the fact that its grammar is not context-free. Its a huge challenge to undertake, and the fact that you were able to make any significant headway at all would, to me, point out that you are not at all disqualified from becoming a programmer.



#14 Bregma   Crossbones+   -  Reputation: 4757

Like
4Likes
Like

Posted 11 March 2014 - 03:16 PM

I think what you're missing is the fact that computer science is like, say, organic chemistry or civil engineering. Some folks look at a program and say "oh, that's easy, anyone can do that, it's just code", just like some people look at gene sequencing and say "that's easy, I know chemistry; I baked a cake just the other day" or look at a cable-stayed bridge and say "how hard can it be? I built a cool spaceship out of Lego when i was a kid." Basic lexical analysis and parsing is simple once you know and understand Kleene closures and context-free grammars. Computer science bitches: it works.

It's not that those folks aren't cut out for programming, it's that a little knowledge is a dangerous thing.

On the other hand, some people really are not cut out for programming. Take my wife, for instance. Just could not grasp the concept of iteration or aggregate data stores (loops and arrays). Has never needed that knowledge since she tried taking a course in it. Can not program the VCR (kids, that's a kind of linear MP4 player your granparents used for timeshifted entertainment). She's happy.
Stephen M. Webb
Professional Free Software Developer

#15 BHXSpecter   Members   -  Reputation: 1113

Like
1Likes
Like

Posted 11 March 2014 - 07:21 PM


I would say that its true that there are people who just aren't cut out for programming -- just in the same way there are people who aren't cut out to be astronauts, firefighters, theoretical physicists, or professional wrestlers.

From my experience, the only ones not 'cut out for it' are the ones that don't care to begin with.


I know we live in a world where most of us grew up hearing that you could be anything you set your mind to, but its honestly not true.

Yes and no. You can be anything you put your mind to, but you also have to put in the effort to achieve it. To be a wrestler you have to find out where you have to go in order to get the training, then you have to eat right, lift weights, etc. To achieve anything you have to put for the effort to find out what is needed and do it. So in that respect you are right that it isn't true, but if you are willing to put your mind to it, make the effort required to find out what is needed, and the dedication and drive to do what is required.


On the other hand, some people really are not cut out for programming. Take my wife, for instance. Just could not grasp the concept of iteration or aggregate data stores (loops and arrays). Has never needed that knowledge since she tried taking a course in it. Can not program the VCR (kids, that's a kind of linear MP4 player your granparents used for timeshifted entertainment). She's happy.

Again, that doesn't mean she isn't cut out for it. You left out whether she got stuck and just gave up or if she got online and started googling and searching to understand loops and arrays. She may have also been doing it just to see what you liked about it and when it wasn't something that caught her interest she gave up before she ever got to loops and arrays. Programming is like Spanish, the more you use it the more you understand it and since she got stuck and then never used it after that course, I can understand why she never understood it.

 

 As for programming a VCR, that really doesn't prove anything to your point either. For example, my father-in-law knows how to set the DirectTV to record his shows, but doesn't care to do it so I get drafted to do it. 

 

The examples everyone gave doesn't come across as not being cut out to do it. You have to put everything into what you want in order to achieve it. I wanted to be a wrestler, but didn't want to do all the steps required to become one. I learned BASIC in 7th grade and was hooked. I wanted to be a programmer and was told repeatedly I wasn't cut out for it, but I put everything I had into it and programmed every night for 3 to 4 hours and here I am still programming, helping others, and making games for my son. I may not be the greatest programmer or be famous, but my goal was to simply be a game programmer which I achieved because I put my mind to it, was dedicated to learning it, and had the drive to do it even when I was told I'd fail and wasn't cut out for it.


"Through vengence I was born.Through war I was trained.Through love I was found. Through death I was released. Through release I was given a purpose."


#16 Durakken   Members   -  Reputation: 501

Like
1Likes
Like

Posted 11 March 2014 - 07:46 PM

 



I know we live in a world where most of us grew up hearing that you could be anything you set your mind to, but its honestly not true.

Yes and no. You can be anything you put your mind to, but you also have to put in the effort to achieve it. To be a wrestler you have to find out where you have to go in order to get the training, then you have to eat right, lift weights, etc. To achieve anything you have to put for the effort to find out what is needed and do it. So in that respect you are right that it isn't true, but if you are willing to put your mind to it, make the effort required to find out what is needed, and the dedication and drive to do what is required.

 

Sorry to burst your bubble, but that is simply not true. Those who believe that can be said to clearly not have a good understanding of how evolution or biology works. Regardless of how much one works at trying to be some things they simply cannot be that thing in some cases. And in some cases, it is so not possible, that training, no matter how much or how good the training is, they will not be able to do certain things.

 

There are areas where this is more true than others, but I would say, in the realm of programming which is largely logic based and language based this is probably an area that some people will just never get, because we know that if you don't start getting taught a second language before a certain age those brain cells die off, and likewise, logic is really hard for a lot of people. Most people have some instinctual level logic, but most have problems with a lot of the basic of it. Not to mention grammar and writing, themselves, are pretty problematic for a good amount of people.

 

So, with programming you have several skills that quite a number of people don't have, and then medium sized number will have a hard time struggling to attain them at low levels... So I would say that for programming it is especially true that it is the case that there are people who are just not cut out for it.

 

That's ignoring the mental fatigue aspects of it too where you can be incredibly good at it in general, but something about it mentally fatigues you... for example in animation you might be able to produce frames of animation at high quality, faster than average, but if your mind just isn't good at doing roughly the same thing over and over day after day after day you are just as equally not cut out for it as if you didn't have the requisite skills to do it in the first place.



#17 Nypyren   Crossbones+   -  Reputation: 3678

Like
1Likes
Like

Posted 11 March 2014 - 07:48 PM

So I decided to write a c++ parser


Well, there's the reason. That's an EXTREMELY complex undertaking. Not a very good benchmark to judge whether someone's cut out for programming in general.

#18 Tom Sloper   Moderators   -  Reputation: 8642

Like
5Likes
Like

Posted 11 March 2014 - 08:06 PM

Are some people not cut out for programming?

Yes. Some people are not cut out for programming.

Is it mainly practise and hard work or are some people just born to code at these high levels?

Practice and hard work are extremely important. Even people who aren't cut out for programming can program stuff if they buckle down and work hard enough at it.
-- Tom Sloper
Sloperama Productions
Making games fun and getting them done.
www.sloperama.com

Please do not PM me. My email address is easy to find, but note that I do not give private advice.

#19 BHXSpecter   Members   -  Reputation: 1113

Like
1Likes
Like

Posted 12 March 2014 - 12:22 AM


Sorry to burst your bubble, but that is simply not true.

You didn't burst anything. It's my opinion and I stand by what I said no matter what evolution and biology says otherwise.


"Through vengence I was born.Through war I was trained.Through love I was found. Through death I was released. Through release I was given a purpose."


#20 Buster2000   Members   -  Reputation: 1416

Like
1Likes
Like

Posted 12 March 2014 - 02:33 AM

Websites like codeacadamy and the recent week of code tell everybody that anybody can code.  Also since the whole app ecosystem and social got big I know plenty of non-techies who have learnt enough to put out an app / game and make money.

 

However when I went to university there were people on my course who were very technical some of them already had mathematics or physics degrees and they just couldn't get there head around even the simplest of constructs such as a switch statement or an Array and as soon as pointers got introduced they gave up.






Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS