LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 05-11-2015, 12:33 PM   #16
metaschima
Senior Member
 
Registered: Dec 2013
Distribution: Slackware
Posts: 1,982

Rep: Reputation: 491Reputation: 491Reputation: 491Reputation: 491Reputation: 491

Quote:
Originally Posted by johnsfine View Post
Ultimately, the size and complexity of the project becomes an overwhelming factor in whether the language is human readable. No one should claim C++ is high on the list of human readable programming languages, but as you scale up to bigger and more complicated projects, eventually C++ becomes the most human readable programming language, because it holds up better to bigger and more complicated projects than any other commonly used language.
You are probably right about that. I think that is also why it is used for large complicated projects. It may also be the reason why it is preferred to C for large projects.
 
Old 05-11-2015, 12:34 PM   #17
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,573

Rep: Reputation: 2134Reputation: 2134Reputation: 2134Reputation: 2134Reputation: 2134Reputation: 2134Reputation: 2134Reputation: 2134Reputation: 2134Reputation: 2134Reputation: 2134
Quote:
Originally Posted by dogpatch View Post
So you have a hard time understanding that 'add' means 'add' as any non-tech person would already know intuitively.
It's not intuitive, the word "add", like most of the rest of human language, is ambiguous. Its actual meaning depends on context. What if your example said "Add ItemName to Receipt", what would "add" mean then? All of a sudden the exact same command switches from a mathematical sum to appending a new entry onto a list. Or does it? Maybe it's still a mathematical sum using the ASCII codes for the characters in ItemName? I don't know. That's the problem.

From the sound of it, you're taking "human-readable" to mean "looks like English-speak". That doesn't make it more readable. It makes the words and symbols more familiar, but the added ambiguity actually makes it less readable IMO.

This is why computer languages are written the way they are, to remove ambiguity. To write computer programs in "normal speak" brings about all of the problems with ambiguity that we face in our daily lives. No thank you. We have enough variations of the phrase "What?" "I don't understand" "What do you mean?" "Come again?" in normal communication, keep that crap out of computer programs.

You still didn't answer what on god's green earth "PIC 9(4)." means.

Last edited by suicidaleggroll; 05-11-2015 at 12:52 PM.
 
Old 05-11-2015, 12:46 PM   #18
dugan
LQ Guru
 
Registered: Nov 2003
Location: Canada
Distribution: distro hopper
Posts: 9,144

Rep: Reputation: 3967Reputation: 3967Reputation: 3967Reputation: 3967Reputation: 3967Reputation: 3967Reputation: 3967Reputation: 3967Reputation: 3967Reputation: 3967Reputation: 3967
The next time punchy starts a language war thread, my reply will be "stop starting language war threads." I'm just going to say that now.
 
1 members found this post helpful.
Old 05-11-2015, 12:51 PM   #19
ntubski
Senior Member
 
Registered: Nov 2005
Distribution: Debian, Arch
Posts: 3,508

Rep: Reputation: 1811Reputation: 1811Reputation: 1811Reputation: 1811Reputation: 1811Reputation: 1811Reputation: 1811Reputation: 1811Reputation: 1811Reputation: 1811Reputation: 1811
Quote:
For example, a typical line of Cobol code might be
Code:
Add ItemAmount to InvoiceTotal.
which code itself is self-explanatory, with no need of comments
Sure but I would say the same about
Code:
InvoiceTotal += ItemAmount
Quote:
Originally Posted by suicidaleggroll View Post
What does "Add ItemAmount to InvoiceTotal" do? Is InvoiceTotal just a running sum? A list? An array? What does "add" mean?
I think you're being a bit disingenuous here, InvoiceTotal is clearly a sum (if it's not, ).

Quote:
Originally Posted by dogpatch
The outline way of defining data is likewise self-evident and human readable. e.g
I agree with suicidaleggroll that the PIC thing is rather cryptic, I guess (again from the names chosen) it means some kind of character type? I thought the numbers would indicate max/min length except then it makes no sense to have 99 on DayOfBirth. And what's with the numbers that appear to be indicating the indent level?

Quote:
'add' means 'add' as any non-tech person would already know intuitively. The non-tech would not immediately wonder whether an array or list were involved.
How would you add a new number to a bunch of numbers in Cobol then?

Quote:
which was the OPs original question.
I don't know that the OPs original question meant anything, beyond starting a language war, like dugan says.

Last edited by ntubski; 05-11-2015 at 12:52 PM. Reason: replace possibly specific "list" with "bunch"
 
Old 05-11-2015, 12:54 PM   #20
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,573

Rep: Reputation: 2134Reputation: 2134Reputation: 2134Reputation: 2134Reputation: 2134Reputation: 2134Reputation: 2134Reputation: 2134Reputation: 2134Reputation: 2134Reputation: 2134
Quote:
Originally Posted by ntubski View Post
I think you're being a bit disingenuous here, InvoiceTotal is clearly a sum (if it's not, ).
Fair enough...

Change it to "Add ItemAmount to Invoice" then.

Last edited by suicidaleggroll; 05-11-2015 at 12:56 PM.
 
Old 05-11-2015, 02:11 PM   #21
millgates
Member
 
Registered: Feb 2009
Location: 192.168.x.x
Distribution: Slackware
Posts: 852

Rep: Reputation: 389Reputation: 389Reputation: 389Reputation: 389
I think human-readable is a very misleading term. The point of programming is that you have to be able to describe what you want to do in an exact way. Everyone is able to sort numbered pieces of paper in an ascending order if you ask them to, but not all of them can describe the algorithm they used to do it. But if you can't explain it to yourself, you can't program it. Sometimes I think some people are thinking "high-level", or "human-readable" language means the compiler will understand (their) natural language and know what they meant even if they don't. But high-level is not an adequate substitute for being able to put the logic together. Leave computation to computers and thinking to human beings. Programs trying to guess what you meant rather than do what you wrote tend to result in a very poorly predictable behavior. When google gives me what it thinks I want instead what I asked for when I actually do know what I want is annoying, but if I was forced to use a programming language that behaves like that, I'd probably jump out of the nearest window.
 
