15

The Hard Part of Learning a Language

 4 years ago
source link: https://www.hillelwayne.com/post/learning-a-language/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

I want to do $THING. Normally I do my hacking in Python, which is okay but has lots of frustrations. My friends tell me $LANGUAGE is better for doing $THING. After going through the online tutorial, I can see why. Maybe I’ll try $LANGUAGE for this project! Just a few things I need to figure out first:

  • How do I install it? The docs say brew install , but I’m on Windows.
    • Do I have to use WSL?
    • Why is it breaking on WSL?
  • How am I supposed to be writing this? Do I download an IDE? Is there a Vim plugin? Is this ostensibly editor-agnostic but really supposed to use Emacs?
    • Uh oh, there’s two competing plugins. The communities hate each other. Which do I choose?
  • How do I read from a file? How do I parse JSON? How do I pull environmental variables?
    • How do I do any of the things that aren’t part of the core syntax/semantics but are super common problems people face every day?
    • I’m going to have to memorize another 100 functions and their parameters, aren’t I?
  • What are the language quirks that will cost me an hour to discover?
    • What are the footguns that will cost me a day to debug?
    • What are the things that are just different enough from what I’m used to that will confuse me? What will trip me up every time I switch back to a different language?
    • What parts of the core language should I avoid at all costs?
    • What are the snippets that look right but are secretly wrong?
  • How is the help organized? Is there an official site? How’s the site laid out?
    • Is it actually useful or will it make me want to smash all computers?
    • Does it have documentation for people besides “complete newbies” and “language maintainers”?
    • Can I download the official docs, or will I have to be online to read any of the references?
    • Are there official docs?
    • Oh wait, I’m supposed to learn from $BOOK, which is only available in physical form.
    • And people keep telling me that $AUTHOR is a serial killer?
  • I hit problem X. Should I look for help in the official docs, or the FAQ, or the community, or should I be putting random stuff into Google?
    • Oh, looks like someone answered this in 2007! Which was eight versions ago. Are they still right or is their advice obsolete?
    • I found something from 2011 that said the 2007 person was wrong. Do I do what 2011 dude says or should I assume his advice is also obsolete?
  • How do I debug? Will doing anything other than “break into repl” be like pulling teeth?
    • Will “break into repl” be like pulling teeth?
    • Is this one of those communities which think debuggers are for n00bs and you should write a lot of print statements?
  • Testing. Is unit testing part of the core library, or do I need to install a third party framework?
    • Or both? Like how Python comes with unittest , but everybody uses pytest .
    • Or how Ruby has Minitest , rspec , and Test::Unit , and people get into fights about which is best.
      • Apparently I’m supposed to learn Cucumber?
    • What about property-based testing? Does $LANGUAGE even have a PBT library?
    • How does the test runner work? How long should I try to integrate it with my dev environment before giving up and running it in a separate terminal?
  • How do I build? How do I package? How do I manage my environment?
    • What are all the command flags I should be using that aren’t default for various reasons?
    • How am I supposed to “properly” organize my project files?
    • I organized everything properly, how come it’s still not finding my module?
  • Package management.
    • How do I find the packages I need? If there are multiple competing packages, how do I decide which one I should use?
    • And now I have to learn the APIs of the third-party packages.
    • And the API of the package manager itself.
    • What are the “canonical” packages the community has consensus on? Am I going to have to dive into the community to find out what I need to install?
    • I do?
    • Oh great .
  • So… the language community.
    • Where are they? Will I have to join Yet Another Slack? Install Yet Another Messaging App? Do I have to set up a dedicated machine just to keep connected to an IRC channel?
    • Are they friendly to beginners, hostile, passive-aggressive?
    • Are there any missing stairs or known abusers?
    • Are there high-profile rivalries?
    • What innocuous-seeming topics always turn into a flamewar? Is my question even safe to ask?
    • Now they’re explaining something way above my head. Is this necessary to get, or are they just cursed with knowledge ?
    • What opinions do they have on other programming languages? Are they going to look down on me for writing a lot of Python?
    • What are all these in-jokes supposed to be?

Screw this, I’m going back to Python.

I shared the first draft of this essay on my newsletter . If you like my writing, why not subscribe?


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK