Home | Community | Message Board

MagicBag Grow Bags
This site includes paid links. Please support our sponsors.


Welcome to the Shroomery Message Board! You are experiencing a small sample of what the site has to offer. Please login or register to post messages and view our exclusive members-only content. You'll gain access to additional forums, file attachments, board customizations, encrypted private messages, and much more!

Myyco.com Shop: Golden Teacher Liquid Culture For Sale, Isolated Cubensis Liquid Culture For Sale

Jump to first unread post Pages: | 1 | 2 | 3 |  [ show all ]
Re: Anyone here know java? [Re: Legend9123]
    #6860409 -

You worked on the Phoenix Mars Lander? COOL!

The lab where I work at all the heavy duty computation simulation stuff are in c++.

Games:

A excellent place to start learning is here:

gamedev.net for beginners

For games I suggest starting out with learning c++. To me c++ is more close to the metal, it will teach you things that will be relevant later on when you do performance oriented code. It's not a substitute for a course in assembly, O.S, and hardware architecture class tho. Those will teach you about not to doing stupid things in your code.

If you really want to do games you need a lot of math. You don't have to be a math major but I'm telling you the more math you know the better off you are. Learn some linear algebra to start you off.

Really you should look into computer science/engineering/mathematics as a major.

If you want to do it as a hobby you still need to know these topics.

Also as with anything practice, practice, practice!


--------------------
Be like water my friend!

Extras: Filter Print Post Top
Re: Anyone here know java? [Re: Legend9123]
    #6860425 -

Maybe I will start on C++. Seemed really difficult to learn though. I find myself to be fairly intelligent when it comes to working with computers. I have had a monitor in front of my face since I was 10, with the original Apple II


I think I get frustrated to easily.


--------------------
---------------------------------------------------
Sit up and meditate, there's no time to contemplate.
-------------------------------------------------
I have an international Hitech Psytrance project with a friend: BioChronic
I make various form of Psytrance as a solo Project Dendriform

Extras: Filter Print Post Top
Re: Anyone here know java? [Re: Psy Baba]
    #6860449 -

It's not really that difficult once you start!

Take small steps you will be fine.


--------------------
Be like water my friend!

Extras: Filter Print Post Top
Re: Anyone here know java? [Re: SymmetryGroup8]
    #6860465 -

ON second thought I don't mean learn linear algebra by reading a text book lol.

I mean buy an OpenGL book. It will get you started with doing simple 3D graphics stuff, you can pick up some linear algebra this way.


--------------------
Be like water my friend!

Edited by SymmetryGroup8 (05/01/07 10:04 PM)

Extras: Filter Print Post Top
Re: Anyone here know java? [Re: SymmetryGroup8]
    #6860533 -

Then maybe I shall !! :laugh:.


--------------------
---------------------------------------------------
Sit up and meditate, there's no time to contemplate.
-------------------------------------------------
I have an international Hitech Psytrance project with a friend: BioChronic
I make various form of Psytrance as a solo Project Dendriform

Extras: Filter Print Post Top
Re: Anyone here know java? [Re: SymmetryGroup8]
    #6860730 -

SymmetryGroup8 said:
You worked on the Phoenix Mars Lander? COOL!




Yeah I was part of a team that did metrics and analysis on Phoenix, GLAST, STEREO, and several other spacecraft.


--------------------
Those who would give up a little freedom to get a little security shall soon have neither.
-Benjamin Franklin

Extras: Filter Print Post Top
Re: Anyone here know java? [Re: phi1618]
    #6861033 -

phi1618 said:
You could also try C++. It's popular, but in some ways it's harder to learn than Java or C#. It allows you to use pointers (IMO these should be avoided in most code).



That should be subtexted "the way most teach it".

Quote:
By default, C++ doesn't have garbage collection, meaning that you have to free memory manually using the delete opperator.



Only if you use the "new" operator.  Whenever you use the new operator and you don't wish to keep track of the corresponding delete, simply encapsulate it in a class with a destructor (in fact, you should almost ALWAYS do this -  class factories are the shit!).  Yes, you still manually had to write "new" and "delete" but you only had to do it once and you're assured one will follow the other.  There is no garbage collection unless you implement in a way similar to what I just mentioned or you use a method like the following...
Quote:
You can use libgc to avoid memory-management related errors.



Don't do this, really; libgc is some Sun thing to try and make C++ more Java-y.  It's not.  There are tons of garbage collection APIs similar to libgc and what they usually amount to is modifying malloc and several other primative functions.  This is not and never will be a replacement for proper object oriented design which takes its own garbage collection into account WHEN necessary.

