David_J_Rogers Posted March 16, 2014 Author Report Share Posted March 16, 2014 What is your opinion on this site? Will it teach me enough? http://www.cplusplus.com/doc/tutorial/introduction/ Quote Link to comment Share on other sites More sharing options...
sanderd17 Posted March 16, 2014 Report Share Posted March 16, 2014 It will teach you too much for now. It's more important that you learn various ways to structure your code (like the object-oriented model) than learning about the specific details of different compilers. You'll have to learn those details later to write fast code. But you'll first have to write readable code. If you code something, check it again after a week, and see how much you still understand, even understanding a small program that's badly written will be hard.I suggest you look for an introduction to object oriented programming in your favorite language. You can also look for different methods (procedural, functional, logical...), but object oriented is used most.The language doesn't generally restrict your coding style to a specific method. But some languages are more suited for some methods. Like Haskell is mainly for functional programming, JS can be used for functional and object oriented programming, Java and C# are mainly for object oriented programming... Quote Link to comment Share on other sites More sharing options...
Radagast. Posted March 16, 2014 Report Share Posted March 16, 2014 (edited) What we want to say, is:You have to learn to think like a machine. (you can hide instructions from machines using /* a comment */ or //right of these slashes is hidden, so even the bracket, because it's on the same line right of the slashes-->)Break the code down into single commandos:e.g. the one Sander posted:for (i = 1; i <= limit; ++i){ /*do something here every loop: calculate. store. process.*/}Each characters (e.g. i or limit above) are your brain. They store something somewhere on your machine (memory).Machines start at 0, not at 1 !! So usually you find such loops (instead of the above):for (i = [b]0[/b]; i <[u][b]=[/b][/u] limit; ++i){ print "I am a string. It's the " + i + "th pass of the loop. Break over to a new line -->\r\n" ; /*<-- each commando has to be separated somehow to tell when a new instruction starts. This can be \r\n or ; ... it depends on how it was defined!! it's human-made! */}I prefer writing the above loop this way:i = 0; // start with 0howOftenShallILoop = 1; // loop only once (so essentially you could leave out the loop in this case.while (i < howOftenShallILoop){ i = i + 1;}The last loop broken down into pieces is:I have a 0 in memory (i could tell you where exactly but you're not interested in it for now as you have enough free storage space left:)!).As long as i is < howOftenShallILoop we execute this operation:i = i + 1which is the core of our program (leaving this out would make your program never stop!! it would loop and loop and i would always stay < howOftenShallILoop. :/ No chance to stop your program than other than ... well .. you know ... to 'kill' it, say, hey, no more energy for you no matter what you're doing currently (could be fatal). So better ensure your loops always find a way to stop.The i = i + 1 means: Take what we stored in i (our 0) and increase it by 1. Then store it back. So essentially at least three operations in one.For this there exists a short form, because it's used so often:++i Edited March 16, 2014 by Hephaestion Quote Link to comment Share on other sites More sharing options...
David_J_Rogers Posted March 17, 2014 Author Report Share Posted March 17, 2014 (edited) My friend back in Arizona is in the same program as I am. But he already knows how to write scripts and stuff in Java and C++. I can never get a hold of him though. I'm trying to see of my university has some books I can get early. They usually have the latest books on writing code. Edited March 17, 2014 by David_J_Rogers Quote Link to comment Share on other sites More sharing options...
GunChleoc Posted March 17, 2014 Report Share Posted March 17, 2014 Actually, it can sometimes be good to be a rookie when starting on a uni course, because you won't be bringing any bad habits with you.This guide might come in useful later: http://www.codeproject.com/Articles/22769/Introduction-to-Object-Oriented-Programming-ConcepBut first, you will have to learn the basic concepts: how variables and control structures work, and then how to create more complex data structures and some standard algorithms.For C#, these should get you started:http://www.slideshare.net/introprogramming/1-introduction-to-programminghttp://www.pvtuts.com/csharp/csharp-introductionI think C# is a good idea for a beginner. In Java, data input/output is a pain. In C++, strings are a pain.Mind, I haven't used any of these guides myself, I just DuckDuckGo'ed them. Quote Link to comment Share on other sites More sharing options...
David_J_Rogers Posted March 17, 2014 Author Report Share Posted March 17, 2014 (edited) I see. Thanks for helping me guys. All of your inputs really open up my mind. I got a lot of sources to look up now. I've taken some notes on a few tutorials and there are a few books in my University store to check out on the topics too. I should be able to help you guys in no time.I'm excited. Since I am a student, I am lucky to have access to Microsoft Visual Studio for free. Oh yeah! Edited March 17, 2014 by David_J_Rogers 1 Quote Link to comment Share on other sites More sharing options...
Radagast. Posted March 18, 2014 Report Share Posted March 18, 2014 That's good news! We never mind new colleagues in our ventures to move this planet - and if it's by an inch only. Just ask us if you need to know something special - or if something looks strange to you at first. Whatsoever, never lose your mind. . Quote Link to comment Share on other sites More sharing options...
David_J_Rogers Posted March 18, 2014 Author Report Share Posted March 18, 2014 I am making some "progress", I guess you could say. Lol. It took me a while to figure out there were differences in the code other than the tutorial. Quote Link to comment Share on other sites More sharing options...
Radagast. Posted March 18, 2014 Report Share Posted March 18, 2014 Hey, good news!! I see you joining us soon if you continue like that. I wonder if this guy already unpacked the present (it's 4 years since the birthday present was delivered ). Quote Link to comment Share on other sites More sharing options...
niektb Posted March 18, 2014 Report Share Posted March 18, 2014 Hey, good news!! I see you joining us soon if you continue like that. I wonder if this guy already unpacked the present (it's 4 years since the birthday present was delivered ).Ssh, he has Chrome installed! Quote Link to comment Share on other sites More sharing options...
David_J_Rogers Posted March 19, 2014 Author Report Share Posted March 19, 2014 (edited) Yeah, I have chrome but I honestly haven't used it a lot lately. The new IE has actually proven to me to go a little faster or the same speed as chrome. Anyway, I am making progress. I hope I can join very soon. Edited March 19, 2014 by David_J_Rogers Quote Link to comment Share on other sites More sharing options...
Josh Posted March 19, 2014 Report Share Posted March 19, 2014 Stanford has some really good introductory programming lectures on youtube that I'd recommend watching. They use Java, but the techniques are applicable to almost any language. Quote Link to comment Share on other sites More sharing options...
David_J_Rogers Posted March 20, 2014 Author Report Share Posted March 20, 2014 Thanks a bunch, Josh, those are really good. With this much help, it is likely I'll be ready to help soon. Hopefully. Quote Link to comment Share on other sites More sharing options...
David_J_Rogers Posted March 23, 2014 Author Report Share Posted March 23, 2014 I do have a question though. Are there really good exercises to do that will improve my writing with computer code? I mean, basic exercises. If not I'll continue learning about it and figuring it out. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.