• 0 Posts
  • 16 Comments
Joined 1 year ago
cake
Cake day: June 21st, 2023

help-circle

  • letsgo@lemm.eetolinuxmemes@lemmy.worldSecurity
    link
    fedilink
    arrow-up
    1
    arrow-down
    1
    ·
    2 months ago

    Sure but if you’re doing rooty stuff all day then sudo you’re sudo not sudo going sudo to sudo type sudo sudo sudo every sudo fucking sudo time sudo you sudo want sudo to sudo do sudo something. And yeah it sudo caches it for sudo a bit but sudo it’s still too sudo much.



  • Yeah it always feels like “negative logic” to me. If it’s not this and not that then don’t do the other… Does my head in. Next time I’m going to use a lookup table “x…f.bf…fb.f…” then mod15 the index. f=Fizz, b=Buzz, x=both. Nice thing about this is that it’s easier to change with the requirements. Want to shift the second fizz right one? No problem “x…f.b.f.fb.f…”. Good luck doing that with the standard approach. Add Gronk which collides with Fizz, Buzz or both at various times? Also no problem - just extend and modify the LUT accordingly and change the mod.

    I can already hear people asking why x is at the start. Arrays are indexed from 0. FizzBuzz starts at 1. 15 mod 15 is zero. Loop N from 1-100, switch on lookup[N%15], case ‘f’ print Fizz, case ‘g’ print Gronk, case ‘p’ print FizzGronk and so on. The only “nice” original feature you lose is when both %3 and %5 fire at the same time and it prints FizzBuzz without any extra code.


  • The previous candidate to me at a job a few years ago left the room in tears after not being able to write Fizzbuzz. On a laptop with Visual Studio installed, on their own in a an empty room with nobody looking over their shoulders. The same company said they’d had so many candidate, including university graduates, who simply couldn’t code, that they were almost giving up on it.



  • Adding a bunch of quarters together gets a third.

    Admittedly a bit of an oversimplification. It’s from a YT video: a chocolate bar costs £1 but four wrappers gets you a free bar. How many bars can you get for £1000?

    So you buy 1000 bars which gets you 1000 wrappers. Turn those in for 250 bars. With those (actually 248) you get 62 bars. Add the 2 from before and turn in 64 wrappers for 16 bars. And again for 4, then 1. It’s a sequence of quarters and the solution is 1,333.




  • For simple tasks you don’t need CLI. Most GUIs implement basic workflows and do a reasonable job at it (obviously not counting the ridiculous amount of time Windows needs to “compute space requirements” while deleting an empty directory. Seems it’s more important to get that little popup on screen and run the animation a few times than actually doing the job).

    It’s when you get past the basics that CLI comes into its own. Those grindy things you do in Windows clicking one thing at a time? Glue a couple of commands together in the CLI and it’s done in a tiny fraction of the time.




  • letsgo@lemm.eetoLinux@lemmy.ml*Permanently Deleted*
    link
    fedilink
    arrow-up
    21
    ·
    8 months ago

    Your best focus at the moment is your degree, including during the holidays. You can Linux fanboi all you like after you’ve graduated, unless you’ve got some really strong personal convictions that push you in that direction, and it seems you haven’t otherwise you’d already be there.




  • Don’t think I’ve ever had a proper FTS moment in my career but the closest was during Covid, before any vaccine had come out and the company mandated RTO. Did the science and worked out I had about 25% chance of DYING if I caught it. I was it wasn’t going to happen, they said yes it was, bit of to and fro then they said “disciplinary” so I said well let’s cut out all the unpleasantness and just go for a mutual agreement. Got three months pay and walked out at the end of the week, shortly afterwards landing another job with a substantial pay rise and 100% WFH.

    I had a proper FTS moment in an interview, which the company failed with flying colours. It’s a good job it was a mile walk back to the railway station because if I’d spoken to the agent before that walk (which took about 3 minutes) I’d have said something a lot ruder than FTS.