Live data from Hacker News

Programming with proportional fonts is great

m-mz.posterous.com

41–50 of 52 posts

Re: Programming with proportional fonts is great

#41
post #17

I switched to a proportional font by mistake when I started using acme as my primary editor. A few months later I realized what had happened and tested how things looked in fixed width. Turns out I like proportional better. A big difference was probably the fact that the codebase I was editing used tabs for indenting and had non-ascii art indenting rules (basically just indent the next line).

Acme works very well with proportional fonts, although it doesn't do relative indentation well as a result (think lining function arguments up on the left paren). Still a really brilliant editor in many ways.

Re: Programming with proportional fonts is great

#42
post #19
post #13

Earlier quoted context omitted.

> inability to use any sort of ASCII art That actually makes me support the idea of using proportional fonts even more. - If something's that complex you need a diagram to support it, that probably doesn't belong in your code - you should maintain documentation in documentation format, and doc updates shouldn't mean new code revisions. Throw a URL to the documentation in as the comment. - Diagrams could be illustrate…

Design documents and complex diagrams don't belong in code, but a simple ASCII diagram right there in the code to illustrate how the transformation tree is created: - is always within easy reach of the eye. - is harder to forget about when changing the code. - doesn't require you to download, install, register and fire up Visio Community Edition 2008 to add a new FileLogger node to the illustration of the data transf…

Simple and complex diagrams can be made in any decent graphics app (Inkscape or Keynote are fantastic) and easily exported to PNG or SVG.

Personally I also have a lot of trouble reading ASCII diagrams. Knowing that pipe-slash-dash is a curved line, when the line is broken and the ends don't line up properly.

On a separate note, I suggest whoever moderated me to zero should read the HN guidelines.

Re: Programming with proportional fonts is great

#43
post #38
post #32

Earlier quoted context omitted.

Except for Tabs, obviously. All those problems are space-specific ;)

You didn't notice I right justified then. My peeve with embedded tabs is they are editor-defined and generally too wide. i = 0.0; Tomato vs. Tomahto Integer vs. Doubles Integrals vs. Derivatives

Are you really using an editor that doesn't let you define your tab widths? I couldn't name a single modern IDE that lacks that feature.

(and extra points to the grandparent for the ironically mis-spaced "tabs vs. spaces" chart!)

Re: Programming with proportional fonts is great

#44

Earlier quoted context omitted.

There is no debate on my personal preferences. But do you actually think that everyone uses syntax highlighting? Obviously Dennis Ritchie and Rob Pike didn't need it and though I don't in any way pretend I'm in that league of programmers, I am in that league of editor users.

As crazy as it sounds, for the longest time I used notepad as my primary editor. Then I switched to Notepad+ (still no highlighting). I'm now on TextMate (mostly due to my switch to OSX), but I find the syntax highlighting to help in quickly scrolling through and finding segments of code. If I'm looking for a variable, I just look for that color, etc.

You're on your way... Come join the rest of us in the world of IDEs. Once you've seen your "editor" autocomplete a member from another class (in a namespace you haven't even imported), there's no going back.

Re: Programming with proportional fonts is great

#45

Earlier quoted context omitted.

As crazy as it sounds, for the longest time I used notepad as my primary editor. Then I switched to Notepad+ (still no highlighting). I'm now on TextMate (mostly due to my switch to OSX), but I find the syntax highlighting to help in quickly scrolling through and finding segments of code. If I'm looking for a variable, I just look for that color, etc.

You're on your way... Come join the rest of us in the world of IDEs. Once you've seen your "editor" autocomplete a member from another class (in a namespace you haven't even imported), there's no going back.

I can do that in Vim...

Re: Programming with proportional fonts is great

#46

In my experience, proportional typefaces only work for code if the IDE/editor is using a pretty-printer that uses word-processor style indentation. (That is, it uses tab stops as opposed to just inserting spaces/tabs in the text.) The only IDEs I've seen work this way was the old THINK Pascal from the 68k Mac era, and its predecessor Instant Pascal for the Apple II. Anybody else seen a more recent example in the wild…

Maybe not an IDE, but the AppleScript Editor in Mac OS X (and Classic, IIRC) has you enter text in fixed width by default, but then changes it to a proportional font after syntax-checking.

Yup, completely forgot about the Script Editor. Though, as you say, it doesn't really hew purely to monospaced type, but more of a hybrid. (Hypercard was similar, IIRC.)

Re: Programming with proportional fonts is great

#47

Earlier quoted context omitted.

You're on your way... Come join the rest of us in the world of IDEs. Once you've seen your "editor" autocomplete a member from another class (in a namespace you haven't even imported), there's no going back.

I can do that in Vim...

Sweet. My Vim sessions generally consist of issuing a dozen random commands before I happen to type an "I", followed by exiting, restarting, and cursing. Glad to hear you're having more success!

Re: Programming with proportional fonts is great

#48

I can't stand proportional fonts for programming. Aside from it being harder for me to read, inability to use any sort of ASCII art, etc, it just feels sacrilegious. Not to mention my editor of choice (TextMate) fails horribly with proportional fonts. But then again, I used to feel the same way about anti-aliased programming fonts, and have since switched. Currently Inconsolata 16pt anti-aliased is my font of choice.…

Why do proportional fonts fail so bad with TextMate?

I don't know, but they do: http://tlrobinson.net/skitches/Screen%20shot%202010-01-16%20...

Edit: Hah, I swear I didn't notice that Growl notification in the corner until just now...

Re: Programming with proportional fonts is great

#49

Earlier quoted context omitted.

As crazy as it sounds, for the longest time I used notepad as my primary editor. Then I switched to Notepad+ (still no highlighting). I'm now on TextMate (mostly due to my switch to OSX), but I find the syntax highlighting to help in quickly scrolling through and finding segments of code. If I'm looking for a variable, I just look for that color, etc.

You're on your way... Come join the rest of us in the world of IDEs. Once you've seen your "editor" autocomplete a member from another class (in a namespace you haven't even imported), there's no going back.

At my 9-5 I have to use Dreamweaver (code view) and I have no gripes about the text editing portion at all. Maybe there just aren't any IDEs for OSX I've fallen in love with yet, but they all have a sort of clunky aspect to them that can be annoying and can't be changed. Any IDEs that are like TextMate but with auto-completion? (I've done my fair share of looking in the past 3 years on osx.)

Re: Programming with proportional fonts is great

#50
post #6
post #3

Earlier quoted context omitted.

I'm not sure I understand. Was using a proportional font changing the way you chose to format the code to such a degree that it annoyed people?

Leading spaces aren't much of a problem, but aligning comments on the right-side is much harder due to the variable widths of each line. And even if you align them in your editor, they'll be misaligned for people who use fixed-width fonts. Does that make any sense?

Use a word processor (or a text editor that allows for fixed tab stops). This will also allow insertion of diagrams and other non-textual stuff (think clickable buttons, for compilation and testing, for example) into source code.

See, for an example implementation, BlackBox Component Pascal - Windows only, but runs moderately well under Wine.

Post reply on HN