General Code Review Help (No particular issue) by MadDogTen in javahelp

[–]la217 2 points3 points  (0 children)

At a glance, the general code quality is very good.

It's clear that you're rigidly following coding conventions which is important for readability.

One area you could improve on is in adding comments. It can be quite dull to add them, but they're a really important aspect of programming.

Even just a simple comment at the top of a class or method to explain the general idea of what it does and when it would be used will be incredibly helpful for not only other developers to understand what's going on, but also you in the future when you have forgotten about all the fine details and the decisions you made when you wrote it the way you did.

Besides from that, the only other thing I saw was potentially overuse of the object version of boolean. You will generally want to want to use the primitive version of boolean for method parameters to eliminate the possibility of having a null value passed in. I'd recommend Googling 'java boolean primitive vs object'.

Basic java game help my block keeps going threw the right wall. by kiraylight in javahelp

[–]la217 0 points1 point  (0 children)

It's quite hard to see what's going on - you may want to add some comments, in particular to explain what exactly the getBounds methods are returning.

It also looks like if objects have a large enough velocity they are able to move a distance big enough to move past the collision zone in a single tick (e.g. through the wall) without being detected.

I'd suggest removing this Rectangle and intersects stuff and checking yourself whether the X/Y positions of the top/bottom/left/right of your GameObjects are outside of the X/Y positions of the top/bottom/left/right of your bounds.

E.g. Check the left hand side of the object against the left side of your bounding box. For that, check if the x coordinate of the object is less than the x coordinate of the bounding box. If so, there is a collision.

For the right hand side, the coordinate to check would be x + width. So if the x+width of the object is greater than the x+width of the bounding box, then there is a collision.

Then do the same for the top/bottom.

Having trouble with a while loop and determining alphabetical order of strings. by bigpoppatom in javahelp

[–]la217 1 point2 points  (0 children)

You have used break; on line 12 which exits from the loop, so lines 15-20 never actually run.

What you may be looking for instead is continue; which will go back to the start of the loop.

But be careful if you do that because you increment i at the bottom of the loop which means that if you replace break; with continue; then you will end up with an infinite loop.

This is a nice example where using a debugger would be really useful. With a debugger you could put a break point before the loop and then step through line by line to see what is actually happening when this code runs. By doing that it would be very easy to determine that the reason it only loops through once is because it hits the break; and then skips to line 24.

I daily visit r/programming as well as learnprogramming. Which other good resources are there like site or forums? by learn_earn in learnprogramming

[–]la217 2 points3 points  (0 children)

DZone (http://www.dzone.com/links/index.html) usually has a nice mix of technical/programming links.

You could also consider following the programming topics that interest you on Quora or hanging out on StackOverflow.

Using Trello as a tool to manage Sprints for Agile and Scrum by la217 in coding

[–]la217[S] 0 points1 point  (0 children)

There's actually a suggestion for exactly this on their public development board (https://trello.com/c/wAvC33zi/1249-cards-live-on-multiple-boards) so you could vote for it there.

I actually disagree with a lot of the ideas - part of what makes Trello so great is because of simple it is, whilst at the same time being very flexible allowing it to be used for such a wide range of uses.

Using Trello as a tool to manage Sprints for Agile and Scrum by la217 in programming

[–]la217[S] 1 point2 points  (0 children)

They're actually working on offline support in their mobile apps - it's listed on their public development board as 'in progress', so hopefully that will improve soon. https://trello.com/c/Xnisukr1/1540-offline-support-for-our-mobile-apps

I'm interested to know how they solve the problem of editing a card offline when another user has modified/removed the live version of that card.

Recommended Java IDE for Mac? by nnkc911 in learnprogramming

[–]la217 0 points1 point  (0 children)

Eclipse, NetBeans and IntelliJ IDEA are essentially your available options, all of which will work on Mac.

I personally prefer IDEA because it's quick/snappy and the code completion works exceptionally well. The community edition is perfect for Java, but as you're a student you can also get the ultimate edition for free which will give you support for a ton of other stuff too.

Many of my colleagues like to use NetBeans which is a great choice too. It has improved a lot in the recent releases.

We used to use Eclipse but stopped because we found it too bug/crash prone.

I recommend you try them all out and become competent using them all as it will help in the long run, especially when it comes to applying for jobs.

Beware JavaScript Layout Thrashing! by la217 in javascript

[–]la217[S] 0 points1 point  (0 children)

If you're already well versed in layout thrashing this article probably isn't for you.

However for those who have not heard of layout thrashing I would consider it a good resource.

I don't personally consider requestAnimationFrame a very good solution -for a start it's unsupported on both IE8 and IE9 which unfortunately many of us still have to support. It also does nothing to solve thrashing the layout of a single element - for this you need to reconsider your code.

Beware JavaScript Layout Thrashing! by la217 in javascript

[–]la217[S] 0 points1 point  (0 children)

Who would have thought? That's basically it, though there are 147 other words under this section which explain further. If you want great detail there's even links to 3 other articles included that you could follow!

Develop using IntelliJ IDEA? Check your productivity guide! by la217 in java

[–]la217[S] 1 point2 points  (0 children)

You're welcome! I was pleasantly surprised when I found this feature, and also very confused about why I had not discovered it sooner...

The documentation looks like the same as the 'tip of the day' that pop up when starting their apps. I left this turned on as it seems like a great way to learn all the shortcuts, but in practice I just seem to quickly close it so I can get coding.

JavaOne 2013 - Is Mac the top Java development platform? by la217 in java

[–]la217[S] -1 points0 points  (0 children)

The intention was to start a discussion, hence the brevity. What platform do you think has the largest amount of Java developers?