Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Other Does anyone else get ASCII artistic in their code?

  • This topic is empty.
Viewing 15 posts - 1 through 15 (of 17 total)
  • Author
    Posts
  • #165703
    nixnerd
    Participant

    I just started doing this:

      ///////////////////////////////////
     // Misc. Cascading Modifications //
    ///////////////////////////////////
    

    Whereas I used to do this:

    /* Misc. Cascading Modifications */
    

    I don’t know why I changed it really. Probably for some visual breakup in really long stylesheets. Plus, it gives me a way to sort of h1 and h2 my comments if that makes sense. I can create a hierarchy of heading comments. The main heading looks like the first one and the sub headings look like the latter. I’m sure I could develop this more to make my code even more readable.

    Also, I’ve been using a lot of partials in SASS. When they’re all combined, it’s easier for people I work with to see what the hell is going on if I use this method. Especially with more complex elements.

    I know this makes my file size SLIGHTLY bigger but the difference I would imagine is VERY negligible.

    Please share you ASCII commenting methods.

    #165704
    Alen
    Participant
    /**
     *
     *
     *
     */
    
    #165708
    nixnerd
    Participant

    Clean @Alen. I dig it.

    I think I’m going to roll like this from now one to keep it tidy:

    // Heading //
    
    /* Sub-Heading */
    
    #165735
    __
    Participant

    What @Alen is doing is JavaDoc (or PHPDoc, which is PHP’s version)-style comments.

    Is’s a formalized syntax for code documentation. It can be parsed to auto-generate basic docs (many IDEs can read them, too). I’ve found it to be a great way to get myself to document my code.

    When I need “section headings” in my code, I tend to borrow MarkDown syntax:

    # HEADING #
    
    ##  Sub-Heading  ##
    

    I used to do stuff like

    /****************************
    *          Hello!           *
    * this is an important note *
    *****************************
    *      please read it       *
    *  and know how cool I am   *
    ****************************/
    

    …but it was honestly just too hard to maintain.

    #165739
    nixnerd
    Participant

    I use hash comments in Python but can you use them in SASS/SCSS?

    I could just go try it but I think the answer is no. I REAAAALLY prefer that look. It catches the eye very easily.

    Comments in HTML are atrocious… to me anyway.

    #165740
    __
    Participant

    I use hash comments in Python but can you use them in SASS/SCSS?

    Nope.

    Comments in HTML are atrocious… to me anyway.

    <!doctype html>
      <head>
        <title>HTML Comments Aren't All That Bad</title>
      <head>
      <body>
        <?php /* this is an html comment 
            (in that I am commenting on html) */ ?>
      </body>
    </html>
    

    What’s the big deal?

    #165840
    nixnerd
    Participant

    What’s the big deal?

    I suppose nothing. I was talking about this:

    &lt;!-- I am a comment --&gt;
    

    I just don’t like it. It doesn’t catch the eye enough… For me anyway. I get that highlighted syntax fixes this but I look at code in the terminal a lot.

    I love the look of this:

    # I am a comment. 
    

    BTW, I should have specified that I wondered if you could do this is CSS:

    ## I am a comment
    

    But I guess that would always look like an ID in passing. Too bad…

    #165841
    nixnerd
    Participant

    Sorry for that weird formatting ^

    #165894
    __
    Participant

    What’s the big deal?

    I suppose nothing…

    I knew what you meant. That was just me being snarky again—i.e., “I’d rather type <?php /* */ ?> than <!-- -->.”

    Sorry for that weird formatting ^

    Yeah, I’ve been having that problem lately too. I love the new site layout, but the MD editor has gone completely wonky. And does anyone else have to click [Submit] twice?

    #165895
    Alen
    Participant

    And does anyone else have to click [Submit] twice?

    Funny you say that, I had issues with double clicking previous implementation of submit button. Now, seems fine.

    #165896
    chrisburton
    Participant

    And does anyone else have to click [Submit] twice?

    I used to have to click it more than that. When I would click submit, it would hang for almost 2 minutes sometimes. I emailed the guy working on the backend of CSS-Tricks about this. No issues for me as of yet.

    Edit: Of course as I go to post this, I’m having the problem.

    #165901
    __
    Participant

    Of course as I go to post this, I’m having the problem.

    Glad I could help.

    #178965
    nixnerd
    Participant

    Hate to necro-bump this thread. But I just opened the browser console while visiting imgur and saw this:

     
          _
         (_)
          _ _ __ ___   __ _ _   _ _ __
         | | '_ <code>_ \ / _</code> | | | | '__|
         | | | | | | | (_| | |_| | |
         |_|_| |_| |_|\__, |\__,_|_|
                       __/ |
                      |___/
    ========================================
    You opened the console! Know some code,
    do you? Want to work for one of the best
    startups around? http://imgur.com/jobs
    ========================================
    #178968
    nixnerd
    Participant

    Bloody hell… I can never get the code blocks to behave like I want.

    #178998
    __
    Participant

    Bloody hell… I can never get the code blocks to behave like I want.

    lol

    I’ve seen that sort of thing before. I don’t recall where (not imgur). It’s a pretty neat idea.

Viewing 15 posts - 1 through 15 (of 17 total)
  • The forum ‘Other’ is closed to new topics and replies.