• 1 Post
  • 18 Comments
Joined 4 years ago
cake
Cake day: January 21st, 2021

help-circle


  • You could go columns for the content, but I think my ideal layout would still have the main content in a single column. I would put all of the chrome horizontally through. For example no header before and footer afterwards, put everything in different columns. Maybe even throw some extra navigation on the screen.

    You don’t need to use every pixel, just avoid putting things offscreen unnecessarily.






  • To be fair having a name can make things easier to read. I get that i % 2 == 0 is a common pattern and most programmers will quickly recognize what is happening. But isEven(i) is just that much easier to grok and leaves that brainpower to work on something else.

    But I would never import a package for it. I would just create a local helper for something this trivial.







  • I know this is a meme, but I actually find tar fairly easy to remember.

    tar -xf $archive is extract file

    tar -czf $archive dir/ is create zipped (compressed) file and the positional arguments are the files to add to the archive.

    And this is 99% of my usage. You can skip -f $archive to use stdin/stdout or use -C to change directory (weird name but logically tar always extracts to the current directory). There is also a flag to list which I always forget and lookup each time, but I list much less often. -v is useful for verbose.

    Overall there are much harder commands to remember. find always gets me if I go beyond -name. ps, tree and ls (beyond -Al) always get me to open the man page.



  • kevincox@lemmy.mltoProgrammer Humor@lemmy.mlme irl
    link
    fedilink
    arrow-up
    2
    ·
    7 months ago

    This speaks to me. I always have some sort of vague dream about writing a program to do something that is just a physical problem, or like decides how other people think. Writing it down is very confusing because it very clearly made absolutely no sense. But in my dream I felt like a genius and wizard.