Nightmare_from_hell Posted January 17, 2008 Report Share Posted January 17, 2008 Alright... so I want to refresh myself on my coding skills, but want to start with more of an intermediate level instead of going through the, "This is a do loop," or "To declare a variable..." Anyone have any suggestions? Also, I've got a dual-boot HD with Vista/Ubuntu (simply because I downloaded the distro and wanted a GUI just so I could learn commands w/ the comfort that I still have for a GUI) and would eventually like to solely use a *nix system. For now I'm going to be trying to get the hang of *nix commands, but for starters, where would I be able to find some good documentation to at least get started? Thanks for the help everyone! Link to comment Share on other sites More sharing options...
Calron Posted January 17, 2008 Report Share Posted January 17, 2008 Do you mean syntax or practice or what? Link to comment Share on other sites More sharing options...
Nightmare_from_hell Posted January 18, 2008 Author Report Share Posted January 18, 2008 I assume you speak of the programming part. but to answer, no, not really. I want to learn more about memory allocation, nodes, trees, etc. I have the book, "Teach yourself C in 24 hours" and am in the later chapters of the book but I want to get as many different sources as possible so that I can not only practice my syntax and stuff, but also ensure that I know how/when to use those techniques. I do have previous knowledge up to a point with C++, but I only learned as much as an AP class in high school can teach, and I'd like to learn more. Link to comment Share on other sites More sharing options...
mya Posted January 18, 2008 Report Share Posted January 18, 2008 Make something you like. In order to keep motivation high. I sugest a game. When i was in Univesity we had a generic Basic programing class. I built a game in Qbasic that was a ship dodging meteors falling down the screen with a health bar and all. Just for fun, it was not an assigment. My teatcher did not belive that i made it all by myself. Virigoth also has a Game, Critical Mass. Trust me code something you realy like or you leave it half way. Link to comment Share on other sites More sharing options...
Nightmare_from_hell Posted January 18, 2008 Author Report Share Posted January 18, 2008 I plan on it... P.s. We also had a kid in our Intro to VB that made a graphical game where two people, using the same keyboard, would walk around grassy areas, shooting fireballs and sword fighting each other (pretty much a Zelda feeling to it). It was rather entertaining seeing that VB was a totally new programming concept to me at that time. I had only dealt with C on my own, cuz my dad bought Borland 4.52 and that came with the programming book. Was quite fun being 12 years old and simply making a program that said, "My name is Nick!" Lol... those were the days. Link to comment Share on other sites More sharing options...
Grumpy Posted January 18, 2008 Report Share Posted January 18, 2008 Volunteer to help with some coding for FL, that way you improve your coding and the mud benefits! Link to comment Share on other sites More sharing options...
Nightmare_from_hell Posted January 18, 2008 Author Report Share Posted January 18, 2008 I have... the post has had only one view on it so far... but believe me, if they'd give me a chance, I'd love to. Link to comment Share on other sites More sharing options...
delfytheelfy Posted January 18, 2008 Report Share Posted January 18, 2008 You dont want to "learn" on fl.. talk about down times lol no offence Link to comment Share on other sites More sharing options...
Calron Posted January 18, 2008 Report Share Posted January 18, 2008 Views don't really work correctly on this forum, so don't worry about it. To get even more directed, do you want to learn MUD programming or industry style programming (general programming)? They are pretty drastically different. In terms of when to use different things, its basically a matter of judgment about what will be the most efficient. Different data structures all have different Big O times for each of their methods, so you want to build based on a structure that has strengths for what you are doing. I suggest you google Big O notation if you have no idea what I'm talking about, or else want to find specifically which is which. To start you off, Big O is basically the worst case and best case scenario for performing a method...for example, lets say I have ten integers in an array and I want to find a certain one. Using Java, for this example. public static void initArray() { int[] my_array = new int[10]; for(int i=1;i<=10;i++) { if(my_array == targetNumber) System.out.println("Number: "+i); } } The Big O notation for this method is "n" (they are always in terms of n). The maximum number of times I will have to access memory before I find my number is the length of the array n. A singly-linked list is an efficient way of storing memory because it only needs to store two things: a value, and a pointer to the next node in the list. However, it has no "get" constructor which means I can't just get the 27th value of the list. Instead, I would have to start at the beginning and follow the next pointer until you get to the 27th value. An array does have a get constructor which makes the Big O time 1. Each data structure has advantages and disadvantages. I really would suggest you start at the bottom though, ie a beginner programmer book. Beginning computer science courses are survey courses which means that they cover a broad variety of topics although not in great deal. If you start with an intermediate or advanced level book than it will be more directed, focusing on one thing (Data structures, for example). Learning to program this way is not good. Looking at someone else's code and being able to replicate it in a sorta-kinda way is something to be avoided. Not only will you make a lot of bugs (even if they aren't immediately apparent. Industry programmers are paid based on experience, and statistically, top notch programmers make roughly 1.2 bugs every 200 lines of code. Commercial programs have 20 to 30 bugs for every 1000 lines of code. Basically, A LOT in both cases. Even top level programmers have desk-checkers, in other words people that just sit and proofread code, that go over everything they write.), but you will write very inefficient code if you don't actually understand everything that is going on. The most important consideration is efficiency. Sure, you might get lucky/manage to write a method that works, but someone who knows your language cold will probably write something infinitely faster. When you are talking about memory accessing, the difference between a big O(n), and a big O(n^2) or greater, is exponential and therefore enormous. For C specifically, make sure you know everything there is to know about memory storage, allocation, and freeing. A lot of languages allocate and free memory automatically, but this isn't the case for C. If you define something and don't free it, you have a memory leak. Make a memory leak in a method that gets called constantly and you will not only make your program very slow, since it runs out of memory, but also cause it to crash or corrupt data when it does run out. The rule of thumb is anything you allocate you have to free. (There is actually only one command in the C language library that frees memory even though almost all programs construct different implementations of it for different purposes.) Another reason you should go through a beginner book is that you will get refreshed on things that you sort of already know, and it will also give you an idea of key topics to programming that you need to learn more about. If you have any specific questions or something, let me know. Its hard to just splay out "this is how to learn programming" in one forum post. Link to comment Share on other sites More sharing options...
Nightmare_from_hell Posted January 18, 2008 Author Report Share Posted January 18, 2008 Yeah, I know what you mean. I just wanted some specific resources so I could look through 'em. Like memory allocation, I never learned about through my several classes in C++ and Java in high school. That's the kind of thing I want to read up on. I have my beginner programming book that I'm reading through right now, so hopefully I'll be able to bounce back and forth between these different sources and pick up some things as well as solidify my learning. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.