magic_lobster_party

  • 2 Posts
  • 686 Comments
Joined 1 年前
cake
Cake day: 2024年8月15日

help-circle


  • There are two main use-cases you want your color theme to address:

    1. Look at something and tell what it is by its color (you can tell by reading text, yes, but why do you need syntax highlighting then?)
    2. Search for something. You want to know what to look for (which color).

    I disagree. I want syntax highlighting because I think it’s easier to read. I don’t care much about which color everything is, just that different things have different colors. I don’t remember any color mappings, and I’m never thrown off guard if the color mapping change.

    When I read var count = 0L, I want to know that var is syntactically different from count, and count is different from 0L. That’s it.

















  • Dedicate yourself with a more long term project (1+ months). I think the best way to learn is through the pain that comes with larger code bases.

    Start small. Add more and more features. If there’s something you don’t know how to make, find a tutorial or a guide and make it work with your project.

    Eventually you’ll discover pain points in your project. The feature you want to make doesn’t fit well with your current code. This is good time to learn from your previous mistakes and adapt your old code for the better (refactoring).

    Over time you’ll learn more and more techniques to write code that can grow. You’ll see for yourself why some coding styles are considered bad and why some are better. This is difficult to see just by working with short term weekend scripts.

    Don’t worry about failing. No one writes ”perfect” code. You’ll learn from your mistakes.