Java-Gaming.org    
Featured games (91)
games approved by the League of Dukes
Games in Showcase (577)
games submitted by our members
Games in WIP (498)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  Any good reasons to learn c/c++?  (Read 1655 times)
0 Members and 1 Guest are viewing this topic.
Offline SpiritWolf

Senior Newbie




Java games rock!


« Posted 2005-06-11 13:06:22 »

Hello everyone.

I was wondering if there is any good reason to learn c or c++ once you know java pretty well. Are there any benefits at all or is it a waste of time?
Offline princec

JGO Kernel


Medals: 282
Projects: 3
Exp: 16 years


Eh? Who? What? ... Me?


« Reply #1 - Posted 2005-06-11 13:35:54 »

It will be extremely beneficial to learn C (not necessarily C++), because you'll begin to understand how the JVM is written and why it works the way it does. You get to learn in much greater depth about how the whole end-to-end process of making the machine do things works - memory bandwidth, cache pollution, etc.

There are places where C and C++ still rule and it's always good to know you can get down and dirty with it if you have to.

Cas Smiley

Offline nonnus29

Senior Member




Giving Java a second chance after ludumdare fiasco


« Reply #2 - Posted 2005-06-11 14:01:36 »

You will definitly grow to appreciate Java more if you do learn C and fight with pointers for a while. 

Learning 'the assembler of your choice' teaches you alot about how the machine actually operates, more so than C.

It's not a waste of time if you enjoy it  Wink .
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline woogley
« Reply #3 - Posted 2005-06-11 14:31:40 »

the more programming languages you know, the more likely you'll get a job in programming Wink
Offline K.I.L.E.R

Senior Member




Java games rock!


« Reply #4 - Posted 2005-06-11 14:34:38 »

You will only fight with pointers if you have a bad design.
I've never had to fight with pointers, in fact pointers made it easier for me to get things done.

Pointers are only a problem in a bad design.

Anyway, my computer graphics class uses C to work with OGL. There are reasons as to why they do this. I don't know what they are though but I believe it has something to do with C still being important.


You will definitly grow to appreciate Java more if you do learn C and fight with pointers for a while. 

Learning 'the assembler of your choice' teaches you alot about how the machine actually operates, more so than C.

It's not a waste of time if you enjoy it  Wink .

Vorax:
Is there a name for a "redneck" programmer?

Jeff:
Unemployed. Wink
Offline SpiritWolf

Senior Newbie




Java games rock!


« Reply #5 - Posted 2005-06-11 16:00:33 »

Thanks everyone!

It looks like C might actually be helpful. I could even use eclipse for development with some plugins, which is a big plus. Theres also plenty of code written in C which is a good reason to learn it.  Is there a place I can learn all about the language syntax and standard library? what about  "The C Programming Language" don't they call this K&R? Thanks again for the help! I hope that's not too many questions..
Offline Bombadil

Senior Member





« Reply #6 - Posted 2005-06-11 16:41:49 »

I was wondering if there is any good reason to learn c or c++ once you know java pretty well. Are there any benefits at all or is it a waste of time?
Usually it's a complete waste of time.
Except in case your boss absolutely needs you to use it.

The usual way of many long time programmers has been: assembler, C (1), C++ (2), then a real OO high-level language like Java or nowadays the Java clone C# (from the Delphi guy) + NET. Some of course started with Cobol and will end with it. :-)
Usually it's not neccessary to go the way backwards however.

In case you want to spend your limited time on applications and games, not low-level tools/drivers/etc, there's no need to learn assembler or its C wrappers.


(1) which is a macro assembler.
(2) which is an object orientated macro assember.
    Because most C fans started to use C++ one day, they continued to write C programs in C++.
Offline Raghar

Junior Member




Ue ni taete 'ru hitomi ni kono mi wa dou utsuru


« Reply #7 - Posted 2005-06-11 23:49:12 »

It will be extremely beneficial to learn C (not necessarily C++), because you'll begin to understand how the JVM is written and why it works the way it does. You get to learn in much greater depth about how the whole end-to-end process of making the machine do things works - memory bandwidth, cache pollution, etc.

