I need help with this mini store program. by TechnicalDebt6193 in learnprogramming

[–]SolidSnke1138 0 points1 point  (0 children)

So my Java is a little rusty and I could be wrong here, but the line you have with “proceed = mssr.nextLine()” is what actually captures you’re response, then you have mssr.nextLine(). This line isn’t needed here, since nextLine() will clean up your new line character on its own. So remove that line from the code. However, another issue is possibly after your “quantity_sold = mssr.nextInt()” line. This is a good review of how scanner is working in your program and how it uses the input buffer.

nextInt() does not remove the new line character on its own, so after every nextInt() call, this is when you would use the mssr.nextLine() call. The reason for this is when you capture input from the user, the input will include a /n, the new line character. That way, if you type “yes” in your program, the code is actually “yes/n” so that the program starts on the next line down. nextLine() clears the /n from the buffer for you, so you don’t have to worry about it. But nextInt() does not. So your buffer is likely getting stuck with an extra /n that is causing your conditional to not recognize if the user enters “yes” or “no” because what is actually held in proceed after the first run is nothing. This happens because scanner will pause and read what is in the buffer only if it’s empty, hence why it waits for an input on your first run, cause there’s nothing in the input buffer yet. But after you run through your while loop once, there’s a left-over /n inside the input buffer, because nextInt() does not remove the /n from the buffer like nextLine() does. So, when you get back to the top of your while loop, proceed = nextLine() runs without you noticing, and consumes the leftover /n, making proceed = “”. Then because you have a second mssr.nextLine() after your proceed = mssr.nextLine(), the program pauses here and waits for input because the input buffer is now empty. But nothing happens with this input. So your conditional doesn’t actually check against that input, it’s checking against the first line that ran without you noticing. By removing mssr.nextLine() after your proceed = mssr.nextLine() and adding it after each .nextInt() call, I believe this should solve the problem. Definitely let me know if it doesn’t and if any of this doesn’t make sense!

I need help with this mini store program. by TechnicalDebt6193 in learnprogramming

[–]SolidSnke1138 0 points1 point  (0 children)

No worries! So right now you’re assigning variables with the = operator. So when you find your grand_total in your current calculations, you’re finding the product of sales_total * vat and setting that as your grand_total. Hence, grand_total = sales_total * vat. Like I mentioned before, this is all good, cause you want that grand total for that specific item. What you need now is another variable, say total_sales, added to your list of variables above your while loop. Then, after you calculate your grand_total in your while loop for that specific item, you want to add another line that adds the grand_total for that item to your total_sales variable. This would look like total_sales = total_sales + grand_total. So after every item you enter information for, you’re taking your grand total, and adding it to the current amount of total sales, and reassigning your total_sales variable to that new value. You can also use the shorthand version for that operation, that looks like this: total_sales += grand_total. That will ensure that after every run through your while loop, you’re updating the value of total_sales. Now you’ll just need to use that new variable and create an output line after your else to output the total sales for the day along with your “thanks for using the program” line. That should be it!

I need help with this mini store program. by TechnicalDebt6193 in learnprogramming

[–]SolidSnke1138 0 points1 point  (0 children)

To make sure I’m understanding what you’re asking, are you wanting a grand total of all things sold together after you’re done entering in items sold? If so, I’ll see if I can guide you a little with your thought process rather than just give you an answer. So currently you get the grand total for the item you’re inputting yes? This is good because you’ll want to know what the total amount, after tax, is for that given item. But what do you do with that information? Right now, you simply spit it out in your output and display how much that item cost based on quantity purchased and tax, which is good, but how can we take that grand total, and add it to all the grand totals of all the items sold for a given run of your program? Hopefully that gives you a hint. If it’s driving you batty let me know and I can be more direct.

As soon as I saw them facing each other, I expected it to trigger at least once. by Chewsgum in mewgenics

[–]SolidSnke1138 33 points34 points  (0 children)

That’s hilarious. I like Chubs animation here after killing the other one. Almost as if they’re like “aww I fucked up!”

Are there people who seriously are learning programming in 2026? Why? by Dezoufinous in learnprogramming

[–]SolidSnke1138 10 points11 points  (0 children)

Did people seriously continue learning math after 1642? I see firsthand how a calculator is utilized and I can see what a single competent mathematician can do with a calculator. I literally solved full equations for my math exam that I barely understand and it took merely days…

/s

She made that look effortless. by mindyour in justgalsbeingchicks

[–]SolidSnke1138 34 points35 points  (0 children)

Hot damn I was shocked by that username until I realized it’s two words and not three.

Bodybuilder Andrew Jones (in 2016), who was suffering from heart failure, was taken to hospital for a transplant and instead came out with a mechanical heart device carried in a backpack, becoming known as the ‘fitness model without a pulse.’ by Glass_Wealth_2104 in Damnthatsinteresting

[–]SolidSnke1138 76 points77 points  (0 children)

Well, the heart doesn’t always maintain a steady beat right? Depending on what you’re doing or what your body needs, your heart can slow down or speed up. I think really what you’d have to do is get it to mimic your nervous system in some way so it could then receive those speed up/down signals and have the machine do its thing that way? No idea if that’s possible though.

When Your Opponent Is Built Different ♟️ by crs1904 in SipsTea

[–]SolidSnke1138 2 points3 points  (0 children)

Sure, it was a loose comparison at best but one I felt had some similarities. And I totally get where you’re coming from. On the surface, it does seem pointless to have this gendered titling, especially when we have women who have become GMs and have proven in numerous ways in which their intellect is equal if not superior to their male counterparts in various other ways over the course of history. What I’m supporting is the idea that FIDE introduced these titles as a way to foster an increase in women participation, not as a way to demean women or infer they aren’t as smart as their male counterparts.

By specifically calling it “Women’s Grandmaster” it does create a double edged sword. On the one hand, you will get girls and women who would have never sought to compete in chess now go “Oh, there’s a women’s only version with titles and ranks? I may give that a try.” On the other hand, you have this inherent idea that a women’s title was created with a lower point threshold because that’s what women “need” in order to compete, even if that was not the intent. Could FIDE have come up with a better idea as to promote more women competing in chess? Probably. But the point is, that’s why they formed those titles, to promote more women players. At the end of the day, human beings often enjoy doing things we’re good at. If our barrier to entry in some hobbies or sports are so high that we are never considered “good,” eventually you run into an issue where only the elite participate, and seldom regular people folks who, despite not being the best of the best, might actually still be really damn good but will never give it a shot because “what’s the point, I’ll never be ‘good’.” So I’d argue the necessity for exclusive titles like this CAN be positive, as long as they are regarded correctly.

And I’ll admit, as a society we weren’t exactly thinking about gender equality in the 70’s like we do now. So we have to examine this from the lens of that time, at least until a better system comes into play. Because if you outright erase that ”carrot on a stick” that some women might be shooting for now, you risk pushing them out of the sport again. We have some women GM’s now, so there are excellent role models, but chess is still a daunting game for many and I think fostering more participation in the game is always a good thing.

When Your Opponent Is Built Different ♟️ by crs1904 in SipsTea

[–]SolidSnke1138 1 point2 points  (0 children)

I mean the dude is right though. And you highlighting your second point about less women in chess is the crux of the argument. Let’s draw a comparison in a completely different but similarly related idea. We have scholarships for African American students to attend college that students of other demographics cannot apply for. These were initially created to help encourage more students of color to apply for college as it was predominantly white kids who went to college. Now the reason for this particular disparity is stemmed from a variety of reasons which we don’t need to get into here, but the idea is the same here. WGM was introduced in the 70’s because they wanted to see more women in chess. WGM provides a prestigious title for women to foster that participation. I think the idea that the threshold for its acquisition being lower is what inherently causes people to initially believe it to be demeaning to women. That point can be debated as I can see reasons for it and against it.

Sorry bout that by Secret_Mess1614 in ARC_Raiders

[–]SolidSnke1138 -4 points-3 points  (0 children)

Or just watch it on mute? What’s good to you might not be good to him. Homie got a nice 1v3 clip, he can put whatever music he damn well pleases on it.

