13

Are you using ascii art to decorate your code ?

            .-"""-.
           '       \
          |,.  ,-.  |
          |()L( ()| |                        license goes here
          |,'  `".| |
          |.___.',| `
         .j `--"' `  `.
        / '        '   \
       / /          `   `.
      / /            `    .
     / /              l   |
    . ,               |   |
    ,"`.             .|   |
 _.'   ``.   o     | `..-'l
|       `.`,        |      `.
|         `.    __.j         )
|__        |--""___|      ,-'
   `"--...,+""""   `._,.-' mh


   www
  /n n\        /\
  |/^\|       /  \        warning notes
  | , |       ^||^
   \_/         ||
   _U_         ||
 /`   `''-----'P3
/ |. .|''-----"||
\'|   |        ||
 \|   |        ||
  E   |        ||
 /#####\       ||
 /#####\       ||
   |||         ||
   |||         ||
   |||         ||
   ||| gem     ||
  molom        Ll



 /~~~\/~~\/~~~\/~~~\/~~\/~~~\                    /~~~\/~~\/~~~\/~~~\/~~\/~~~\
 | /\/ /\/ /\ || /\/ /\/ /\ |                    | /\ \/\ \/\ || /\ \/\ \/\ |
 \ \/ /\/ /\/ /\ \/ /\/ /\/ /    function name   \ \/\ \/\ \/ /\ \/\ \/\ \/ /
  \ \/\ \/\ \/  \ \/\ \/\ \/                      \/ /\/ /\/ /  \/ /\/ /\/ /
,_/\ \/\ \/\ \__/\ \/\ \/\ \______________________/ /\/ /\/ /\__/ /\/ /\/ /\_,
(__/\__/\__/\____/\__/\__/\________________________/\__/\__/\____/\__/\__/\__)
32

Oh yes

????????
??????
??????
?????? GOOD LUCK
?????? MAINTAINING
?????? THIS SHIT
??????
??????????????????

Always popular

/*************************************************************
 *                                                           *
 *   .=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-.      *
 *   |                     ______                     |      *
 *   |                  .-"      "-.                  |      *
 *   |                 /            \                 |      *
 *   |     _          |              |          _     |      *
 *   |    ( \         |,  .-.  .-.  ,|         / )    |      *
 *   |     > "=._     | )(__/  \__)( |     _.=" <     |      *
 *   |    (_/"=._"=._ |/     /\     \| _.="_.="\_)    |      *
 *   |           "=._"(_     ^^     _)"_.="           |      *
 *   |               "=\__|IIIIII|__/="               |      *
 *   |              _.="| \IIIIII/ |"=._              |      *
 *   |    _     _.="_.="\          /"=._"=._     _    |      *
 *   |   ( \_.="_.="     `--------`     "=._"=._/ )   |      *
 *   |    > _.="                            "=._ <    |      *
 *   |   (_/                                    \_)   |      *
 *   |                                                |      *
 *   '-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-='      *
 *                                                           *
 *        ABANDON ALL HOPE, ALL YE WHO ENTER HERE            *
 *************************************************************/

For the international audience (might be off, depending on your fonts):

