*In Progress* Coding and Programming FAQ (Updated 22/7/2012) - Overclock.net - An Overclocking Community

Forum Jump: 

*In Progress* Coding and Programming FAQ (Updated 22/7/2012)

Reply
 
Thread Tools
post #1 of 18 (permalink) Old 12-02-2011, 05:21 PM - Thread Starter
New to Overclock.net
 
ByteMyASCII's Avatar
 
Join Date: Sep 2009
Location: Richton Park, IL
Posts: 85
Rep: 14 (Unique: 9)
Been seeing a lot of the same questions lately so I thought I would put together (as best to my knowledge) of the questions that I see asked pretty much every day. If I miss anything feel free to message me and ill edit it. Also I plan on taking the next two post with blanks in order to give myself room for more information if ever needed at a later date.

Q1. I want to learn how to program where should I start? Know of any good books/online tutorials? What IDE should I use?

A. This question comes up a lot and the simple answer is to start with learn an object oriented language. The top languages I (and most other people would suggest starting with) are Java and C++. Other options are Python, C# and VB.Net

Java
C++/C#/VB.net
Python

List of IDEs (Thanks to joshd for this information!)
IDE/SDK List

Q2. Im having problems with a program how can I get help?

A. Simply post on the forums and someone will come along and take a look! Title the thread with the problem you are having and what language it is in. When the problem is solved edit the thread title with [SOLVED] so others who may have a similar problem to you can take a look. In your problem describe the program you are writing, the error you are having (copy and paste the error), and the snippet of code that is causing the error. The more information you provide the faster we can solve the problem.

Q3. I think computers are awesome and I want to become a Computer Science student at the College/University I am attending but I was wondering how hard is it?

A. To be frank Computer Science is a difficult degree. You will spend countless hours toiling over a program hidden away in a basement with no human interaction for weeks at a time on some occasions smile.gif. When I was in college I was taking Linear Algebra, Software Engineering, Systems Programming and funnily enough World Music simultaneously in one semester. I slept maybe 3 hours a night that entire semester and devoted almost all my time between Systems and Software Engineering. Now! If you've read this far and your going "ehhhh...sounds like crap, I want friends" I can tell you its one of the most rewarding majors out there. Through hard work and determination you see something you've created become this magnificent program and it feels pretty awesome.

tl;dr it's hard, super rewarding

Q4. Im bad at math does that mean I shouldn't program?

A. While Computer Science is a math based major you can still provide quality code and have an enjoyable experience programming without it. I am not the brightest crayon in the box when it comes to mathematics. During college my grades would range from a D- to a C during my college career. Knowing math helps theres occasions where you can reduce entire loops to a single algorithm with the proper knowledge but that can come in time.

Footnote
Slight adjustment to the Python information. Please message me if you have any questions or ideas of how we can improve this.

ByteMyASCII is offline  
Sponsored Links
Advertisement
 
post #2 of 18 (permalink) Old 12-02-2011, 05:21 PM - Thread Starter
New to Overclock.net
 
ByteMyASCII's Avatar
 
Join Date: Sep 2009
Location: Richton Park, IL
Posts: 85
Rep: 14 (Unique: 9)
I have decided to cut up the information into sections. Post 2 will attempt to be not just information on HOW to code but on how to write GOOD code.

Q1. So I know how to write programs in Java/C++/Python etc but I want to write quality code how can I do that?

