Scripts should be written using the project main language

This page summarizes the projects mentioned and recommended in the original post on news.ycombinator.com

Our great sponsors
  • SurveyJS - Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App
  • WorkOS - The modern identity platform for B2B SaaS
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • learnxinyminutes-docs

    Code documentation written as code! How novel and totally my idea!

  • > Sure, maybe for some esoteric edge cases, but 5 mins on https://learnxinyminutes.com/ should get you 80% of the way there, and an afternoon looking at big projects or guidelines/examples should you another 18% of the way.

    Not for C++, and even for other languages, it's not the language that's hard, it's the idioms.

    Python written by experts can be well-nigh incomprehensible (you can save typing out exactly one line if you use list-comprehensions everywhere!).

    Someone who knows Javascript well still needs to know all the nooks and crannies of the popular frameworks.

    Java with the most popular frameworks (Spring/Boot/etc) can be impossible for a non-Java programmer to reason about (where's all this fucking magic coming from? Where is it documented? What are the other magic words I can put into comments?)

    C# is turning into a C++ wannabe as far as comprehension complexity goes.

    Right now, the quickest onboarding I've seen by far are Go codebases.

    The knowledge tree required to contribute to a codebase can exists on a Deep axis and a Wide axis. C++ goes Deep and Wide. Go and C are the only projects I've seen that goes neither deep nor wide.

  • edna

    A scratchpad / notepad on the web

  • I do that in my Go projects.

    In fact my "scripts" are actually part of the main executable. I use cmd-line args to invoke the needed functionality.

    For example, in the past I would have written a Python script to deploy my Go binary to a server, possibly using tools like Fabric that provide functionality to make it easier.

    Today I add `-deploy-hetzner` cmd-line to my Go binary and it does the work. It builds itself, copies the binary to the server, kills the old instances, configures caddy if needed, starts newly uploaded instance etc.

    For example my deploy.go is 409 lines of code, which is not that bad. You can see exactly how this works: https://github.com/kjk/edna/blob/main/server/deploy.go

    I standardized on how I deploy things so deploy.go is mostly re-used among several projects.

    Writing this code isn't much more difficult that what I used to write in Python.

    This kind of code can be shorter because I don't have to handle errors, I just panic if something goes wrong.

    I like that I don't have to switch between different languages and that I have full control and understanding over what happens. Fabric used to be a bit of a black box.

    I even wrote an article about this idea: https://blog.kowalczyk.info/article/4b1f9201181340099b698246...

  • SurveyJS

    Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App. With SurveyJS form UI libraries, you can build and style forms in a fully-integrated drag & drop form builder, render them in your JS app, and store form submission data in any backend, inc. PHP, ASP.NET Core, and Node.js.

    SurveyJS logo
  • cobra

    A Commander for modern Go CLI interactions

  • I use https://github.com/spf13/cobra religiously for this kind of thing - it handles all the annoying corner cases of parsing flags, and also has an intuitive notion of subcommands (with basic usage/help text generated) for picking which task you want to run with positional arguments.

  • diff2html

    A script that employs awk and bash to html output of diff between 2 files quickly* (by berry-thawson)

  • The performance concerns might creep up for scripts and tricky to figure out the issue if you are not internal abstractions.

    Example, https://github.com/berry-thawson/diff2html

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts