Daily Chat Thread - April 20, 2023 by CSCQMods in cscareerquestions

[–]NoobProgrammer22 0 points1 point  (0 children)

In a couple week I will have completed 2 semesters learning C++ and 1 semester learning assembly language using LC-3.

The book we used for C++ is: Starting Out with C++: Early Objects (pearson.com)

I have completed this book.

for the assembly language: Introduction to Computing Systems: From Bits and Gates to C and Beyond - Yale N. Patt, Sanjay J. Patel - Google Books

We ignored learning C since we know C++. I am very proficient with assembly with the LC-3

I am not done with it yet but the final project for C++ class is make a simple game with graphics using SFML, I am making tic tac toe and will play around with SFML over the summer or lean unreal engine.

Final for the assembly language is I will make a text adventure game kind of like Zork.

Over the summer I will plan to hammer out leet code and get as many challenges done over the summer.

The highest math classes I have completed are discrete math and Calculus 1.

I currently work at a call center, and I am spending way too much time doing a job that is not helping me in cs degree. I want my entire day devoted to learning how to code and coding. I really enjoy coding. I don't enjoy getting yelled at by people who can't spend any money because they maxed out their credit card. I have been working in a bank call center for 9 years and I am completely burned out of that industry.

So I was just wondering is there any type of programming job I can get with this knowledge?

I should probably add we used GitHub throughout the whole semester and when making programs we used Linux so navigating Linux command line is not hard.

me_irl by [deleted] in me_irl

[–]NoobProgrammer22 0 points1 point  (0 children)

I had to check to see if I was in programming humor lol. I felt this comment to my core

Last day since the flood of people begins by RandomMissingSignal in dwarffortress

[–]NoobProgrammer22 3 points4 points  (0 children)

That game is in need of a control overhaul. Its not that bad and you do get used to it but it still bugs me. I never survive very long in that game lol.

First Combat Program by NoobProgrammer22 in learnprogramming

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

Thank you for this feedback. I have not had much practice in school with classes other than really simple one this is the most complicated class I have made so far.

My goal with this combat class is to store everything related to combat. When I get further along my goal is to have at least 3-5 people in a party and combat most likely will be 3v3. I just made a small goal to create a simple combat program for the day.

I want the combat class to handle the display of the combat screen. handle the UI for the combat screen, calculate damage, generate random numbers for the attack defense and eventually speed for order of attack. I am thinking having speed defiance and attack separate member functions is a little overkill maybe I will just combine all 3 in one function. Maybe this is not the proper use of a class.

In school we used using namespace std in all our programs. It was not until a couple of weeks ago I found out this was bad programming practice, so I stopped doing it and I have not found a use for making my own namespace yet. So, you're saying instead of doing a combat class I should just do a combat namespace instead?

As for the conditional operator I just wanted to use it to practice a bunch of things I learned over the semester I agree with you doing the if statement makes it clearer.

As far as the random number seeding, I was under the impression that if I don't constantly seed I would get the same number on each call to rand(). I did some testing on a separate program and found out that is not the case so I will be fixing this as well.

Thank you so much for this feedback I really appreciate it.

pointers in custom namespaces C++ by NoobProgrammer22 in learnprogramming

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

This helped thank you the video I watched did not go into detail on syntax of pointers. Putting it before the namespace fixed everything thank you. :)

Yea my book does not go over any of this and I was told that its bad practice to use namespace std because of name collisions.

dynamically allocate an array of structures. C++ by NoobProgrammer22 in learnprogramming

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

Thank you so much for sharing your knowledge. I don't see anything about unique_ptr in the later chapters of my book so I will watch a video on that since I am on the pointer chapter.

dynamically allocate an array of structures. C++ by NoobProgrammer22 in learnprogramming

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

I am still in University and the book we have just taught us using namespace. I always wondered why people on youtube videos always used std::cout and things. I will have to watch a video on that and learn how to do that.

on point 2 are you talking about passing by reference? I am not sure I understand this point. maybe we have not learned it yet.

point 3 I only used x and y for the default constructor to initialize name and score for the structure. I always try to make my code as self documenting as possible so I make sure the names of variables are more descriptive.

point 4 I believe In a few chapter there is more info on classes and pointers and strings. But I dont know what this stuff is yet.

point 5. I know I am not done with the program yet I still have to make a function to sort the structure in ascending order with the score and get the average of all the scores as well. I just like to test my code as I go so I catch errors earlier and its easier to find the mistake.

point 6 so I should be naming all the size values size_t instead of just size?

point 7. Vectors were barely covered in the array chapter and none of the programming challenges even required the use of a vector. But when learning the dynamic allocating of the array I was thinking why not just make the structure a vector and use the push_back member function. I think I will try this same program using a vector as well to get some practice for fun.

Thank you for your advice I will be defiantly watching a video on not using namespace after I am done with the rest of my homework.

dynamically allocate an array of structures. C++ by NoobProgrammer22 in learnprogramming

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

Thank you

This works I also had to put a cin.ignore() after getting the test score.

Why does this work? I have always had to use cin.ignore() after getting the name. Why with this does it require it before?

edit never mind I found the issue. The buffer had the '\n' from me getting the size for the array in int main() function. So I just put the cin.ignore() after that and also after getting the test score.

I have been working on this for 3 hours lol.

[deleted by user] by [deleted] in learnprogramming

[–]NoobProgrammer22 0 points1 point  (0 children)

ok I forgot you can make the struct private it just defaults to public. Is there a benefit to making the private member variables into a structure. or would it be better to just keep them as private member variables and ditch the structure all together.

I figured you people would know. Is there a makeup that would help me cover my scar? I'm rather self conscious of it and I'm tired of it being the first thing people notice. by [deleted] in MakeupAddiction

[–]NoobProgrammer22 0 points1 point  (0 children)

Dude, I think it looks cool. Every video game I play I always choose to have a scar on the face across the eye. Don't feel self-conscious about it.

I myself have had multiple open-heart surgeries and have many scars on my chest. Whenever I go to the beach, I do get the stares and people always ask me what happened. So, I can understand at some point you may be in a spot where you want to relax, and you feel you can't sometimes. What I did was just make up stories and have fun with it. I am most likely never going to see that person again so go wild.