Programming Advice

<p>I am an EE student taking one class each session this summer at UCSD. I have no programming experience what so ever and would like to teach myself some of the basics. I know my first class in the Fall is going to be basic engineering programming (C). Is there any advice, tips, or resources you guys could direct me to. Any help would be appreciated.</p>

<p>From the beginning, try to practice good debugging techniques. Even if you think it’ll be quicker to half-ass the debugging than to do it the right way, when you get more advanced (by advanced I mean near the end of the first class, since that’s as far as I’ve gone), if you’re not debugging the right way you’re burning your time.</p>

<p>-Modularity is your friend.
-So are GNU tools.
-Debug individual functions via client test code as much as possible.
-For every mem allocation, there should be a corresponding free.
-Don’t use emacs. Seriously.</p>

<p>If you are looking for intro to concepts, try MIT OpenCourseWare or Princeton CS websites (specifically COS 126 and 217). Good luck.</p>

<p>Guys, this man has no idea what you all are even saying. He hasn’t ever programmed before!</p>

<p>I suggest you pick up a learner’s guide to C, C++, or Java to learn how object-oriented programming works. Once you get the basic idea, learning more is no problem. It’s just a steep initial learning curve. Also, it would make sense to get a book on C, since that’s what your class will be learning.</p>

<p>There are plenty of online resources as well, guides and articles and things like that. Simple Google browsing “learning C” will get you far, trust me, because I’ve done it.</p>

<p>“Guys, this man has no idea what you all are even saying.”</p>

<p>They’ll teach him the right way to debug when he starts. When I started they told me this is how you should debug, I found it faster to ignore the techniques and just go about it through brute force, then as the class progressed, I hadn’t really learned how to debug it, and brute force took way too long. I’m just telling him not to do that.</p>

<p>Steep learning curve? That’s an understatement if you want to push him right into C++.
Be real. Ok, he’s starting with C. Unfortunately, none of these are great intro languages.
But what the OP needs to know is… that language doesn’t matter so much. The programming language is just the syntax, the grammar, etc. The concepts of problem solving are more important, especially to a beginner. He needs to understand how to break a problem down. Divide and Counquer! Number formats, data structures, searching, sorting, recursion. Start with the basics. Write a program to play tic-tac-toe. That sort of thing. A beginner needs to be able to relate abstract code to something physical he understands. Take it step by step. Learn incrementally. Enhance, expand, adapt working code. Build on your knowledge one concept at a time. It is unnecessary to leap ahead.</p>

<p>“C” (and for that fact C++) is not the best language to learn basic programming. I think to learn a language for the first time, one actually needs to SEE the reserved words in the logic. Now I know PASCAL is obsolete, but I learned that language before “C”. There is not a nicely laid-out IF-THEN-ELSE statement in “C”, the d*mn bracket “{” represents the “then”.</p>

<p>If there is something in 2010 that is like PASCAL, then I would use that as a start off language.</p>

<p>…then learn “C”
…then learn object-oriented concepts INDEPENDENT of a language
…then learn C++</p>

<p>…in that order</p>

<p>Here are some resources for C and C++</p>

<p>[Teach</a> Yourself C in 24 Hours](<a href=“http://aelinik.free.fr/c/]Teach”>Teach Yourself C in 24 Hours)</p>

<p>[Learn</a> C++ -](<a href=“http://www.learncpp.com/]Learn”>http://www.learncpp.com/)</p>

<p>This may be the best advice that I can give you on this topic. There’ll be many people who’re going to brag about how “pro” they are at coding. They’ll tell you that they’ve never used windows, never used anything besides VI, and start *****ting on random languages for absolutely no reason. Please ignore them and never take them seriously, they’re just obsessed with their own ideal of what the ultimate programmer would be like. They typically take as much as 10 times as long to write a single trivial piece of code and are usually just all talk. Now don’t get me wrong, there are some truly ingenious people out there who really only use the most primitive editors with the most primitive languages, but they’re never arrogant.</p>

<p>Also, for C, don’t think of the language as a computer language, think of it as a mathematical system that transcends pure numerics and you’ll be fine. The learning curve may seem steep at first, but since everything’s cumulative, it actually flattens out as you progress.</p>

<p>

I don’t think it’s that difficult. C is much like Java, and Java is the language they teach to AP Computer Science students. At my school they allow you to sign up for this class as soon as you’re a sophomore. Infact, I’m learning C# right now and it is very much like Java and most people say C# is a bit harder to learn (though maybe I’ll soon learn why…).</p>

<p>

</p>

<p>Not necessarily, C and Java share many similar stylistic conventions, beyond that they’re pretty much like potatoes and oranges (Okay, maybe the changes aren’t that drastic, but Java is a lot nicer then C, especially for any nontrivial projects).</p>

<p>C# itself isn’t harder to learn, as it is more of an abstraction over Java than C/C++, it’s more or less the multitudes of backend libraries that you’ll have to become acquainted with become an agile C# developer as the language rests entirely on top of the .Net framework.</p>

<p>python is a great language to learn the ropes. very simple, high level language</p>

<p>

This post is right.</p>

<p>The hardest part of C# is knowing how to use everything. There’s pretty much a function for everything you could ever want but knowing it exists is 90% of the battle.</p>

<p>For example, let’s say you want to convert some variable to a string. This can be done with variable.ToString(). Now, let’s say you want to convert some string to a 32-bit int. One might assume it would be something like variable.Int32(). Nope. It’s Convert.ToInt32(variable). While it’s not hard to use either one, it’s not exactly the most logical thing in the world to have two similar functions used two rather different ways.</p>