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. The Lounge
  3. Never found a programming language I couldn't love

Never found a programming language I couldn't love

Scheduled Pinned Locked Moved The Lounge
tutorialdata-structuresjsonoop
45 Posts 25 Posters 0 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.
  • X xperroni

    Some say that "when the lady can't dance, she complains the band can't play". Generally that's my feeling towards complaints that such-and-such language is "bad", or that it produces "bad" code. I do agree that some languages lend themselves more than others to certain good (or bad) practices, and that some languages are better/worse suited than others for some problems. However, in my experience the most crippling problems are the result of poor programming style: the respective programmer community either doesn't know, or seems to forget how to write clear code once they join in. As way of example, this is my list of good practices for several widely-belittled languages. It's mostly about how you can use each language's specific features to uphold the principles of structured / OO programming: Visual Basic

    • Always use Option Explicit for enforcing variable declaration;
    • Shun Variant variables – always use definite types;
    • Horribly misnamed as they are, embrace "Classes" as the way to go for behavior encapsulation;
    • Use the Object type sparingly, but learn to recognize where it can be leveraged for generalizing algorithms;
    • Well employed, the On Error machinery can make do as an effective Exception system;
    • Prefer Collections over Arrays, and learn to explore their associative features.

    C

    • Just because the language doesn't enforce a type-oriented form of programming doesn't mean you shouldn't. Always think about problems in terms of data types and accompanying operation (function) sets;
    • Structure your code as a collection of header / source pairs, where the header defines (ideally) one data type and its API, and the source contains the implementations;
    • Create more complex types by composing simpler ones, and likewise implement their API's in terms of the lower types' interfaces;
    • When designing a type's API, remember to provide functions for dynamic instantiation, initialization of stack-defined instances, and deletion. Consider providing macros for access to struct fields, instead of conceding to direct dereference;
    • Preserve the global namespace by defining symbols as static whenever they don't have to be seen outside their compilation units;
    • Use function pointers for generalizing complex algorithms;
    • Though dreadful when used carelessly, macros have great potential for simplifying progr
    S Offline
    S Offline
    StCroixSkipper
    wrote on last edited by
    #41

    Folks must be forgetting the good old days. Remember when Basic Interpreters only allowed two character variable names? I don't care how creative you are, try to build a relatively simple system of today with two character names. That lady couldn't dance and that band couldn't keep time. StCroixSkipper

    scooter_jsm

    B 1 Reply Last reply
    0
    • S StCroixSkipper

      Folks must be forgetting the good old days. Remember when Basic Interpreters only allowed two character variable names? I don't care how creative you are, try to build a relatively simple system of today with two character names. That lady couldn't dance and that band couldn't keep time. StCroixSkipper

      scooter_jsm

      B Offline
      B Offline
      BrainiacV
      wrote on last edited by
      #42

      Wotsa Matter U? :wtf: Can't deal with A-Z, A0-A9...Z0-Z9, AA...AZ...ZA...ZZ? Not enough variables????? Why just add comments to explain them all :laugh:

      Psychosis at 10 Film at 11

      S 1 Reply Last reply
      0
      • B BrainiacV

        Wotsa Matter U? :wtf: Can't deal with A-Z, A0-A9...Z0-Z9, AA...AZ...ZA...ZZ? Not enough variables????? Why just add comments to explain them all :laugh:

        Psychosis at 10 Film at 11

        S Offline
        S Offline
        StCroixSkipper
        wrote on last edited by
        #43

        As I recall a very familiar name's claim to fame was his development of a Basic Interpreter with 2 character variable names. His accomplishment was so profound it was mentioned in a recent movie. I couldn't help but think it was tongue in cheek but only a developer who was there would recognize the humor.

        scooter_jsm

        1 Reply Last reply
        0
        • X xperroni

          Some say that "when the lady can't dance, she complains the band can't play". Generally that's my feeling towards complaints that such-and-such language is "bad", or that it produces "bad" code. I do agree that some languages lend themselves more than others to certain good (or bad) practices, and that some languages are better/worse suited than others for some problems. However, in my experience the most crippling problems are the result of poor programming style: the respective programmer community either doesn't know, or seems to forget how to write clear code once they join in. As way of example, this is my list of good practices for several widely-belittled languages. It's mostly about how you can use each language's specific features to uphold the principles of structured / OO programming: Visual Basic

          • Always use Option Explicit for enforcing variable declaration;
          • Shun Variant variables – always use definite types;
          • Horribly misnamed as they are, embrace "Classes" as the way to go for behavior encapsulation;
          • Use the Object type sparingly, but learn to recognize where it can be leveraged for generalizing algorithms;
          • Well employed, the On Error machinery can make do as an effective Exception system;
          • Prefer Collections over Arrays, and learn to explore their associative features.

          C

          • Just because the language doesn't enforce a type-oriented form of programming doesn't mean you shouldn't. Always think about problems in terms of data types and accompanying operation (function) sets;
          • Structure your code as a collection of header / source pairs, where the header defines (ideally) one data type and its API, and the source contains the implementations;
          • Create more complex types by composing simpler ones, and likewise implement their API's in terms of the lower types' interfaces;
          • When designing a type's API, remember to provide functions for dynamic instantiation, initialization of stack-defined instances, and deletion. Consider providing macros for access to struct fields, instead of conceding to direct dereference;
          • Preserve the global namespace by defining symbols as static whenever they don't have to be seen outside their compilation units;
          • Use function pointers for generalizing complex algorithms;
          • Though dreadful when used carelessly, macros have great potential for simplifying progr
          N Offline
          N Offline
          Nick Rioux
          wrote on last edited by
          #44

          How about brainf*ck, INTERCAL, and Whitespace?

          File Association in VB.Net

          modified on Tuesday, October 26, 2010 8:08 PM

          1 Reply Last reply
          0
          • D Dalek Dave

            You are way too young then. Try COBOL, structured? they never heard of the word. MSX BASIC, you just hated it, that was all there was. Pascal, Let's just say that if you knew ALGOL, you stuck with ALGOL.

            ------------------------------------ I will never again mention that I was the poster of the One Millionth Lounge Post, nor that it was complete drivel. Dalek Dave CCC League Table Link CCC Link[^]

            K Offline
            K Offline
            KP Lee
            wrote on last edited by
            #45

            First thing I thought of was COBOL when I saw the title. It works. It was the first thing I learned after assembler. I have to say, I preferred assembler to COBOL even if it is less readable. Its usable. I coded in it for two years straight before I found a transfer that used FORTRAN. A year later, I was brought kicking and screaming back to it because my new partner liked it. It certainly is good background knowledge when told to use PLI (very COBOLesk) Love is a very serious term. Can't say I've ever seen code where that term applies. A lot of them I Like. NEVER EVER COBOL.

            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