Old 05-31-2015, 07:12 AM   #22
hotcore
LQ Newbie
 
Registered: May 2015
Posts: 1

Rep: Reputation: Disabled
Ada has a very human readable syntax.

Rebol is also very readable, can generate even more human friendly DSL's easily and is *very* lightweigt.
Red (red-language.org) is its successor and has the same advantages, but will be even more powerful than Rebol.
 
Old 06-04-2015, 07:13 PM   #23
joec@home
Member
 
Registered: Sep 2009
Location: Galveston Tx
Posts: 291

Rep: Reputation: 70
Personal preference, I rather think of it as in what language can you write code that is easily portable to other languages. For example, you can cut and past BASIC right into the old Microsoft .ASP files. With very few tweaks you can quickly convert it to PHP. Likewise you can call BASH from PHP. A good example of what is NOT portable is the new Microsoft .ASPX files. But then again, when Microsoft released its plans for .NET in the late 90's was when I decided I needed to learn Linux! Total insecure ..... better stop there, got absolutely nothing good to say about .NET
 
Old 06-04-2015, 08:01 PM   #24
sgosnell
Senior Member
 
Registered: Jan 2008
Location: Baja Oklahoma
Distribution: Debian
Posts: 1,054

Rep: Reputation: 281Reputation: 281Reputation: 281
The most easily read language I've used was Pascal. Pretty straightforward. But it's not in much use these days. Ada is very similar, but never had wide adoption outside NASA AFAIK.
 
Old 06-05-2015, 06:53 AM   #25
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
Blog Entries: 2

Rep: Reputation: 4864Reputation: 4864Reputation: 4864Reputation: 4864Reputation: 4864Reputation: 4864Reputation: 4864Reputation: 4864Reputation: 4864Reputation: 4864Reputation: 4864
I wonder why nobody has brought up Smalltalk in this discussion. I would think that any language that is used to teach programming to kids (Smalltalk, Logo, ...) would fit the description of "human readable" best, if "human readable" is defined as "easy to understand for people with no knowledge of the language".

Last edited by TobiSGD; 06-05-2015 at 08:50 AM. Reason: fixed typo
 
Old 06-05-2015, 07:56 AM   #26
schneidz
LQ Guru
 
Registered: May 2005
Location: boston, usa
Distribution: fc-15/ fc-20-live-usb/ aix
Posts: 5,258

Rep: Reputation: 914Reputation: 914Reputation: 914Reputation: 914Reputation: 914Reputation: 914Reputation: 914Reputation: 914
http://www.linuxquestions.org/questi...2/#post5004837
 
Old 06-05-2015, 09:14 AM   #27
SCSIraidGURU
Member
 
Registered: Oct 2014
Posts: 69

Rep: Reputation: Disabled
C# is what most applications are written in. C# replaced C and C++. VB or Java would be on the list. CSS would be on the list because of web site. Cobol, Pascal and Fortran are still used.

Human readable? Some doubt programmers are humans. I can look at most code and figure out the syntax. I can tell you what the code does. I have been programming 30+ years. C# with visual studio took the fun out of writing code. It was an art in the 1980s. With Java and Visual Studio anyone can write code. It takes a good programmer to make it elegant instead of spaghetti.
 
Old 06-05-2015, 12:16 PM   #28
schneidz
LQ Guru
 
Registered: May 2005
Location: boston, usa
Distribution: fc-15/ fc-20-live-usb/ aix
Posts: 5,258

Rep: Reputation: 914Reputation: 914Reputation: 914Reputation: 914Reputation: 914Reputation: 914Reputation: 914Reputation: 914
^ isnt c still dominant ? at least for linux (i have never come across c# source code).
 
Old 06-05-2015, 12:33 PM   #29
dugan
LQ Guru
 
Registered: Nov 2003
Location: Canada
Distribution: distro hopper
Posts: 9,144

Rep: Reputation: 3967Reputation: 3967Reputation: 3967Reputation: 3967Reputation: 3967Reputation: 3967Reputation: 3967Reputation: 3967Reputation: 3967Reputation: 3967Reputation: 3967
Quote:
Originally Posted by SCSIraidGURU View Post
C# is what most applications are written in.
Is that still true even on Windows?

Last edited by dugan; 06-05-2015 at 12:39 PM.
 
Old 06-07-2015, 12:13 AM   #30
psionl0
Member
 
Registered: Jan 2011
Distribution: slackware_64 14.1
Posts: 722
Blog Entries: 2

Rep: Reputation: 123Reputation: 123
It's not the language but the way the code is written that makes the code readable or not.

Almost any language that permits well defined programming structures, long variable and function names, suitable indenting etc can be used to create readable programs.

Ideally, you should be able to take pseudo-code and translate it directly into the language you are using without any restructuring of the code.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
top command output in "human readable" custangro Linux - General 7 12-01-2017 11:53 AM
Human readable output from HP-UX Ejdaha Linux - Newbie 6 05-09-2013 02:05 AM
[SOLVED] Convert field from epoch to human readable sebelk Programming 6 01-08-2012 02:13 AM
[SOLVED] How to show the top processes eating RAM in human readable? quanta Programming 8 08-15-2010 08:56 AM
Human readable IP adresses from netfilter dividedby0 Linux - Networking 3 03-22-2009 12:10 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 11:59 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration