Live data from Hacker News

Joining the Church of Emacs

fuzzypixelz.com

1–10 of 67 posts

Re: Joining the Church of Emacs

#4
His alignment formatting example is harder for me to read than what he started with. I have an eye tracking issue so I'm not always the best person to judge this. Is it harder for everyone else?

Re: Joining the Church of Emacs

#5

I found it amusing his example of badly formatted code one = 1 fortyTwo = 42 elite = 1337 is exactly how most modern linters want to format my code.

In IDEs that support refactor-renaming (Emacs probably does?), the column-aligned formatting also has the drawback that it breaks (unless the refactoring also auto-realigns all affected code).

For example,

  one      = 1
  fortyTwo = 42
  elite    = 1337
might become:

  one      = 1
  ultimateAnswer = 42
  leet    = 1337
This made me stop column-aligning in most cases. An exception is array initializers for two-dimensional tables with many columns, where the benefit is important enough.

Re: Joining the Church of Emacs

#6
post #4

His alignment formatting example is harder for me to read than what he started with. I have an eye tracking issue so I'm not always the best person to judge this. Is it harder for everyone else?

I was a bit surprised that the numbers didn’t get right-aligned:

  one      =    1
  fortyTwo =   42
  elite    = 1337
To answer your question, I tend to agree that it gets harder to read the wider the horizontal spacing is, unless the relation between the values in the same column is very important.

Re: Joining the Church of Emacs

#7
Sigh, I am an alte kaker in the Temple of Emacs and what that has meant is early on I learned how to make a keyboard macro, and because of that I've never really memorized how to awk or sed. This has been a problem: I have to keep seeking out the info on awk and sed syntax.

Re: Joining the Church of Emacs

#8
used to use emacs (with spacemacs then doom) a while back. turned out i don't really care what kind of editor i use as long as it has modal editing mode and doesn't get in my way of editing text. for terminal, i enjoy neither eshell nor any other integrated term. perhaps i just am not that motivated to have a one-editor-to-rule-them-all kind of software.

Re: Joining the Church of Emacs

#9
post #5

I found it amusing his example of badly formatted code one = 1 fortyTwo = 42 elite = 1337 is exactly how most modern linters want to format my code.

In IDEs that support refactor-renaming (Emacs probably does?), the column-aligned formatting also has the drawback that it breaks (unless the refactoring also auto-realigns all affected code). For example, one = 1 fortyTwo = 42 elite = 1337 might become: one = 1 ultimateAnswer = 42 leet = 1337 This made me stop column-aligning in most cases. An exception is array initializers for two-dimensional tables with many colu…

It also makes git blame a lot less useful in these scenarios.

Re: Joining the Church of Emacs

#10
post #4

His alignment formatting example is harder for me to read than what he started with. I have an eye tracking issue so I'm not always the best person to judge this. Is it harder for everyone else?

I also dislike that style, I appreciate it looks nicer, but I definitely find it harder to process/read. That example isn't that bad, because all the variable names are pretty close to the same length.

But once you start mixing reallyLongVariableNamesLikeThisOne and shortOnes, the distance between the short variable name and the value is long enough that there's a chance I'll look at the wrong value or something.

I'm glad that automated formatters/linters pretty much all remove/complain about that stuff now days.

Post reply on HN