Posted on

7 Ways to improve your programming ability


Quarter 3 is coming up.

For those of you who haven’t heard, quarter 3 is the dropout quarter. Why is Neumont’s dropout rate 80%?  Third quarter. Why? Because quarter 3 is the end of hand holding. What this basically means is that you’re going to pass or fail based on what you know and how well you implement your ideas.

So this article is about how to be a better programmer:

Understand how everything works

Writing any program is like building a house. You can’t build a house if you don’t know how to use a hammer, and you can’t write a gas calculator if you don’t know how to use ints. You absolutely HAVE to understand how everything in your program works.

Practice writing programs on paper

I really can’t stress this one enough. If you can’t program on paper, you cannot program at all. Now, I’m not telling you to write your entire fishtank program on paper, but if you can’t write even the smallest program on paper and have it compile correctly you’re in trouble. So next time you have a lab or practice program to write, instead of jumping straight into it. Write it out first for the practice. You’ll see that without leaning on the compiler you’ll know what you’re doing, instead of guessing.

Finished? Make it better!

One of the things that helped me with my programming, was me going back over it after I had finished writing it, and improving the code that I wrote to be smaller and faster than what I previously wrote. Consider the following code block:

public class myclass{

public static void main(String[] args){

int thisreallylongandoverdescriptivevarname;

int anotherreallylongvarname;

}

public static void reallylongmethodname(){

int uselessvar;

anotherreallylongvarname = 1;

thisreallylongandoverdescriptivevarname = anotherreallylongvarname;

uselessvar = thisreallylongandoverdescriptivevarname + anotherreallylongvarname;

System.out.println(uselessvar);

}

}

}

What this code does is basically does is add 1 and 1 together to get 2. Now this code works, but we can simplify it:

public class myclass{

public static void main(String[] args){

int number = 1;

addnums();

}

public static void addnums(){

number += 1;

System.out.println(number);

}

}

So what I did is I removed two variables, and shortened the names of the variable and method. Now in this small program the impact of improving your code may be small, but if you multiply the lines by ten, you easily see just how a little code improvement helps. One of the side effects of code improvement, is that you will start programming in a compartmentalized sense. Meaning that you will program in a way that will solve the problem in as few lines as possible.

Do other projects

One of the best ways to improve yourself is to simply do other side projects. So lets say you want an alarm to go off at a certain time during the day to make you do something or whatever, you could go out and find an alarm program and it might work just fine for you. Or, you could make your own just for the practice. In order to make the program work, you’re going to have to get out of your comfort zone, and figure out how to make it work. That means you’re going to have to research all of the required components and apply some new skills along the way in order to make a fairly small alarm program. When all is said and done, you have your working alarm clock, AND you’ve learned a ton of new things along the way. New things, that you can apply to future projects.

Use the internet

I can’t really stress this one enough. There are so many resources out there when it comes down to computer programming tutorials and help. If you’re stuck on something, just google it. I can guarantee you that someone else has had the same problem. Want an example? Ok:

http://www.java-forums.org/new-java/20-null-pointer-exception.html

One of the first results on google.

Here are a few of my favorite programming resources:

http://www.java2s.com

www.dreamincode.net/

www.go4expert.com/

www.planet-source-code.com

http://www.kodejava.org/

Don’t be afraid to look at others source code

Yes, I know what Neumont’s Academic dishonesty policy is, and I think it’s probably one of the stupidest ideas ever thought of by a collaborative group of individuals. Probably the BEST way to learn how to program effectively, is to look at the code of someone who does exactly that. It’s kind of like how you would learn the best way to solve a sudoku. You may go through one square at a time, marking all the possible numbers that can go in each square, erasing numbers when you find one. However there are better ways of doing that, such as looking in the affected rows and columns for the number you’re looking for. Basically what I’m trying to say is that to be a master sometimes one must learn from one. Personal experience has taught me that.

Have fun

This is the most important. Programming is more than just pumping code, it’s about enjoying the thrill of solving problems and creating something amazing from nothing. If, when you’re programming, you’re hating every second of it. Maybe programming isn’t the right thing for you.

Check me out on Twitter: twitter.com/bjnix04

Remember: Post less.Write more. Lurk moar.

If you liked this article, please share it with your friends!

Advertisements

About boringtechie

Hello, I'm the boring techie! So you've landed yourself on this site due to me or someone else linking you here, and you're wondering: "What does this kid do, and why should I even care?" Right? Of course you are. Basically, I'm a Techie, though I'm not as boring as the title says, that's one of those things where the word means the opposite of what's REALLY going on... Anyway, I write tuts and make commentaries. That's about it...

4 responses to “7 Ways to improve your programming ability

  1. Michael ⋅

    Double check your simplified 1+1=2. It doesn’t work at all. Mostly good tips though.

  2. bibiki

    why are your articles amongst “Possibly related posts: (automatically generated)” on my WordPress blog. It’s not like I mind or anything, but am just trying to figure out what is actually going on.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s