Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Other Discussions
  3. The Insider News
  4. Don't write clean code, write CRISP code

Don't write clean code, write CRISP code

Scheduled Pinned Locked Moved The Insider News
comquestion
6 Posts 5 Posters 1 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • K Offline
    K Offline
    Kent Sharkey
    wrote on last edited by
    #1

    Bitfield Consulting[^]:

    I'm sure we're all in favour of "clean code", but it's one of those motherhood-and-apple-pie things that no one can reasonably disagree with. Who wants to write dirty code?

    How do you like your code? Crisp!

    That one is probably just for Canadians, sorry. Just in case you can't bear to not know (video, but safe)[^]

    J M D B 4 Replies Last reply
    0
    • K Kent Sharkey

      Bitfield Consulting[^]:

      I'm sure we're all in favour of "clean code", but it's one of those motherhood-and-apple-pie things that no one can reasonably disagree with. Who wants to write dirty code?

      How do you like your code? Crisp!

      That one is probably just for Canadians, sorry. Just in case you can't bear to not know (video, but safe)[^]

      J Offline
      J Offline
      Joe Woodbury
      wrote on last edited by
      #2

      The writer needs to apply two of his principles, Readable and Simplicity, to his own writing.

      1 Reply Last reply
      0
      • K Kent Sharkey

        Bitfield Consulting[^]:

        I'm sure we're all in favour of "clean code", but it's one of those motherhood-and-apple-pie things that no one can reasonably disagree with. Who wants to write dirty code?

        How do you like your code? Crisp!

        That one is probably just for Canadians, sorry. Just in case you can't bear to not know (video, but safe)[^]

        M Offline
        M Offline
        Marc Clifton
        wrote on last edited by
        #3

        This is why programmers should cut their teeth on assembly programming. CRISP is a requirement for assembly language coding, IMO, and creates a good discipline when encountering languages that want to CHAR (no acronym, just a pun) your CRISP practices.

        Latest Articles:
        A Lightweight Thread Safe In-Memory Keyed Generic Cache Collection Service A Dynamic Where Implementation for Entity Framework

        D 1 Reply Last reply
        0
        • K Kent Sharkey

          Bitfield Consulting[^]:

          I'm sure we're all in favour of "clean code", but it's one of those motherhood-and-apple-pie things that no one can reasonably disagree with. Who wants to write dirty code?

          How do you like your code? Crisp!

          That one is probably just for Canadians, sorry. Just in case you can't bear to not know (video, but safe)[^]

          D Offline
          D Offline
          den2k88
          wrote on last edited by
          #4

          Quote:

          An unnecessary function call, added purely to satisfy some rule like "methods should be less than 10 lines"

          I had a nice 2 hours long argument with top brass for the company I was working for as a body-rental contractor on the usefulness of these rules in their LINTer (linting is mandatory to be MISRA compliant). The cool fact is that after a week they actually removed them. As for performance being not important, I raise the firmware world as a counter-example. And it explains why I am hounded daily by companies looking for a firmware engineer (now, if they also wanted to pay me more than a janitor it would be just peachy).

          GCS/GE d--(d) s-/+ a C+++ U+++ P-- L+@ E-- W+++ N+ o+ K- w+++ O? M-- V? PS+ PE Y+ PGP t+ 5? X R+++ tv-- b+(+++) DI+++ D++ G e++ h--- r+++ y+++*      Weapons extension: ma- k++ F+2 X

          1 Reply Last reply
          0
          • M Marc Clifton

            This is why programmers should cut their teeth on assembly programming. CRISP is a requirement for assembly language coding, IMO, and creates a good discipline when encountering languages that want to CHAR (no acronym, just a pun) your CRISP practices.

            Latest Articles:
            A Lightweight Thread Safe In-Memory Keyed Generic Cache Collection Service A Dynamic Where Implementation for Entity Framework

            D Offline
            D Offline
            den2k88
            wrote on last edited by
            #5

            This, 10 times. Assembler really taught me on how to make the flow of the code easy to determine while reading it and to group subprocedures in functions so that they are easily debuggable and identifiable. It also gave me serious OCD on how to indent and align the code, not helped at all by my discovery of selection by column.

            unsigned long int variable_name1 = default_val;
            char var_name2 = default_val;
            static int var3 = default_val;

            function_call_long_name(arg1, b, c);
            function_short (a , arg2, c);

            var1 = a + b;
            variable_long_name = foo + bar;

            Code like this may look overly large on the horizontal axis but it is clear and allows changes or copy-paste even with column selection.

            GCS/GE d--(d) s-/+ a C+++ U+++ P-- L+@ E-- W+++ N+ o+ K- w+++ O? M-- V? PS+ PE Y+ PGP t+ 5? X R+++ tv-- b+(+++) DI+++ D++ G e++ h--- r+++ y+++*      Weapons extension: ma- k++ F+2 X

            1 Reply Last reply
            0
            • K Kent Sharkey

              Bitfield Consulting[^]:

              I'm sure we're all in favour of "clean code", but it's one of those motherhood-and-apple-pie things that no one can reasonably disagree with. Who wants to write dirty code?

              How do you like your code? Crisp!

              That one is probably just for Canadians, sorry. Just in case you can't bear to not know (video, but safe)[^]

              B Offline
              B Offline
              Bohdan Stupak
              wrote on last edited by
              #6

              > Article about writing code with no code examples Yeah, just do good things and don't do bad things, mkay?

              1 Reply Last reply
              0
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


              • Login

              • Don't have an account? Register

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • World
              • Users
              • Groups