Author Topic: Kazan Vs Java  (Read 11145 times)

0 Members and 3 Guests are viewing this topic.

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
The lessons you learn about OO studying Java are pretty much directly applicable to C++ (but not C ).

It's probably easier to go from C++ to Java than the other way round but it's not a huge problem in either direction.
Karajorma's Freespace FAQ. It's almost like asking me yourself.

[ Diaspora ] - [ Seeds Of Rebellion ] - [ Mind Games ]

 

Offline Kazan

  • PCS2 Wizard
  • 212
  • Soul lives in the Mountains
    • http://alliance.sourceforge.net
It's probably easier to go from C++ to Java than the other way round but it's not a huge problem in either direction.

for an astute person who knows what they're getting into

i've seen too many snot-nosed plebes with less-than-sufficient-cluecount learn java and then when they start writting C++ their programs leak memory like whores because they cannot get the delete call into their heads no matter how many times you explain it.
PCS2 2.0.3 | POF CS2 wiki page | Important PCS2 Threads | PCS2 Mantis

"The Mountains are calling, and I must go" - John Muir

 

Offline Polpolion

  • The sizzle, it thinks!
  • 211
*scared of Kazan

:shaking:

I not quite sure I want to try to taking programming courses anymore.

*hopes that programing 1&2 are c++

 
*scared of Kazan

:shaking:

I not quite sure I want to try to taking programming courses anymore.

*hopes that programing 1&2 are c++

Haha they should be in Pascal, thats what mine were  :lol:
That's cool and ....disturbing at the same time o_o  - Vasudan Admiral

"Don't play games with me. You just killed someone I like, that is not a safe place to stand. I'm the Doctor. And you're in the biggest library in the universe. Look me up."

"Quick everyone out of the universe now!"

 

Offline Polpolion

  • The sizzle, it thinks!
  • 211
Hey, wait: I have a question:

Umm... If one were to hypotheticly... uhh... aspire to code for FSO, what language would have to, uhh... be fluent in? Is it C or C++ (or neither)?

:nervous:

 

Offline Bobboau

  • Just a MODern kinda guy
    Just MODerately cool
    And MODest too
  • 213
it would be best if you knew how to write c++ as c
Bobboau, bringing you products that work... in theory
learn to use PCS
creator of the ProXimus Procedural Texture and Effect Generator
My latest build of PCS2, get it while it's hot!
PCS 2.0.3


DEUTERONOMY 22:11
Thou shalt not wear a garment of diverse sorts, [as] of woollen and linen together

 
it would be best if you knew how to write c++ as c

Without classes? I could see how classes would make FSO a bit more easier to mod.
That's cool and ....disturbing at the same time o_o  - Vasudan Admiral

"Don't play games with me. You just killed someone I like, that is not a safe place to stand. I'm the Doctor. And you're in the biggest library in the universe. Look me up."

"Quick everyone out of the universe now!"

 

Offline Bobboau

  • Just a MODern kinda guy
    Just MODerately cool
    And MODest too
  • 213
well FS was originally coded as C, then later they upgraded to C++, so it's mostly C but it uses a few of the nifty tricks C++ added in a few places.
Bobboau, bringing you products that work... in theory
learn to use PCS
creator of the ProXimus Procedural Texture and Effect Generator
My latest build of PCS2, get it while it's hot!
PCS 2.0.3


DEUTERONOMY 22:11
Thou shalt not wear a garment of diverse sorts, [as] of woollen and linen together

 
Hey, wait: I have a question:

Umm... If one were to hypotheticly... uhh... aspire to code for FSO, what language would have to, uhh... be fluent in? Is it C or C++ (or neither)?

:nervous:

My bad, I misread it as write FSO from the ground up.  At which point I would definetely write it in C++, if starting fresh.
That's cool and ....disturbing at the same time o_o  - Vasudan Admiral

"Don't play games with me. You just killed someone I like, that is not a safe place to stand. I'm the Doctor. And you're in the biggest library in the universe. Look me up."

"Quick everyone out of the universe now!"

 

Offline Bobboau

  • Just a MODern kinda guy
    Just MODerately cool
    And MODest too
  • 213
well, in a game speed is the key, and you wouldn't want to over do the OO stuff, it might be more organized and easier to write but it can also be slower if you are not VERY careful, C style coding has fewer pitfalls in this regard.
Bobboau, bringing you products that work... in theory
learn to use PCS
creator of the ProXimus Procedural Texture and Effect Generator
My latest build of PCS2, get it while it's hot!
PCS 2.0.3