Quote:
Basically, C++ forces you to worry about details unrelated to the code you're trying to write.



Sometimes.  Sometimes, it doesn't.  This happens in places with any language.  Let's see the java detail-less implementation for the following:
Code:
std::string sMyString("Some string for testing!");
std::string::iterator it;
for (it = sMyString.begin(); it != sMyString.end(); ++it)
{
*it = SwapCase(*it);
}
// Produces "sOME STRING FOR TESTING!" assuming SwapCase will change case of a character


Pretty detail-free implementation in C++ of creating a string, allocating its memory, filling it, iterating over each character, swapping the case of the character, and deallocating memory (through the destructor of std::basic_str).  Anything keeping track of an index is too many details [for this].  Anything [explicity] using new and delete is too many details [for this].
Quote:
Really, the language you choose isn't nearly as important as getting started and doing some stuff.



This is the best advice in here and basically all I am trying to say :thumbup:


--------------------
delta9

Extras: Filter Print Post Top
Re: Anyone here know java? [Re: delta9]
    #6861242 -

Well yeah, you're using STL.

Java has build in String support. I have been up for like 24 hours but I will post something later.

The thing with new and delete, yeah if it's properly implemented sure. For beginners they may shoot themselves in the foot. With Java it's automatic.

The dude wants to learn game programming hence it's better imho to start with c++ since most games are developed using it.

But you can use whatever.


--------------------
Be like water my friend!

Extras: Filter Print Post Top
Re: Anyone here know java? [Re: SymmetryGroup8]
    #6861325 -

STL is C++; it's guaranteed to be implemented by a C++ specification compliant compiler vendor. Not using STL is not using C++, it's using C with a C++ compiler and some C++ constructs and conventions (at least the way most people do it).


--------------------
delta9

Extras: Filter Print Post Top
Re: Anyone here know java? [Re: delta9]
    #6861398 -

My school's unix server is preforming like shit due to all of the intro kids trying compiling and running their buggy programs with seg faults and memory leaks :lol:

bastards



Although I'll admit linked lists were a bitch to learn

Extras: Filter Print Post Top
Re: Anyone here know java? [Re: Boom]
    #6861416 -

Yeah, and they don't get taught how to use the STL, generally, they're just learning "programming" and it happens to be in C++.


--------------------
delta9

Extras: Filter Print Post Top
Re: Anyone here know java? [Re: delta9]
    #6861423 -

right

we had to implement our own version of the <list> library, basically (along with our own stack, and queue)


which as a fundamental I suppose is a good thing

Extras: Filter Print Post Top
Re: Anyone here know java? [Re: Boom]
    #6861442 -

Yeah, it's bullshit.


--------------------
delta9

Extras: Filter Print Post Top
Re: Anyone here know java? [Re: delta9]
    #6862022 -

C++
Quote:
std::string sMyString("Some string for testing!");
std::string::iterator it;
for (it = sMyString.begin(); it != sMyString.end(); ++it)
{
*it = SwapCase(*it);
}
// Produces "sOME STRING FOR TESTING!" assuming SwapCase will change case of a character




Strings are generally immutable in C# and Java, so the code you write doesn't translate cleanly with typical idioms (not saying there isn't a hack). The natural thing to do in these languages is create a new string.

C#

String myString = "Some string for testing!";
StringBuilder newString = new StringBuilder(myString.Length);
foreach(char c in sMyString)
{
newString.Append(SwitchCase(c));
}


public static char SwitchCase(char c)
{
return Char.IsLower(c)? Char.ToUpper(c) : Char.ToLower(c);
}
// This implementation will work with the current culture and character set.

Java implementation will be pretty similar.


However, this isn't really what I meant by detail-free; your very description of the process:
Quote:
creating a string, allocating its memory, filling it, iterating over each character, swapping the case of the character, and deallocating memory (through the destructor of std::basic_str).



is pretty detail-oriented. For the most part, we just want to switch case, and don't care how it happens - border cases where efficiency is a huge issue excepted.


This is a more likely implementation of a similar thing, which is complex enough to have details to hide:

public class SwitchCaseTextReader : TextReader {

private TextReader internalReader;

public SwitchCaseTextReader(TextReader internalReader) {
this.internalReader = internalReader;
}

public int Read()
{
return SwitchCase(internalReader.Read());
}

public int Peek()
{
return SwitchCase(internalReader.Peek());
}

private static int SwitchCase(int originalChar) {
char c = (char) originalChar;
return Char.IsLower(c) ? Char.ToUpper(c) : Char.ToLower(c);
}
}