Don't you say. It's actually unimportant to learn C++ to understant how compilers work. The real important thing, to learn how CPU works, is hard to do from C, it's MUCH more direct and easy from assembly. Some programmers were able to get a clue from drawing of CPU, the others from some nasty tests and hard 20 hours of programming.

Of course there are numerous articles, and arstechnica.com.


Optimalization of cache by C++ programmer could be called an reordering and additing few compile switches by an optimist. (Remember a fire of an optimist from Terry Pratchet book? Two wood pieces and a disapearing smoke.)

BTW a some test C++ knowledge. You have on your computer a few compiled .obj files (COFF), you know names of methods that needs to be exported in a library, you know name of library. You have cl.exe, and link.exe. You can't receive any other manual, programs, or anything. Your CEO was pissed locked the door, computer isn't connected to any network for security reasons, and you need to create a windoze dll file until he returns.
And of course you can't recompile source files.


If you REALLY know C, you should find a solution, otherwise you are slave of an IDE.
Offline Raghar

Junior Member




Ue ni taete 'ru hitomi ni kono mi wa dou utsuru


« Reply #8 - Posted 2005-06-11 23:58:29 »

And when I talked about assembly...
1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
19  
20  
21  
22  
23  
24  
25  
.686
.flat, stdcall
OPTION casemap:none

include masm/includes/windows.inc
include masm/includes/user32.inc
includelib masm/includes/user32.lib


.data

message1 db "This is message of a really simple ASM program",0
message2 db "name of window",0
message3 db "This program would terminate, if you will see an error window don t be lazy and append call to ExitProcess,0 to the end of the program",0

.code

fromthisline:

invoke MessageBoxA 0, addr message1, addr message2, 0

invoke MessageBoxA 0, addr message3, addr message2, 0
mov eax, 0

end fromthisline

It might work, I didn't tested it. It would give a feeling of a "low" level language.
Offline William Denniss

JGO Coder


Projects: 2


Fire at will


« Reply #9 - Posted 2005-06-12 07:03:40 »

you will love Java twice as much, especially the javadocs!

Sure, ANSI C is well documented, but APIs things like GTK -- yuk!    The Javadocs are wonderful -- and they have the lovely "@since" and "@deprecated" tags!

Will.

Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline zingbat

Senior Member




Java games rock!


« Reply #10 - Posted 2005-06-12 21:52:19 »

you will love Java twice as much, especially the javadocs!

Sure, ANSI C is well documented, but APIs things like GTK -- yuk!    The Javadocs are wonderful -- and they have the lovely "@since" and "@deprecated" tags!

Will.

Too bad that people still make documentation like if they were programming in C. Just document 50% of it and let people guess the rest. Sometimes i even see apis with generated javadoc dcumentation almost made of empty tags.
Pages: [1]
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

xsi3rr4x (23 views)
2014-04-15 18:08:23

BurntPizza (18 views)
2014-04-15 03:46:01

UprightPath (32 views)
2014-04-14 17:39:50

UprightPath (16 views)
2014-04-14 17:35:47

Porlus (32 views)
2014-04-14 15:48:38

tom_mai78101 (58 views)
2014-04-10 04:04:31

BurntPizza (116 views)
2014-04-08 23:06:04

tom_mai78101 (216 views)
2014-04-05 13:34:39

trollwarrior1 (183 views)
2014-04-04 12:06:45

CJLetsGame (190 views)
2014-04-01 02:16:10
List of Learning Resources
by Longarmx
2014-04-08 03:14:44

Good Examples
by matheus23
2014-04-05 13:51:37

Good Examples
by Grunnt
2014-04-03 15:48:46

Good Examples
by Grunnt
2014-04-03 15:48:37

Good Examples
by matheus23
2014-04-01 18:40:51

Good Examples
by matheus23
2014-04-01 18:40:34

Anonymous/Local/Inner class gotchas
by Roquen
2014-03-11 15:22:30

Anonymous/Local/Inner class gotchas
by Roquen
2014-03-11 15:05:20
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!