|
Khorne posted:Is there really a maximum weight? If not, the answer is far simpler. There is a maximum weight, and it depends on the user input. They specifically say "web application" in the code challenge. As far as I can tell, it's a form of multiple-choice knapsack problem - I might be wrong, but I really don't want to share too much information because I don't want to cheat and I know that if I share too much, people might start giving hints, which I'm not looking for.. I just want to calm down that imposter syndrome rush of "oh gently caress I don't know this level of maths" e: quote:edit: You replied before I did. From that description, are players "active" for someone to pick from or do they have access to the entire dataset? Can players already be taken by other people or are you allowed to draft from the entire pool? etcetc full data set, so ~20k, then hypothetically scaling by an extra 5-20m each month after that. I'm seeing it as giving someone an impossible problem and seeing how they think on their feet.. which is kind of a dick move for a junior dev position, but it means that I either nail this, or I dodge a bullet, as mentioned But please don't give me more tips on how to approach it! I appreciate the thought, but I want to see how I handle it, just me and.. stack overflow. I just have never had a code challenge before so I didn't know what to expect boofhead fucked around with this message at 18:53 on Apr 8, 2021 |
# ? Apr 8, 2021 18:50 |
|
|
# ? May 19, 2024 00:46 |
|
boofhead posted:The phrasing is literally: Well if the goal is to select a team of 11, this problem might be more constrained than the general knapsack problem. Are there any other constraints? Edit: I see you don't want help with the actual answer. But just keep in mind that when problems are constrained, they might not be as difficult. It may not be NP complete, depending on the specifics HappyHippo fucked around with this message at 18:54 on Apr 8, 2021 |
# ? Apr 8, 2021 18:52 |
|
HappyHippo posted:Well if the goal is to select a team of 11, this problem might be more constrained than the general knapsack problem. Are there any other constraints? That's a fair point. I'm going to sleep on it and come back to it, it could be that the constraints reduce it to a more reasonable quantity, although I still don't see how it could scale to +5-20 million per month with any of the standard knapsack solutions. But I recognise that I'm probably being pretty annoying with not feeling comfortable sharing too many specifics, so I'll sit on it for a while. Thank you for your replies e: vv will do-- I'm hoping I'll see something new after I sleep on it (and work on other stuff) for a bit boofhead fucked around with this message at 19:19 on Apr 8, 2021 |
# ? Apr 8, 2021 19:01 |
|
After you've submitted your answer, post the full problem here and we'll dissect it.
|
# ? Apr 8, 2021 19:06 |
|
Does the test say anything about preprocessing?
|
# ? Apr 9, 2021 20:32 |
|
e: this was a question about an issue with hackerrank, but it looks like it was on their end and it's resolved now. sorry for wasting the space
Casey Finnigan fucked around with this message at 01:02 on Apr 10, 2021 |
# ? Apr 10, 2021 00:36 |
|
I have been programming on macbooks for years professionally. I love the unix style terminal and environment. I want to do some work on my windows PC but I want to emulate a mac environment somehow. Its doesn't need to be crazy like a dual boot or VM but I was wondering if there is a way I can emulate a terminal shell, instead of the garbage powershell that windows uses. I just want to be able to easily run things like node, npm, etc from my machine.
|
# ? Apr 12, 2021 17:50 |
|
Skyarb posted:I have been programming on macbooks for years professionally. I love the unix style terminal and environment. I want to do some work on my windows PC but I want to emulate a mac environment somehow. Its doesn't need to be crazy like a dual boot or VM but I was wondering if there is a way I can emulate a terminal shell, instead of the garbage powershell that windows uses. I just want to be able to easily run things like node, npm, etc from my machine. Check out WSL - Windows Subsystem for Linux. Gives you a bash shell. It's better integrated than you'd think, perhaps not where you'd want.
|
# ? Apr 12, 2021 17:55 |
|
Skyarb posted:I have been programming on macbooks for years professionally. I love the unix style terminal and environment. I want to do some work on my windows PC but I want to emulate a mac environment somehow. Its doesn't need to be crazy like a dual boot or VM but I was wondering if there is a way I can emulate a terminal shell, instead of the garbage powershell that windows uses. I just want to be able to easily run things like node, npm, etc from my machine. Windows subsystem Linux or whatever that thing is called
|
# ? Apr 12, 2021 17:55 |
|
When you install git on windows, it installs git bash, but it isn't integrated like WSL. Joke answer - eshell is built into emacs.
|
# ? Apr 12, 2021 19:18 |
|
Install Windows Terminal too, integrates with WSL’s bash and a regular command prompt. I do embedded Linux dev on an Ubuntu VM under WSL, using VcXsrv when I use a GUI tool. IDEs like vscode can also run natively on Windows and your project, toolchain, etc. live in the VM. You even get a network share that’s your VM’s filesystem, good enough for editing and copying files.
|
# ? Apr 13, 2021 07:35 |
|
Cygwin is also still a thing, I’m not sure how much runs under MinGW any more. I prefer encapsulating stuff away from Windows so that the whole thing doesn’t die together, ie just ssh from CMD, powershell, PuTTY into a VM.
|
# ? Apr 13, 2021 17:45 |
|
I have a question about MS Access 2016 query design. Basically, I have two spreadsheets and I'm trying to find matches between them with a "text contains" (rather than the default "text equals") join. Here are screenshots -- Table 1 -- Table 2 -- I want to run a query to find matches between these tables using the ISBN numbers of books as the common variable, because I need to create a report that appends info from Table 2 onto Table 1. But as you can see, the "ISBNs" column in Table 1 sometimes contains multiple numbers, while the "ISBN" column in Table 2 contains only one number. Here is my preliminary query design in two views: Design view -- SQL view (sorry for the tiny text)-- How do I look for only partial matches between the "ISBNs" in Table 1 with the "ISBN" in Table 2?
|
# ? Apr 13, 2021 17:49 |
|
There is a dedicated SQL thread somewhere in this forum. They probably won't even yell at you for using Access (much). Googling suggests you should be able to use InStr, as in, INNER JOIN ... ON InStr(haystack, needle) > 0
|
# ? Apr 13, 2021 18:15 |
|
OK, will repost there, thanks!
|
# ? Apr 13, 2021 18:29 |
|
I've been trying to teach myself the basics of git and contributing to open source. I found some typos in a popular repo, submitted my first PR, and they merged it. I'm now listed as a contributer. I'm assuming I can put this on my resume now?
|
# ? Apr 14, 2021 19:02 |
|
Hughmoris posted:I've been trying to teach myself the basics of git and contributing to open source. I found some typos in a popular repo, submitted my first PR, and they merged it. I'm now listed as a contributer. Feel no shame; the other applicants certainly won’t. DoctorTristan fucked around with this message at 19:27 on Apr 14, 2021 |
# ? Apr 14, 2021 19:16 |
|
Hughmoris posted:I've been trying to teach myself the basics of git and contributing to open source. I found some typos in a popular repo, submitted my first PR, and they merged it. I'm now listed as a contributer. Hell yeah! I'm not shy about telling people my name's in the HTML spec because I pointed out an obvious error that wouldn't confuse anybody reading it. Projects should be generous with acknowledgment, and you should accept that acknowledgment wholeheartedly.
|
# ? Apr 14, 2021 19:58 |
|
A very elaborate modded minecraft thing I was trying to do wasn't working, so I hunted around in the code and found that a number was 10x less than it should be. I added a zero and that got me into the Artic Code Vault.
|
# ? Apr 14, 2021 20:51 |
|
Hughmoris posted:I've been trying to teach myself the basics of git and contributing to open source. I found some typos in a popular repo, submitted my first PR, and they merged it. I'm now listed as a contributer. Hell yeah, this is how I became a contributor to VS Code
|
# ? Apr 14, 2021 21:34 |
|
I* was on the ISO C++ committee * My company was, confusingly and briefly and for no evident reason, and they sent me and one other employee to a committee meeting in Seattle. Then we hosted another committee meeting for which I was one of the people organizing.
|
# ? Apr 15, 2021 01:15 |
|
Hughmoris posted:I've been trying to teach myself the basics of git and contributing to open source. Step 2: Realize there's a bug or unexpected behavior. Step 3: File an issue report. Step 4: Realize that we're all developers, code is code, and in most cases we can fix issues ourselves for magic internet street cred. Open a PR with a fix. Step 5: Wait 6 months before realizing you've submitted a PR to a dormant repo. DoctorTristan posted:Feel no shame; the other applicants certainly wont. This, a thousand times this. Most people, if they've ever so much as watched a "Hello world in {someLang}" video on Youtube will list it as experience and leave it to the interviewers to drill down into figuring out the level of that experience. You don't have to go that far (please don't), but if a cursory glance at your github shows lots of contributions, most of the time that's good enough, and folks aren't going to CSI `git blame` to figure out the level of those contributions.
|
# ? Apr 17, 2021 12:38 |
|
Thanks for the "contributing to open source" thoughts and stories. I'll admit, I am finding it fun being listed as a contributer to some popular repos by adding minor but meaningful changes to their documentation. I'm not a good enough coder to iterate on the actual code but I can grammar check documents with the best of them. My work (clinical informatics) is not very code-centric but this will be a fun talking point in future interviews. *I might hide some of these relevant buzzwords in my LinkedIn profile to see if I get more attention from recruiters.
|
# ? Apr 18, 2021 18:13 |
|
Hughmoris posted:I've been trying to teach myself the basics of git and contributing to open source. I found some typos in a popular repo, submitted my first PR, and they merged it. I'm now listed as a contributer. Yes but don’t overstate your contribution and be very upfront and clear if asked. If someone asks you what it is answer clearly and specifically that you fixed typos. I had a candidate who changed some print statements around when I looked at his contribs. When I asked him to describe the contributions he made, knowing they were totally insignificant to the function of those repos, he tried to dodge it. When he wouldn’t answer clearly I moved on but it was a major reason for not proceeding to next steps as his answer struck me as dishonest. If he’d been totally upfront him having made those minor contribs would’ve been a feather in his cap.
|
# ? Apr 18, 2021 22:36 |
|
Has anyone worked with Office Scripts yet? It appears to be Microsoft's future replacement for VBA. It's basically javascript scripting for the web-based versions of their Office products. I really wish they would have used Python, since I don't know JS. I imagine the overlap between Python & Excel users is higher than Javascript & Excel. Also, the IDE they provide feels like it's 80 characters wide and you can't adjust it.
|
# ? Apr 21, 2021 04:12 |
|
ultrafilter posted:After you've submitted your answer, post the full problem here and we'll dissect it. For those who forgot, I'm the one asking about the multiple container knapsack problem code challenge. So I sent in the code challenge last Thursday, presented it on Monday, they seemed pretty happy with it and just had a final call an hour ago where they offered me the position as junior fullstack developer. Which I'm really happy about, I was hoping my product manager and customer service experience would tip the scales (which definitely did help) but they were apparently more than happy with my code and general knowledge for its own sake. So I'm really happy about that. The challenge was: Given a dataset of 18k football players with various fields, build a website with a search tool to list them according to the search term (name/club/nationality), which is easy enough, and then create a "team builder" function which takes a budget from the user and finds the optimal team for that. (The additional questions were how I would then scale that to 5-20m+ players added every month). The criteria were: From that dataset, take the player overall score and their cost, and build the best possible team (based on score), making sure you fill: 1 goalkeeper, 2 fullbacks, 3 halfbacks, and 5 forwards. Each player has only one position they can play for, so Messi can only be a forward, he can't be a goalkeeper. I looked into various knapsack solutions, dynamic programming and linear programming and so forth, which was beyond me, and so my approach was just: Build a team with empty players, then fill it with the cheapest players for each postion so that you always have, at minimum, a functioning team. Then iterate through the player set, ordered by ascending cost, and for each player, compare that player to the lowest scoring player for that position currently within the team, and replace them with the new player if: - still within overall team budget - new player has a higher score It's not ideal, I'd love to learn about better approaches (because that doesn't seem absolutely "optimal" according to proper MCKP theory), but for the code challenge for a junior position they seemed pretty happy with my approach and code.
|
# ? Apr 22, 2021 13:26 |
|
Congrats on the offer! Generally the problem isn’t coming up with a decent real world algorithm, the problem is coming up with an algorithm that is provably correct and can’t be abused by a particular dataset.
|
# ? Apr 22, 2021 13:37 |
|
Isn't that a hard (in the mathematical sense) problem anyways? You'll always end up with an approximation and in the real world, you're probably using whatever tools your database works best with to get there.
|
# ? Apr 22, 2021 15:28 |
|
I've built several optimizers for fantasy sports lineups, that can be done as an integer optimization problem. Here's an example using the library PuLP (which has a lovely API based on adding tuples to the problem object but works well enough).Python code:
Anyways they probably weren't looking for this and hell if I know how it works under the hood or how to optimize. Your approach is certainly more useful for understanding your skill level than "I know a library that does that!". Anyways, congrats on the offer!
|
# ? Apr 22, 2021 15:30 |
|
That's a phenomenal response for someone going for a junior position, I can see why the code aspect was most impressive up them. Congratulations!
|
# ? Apr 22, 2021 15:43 |
|
smackfu posted:Generally the problem isn’t coming up with a decent real world algorithm, the problem is coming up with an algorithm that is provably correct and can’t be abused by a particular dataset. The big issue with our current approach to complexity theory is that it only looks at how hard the hardest instances of a problem are. Those instances may not be at all representative of how hard the problem is when you're not dealing with adversarial input. There's a big research project in theoretical computer science right now trying to figure out how to characterize problems in some way that's more reflective of how hard they are in practice. There's a very recent book on the topic if anyone's really interested in the technical details, and even if you're not it might be worth reading the first chapter. KillHour posted:Isn't that a hard (in the mathematical sense) problem anyways? You'll always end up with an approximation and in the real world, you're probably using whatever tools your database works best with to get there. It has an obvious formulation as an instance of the knapsack problem, but it's possible that there's something special about this specific variation that makes some kind of trick possible. I don't see it based on the description, but that doesn't mean it doesn't exist.
|
# ? Apr 22, 2021 15:46 |
|
ultrafilter posted:It has an obvious formulation as an instance of the knapsack problem, but it's possible that there's something special about this specific variation that makes some kind of trick possible. I don't see it based on the description, but that doesn't mean it doesn't exist. I guess my point was more that 99% of companies aren't going to need to write their own solution to the problem because they're going to use an off the shelf one and the 1% left are the ones writing their off the shelf solutions to sell to other companies. Those kinds of "solve this mathematically interesting but ultimately pointless algorithm" questions always bothered me for that reason.
|
# ? Apr 22, 2021 16:13 |
|
I would really struggle with that problem because of all the unanswerable sports-management questions about player evaluation and the best way to build a soccer team. Anyway, I assume the setup lets you make simplifying assumptions. Your algorithm will probably usually reach a higher overall score if you consider players in order of decreasing score per unit cost.
|
# ? Apr 22, 2021 17:39 |
|
It’s a nice problem because it’s fairly easy to score solutions. So you could try multiple algorithms and see which performs best.
|
# ? Apr 22, 2021 20:17 |
|
Is there a way to export all classes in a html document in VS Code? Anyone know?
|
# ? Apr 23, 2021 17:30 |
|
Empress Brosephine posted:Is there a way to export all classes in a html document in VS Code? Anyone know? How repeatable and robust do you need it to be? Is it a one-off task for a specific page, or does it have to work on arbitrary pages?
|
# ? Apr 23, 2021 18:00 |
|
just a one off since I write all my css directly into the wordpress customizer and i'm lazy and don't want to keep alt tabbing back and forth lol
|
# ? Apr 23, 2021 18:09 |
|
In that case, I'd do it using a regular expression. something likecode:
I'd probably do it in Python. make a list of all the class_list groups, split by space, dump it in a text file or to the command-line or w/e. Use notepad++ to sort them and eliminate duplicates. All of that is a matter of preference though
|
# ? Apr 23, 2021 18:24 |
|
What are you trying to do? That doesn't seem like something you should need to do. Edit: removed my answer once I noticed you said vs code
|
# ? Apr 23, 2021 18:27 |
|
|
# ? May 19, 2024 00:46 |
|
ooo that's a good idea using Python to do it. Thanks! Maybe I should learn one day what language VS extensiosn are programmed in and just make one for myself...all it needs to do is scan the .html for "class=" or "Class=" or whatever typing of it and then dump what follows until the next line break! Thanks!
|
# ? Apr 23, 2021 18:35 |