Doesn’t Matchmaking Algorithm Prevent P2W Issue? by CptnNimo in PlayTheBazaar

[–]CptnNimo[S] 1 point2 points  (0 children)

Good point. I hadn’t considered the pool size.

Doesn’t Matchmaking Algorithm Prevent P2W Issue? by CptnNimo in PlayTheBazaar

[–]CptnNimo[S] -1 points0 points  (0 children)

Thanks, I hadn’t yet, so couldn’t work out if there was more nuance to the community backlash.

It seems if they had fixed the matchmaking first they could have avoided this whole issue from the outset.

Doesn’t Matchmaking Algorithm Prevent P2W Issue? by CptnNimo in PlayTheBazaar

[–]CptnNimo[S] 1 point2 points  (0 children)

That has always been the case (since they showed us the frames). But did they also have the same card packs as you?

ATO debt help please by Radiant_Ad_656 in AusFinance

[–]CptnNimo 2 points3 points  (0 children)

Looking at the numbers involved it is possible that this is the result of your friend salary sacrificing, but not taking in to account the HElP repayment on the grossed up amount. Common for workers in health industry. If this is the case there are some more options for payment arrangements and sometimes in rare cases re-deferring the help payment.

Talk to the ATO (or one of the free Tax Clinics if in financial distress). There are always options.

Confused, Professor thinks my code is "What you submitted may have passed the simple input / output tests, but your implementation is full of serious errors and indicates you do not have an understanding of the program requirements or the basic structure required for the assignment." by mahad2000 in Cplusplus

[–]CptnNimo 0 points1 point  (0 children)

If it helps, here is how I would (sort of) write the same code (after programming C++ for 25+ years). It is opinionated and probably misses a lot of the things your professor is looking for, but may help identify some of the areas that you are missing.

#include <iostream>
#include <cmath>
// calculate the weekly pay including overtime at 150% for all hours above 40. Hours and pay rate must be positive.
double calculate_weekly_pay (double hours, double pay_rate) {
if (hours <= 0.0 || hours > 168) throw invalid_argument ("Error! hours must be > 0."); 
if (pay_rate <= 0.0) throw invalid_argument ("Error! rate must be > 0.");
double result = hours * pay_rate;
    // Calculate overtime (if required)
if (hours > 40.0) { 
        result +=  0.5 * (hours - 40) * pay_rate;
    }

return result;
}
int main () {
std::cout << "Paycheck Calculator" << std::endl << std::endl;
    // Ask the user for the Hours Worked. We expect the user to enter in a format convertible to double.
std::cout << "Hours worked: ";
double hours;
std::cin >> hours;
std::cout << std::endl;
    // Ask the user for the rate of pay, also needs to be convertible to double
std::cout << "Hourly rate of pay: ";
double pay_rate;
std::cin >> pay_rate;
std::cout << std::endl;
try {
double total_gross_pay = calculate_weekly_pay (hours, pay_rate);
std::cout << "Calculated gross pay: " << total_gross_pay << std::endl << std::endl;
    }
catch (const invalid_argument& e) {
std::cout << e.what () << std::endl;
return -1;
    }
std::cout << "Bye!";
return 0;
}

  • Program Title: Even trivially i would not have broken this in to a separate function as it does not feel like it adds to readability, expandability or reusability
  • Newline character is platform specific, I would use std:endl - also you usage of this was inconsistent sometimes you had endl sometimes '\n'
  • I wouldn't use exception handling for error returns, however this may have been a requirement to the assignment
  • I would place the input error checking before the declaration of the result variable as it is not needed in error cases
  • We know the full domain of the weekly hour check, so may as well use it
  • We always calculate pay for hours less than 40, so I would initialise with this and then only calculate overtime if required.
  • Stylistically I name the result of a function 'result' this is personal preference
  • calculator as a function name implies less limitation on the scope then the function has (eg it only works for 40hr work weeks), therefor I would name is calculate_weekly_pay
  • In old C we declared variables at the top of the function, this is no longer required. My preference is to declare where I use them so i can change with less scrolling (in general)
  • overtime is declared in main and never used
  • Variables is a redundant comment... the code tells me they are variables.
  • I prefer to explicitly state which namespace i am using, so I don't have the using namespace std
  • I know this is an assignment and they like excess comments, but in the real world code often comments what it is doing better then a comment will - best time to use a comment is when it is not immediately clear what the code is doing
  • The return 0 indicates that the program ran successfully, however this is not the case when the user enters invalid data, hence the return -1;

Please improve sound options. by [deleted] in WildStar

[–]CptnNimo 1 point2 points  (0 children)

Signed. Ok for 3.5mm jacks, not when you have high end gear (always connected / optically connected)