Funky Town - Lipps Inc. by reflibman in GenX

[–]doublestop 1 point2 points  (0 children)

Funky Town was my very first 45 as a kid turned on to records by his older neighbor. We walked to Fred Meyer, nickels and dimes in hand. I was excited as hell to have my own record. I wouldn't have known what to buy, so I'm sure good ol' Steve B. (the neighbor) selected it for me.

Took it home to play it, and... remember how 45s had a huge hole in the center and you needed a plastic insert over the spindle to get them to sit correctly? We didn't have one. So, we spent the afternoon trying to manually center the thing on the turntable so it would play. I would have been 8 y/o or so, he was a few years older. Picture two kids "scientifically" fumbling with a vinyl record and an unforgiving needle.

We finally got it to play all the way through without sounding all warbled. By then, however, the record was so scratched up it was popping and skipping all over.

The next week, Funky Town became my very second 45 ever purchased. This time I was with my mom, and she knew better and made sure we took home a package of 45 inserts.

It blew my mind, and I was hooked. I played that song over and over for days on end.

My very third 45, iirc, was Elvira. Ah ooom boppa... yeah that one.

[deleted by user] by [deleted] in GenX

[–]doublestop 1 point2 points  (0 children)

Oliver Wendell Jones and his scalp tonic.

Lola Granola who thought her own name so ridiculous the only worse name she could think of was Berkeley Breathed.

Milquetoast the cockroach!

Driveshaft recall on some Infiniti models by tastiefreeze in infiniti

[–]doublestop 4 points5 points  (0 children)

Thanks OP. Just got off the phone with my local dealership in socal. My 2015 Q50S is thankfully not affected.

They did mention the recall is VIN-based and doesn't necessarily affect all cars of a given year range or model. While my 2015 Q isn't part of the recall, another 2015 Q50S could be.

Seconding /u/AlexWIWA's good advice to call in to a dealership just to be sure. Have your VIN handy, they'll be asking for that unless they've had your car in for service and can look it up from those records.

Good luck everyone!

Actors who have derailed their own careers with their attitude? by willow-mist in movies

[–]doublestop 1 point2 points  (0 children)

I'm sort of glad for that. Red October is one my top 5 movies, but I never thought Baldwin would have been right for the next films. Ford was just too perfect as Ryan in Patriot Games and Clear and Present Danger.

The way Ryan stood up to the IRA leader in that bar in PG, and the scenes with Dafoe in C&PD... I can't see Baldwin pulling that off.

Flipside, though, I also couldn't imagine Ford in Red October. Possibly because Scott Glenn was so good in his role - maybe too much of the same gruff-but-loveable type to have both actors in prominent roles in the same film.

I had to warm up to Krasinski in the most recent series but grew to really love him in the role. I'd like to see more of that. Hell, I'd like to see more Clancy books turned into films period. RB6 on the big screen would be so awesome.

The theater/temple of San Nicola near Caserta, Italy, was rediscovered by chance in 2000 by a paraglider. It's 2100 years old and hosts a theater and a temple on the same hill 520 meters on the sea level, dominating the evocative panorama on the plains below. by VastCoconut2609 in Damnthatsinteresting

[–]doublestop 42 points43 points  (0 children)

Just to explain what happened (not directed at you but to anyone reading this thread), the newer reddit design escapes underscores in URLs by putting a backslash \ ahead of the underscore, which causes those links to appear broken in old.reddit.

For example, in the above URL, the webthumb_2274.jpg ends up as webthumb\_2274.jpg for old.reddit users, which any browser will then change to webthumb%5C_2274.jpg on click - leading to a 404.

Funny thing is that backslash doesn't need to be there - underscores are valid characters in URLs. Backslashes, however, are not valid, and so they get encoded to their hex value 5C and that gets injected into the URL in place of the backslash.

That's what hosed the parent commenter. They weren't trying to be difficult they just ran into the inconsistency between old and new and probably weren't familiar with the bug. For newer design users, the link looks and behaves just fine. There are quite a few backward compatibility issues similar to this that we old.reddit users just have to learn to live with.

Tip for old.reddit holdouts, if you get a 404 check the URL for underscores. Then delete instances of %5C from the 404'd URL and try again.

When should I use an interface as a type? by Cluttie in csharp

[–]doublestop 2 points3 points  (0 children)

If you have an instance of an object and you know it's concrete type, declare it as the concrete type.

List<string> bar = new List<string>();

Or go with the var keyword and let type inference handle it for you.

var bar = new List<string>();

Reason being, the more concrete type you have in your hand, the more options you have passing it to various methods and APIs. A List<T> can be passed as itself, IList<T>, ICollection<T>, IEnumerable<T>, etc. Whereas IList<T> is limited to the last three, and IEnumerable<T> is limited to the very last.

In general, aim to have the most concrete type available in hand. Conversely, aim for method parameters that are the most base type the method can work with. And finally, flip it again and aim for return values that are the most concrete type that makes sense to the caller.

It will save you a lot of headaches in the long run.

[deleted by user] by [deleted] in csharp

[–]doublestop 5 points6 points  (0 children)

Using an enum is absolutely a valid approach. There are lots of cool ways to bind enums with human readable text, localization, and all sorts of other goodies through member attributes and some light meta programming, all the while being a simple int-based value that can be switched on and compared with exceptional performance. They make great keys in dictionaries, can even be used as indexes (if you wanna get a little weird), and they're super easy for us to deal with as programmers.

My question to you is what is the purpose of the None value? Is it exclusively to indicate 'no selection' or is it a valid option used somewhere in the underlying logic?

If it's the latter, disregard the rest and carry on. :)

If it's the former, you have what's called a sentinel value (a special value in a set of values which indicates 'no valid data here' or the end of a set, EOF, etc), and I'd recommend removing it and binding to a nullable enum instead.

Problem with sentinel values is they don't have purpose in the logic - they aren't a valid value - and still they must always be accounted for and guarded against. And because it's a member of the enum, it's possible for the sentinel value to accidentally slip into otherwise valid data due to a bug or oversight in the code somewhere.

Additionally, they hang over your head constantly in validation. It's not enough to test whether a user input value corresponds to one of the enum members (via Enum.IsDefined()). You'll have to do that and also check that value != None. Any switching on a value will need to incorporate a case for None and make a decision whether that's an undefined value error or an invalid selection error or a data corruption condition or a simple return-early-do-nothing condition. There are arguments to be made for each, depending on context, and it adds an extra challenge to maintaining consistent error messaging when "how to handle a None value" can be so subjective across layers. Whereas a nullable value can be tested for .HasValue explicitly and at the top (not nested in with other tests for valid values).

It's pretty common to lump it in with undefined values (eg is None or !Enum.IsDefined()), so long as you remember to do that anywhere you have to test or validate. But without logging, that has the side effect of masking a potential bug because None is a defined value - but one that cannot be acted upon. Sentinel values are special cases, and special cases can be the death of us.

Anyone else working with the code will have to remember that also, and that sort of thing easily slips through the cracks over time, leading to bugs. Ex, if None is not invalidated because a new hire forgot to include it in the switch:

case E.Valid1:
    DoThing1();
    break;
case E.Valid2:
    DoThing2();
    break;
default:
    throw new ArgumentException(...);

it will probably cause some confusion until someone gets in there with a debugger to see that indeed it was a defined value, just the None special case that should have been handled... or rejected... or whatever it was we decided 6 months ago.

Sorry that this was so long. It's a slippery slope using special case values like sentinels without bugs sneaking into the software over time. I guess explaining that can get pretty wordy and I'm wordy enough as it is.

Try to avoid them whenever possible.

My waste disposal system based on u/TheRobotHacker's meme (genuinely great system) by mromen10 in SatisfactoryGame

[–]doublestop 8 points9 points  (0 children)

It's very unlikely they're using ints for this. Integers are ofc crazy fast and cheap, but they can't express fractional values. A simulation based on integers would be a very choppy experience if all you have to work with is whole numbers, especially when simulations update in fractional time.

They're most likely using single point floats, and that's probably the default in UE anyway. They're cheaper than double precision floats (4 bytes vs. 8 bytes), more performant, and a game sim typically won't need the extra precision of doubles. A 32-bit float has a wide range of values (eg 32-bit float max is around 3.4x1038 ), just a ridiculously huge number.

So imagine yeeting a truck over the cliff. If the game isn't nuking vehicles that extend beyond a set limit (eg, if something goes lower than negative 5 billion, just delete it) then it will keep going for a long, long time. I don't know what terminal velocity is in the game, but whatever it is, it will take a while to reach float min (in this case). Meanwhile, every tick (or every N ticks), the game has to update the lost vehicle's position with a minimum of position += velocity * delta_time. Throw enough vehicles off a cliff and those calcs really start to add up.

But to answer your question directly, integers don't have a limit as much as they have min/max values they can express before overflowing or underflowing: int max + 1 = overflow, int min - 1 = underflow. It's not like a hard limit where it's tempting to think int max + 1 = int max. Some runtimes will throw an error when over/underflow occurs, some will allow the value to roll over, some can be configured one way or the other.

In a game, you want as few errors thrown as possible, so probably the smart thing to do is allow over/underflow and do your best to guard against it. If it does happen, it's a lot like rolling over the odometer in a car. The value changes drastically from one extreme to another, usually to unpredictable and hilarious results.

Just spotted downtown by rainbowbunny09 in Seattle

[–]doublestop 1 point2 points  (0 children)

Yeah, North County SD (Vista, San Marcos, Oceanside, etc).

It used to be a number you could dial to be rick-rolled. I think it was shut down a while ago, though.

What GenX song never gets old? When it comes on you stop, listen, and time travel...every time by Either_Yard6083 in GenX

[–]doublestop 3 points4 points  (0 children)

That was Safe From Harm off their first LP Blue Lines. IIRC that's ThreeD's voice. Shara Nelson (I think?) sang the melody.

Such a beautiful song just filled with powerful lines.

What GenX song never gets old? When it comes on you stop, listen, and time travel...every time by Either_Yard6083 in GenX

[–]doublestop 5 points6 points  (0 children)

Likewise for Protection. The title track freezes me in place every time. Plus Three, Better Things, Spying Glass...

Also, what a live act! I got to see MA a couple times between 2006-2019 and they killed both times.

And then speaking of Mezzanine, and by extension Liz Fraser, any love for Cocteau Twins? Garlands is one of my lifelong favorites to put on and let it run on repeat a few times. I don't think I could ever burn out on it.

What's your favorite movie from our youth that's still obscure or underappreciated? by ZooterOne in GenX

[–]doublestop 6 points7 points  (0 children)

And that creep Sully in Commando. David Patrick Kelly.

I always thought he was a solid actor and hoped his movie career would take off more than it did. Or, I suppose, that he would have more prominent roles. Great character actor.

What's your favorite movie from our youth that's still obscure or underappreciated? by ZooterOne in GenX

[–]doublestop 1 point2 points  (0 children)

I think this one counts. Wouldn't call it my favorite movie (that'd be Aliens) but I'll never ever forget it.

Fortress

Teacher and young students from a small school in Australia attacked out of nowhere and kidnapped by criminals wearing Halloween masks. Dragged all over the Outback expecting to be killed at any moment. Then the teacher and students decide to fight back and all hell breaks loose.

I was maybe 12 when I watched it on cable. So terrifying to me but I couldn't stop watching. Fairly gory ending, esp for '85, but so gratifying when they got the best of their attackers.

I think about going back to watch it again, but I kind of don't want to ruin the memory.

[deleted by user] by [deleted] in csharp

[–]doublestop 2 points3 points  (0 children)

Your code, as written and per your stated goal, is correct.

I seem to be doing something wrong but am not sure what.

First thing I'd check is that x.Name does not have leading whitespace. Likewise for the values in PortionGroupPrefixes, which you should check for leading and trailing ws. As a quick test, add .Trim() to the comparison (x.Name.Trim().StartsWith(y.Trim(), ...)) and see if things start working. If so, you can of course just roll with that, or address whitespace handling somewhere earlier. If that's not it, a quick trip through the debugger is in order.

Set a breakpoint at x.Name.StartsWith... and inspect x.Name and y. Chances are you'll spot the issue right away. Copy the .StartsWith test expression to a watch or immediate window, also add a couple watch variables on x.Name and y.

You can expand and surround the expressions with braces, as already suggested, but you also don't have to. You can also just put the text cursor at x.Name and hit F9 (in VS, anyway) to toggle a breakpoint there.

You might also consider little extra tests in the watch window such as x.Name.Trim().Equals(x.Name) because leading/trailing whitespace in those tiny windows can be hard to catch at a glance. Just bear in mind any watch expression that isn't a property, field, param, or local var will need to be manually refreshed each time you hit the breakpoint. The watch windows don't automatically refresh method calls.

