Page 3 of 3 FirstFirst 123
Results 33 to 43 of 43

Thread: Learning C++ how to go about it?

  1. #33
    Senior Member
    Join Date
    Jan 2005
    Location
    Manchester
    Posts
    2,901
    Thanks
    67
    Thanked
    182 times in 136 posts
    • Butcher's system
      • Motherboard:
      • MSI Z97 Gaming 3
      • CPU:
      • i7-4790K
      • Memory:
      • 8 GB Corsair 1866 MHz
      • Storage:
      • 120GB SSD, 240GB SSD, 2TB HDD
      • Graphics card(s):
      • MSI GTX 970
      • PSU:
      • Antec 650W
      • Case:
      • Big Black Cube!
      • Operating System:
      • Windows 7

    Re: Learning C++ how to go about it?

    Quote Originally Posted by happytechie View Post
    Has he ever tried to build software in a commercial environment with a team of 5 or more programmers without using OO?
    I have, it works just fine.

    OO is a useful tool, but it's not "The One True Programming Style" or anything.

  2. #34
    Pseudo-Mad Scientist Whiternoise's Avatar
    Join Date
    Apr 2006
    Location
    Surrey
    Posts
    4,274
    Thanks
    166
    Thanked
    386 times in 233 posts
    • Whiternoise's system
      • Motherboard:
      • DFI LANPARTY JR P45-T2RS
      • CPU:
      • Q6600
      • Memory:
      • 8GB DDR2
      • Storage:
      • 5.6TB Total
      • Graphics card(s):
      • HD4780
      • PSU:
      • 425W Modu82+ Enermax
      • Case:
      • Silverstone TJ08b
      • Operating System:
      • Win7 64
      • Monitor(s):
      • Dell 23" IPS
      • Internet:
      • 1Gbps Fibre Line

    Re: Learning C++ how to go about it?

    If you want to get into game programming, get yourself a flash card and a ds and learn on that. There are a number of homebrew libraries for it, including the popular PaLib. You can also code using C++ and the nds library if you want to mess with more low level stuff. (PaLib is also a C++ library)
    Last edited by Whiternoise; 12-05-2008 at 12:10 AM.

  3. #35
    Senior Member
    Join Date
    Jan 2005
    Location
    Manchester
    Posts
    2,901
    Thanks
    67
    Thanked
    182 times in 136 posts
    • Butcher's system
      • Motherboard:
      • MSI Z97 Gaming 3
      • CPU:
      • i7-4790K
      • Memory:
      • 8 GB Corsair 1866 MHz
      • Storage:
      • 120GB SSD, 240GB SSD, 2TB HDD
      • Graphics card(s):
      • MSI GTX 970
      • PSU:
      • Antec 650W
      • Case:
      • Big Black Cube!
      • Operating System:
      • Windows 7

    Re: Learning C++ how to go about it?

    Quote Originally Posted by staffsMike View Post
    Have to chime in again with my negative views..

    Games programming is some of the most boring programming I have come across in my 3 years of Uni. I actually was on Game Programming for a semester and had to swap to computer science as it was so dull and in my particular university, badly taught imo.
    I disagree, having been games programming for 6 years now, I still really enjoy it.

    But it's definitely something you have to enjoy to get on with - if you don't like it, don't even try to get into games, there's better money to be made elsewhere. Games is quite competitive too, especially at graduate level.

    Quote Originally Posted by Rosaline View Post
    Game development courses are not necessarily the best route to take at all, there is debate within the industry over how well they can actually teach game development itself as well as the quality of their teaching for the more traditional material.
    Games dev courses are largely useless IME - you're just as likely to get a job with a normal CS degree as with a games specific degree.


    FWIW, C++ is definitely still the gamedev language of choice, by far.

  4. #36
    HEXUS.social member finlay666's Avatar
    Join Date
    Aug 2006
    Location
    Newcastle
    Posts
    8,546
    Thanks
    297
    Thanked
    894 times in 535 posts
    • finlay666's system
      • CPU:
      • 3570k
      • Memory:
      • 16gb
      • Graphics card(s):
      • 6950 2gb
      • Case:
      • Fractal R3
      • Operating System:
      • Windows 8
      • Monitor(s):
      • U2713HM and V222H
      • Internet:
      • cable

    Re: Learning C++ how to go about it?

    Quote Originally Posted by happytechie View Post
    Has he ever tried to build software in a commercial environment with a team of 5 or more programmers without using OO?
    He used to write software used for keeping aeroplanes up in the air using it IIRC
    H3XU5 Social FAQ
    Quote Originally Posted by tiggerai View Post
    I do like a bit of hot crumpet

  5. #37
    Seething Cauldron of Hatred TheAnimus's Avatar
    Join Date
    Aug 2005
    Posts
    17,168
    Thanks
    803
    Thanked
    2,152 times in 1,408 posts

    Re: Learning C++ how to go about it?

    Quote Originally Posted by Steve View Post
    Oh god, Haskell.

    Almost as horrible as Occam, but not quite.
    Indeed, the only people i've come accross who sing the merrits of haskel, are almost always from Imperial!

    Quote Originally Posted by happytechie View Post
    Has he ever tried to build software in a commercial environment with a team of 5 or more programmers without using OO?

    ......

    Has anyone seen any research lately on what languages are being asked for in job adverts?
    Modular developement, even assiging ownership and responisibility to a function (method or procedure) level is common. The language, or design paradign should have no problem fitting in.

    As for jobs determining your language, theres no garentee that the job market will be the same in 2 years time. There was a major C++ shortage in finance 3 months ago, but now thanks largerly to layoff of middle office staff, there seams to be a practical glut, in no small way due to one firm. My point is that you should really try to master the concepts behind as many different languages as possible, you should be able to switch between C# and Java with absolute ease. But without a through understanding you can't go between CameL and C#.


    Quote Originally Posted by Butcher View Post
    IGames dev courses are largely useless IME - you're just as likely to get a job with a normal CS degree as with a games specific degree.
    I'd have to strongly agree, with a lot of these specialist courses it seams that no one actually gets a job with them.

    The thing is enjoying it is largely dependant on the company you work for. Guessing yours isn't an EA slave driven one.
    throw new ArgumentException (String, String, Exception)

  6. #38
    Comfortably Numb directhex's Avatar
    Join Date
    Jul 2003
    Location
    /dev/urandom
    Posts
    17,074
    Thanks
    228
    Thanked
    1,026 times in 677 posts
    • directhex's system
      • Motherboard:
      • Asus ROG Strix B550-I Gaming
      • CPU:
      • Ryzen 5900x
      • Memory:
      • 64GB G.Skill Trident Z RGB
      • Storage:
      • 2TB Seagate Firecuda 520
      • Graphics card(s):
      • EVGA GeForce RTX 3080 XC3 Ultra
      • PSU:
      • EVGA SuperNOVA 850W G3
      • Case:
      • NZXT H210i
      • Operating System:
      • Ubuntu 20.04, Windows 10
      • Monitor(s):
      • LG 34GN850
      • Internet:
      • FIOS

    Re: Learning C++ how to go about it?

    the core of game programming is hard - lots of nasty physics stuff, time-dependent, etc. there's a reason game programming wasn't a module until 4th year at southampton. and that most game engines are horrible messes that would make you run in terror

  7. #39
    Senior Member
    Join Date
    Jul 2007
    Posts
    524
    Thanks
    78
    Thanked
    67 times in 47 posts

    Re: Learning C++ how to go about it?

    I've been spending far too long immersed in Java at the moment, and have been proving exactly why it is good to learn both a weakly typed language like C/C++ and a more strongly typed one like Java (although Java's typing system isn't quite as complete).

    Unless you learn both, the differences between the two forms will drive you completely and utterly up the wall and result in all kinds of annoyances in adapting across.

    Either you'll end up desiring the proper code layout of of the full type conversions or checks when having to code in a weakly typed language, or find yourself having to use a strongly typed one and being driven crazy by having to do that

    Argh!

  8. #40
    Get in the van. Fraz's Avatar
    Join Date
    Aug 2007
    Location
    Bristol
    Posts
    2,919
    Thanks
    283
    Thanked
    396 times in 230 posts
    • Fraz's system
      • Motherboard:
      • Gigabyte X58A-UD5
      • CPU:
      • Watercooled i7-980X @ 4.2 GHz
      • Memory:
      • 24GB Crucial DDR3-1333
      • Storage:
      • 240 GB Vertex2E + 2 TB of Disk
      • Graphics card(s):
      • Water-cooled Sapphire 7970 @ 1175/1625
      • PSU:
      • Enermax Modu87+
      • Case:
      • Corsair 700D
      • Operating System:
      • Linux Mint 12 / Windows 7
      • Monitor(s):
      • Dell 30" 3008WFP and two Dell 24" 2412M
      • Internet:
      • Virgin Media 60 Mbps

    Re: Learning C++ how to go about it?

    In what way is C++ weakly typed?

  9. #41
    Senior Member
    Join Date
    Jul 2007
    Posts
    524
    Thanks
    78
    Thanked
    67 times in 47 posts

    Re: Learning C++ how to go about it?

    For a given Object o:

    C++ allows:
    if (o) {...}

    Whereas Java forces
    if (o != null) {...}

    Also, checking for a valid return in C++ can be done via
    if (result = functioncall() ) {...}

    whereas Java similarly requires that you convert to a boolean
    if (0 != (result = functioncall()) {..}

    The difference is that C++ lets you treat almost anything as a boolean operation. Partially this is down to the pointer based implementation, however that happens at a later stage - the compiler has access to all the information it needs to be more strongly typed.

    Compared to some weakly and strongly are comparisons, so C++ is definately stronger typed than some other languages, yes, but compared to newer ones it is weak.

    And I should note that the C++ examples above are probably best considered poor practice, as explicit coding is better than implicit. Having learnt to program via Object Pascal (Delphi), I used to prefer the explicit form. However I have become overly used to the implicit form, and there is a certain beauty and simplicity to it once you understand how it works.

  10. #42
    Seething Cauldron of Hatred TheAnimus's Avatar
    Join Date
    Aug 2005
    Posts
    17,168
    Thanks
    803
    Thanked
    2,152 times in 1,408 posts

    Re: Learning C++ how to go about it?

    Ah to be fair this isn't week typing, this is one of my pet hates.

    Implicit Casts.

    ie, its perfectly fine to convert a byte upto an int without the need for an explicit cast, because no loss of data will occur.

    And this has some great useages, for instance in C# say one has a dictionary, they have a class which has a unique ID (for databasing) and you have about 100,000 of them. You can get a hudge increase by creating a struct (which isn't a reference type, litterally stored) which consists of the unique id, and a pointer to the class. You then declair the dictionary to be indexed by the struct. Define an implict cast for going from the class to the struct. You can then have amazing performance in your hashing, without anyone who uses that dictionary realise whats going on. This is a really nice change that can be made to existing code bases, that leverages implicit casting well.

    sticking with .Net (as it is my true love) we can find an AWFUL AWFUL AWFUL use of an implicit cast in a strongly typed language.

    Lots of SQL systems can't store datetimes that go beyound a certain point. The Native DateTime can. So you might think you want something like

    DateTime dateTimeInput = DateTime.MinValue;
    if (dateTimeInput < SqlDateTime.MinValue)
    dateTimeInput = SqlDateTime.MinValue;

    would ensure that dateTimeInput was never below the bounds of the database server.

    its not. Because some utter rubbishrubbishrubbishrubbish, put an implicit cast conversion going from DateTime to SqlDateTime. Meaning you get an arithmetic overflow as the compiler sees
    if (SqlDateTime)dateTimeInput < SqlDateTime.MinValue)

    This is why implicit casting is bad.

    Also you can get a performance hit as you stop certain optomisations in a C++ compiler when you go from a bool to a short say.
    throw new ArgumentException (String, String, Exception)

  11. #43
    Get in the van. Fraz's Avatar
    Join Date
    Aug 2007
    Location
    Bristol
    Posts
    2,919
    Thanks
    283
    Thanked
    396 times in 230 posts
    • Fraz's system
      • Motherboard:
      • Gigabyte X58A-UD5
      • CPU:
      • Watercooled i7-980X @ 4.2 GHz
      • Memory:
      • 24GB Crucial DDR3-1333
      • Storage:
      • 240 GB Vertex2E + 2 TB of Disk
      • Graphics card(s):
      • Water-cooled Sapphire 7970 @ 1175/1625
      • PSU:
      • Enermax Modu87+
      • Case:
      • Corsair 700D
      • Operating System:
      • Linux Mint 12 / Windows 7
      • Monitor(s):
      • Dell 30" 3008WFP and two Dell 24" 2412M
      • Internet:
      • Virgin Media 60 Mbps

    Re: Learning C++ how to go about it?

    Yes, implicit casting indeed = meh. Although I do rather like the way 0 is false and everything else is true in C++.

    C++ is a strongly typed language. Look at Python, for instance, if you want a weakly typed one. I've had plenty of headaches wrapping a C++ library in Python due to Python's weak typing. Grrr.

Page 3 of 3 FirstFirst 123

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Learning to swim, any tips?
    By Parm in forum Sports and Fitness
    Replies: 39
    Last Post: 10-02-2008, 05:21 PM
  2. Learning Guitar
    By Drobbins in forum General Discussion
    Replies: 16
    Last Post: 19-02-2007, 03:00 PM
  3. My First Car and learning to drive
    By RoGuE|SaBeR in forum Automotive
    Replies: 21
    Last Post: 25-05-2006, 09:27 AM
  4. Learning C#
    By ctid in forum Software
    Replies: 9
    Last Post: 02-02-2006, 02:54 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •