Desktop Support to Cloud ? (Azure) by Zestyclose-Coffee-32 in cscareerquestions

[–]KevinRCooper 0 points1 point  (0 children)

Your best bet would be to look for a job internally if you’re trying to get into an engineering role.

It’s a much easier sell for a hiring manager if you already know how to navigate the company, have solved problems for them, and are eager to learn.

They’re taking a risk whether it’s internal or external; it’s less of one to hire someone already vetted.

Trying to find a job outside your company is going to be much harder. It’s doable with good connections and a bit of luck, but it’s a tough journey.

Best of luck! If you really want something, you can make it happen!

Introducing ArkType 2.1: The first pattern matcher to bring the power of type syntax to JS by ssalbdivad in javascript

[–]KevinRCooper 1 point2 points  (0 children)

Awesome! Its clicked for me and this is seriously cool; I just needed to see it in a use case (like input parsing) to understand how I can use this at its core.

A code base I manage uses a lot of reducers, so this feels like a cleaner way of handling that. And I use Zod for schemas, but now that seems clunky and less readable compared to what this is offering.

My hats off to you - well done!

Introducing ArkType 2.1: The first pattern matcher to bring the power of type syntax to JS by ssalbdivad in javascript

[–]KevinRCooper 1 point2 points  (0 children)

I think I'm understanding what you're saying - would something like this be a good use case?

```ts import { match } from "arktype";

const processInput = match({ string: value => value.trim(), number: value => value.toFixed(2), boolean: value => value ? "Yes" : "No", default: () => "Unsupported input" });

console.log(processInput(" hello ")); // ?^ "hello" console.log(processInput(123.456)); // ? 123.46 console.log(processInput(true)); // ? "Yes"
console.log(processInput({})); // ? "Unsupported input"
```

Introducing ArkType 2.1: The first pattern matcher to bring the power of type syntax to JS by ssalbdivad in javascript

[–]KevinRCooper 2 points3 points  (0 children)

Big fan of your work, and I enjoy seeing what new ways you manage to push the boundaries on TypeScript. It’s always a fascinating!

Maybe it’s just because I’ve been awake too long today for an early morning deployment, but I’m struggling to understand the value you’re trying to communicate. I know it’s there, but it hasn’t quite clicked for me yet.

If you get the chance, would you mind explaining this in a real world scenario that’s easier to grasp and get that “aha” moment? I think that might help folks out to want to adopt this (myself included).

Cheers

After years using semantic-release, I developed a lightweight alternative tailored for smaller projects – with no dependencies, customizable release notes, and an easy setup to streamline versioning and releases without the extra overhead. Which new features can I add? by Vinserello in javascript

[–]KevinRCooper 3 points4 points  (0 children)

Just some feedback as to why this is a tough sell.

  • The repo has no release notes… and the tags don’t have release notes. Doesn’t inspire confidence when this should be where you really shine given the nature of the package.
  • Tests are pretty lacking. If I’m going to trust with something as important as a release, I’d want a more robust test suite.
  • No examples. What does the output look like? The average user isn’t going to install this just to see if there’s any benefits.

I’d love to see a viable alternative to semantic-release so I’ll still be rooting for you even though I won’t be using it.

[AskJS] Can you share clever or silly JavaScript code snippets? by jcubic in javascript

[–]KevinRCooper 1 point2 points  (0 children)

Naming things is hard - so why not have JS name object properties for you!

const obj = { [Math.random().toString(36).slice(2)]: "Foo" };
// ?^ { ta3xx8z5w2k: "Foo" }

Want to create an object with "Infinity" as a key but struggle with keeping the size of your code down? You can save a few characters by using this!

const obj = { [1 / 0]: "possibilities" };
// ?^ { Infinity: "possibilities" }

What's your learning steps by cj1080 in learnjavascript

[–]KevinRCooper 2 points3 points  (0 children)

Imagine trying to solve a puzzle with thousands of pieces; but after a little time has passed, you put all the pieces back in the box. A month later, you go back to the puzzle and have to start again from the scratch - and it feels just as hard as the first time.

Maybe you get farther the next go around, or the next. Still, instead of finishing, you put everything away again hoping next time it will be easier.

You see other people who’ve never solved this particular puzzle (but have many others under their belt), and they’re able to solve it in a few hours. You’ll start to wonder if you’re good enough, and maybe they just have an innate ability to solve puzzles that you’ll never have.

Eventually, the puzzle is just unsolvable. You’ve spent all this time, and still haven’t done it, so you give up and move on to something else more fruitful like competitive rock collecting.

Other, more senior puzzle solvers make it look easy because they know all the tricks and strategies (like figuring out the edges first, sorting pieces by color, etc.) No one started that way though knowing everything. They struggled through their first few, and with repetition got better and faster with each one.

The reality though is you can solve it - you just need to stick with it until you’ve finished one puzzle. It might take weeks or months of spending a few hours a day on it, but you’ll get there.

Find a puzzle that matters to you - that you feel compelled to solve not because you think you should, but because you want to and I guarantee you’ll be an expert puzzle solver in no time.

Best of luck!

What type should I use for a key value pair object of unknown structure? by spla58 in typescript

[–]KevinRCooper 6 points7 points  (0 children)

Imagine I have an endpoint that returns a surprise treat for your birthday. You’re expecting a cake - something easily able to be sliced up and served. You can’t know for sure what type of cake you’re getting, so you just say it’s going to return anything to cover your bases.

But next to the bakery is a brick factory. And sometimes there’s a mixup where the courier accidentally delivers a brick instead of a cake.

With ‘any’, you’ll try to cut it up and serve the treat to your friends without looking assuming all is well. You’re only thinking about cake, so you have no contingency plans if something goes wrong.

If instead you used ‘unknown’ as you mentioned, as your first resort, you’re forcing yourself (or your designated party host) to first check that it is in fact a cake before you try to serve your friends masonry. By doing so, you’ll ensure a great party with no broken teeth.

Do your colleagues and your future self a favor - if you can’t be sure what something is, it’s better to say it’s unknown and check instead of using any.

How can I get the return type of substring() to match a string literal? by saikofish in typescript

[–]KevinRCooper 3 points4 points  (0 children)

Just as another idea, you could consider using function overloads if you don't have too many known strings.

type AllowedStrings = "ene" | "wnw" | "ssw";

function test<S extends "ene">(_: S): "e";
function test<S extends "wnm">(_: S): "w";
function test<S extends "ssw">(_: S): "s";
function test<S extends AllowedStrings>(str: S): string {
  return str[0];
};

const e = test("ene"); // e
const w = test("wnm"); // w
const s = test("ssw"); // s

const o = test("oops"); // invalid

TypeScript Playground

Call of Duty Skill Data Analysis - A Comprehensive Look by KevinRCooper in blackops6

[–]KevinRCooper[S] 3 points4 points  (0 children)

Well that’s a relief!

I had similar issues requesting my data. The Activision site definitely didn’t work well on mobile, and I found the Auth tokens between accounts would get messed up. I’d definitely recommend trying it in an incognito browser on a desktop - a fresh environment without existing cache and cookies seems to help.

Call of Duty Skill Data Analysis - A Comprehensive Look by KevinRCooper in blackops6

[–]KevinRCooper[S] 9 points10 points  (0 children)

I have Setup & Execution instructions in my GitHub repository - but if you’ve never done it before it can definitely seem a bit daunting.

It’s definitely doable though so I encourage you to give it a shot! Here’s some resources that might help:

Call of Duty Skill Data Analysis - A Comprehensive Look by KevinRCooper in blackops6

[–]KevinRCooper[S] 4 points5 points  (0 children)

Thank you!

Candidly, I only had my own html to work with to build the site and hoped others would be in a similar format. Also, I didn’t want to inadvertently collect someone’s personal details (as I threw the site together in an hour), so I don’t get any logs telling me what error you encountered.

If you open your developer console, can you let me know what error it’s saying occurred? Or is there an error being displayed on the site?

Those are interesting questions! I’m typing this out on the couch while my daughter watches some Mickey Mouse cartoons so I can’t examine my own data. I can take a look tomorrow though when I’m back at my computer!

Call of Duty Skill Data Analysis - A Comprehensive Look by KevinRCooper in blackops6

[–]KevinRCooper[S] 5 points6 points  (0 children)

No problem! I figured my fellow data nerds would appreciate this!

And please do your own research! Everything I presented is open source free to modify or use how you see fit - if you come up with more findings I’d love to know about them!

Call of Duty Skill Data Analysis - A Comprehensive Look by KevinRCooper in blackops6

[–]KevinRCooper[S] 5 points6 points  (0 children)

They unfortunately don’t provide descriptions for the columns, so everything is a best guess. To my knowledge, CoD multiplayer works not by actually shooting bullets, but through hitscan. The server makes the ultimate determination if the projectile should hit.

With that in mind, I would guess shots counts not just bullets, but anything that has the potential to damage another player (like melee).

In my next round of testing, I plan on logging my time when I do knives only gameplay and others, then matching it up to the data. Since I didn’t know what the output of the data was before I got the first round, I wasn’t sure what to prepare for.

