Friday, April 24, 2009

Pragmatic (programming) language use

While doing research for an earlier post, I wondered whether the pragmatic programmers had ever come up with a definition of a "pragmatic language" in which to do one's pragmatic programming. They had not - at least none that Google was aware of.

If I'd given it any thought, I would have realized that it's not particularly pragmatic to divide programming languages into "pragmatic" and "non-pragmatic" categories. The pragmatic approach is to pick a language that's appropriate for your current project and learn to use it well, not to engage in holy wars about which languages are better than others.

Anyway, the first two hits on a Google search for "pragmatic language" led to the website of the American Speech-Language-Hearing Association, which defines pragmatics as the ability to use language appropriately in social situations. That was kind of interesting, but didn't seem germane to software development in any way - until I read this:

An individual with pragmatic problems may:

  • say inappropriate or unrelated things during conversations
  • tell stories in a disorganized way
  • have little variety in language use
Hey, pragmatics and pragmatic programming have something in common after all! Let's examine the symptoms, shall we?

Say inappropriate or unrelated things during conversations

If we substitute "programs" for "conversations", this becomes highly apropos to programming. One of the key concepts of pragmatic programming is to design components that have a single, well-defined purpose. If a component deviates from that purpose to do something unrelated, that's a code smell. Time to refactor!

Tell stories in a disorganized way

The legendary Donald Knuth introduced the concept of literate programming, which holds that it's not sufficient for a program to instruct the computer what to do; it must also explain to human beings what the computer is supposed to do. Knuth suggests that a literate programmer can be considered an essayist, and Yukihiro "Matz" Matsumoto, the inventor of Ruby, affirms this view in "Treating Code As an Essay" (Found in the excellent O'Reilly compilation"Beautiful Code".) If we agree with these wise gentlemen, then surely code must tell its "story" in an organized way to qualify as an essay.

Have little variety in language use

If a programmer employs a limited variety of coding strategies, it suggests that Maslow's hammer - "If all you've got is a hammer, everything looks like a nail" - might be to blame. This can happen when an inexperienced programmer first discovers design patterns, and becomes so enamored with a particular pattern that he or she applies it everywhere, even when it's not appropriate.

An alternative interpretation of this symptom is an unwillingness to learn or use programming languages other than the one a programmer is most familiar with - let's call this monoglot programming, to contrast it with the increasingly popular practice of polyglot programming.

I'm not suggesting that pragmatics and pragmatic programming have any deeper connection than this. Language pragmatics are innate, whereas pragmatic programming must be learned. I'm certainly not implying that a deficit of pragmatic programming skills indicates a possible brain injury! But it's interesting to see how easily deficiencies in the domain of language development can be recast in terms of software development, despite being linked only by a coincidental overlap in terminology.

