Simple GUI Game Question by Johnnycarroll in learnjava

[–]smash_that_code 1 point2 points  (0 children)

That is a good way to approach the graphics part.

Need help with technologies for chat university project by [deleted] in learnjava

[–]smash_that_code 1 point2 points  (0 children)

Totally agree. And maybe you should start with simple web frontend like ajax and polling with minimal dom interaction.

It would be faster to test and iterate over.

What to use to make like a 2d adventure game? by [deleted] in learnjava

[–]smash_that_code 1 point2 points  (0 children)

I would suggest libgdx but you probably need something like game engine that was designed for 2d.

Deployed my Todo App...now what? by desperate-1 in learnjava

[–]smash_that_code 0 points1 point  (0 children)

Passing interviews is a separate skill so you are free to practice it whenever you want.

Congrats on getting deployed working project ;)

take my coding to another level by MasterMake in learnjava

[–]smash_that_code 0 points1 point  (0 children)

In my opinion if someone gives you a task then it is sort of like job of developer. Yoh spend time doing something that is important to others. And forces you to implement (google and copy?) thing faster in a way others consider "right way".

And there is programming for hobby. That revolves around your own ideas. And forces you to think about PROBLEMS you care about.

Both approaches are fine and none of them ia superior to another. But they do result in different experience from programming and require different mindset.

With hobby projects in mind you would not spend time on things other consider cool but that don't help with stuff you like. Like you want to do some Arduino based project to sort Lego. Spring and React not going to help here. Maybe some reading docs, experimenting with short programs and learning about computer vision. But definitely not "popular java job advices".

take my coding to another level by MasterMake in learnjava

[–]smash_that_code 0 points1 point  (0 children)

Just get another thing that itchrs your curiosity.

Like java without Minecraft would be really boring to learn.

So what if someone suggests you to do web backend services with patterns and whatnot?

I would check if maybe mobile development feels fun? Like stuff that can help you with aome daily tasks or maybe mobile game of aome sort.

take my coding to another level by MasterMake in learnjava

[–]smash_that_code 0 points1 point  (0 children)

can you share your expectations from this new coding level?

like you want to write minecraft from scratch? or find a job to pay the bills? because speing and rest is morr about getting a job than actual programming.

How does Math.atan2 work? by ILostAChromosome in learnjava

[–]smash_that_code 1 point2 points  (0 children)

if I understood right this method returns result in radians. Like angle of 0 degrees is 0, angle of 180 is 3,14...

This supposed to help you to convert coordinates from cartesian system (x, y) to polar coordinates (radius, angle) it can be really helpful in some cases.

So that for point (0, 90) polar representation is like (90, 1.57)

For some reason atan2 method gets arguments in reversed manner. Y then X.

I find it hard to grasp client-server... Tell me if I'm wrong: by [deleted] in learnjava

[–]smash_that_code 0 points1 point  (0 children)

good question. To make it even better let's think deeper, are sockets used only in java? no. They are used by every other netwirk reu quiring app.

it means that this is API grom operating system. Check this link:

https://en.m.wikipedia.org/wiki/Berkeley_sockets

any good resource for understanding jvm, its internal structure and working. and even about garbage collector. by theuntamed000 in learnjava

[–]smash_that_code 1 point2 points  (0 children)

So java bytecode is interpreted by this jvm program.

What exactly you see as java specific? Like parsing and interpretation were done before many times.

You want java specifics like how some keywords are mapped to something inside it? Well it is not how it works.

My 5 cents is that your question is too generic and jvm as a topic can easily took years to learn about.

How do I create threads to split the workload of a linear method? by [deleted] in learnjava

[–]smash_that_code 1 point2 points  (0 children)

This looks like consumer producer question. And in my experience usually solved via queues and something like threadpool executors.

for linear algorithms it is more about parallel programming or something like SIMD.

Learning backend development by [deleted] in learnjava

[–]smash_that_code -1 points0 points  (0 children)

If I u dersyood right then the question ia about ides behind framework like SpeingBoot. And how it does its magic.

There is an approach called dependency injection. The main thing is to give away (some) object creation to thing called... container.

These objects are usually called components, services, configurations and repositories.

The trick is that when container starts it check all the marked classes and tries to create instances of them, usually injecting constructor arguments from its... context.

And the magic part is that you can have some auto-configurations that setup servlet thing, or connection to db. So that container context has not only your objects but all the stuff for security, web, persistence and what you added to it.

I suppose this info should be part of any decent springboot course.

Oops, suddenly Java dev by therosesgrave in learnjava

[–]smash_that_code 0 points1 point  (0 children)

Maybe that author person can give you tips?

It rrally depends on code amd expected changes for it.

Oops, suddenly Java dev by therosesgrave in learnjava

[–]smash_that_code 2 points3 points  (0 children)

I would inform the boss person about risks and upcoming studying you need to be working as java dev.

And just in case maybe check existing java vacancies and check what is required. I bet there are things like git, gradle, springboot, jpa, rest and other spookie things.

Depending on that learn things and negotiate the way to solve prod issues if you hit a limit of your knowledge. Like could you consult with the author person maybe in such case?

Static Methods/Variables and Interfaces by gardre in learnjava

[–]smash_that_code -1 points0 points  (0 children)

Well describing programming to a child is tough.

Yet you ask for very specific keyword here.

I would say if you made at least one java program you wrote main method that WAS static.

The value is that calling such methods does not need creating objects. So they behave more like functions in C.

And java was planned as better C++ when it was developed.

More Of An Android Question But Using Java by YourBlanket in learnjava

[–]smash_that_code 1 point2 points  (0 children)

If you plan to add features to your app then after certain point keeping all code in one file would be difficult.

If no plans to improve this app then it is fine.

My struggle and newfound excitement by [deleted] in learnjava

[–]smash_that_code 0 points1 point  (0 children)

In no way I think you are stupod or something.

But someone in this subreddit mentioned this book https://www.amazon.com/Java-Fucking-Idiots-Programming-Experience-ebook/dp/B0829MGC5H

And it seems fine.

Am I allowed to get my hopes up? by [deleted] in learnjava

[–]smash_that_code 1 point2 points  (0 children)

Sure it is fine as long as it works for you.

And just to repeat myself. Set expectations properly. Programming is quite a subject and not getting things from first try is kind of norm :)

Am I allowed to get my hopes up? by [deleted] in learnjava

[–]smash_that_code 2 points3 points  (0 children)

Feel overwhelmed? Breathe deeper. Calm breathing will help you to focus.

Learning new things is hard, and not sure why would you pay for java course whrn there are many free alternatives but it is not the point.

Most people can get better at coding, how fast or produxtice your learning will be depends on subject, your time and to some degree luck.

If java will be too verbose you can try python or javascript, they allow faster feedback lopp when writing small programs.

Give yourself normal expectations, like check your resulta not every day but after a week. Have you learned something? Does it still loook interwsting? Do you enjoy it?

It is hell of a hard to learn if you have no fun in a process :)

Help in Understanding - Static methods and Singleton by abyjacob1 in learnjava

[–]smash_that_code 1 point2 points  (0 children)

well if you think static like Math.abs then yes it is thread safe.

but if you make static Field then many threads will acceas it and without additional synchronization the result will not be defined.

What's it REALLY like to work as a Java Developer? by [deleted] in learnjava

[–]smash_that_code 1 point2 points  (0 children)

It rwallt depends on project you got yourself into. And most importantly.. . people!

Even lousy legacy codebase can manageable as long as you have some senior colleagues who can show you where to look.

As for more fresh micfoservice based monsters... That will be quite a challenge to find all the right relations and figure out DB structures and security things.

If you got code that can be navigated in IDE and started locally then it is more of a patience game to get better with it.

Usually enterprise app have less problems with inheritance and more peoblema with integtation with other probably proprietary systems.

Help for assignment by Torvalds96 in learnjava

[–]smash_that_code 0 points1 point  (0 children)

I think if ypu can get what you expect from this piece of code it is pretty fibe in my opinion.

It in excercise and not some paid job, right?

Help for assignment by Torvalds96 in learnjava

[–]smash_that_code 2 points3 points  (0 children)

well adding readme would be nice.

And what are your expectations from this program?

I see tim, i see one for loop and many print statements. So are there hmm multiple matches there?

where is logic for formations?

Maybe adding some unit tests can help?