6 Answers
6

Half a year is not a very long time. My advice would be to keep reading books on programming and software development. No matter what language you are using or what kind of programs you are writing, by reading books you are going to find out just how much you do not yet know. Oh, and you will also find out whether the techniques you are using are the onset of style or beginner's mistakes.

That's programming style. For a rookie coder, however, ignorance of variation is certainly a factor. You emulate the style you see, and you probably won't change it around unless you see another structure that you like.

I disagree, I use the second. It makes sense to have all the braces match up. However, both are equally valid.
–
AngryBirdAug 30 '11 at 20:25

Why do we even need braces at all? Let's just use whitespace!
–
IvanAug 30 '11 at 22:47

4

It is not a programming style, it is a code formatting style. IMHO programming style is when, for example, you tend to follow some of the SOLID principles as you write your code (as opposed to re-factoring to them later on).
–
DenAug 31 '11 at 9:10

It depends. Have you tried different styles? Have you ever pondered about the advantages and disadvantages of these habits of yours? Have you read some articles about the techniques and styles you use (there should be quite a lot of them) for inspiration about those advantages and disadvantages?

Habits are only good or bad if you've given the habits actual thought, instead of just copying them from others and assuming they're good. Be critical and think things through, but don't be /too/ critical either and doubt yourself all the time.

When all you have ever used is a hammer, ever problem looks like a nail. Once you have been introduced to a screw driver, you see screws for what they are.

The same thing happens when programming. If all you are exposed to is a certain style of programming, you will naturally develop a tendency to work in that style. As you gain more experience, you will start to see more different styles, particularly ones suited to different problem sets and languages.

Over time, you will eventually start to derive your own style from your experience, but it usually takes a few years solving different problems in different languages.

Right now, I am going to guess you are still walking around with a hammer. In time, you will have a full set of tools and you will really start to have your own style in how you write code, design your software, and even do your work.

Yes, it means that you believe that the code you wrote needs nothing more. When you're going to develop something more complicated, you automatically search after better methods to solve your problem.

Also:

After a while you are going to be tired of writing the same over and over again and you are going to search new methods to do the same faster. When I started scripting in PHP I made everything myself. After a couple of years I was so tired of it that I searched for a solution. This is were frameworks came in.

After using my first framework I had the feeling I could speed up even more, and start searching again and found even a more complicated framework that does even more then the first one.

Moral of my story:

Now after all these years my style improved just by exploring new things and read a lot of books and tutorials and so I developed my "own" style. But this style is continuous changing, this keeps programming a challenge too.

After doing anything for a prolonged period of time, one will eventually a style of his/her own. It is common in programming, it is common in poetry writing ... in anything really.

Were I you, I wouldn't worry about style at this point ... it's useless trying to work on something from which you've no use at all, and it will just seem unnatural, until you figure out for yourself the advantages and disadvantages of some of them. Worry about functionality and how to get things done, ... just write ... if your code is useful, nobody will argue about how it looks (well, maybe some will but don't listen to them ...) - if it's not, nobody will care anyway.