38 comments:

  1. This is very useful information. Thanks for sharing.
    java training in Chennai

    ReplyDelete
  2. Your posts is really helpful for me.Thanks for your wonderful post. I am very happy to read your post. It is really very helpful for us and I have gathered some important information from this blog.

    JAVA Training in Chennai

    ReplyDelete
  3. The points mentioned by you are very fundamental but simple and basic things are what everyone forgets. Good read article.
    Keep writing more..

    Best Hadoop Training in Chennai
    Best Hadoop Training in Chennai

    ReplyDelete
  4. Amazing stuff you have added in this article. Nice collection.
    Buy Crazy Bulk | Crazy Bulk Reviews

    ReplyDelete
  5. Information about JAVA have spread all over the world wide web, but this information is quite unique and attractive. Thanks for sharing it in here. Keep blogging

    JAVA Training in Chennai
    JAVA Course in Chennai

    ReplyDelete

  6. I have read your blog, it was good to read & I am getting some useful info's through your blog keep sharing... Informatica is an ETL tools helps to transform your old business leads into new vision. Learn Informatica training in chennai from corporate professionals with very good experience in informatica tool.
    Regards,
    Informatica training center in Chennai|Informatica training chennai

    ReplyDelete
  7. Thanks for sharing this valuable information to our vision. You have posted a trust worthy blog keep sharing.
    Regards,
    Informatica training in chennai|Informatica courses in Chennai|sas training in Chennai

    ReplyDelete
  8. Thanks for sharing those useful basic programming stuff’s of Python, it helps me to explore my knowledge in programming...if you want to switch your career in developing area you should know the basic of programming’s for that you have to read python because it was the first programming language for more details contact the link.
    Regards,
    Python Training in Chennai|Python Training|Python Training Institutes in Chennai

    ReplyDelete
  9. Thanks for sharing this pretty post to our knowledge, SAS is a program that assists to retrieve, managing and uploading the data & simply it’s an integration system of software for performing these actions, thanks for taking your time to discuss about this topic.
    Regards,
    sas course in Chennai|sas training institute in Chennai

    ReplyDelete
  10. Whatever we gathered information from the blogs, we should implement that in practically then only we can understand that exact thing clearly, but it’s no need to do it, because you have explained the concepts very well. It was crystal clear, keep sharing dude.
    Regards,
    Best Informatica Training In Chennai|Informatica training center in Chennai|Informatica training in chennai

    ReplyDelete

  11. It’s really a good post; actually I just begin to learn above stuffs to get my career enhancement. Thanks for sharing the useful post I would to see your upcoming blogs here.
    Regards,
    SAS Training in Chennai|SAS Course in Chennai

    ReplyDelete
  12. Such a nice blog i had seen ever. The information with this is much impressive and informative. thank you for sharing and keep updating.

    Regards,
    CCNA Training in Chennai | CCNA Training Institute in Chennai | Best CCNA Training in Chennai

    ReplyDelete
  13. Its really good post with amazing content thanks for this topic..:) Android Application Software

    ReplyDelete
  14. Thank you for sharing such valuable information and tips. This can give insights and inspirations for us; very helpful and informative! Would love to see more updates from you in the future.
    Selenium Training in Chennai
    Selenium Training
    iOS Training in Chennai
    iOS Training Institutes in Chennai
    iOS Training
    Best JAVA Training in Chennai
    JAVA Training

    ReplyDelete
  15. Outstanding blog thanks for sharing such wonderful blog with us ,after long time came across such knowlegeble blog. keep sharing such informative blog with us.
    Air Hostess Training in Chennai | Air Hostess Training Institute in Chennai | Air Hostess Academy in Chennai | Air Hostess Course in Chennai | Air Hostess Institute in Chennai

    ReplyDelete
  16. This comment has been removed by the author.

    ReplyDelete
  17. Its a wonderful post and very helpful, thanks for all this information. You are including better information regarding this topic in an effective way. T hank you so much.
    CCNA Training in Chennai
    DevOps Training in Chennai
    DevOps course
    Best devOps Training in Chennai
    CCNA certification in Chennai
    CCNA Training

    ReplyDelete
  18. Thanks for sharing,this blog makes me to learn new thinks.
    interesting to read and understand.keep updating it.
    Angularjs course in Bangalore
    AngularJS Course in Anna Nagar
    AngularJS Courses in T nagar

    ReplyDelete
  19. It is really a great pleasure reading your article. I have learned a lot of new things from your blog. Keep updating more like this

    C C++ Training in Chennai | C Training in Chennai | C++ Training in Chennai | C C++ Training in Velachery | C C++ Training in Adyar | C C++ Training in Tambaram

    ReplyDelete
  20. I really thank you for your innovative post.I have never read a creative ideas like your posts.
    here after i will follow your posts which is very much help for my career.
    German Training in Vadapalani
    German Training in Mogappair
    german teaching courses in bangalore
    german language coaching centres in bangalore

    ReplyDelete
  21. Informative post,It is useful for me to clear my doubts.I hope others also like the information you gave
    in your blog.
    AWS Training in Ashok Nagar
    AWS Training in Nolambur
    Best AWS Training in Bangalore
    AWS Certification Training in Bangalore

    ReplyDelete
  22. Created by Sun Microsystems, Java is a ground-breaking object-situated dialect. JavaServer Pages (JSPs) are site pages with inserted Java code. code online easily

    ReplyDelete
  23. The blog gave very useful information and i learn lot of ideas to your blog. Thank you for your sharing with us...
    IELTS coaching in Chennai
    IELTS Training in Chennai
    IELTS coaching centre in Chennai
    Best IELTS coaching in Chennai

    ReplyDelete
  24. The articles can be evaluated from 1 to 5. The evaluations depend on how as of late the votes have been presented by the clients. Consequently it assists organizations with sorting out the substance that is obsolete and the substance that is producing improved interest among clients. Noida India Courses on Salesforce

    ReplyDelete
  25. Thanks for the detailed article on this topic. I would like to see more such awesome articles from you.

    ReplyDelete
  26. sbobet Sportsbook in Nigeria Review 2021 - ThauberBet.com
    sbobet.com is one of the best betting sites in Nigeria. bet365 The website offers 온카지노 a great odds on football and other sports including sbobet ทางเข้า soccer, basketball,

    ReplyDelete
  27. This comment has been removed by the author.

    ReplyDelete
  28. Some fashionable slot machines nonetheless embody a lever as a skeuomorphic design trait to set off play. However, the mechanics of early machines have been superseded by random number generators, and most at the moment are|are actually} operated using buttons and touchscreens. With free on-line on 돈포차 line casino slots, core games, and desk games, have the ability to|you probably can} sample all of these games at zero value. There isn't any danger, no registration, and no obligation in most cases.

    ReplyDelete
  29. This is a fantastic article, and your writing is both informative and entertaining, making it a great resource for readers.

    ReplyDelete
  30. Your topic is very good. Check out our juegos apk app

    ReplyDelete