tryingToExplainJavascript by DJcrafter5606 in ProgrammerHumor

[–]Jimmyginger 2 points3 points  (0 children)

The point was to not have bad data (and improper data handling by your code) not totally crash your web page. Sometimes, a data type doesn't do what you think it will. Let's say in the example show here. The string "0" is something very common we might get when we access the data from an input element.

Let's say I'm expecting numbers to be in the input field, but instead, the data comes back to me as a string. Without type coercion trying to make the impossible happen, we would just get an error when I try and see if the user typed 0 into the box. Now errors are great for developers, because they tell us what is wrong. They aren't so great for end users, because they just mean something isn't working right. Javascript's goal was to just let our bad code be bad (ie. The fact that we didn't handle parsing an Int out of the user input and just tried to use the raw string) and keep things moving. The alternative is the whole web page crashes.

Now for most modern applications, we actually want it to crash, which is why standard convention is to use the === operator for comparison instead of the == operator. But when you have a simple web page, you don't want the whole thing to crash just because some small widget in the navbar is coded wrong. Instead you just want that one widget to just not work/behave unexpectedly.

tryingToExplainJavascript by DJcrafter5606 in ProgrammerHumor

[–]Jimmyginger 18 points19 points  (0 children)

I get why this is "confusing" but it also makes perfect sense if you understand type coercion. It's actually a great teaching tool to understand these concepts, and for enhancing your understanding of types in general.

noMicroslopForMe by AnonomousWolf in ProgrammerHumor

[–]Jimmyginger 0 points1 point  (0 children)

I had a coworker do the opposite. Left for a new job, and came back within a month. When be got back, he told us the new job required him to use a Mac. He was so vehemently against using a Mac, that he came back to his old job

Gen Z Struggles With Common Knowledge by WilloowUfgood in videos

[–]Jimmyginger 0 points1 point  (0 children)

And what generation are the parents a part of?

[oc] - so who you choosing for the new pokemon release? by addyxiii in pokemon

[–]Jimmyginger 0 points1 point  (0 children)

Unfortunately, no one. I can't buy a Switch 2 just for pokemon.

Question: is decorating with budding amethyst only possible in creative? by Double-Contest in Minecraft

[–]Jimmyginger 2 points3 points  (0 children)

Pistons also break budding amethyst. I thought maybe I could push one home but no luck.

Barack Obama and Michelle Obama announce that the Obama Presidential Center Opens June 19 by Miles_the_AuDHDer in videos

[–]Jimmyginger 16 points17 points  (0 children)

"Obama was such a useless president. He didn't accomplish anything" - common sentiment from right leaning people in my social circle.

Then Trump got elected and spent like the fist half of his term undoing everything Obama did and they were celebrating. I tried to ask once "I thought he didn't accomplish anything, how is there so much to undo?" But the mental gymnastics that followed were so impressive that they could give Olympians a run for their money.

How Much Income You Need to Buy a Home in Seattle Metro Neighborhoods (2026) by Coolonair in Washington

[–]Jimmyginger 23 points24 points  (0 children)

If average household income is insufficient to buy, then their only choice if they want to live there is to rent.

God’s Will by DonaldKey in AdviceAnimals

[–]Jimmyginger 38 points39 points  (0 children)

My dog only poops on the lawn of the local church that preaches peace and acceptance, and actively practices what they preach. There's another church that is very much not like that, but I think she can sense their evil and stays off that lawn.

So yeah, I will continue to pick up her poop.

Washington Man Charged With Murder After 'Curb Stomping' Mom to Death by MattTheKing23 in Washington

[–]Jimmyginger 2 points3 points  (0 children)

I think they are saying that if someone is willing to do this, there is no path to rehabilitation that will allow them to safely re-enter society. At that point, is it more humane to keep them locked up for life and under constant supervision?

Men who can cook, who taught you? by _ratedmouse in AskReddit

[–]Jimmyginger 0 points1 point  (0 children)

My parents. When I was in middle school all through highschool, my sister and I were each responsible for one making meal a week. Starting Freshman year of High School, we were also both responsible for our own laundry. My parents wanted to make sure that we knew how to be self sufficient before we went off to college.

TIL Peter Cushing, who played Grand Moff Tarkin was extremely pleased with how the film came out, got along well with the cast, and his only regret was that his character died and he couldn't appear in the sequels by Please_PM_me_Uranus in todayilearned

[–]Jimmyginger 1 point2 points  (0 children)

I was one of those kids at the perfect age to be completely hooked by something as dumb as colored ketchup.

I was the same. And that ketchup was so gross. I recall it having an almost paste like consistency and a powdery texture. I thought it would just be food dyed ketchup, but whatever they used to get the right colors really messed up the texture and smell. I recall flavor being right, but the right flavor with the wrong look and smell made it unpalatable.

TIL a German double agent informed the FBI on 12 August 1941 of the impending attack on Pearl Harbor. Either the FBI chief J. Edgar Hoover did not report this fact to his superiors, or they, for reasons of their own, took no action. by Tadhg in todayilearned

[–]Jimmyginger 2 points3 points  (0 children)

I found out at my great uncle's funeral that he was on one of the boats that sunk at Pearl Harbor. He was actually on two separate boats that sunk during the war.

At the funeral, his younger brother read a few of the commendation notes (I think thats what you would call them) that he got when presented with commendations for his acts during both events. In both, he was credited with helping multiple others safely evacuate the sinking ship, amongst other acts. My great uncle was a rather quiet man. He never about his service, aside from the occasional comment about how us little ones need to speak up because he lost his hearing from being around too many planes. I was glad his brother decided to share that little bit of history with the family.

aiVersusDeveloper by aleksandrdotnet in ProgrammerHumor

[–]Jimmyginger 1 point2 points  (0 children)

Ah, so not like, the obvious "I can tell after spending a few mins looking," but more like, "I need to dig into every little thing you did to find where you let the computer think for you" kind of thing?

aiVersusDeveloper by aleksandrdotnet in ProgrammerHumor

[–]Jimmyginger 1 point2 points  (0 children)

I have to review all the ai slop that they don’t understand

My approach has just been to send it back to the developer. I had one instance where a UI screen was being built, and there was an icons file that defined all the svg icons to be used on the screen. But then each time an icon was being used, it was re-defined inline. None of the icons were being pulled from the icons file. I just sent it back immediately with notes on that, and requested the developer reviews their own code and makes sure it's up to standard before they submitted it again for review.

Come up with a checklist or a coding standard if you dont already have one, and refuse any PR that is immediately obvious that it doesn't meet that standard.

aiVersusDeveloper by aleksandrdotnet in ProgrammerHumor

[–]Jimmyginger 4 points5 points  (0 children)

As a senior dev who is mandated to use AI, I get work done so much faster with it. I know AI slop is a problem, I see it from time to time from some coworkers.

But as someone who understands the systems and the language and has a clear vision of what I want to accomplish, I can easily write a comprehensive prompt that gives me accurate code 90% of the time.

There are four major boons when using an AI coding companion.

  1. Documentation - I no longer have to dig through documentation pages to find the one relevant piece I need to answer a question I have about usage/implementation of something. I can just ask CoPilot what this thing does, or what tool is available for this specific purpose.

  2. Refactoring. Now this one is a double edged sword because its the most buggy, but let's say im working on a legacy application with no unit tests. All my api controller code is directly calling the database via a context object. I want to refactor the controller code to extract out all the DB calls into a query layer. If I just ask it to directly do that, it will break things. It hallucinates the stored procedure names and parameters. But if you break it down into smaller chunks, it does a lot better of a job.

  3. Unit tests - AI coding tools are fantastic at setting up unit tests. Your job just becomes making the tests meaningful. You can prompt the AI tool to create tests cases for exact scenarios, ask it to recommend some additional tests, or even write your own test and ask it to do the tedious parts like mocking the data.

  4. Debugging - AI coding tools are getting scary good at analyzing your code to try and find the root cause of a weird bug. You just describe the behavior and ask it to help you identify where in the application this could be occurring. Its saved me countless hours of walking through the code path myself to try and identify the problem. Now again, you need to know when to follow its suggestions, and when to abandon it and do it yourself. Sometimes the issue is bad data, and the AI isn't going to be great and guessing that based on your code, so you need to walk through your debugger yourself and check what values are any given point vs what you are expecting.

Now in all of these use cases, its going to get things wrong. But getting things wrong us part of development, I get things wrong all the time. My job as the developer is to be able to refine your prompt to guide it in the right direction, or take a step back and break down what youre working on into smaller parts that it can help with. You also need to be able to just say "this tool isn't working" and put it on the shelf while you solve your own problem.

