.... VS code is litπŸ”₯πŸ”₯

  • 12
    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
  • 2
    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".
  • 29
    What you actually want:
    if (!x)
  • 11
    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.
  • 4
    @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.
  • 1
    @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.
  • 1

    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?
  • 0
    @LotsOfCaffeine thats just a joke .... Don't take it so serious...πŸ˜…πŸ˜…
  • 1
    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!
  • 1
    This happens all the fucking time πŸ˜‚πŸ˜‚ and every time I want to use the arrow keys, vs has some suggestions. No vs, I’ve finished typing, it’s done. This line has a semi-colon. I do not need anymore code here. Fuck off and let me navigate without the mouse
  • 0
    Is it just a simple algorithm or it keeps learning as you use it?
Add Comment