Jump to content
The Dark Mod Forums

C++ Programming Books And Resources?


woah
 Share

Recommended Posts

  • Replies 60
  • Created
  • Last Reply

Top Posters In This Topic

Judging from the performance info on that site, the Java version of Quake runs about as half as fast as the C version of Quake.

 

Not sure which page you're looking at - http://bytonic.de/html/benchmarks.html indicates that the latest version (0.9.4) runs at comparable speed if not faster than the original C.

 

How good is Java memory management? Can you avoid memory fragmentation like you can using C++ by avoiding excessive use of "new" and "delete" by initialising everything you need at the start of the program? I learnt Java but we didn't go into that level of detail.

 

Java takes care of memory automatically, there are certain hints you can give it, like "please run the garbage collector now" or assigning an object to null to get rid of it, but basically the language and runtime environment take the responsibility away from the programmer for almost all memory-related tasks.

 

There is no delete in Java, for this reason.

Link to comment
Share on other sites

Thanks for the recommendations guys. I'll be sure to look into them when I can find enough time.

 

In school, I sort of feel like I'm only getting a quarter of the picture, and it is so unbelievably frustrating when my teachers tell me not to worry about how provided methods work--just to blindly use them. We've gone over many things in Java (data structures, inheritance, etc etc), but I am still completely oblivious as to what the "big picture" is. If I was given an assignment to write a large-scale program, I wouldn't have the slightest idea of where to start; I really don't know how to apply much of what I've learned. All of the projects that I have written for the class in actuality take no more than 10 - 20 minutes to complete, and only cover the basics of the language.

 

It seems that there is so much other shit I should have learned way before even getting into programming. The problem is I don't know where to start. I dont know, maybe I'm just rambling from being extremely tired and drugged up on prednisone. For some reason, I'm unable to comprehend simple sentences at the moment. I can "read" them, but nothing makes sense. I'm going to bed.

Link to comment
Share on other sites

In school, I sort of feel like I'm only getting a quarter of the picture, and it is so unbelievably frustrating when my teachers tell me not to worry about how provided methods work--just to blindly use them.

 

So much for computer science ...

 

 

Well, it's easier for teachers if you blindly follow their teachings. I once had a teacher who hand't had a clue, but in the beginning she covered this well, so I didn't notice it immediately. It came apparent though, when she explained a function (fscanf) and said "This function is dangerous to use because it can screw up your code". I was surprised when I heard that, but I thought that she had some reasons to not go in depth yet. So when we had some exame, I used that function of course in the proper way. I was a bit astonished when she crossed it out and gave me a worse rating for it. When I complained to her about it, I finally realized why she said this is dangerous. Because she didn't know how to use it and instead of looking it up, she just told us not to use it. So I told her to look up the C standardization manual and she did. She corrected it, but she didn't correct my rating though, because suddenly she found some other stuff to complain though (which she "didn't notice before").

 

In programming it's always good to understand how something works. If you are running into straneg bugs, this may be the only way to determine what's wrong. That doesn't mean that you have to memorize every standard function by heart, but it doesn't hurt to take a look at some functions and see how they work.

 

It seems that there is so much other shit I should have learned way before even getting into programming. The problem is I don't know where to start. I dont know, maybe I'm just rambling from being extremely tired and drugged up on prednisone. For some reason, I'm unable to comprehend simple sentences at the moment. I can "read" them, but nothing makes sense. I'm going to bed.

 

How much you want to learn depends on your desire to understand. :) One would say you should start with assembly and others say you should start how a computer is built. :) Understanding assembly definitely helps though in understanding many problems that can not be explained in terms of higher languages.

My collegue argues that in Java there is no NULL pointer reference because you don't need to worry about memory allocations and pointers. I said that this is wrong, and if you look below the hood you can easily construct examples where also in Java you can get such errors. Funnily enough he got a NULL pointer reference only a few hours later, and was perplexed how this came to pass. Just because a higher langauge hides the gory details of a lower leves of the computer doesn't mean that it also makes it go away in all cases. :)

Gerhard

Link to comment
Share on other sites

My collegue argues that in Java there is no NULL pointer reference because you don't need to worry about memory allocations and pointers.

 

Now that's funny, there's even a NullPointerException for goodness sake.

 

It's true that you won't smash the stack with a null pointer, but in any OO language you can create a null reference which causes the program to crash.

Link to comment
Share on other sites

  • 3 months later...
How much you want to learn depends on your desire to understand. smile.gif One would say you should start with assembly and others say you should start how a computer is built. smile.gif Understanding assembly definitely helps though in understanding many problems that can not be explained in terms of higher languages.

 

What would you recommend I start with? :P I have a lot of unemployed time on my hands this summer, and I am enthusiastic about learning learning the "nitty, gritty" details--especially if it will improve the efficiency of my programming. The only problem is I cannot learn such large topics directly through the internet, as there is only one "internet-capable" computer in my house (My particular satellite service cannot be networked. Well, I suppose it can, but the tutorials I have found have either been removed or do not work), and it is also a family shared PC. I would need to learn through books--which I would prefer to staring at a screen for my eyes' sake anyways.

 

EDIT: I forgot to mention that I started reading the Thinking in C++, 2nd Edition text by Bruce Eckel yesterday. I'm already understanding certain topics much more thoroughly.

Edited by woah
Link to comment
Share on other sites

If you also want to understand assembly I can recommend "The Art of Assembly". It's a free bok you can download.

And looking into the STL is also helpfull, but I think it might be a bit to much if you are just learning C++. Then again, it might be better to get acquiated with earlier, even if it may be hard to understand. It's hard to say, because different people have different approaches to how they can learn best.

 

My personal approach is to look for a thing that I want to do, and then try to do it, learning in the process of doing it. Some are more inclined to learn by reading books and trying the examples that are given.

Gerhard

Link to comment
Share on other sites

  • 3 weeks later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share


  • Recent Status Updates

    • peter_spy

      What a lovely game, perfect way to relax before sleep.
      · 2 replies
    • STiFU

      Anyone here clocking in some times in Neon Light?
      · 0 replies
    • JackFarmer

      Boris Johnson's resignation does not change the fact that Australia is home to 29 million kangaroos and Wales has a population of just over three million.

      If the Australian kangaroos were to invade Wales, one resident would have to fight almost ten kangaroos at a time.
      · 8 replies
    • peter_spy

      Deathloop – what a mess of a game. I'd love to see a post-mortem on it some day. I hope Arkane is doing okay though.
      · 27 replies
    • OrbWeaver

      I like house-cleaning and taking out the trash.
      · 3 replies
×
×
  • Create New...