• 2 Posts
  • 17 Comments
Joined 2 years ago
cake
Cake day: June 15th, 2023

help-circle



  • There are couple of factors that makes this a confusing topic.

    Vim: On a high level, normally Vim (and Neovim) have their own clipboard system. Vim has multiple internal clipboards that can be used like variables and accessed with other commands. So its kind of sandboxed from your system. But you can explicitly use the commands to access the system clipboard. There is a configuration you can set to use the system clipboard by default.

    Linux: Unlike Windows, in Linux we also have two kind of clipboards: the “system” clipboard as you know and the “primary” clipboard. This has nothing to do with Vim and is a feature on Linux systems itself. If you in example in your browser mark a text without copying, it is automatically copied into the “primary” clipboard. Then you should be able to access and paste it with middle mouse button in example. The system clipboard where you explicitly copy stuff is not affected by it.

    You should read following documentation: 09.3 The clipboard - Neovim


  • 2 or 3 sentences in row might look intimating for some (I still don’t buy this reasoning, did they ever visit a school?), but I think it actually hinders readability and not improves. Because every sentence is its own paragraph, the brain won’t find the connected sentences that build up a uniq thought process. Breaking up text with logic makes more sense for readability and is even better for quickly scanning through text.

    I don’t believe breaking up text for each sentence makes it more readable. Even for those who say it makes, because I think they are “wrong”. Sorry if I came over a opposite-argumentative, but this is a thing that bothers me a lot when reading and I just explain why I think its wrong.


  • I know, my question was not directly why its in this news this way. Its a more general question by me. I don’t get it. Lot of personal blogs do this too, BTW. In my opinion this is “wrong”. A paragraph should consists multiple sentences, that contain a single thought process or something else to group. Its like in programming code to do every single statement a blank line in between. Instead an idea should be grouped together into a block. Just an analogy with code. /My Opinion

    My believe is, they want intentionally make the post look bigger. Instead 3 or 4 paragraphs (which would be the entire article in this case) they spread it out like this. So you have to scroll and see more ads and links and they have more possibilities to put more ads and links in between every paragraph. /My Conspiracy

    Edit: Maybe there is something else. Lot of people read news articles on smartphones. And text would wrap around very quickly and look longer than they are. So maybe using more paragraphs gives more room between each sentence. As I am not reading much on smartphones, can’t judge this. But I still don’t like this. /My Edit







  • You mean alignment of arguments or multiline strings in example? If they are not on their own line, then it does not matter to me. If they start on their own line, then mixing spaces and tabs isn’t a good idea to me. In example for function calls with a bit more complex calls and multiple arguments, I put them in their own line each. They are indented and therefore indentation level plays. If they are on the same line, I never align them and if I would, it would be spaces. In general:

    function() {
    ....var = 1
    ....another_var = 2
    ....indented(arg, arg2, arg3)
    ....indented(arg, 
    .............arg2, 
    .............arg3)
    }
    



  • But this can lead to over engineering simple stuff. Which makes the code harder to read and maintain and more error prone. Especially if you don’t need all the other stuff for the class. Worse, if you define a class then you also tend to add more stuff you don’t use, just in case it might be useful.

    A simple variable name is sometimes the better solution. But it depends on the situation off course. Sometimes a new class make things more clear, as it abstracts some complexity away. Yeah, we need to find a balance and that is different for every program.


  • My rule of thumb is, use short names if the context makes it clear. But do not make names too long and complicated (especially with Python :D). For me having unique names is also important, so I don’t get confused. So not only too similar names are bad, especially if they all start like “path_aaa”, “path_bbb” and such, then the eye can’t distinguish them quickly and clearly. And searching (and maybe replace) without an IDE is easier with unique and descriptive names.

    Sometimes its better to come up with a new name, instead adding a modification and make the name longer. This could be in a for loop, where inner loops edit variables and create a variation of it. Instead adding something like “_modified”, try to find what the modification is and change from “date” to “now” instead “date_current”.


  • Lemmy is a far better platform for discussions than Discourse in my opinion. The tree like sub-reply threads in each post (the Reddit concept) is preferable over a single thread of replies. You don’t need to cross quote and for readers no need to read the quote to see who and to what the reply is about. I don’t like Discourse discussion platforms at all.

    However, Discourse has a few features that fits well for a discussion platform. I like the tags and Trust system of it.