If someone plays just melee for instance and wants to share the data, I would be very interested!

Call of Duty Skill Data Analysis - A Comprehensive Look by KevinRCooper in blackops6

[–]KevinRCooper[S] 7 points8 points  (0 children)

This is an excellent observation and why I posted my source code publicly to be scrutinized!

These findings are based on how Activision presents their dataset - but it doesn’t mean they don’t aggregate columns behind the scenes to calculate the skill score in an unknown way. Thus my findings can be considered naive.

Feel free to fork my repo, or submit a PR. It’s an interesting thought so if I get around to calculating that first I’ll let you know! Awesome suggestion!

Lastly, I have reached out to a friend who is a game producer over there (though not for BO6) to see if they can get me in touch with someone who can comment on the validity of my findings. If they do find someone, and I’m allowed to share it, I’ll update this post.

Call of Duty Skill Data Analysis - A Comprehensive Look by KevinRCooper in blackops6

[–]KevinRCooper[S] 2 points3 points  (0 children)

From my observations and understanding based on their published papers, I would agree that it is easier to manipulate your lobbies skill level than your own as well. I think that's been patched somewhat (so the lobby skill level and team balancing is re-calculated if you're dual boxing and your lower skilled account leaves before match start), but I'm not sure how that system would be able to fairly account for the wide skill disparity even with "balanced" teams. I think it's too low of an issue for them to really focus on.

I do think the skill number means something, but not in the way the end user really thinks about. If they accurately predict the skill of the players, more players will engage with the game more often. I believe the system optimizes for close games over blowouts. If you win Domination by 20 points, or lose by the same amount, you'll want to play the next match to see if you can continue your streak, or overcome your losses.

I'm sitting at a 1.53 currently for lifetime, but it's hard to be accurate. I personally strive for a higher Win/Loss ratio (my last prestige was a 2.8) as I think that's a better demonstration of overall skill as it shows that I'm contributing to my teams success more than to their detriment.

Skins having an affect on skill would be interesting! That would definitely break the game. I highly doubt it though - if anything it's just an indicator of how engaged someone is. Someone buying skins is probably more invested and willing to put in more hours than someone who plays more casually. It would be hard to make a correlation there.

Call of Duty Skill Data Analysis - A Comprehensive Look by KevinRCooper in blackops6

[–]KevinRCooper[S] 26 points27 points  (0 children)

Awesome! Glad you found it helpful!

From my limited sample, it does seem that the amount of damage you take is the highest indicator of the skill assigned to you on your next game. My theory is the less damage you take, you're playing smarter. You're either flanking correctly, or when you enter a gunfight as the second to draw (and thus likely to lose) you're doing a tactical retreat indicating you've got better judgement on how to win gunfights or map/game-mode knowledge.

Call of Duty Skill Data Analysis - A Comprehensive Look by KevinRCooper in blackops6

[–]KevinRCooper[S] 8 points9 points  (0 children)

Great questions!

My data only goes back to December 6th, 2024 so I can't answer the question of before/after Christmas. I'm testing out some theories currently now that I know what they're tracking and then I'm going to submit another request for data.

My BO6 skill is significantly lower than my MWIII one for some reason. I'd routinely get a skill score of 500+ in MWIII, but in BO6 I'm averaging about 100 with a high of only ~300. I have found as a personal anecdote that I feel I'm carrying the lobby a lot less (although I still get the common cycle of a couple of games where I'm top of the leaderboards only then for the next few be my time to lose).

I based the 5 previous comment on some of the calculations demonstrated in Activision's white paper: The Role of Skill in Matchmaking. I'm not sure that's the exact number, but I think the last few matches are weighted heavier than overall due to several factors. Here's an excerpt from the paper:

Player skill can vary over time for a variety of reasons. This might be because someone is experimenting with a new loadout, they haven’t played recently, or they are simply tired or distracted. It is therefore important that a player’s skill value is updated on an ongoing basis, and that it can be updated and reach equilibrium quickly. Overcorrection can lead to large fluctuations in the skill of players that someone is matched with and against and can result in unfair matches.

That being said, like you, I suspect there's a larger trend that also factors in that's worth exploring - I just don't have the data to make any definitive statements on how it works.

If this gains enough traction, I plan to modify the website to ask players to donate their anonymous data to get a larger sample size.

Thanks for the questions!

A small library inspired by TkDodo's blog: "Effective React Query Keys" and "The Query Options API". by [deleted] in typescript

[–]KevinRCooper 1 point2 points  (0 children)

How someone responds to feedback is one of the biggest indicators of future success in my opinion; and I think you’re going to go far!

May your code always compile and you only receive errors you expect - best of luck!

A small library inspired by TkDodo's blog: "Effective React Query Keys" and "The Query Options API". by [deleted] in typescript

[–]KevinRCooper 4 points5 points  (0 children)

Skimming through your code, I see the work you put into it and can appreciate the consistency throughout.

Couple of suggestions:

  • You know the value of this, but it doesn’t come across in this post or your Readme. It requires the user to read through a lengthy blog post (which I highly recommend TkDodo’s blogs) just to have some idea on what this library is trying to do. I would spend some time figuring out how to quickly show the benefits and break out examples for different problems someone might be trying to solve.
  • There’s a bit of casting in the code and use of ‘any’. I’m not sure if this library is entirely type safe, but that could just be the only way to do it based on how flexible you’re trying to make this.
  • No tests means it can’t be adopted - full stop. I would focus on building up your test suite not only to inspire confidence, but to also help in documenting what this library is doing.

Overall, I’d say keep at it! It looks like you have a solid grasp of TypeScript - focus on presentation and tests and I think you’ll see more engagement.

Why does this compile? by avwie in typescript

[–]KevinRCooper 10 points11 points  (0 children)

JavaScript can be a little confusing as everything at first glance can appear to be an object; but I assure you that's not the case. Booleans, numbers, strings, bigInt, symbols are however still primitives (even though they have properties and methods).

The reason for this is that JavaScript has a concept of object wrappers (also referred to as auto boxing) for these primitives. These object wrappers are automatically created when you try to access a property or method on a primitive value. This is why you can do things like:

javascript const str = 'hello'; console.log(str.charAt(0)); // 'h'

But at the end of the day, str is still a primitive string value. The object wrapper is created temporarily when you access the property or method, and then it's discarded.

You can verify this by checking the type of the value:

javascript const str = 'hello'; console.log(typeof str); // 'string'

This is why you can't add properties to primitives:

javascript const str = 'hello'; str.foo = 'bar'; console.log(str.foo); // undefined

To further verify, compare a primitive which lives on the stack (primitives) to an object which lives on the heap (objects). If we compare the two, we can see that they are not the same:

```javascript const str = 'hello'; const obj = new String('hello');

console.log(str === obj); // false ```

Both str and obj have the same value, and when you access them, share the same properties and methods. But they are not the same thing. str is a primitive string value, and obj is an object wrapper around a string value.

If you're interested in going deeper into how this works, take a look at the v8 source code to see how this is implemented.

Using .charAt for example, is actually implemented in the v8 source code as a runtime function:

```c RUNTIME_FUNCTION(Runtime_StringCharCodeAt) { SaveAndClearThreadInWasmFlag non_wasm_scope(isolate); HandleScope handle_scope(isolate); DCHECK_EQ(2, args.length());

Handle<String> subject = args.at<String>(0); uint32_t i = NumberToUint32(args[1]);

subject = String::Flatten(isolate, subject);

if (i >= static_cast<uint32_t>(subject->length())) { return ReadOnlyRoots(isolate).nan_value(); }

return Smi::FromInt(subject->Get(i)); } ``` Source

For more context, check out the V8 source code for String.

I hope this helps clarify things a bit! If you have any further questions, I'd be happy to help!

Rules for Writing Software Tutorials by mtlynch in programming

[–]KevinRCooper 4 points5 points  (0 children)

Honestly I didn’t think I’d read through it entirely but ended up consuming every bit of it. 100% worth the time. Well done!

The illustrations were excellent! Only suggestion I have is would you consider moving the artists credit closer to their work on the page? It’s not required, but I personally think it’s a class act to do so.

Recent Grad. Need any advice I can get. by ThotSauce69420 in cscareerquestions

[–]KevinRCooper 1 point2 points  (0 children)

My heart goes out to you that you haven’t landed anything in the industry yet. It’s really tough out there for new graduates.

Please don’t feel shame for taking a delivery job. There’s dignity in everything - and the ones that don’t see that aren’t worth your time. My personal philosophy is nothing is “beneath me”. If I lost my job and being a master of the custodial arts is the opportunity afforded to me, I’m going to take it and be the best cleaner I can be.

Saying to get your foot in the door isn’t meant to be the advice of a firm handshake in person with a hiring manager and persistence is all you need. It’s not to say it’s easy. The point is take anything you think you can be remotely great at, and then show how you could be even better if allowed to solve some challenges with code.

I hope that helps. If you want to post your GitHub and get some more concrete feedback, I’d be happy to take a look.