• 0 Posts
  • 36 Comments
Joined 1 year ago
cake
Cake day: July 5th, 2023

help-circle


  • As a long-time bash, awk and sed scripter who knows he’ll probably get downvoted into oblivion for this my recommendation: learn PowerShell

    It’s open-source and completely cross-platform - I use it on Macs, Linux and Windows machines - and you don’t know what you’re missing until you try a fully objected-oriented scripting language and shell. No more parsing text, built-in support for scalars, arrays, hash maps/associative arrays, and more complex types like version numbers, IP addresses, synchronized dictionaries and basically anything available in .Net. Read and write csv, json and xml natively and simply. Built-in support for regular expressions throughout, web service calls, remote script execution, and parallel and asynchronous jobs and lots and lots of libraries for all kinds of things.

    Seriously, I know its popular and often-deserved to hate on Microsoft but PowerShell is a kick-ass, cross-platform, open-source, modern shell done right, even if it does have a dumb name imo. Once you start learning it you won’t want to go back to any other.




  • I have 3 tablespoons that don’t match the rest of my silverware and I have no idea where they came from. I guess someone brought a spoons to my house? They all offend me and I bury them under all the other spoons to reduce the risk of picking one up.

    Like you said, I don’t know why I don’t just throw them out.








  • ReluctantMuskrat@lemmy.worldtoMildly Infuriating@lemmy.worldRestaurant Bill
    link
    fedilink
    English
    arrow-up
    1
    arrow-down
    1
    ·
    11 months ago

    You might want to read it again

    Service Charges: A compulsory charge for service, for example, 15 percent of the bill, is not considered a tip under the FLSA. Sums distributed to employees from service charges are not tips, but may be used to satisfy the employer’s minimum wage and overtime pay obligations under the FLSA.

    A place implementing a service charge cannot classify it as a tip, even if it’s 100% passed onto the employee… a mandatory charge is not a tip, even if the restaurant encourages you to treat it that way. Certain states and jurisdictions tax tips differently than regular wages, and service charges are wages, not tips.



  • Couldn’t agree more. It’s a great shell and scripting language. It’s object-oriented nature, native support for virtually every text format (csv, json, xml) and great libraries for others (yaml, excel), awesome regex and web/rest services support… it’s hard to beat and works on virtually every platform.

    Too few people in the Linux community will even look at it though since it has MS name on it.




  • Can prevent a restore, whereas doing the update with auto commit guarantees a restore on (mostly) every error you make

    Exactly. Restores often result in system downtime and may take hours and involve lots of people. The backup might not have the latest data either, and restoring to a single table you screwed up may not be feasible or come with risk of inconsistent data being loaded. Even if you just created the backup before your statement, what about the transaction coming in while you're working and after you realize your error? Can you restore without impacting those?

    You want to avoid all of that if possible. If you're mucking with data that you'll have to restore if you mess up, production or not, you should be working with an open transaction. As you said… if you see an unexpected number of rows updated, easy to rollback. And you can run queries after you've modified the data to confirm your table contains data as you expect now. Something surprising… rollback and re-think what you're doing. Better to never touch a backup and not shoot yourself in the foot and your data in the face all due to a stupid, easily preventable mistake.