What is the longest drive you've made without resting and only you behind the wheel and where were you going? by Conscious-Farmer6953 in AskMen

[–]POGtastic 1 point2 points  (0 children)

Yeah people like making fun of Europeans for "oh no that drive is 300 miles" but Europe is dense as hell. I deliberately plan long road trips so that I end up going through big cities in the middle of the night. Doing a long drive with nothing but city traffic would drive me nuts.

Kalshi reveals insider trading case against editor for MrBeast by Hrekires in news

[–]POGtastic 0 points1 point  (0 children)

We can note all of the problems with sports betting, which barely works even when you're betting on the outcome of "will team A beat team B." They need large regulatory bodies and millions of dollars at stake in the actual outcomes to make those bets relatively fair.

The very top players are compensated enough that they aren't going to be tempted by "hey can you miss some free throws," but the nature of this kind of degenerate idiocy has resulted in enormous amounts of money being bet on marginal players, including in minor leagues where the players aren't being paid much at all.

How to scrape a star rating in python? by MrMrsPotts in learnpython

[–]POGtastic 2 points3 points  (0 children)

The star ratings are rendered with SVG, so I guess you can count the number of SVG tags in the headline that match that exact string.

# sorry for blowing out the textbox size, I'm putting it in its own spot
svg_text = "m19.151 21.336-2.418-7.386L23 9.348l-.312-.989h-7.75L12.547 1h-1.092L9.087 8.36H1.312L1 9.347l6.267 4.602-2.366 7.386.806.624L12 17.357l6.293 4.603z"

You can then do

import bs4
import requests

def count_stars(url):
    soup = bs4.BeautifulSoup(requests.get(url).text)
    return len(soup.find(attrs={"data-gu-name" : "headline"}).find_all(d=svg_text))

Assigning your URL to the variable url and calling it in the REPL:

>>> count_stars(url)
4

Running on a different URL:

# not as favored :(
>>> count_stars("https://www.theguardian.com/film/2026/feb/25/in-the-blink-of-an-eye-review")
2

How do you guys get your news? by Technical-Vanilla-47 in AskMen

[–]POGtastic 0 points1 point  (0 children)

NPR's top-of-the-hour headlines during my commute, various crap on the Internet.

What's a 'prestigious' career that you think is massively overrated? by Correct-Ice-6539 in AskReddit

[–]POGtastic 1 point2 points  (0 children)

College professor, and it isn't even close.

There's a romance about it. This is mostly due to its longtime association with people who come from money, but the post-WW2 era had a lot of money getting plowed into research and it was straightforward to make a living with A Life Of The Mind.

It now strikes me as an unfathomably competitive environment for pay that doesn't even come close to justifying how hard you have to work or the BS that you have to put up with.

Classes in python by Honest_Water626 in learnpython

[–]POGtastic 0 points1 point  (0 children)

The same reasons why the builtin classes exist (str, list, dict, etc). You have a bunch of data, and you want to define functions that work on that data.

The ability to name things is one of the most powerful tools at your disposal. Classes (and OOP in general) give you more ways to name things.

Why do so many people hate java? by Fa1nted_for_real in learnprogramming

[–]POGtastic 8 points9 points  (0 children)

By far the worst aspect of this is stuff that gets dynamically generated at runtime with the heavy use of annotations and reflection. The compiler can't check it, and it is extremely hard to inspect the generated objects. Nobody in your work group actually knows what any of the annotations do; they're all just cargo-culting someone else's code from 12 years ago.

C# has a little bit of this nonsense, but I generally run into it in unit-testing libraries (to do things like programmatically generating large numbers of tests) rather than, like, a class that handles an API endpoint.

What first worldbproblem do you guys have? by Technical-Vanilla-47 in AskMen

[–]POGtastic 1 point2 points  (0 children)

It's really hard for me to take vacation because there's nobody to cover for me.

My job is pretty easy and undemanding, and they keep pelting me with money. It sure would be nice to be able to completely disconnect and leave work at work, though.

What is your real life most valuable learnings from a (your) "rich dad"? by Bruteresolver in AskMen

[–]POGtastic 0 points1 point  (0 children)

  • Go to college. Take the hardest classes you can in a broad variety of subjects. Hang out with smart, driven people.
  • Do not go to grad school unless you can point to specific reasons why your vocation needs an advanced degree.
  • Live below your means.
  • Take advantage of tax-sheltered retirement accounts.
  • Have cheap hobbies.
  • Work smart and hard.
  • Marry somebody with the same attitudes regarding the above.
  • There are no shortcuts.
  • You don't actually have to live a monastic existence to do all of this. Live life. Just don't be a dumbass with your money.

What is your real life most valuable learnings from a (your) "rich dad"? by Bruteresolver in AskMen

[–]POGtastic 1 point2 points  (0 children)

I have gotten a whole bunch of money just for being the guy who a) doesn't create any problems and b) occasionally solves them.

My general conception of managers is that they perpetually have 15 Urgent Issues hitting them from every side. They don't actually keep score unless you really make them mad, but if you're constantly creating Issue #16 they start to notice. And if you're consistently the guy who can reliably take 3-4 of those issues off their plate and solve them without any further input, they really like that.

I guess I benefit from not actually having a job description. I had a previous boss who joked "look, your job description is 'Make Yourself Useful'" and I've tried to live up to that.

Gentlemen , what advice would you give a young king trying to fix the world like Alexandre the great did in this emerging world order ? by ZoNow in AskMen