A. Now heres a topic thats pretty gigantic. For 2 years I was a Teaching Assistant for the Principles of Programming 1 (aka Intro to Programming) and Principles of Programming 2 (Aka Data Structures) and theres a few key things I told my students (plus heres a few things I have learned that are pretty useful since I got out in the working world)
  • Design than Develop
    • Whenever I start a new program the first thing I do is sit down with a piece of paper (yes paper! I like to draw when I plan) thinking about your program and creating a UML diagram (a design document that contains what methods are in each class etc) ahead of time will literally save you HOURS of work. This is something I knew in college and wish I would have started doing earlier than second semester junior year lol
  • Comments!
    • These will save you more headaches than anything else will in the entire world. It may seem stupid on small little programs but getting in the practice of commenting as you code is super important and will save you a lot of pain. When you program something drop it for a year and come back to it its pretty horrible to try to remember everything you did. Whats worse is when you have to read someone elses code that has 0 COMMENTS IN IT. Example: I started a project at work the project had a few thousand lines written by another developer (much smarter than me) with absolutely no comments. I spent the entire first week trying to figure out what was going on and took me about 3 to get a full understanding of everything. Don't be that guy/girl that never comments no one likes that guy on his team. Make sure you learn the commenting standard for your language for example learning the Javadoc standard is wonderful.
  • Prefix/Suffix and descriptive variable names
    • When declaring a variable it helps tremendously to describe what action your attempting to perform as well as use a prefix or a suffix to determine type. For example if I am creating a variable that will represent the effective date of something I would name it something along the lines of dteEffectDateOfChange. Its a bit lengthy yes but at any moment in time just reading that name tells me every single piece of important information I could know about it. For private class level variables I use p_ as a prefix so in the case of my date variable p_dteEffectiveDateOfChange once again furthering the information about this variable that I can learn from just simply reading the name!
  • Remember scope!
    • Make sure to not make everything public. Class variables should almost always been private than access through getter/setter methods. Methods that are only used within that class should be private etc and so forth. Remembering to use appropriate class level/method level and variable level scopes is key to quality software.
  • You don't have to declare all variables at the top of a method!
    • Now we go straight back to the scope idea. Remember declare at the top of the variables SCOPE not METHOD. If there is a variable never used outside of lets say an if statement declare it IN the if statement. If that portion isn't executed during a certain call of the method than you just saved yourself the clock cycles required to declare and instantiate that and took your first step to making more efficient code smile.gif

Footnote
This is just a bunch of ramblings and thoughts I had that help build more quality code that newer developers often forget. Feel free to shoot me a message with other things or questions on how to make better code and I will certainly do my best to answer!

ByteMyASCII is offline  
post #3 of 18 (permalink) Old 12-02-2011, 05:22 PM - Thread Starter
New to Overclock.net
 
ByteMyASCII's Avatar
 
Join Date: Sep 2009
Location: Richton Park, IL
Posts: 85
Rep: 14 (Unique: 9)
[Blank]

ByteMyASCII is offline  
Sponsored Links
Advertisement
 
post #4 of 18 (permalink) Old 12-02-2011, 05:25 PM
 
Join Date: Jul 2011
Location: Censored.
Posts: 5,058
This might be helpful: https://www.overclock.net/t/1178099/ides-and-sdks-list

Nice going btw.
joshd is offline  
post #5 of 18 (permalink) Old 12-02-2011, 10:35 PM
New to Overclock.net
 
Chris++'s Avatar
 
Join Date: Dec 2008
Posts: 511
Rep: 19 (Unique: 19)
I'll fill in some of the Python info in this thread.

Having said that, I think you should switch places between C++ and C#, as currently they (C# and Java) are the most used in non-specialized programming projects as well as high level enough not be bother with stuff that doesn't concern the core of programming logic (like memory allocations, manual garbage collection).

Chris++ is offline  
post #6 of 18 (permalink) Old 12-03-2011, 09:16 AM
Retired Staff
 
{Unregistered}'s Avatar
 
Join Date: Jun 2010
Posts: 1,563
Rep: 17 (Unique: 15)
Quote:
Originally Posted by ByteMyASCII View Post

Been seeing a lot of the same questions lately so I thought I would put together (as best to my knowledge) of the questions that I see asked pretty much every day. If I miss anything feel free to message me and ill edit it. Also I plan on taking the next two post with blanks in order to give myself room for more information if ever needed at a later date.
Q1. I want to learn how to program where should I start? Know of any good books/online tutorials? What IDE should I use?
A. This question comes up a lot and the simple answer is to start with learn an object oriented language. The top languages I (and most other people would suggest starting with) are Java and C++. Other options are Python, C# and VB.Net
Java C++/C#/VB.net Python
No idea someone fill me in please smile.gif
Q2. Im having problems with a program how can I get help?
A. Simply post on the forums and someone will come along and take a look! Title the thread with the problem you are having and what language it is in. When the problem is solved edit the thread title with [SOLVED] so others who may have a similar problem to you can take a look. In your problem describe the program you are writing, the error you are having (copy and paste the error), and the snippet of code that is causing the error. The more information you provide the faster we can solve the problem.
This is all I've got for now please let me know if anything is missing that someone may ask or any information people may need and if its worth while ill throw it up here!

Dammit... you stole my faq tongue.gif

Well good job starting it. I was going to make it next month after getting over with my exams but it's nice to see that you took the initiative. I can help you over the next few days if you would like any.smile.gif

The No. 1 question you addressed is, IMO, the most important current issue to make a FAQ about.
Since you are talking about how to start with programming, you should try to compile the information (paraphrased if you wish) I have posted in the other thread and all the other invaluable advice everyone in this forum has posted in various threads.
Some of my advice! (Click to show)
Quote:
Originally Posted by {Unregistered} View Post


Crucial advice there.

I'd say start with Python or an easy scripting language. Python is good because it allows both OOP and Procedural programming. Focus on basic procedural programming first and learn the basics. Do some practice and once you are familiar with programming and are able to make little (useless tongue.gif) programs for fun, move on to an OOP language such as JAVA or C++.

Again, in JAVA or C++, you'll have to learn the basics first. Try to understand what a class is, what objects are and how the fundamental functions work before beginning a full scale project.

Important information => Programming != Coding

Coding is just converting the idea into code. Programming is the actual designing of the program (how it will work and how everything will fit together in the program to give the desired result). You have to learn how everything goes on as the program is executed. Once you can understand that, all languages will be basically the same.

If you choose to learn Python first, then you should get the free e-book, A Byte of Python. Seriously, if you are a beginner and this is your first programming language then that is the best book for Python available. If someone ever tells you to use Dive into Python instead, then don't listen to him or her. I tried Dive into Python and it was no doubt very hard since Python was my first programming language too. The former one will allow you to actually understand what's going on while the latter will just push you and force you to copy and paste code and in the end, you will know how to make a program that completes a specific task but you won't know what the code means.
However, you can still try both and see which one works for you.

Also, to complement your learning, you can watch TheNewBoston's programming tutorials on youtube.


And again, I can't emphasize this enough: Coding != Programming.

Good luck! smile.gif
Quote:
Originally Posted by {Unregistered} View Post

I really need to make a "How to start learning programming" post and sticky it.redface.gif I'll be sure to make that in January when I have more time on my hands.
To answer your question:
Yes, of course, you can learn programming without a proper course. The Internet is the best resource available.
Usually, it is recommended that beginners start with an easier language so that they can become comfortable with programming before they dive in to the "real thing".
I'd say start off with Python. It is a good easy-to-learn scripting language that allows both procedural and object-oriented programming. It is much more flexible and the syntax is easy to get used to.
Since this is going to be the first language you learn, you should use A Byte of Python. It really gives a proper introduction into programming in Python and it is paced well enough for the average beginner. The most important thing from then on will be actually starting to practice making your own little programs. The more you do, the more problems you'll run into and the more you will learn by trying to solve those problems. You can supplement your learning with the Python video tutorials available on Youtube by "thenewboston". Watch the tutorials on the specific sections you learn about as you progress through the book. Remember: practice, practice, practice. Then, in a couple of months, when you begin to see yourself as an "expert beginner" and have already finished the material listed above, you can start through Dive into Python. (It starts by making you learn by doing. I personally did not like this book but many people suggest it and you may like it too.)
I am pretty sure this will keep you busy for many months. biggrin.gif (All the information I have listed above is completely from personal experience. I too started with Python). Once you feel you are a pro, you can look into further resources but I am pretty sure this is enough for now.
However, according to my experience, I only actually gained a profound understanding of programming when I learned Java. (because of its object-oriented paradigm).
If you have any further questions, just ask in the Coding section and we'll be sure to help you. smile.gif
~ {Unregistered}

Look over in these threads and I am sure you will find much more and even better tips and advice to include in the FAQ.

Also, I will try to prepare a few more questions to include and discuss.

I think I will add a link to this thread in the Sticky Notes section and also edit the title to "Coding an Programming FAQ (In Progress) " so that people know about its current status.

EDIT: Oh and I'd say that remove the mention of the IDE's in the first question. Remember that most people that come here are beginners and are primarily interested in the basics and the mechanics of how they should start rather than what or how to program. IMO, either you should change this to a coding and programming centered FAQ with information on actually programming or you should focus on resolving the usual problems that beginners face when starting off. Just my advice. The end decision is yours since it is technically your FAQ. biggrin.gif