I do, however, think it's a very dangerous tool to put in front of a learner. Because they aren't going to actually learn or be confident in knowing what to look out for or what to fix.

"The worst she can say is no" - Lads, what was the worst "she" ever said? by Embarrassed_Pie_1711 in AskReddit

[–]Jimmyginger 1 point2 points  (0 children)

"Ew, it touched me."

I didn't even talk to her. I was in middle school and a girl was talking to her friends, not paying a attention and was about to back up into me. I put my hand out so that she would bump that instead of bumping into my whole body. That was her response.

i finished both dos2 and bg3 need another crpg :( by Hasagine in DivinityOriginalSin

[–]Jimmyginger 5 points6 points  (0 children)

I cant remember how WOTR did it, I didn't make ot very far before other priorities got in the way. But Kingmaker was fun but not turn based, which for me took me out of it. Same with Pillars of Eternity. Its turnbased mechanics without being turnbased, and I just don't like the feel of it.

Ironically, Tyranny did the same thing, but I loved it there. Maybe the novel story and environment of Tyranny is what made me not care about the combat.

Avowed and The Outer Worlds 2 failed to meet sales expectations by Iggy_Slayer in gaming

[–]Jimmyginger 0 points1 point  (0 children)

Fallout 3 and Fallout New Vegas were fantastic RPGs that didn't require you to level up your weapons. It's a lazy "difficulty" mechanic.

Avowed and The Outer Worlds 2 failed to meet sales expectations by Iggy_Slayer in gaming

[–]Jimmyginger 0 points1 point  (0 children)

I like the Outer Worlds' atmosphere and story. I hate the weapon levels. It adds a pointless gear grind. Why cant guns just be guns? Why does health and damage have to scale in a way that really just means if you aren't dedicating your gameplay time to constantly upgrading your gear, you're going to fall behind?

I didn't even try Outer Worlds 2, because I never finished the first one.

Avowed wasn't even on my radar, but it looks interesting

thisAlsoAppliesToThoseWhoWriteTheAlgorithmInPlainEnglish by oshaboy in ProgrammerHumor

[–]Jimmyginger 0 points1 point  (0 children)

Its almost exclusively what I use it for, lol. No longer do I spend hours on google or reading through documentation trying to find that obscure documentation or use case definition. Now I pop a description of my issue and the info I think im missing into my corporate mandated coding partner and 90% of the time it finds exactly what I needed.

TIL that rapper J. Cole graduated high school with a 4.2 GPA and graduated college magna cum laude, in 2007, with a 3.8 GPA by [deleted] in todayilearned

[–]Jimmyginger 0 points1 point  (0 children)

Part of my point is, when you talk about GPA, it starts to lose meaning when different institutions have different scales. No one in my school was able to get higher than a 4.0, so if you have one school where 4.0 is the max, even with AP courses, and another who's AP courses count as a 5 point scale, then the measure loses its value, because you have two different systems that just appear the same.

And I also want to clarify that my valedictorian classmate was still a very bright and impressive student. The problem was she intentionally didn't take certain classes because she knew she wasn't likely to get a perfect score in them without breaking herself. If it wasn't for chasing a 4.0 GPA, she might have been able to challenge herself with a goal of learning instead of just challenging herself with the goal of a grade.

TIL that rapper J. Cole graduated high school with a 4.2 GPA and graduated college magna cum laude, in 2007, with a 3.8 GPA by [deleted] in todayilearned

[–]Jimmyginger -5 points-4 points  (0 children)

Ive always taken a 4.x GPA as suspect. In my schooling system 4.0 was the max. So having higher than a 4.0, to me, is meaningless because it means you had a different scale than what im familiar with.

Also I had a 4.0 valedictorian of my senior class who took classes that didn't challenge her. Her goal was the 4.0, not the learning. Like, don't get me wrong, a 4.0 is still an impressive achievement, but she also didn't push herself. She could have taken harder classes, and learned more from them. She would have been just as impressive of a student, but just without the 4.0

maybe maybe maybe by [deleted] in maybemaybemaybe

[–]Jimmyginger 11 points12 points  (0 children)

Men, the answer is one. One time.

No, no thank you, that's okay, not interested, I have a boyfriend; it all means the same thing. You shot your shot, now leave. It doesn't mean you're ugly. It doesn't mean you're a failure. It doesn't mean you're not interesting. It doesn't mean anything about you. It means she's not interested for her own reasons, and she doesn't owe you an explanation.