Programming Tips By StudyOrCryTrying


Semester break is about to end and as I was scrolling through Tumblr for some new semester motivation, I stumbled upon this tips which I think quite essential for programming student like me so yeah. I might add some of my personal opinion along with the tips.

GENERAL

1. Always comment your code.
Commenting your code is a great way for you to not only help solidify what you're writing in your head, but it makes your code so much clearer for you and anyone else who may be reading your code. Of course, you don't always have to document every line, but documenting lines that you find difficult to remember is a good practice to keep.
I always use comment to section my codes and put a little description of what the section is about. I read somewhere that you can comment your code by highlighting the part you want to comment then press Ctrl and ? key but this tips does not work on blogger HTML editor heheh
2. Document your methods/functions.
Documenting your methods is a great way to keep track of what methods do what - create a doc-box above them and list the name of the method, what arguments it takes, what it returns, and the purpose it serves to the program. This can also serve as a quick reference so you don’t have to dig through your paper and find out what it’s supposed to do.

3. Develop your own style of coding.
When you first start coding, you may end up with code everywhere - Brackets in weird places, inconsistent spaces between parentheses, etc… Over time, you should start developing your own style of coding that is yours. Decide how you like to type your brackets, how you like your parentheses to look, your general variable naming style, etc… It makes your code so much easier to look at and read.

4. Know the official website for the language you're working in.
If the code you are writing has an official website, use it! Languages like C++, Android, Java, and a ton of others have a website that has an extensive dictionary of libraries available to you and how to use them. Some of them even have example programs that you can use to help you. I keep all of mine in a bookmark folder.

5. Experiment on your own.
If you look below, you’ll notice my tip #4 for assignments - Don’t over-complicate your code. This is best saved for your own experimenting, so do it! In your down time, learn new techniques and new ways to optimize your code to the best it can be. Doing this in your own time is the best way to do it, as you don’t jeopardize any of your points if your code ends up not being able to work or if the teacher is extremely to-the-book on their assignments.

6. Debug as you go.
Debugging all at once sucks. You may get so far just to find out that your code is broken at the way beginning and that nothing else works. Instead, I suggest that you debug as you go to avoid the hours of debugging and possible re-writing at the end.
You will understand the meaning of suffering if you debug your code only after you finish writing it. Error will definitely pop up one after another and it will just require more time for you to solve all those errors.


ASSIGNMENTS

1. Take your time reading the prompt.
Nothing sucks more than finishing up the assignment after a week of coding than finding out that you completely skipped a crucial part of the program. If you need to, print out the prompt and highlight the crucial parts and make a note of anything else that you might forget.

2. Put document boxes at the top of your code.
These are more of a preference, but I prefer to put document boxes at the top of each of my files. I normally put my school id, name, assignment #, file name, and purpose of the file at the top of every file. This helps me remember what file is supposed to do what and keeps my code clean and keeps my programming time shorter.

3. Make a list of your variables.
Programming is one of those things that will frustrate the heck out of you at times. You will spend days trying to debug one thing, just to go to the teacher to find out that you missed a semi-colon or you misspelled a variable. My recommendation: Make a list of variables that are used globally as well as which ones are used privately in their respective files. You can either do this in a doc-box or you can use old-fashioned pen and paper. I also put what the variable is used for and use the sheet for quick reference.

4. Don't try to over-complicate your code.
When you’re given an assignment, do only what the assignment says - don’t try to go above-and-beyond unless you’re told there’s extra credit or another incentive. This means; not using a switch when you’re specifically told to use if-else statements or anything else similar.

5. Visit your teacher if you need help.
They are there to help you - don’t just rely on stack overflow to teach you something that you don’t understand. Sure, you may be able to fix your code from that forum post, but do you actually understand it?
I'm usually scared to go meet lecturer unless I feel the lecturer is easy to approach so I usually seek help from my classmates. If my classmates can't help, only then I will go to the lecturer.
6. Pair programming is great if you do your own part.
Don’t just rely on your partner to do everything while you get the grade. You won’t learn anything that way. Evenly split the work and code when you are both present. This will allow you both to learn how to do the program and prepare you both for the exam to come. Pair programming is a great way to get more real-world experience, as many projects in the real-world are done in groups or teams. ** Pair programming may not be available for you, ask your professor first **
I face quite a hard time whenever I have a programming subject since most of the time I will be the only one who does most of the coding. Having a good partner is important.
7. Do your own code.
Aside from pair programming, do your own code. Do not rely on git hub to have the old assignments from years past and do not rely on your friends to write your code for you. Copying code from online is not only plagiarism which can earn you a 0 in the assignments, but some schools even have a strict policy where you can fail out of the class for plagiarizing. It also does not help you to learn the material.

Credit: StudyOrCryTrying Tumblr

ps; I will be developing a mobile application for my final year project and I am so scared because I know nothing about it and I have to learn it myself.

17 comments:

  1. Hi.. It is for Final Year Project student can choose what they want to do? Are u really want to do mobile application if you know nothing about it? Try do something that use the language you are strong with. Take the ideas what you should do in library. There a lot alumni's thesis project in library. Also lecturer opinion is important. For me, I tried to make Restaurant Order System but then I realize I suck do the system. So my Final Year Project was develop the website that keep order for booking car rental.

    P.S. I am really do car rental for U student back then. :D

    ReplyDelete
    Replies
    1. Yes we can choose what we want to do. I actually proposed few idea to my supervisor and she like the mobile app one. I kinda want to challenge myself making it instead of web system that I used to make.

      Oh I did something similar to the car rental for my oracle subject! :)

      Delete
    2. Good luck then.. I love to make friend with student who like to take a challenge in coding. I hope after graduate you will continue in same field. It is important that we have an interest in the field we are studying. Don't stop halfway. Not many female in programming industry nowadays.

      Delete
  2. waahhh byak terms I don't understand huhu.. nice sharing.. I like to learn about programming more..

    ReplyDelete
    Replies
    1. You actually can learn programming by yourself. There are many website that let you learn like codecademy :)

      Delete
  3. I used to be an IT student but that was wayyy back in secondary school haha! Quite of a slow learner when it comes to coding and stuff these days. Anyway, I wish all the best for your final year project bells! <3

    ReplyDelete
    Replies
    1. Haha it's okay, I'm not really a bright student either but I like doing it anyway. Thankyou for the wishes!

      Delete
  4. commenting in blogger HTML editor is easy except inside //how to comment here please help :')

    ReplyDelete
    Replies
    1. I actually don't quite understand what you need help with TT

      Delete
  5. good luckkk for your finalll year project sis! btw great tips for new IT studeentt like me. uwu.wishh me luckkk for this subjet. T_T

    ReplyDelete
    Replies
    1. Thankyouu! You can do it, have faith in yourself :)

      Delete
  6. i give up when it comes to coding hahha. peningggg

    ReplyDelete
  7. Good luck on your final project. It's amazing how you want to challenge yourself to do something different other than web system that you used to make. All the best !

    ReplyDelete
  8. gudluck tau! suke tgk blog awak. kemassss je hehe

    ReplyDelete