Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

I'm a 26 year old Java Developer, AMA!


c0ke
 Share

Recommended Posts

Hello!

I'm new around these parts, if we haven't met before my name is Liam Stewart and I've been working as a Java Developer in the UK for about 6 years now. In case you don't know, AMA is reddit speak for ask me anything!

After flicking through the forums for a bit I can see there are a lot of people with similar interests in developing a game in this style using a language like Java or C++, which I think is pretty sweet, it's cool to see so much energy and so many projects from so many different people, I didn't even know this place existed.

As such, I thought it might be cool to throw a post on here where if any of you have any questions about what it's like to work as a developer, the industry, whatever, you can ask and I'll do my best to give fair and honest answers / advice based on my experience.

I'm going out on a limb here and assuming the majority of people here are still in education, if I'm wrong and you are all 45 year old gurus then… well, I guess I look pretty stupid right now ^^

Nice to meet you all :)
Link to comment
Share on other sites

Hello Liam, nice to meet you also and welcome to the forum. :D

I personally don't have much interest in Java, but have been taking on small tutorials for C#, C++ and JS.

There's also a few others who have been dabbling in those languages that still linger around here, they mainly play in the shoutbox lol.
Link to comment
Share on other sites

Java is the language I'm learning now (it's my first one). I haven't gone off to college yet for it but I plan on majoring in computer science. :D Anyway my question is, how long did it take for you to get to the point where you were pretty fluent in the language? Such as you knew the majority of the concepts and were able to easily write program/games with it.
Link to comment
Share on other sites

> Hello!
>
>  
>
> I'm new around these parts, if we haven't met before my name is Liam Stewart and I've been working as a Java Developer in the UK for about 6 years now. In case you don't know, AMA is reddit speak for ask me anything!
>
>  
>
> After flicking through the forums for a bit I can see there are a lot of people with similar interests in developing a game in this style using a language like Java or C++, which I think is pretty sweet, it's cool to see so much energy and so many projects from so many different people, I didn't even know this place existed.
>
>  
>
> As such, I thought it might be cool to throw a post on here where if any of you have any questions about what it's like to work as a developer, the industry, whatever, you can ask and I'll do my best to give fair and honest answers / advice based on my experience.
>
>  
>
> I'm going out on a limb here and assuming the majority of people here are still in education, if I'm wrong and you are all 45 year old gurus then… well, I guess I look pretty stupid right now ^^
>
>  
>
> Nice to meet you all :)

Hey Liam!

Welcome to the forum! ^_^

I've been programming for about four years now, and I've learned several languages along the way. What got you into programming in the first place, and what was your initial method of learning? What programming languages did you learn first, and which ones did you find easiest to start learning with? I find that people who don't have a strong inclination to program, but still interested in learning, get really overwhelmed with getting gritty with code. Having to worry about a complicated IDE and having to deal with various lines of code and files to create/configure to make a program run can be downputting to someone starting out. What programming language and IDE would you personally recommend? Optimization aside.
Link to comment
Share on other sites

Struth… here goes ^^

> Java is the language I'm learning now (it's my first one). I haven't gone off to college yet for it but I plan on majoring in computer science. :D Anyway my question is, how long did it take for you to get to the point where you were pretty fluent in the language? Such as you knew the majority of the concepts and were able to easily write program/games with it.

That's cool, you can't go wrong with a Computer Science degree at the moment :D Well there's different layers to learning the language, you've got the nomenclature (the syntax) which is pretty straight forward, you've got the design patterns which imo is where the skill is and you'll be learning every time you have a problem to solve, and then you have the core API which seems to expand with every release xD

I'd say it took me about a year before I could plod through stuff without needing any help, maybe 2 or 3 years before I started getting really into the architecture of writing frameworks, and all 6 years learning how to approach problems efficiently. The cool (and sometimes daunting) thing about working as a developer is you work with a lot of technology, our product where I work now was a deployable desktop app written using swing, we did some stuff using JavaFX when that started gaining traction, now it's a GWT product that runs in the browser. On any given day I can be writing swing, javafx, gwt, dealing with hibernate, whatever we need really, it keeps you on your toes at least.

