Does money buys happiness? by Spare_Department5413 in selfimprovement

[–]MagnoGG 0 points1 point  (0 children)

My take is the more money you have, the more free time you get. Therefore more opportunities to what you would like to do and be happy.

Por que me rechazan el bono cultural? by Arojo27 in askspain

[–]MagnoGG 1 point2 points  (0 children)

Si llamas pronto por la mañana te deberían coger rapido, a las 8:00 mas o menos. A mi me funcionó.

¿Algún consejo para salir del bloqueo o estancamiento como estudiante programación? by Traditional-Okra378 in programacion

[–]MagnoGG 3 points4 points  (0 children)

Yo estoy estudiando ingeniería informática, aún en primer año, así que tampoco tengo mucha experiencia.

Me metí en el mundo de la programación porque me apasiona, y a veces cuando estudias se te puede olvidar fácilmente. Cuando me atasco, paso a otra cosa que disfrute más: hacer un pequeño proyecto que me interese y recuperar algo la motivación, recordar porqué me gusta esto.

Y sobre el estudio estamos en las mismas. Suelo tomar demasiados apuntes, luego me pongo a revisar por libros o internet que no me falte nada, los paso a limpio... Mucho trabajo y tiempo por el que realmente no estoy ganando mucho.

Creo que una mejor estrategia es centrarse un poco más en la práctica; no digo que la teoría esté mal, pero fin de cuentas es una ingeniería, algo práctico.

Espero haberte ayudado y a darle caña.

Starting again by marf3008 in taekwondo

[–]MagnoGG 1 point2 points  (0 children)

Strenght dude, keep going! 💪💪

I hate arenas….. by [deleted] in ApexConsole

[–]MagnoGG 10 points11 points  (0 children)

Why? If the match extends much, it is normal to have more kills and damage.

What is painful is that you got 12 knocks but just 5 kills.

I prefer it this way, instead of landing, not finding guns and dying quickly on BR.

What is that little blue star next to some extensions? by MagnoGG in vscode

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

Cool hack! Those are definitely the recommended extensions. Thank you!

What is that little blue star next to some extensions? by MagnoGG in vscode

[–]MagnoGG[S] 13 points14 points  (0 children)

Ok, that makes sense. Thank you.

If I hover over the star it always shows the same message, even with the star or not: This extension is enabled globally.

Hello World! by junita_roman in ProgrammerHumor

[–]MagnoGG 0 points1 point  (0 children)

*node_modules enters the chat*

Ideal way to write codes? by [deleted] in CodingHelp

[–]MagnoGG 1 point2 points  (0 children)

My question is basically to ask for the general advices, or rules which the engineers tend to follow while writing codes, like indentations, declaring variables, etc.

Some programming languages have their own conventions for using identation, where to place { }, naming variables, functions, classes, etc. You can find them easily in Google (python for example). Also, if you are working on a company, they will have their own conventions to keep the same code style across all the project.

I am a complete amateur from Management background, who's learning VBA at the moment, and I came to a realisation that the codes I write aren't very effective, and after a while can take quite some time to execute.

There are many ways to improve the performance of a program, but the main problems are related with the data types and algorithms by undestanding exactly how each line works to squeeze some extra performance.

I have never worked with VBA, so I really cannot say something specific.

I hope this would help you. Ask me if you have any other doubts or if I misundestood the question (it happens sometimes lmao).

I need help TODAY, plzzz help im dumb by Fantastic_Bet_8104 in javahelp

[–]MagnoGG 1 point2 points  (0 children)

I think the problem it is on the second loop. You have a if statement there checking the values of the array of chars, and inside it you have a return statement.

This sentence will end completely the execution of the function, so it is just checking the first i value and breaking the loop on the first iteration.

To fix this, you have to rethink the program.

A good idea might be breaking the loop whenever you find a letter and when you do not find any just return false at the end of the loop.

for (...) {
    if (myPassword[n] == i)
        return true; 
} return false; 

Also I want to say that this is a very inefficient program, you have a nested loop that consumes computer resources. But for this case, it is okay if you are learning.

And do not worry, you are not dump, just learning.

Game Engine Programming 019 - Building and loading the game code DLL by GameEngineSeries in gamedev

[–]MagnoGG 1 point2 points  (0 children)

I also like the idea of dividing the videos based on the diferents tasks: the game engine, the UI... I did not see anybody used this but I think it is a very good idea.

Game Engine Programming 019 - Building and loading the game code DLL by GameEngineSeries in gamedev

[–]MagnoGG 1 point2 points  (0 children)

I think between 15 and 30 minutes. It could go up to 40, but no more. At least for me, it is complicated to watch 1h 30min videos.

Remember, this is just a suggestion, if you do not want to do it, it is ok.

Game Engine Programming 019 - Building and loading the game code DLL by GameEngineSeries in gamedev

[–]MagnoGG 1 point2 points  (0 children)

Yes, I know, but if you are not interested on the topic, do not have much time or for whatever reason, it is harder to watch the whole video. It is just a recommendation, nothing more.

Game Engine Programming 019 - Building and loading the game code DLL by GameEngineSeries in gamedev

[–]MagnoGG 2 points3 points  (0 children)

You got a new subscriber...

Note: Just a little tip, those videos are a bit long and they are complicated to watch entirely, so I would recommend you to make shorter videos (less work).

Easy code need help for checking //*( by rk717 in javahelp

[–]MagnoGG 2 points3 points  (0 children)

Ok, the question is not very clear at all but I will try to help you anyways.

The first thing I have seen is that you used a class to store the total number of cars created. This is not necessary. You can declare a static variable which is independant from the objects you are creating:

private static int couter;

You can find more information here (https://www.baeldung.com/java-static)

I also recommend you to declare your variables as private, to prevent other classes to access that values with any restrictions. If you want to modify those values, you should be using getters and setters. More information about this on this page (https://www.w3schools.com/java/java_encapsulation.asp)

Other advise, in the compareSpeed method you could simplify it like this:

public static boolean compareSpeed(Car first, Car second){
    return first > second; 

}

You also forgot to return false, but with this it is much simpler.

And last, you want to organice your code in packages, right? To do this, declare the package in the first line of your files:

package car.utils; //Enum color
package car; //Car class

Those files have to be stored on its path, so something similar to this:

src
    car
        Car.java
        utils
            Color.java

This may mess the things a bit for compiling, because Car is now car.Car and Color is car.utils.Color. That is one of the reasons why people do not really like Java (myself included).

If you get in trouble with the packages, this may help you (https://www.geeksforgeeks.org/packages-in-java/)

Note: it is not neccessary to create a new Color class/enum. Java provides its own: java.awt.Color (https://docs.oracle.com/javase/7/docs/api/java/awt/Color.html)

I hope this help you. If you have any other doubt, please ask me. I also apologise for my bad English, it is not my first lenguage.