??????????/??
?????????/?????|
????????|????????
??????????? ?????|
????????? __ ????
? ?? ??´?´-???????-:,,??
? ? ????y..?? ??????; ??-:,,
?? ?/?? ????| .? | ._.???|?"-:,,
??? !??,,,???.???__.??;? >? ????,
??? .|?? <_ ??,,___,+?__,???/? /:?????,,
? ? ?|?_?? ?...?__,+?_??? ?????????
? ?? | ??___ ?.=????? ???????????"-.,
????|? ??J?.??| ? |,?|?-´????????????
????.|???/""?| ? |:?| ???????????????
???? |??????:| ? .|?????????????????"-:,,
???? |?? /???|??|?|??????????????????"-:,,
???? .|??|?,,??? ???? ???????????????,,,-?"
?????|?.,? ? ???? ? ??????????????,,,-?"
?????.|???????? ?´? ? ?????????,,,-?"
????? | /?? ????|?? |????? """"
?????????/??????|??,,,-
?????? ??? `?-?-| ??|-?"?
????? /??::|?????_?? ?
?????(???????? ??__?
14

How about this one. This is a working Turbo Pascal program that plays pong under DOS. Here is a program on sourceforge that creates ascii art from a bitmap file.

                     program         GrouchoMarx
             ;const topline=      09;bottomline=21;
         leftcol=10;rightcol   =68;var deltax,deltay,
       xpos,ypos:integer;ch   :char;procedure Border;var
   i:integer;begin for i   :=leftcol to rightcol do begin
   gotoxy(i,topline);{}   write('-');gotoxy(i,bottomline);
  write('-') end;for      i:=topline to bottomline do begin
  gotoxy(leftcol             ,i)   ;write('|');gotoxy({}{}{}
  rightcol,i)                               ;write('|'); end
   end;{}{}                                 begin ClrScr;xpos
   :=leftcol                                  ;ypos:=topline;{}
    deltax                                     :=1;deltay:=1;{}
      {!}                                       gotoxy(33,5);{}{}
                                                write('Groucho Bo'
                               +'unce');        gotoxy(30,7);write
           ('by '            +'John M. P'       +'assaniti');{}{}{
       }Border;{}{}{       }gotoxy(29,24);{     }write('Press any'
   +' key to quit.'       );while not {-ugh-}   keypressed do begin
  gotoxy(xpos,ypos)       ;xpos:=xpos+deltax;    ypos:=ypos+deltay
   ;{      }if{}            (xpos =leftcol)       or(xpos=rightcol
  ){}      then{  }{       {}     deltax{          }:=-deltax;if(  ypos
  =       topline){}      or     (ypos={}{}{       }bottomline){   }   {}
  {      }  then  {       }     {         }         deltay:=-{}   {}    {}
  {     }{}     {}{       }      {        }          deltay;{}   delay   (
  {}      {    }{         }       {     }20           ) end;{   }{}{}{}{}
   {}                     {}           {}     {} {}{}    gotoxy (1,24);{}
    {}        {}           {?}        {}     {}    {}      ClrEol;{<>}
     {?}     {}              {?}     {}      {      }{     }gotoxy(27,
       topline                 +3);{!}       {       }{    } write({}
             {                               }{       {}   'Not very '
             {                 }              +'e'     {}  +'xciti'  {
             {}               +'ng, '           {}      +'was it?'   );
              {}       {?}  gotoxy(23            ,         topline    +
               5)     ;write('Well, l'            +        'et''s'    {}
          +' see you write a program');           {{       }{}{  }     {}{
          }gotoxy(23,topline+6);write({            }{        {   }       {
          }'where the source code look'             +        {  }{       }
          's like');gotoxy(23,topline+       7);write        ( {}        {
           }'Groucho'+   ' Marx!!');{       }{    { }        {??}       {}
                                        gotoxy    (1,1        );        {}
                        write(         ^G    {}      {}                {}
                       {});{  ;;}     {{      {{                       }
                         delay       ({        }{                     }{
                            {        }  9999                          )
                                     ;    {{{}                       {}
                                     for ypos                       :=
                                      {                            }{
                                     }{                            {}
{ --Groucho Bounce-- }              {}                            {}
{by John M. Passaniti}             {{                             }
{compile with Turbo  }            {}                             {}
{Pascal, any version.}           {}                              {
                               {{{                            {{{
                             {{}                         topline
                             +                         3 {
                             }                        to
                             {}                      {}
                              {}                    {}
                               {                   {{
                               }                   {
                           }topline+7 do begin gotoxy(23,ypos)
                           ;write('                          '
                           +'         ');delay(50)end;gotoxy({
                           }34,topline+6);write('See Ya Bye!!'
                           );gotoxy(1,1);write(^G^G^G)end.{!!}
7

When using tricky code...

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . _________
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ./ It's a trap!\
. . . . . . . . . . . . . . . . _,,,--~~~~~~~~--,_ . . .\ .________/
. . . . . . . . . . . . . . ,-? : : : :::: :::: :: : : : : :º ?-, . . \/. . . . . . . . . .
. . . . . . . . . . . . .,-? :: : : :::: :::: :::: :::: : : :o : ?-, . . . . . . . . . .
. . . . . . . . . . . ,-? :: ::: :: : : :: :::: :::: :: : : : : :O ?-, . . . . . . . . .
. . . . . . . . . .,-? : :: :: :: :: :: : : : : : , : : :º :::: :::: ::?; . . . . . . . .
. . . . . . . . .,-? / / : :: :: :: :: : : :::: :::-, ;; ;; ;; ;; ;; ;; ;\ . . . . . . . .
. . . . . . . . /,-?,? :: : : : : : : : : :: :: :: : ?-, ;; ;; ;; ;; ;; ;;| . . . . . . .
. . . . . . . /,?,-? :: :: :: :: :: :: :: : ::_,-~~,_?-, ;; ;; ;; ;; | . . . . . . .
. . . . . _/ :,? :/ :: :: :: : : :: :: _,-?/ : ,-?;?-?????~-, ;; ;; ;;,? . . . . . . . .
. . . ,-? / : : : : : : ,-??? : : :,--?? :|| /,-?-?--???__,??? \ ;; ;,-? . . . . . . . .
. . . \ :/,, : : : _,-? --,,_ : : \ :\ ||/ /,-?-?x### ::\ \ ;;/ . . . . . . . . . .
. . . . \/ /---???? : \ #\ : :\ : : \ :\ \| | : (O##º : :/ /-?? . . . . . . . . . . .
. . . . /,?____ : :\ ?-#\ : \, : :\ :\ \ \ : ?-,___,-?,-`-,, . . . . . . . . . . .
. . . . ? ) : : : :????--,,--,,,,,,¯ \ \ :: ::--,,_??-,,???¯ :?- :?-, . . . . . . . . .
. . . . .) : : : : : : ,, : ????~~~~? \ :: :: :: :?????¯ :: ,-? :,/\ . . . . . . . . .
. . . . .\,/ /|\\| | :/ / : : : : : : : ,?-, :: :: :: :: ::,--?? :,-? \ \ . . . . . . . .
. . . . .\\?|\\ \|/ ?/ / :: :_--,, : , | )?; :: :: :: :,-?? : ,-? : : :\ \, . . . . . . .
. . . ./¯ :| \ |\ : |/\ :: ::----, :\/ :|/ :: :: ,-?? : :,-? : : : : : : ??-,,_ . . . .
. . ..| : : :/ ??-(, :: :: :: ?????~,,,,,?? :: ,-?? : :,-? : : : : : : : : :,-???\\ . . . .
. ,-? : : : | : : ??) : : :¯????~-,: : ,--??? : :,-?? : : : : : : : : : ,-? :¯?????-,_ .
./ : : : : :?-, :: | :: :: :: _,,-????¯ : ,--?? : : : : : : : : : : : / : : : : : : :??-,
/ : : : : : -, :¯???????????¯ : : _,,-~?? : : : : : : : : : : : : : :| : : : : : : : : :
: : : : : : : :¯??~~~~~~??? : : : : : : : : : : : : : : : : : : | : : : : : : : : :
6
           ___    ___    ____      
    ___   /   \__/   \__/____\     
  _/   \_/  :           /_____\   
 /|      :  :  ..      /       \   
| |     ::     ::      \       /   
| |     :|     ||     \ \_____/    
| |     ||     ||      |\   / |     
 \|     ||     ||      |   / | \    
  |     ||     ||      |  / /_\ \   
  | ___ || ___ ||      | /  /    \  
   \_-_/  \_-_/ | ____ |/__/      \ 
                _\_--_/    \      / 
               /____             /  
              /     \           /   
              \______\_________/
4

I use the ascii art text generator at http://www.network-science.de/ascii/ by Jörg Seyfferth. This is the "graffiti" font.

__________                   .___             __  .__               
\______   \_______  ____   __| _/_ __   _____/  |_|__| ____   ____  
 |     ___/\_  __ \/  _ \ / __ |  |  \_/ ___\   __\  |/  _ \ /    \ 
 |    |     |  | \(  <_> ) /_/ |  |  /\  \___|  | |  (  <_> )   |  \
 |____|     |__|   \____/\____ |____/  \___  >__| |__|\____/|___|  /
                              \/           \/                    \/
3

Definitely not. Waste of space and can confuse others. That said, I sort of like finding ASCII art left by others. :-)

3

I've put ASCII art diagrams in a couple of times to explain complex data structures.

3
                               ,
                               #
                              #+#
                             #**#
                             @****@
                          ,   @****@
                   ,      #   @******@
                   #     ##    @******@
                  ##    #+#     @*****+@     ,
                 #+@   @**@      @******@    #
               @#**#  @***@       @*****@   #+@
             @#+***@  #***@       @******@  #**@
           @#*****#  @*****@     @******@   @**@
          @******@    +******@@@********@    @**@
        @*******+     @****************+@    @***@
       @********@       @*************@      @****@
      @********@          @***********@       @*****
     @*********@           @+********@        @******@
    @**********@            @********@        @*******@
    @*********+@            @*********@     @**********@
    @***********@           @**********+@@@+***********@
    @************@         @****************************@
    @+*************@     @******************************@
     @**************+@@@+******************************@
      ************************************************.  #W
   W    *******************************************. .####
    ####.  ************************************.  .####W
      W####.   *****************************. .#######W
         W######.  *********************.  .#########
          .W########.   ***************.##########W
          +  W*##########.  ******   .##########W *+
        @#**** W*###########W****W#############W ***@
       @******** W*##########################W ******@
       @********** W##########**###########W ********@
        @*********** W#####W**@@**W######W **********@
         @************* W **#@  @#** W#W ***********@
          +@****************@    @+*** ***********@
            @@***@@@+******@  @@  @*******@@@****@
                    @*******@@**@@*****@
                    @*+****************@
                   @******@********@****@@
                  @+****@  @*****@   @****@
                   @***@   @+****@   @+**@
                     @@   @*******@  @@@@
                           @@@@@@@

I use ASCII art generators I find on Open Directory to generate ASCII from an image file, then clean up the results into something pretty. It's a meditative experience while you're thinking of a solution, and will make yourself and others smile when you come across it later.

After a little practice, you can make decent art out of any image, and you'll have a small library of images to mark important spots in your code.

3

No, just like I don't put

/*************************Comment***********************/

or similar stuff. I like my comments and code as short as possible. It's a principle I learned from writing: you shouldn't be able to take away one word without collapsing the whole story. I try to apply it to code as well, since code is basically writing but within rigid rules.

Also, I found that such art makes it harder to refactor, since I'd feel like killing unicorn. Simple and readable code without decoration is easy to refactor.

2

Man, I haven't, but after looking at the examples here, I am so going to start.

2

One time I came across some truly horrible code I needed to maintain, and took the time to insert the following comment.

/*
 __
/  \       ________________________________
|  |      /                                \
@  @      | Looks like you need to maintain|
|| ||     | this code.  For once you might |
|| ||  <--| wish I could help you.         |
|\_/|      \_______________________________/
\___/


    (   )                                                              
 (   ) (      
  ) _   )    <--Visual diagram of code logic.
   ( \_      
 _(_\ \)__                                                             
(____\___)) 

*/
1

Sometimes I use the figlet widget to add comments in source code or configuration files. This often helps when scrolling quick through a longer file (yeah I know, there shouldn't be any long files) or when printing 2 columns landscape (as I like to).

0

I've always wanted to write an app that turns monochrome bitmaps into ascii art. Not sure how I'd do it though.

Holy Moly... =:O That Pascal Pong app is crazy.

0

It looks cool but nothing more. I like ASCII art and could use it in my readme files but not in code files.

0

Yes, but mostly words mangled through this: ASCII Generator

0

No. Although much as I like it, putting it into code is like putting doodles in your doctoral thesis. It not only looks unprofessional, it also confuses the reader, has no useful purpose, ... it's just not done.

0

Not so much in my code, but I put ASCII art in the banner file on the embedded Linux systems that I develop. Each major release gets some new ASCII art in it which nobody ever really sees, except tech support -- they get a good laugh every time they log into a unit. Maybe I'll start code-naming new releases and inserting corresponding ASCII art to go with it. Hmmmmmm....