TextReader takes care of efficient blocking and reading, so that large chunks of data can be read into memory and processed in an efficient manner; the details of memory management are hidden, and the actual data source is abstracted away. In the proper context, it can be used to switch the case of text read from a large file or stripped out of the bodies of HTTP messages incoming on some port, all in a reasonably efficient and safe manner.

Extras: Filter Print Post Top
Re: Anyone here know java? [Re: phi1618]
    #6862067 -

Actually, that TextReader stuff is irrelavent - I'm sure you can do exactly the same thing in C++, and probably with no more lines of code.

The real difference between Java/C# and C++ is that the former two tie your hands. It doesn't matter how bad or apathetic you are, Java is designed so that you can't screw things up too badly.

Consider this - I need to pass a string to somebody elses method:

public String Method(String myString) {}

At some point, the programmer for Method has a problem, and says "hah - all I have to do is call SwitchCase on myString, and everything works fine". I was depending on myString not to change. Too bad for me.

Similarly with memory leaks - sure, you can avoid them if you know what you're doing, no problem. But, do you really want to depend on Joe Idongivashit to mannage it correctly?

Extras: Filter Print Post Top
Re: Anyone here know java? [Re: SymmetryGroup8]
    #6862118 -

Do you know of any Free C++ compilers?


--------------------
---------------------------------------------------
Sit up and meditate, there's no time to contemplate.
-------------------------------------------------
I have an international Hitech Psytrance project with a friend: BioChronic
I make various form of Psytrance as a solo Project Dendriform

Extras: Filter Print Post Top
Re: Anyone here know java? [Re: Psy Baba]
    #6862346 -

I like Anjuta.. Eclipse is a good thing to learn, it can compile C++ and Java I think..

I used Dev C++ when I used windows, it's a nice little compiler

Extras: Filter Print Post Top
Re: Anyone here know java? [Re: Psy Baba]
    #6862587 -

> Do you know of any Free C++ compilers?

http://www.faqs.org/faqs/compilers/faq/

The GNU gcc compiler will compile c, c++, objective-C (and in some configurations will also compile fortran and java)


--------------------
Just another spore in the wind.

Extras: Filter Print Post Top
Re: Anyone here know java? [Re: phi1618]
    #6863347 -

phi1618 said:
Actually, that TextReader stuff is irrelavent - I'm sure you can do exactly the same thing in C++, and probably with no more lines of code.



Yes, sounds like streams.

As mentioned, the GNU compiler is free and compiles a lot of stuff. DevC++ is a free and decent IDE for windows, and I do recommend it for just starting out.

Anjuta is the shit (it's what I use, generally).


--------------------
delta9

Extras: Filter Print Post Top
Re: Anyone here know java? [Re: delta9]
    #6863625 -

There is a free version of Visual C++ 2005. It is on the Microsoft website as Visual C++ 2005 Express Edition.


--------------------
Those who would give up a little freedom to get a little security shall soon have neither.
-Benjamin Franklin

Extras: Filter Print Post Top
Jump to top Pages: | 1 | 2 | 3 |  [ show all ]

Myyco.com Shop: Golden Teacher Liquid Culture For Sale, Isolated Cubensis Liquid Culture For Sale


Similar ThreadsPosterViewsRepliesLast post
* Learning Java
( 1 2 all )
shroominliketruman 1,321 21 09/14/10 11:35 PM
by citricacidx
* Java Help flangenips 711 12 05/25/10 12:09 AM
by flangenips
* Starting to program java wiggles 1,089 4 04/01/07 09:20 PM
by Seuss
* Format String Attack (you gotta be experienced with coding)
( 1 2 all )
Xeny 2,927 22 03/06/08 04:46 PM
by Diploid
* whats a good programming language after java/c(++)?
( 1 2 3 all )
smoothrider267 3,278 47 07/23/09 10:47 AM
by gilesypopper
* Has anybody implemented the Google Calendar in an Android application? lifeiswhatyoumake 192 0 04/27/14 02:31 PM
by lifeiswhatyoumake
* Long string of B's in the top of some webpages Gumby 1,128 10 10/24/07 10:59 AM
by Gumby
* This Java code is driving me crazy. What is wrong with it?? bholzer 381 7 12/08/11 05:25 PM
by bholzer

Extra information
You cannot start new topics / You cannot reply to topics
HTML is disabled / BBCode is enabled
Moderator: trendal, automan, Northerner
3,457 topic views. 0 members, 97 guests and 1 web crawlers are browsing this forum.
[ Show Images Only | Sort by Score | Print Topic ]
Search this thread:

Copyright 1997-2026 Mind Media. Some rights reserved.

Generated in 0.029 seconds spending 0.004 seconds on 16 queries.