Half a croissant, on a plate, with a sign in front of it saying '50c'
h a l f b a k e r y
Replace "light" with "sausages" and this may work...

idea: add, search, annotate, link, view, overview, recent, by name, random

meta: news, help, about, links, report a problem

account: browse anonymously, or get an account and write.



RTF Programming

Format your code as a method of documentation
  [vote for,

Proposed is a programming parser that accepts code written in RTF, HTML, LaTeX, or some other rich text format. The formatting would serve as another form of documentation and wouldn't have meaning in the end result; it would only be stripped to plain text internally as in the current art.

Notepad++ and Vim accomplish this to some extent now, but the color-coding is from the context and not (by default) user-defined.

I thought of this while writing some code for some database work, and I thought it would be nice to highlight everything within a transaction as one color and everything outside of the scope of a transaction in another.

kevinthenerd, Apr 24 2012


       Could be useful for keeping track of your brackets, too. You could change font every time you open one, and change back up the chain when you close one. [+].
Carmi, Apr 24 2012

       "Nice nested if!"   

       "Thanks, I used Comic Sans."
4whom, Apr 24 2012

       If implemented right, this could be really nice. Make sure it is compatible with existing automerge source control tools, and also somewhat viewable in a standard text editor for debugging when th toolds fail.   

       This would allow me to insert my secret back door into the software by adding code formated as white on white in a small font on a "blank" line. [+]
scad mientist, Apr 24 2012

       I'd like a font that could convey "This is an ironic WHILE TRUE; I'm making you read two thirds of the way down the loop to find the exit condition *for dramatic effect*, mkay?"
pertinax, Apr 25 2012

       In (Microsoft) BASIC on the Commodore 64, you could insert "escaped" characters into REM statements that would render all the following code in whatever colour you liked when you listed a program. I remember seeing some programmers try to hide embedded passwords etc by turning the lines in which the text was hidden to the default dark-blue of the background screen.   

       There was also a way to edit the pointers to the basic listing routine so that typing LIST would bojax the system altogether, more a case of WTF programming.
zen_tom, Apr 25 2012

       Good lord [zen...] I remember that! Heh, heh. Bun that anno!
4whom, Apr 25 2012

       Yes, but a simple POKE 53281,0 turns the background black, revealing the dark blue text. Amusingly, the same kind of cheap tricks are used today to obfuscate web pages.
spidermother, Apr 25 2012

       I have great experience of WTF programming, if that's any help?
not_morrison_rm, Apr 26 2012


back: main index

business  computer  culture  fashion  food  halfbakery  home  other  product  public  science  sport  vehicle