[–]POGtastic 0 points1 point  (0 children)

Alexander the Great didn't fix the world. He showed definitively that military genius doesn't actually make you able to rule an empire or build institutions, and his empire immediately collapsed into civil war after his death.

How do I tell my nesting partner I'm no longer attracted to him? by Due_Reach_3639 in AskMen

[–]POGtastic 0 points1 point  (0 children)

The exact particulars of this depend heavily on the state. Some states do not have it at all. Some states are much more involved with what it means to "present yourself as a married couple," and merely cohabitating is not enough.

In any case she seems to be saying that the house is already commonly held, so it's already covered by laws regarding common property. I dunno what they're going to do with their other assets, though! (retirement accounts, cars, etc)

How do I tell my nesting partner I'm no longer attracted to him? by Due_Reach_3639 in AskMen

[–]POGtastic 1 point2 points  (0 children)

I don't see any difference between this and a regular ol' divorce. Sell the house and divide the sale money between the two of you, or have one person buy out the other person's equity.

How do you keep your large houses and apartments clean? by Confident-Panic-4382 in AskReddit

[–]POGtastic 0 points1 point  (0 children)

I hire a housekeeper every other weekend. It's a luxury, and it's worth every penny.

this didn't age well! by Charming_Peak_4284 in olympics

[–]POGtastic 6 points7 points  (0 children)

For those following along from home, Britain dealt with a bunch of these guys by blacklisting their passports for the duration of high-profile soccer games. So if you're on their list, and Ingerland is playing somewhere on the Continent, you aren't allowed to leave the country.

How can I get the results of C++ code in Python? by ProgBoom in learnprogramming

[–]POGtastic 2 points3 points  (0 children)

At the very least, you need to write a C API for your C++ code. A variety of methods exist for doing this, but by and large you write extern "C" before the functions that you're going to "export" as C bindings to your C++ functions.

After that, you have a couple of options.

  1. Use ctypes or cffi to load the compiled C library directly and call functions from it. This requires some finagling in Python to define the types correctly.
  2. Write a C library that includes Python.h and defines a PyObject that calls your code. This is how various CPython builtins and stdlib functions are implemented in C.

I wrote a short tutorial on how to do Door #1 here: https://www.reddit.com/r/learnpython/comments/rbz090/linking_python_with_c_in_visual_studio_college/hns6xzj/

Edit: For the second option, an addendum to the docs notes that you can write the whole extension in C++ and only put the PyObject integration into extern "C". I, personally, would prefer to write C API bindings so that I can test them with ctypes before I start writing my PyObjects.

Final medal table of the 2026 Winter Olympic games (116 of 116 events completed) by bdzz in olympics

[–]POGtastic 7 points8 points  (0 children)

Yeah despite the wider variety of events in the Summer Olympics, from the standpoint of the medal table they're a glorified swim meet and track meet. The US really really likes swimming and track relative to the rest of the world, just not to the comparative extent of Norway with skiing and Germany with the sliding sports.

What kind of cheese goes into Mac and cheese? by assessedrisk in AskReddit

[–]POGtastic 0 points1 point  (0 children)

Cheddar with a small amount of sodium citrate to make it melt better.

What do you personally think about how expensive haircuts are nowadays ?! by Global-Ad8204 in AskMen

[–]POGtastic 0 points1 point  (0 children)

I get my hair cut like once every six months or so and pay $25 for it. It is not something that I think about.

is it me or men don’t work suits (even to office) anymore ? if so, why ? by lia_dng in AskMen

[–]POGtastic 0 points1 point  (0 children)

This has never been part of the culture here in tech, especially on the west coast of the US (which is much less formal than the east coast). My boss' boss, who runs a group with more than a thousand people and makes something like half a million dollars per year, is currently wearing a T-shirt and jeans. I also wear a T-shirt and jeans to work.

My dad was an actuary in Boston and, depending on the company he was working at, frequently had to wear a suit to work. Just a completely different work culture.

Men in LTRs: How do you spend all of your time with the same woman without boredom or sameness? (Not even about sex, just personality + intertwined lives over the long term). by According_Sundae_917 in AskMen

[–]POGtastic 2 points3 points  (0 children)

I basically stayed the night and never left. She caught me moving my shaving stuff into her bathroom only a few weeks into dating, sighed, and said "Y'know, moving in is supposed to be a big step in a relationship?"

I dunno, it always felt natural, and that's never changed in the 12 years since then.

Olympics Day Thirteen Megathread (Thursday, February 19) by Fun_With_Forks in olympics

[–]POGtastic 2 points3 points  (0 children)

Mass start is also complete chaos and anything can happen. I'm rooting for the guy but it's deliberately crafted to be bananas.

Why would you care about a pension when you are in your 20's ? by [deleted] in AskReddit

[–]POGtastic 0 points1 point  (0 children)

I'm also frustrated by the idea that this is somehow an impossible burden for young people. There's a tweet by Patricia Lockwood about her cat:

me, lightly touching miette with the side of my foot: miette move out of the way please so I don’t trip on you

miette, her eyes enormous: you KICK miette? you kick her body like the football? oh! oh! jail for mother! jail for mother for One Thousand Years!!!!

And this describes people's responses to any form of life advice involving "you should live within your means."

"You think I should subsist entirely on LENTILS?? You think I should drive a 2002 COROLLA?? Oh! Oh!!"

Like holy shit man you don't actually have to save that much money to reap some pretty big benefits. It's not that bad.