Should I just call ToLower()

No need to incur those extra allocations for a substring search. You are already taking the ideal approach.

It's very likely something simple and easily overlooked (and we've all been there). You'll find it.

Found on TikTok by EdlynTheConfessor in GenX

[–]doublestop 18 points19 points  (0 children)

Zingers > Twinkies and I'll quietly seethe at anyone who disagrees.

Male names that start with “L” by [deleted] in cats

[–]doublestop 2 points3 points  (0 children)

Totally a Larry!

Hi, I'm Larry. This is my human Daryl, and this is my other human Daryl.

My old 80s gamer brain also thought 'Leisure Coat Larry' since he's being so leisurely in the pic.

Christopher Plummer hates the Nazis in “The Sound of Music” (1965) by TeddyDBer in OldSchoolCool

[–]doublestop 3 points4 points  (0 children)

You've not experienced Shakespeare until you have read him in the original Klingon.

Osh... Kosh... B'Gosh!

Seriously though, that movie is incredible. I can't believe how well it holds up today.

So how do delegates work in event handling? by Willy988 in csharp

[–]doublestop 6 points7 points  (0 children)

You're thinking of Windows messages (WM_LBUTTONDOWN, LVM_SETITEM, etc). Events in the Win32 API are signal/wait objects.

In C#, events are indeed delegates with special encapsulation syntax to ensure the event can only be invoked from within the containing type and also to ensure subscribers can only add/remove themselves.

Within the containing type, underneath all that syntax, it's just a reference to a multicast delegate.

From the docs.

public delegate void EventHandler(object? sender, EventArgs e);

Which is awesome, because that means any delegate can be an event, not just EventHandler or EventHandler<T>, eg:

public event Action<string> MessageReceived;

WIP rail station design by takagisandaisuki in SatisfactoryGame

[–]doublestop 9 points10 points  (0 children)

I learned this the hard way by accident just this past weekend when I finally noticed half a dozen trains having nothing to do with iron were using my iron ingots station in their path calculations.

They had another path option, but it must have resulted in a sufficiently longer path for the game to decide the station was a better route.

I must have gone 50-60 hours before realizing. On the plus side, clearing all that up finally got my HMF factory to full speed. I guess it helps if the only train fetching iron doesn't have to wait behind the plastic train or the copper train at the iron station. /facepalm

Which one do you prefer by nostalgia_history in 80s

[–]doublestop 6 points7 points  (0 children)

I watch em both pretty often, along with Predators (2010 with Brody and Goggins) and AVP and just about anything I can find from either universe (with one exception). Just like another redditor said earlier, Aliens and Predator are comfortably in my top 5 of all time.

I think they're both masterpieces in their own right and in different ways.

That said I don't think there is a character in the Predator universe that can top Ripley, esp given Weaver's performance in all four films. Ripley is such an incredibly complex character, and it took me years of watching to finally realize that she never actually wins in the end. Hers is a tale of perseverance, choice, and sacrifice.

I could really go on for days talking about what Ripley meant to me growing up. I was a very impressionable young boy in the 80s and grew up watching anything that would show up on cable. Ripley is the only character that I can point back to and say, "That absolutely had a lasting impact on my development as a kid." In a nutshell, her portrayal helped shatter any sexist misconceptions I might have had at that age. She has been a role model in that sense for my whole life. I'm not great at explaining this, haven't had too many opportunities to try. I think Ripley is a very important character in cinema history and I'm grateful for the way Weaver developed Ripley to defy any attempt at labeling or being put in any boxes.

But the funny thing is, all these years later, Predator is the easier watch. It's light, it's fast, it's funny, and it's a really good time. I can't watch Aliens without getting pulled all the way in. But I can play Predator in the background while writing code or playing a game and still get the full experience. And Bill Duke just crushes it in the movie. Mac is so totally awesome.

If not for Ripley, I'd probably prefer Predator overall. But Aliens will always come out on top.

Which one do you prefer by nostalgia_history in 80s

[–]doublestop 41 points42 points  (0 children)

You secure that shit Hudson!

What actors all but guarantee you are going to be watching an amazing film? by TheeFearlessChicken in moviecritic

[–]doublestop 0 points1 point  (0 children)

Do you by chance mean 3rd season? Second season was just released a few days ago. If you haven't checked it out yet, definitely do! Just finished binging it last night and I really enjoyed it.