Earlier quoted context omitted.
Writing programs by manipulating text is the actual limitation of the technology here, alignment is just a minor detail by comparison.
That's often heard, but what's the alternative? So far every other alternative has been more limiting, not?
Almost monospaced: the perfect fonts for writing
141–150 of 174 posts
Re: Almost monospaced: the perfect fonts for writing
#142See also: a little bit pregnant, almost alive, and close but no cigar. Yes, I read the article to the end. No, I don’t get it. Either they line up or they don’t. Either it’s monospace or it’s not.
If all you're saying is that you personally don't care to make a finer distinction than monospace/proportional, that's fine, but it's probably not worth commenting on either.
Re: Almost monospaced: the perfect fonts for writing
#143Re: Almost monospaced: the perfect fonts for writing
#144Isn't the whole point of monospaced fonts columnar alignment (e.g. the table in the article)? Seems like "almost" defeats the point. Then again, I don't see values lined up much these days: { "someKey": "someValue", "someOtherKey:" "someOtherValue, and if you only care about leading whitespace (that is, the whitespace before a character appears on the line), maybe it doesn't matter how your font is spaced. I suspect…
> You might be thinking, “Okay, but now characters won’t line up neatly.”
Re: Almost monospaced: the perfect fonts for writing
#145Earlier quoted context omitted.
The value of alignment (at least for me) is not in making the text of the code more readable. Instead, the value is communicating the structure of the code. Seeing the same shape repeatedly tells me a lot about what is happening. It also helps highlight changes between two lines that are very similar.
> the value is communicating the structure of the code. I agree and I think that is the same thing as code-readability. Code-readability means you can easily understand the code. I personally try to abide by what I call "hedge" formatting convention, the punctuation forms a vertical hedge which then shows the structure of your code clearly: [ a , b , c ] Moving my eyes down to look for the closing bracket is easier (…
Your explanation makes good sense. I guess I just wasn't seeing the forest for the trees. ;)
Re: Almost monospaced: the perfect fonts for writing
#146> But there is a reason we don’t use monospaced fonts everywhere. They are somewhat hard to read because [...] Well, not sure what is the basis for that assertion, but I find it easier to read text rendered in a monospaced font (Courier is my favorite). In fact, when I need to read something longer than a minute on the browser, I switch to monospace (with help of a browser plugin). It's not about text alignment -- it…
Yeah, if everyone was used to reading monospaced fonts then proportional fonts would be hard to read. I suspect there might be a bit of an advantage for proportional in terms of ultimate reading speed in that you might be able to fit in an extra word in your scan, but the alignment of a fixed grid might help a bit too. The real value of proportional fonts is that you can print more stuff on the page and make your boo…
Re: Almost monospaced: the perfect fonts for writing
#147Re: Almost monospaced: the perfect fonts for writing
#148Earlier quoted context omitted.
Yeah, you’re right. You lose columnar alignment but beginning indentation still aligns and, in Input Sans, I believe the numbers are tabular. David Jonathan Ross makes this argument in the explainer for Input: > Sometimes programmers rely on the monospaced grid to create a second column of values or comments on the right side of the page. It’s true, these secondary columns won’t align in a proportionally spaced font.…
I still can't believe personalization isn't more widespread in coding. For instance, it ought to be reasonably trivial to set up your formatting preferences in your editor, but have the file saved to disk be in a common format. You want 8-space tabs and braces on their own lines? Cool. We'll save the file with all the formatting defaults, but run a formatter tuned to your preferences before displaying.
Re: Almost monospaced: the perfect fonts for writing
#149A while ago, while repurposing an old laptop into a distraction-free “typewriter” I researched fonts with a typewriter-like aesthetic. Here’s what I found: Sun Gallant Demi, Solarize, Libertine/Libertinus Mono, Triplicate, Prestige Elite, CMU Typewriter, Latin Modern Mono, MingLiU, sony-misc, Verily Serif Mono, Century Schoolbook Mono BT, UM Typewriter, American Typewriter, Courier, Pitch, TiredOfCourier, Xanh Mono,…
Re: Almost monospaced: the perfect fonts for writing
#150Earlier quoted context omitted.
I long ago concluded that trying to line stuff up in columns like this in code is a mistake. It often results in realignment of blocks for small changes so what should be a small diff in the git history ends up being big. Only rarely is the vertical alignment useful because mostly code isn't read vertically. Used in moderation, the reverse Christmas tree style used in the Linux kernel can be as good for readability (…
This just seems like a limitation of the technology. When you change the width of one column, the whole table should realign, without any changes to those parts of the file (it's just about how it's displayed). I recall reading something about "tab stops" that solved this problem, but I don't think there are any mainstream implementations of it.
> Never attempt to line up text by using spaces. The only exception is if you are using a monospaced font. But in word processing applications, there are appropriate tools available for lining up text, like tables[1] and tab stops[2].
[1]: https://practicaltypography.com/tables.html [2]: https://practicaltypography.com/tabs-and-tab-stops.html