• 0 Posts
  • 758 Comments
Joined 1 year ago
cake
Cake day: November 14th, 2023

help-circle
  • Excellent write-up. People who complain about Haskell and purely functional languages just don’t understand it, I think. Take me for example. I tried learning Haskell many years ago, and while I learned so many new and incredibly useful concepts from my short adventure, that I use everyday in my career, I just couldn’t wrap my head around the more abstract concepts, like monads e.g. And the feeling I got was that Haskell is a difficult language, but probably it’s the terminology and abstract mathematical concepts which are the real issue for me here. Because the syntax isn’t really that complicated. Especially the way space is used to call functions. I’m really sick of all the parentheses in other languages.

    But, if you understand all about functional programming, for those that do, it seems to really enrich the way they write and maintain code from what I’ve seen. People who dog on it just don’t understand (including me). Of course it’s hard to maintain something you don’t understand. But if you do understand it, it’s easy to maintain. 🤷‍♂️ Seems logical.

    What next, where is the line drawn for what kind of code we can write? Why introduce more useful concepts in programming if we risk losing maintainability because some devs won’t learn the new concepts?

    Life means change. Adapt. Learn new things. Expand the mind. Learn how to do things in a good way, and then do the things in that good way. Why stagnate just because we don’t understand something. Better to learn a new thing to understand the better way, than to dumb it down to a worse state just so we understand it.

    Bah.


  • Victor@lemmy.worldtoProgrammer Humor@programming.devstop
    link
    fedilink
    arrow-up
    2
    ·
    edit-2
    5 days ago

    I dabbled in some Haskell a few years ago but quit trying when I got to the hard parts like monads and functors and stuff. All those mathematical concepts were a little too abstract for me.

    But what I did bring with me from the experience changed my way of programming forever. Especially function composition and tacit (point-free) style programming. It makes writing code so much faster and simpler and it’s easier to read and maintain.

    You can utilize some functional programming concepts without being too hardcore with it and get the best of both worlds in the process. 👍



  • Check out AliExpress

    Great tip! Although I prefer to support my local cube stores to be honest.

    Megaminx is fun […] you just have to rethink how you apply the algos you know!

    Interesting! I’ll have to look at a tutorial for that some day. 😊

    I realised I was solving the 3x3 on pretty much muscle memory alone 😂

    Definitely the case for a lot of my algorithms, especially the longer ones! It’s to the point where if I don’t do them fast enough I get confused and it breaks apart and I get lost. And that’s like 10 seconds of punishment just there, or at least can be. 😅


  • 9x9!! I’ve not gone past my Moyu 4x4 yet. 😅 All my money so far has been on finding a great 3x3 🥲 But I have been eyeing a 5x5, so maybe I’ll give it a go! Megaminx just blows my mind, I’ve not even looked into that at all. 🫣

    The fact we’re the same age might spur me on a bit again.

    Yeah buddy! Let’s go. 💪

    Drilling algos for muscle memory I’m fine with - I probably just need to dedicate a month to the cross, it was just so so much easier when I could sit for 4-5 hours straight with no real responsibility and drill cube lol.

    I feel this. It wasn’t easy with two kids and work. Lots of late nights, and solving while in remote meetings at work; during working from home while I was supposed to be working 😅; at the office during breaks, lunch… Putting in a lot of YouTube hours on the topic. Ugh. There’s a cost other than money to a hobby, eh… 😁


  • I definitely hit a wall with my magnet-less cube trying to get sub-minute using beginner’s. It was just not going to happen.

    Now I’m like 13 different cubes in and I got a flagship cube from Moyu which has helped me get these sub-half-minute times. The GAN 14 Pro was also quite instrumental.

    But yeah, CFOP is a must if you want to get good times with reasonable ease (i.e. not brute forcing it using beginner’s).

    I recommend practicing one thing at a time in order to get good at it. E.g. your cross. Sit and watch/listen to some YouTube or podcasts or something and just do white crosses for like 30 minutes at a time. You will improve very quickly, I promise. Use the fact that a cross is achievable in 8 moves or less from any scramble as a bar from which you can gauge your performance, and count the moves you make. Focus on different aspects at a time: number of moves until finished cross but take your time both with inspection and turning, only move efficiency; then try to do the cross faster but still unlimited inspection time; then finally limit your inspection time as well (if you care about competition rules).

    Focusing on different things like this really helps. Same with the CFOP method. If you want to learn it, you’ll want to focus on the muscle memory of one algorithm at a time. Really grinding it until you feel like you know it. After that, try to use it in a solve. Next session, you will have forgotten it again, so repeat a little bit and refresh that muscle memory until it sticks after a while.

    Also these things need to be kept fresh. Your hands will forget algs unless they continue to use them.

    It’s a lot of work but a lot of fun if you enjoy improving. Nothing beats that feeling of setting a new personal best.

    PS: I’m 38 now, and I started less than a year ago. It’s never too late IMO.











  • Victor@lemmy.worldtoComic Strips@lemmy.world"Joe Biden's fault"
    link
    fedilink
    arrow-up
    1
    arrow-down
    1
    ·
    26 days ago

    Very bad, very very bad.

    But I’d still hold the trial for the person who committed the crime itself before charging the police officer. But there’s also a third party here, which is the people. The people said, while the policeman was supposedly idly watching, that “yes, this criminal can [be president and] do whatever he wants”. 😐


  • Fish syntax is still fairly ugly compared to most programming languages in my opinion.

    subprocess.run(["fd", "-t", "d", "some_query"])
    

    vs

    fd -t d some_query
    

    Which is cleaner? Not to mention if you want to take the output from the command and pipe it into another one.

    It’s not about folks with weird opinions or otherwise, it’s about use cases. 🙂 I don’t think python is any more “natural” than most other imperative languages.

    Fish is probably even more natural, actually, due to it being more high level and the legibility of the script is basically dependent on the naming of the commands and options and variables used within it, rather than something else, just like python. They probably have similarly legible keywords. Fish I imagine has fewer, which is a good thing for legibility. A script does a lot more with a lot less, due to the commands themselves doing so much behind the scenes. There’s a lot more boilerplate to a “proper” programming language than a scripting language.

    But if you want to do something that python is better suited for, like advanced data processing or number crunching, or writing a whole application, then I would say that would be the better choice. It’s not about preference for me when it comes to python vs fish, it’s about the right tool for the job. But if we’re talking about bash vs fish, then I’m picking fish purely by preference. 👍