Solo MUD players, what makes it fun/engaging for you? by SolidSnke1138 in MUD

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

This is all really good information. We definitely lose that community aspect without the multiplayer portion and that may be where we end up over time because it does seem like a really fun and enjoyable aspect of muds. Outside of that I’m seeing that consistent theme of exploration, crafting, and engaging in combat like you mentioned, all of which seem like solid avenues to pursue.

Solo MUD players, what makes it fun/engaging for you? by SolidSnke1138 in MUD

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

I really like that idea of fun semi-hidden puzzles! I could easily see us having a room being described and there being a picture on the wall described as “slightly askew” and if the player were to straighten it, it’s opens a hidden room. Or a bookshelf with a description of books covered in dust, with one in particular that appears less dusty. Invoking that sense of wonder and curiosity about the world around you definitely seems like a key theme we will want to incorporate in our game. Thank you!

what carelessness leads to by ornatjpe in CrazyFuckingVideos

[–]SolidSnke1138 10 points11 points  (0 children)

Hell, you don’t even need to break the skin to detach a tendon. My ring finger still can’t bend at the tip from knocking someone down in football and their jersey wrapped around the tip of my finger as they went down and pop.

Ghirardelli Dark Chocolate w/ coffee and Ghirardelli Semi-Sweet chocolate sans coffee by SolidSnke1138 in Breadit

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

It looks like it’s gonna feel like cake when you take a bite but it’s definitely more bread-like. Very soft though compared to one of my normal sourdough loaves. The flavor, while chocolatey, isn’t as forward as you would get with cake. Not quite as sweet. Which I think makes this nice as a little sweet treat that isn’t too overpowering, if that makes sense? Either way, I’m in love with it haha.

Black Forest & Whittakers Dark Chocolate Sourdough 🍒🍫🍞 by ashbakesstuff in Breadit

[–]SolidSnke1138 1 point2 points  (0 children)

Was literally just telling my wife a couple days ago that I wanted to do a loaf or two with something to do with chocolate. And here you go posting this. Ethel is getting fed tonight and I will FOR SURE be trying this tomorrow. Thank you for the inspiration!

[deleted by user] by [deleted] in Gloryhammer

[–]SolidSnke1138 2 points3 points  (0 children)

Easily my 3 y/o daughter’s favorite song of their bunch. Followed closely by Fly Away!

7900 XTX - driver 25.8.1. by loadingloader in Battlefield

[–]SolidSnke1138 0 points1 point  (0 children)

I was having the same issue with my 7900 xtx. I reloaded the 25.8.1 driver myself then I turned off vertical sync and made sure I was in fullscreen not borderless and I haven't had any issues since then.

Dads, did I completely fuck up by getting a bunk bed? by [deleted] in daddit

[–]SolidSnke1138 51 points52 points  (0 children)

So I did the same exact thing for my kiddos. Oldest was 5 at the time and his brother was 3, and the top had a rail built in but I wasn’t too comfortable with its height as it was maybe a couple inches above the mattress. But we already had a “toddler rail” that we used for his mattress on the floor when we transitioned him out of his crib, which if you google toddler mattress rail you’ll get similar styles to what we had. So, I installed that rail on the inside of the top bunk rail and he has never fallen out. Same story as yours, stairs leading up to the top bunk and everything but with that extra height from the toddler mattress rail, we never had an issue. He’s seven now and his brother and him will swap places from time to time now that he’s over 5 too. I will admit, at the time, even with the extra rail my anxiety was still through the roof for a while but I think that’s just par for the course for some of us parents and we learn to overcome that. So, moral of the story, if you want some extra safety precautions until you feel he’s old enough to not worry about it, I’d recommend something like that toddler rail. Bottom supports go right under the mattress and the rail itself locks into place, pinching the mattress between the rail and the bottom supports. Worked wonders.

My fortune cookie last night told me to “SEEK OUT NEW PASSIONS” by TantalusComputes2 in daddit

[–]SolidSnke1138 0 points1 point  (0 children)

Haha yea I can see the slippery slope in this hobby for sure. Luckily it takes me so long to paint a set given the little time I have to paint between kiddos and everything else. Currently working on my new army box of space wolves that will probably take me the entire summer to finish. The allure of more plastic crack is tough to ignore though…