~ {Unregistered}


Quote:
Originally Posted by andrews2547 go_quote.gif

Women suck at almost everything. The only time they were good at anything was when Cliopatra was in charge and they lived in triangles. Triangles aren't manly.


{Unregistered} is offline  
post #7 of 18 (permalink) Old 12-03-2011, 10:05 AM
Programmer
 
BradleyW's Avatar
 
Join Date: Feb 2009
Location: United Kingdom
Posts: 28,458
Rep: 1555 (Unique: 1017)
This will be a great guide. (I use visual basic)

Intel Core i9 9900K HT 5GHz
GIGABYTE Z390 Ultra
AMD ASUS STRIX OC VEGA 64
G-Skill Trident 2x8GB DDR4 4000MHz
Samsung EVO NVM.e 250GB
SeaSonic 1250W Gold
Corsair 900D + Custom Loop.


BradleyW is offline  
post #8 of 18 (permalink) Old 12-04-2011, 09:56 AM
New to Overclock.net
 
Oaff's Avatar
 
Join Date: Apr 2011
Location: Florida
Posts: 122
Rep: 5 (Unique: 5)
cadingbat for practice java and python problems

MIT python intro

http://stackoverflow.com/ has answers to more difficult questions, but not very noob freindly.



Oaff is offline  
post #9 of 18 (permalink) Old 12-05-2011, 07:34 AM - Thread Starter
New to Overclock.net
 
ByteMyASCII's Avatar
 
Join Date: Sep 2009
Location: Richton Park, IL
Posts: 85
Rep: 14 (Unique: 9)
Thanks for the suggestions and information guys keep em rolling in! hopefully we can get a pretty well built FAQ before the end of the week. I didnt do any updating this weekend got myself busy with some other stuff but after work tonight I will try to get some of the information suggested read through and posted.

In response to
Quote:
Originally Posted by {Unregistered} View Post

I think I will add a link to this thread in the Sticky Notes section and also edit the title to "Coding an Programming FAQ (In Progress) " so that people know about its current status.
EDIT: Oh and I'd say that remove the mention of the IDE's in the first question. Remember that most people that come here are beginners and are primarily interested in the basics and the mechanics of how they should start rather than what or how to program. IMO, either you should change this to a coding and programming centered FAQ with information on actually programming or you should focus on resolving the usual problems that beginners face when starting off. Just my advice. The end decision is yours since it is technically your FAQ. biggrin.gif

~ {Unregistered}

I think finding a place to DO your programming is pretty important. If your coming to programming your not gonna have any idea how to get started coding and the three main components: IDE, language and tutorials are all fairly important to learn how to get started in development.

If anyone has any more suggestions, questions or information that they think would go great in the FAQ please let me know like I said I hope we can compile a FAQ thats solid enough to where if people ask a simple question we can just simply point them to it.



ByteMyASCII is offline  
post #10 of 18 (permalink) Old 12-05-2011, 07:42 AM
New to Overclock.net
 
hak8or's Avatar
 
Join Date: Jun 2008
Location: NYC
Posts: 305
Rep: 11 (Unique: 11)
I just wanted to say that python has its own IDE when you download the "suite", I think it is simply called "Python IDE". Other than that, you can use notepad, then save it as a .txt, and run the command line version of the interpreter and viola. I think though, I am not sure and it is too early for me. (damn morning, yes, 9:42 am is very early for me)

Also, don't forget D ! It is a wonderful language, but it is very new so there are not much tutorials for it sadly, or libraries.

I am kind of new to EXTREME overclocking so help me out every now and then? thinking.gif

hak8or is offline  
Reply

Quick Reply
Message:
Options

Register Now

In order to be able to post messages on the Overclock.net - An Overclocking Community forums, you must first register.
Please enter your desired user name, your email address and other required details in the form below.
User Name:
If you do not want to register, fill this field only and the name will be used as user name for your post.
Password
Please enter a password for your user account. Note that passwords are case-sensitive.
Password:
Confirm Password:
Email Address
Please enter a valid email address for yourself.
Email Address:

Log-in



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Show Printable Version Show Printable Version
Email this Page Email this Page


Forum Jump: 

Posting Rules  
You may post new threads
You may post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off