DEUTERONOMY 22:11
Thou shalt not wear a garment of diverse sorts, [as] of woollen and linen together

 

Offline WMCoolmon

  • Purveyor of space crack
  • 213
I don't see any reason to learn C++ as opposed to learning C and then upgrading to C++.

There's so little difference between the two in the FS2 code that I find it bizarre how big of a deal people make out of the difference between the two in discussions here. FS2 barely uses any of STL, and I'd guess at least 90% of the functions are only object-oriented in that they're prefixed with "ship_" in the name and are meant to be used with a ship pointer (or weapon_, object_, etc). The other 10% is either new stuff or the audiostream code.
-C

 

Offline Bobboau

  • Just a MODern kinda guy
    Just MODerately cool
    And MODest too
  • 213
99.9% of the STL it does use is new stuff. I don't think V used any STL except the odd function or two.
Bobboau, bringing you products that work... in theory
learn to use PCS
creator of the ProXimus Procedural Texture and Effect Generator
My latest build of PCS2, get it while it's hot!
PCS 2.0.3


DEUTERONOMY 22:11
Thou shalt not wear a garment of diverse sorts, [as] of woollen and linen together

 

Offline Flipside

  • əp!sd!l£
  • 212
Yeah, programming is fun, but whilst I was doing the first year course, which is was just Pascal and VB, the most painful part was looking at some of the other guys programs... Here is an example...

We were given a condition to write a game that involved 'pairs', as in you select a card, select another, and if they match, you up the score and keep them turned, else turn them back after 1 second.

One of the first thoughts that entered my head was 'Collection', simply throw all your pictureboxes into one collection, and then you can use Sender and a quickl check loop to find out which button was pressed. Not diifficult, once you get your head around the  idea of a collection.

The usual solution from trainees was to write 36 If-Then statements, one for each card clicked..... It's the sort of thing to make someone who was used to coding with 32K of memory cry :(

 

Offline IPAndrews

  • Disgruntled Customer
  • 212
  • This site stole my work
We set students a problem of writing a battleships game. Ships placed on a 10x10 game grid. The player enterred X Y co-ords and the game reported if the shot was a hit or a miss. The solution we were looking for was a two dimensional array storing the contents of the game squares which is interrogated by an if statement. What we got instead was.

If x=1 and y=1 then print "hit"
If x=2 and y=1 then print "miss"
If x=3 and y=1 then print "hit"
(repeat 97 more times and pardon my use of BASIC)
Be warned: This site's admins stole 100s of hours of my work. They will do it to you.

 

Offline Flipside

  • əp!sd!l£
  • 212
:lol: It's kind of funny thinking that I started off learning Basic from an Oric-1 Manual, and then got an Amstrad and started learning Z80 machine code without any help from school at all.

In fact the only language that almost made me give up coding was 6502 machine code. Have you ever tried writing in a language that has no registers larger than one byte? Simply working out a relative address was a nightmare :(

 

Offline Polpolion

  • The sizzle, it thinks!
  • 211
All I can program is a graphing calculator. :(

I made this one program that counts :drevil:. It's like, 5 lines. I shall teach myself C or C++ this summer in my spare time, though. :nod:

 

Offline Bobboau

  • Just a MODern kinda guy
    Just MODerately cool
    And MODest too
  • 213
that's how I got started, making programs to do my math homework for me on a TI83.
Bobboau, bringing you products that work... in theory
learn to use PCS
creator of the ProXimus Procedural Texture and Effect Generator
My latest build of PCS2, get it while it's hot!
PCS 2.0.3


DEUTERONOMY 22:11
Thou shalt not wear a garment of diverse sorts, [as] of woollen and linen together

 
LOL I programmed my TI85 and managed to pass stats class with it  :lol:
That's cool and ....disturbing at the same time o_o  - Vasudan Admiral

"Don't play games with me. You just killed someone I like, that is not a safe place to stand. I'm the Doctor. And you're in the biggest library in the universe. Look me up."

"Quick everyone out of the universe now!"

 

Offline Topgun

  • 210
Real programers write in assembly code!!! :pimp:

  
Real programmers write in machine code!  :eek2:
That's cool and ....disturbing at the same time o_o  - Vasudan Admiral

"Don't play games with me. You just killed someone I like, that is not a safe place to stand. I'm the Doctor. And you're in the biggest library in the universe. Look me up."

"Quick everyone out of the universe now!"