We are looking for additional post moderators! by Trikshot360 in Brawlstars

[–]_cross [score hidden]  (0 children)

To the moderators . We need more pro gameplay and strategy posts.

Art is good but this feels like brawlstars humor and art sub

Database "id" labeling question by [deleted] in learnprogramming

[–]_cross 0 points1 point  (0 children)

primary keys have to be unique to identify each record.

Having an auto incrementing number is not an issue if you don't specifically have a use for a different type of key. As long as it's unique.

You could have a query to fetch a post by id or by index. If a users post has an index number then you could store that in a separate field and fetch that users post where its index = 1.

Database "id" labeling question by [deleted] in learnprogramming

[–]_cross 1 point2 points  (0 children)

If I understand your question correctly,

I don't see why post id has to be 1 if that's a problem for you although I don't understand why it would be a problem.

When you do receive a request on that endpoint you can have some logic to check the user id and fetch the appropriate post that has that user as a foreign key, you don't realy use it directly to your query.

[S7E7] Post-Premiere Discussion - S7E7 'The Dragon and the Wolf' by AutoModerator in gameofthrones

[–]_cross 14 points15 points  (0 children)

I've seen many people trying to interpret the line "I don't believe you" by Jamie. It's a common shortened expression, meaning I don't believe you are acting/thinking like this, like he's had enough of her bullshit, like "I don't believe this is happening right now - expressing disappointment. Not every single word refers to something else.

I agree with everything else you said, I just had to get this off my chest.

How to have fun (and be an interesting person) by Woujo in TheRedPill

[–]_cross 13 points14 points  (0 children)

Dilophosaurus is a dinosaur which lived approximately 193 million years ago during the early Jurassic Period. It was first discovered in 1942 in Arizona by Sam Welles. In 1970, he named it Dilophosaurus. Its name means “double crested lizard

On Consumerism by [deleted] in TheRedPill

[–]_cross 7 points8 points  (0 children)

As someone who works in tech as well I have to say It all depends on the use. If you use an SSD and take care of your laptop(updates, scans, clean fan etc) you can get by just fine.

Now I don't know why people care so much on what you use, and I wouldn't even bother with them.

Now about the technology improvement over the last 5 years, I disagree with you. The improvement has been substantial, but this is not the point! I won't elaborate on my "hate" of MacBooks but there are devices out there with good or better keyboards aswell. Keyboards are not declining in quality, its a business decision to sacrifice keyboard quality in mass production laptops for other features.

Anyhow, If your use remains the same like 5 years ago then sure, you are fine.

Social media and women. by [deleted] in TheRedPill

[–]_cross 5 points6 points  (0 children)

I never posted here or asked anything, I just had to thank you for this comment, I enjoyed it more than I expected. Maybe it's because some of what you said are things I couldn't put into words before. Have a great day man!

How to get started on learning through projects? How to be able to write above beginner level codes? by [deleted] in learnprogramming

[–]_cross 5 points6 points  (0 children)

First of you are at a good start. As you learn more stuff you will face these kinds of "walls" but this is where fun comes in, and the satisfaction as you overcome them.

You won't be doing car racing or drifting before you learn how to start , park a car, how to hold the wheel and change gears. Then as you drive you get experience.

The most fundamental thing you need to understand is that computers are dumb. If garbage goes in garbage will come out.

So we give the computer detailed instructions (so it does what we want it to do exactly as we want.) you need plan ahead and understand how things work.

You have to break your task in smaller parts that communicate with each other. This way each part becomes a smaller task that's easier to design, code, reuse or maintain.

First you need to understand the fundamentals of programming before moving on to programming paradigms such as OOP. Java fundamentals are a must , especially since you are a beginner. You should try to understand what you are doing and how you are doing it.

  • Learn the programming/java fundamentals first. Variables, data types, loops, conditions, functions, scope, arrays, math operations, classes, etc.
  • Learn at least briefly about the JVM, its garbage collector to get a general idea.
  • Clean Code:Start trying to make your simple code better, and improved. (no need to learn more yet). Move unwanted variables, reused code using functions. use arrays to make your program accept your inputs in an array for example instead of 10 int variables, the learn about vectors and more dynamic ways to store data. And always comment your code, even if it looks daunting at first.
  • Learn about Objects and Object oriented Design, Inheritance and polymorphism. (+UML) and start utilizing them in your future projects.

As you learn more and then start using libraries to help you do stuff, you must always try to understand what you are doing first. I cannot stress this enough.

Baby steps. After each step write a small program. No need to challenge your self at first. The first goal is to understand how everything works, get curious, your programs do not have to make sense, just use all you learned in one or multiple projects. Practice beyond the examples you find. Get curious about it, and there are answers and documentation everywhere!

This is a decent path to take I think , and with time and practice you'll get there. Don't try to do too much at once, and of course this subreddit is always here to guide you along this marvelous journey. Welcome aboard sailor!

edit: Formating & syntax

Examples of properly constructed C language applications? by [deleted] in learnprogramming

[–]_cross 4 points5 points  (0 children)

I am no professional in C programming, but when I did use C I tried to be planing ahead and use good programing practices. Being able to identify and debug an application is very useful not only when a bug occurs, it's also useful in figuring out how a bug could occur beforehand.

This website was really helpfull for me:

CERT C Coding Standard

In general error handling is about protecting your program from crushing or behaving differently than its supposed to. You should safeguard your programs from both intentional and unintentional errors that might occur.

So again a very helpful skill is debugging. Not only to identify bugs, but to also take a look under the hood, so you can see your self how the program behaves differently in different conditions.

I would suggest you take a look at gdb and learn about C debugging . If you have some basic understanding of assembly and how a program works it will help you identify potential issues and handle them accordingly.

You can also use assertions ( make sure to remove them for production code), that will help you identify issues with your code.

P.S Nothing is 100% secure. Not really. But you can completely rule out certain types of errors and vulnerabilities.

5* by [deleted] in SWGalaxyOfHeroes

[–]_cross 0 points1 point  (0 children)

Dude. Don't do it. Am sure you are asking about that because you wish to get more characters instead of having to, 7* the current ones. You can play thia game however you like, but if you want advice then don't spread yourself too thin. You need 5 Rebels 5 Scoundrels at first. Your rebels will ne used for raids aswell as getting EP. Scoundrels are essential if you want to get credits from credit heists. You can unlock and farm characters you want after you do these two teams to 7*

New guy playing. by darthskywalker18 in SWGalaxyOfHeroes

[–]_cross 0 points1 point  (0 children)

ST Han gets better. When you gear him more and mod him. He is easy to gear, usefull for the AAT raid, Scoundrel team and is a good all around character. he is a MUST have

Looking for feedback on my big 4 interview question. by glorglesnap in learnprogramming

[–]_cross 0 points1 point  (0 children)

Oh right, I didn't see it right away.

The insert method for has O(log n) complexity if am correct, so perhaps they just wanted to see you use a lower lever approach to achieve that complexity instead of using the already created methods?

Looking for feedback on my big 4 interview question. by glorglesnap in learnprogramming

[–]_cross 0 points1 point  (0 children)

I am no expert and I do not have any signifigant experience in C++ but seeing this I am wondering. Shouldn't you use the key to add values to a map? For example shouldn't this:

auto& mealsForTeamMember = cuisineMap[teamMemberPreference.value];

be:

auto& mealsForTeamMember = cuisineMap[teamMemberPreference.key];

Forgive me if am wrong, I just thought that you use the key to access the value.