I think it's only the last couple of years where I've got to a stage where no problem is too big for me to attack by myself, after you reach a certain point in your career you become more of a professional speed learner than anything else! With regards to writing games, the hardest thing for me is figuring out what is 'fun'… it used to be so obvious... at some point I've became an adult and forgotten what that means >.<

If you get stuck on anything Java related let me know and I'll help you out :)

> If we're doing an AMA would you rather fight 1 java sized duck or 100 duck sized javas?

Definitely 100 duck sized javas

> Nice to meet you Liam. do you do any freelance work?

I used to do a little bit here and there when money was tight, work requires so much of my brain power these days when I get home I'm pretty much drooling and licking my elbows so I'm not really in a position to do that right now >.<

> Hey Liam!
>
>  
>
> Welcome to the forum! ^_^
>
> I've been programming for about four years now, and I've learned several languages along the way. What got you into programming in the first place, and what was your initial method of learning? What programming languages did you learn first, and which ones did you find easiest to start learning with? I find that people who don't have a strong inclination to program, but still interested in learning, get really overwhelmed with getting gritty with code. Having to worry about a complicated IDE and having to deal with various lines of code and files to create/configure to make a program run can be downputting to someone starting out. What programming language and IDE would you personally recommend? Optimization aside.

What got me into programming? The Mirage Source! My initial method of 'learning' was ripping off code tutorials from the MS forums and feeling like a boss when it worked haha. Well, I ended up picking up quite a lot of Visual Basic over those initial years which I really wish I hadn't… learning to code procedurally made switching to Object Oriented methods really, really hard. If any of you reading this are just starting out coding, heed my warning, stay away from procedural languages! Unlearning is really, friggin hard!

I think the first real language I have gotten to grips with is Java, and I've stuck with it because it's a) where the money is and B) it seems every 6 months we can do cool new stuff with it. It wasn't up until very recently with the success of Minecraft that nobody would ever consider trying to write a game using Java, frameworks like Lwjgl and LibGDX have opened up the language to a whole new set of uses which is pretty sweet. With one language I get to write corporate solutions, games, mobile phone apps, everything, it almost feels like cheating at times.

To address your last question, I think the propensity of communities such as this and countless others that have a lot of 'just starting out' coders is to over analyse the pros and cons of a language / implementation. You mention Optimization in your question, the first rule of good design is never prematurely optimize! Worry about writing it elegantly, then if it isn't fast enough, worry about speeding up what you have, never the other way round ;) I think false pressures like this are quite harmful to new developers as they end up spending so much time trying to do something the bestest way ever first time that they never actually get anything done, feeding into your question about everything being a bit overwhelming.

Especially when starting out, the best advice I can give is to just write a tonne of utter bum candy that is held together by masking tape and staples, but that works. You'll learn so much by doing everything wrong, that as you go over your code and learn the problem you are trying to solve you'll naturally see ways of doing it better. You can always improve something that sucks! At the moment with my project I am constantly facedesking and refactoring half the code base as I realise more efficient ways to do things, the most elegant design comes from **so much** iteration, the 5 line method that kicks arse may have one day been a 200 line method that sucks balls, it's ok ;)

I would recommend downloading the [JDK](http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html), [eclipse IDE](https://eclipse.org/downloads/), and going through the [Oracle Tutorials](http://docs.oracle.com/javase/tutorial/). The most important thing is that you don't just read, write the crappy little bits of code out that they are teaching you, run them yourself. Break them, alter them, play with them. Even if you decide in 3 months time that you hate Java, think how much you will have learned!

> Are you Coke from mirage?

Yes :)

> Same one from the playerworlds forums?

