OMG! ZIRIA! ZIRIA!!! IT ACTUALLY HAPPENED!! 34 YEARS LATER!! The epic/legendary Tengai Makyou/Far East of Eden: Ziria JRPG has finally been localized! Supper the Subtitler struck again! Simply unstoppable, NOTHING can prevent him from TOTAL PCECD localization domination!!!! WHACHA GONNA DO BROTHER?!?!
Main Menu

Java stuffs

Started by TurboXray, 06/06/2016, 07:34 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

TurboXray

So I got to write Java code for the first time, today. The class I'm taking is Java oriented. So far it's pretty easy to pick up, but we haven't done too much yet. Having experience with C makes picking up other languages' syntax fairly easy (well, the related ones anyway). Java's a little word-y, but that doesn't bother me.

 In the spring, they're replacing all their Java related classes with Python. I though that weird. I'm little bit glad that I'm not coding with python (I can always do that on my own, if need be).

 What are your guys thoughts on Java? Using the Eclipse IDE with it, is kinda nice.

Psycho Punch

I used it a lot to do concurrent programming stuff. Way easier to use than C or C++ for that purpose. It's a pretty handy tool all things considered, even though it's not suited to solve some specific problems.

Being able to deploy to android, PC, linux, etc. with minimal adjustments is a nice bonus.
This Toxic Turbo Turd/Troll & Clone Warrior calls himself "Burning Fight!!" on Neo-Geo.com
For a good time, reach out to: aleffrenan94@gmail.com or punchballmariobros@gmail.com
Like DildoKobold, dildos are provided free of charge, no need to bring your own! :lol:
He also ran scripts to steal/clone this forum which blew up the error logs! I had to delete THOUSANDS of errors cause of this nutcase!
how_to_spell_ys_sign_origin_ver.webp

Sadler

#2
My first experience with Java was making a game sponsored by Sun as my senior project in college. I knew C/C++ and some assembly going in to it and I knew that Java ran on a virtual machine and had garbage collection. I was pretty biased against Java, I wanted to be as close to the hardware as possible. Fortunately Sun had been working on JOGL, which allowed us to use shaders to do some effects that were neat at the time (normal mapping, environment mapping, procedural textures on terrain, etc).

After I graduated I got a job working on software that basically amounted to a game editor. I convinced them to let me redo the 2D graphics in it with 3D graphics using JOGL. That code is still in use 10 years later. :D I'm still at the same place now, still using Java (and some C#). In the years since college I've come to appreciate the ease that Java allows you to do things, but I do think it's significantly behind C#. I guess I'm a bit out of the loop with how features are handled behind the scenes in 1.8, but generics were pretty hacky in Java 1.5 (the type didn't exist at run time). 1.8 added lambda expressions and concurrent programming is a lot easier than it used to be thanks to parallel streams. I still prefer C# to Java, but Java is slowly catching up. I'd rather use Java or C# than C or C++ nowadays.

EDIT: God, I really need to proofread what I write.

xcrement5x

I'm personally pretty amazed with how efficient Java has become over the years of refinement.  I took some introductory CS courses using it when I was in school, but C/C++ was used for the core of the curriculum so any Java use was purely for side projects. 

At this point I mainly use C# for a lot of what I do.  It's fast to code in, pretty quick, and easy to rapidly prototype projects. 
Demented Clone Warrior Consensus: "My pirated forum clone is superior/more "moral" than yours, neener neener neener..."  ](*,)

bartre

Eclipse is actually really great.
NetBeans is also pretty solid for java.

I've been dealing with Java since I was in high school, so I'd like to think I'm pretty familiar with it.
kinda hard to believe that it's almost time to replace it

Gentlegamer

IMG
Quote from: VenomMacbeth on 10/25/2015, 02:35 PMGentle with games, rough with collectards.  Riders gon riiiiide.

bartre


TurboXray

Java seems alright. The cross platform thing intrigues me. If GUI frameworks are as easy as people make them out to be, I'll probably try my hand at some.

spenoza

Java can pretty much do whatever you want it to, short of a AAA graphics showcase game. But it's VERY good for secure networked applications. Being able to roll out a client application to almost any platform is a godsend. Python's great, too, and might even be better for introductory programming, but it's not a good replacement for much of what Java can do.

TurboXray

OK you Java jockeys... can you do this exercise without any if statements?
http://codingbat.com/prob/p174254

Sadler

#10
Is this cheating?

public String withouEnd2(String str) {
  int len = str.length();
  int start =Math.max(0,Math.min(1, len - 1));
  int end =Math.max(0, len -1);
  return str.substring(start, end);
}

Edit: first time I've written code on my phone. That's kinda awesome!  :D

Edit 2: the obvious solution is to abuse exceptions. Please don't abuse exceptions. You could also use a Map or polymorphism.

TurboXray

That's not cheating. That works!

 Mine was less elegant:

public String withouEnd2(String str) {
      int n = str.length();
      int nPower3 = n * n * n;
      int nPower2 = n * n;
      int middleLen = ( (nPower3 + 1) / (nPower2 + 1) ) -1 ;
      
      
      int startPoint =  (int) ((double) middleLen / (n - 2.001));
      int endPoint = middleLen + startPoint;
   
      
      return str.substring(startPoint, endPoint);

Sadler

#12
Heh, that's pretty creative!

Edit: Because this forum hates double posts.


public String withouEnd2(String str) {
  Map<Boolean,Integer> scalar = new HashMap <Boolean,Integer>();
  scalar.put(true,0);
  scalar.put(false,1);
  int len = str.length();
  int scale = scalar.get(len < 3);
 
  int start = 1 * scale;
  int end = (len -1) * scale;
  return str.substring(start, end);
}

The editor on that page is a bit weird. It doesn't support the diamond operator and it really dislikes static.