Back to Topic Index
Programming
By David on 07/08/2009
Ok, so I don't have an actual question yet, but I just want to know if anyone who is really good at programming can give me any tips on how to survive.
I've never been a huge fan of it, but because I'm taking Computer Engineering as my major in college, there are a few courses that involve programming.
Anything is appreciated. Assume for now that it's just the basic programming languages.
By For Sooth on 07/08/2009
Your post fails without telling me either 1) a language 2) what you want to program.
By David on 08/08/2009
QUOTE (For Sooth @ August 07, 2009 09:41 pm) |
Your post fails without telling me either 1) a language 2) what you want to program. |
Your post fails for:
1) not reading this line:
QUOTE |
Assume for now that it's just the basic programming languages. |
2) not reading this line:
QUOTE |
Ok, so I don't have an actual question yet, but I just want to know if anyone who is really good at programming can give me any tips on how to survive. |
Since I haven't started college yet, I have no idea what I'll be asked to program.
Since I haven't started college yet, I have no idea what languages I'll be asked to program in.
So yeah, reading the post helps and then thinking just slightly out of the box couldn't hurt either.
By Pyroclastic0 on 08/08/2009
Programming sucks it takes alot of time when you don't know what your doing.
I had to use visual basic for my physics degree, finding stars and things.
Best advice is just to wait to see what you have to do without knowing what program you can't really explain much, try to work with a few people so if someone gets stuck they may be able to help.
I was fairly lucky and for the first few years we were pretty much just told most the code to use toward the end of a session.
By Georgio9 on 08/08/2009
Don't worry dude. I'm in my 3rd year on electrical engineering so I've probably taken the same or similar courses that you have to take.
I took a course on C in first year.
I took a course on Java and object oriented programming last year.
I took a course involving assembly language last year as well.
I use C++ everyday at work.
I also use a scripting language knows as TCL (Tool Command Language) everyday at work.
By For Sooth on 10/08/2009
You sir fail because you don't tell me if your going for computer programing, or web scripting, or to make programs such as Swift kit.
By David on 10/08/2009
QUOTE (For Sooth @ August 10, 2009 04:46 am) |
You sir fail because you don't tell me if your going for computer programing, or web scripting, or to make programs such as Swift kit. |
I guess you didn't read anything because I've already said I DON'T KNOW WHAT I'LL BE ASKED TO DO.
I just want to know if there are any general tips I can use to succeed in general programming.
By For Sooth on 11/08/2009
Fine then...
1)Use white space
2)Document your sections
3)Don't be lazy, think it out first then code it. I even do it on paper some times.
4)If it can be shortened, chances are, it will run faster.
4.5)Efficiency is crucial. No one cares that you made a 2000 line script. Chances are a 250 line script could do the same a yours, but better.
That's all for now.
By RobbieThe1st on 11/08/2009
Until you can give us some information on what you will be asked to do(Try reading the course-guide or talking to the teachers), we can't give much of any advice. Sorry.
By For Sooth on 11/08/2009
QUOTE (RobbieThe2nd @ August 10, 2009 09:49 pm) |
Until you can give us some information on what you will be asked to do(Try reading the course-guide or talking to the teachers), we can't give much of any advice. Sorry. |
Seeeeeeeeeeeeeee
By David on 11/08/2009
That advice was useful Sooth, and is the kind of stuff I was looking for.
By Ranma344 on 11/08/2009
< Definitely isn't going to college for a programming major... oh wait, yea I am...
Feel free to ask me anything
By Tnuac on 11/08/2009
In the UK you can go on university websites and check the modules and syllabus, you tried the college website?
By David on 11/08/2009
Yeah, but it doesn't give details about what languages and what programs we'd be coding.
By Georgio9 on 11/08/2009
What are the names of all the courses you have to take?
By RobbieThe1st on 16/08/2009
QUOTE (For Sooth @ August 11, 2009 01:39 am) |
Fine then... 1)Use white space 2)Document your sections 3)Don't be lazy, think it out first then code it. I even do it on paper some times. 4)If it can be shortened, chances are, it will run faster. 4.5)Efficiency is crucial. No one cares that you made a 2000 line script. Chances are a 250 line script could do the same a yours, but better.
That's all for now. |
Ya know, I have heard all of these a lot. And, while they may be all good tips, I do things differently:
#1 is good, most of the time. Using -tab-'s to designate code that is inside of something else is good to do, however you must be aware of your language's rules - some languages don't care what you do(PHP, HTML being very good examples), though others care a lot(The Microchip PIC assembler, Python).
#2 is good advice, though if you suddenly get an inspiration and are writing down code quickly, leave it out and do it later.
#3 This I disagree with. I never sit down with a sheet of paper and diagram what I am going to do. what I do is simply sit down and write code. I know my end result, and basically sketch out in code a very basic script as to what I am doing, then refine parts as I go along. I find this to be faster, and often I will change my method for doing something on the fly, because I found a better, simpler, faster way. The only problem this presents is when I have a gigantic script that I have been working on for months - all the changes can sometimes leave "chaff" - extra variables, that sort of thing - if you aren't careful.
#4 This is usually correct, unless you are using complex loops or regular expressions. Often times, you can reduce the work that the script has to do by adding a few more "if"'s.
Depending on the language, there should be a timing function that you can use to see exactly how long a script (or portion thereof) takes - Try a couple different things and see what takes the longest or shortest - The results will often surprise you.
-Robbie
Back to Topic Index