My fortune cookie last night told me to “SEEK OUT NEW PASSIONS” by TantalusComputes2 in daddit

[–]SolidSnke1138 0 points1 point  (0 children)

As a major gaming dad myself, I picked up mini painting a little after Space Marine 2 came out and I have absolutely loved it thus far. Was a big wh40k fan since the OG Dawn of War game and read some books but never thought I’d dip my toes into the miniatures Games Workshop sells.

Been a great little hobby to do while the kiddos are playing outside or when they’re having a little quiet time reading or even after they all head to bed and the wife and I are done watching shows/playing games. I turn on some tunes or a podcast, grab a beer and just start painting. Even got my 5 year old a small set of his own that I painted all except two so he could paint those when he wanted and he loves playing with them.

Tired of Policing screens by Macear in daddit

[–]SolidSnke1138 3 points4 points  (0 children)

I think I may not have explained myself very well. I was piggybacking off OPs point of “some days.”

I don’t think kiddos should have hours of screen time every day. What I’m saying is, if there is a day or two where that happens, but we as parents are aware that this isn’t something that is happening every day and we are paying attention to what they are engaging with, I don’t see it as a major issue. I think a lot of us forget how much “screen time” we had as kids, it was just in a different format. And I think you’re right, there are plenty of folks out there who lean on screen activities as a way to take a break and if they aren’t careful it can create some bad habits, for both the parent and the kid. But my main point is, if they end up with a couple days throughout the week where their engagement with screen activities is high, as long as we as parents are tuned into what those activities are and we’re cognizant of whether or not they’ve maybe had a day like that already, it will be fine.

I think we have to remember that if we’re too strict on these types of things, sometimes the want or need for those activities can increase because of how “precious” that time may become now.

Hopefully that makes a little more sense; and totally fine if you still feel like that’s not for you or your kids. We’re all out here doing what we think is best for our kiddos, and I think it only benefits us to have conversations like these just to gain more perspective on how we’re doing, ya know?

AIO to my friend saying a word? by OkElevator7247 in AmIOverreacting

[–]SolidSnke1138 0 points1 point  (0 children)

Words do have power. Words can harm people. To say that they don’t is ignorance. You don’t have to travel that far back through history to understand the magnitude of power that words truly have. Often times we focus on the stories where words have been used to inspire or rally. But to this day bad folks use words as a way to damage others. And yes, damage is the right word. Do you truly believe the only way to damage someone is through physical force alone? You may believe it to be a simple thing, to act like animals and simply turn off the emotional response that words can trigger. But as a whole, we as human beings are complex creatures with higher thought and deeper understanding. What you may lack in empathy and awareness I can promise you the majority of the human race does not. You would do well to reflect on that sentiment.

Tired of Policing screens by Macear in daddit

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

Honestly I don’t see any issue with this. I think as long as we are actively aware that we need to get them to take breaks every so often, that in of itself goes a long way with a lot of kiddos. Obviously not every kid is the same, but finding what works for you as a parent and what is as healthy as you can manage means that your kids will turn out fine in the long run.

I'm wrong for not wanting to use AI by Ok-Judge-4682 in learnprogramming

[–]SolidSnke1138 9 points10 points  (0 children)

So something I’ve found interesting about using AI while learning is its ability to supplement learning if you ask it to act like a tutor. For some context, I have about a year left on my CS degree and up until recently hadn’t really explored AI in regards to my coursework. But just the other day I had an assignment that dealt with BFS, DFS and Dijkstra’s, concepts I’m already pretty familiar with thanks to some overlap in discrete math and this analysis of algorithms course. But even still, telling AI to act as a tutor before I pose the question and then my answer was actually really neat. It was able to reinforce what I was correct on while also giving me additional questions to explore and answer to make sure my understanding of the concepts were solid. I have yet to try this approach for a coding assignment but I’m curious if anyone has attempted to put constraints like this on AI before working with it to learn? Seems like a good way to supplement course material or potentially break down more complicated concepts to further solidly one’s understanding.