Nope :(

> For Columbia drug lords?

What can I say :P
Link to comment
Share on other sites

> Well, I ended up picking up quite a lot of Visual Basic over those initial years which I really wish I hadn't… learning to code procedurally made switching to Object Oriented methods really, really hard. If any of you reading this are just starting out coding, heed my warning, stay away from procedural languages! Unlearning is really, friggin hard!

I'm trying to make a basic Space invaders with logic game in Java after staying with VB6 for the last two years and I'm so unsure of what to do. I don't know if this or that is the best practice. It just really makes me want to write the game with everything static. 

But since you un-learnt it do you have any tips on how to move over to an OOP language after sticking with a procedural one?
Link to comment
Share on other sites

For a serious question, what are you working on at the moment? Why Java?

I know you said where the money is but you can make a good amount in any language. I could see the cool new stuff for it for sure. But is that the only reason? What do you use it for in your day to day job?
Link to comment
Share on other sites

Saw what you said about procedural vs. Multi-paradigm transitioning, and I have to say that I agree 110%. Its very hard psychologically to go from thinking in a linear, event driven sequential way when you've done it for years. It took me 8 years to move from VB6 to .NET, and a year after that to move to C# exclusively.

Many cheeseburgers for your commentary and insight.
Link to comment
Share on other sites

> To address your last question, I think the propensity of communities such as this and countless others that have a lot of 'just starting out' coders is to over analyse the pros and cons of a language / implementation. You mention Optimization in your question, the first rule of good design is never prematurely optimize! Worry about writing it elegantly, then if it isn't fast enough, worry about speeding up what you have, never the other way round ;)

This is very true about pre mature optimizing. 90% of your program will only run 10% of your code. No point in spending forever optimizing something that barely even gets run. Definitely good advice.
Link to comment
Share on other sites

  • 4 weeks later...
Hey guys I'm very sorry for the delay in response here, I fell quite ill shortly after posting this thread and haven't been well enough to get onto a computer since >.<

> I'm trying to make a basic Space invaders with logic game in Java after staying with VB6 for the last two years and I'm so unsure of what to do. I don't know if this or that is the best practice. It just really makes me want to write the game with everything static. 
>
>  
>
> But since you un-learnt it do you have any tips on how to move over to an OOP language after sticking with a procedural one?

Well the simplest way to start migrating from procedural to object orientation is to start thinking of your objects as bags of information. Let us use your space invaders game as an example here, so the first and most obvious object we want is a space ship. This space ship needs a sprite, velocity, direction, maybe even weight if we want to go that far. So there's our space ship object with it's 4 fields. Next I guess we are going to need some asteroids right, what will these need? Oh… direction, velocity, a sprite... ok, so we know that different objects in our game are going to need the same fields, so this would be a good point to start abstracting. Let's have an entity class that has a sprite, direction, velocity, and let's have a ship class and an asteroid class that extend this class. We can now create as many ships and asteroids as we want, and they have the fields we need them to have without any code replication. We can add specific logic to either as required, and add shared logic to entity. Hell, 'bullet' is going to be an entity too right? It has velocity and a direction.

You can see where I'm going with this. This is the super basic intro to object orientation, start thinking of your 'things' as bags of fields. You will likely find your game logic loop is largely procedural in it's execution as that is the nature of what we are doing, what we can apply basic object orientation to here is in managing our 'stuff'.

Now, the next thing you are going to realise is as all of our 'stuff' like the ship and the asteroids and the bullets are all entities, we can refer to them generically in our loop. We can put every entity we have into a Collection, say, an ArrayList, then we can just loop over them in our logic code. This means we can write one little method to draw everything in our space invaders game. Say we create a draw method in entity that makes use of our sprite field, we could literally just write this:

```
for (Entity entity : entities) {
entity.draw();
}

```
And then we have everything drawing. You might have different entities with different properties, you can go crazy with this. I don't actually work using abstraction and what you would call 'classic' object orientation in my client-side game loop as it actually becomes a real bastard once things start getting complicated. Instead, I use an entity system which breaks free from this hierarchical structure, my entity class has a collection of 'components', each component is just a bag of fields. A component might be something like ScreenPositionComponent or SpriteComponent, I then write system classes that only process entities that posses a certain component or combination of components, say for example a RenderSystem that only iterates over entities that have the SpriteComponent, thus drawing everything that wants to be drawn.

This none-standard design pattern is to avoid the issue where your abstraction becomes unmanagable, and it is uniquely 'acceptable' to code this way in the gaming industry. Say you have an entity class, then a screen entity class, then a movingscreenentity class, and a staticscreenentity class that sits beside it for stuff that doesn't move. Say you then create an npc class that extends the movingscreenentity class and it has cool stuff like strength and defense. Say you now want to create a staticscreenentity like for example a trap that does damage based on an arbitrary value… like say... strength. You are then stuffed when it comes to working with these two entities in the same way, you have to either rework your entire abstraction model to facilitate this particular requirement and put that field somewhere higher up the abstraction model so they can share it, which will screw you over as there will be stuff that doesn't need that field but now has to have it and is no longer a pure object or you duplicate the code in the npc class and the trap class and cannot handle these two entities the same way generically at runtime which is a female dog as the calculation for the damage is going to be the same for both entities based on that particular field so we want to treat them the same. If on the other hand your field belongs to a component that you can just add to both entities, problem solved.

The interesting thing here is this way of handling entities and components is the _**wrong**_ way to code as a general rule and only becomes extremely useful when writing games, there is a great article somewhere from a blizzard employee talking about how they pioneered this approach for world of warcraft and sort of made it clear to the industry that 'actually, it's ok to code this way and it solves all our problems when working with entities', I can't remember where I read it but it had a big effect on how I write my entity logic in my game, my previous effort used abstraction as you would expect it to being written by a commercial java developer and it was a nightmare once stuff started getting complicated.

But… I may have gone off course here a bit and started rambling. Object orientation != entity system stuffs, there's a word beginning with c _(EDIT: Composition)_ that actually describes coding in this way (having objects have genericised collections of the components that construct them) but I can't for the bloody life of me remember what it is xD Basically unless you are developing the in-game logic for a game you will be murdered for working in this way. How would we apply this to your space invaders example? Well, you'd have entity which is just an object that has a list of component objects, then you would have a position component, a direction component, a velocity component, and a sprite component and add these to your entity instance - we now have a ship. We could create a ship class that extends entity that takes these components in on it's constructor to make life easy for ourselves. You get the idea ^^

I think I may have ventured slightly off of the topic here, I'm still not well so thinking coherently is quite hard xD Did any of this make any sense / help with your question?

> For a serious question, what are you working on at the moment? Why Java?
>
>  
>
> I know you said where the money is but you can make a good amount in any language. I could see the cool new stuff for it for sure. But is that the only reason? What do you use it for in your day to day job?

I'm currently working on writing the framework for a new set of applications our business is looking to write in GWT over the next 2-3 years. I'm a software architect so I'm the dude that writes the framework that the other developers plug into so they can then write applications that all work in the same way and have a coherent look and feel. Think how google's framework works, everything ties together neatly, you have one login screen that facilitates all of the google services etc - I'm basically writing that.

Basically I am primarily a GWT developer at the moment, this allows us to write web applications entirely using java nomenclature and large parts of the languages API then deploy it using a javascript cross compiler that google wrote. Speaking broadly, I've worked with java so long now I'm an expert in this language's fundamentals and nuances and it just sorta makes sense to keep using it when looking for new work.

There's a lot of API you can plug into with Java that I am comfortable with too, Sencha GXT, GWT, Hibernate, Guice, Hazelcast, lots of frameworks that I am used to working with in Java, I guess it's less being a java developer that makes me valuable and more my knowledge of certain design patterns and third party API, having good knowledge of GWT RPC and having worked extensively using the command and model view presenter patterns alongside Sencha GXT with a Hibernate and Hazelcast back end is a valuable combination in our industry right now, which means muggins here gets to ask for lots of money xD

Liam

_Edit: Remembered the word 'composition'_
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...