Programming Leftovers
-
Jay Conrad ☛ Preserving comments when parsing and formatting code
I've been tinkering with a new toy language this week, and I wanted to replicate a feature I like from some tools in the Bazel ecosystem. Gazelle, buildozer, and buildifier have the ability to preserve comments when formatting a BUILD file, even after significant programmatic modifications. Gazelle can also easily read comments when walking the syntax tree, which is important for processing # keep comments and directives.
In this article, I'll compare Go's parser and formatter with the library used by the Bazel tools. Both libraries can preserve comments, but the Bazel library does it better.
-
Erika Rowland ☛ When is an Erlang process a shell?
Recently, I was trying to port an Erlang function to Elixir, with the goal of answering one question: “When is an Erlang process a shell?”
Answering that question involved source diving Erlang, learning new things about git, and reading mailing lists.
-
Unix Sheikh ☛ The proper design process in web development
I am sure you have noticed, about 98% of all websites on the Internet today run JavaScript and most of them run shitty slow, even on modern hardware. This is despite the fact that most of them don't even need JavaScript in the first place because they don't provide any special features, they are not web applications, they are just simple websites. Yet, if you disable JavaScript they stop working all together!
I know all about fast deployment and fast shipping and the constant fear of someone else eating your lunch, but there is also such a thing as something being too crappy to ship.
Good software development, whether web related or otherwise, contain a minimal and basic set of steps that are required in order to develop a sound and proper product and there has to be at least a minimal balance between performance, security, convenience and design principles. We cannot simply slap a so-called modern JavaScript framework together with a bloated back-end and call it a "jobs done!"
Update
More here: