83
itsVivek
19d

.... VS code is lit๐Ÿ”ฅ๐Ÿ”ฅ

Comments
  • 9
    For a software that’s generally brilliant, I still don’t get why it does this so badly.
  • 2
    hahah nice

    Does anyone still code without any autocompletion? I sometimes wonder if it might help me remember things but maybe im insane
  • 1
    The fuzzy matching autocompletion is even worse. And whoever though it was a good idea to have it enabled by default even for plain text and markdown files was an idiot.

    Also I've seen similar behavior as OP when I'm writing Terraform templates. It autocorrects "true" to "transpose".
  • 26
    What you actually want:
    if (!x)
  • 10
    That's not stupidity, that's wisdom. VSCode simply knows that nobody would ever want to write "x == false" but rather "!x".
  • 0
    @itsVivek hehe, you see?
    @jespersh just suggested a variant that doesn't kill :)

    But yeah, sometimes this fuzzy search gets me wrong. Hope they'll make it more intuitive.
    Well, if somebody is concerned with having fuzzy search, you are free to contribute a better variant with ML.
  • 3
    @Benedikt These days I prefer to be explicit, having been hurt so royally by javascripts evil interpretation of !variable as
    0, null, undefined, false, NaN and of course empty string.
  • 2
    @lechuckles It's not evil when you understand the situation in which you can draw it, and the advantage of broad interpolation is exactly that you don't compare to null, false, undefined (for js) and any falsy value individually in single conditional. It may seem as placebo at first, but it's taking away all the burden of mentioning falsy values specific to language in that conditional.
  • 1
    @vintprox Sorry evil was a little bit strong ;) My experience is that when I'm explicit I get less tricky to find errors.
  • 3
    @lechuckles then, you would need another equal sign there.
  • 0
    @lechuckles I've seen some shit in C# as well when dealing with nullables.

    For example, a colleague of mine would go along these lines:

    !(ListOfThings?.Any() ?? false)

    I always end up changing that to:

    ListOfThings?.Any() != true

    Which does the exact same thing, but it's at least explict about It.

    It's a struggle.
  • 0
    @gazza101uk

    The reason that VSCode doesn't do well is because it has only limited "knowledge" of your code.

    Depends a bit on the language and the plugins you use, but in general, PHPStorm for example was made to understand your code on a holistic project level, including all the dirty magic stuff like Laravel routing, Vue components, Composer namespacing, PHPUnit tests, etc -- while "code text editors" are primarily just made to understand syntax.

    VSCode has gotten better at puzzling crap together, but there's just as many things where it still struggles.

    So in my opinion VSCode is fine when the project structure is simple. Golang devops scripts or a small Rust binary will work much better than using the Haskell Yesod framework or trying Android development in VSCode.
  • 0
    And yet still, we have come so far. VS2015 would put squiggly lines under code that was CORRECT
  • 1
    Checking a Boolean for equality?
    Bro??
  • 0
    @LotsOfCaffeine thats just a joke .... Don't take it so serious...๐Ÿ˜…๐Ÿ˜…
  • 0
    Ah yes, the intelligent autosuggestions of VS...

    A few days ago I misspelled the keyword privte and VS suggested GetPrivte() and similar shit to me. Thanks VS, you stupid piece of crap!
Add Comment