Julia Evans' Git cheat sheet
  • "Initials" by "Florian Körner", licensed under "CC0 1.0". / Remix of the original. - Created with dicebear.comInitialsFlorian Körnerhttps://github.com/dicebear/dicebearPH
    Phoenix3875
    Now 100%

    In recent git versions (>2.23), git restore and git restore --staged are the preferred ways to discard changes in the working tree (git checkout -- .) and staged changes (git reset --) respectively.

    6
  • Stack Overflow Survey: 80% of developers are unhappy
  • "Initials" by "Florian Körner", licensed under "CC0 1.0". / Remix of the original. - Created with dicebear.comInitialsFlorian Körnerhttps://github.com/dicebear/dicebearPH
    Phoenix3875
    Now 100%

    My point today is that, if we wish to count lines of code, we should not regard them as "lines produced" but as "lines spent": the current conventional wisdom is so foolish as to book that count on the wrong side of the ledger.

    ——On the cruelty of really teaching computing science - E.W. Djikstra

    16
  • I need a Glassdoor account AND a review of a previous employer to see reviews on the website
  • "Initials" by "Florian Körner", licensed under "CC0 1.0". / Remix of the original. - Created with dicebear.comInitialsFlorian Körnerhttps://github.com/dicebear/dicebearPH
    Phoenix3875
    Now 100%

    It's believed that Glassdoor's business model is to charge companies for removing bad reviews. So how much value can the rating provide is questionable in the first place.

    Personally, for big companies, there are always people writing their work experiences on an open platform. For small companies, it's unlikely to find a relevant review, if any, on Glassdoor anyway. So I never bothered to use it.

    34
  • Book recommendations to learn programming fundamentals
  • "Initials" by "Florian Körner", licensed under "CC0 1.0". / Remix of the original. - Created with dicebear.comInitialsFlorian Körnerhttps://github.com/dicebear/dicebearPH
    Phoenix3875
    Now 100%

    If you are looking at learning CS in a more holistic manner, there's Path to a free self-taught education in Computer Science!. It's a list of courses, categorized by topics, which are exactly what a CS undergraduate would learn. It might feel daunting at first, but you can pick any interesting topic and dive in.

    I especially recommend CS50P for beginners.

    10
  • Why I Prefer Exceptions to Error Values
  • "Initials" by "Florian Körner", licensed under "CC0 1.0". / Remix of the original. - Created with dicebear.comInitialsFlorian Körnerhttps://github.com/dicebear/dicebearPH
    Phoenix3875
    Now 100%

    One problem with exceptions is composability.

    You have to rely on good and up-to-date documentation or you have to dig into the source code to figure out what exceptions are possible. For a lot of third party dependencies (which constitute a huge part of modern software), both can be missing.

    Error type is a mitigation, but you are free to e.g. panic in Rust if you think the error is unrecoverable.

    A third option is to have effect types like Koka, so that all possible exceptions (or effects) can be checked at type level. A similar approach can be observed in practical (read: non-academic) languages like Zig. It remains to be seen whether this style can be adopted by the mainstream.

    9
  • truthout.org

    > [Sanders said](https://twitter.com/BernieSanders/status/1816498279133393137) that the recent, brazen push by billionaires to influence Vice President Kamala Harris to dump Khan from her hypothetical presidential cabinet is yet another show of the corrupting influence of money in politics. > > “Here’s why we have to overturn Citizens United & end Big Money in politics: Billionaire Reid Hoffman donated $7 million to the Harris campaign. Now, he wants her, as president, to fire an outstanding members \[sic] of the Biden Administration, FTC Chair Lina Khan,” Sanders said in a post on social media on Thursday. “Not acceptable.” > > In recent days, billionaires and large Democratic donors [have been speaking out](https://www.nytimes.com/2024/07/24/business/kamala-harris-business-policies-economy.html) against Khan, who represents a threat to corporate interests. > > LinkedIn cofounder Reid Hoffman — a venture capitalist [deeply enmeshed](https://greylock.com/team/reid-hoffman/) with corporate interests — came out publicly against Khan [in an interview with *CNN*](https://www.cnn.com/2024/07/26/business/reid-hoffman-kamala-harris-ftc-khan/index.html) this week, likening Khan’s efforts to rein in corporate abuses as a “war” on corporate power. Hoffman, who [campaign filings show](https://www.fec.gov/data/receipts/individual-contributions/?contributor_name=Reid+hoffman\&min_date=01%2F01%2F2016\&min_amount=2000) has donated $7 million to Harris’s campaign, outright said he “would hope that Vice President Harris would replace her.” > > […] > > Another billionaire, Barry Diller, chairman of holding company IAC, also [brazenly announced](https://twitter.com/SquawkCNBC/status/1816826072236982681) that he would mount a lobbying effort against Khan for her crackdowns in an interview with *CNBC*. Diller has [pledged to donate](https://twitter.com/SquawkCNBC/status/1816826072236982681) the maximum amount to Harris’s campaign, called Khan a “dope” and said that he would lobby Harris to dump Khan. > > […] > > Many other similar missives from [donors have come anonymously](https://prospect.org/power/2024-07-26-corporate-wishcasting-attack-lina-khan/), with [one donor telling](https://www.nytimes.com/2024/07/24/business/kamala-harris-business-policies-economy.html) *The New York Times* that Harris is open to the idea. The Harris campaign has said that it has not had discussions about Khan’s future so far — though Wall Street donors have been pushing Democrats [to drop Khan for months](https://truthout.org/articles/wall-street-donors-are-reportedly-pushing-biden-to-fire-ftc-chair/). > > […] > > The replacement of Khan on the cabinet would be a major loss for backers of the antitrust movement; her appointment by Biden as FTC chair was lauded as a significant step forward for the administration’s purported efforts to take on increasing corporate power. > > Under Khan, the FTC has taken on some of the largest corporations in America, including tech giants like Amazon, Microsoft and Meta, pharmaceutical giants like Amgen, and other giants like Kroger. It also created a new rule banning employers from including noncompete clauses in worker contracts, a move that the agency said would raise worker wages by $300 billion annually.

    355
    16

    Coming from another country, I always wonder why the two utility companies I have here in the UK, Thames Water and Octopus Energy, would calculate an amount that they think I should pay monthly, instead of just charge whatever I used last month. To me, the latter way makes much more sense and is the standard practice in the countries I lived before. The amount they calculated seems to generate either a huge credit balance, or a huge underestimation. Thames Water changed my monthly bill from £29 to £7, and then to £17 over the course of a year and a half. Octopus Energy built up more than £200 of a credit balance (not sure if it's a result of the UK government energy gift credit last winter), then set a minimal amount of £61 monthly. They say the purpose is to make sure that the credit balance would be always be more than £100. Okay...but why? If I want to save money, I'd go to a bank. I could see that it might make sense if the measurement is not as easy or accurate, but come on, it's the 21st century and the meter shows me my energy usage by the hour, surely they can calculate the exact amount rather than pull a random number out of nowhere?

    16
    9

    can be used as a bunker at war

    263
    27

    It seems to be [a bug](https://bugzilla.mozilla.org/show_bug.cgi?id=1807418) for Firefox Android, but I had an empty space at the top when using wefwef as a PWA. Setting the toolbar position to "bottom" in the three-dot setting menu seems to fix it.

    4
    0
    "Initials" by "Florian Körner", licensed under "CC0 1.0". / Remix of the original. - Created with dicebear.comInitialsFlorian Körnerhttps://github.com/dicebear/dicebearPH
    Now
    10 239

    Phoenix3875

    lemmy.world