|
Not confused... just in wonderment!
|
|
|
|
|
I have a hard time believe that it is real...
"The only place where Success comes before Work is in the dictionary." Vidal Sassoon, 1928 - 2012
|
|
|
|
|
I don't see the problem Just disable the dev tools on the login page so no-one can see the api call.
|
|
|
|
|
I especially liked the
<!-- Yeah buddy, that's the biggest issue here...
"Five fruits and vegetables a day? What a joke!
Personally, after the third watermelon, I'm full."
|
|
|
|
|
That was a comment from QA. Too much code in one file.
"It is easy to decipher extraterrestrial signals after deciphering Javascript and VB6 themselves.", ISanti[ ^]
|
|
|
|
|
This reminds me of iSpy! ...or it reminds me of an instructor who's trademark was every test had a 'find 10 things wrong with this code block' question.
"Go forth into the source" - Neal Morse
|
|
|
|
|
Open Data is the logical extension of Open Source
It does not solve my Problem, but it answers my question
modified 19-Jan-21 21:04pm.
|
|
|
|
|
Someone went to a coding-bootcamp, and was so great at his work his code needn't be reviewed
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
"If you just follow the bacon Eddy, wherever it leads you, then you won't have to think about politics." -- Some Bell.
|
|
|
|
|
Here's my fantasy rewrite of some Javascript.
Which one do you find more understandable? Which one's function and structure is more instantly obvious? Be honest.
JS
var home = {
cit : "Boston",
get City () {
return this.cit;
},
set City(val) {
this.cit = val;
}
};
Fantasy Rewrite
home
City 'Boston'
That's sort of what i'm looking for. Notice the lack of punctuation. Notice judicious use of whitespace as syntax. Notice how the getter, setter, variable, and default value are all encapsulated into two words.
What language is like that?
What's "Human understandable"?
I mean, easy to understand at a glance.
Here's Game of Life in APL. Extremely concise! And totally NOT human-understandable.
{≢⍸⍵}⌺3 3∊¨3+0,¨⊢
Here's the Whitespace language. Extremely concise, and totally NOT human-understandable. Seeking characters found on a normal keyboard.
By "human-understandable", i DON'T mean "natural language" or "sounds like spoken English". I mean, provided you have learned the special programming syntax, and that learning that syntax is no more challenging or time-consuming than learning, say, Python.
What's "Concise"?
Here's some COBOL. Very human understandable. But not concise:
ADD YEARS TO AGE.
MULTIPLY PRICE BY QUANTITY GIVING COST.
SUBTRACT DISCOUNT FROM COST GIVING FINAL-COST.
What's "Practical"
By "practical" i mean, it's a wise choice for real-world programming. Ie, not just an academic experiment. It has community, tools, rich programming features.... things a language needs to be usable for real projects.
|
|
|
|
|
I wold go with some Lisp dialect. It looks weird until you get used to it, then all other languages look hard to understand.
The reason I found it easy is because the grammer is so simple there's really not much to learn.
|
|
|
|
|
Smalltalk has similar properties - the syntax literally fits on an index card.
"If you don't fail at least 90 percent of the time, you're not aiming high enough."
Alan Kay.
|
|
|
|
|
BASIC.
The only problem with any of the modern BASIC variants is the the name.
It should have been changed years ago to something that sounds better.
BASIC is the direction that programming languages should have been taking for decades.
A programming language is a tool. A tool is something that makes work easier.
C, Java and the like make simple jobs complicated, and complicated jobs - well, we won't go there.
Unfortunately BASIC has been all but killed off because it scared the crap out of the C guys.
VB was arguably one of Microsoft's biggest successes - suddenly anyone smarter than a manager or an accountant could write useful programs. They weren't always fast, or efficient, but they solved real world problems, then and there.
And here lies one of the less understood issues with software - many, many programs are written as quick one offs to answer a question, or extract some data. They do not need the .NET framework or the latest C++ or Java support libs, or some horrendously expensive and complicated Studio Suite to create them
BASIC was able to do this AND produce high quality complicated full fledged applications.
And it still can.
My favourite is PowerBasic -
PowerBASIC[^]
There are a few others.
It seems to me that all the 'new' languages we see are based on C syntax.
A whole bunch of cryptic punctuation marks interspersed with some unreadable, unintuitive bits of code.
It's time to move on. C was never meant to last this long.
It was an interim replacement to FORTRAN, until the 'new' languages came along. Sadly they never did.
|
|
|
|
|
Up-vote for the comment on 'C'-style syntax (looking at you C#), but disagree about BASIC - way too wordy for it's own good.
It's all down to horses-for-courses really, isn't it?
But a programming language for (semi) non-programmers to do actual work (you know, get stuff done, at work) needs to have reasonably transparent syntax and not be cluttered with the kind of stuff systems programmers and computer science professors deem 'essential' for 'clarity' and nerd-'beauty'.
OK, apologies to systems programmers - their criteria are very different from the request in the original question...
I think the reason Python has become so popular (apart from fashion?) is that it does allow non-programmers to quickly grasp the essentials and actually do stuff - and if they need to then do more complicated stuff, it allows them to do that as well in a natural progression?
And because it's (slightly) less verbose that BASIC it makes it more human-readable(?)
It's a toughy...
|
|
|
|
|
Bravo!!!
Steve Naidamast
Sr. Software Engineer
Black Falcon Software, Inc.
blackfalconsoftware@outlook.com
|
|
|
|
|
|
Member 14564709 wrote: Unfortunately BASIC has been all but killed off because it scared the crap out of the C guys.
i like your thinking. Plz check out my git.
https://github.com/contextual-project/contextual.js/wiki
|
|
|
|
|
Hello,
The question must be looked at from several perspectives.
I would start by saying that if you give me 3 sliders to grade "practical", "concise" and "human readable", there is no way you will reach 100% on each, I would argue that not even an 80-80-80 is possible.
Everything is a trade-off, and you will sacrifice in one area because there are things you definitely want to keep in another, and those things have a cost. It is up to you to decide which area you want to favor. Or rather, which language you want to support based on your style as a programmer.
Then comes the question of the language's purpose. One should not compare a system language vs a scripting language for example. By nature, they have different purposes, have been build to solve different issues. One is compiled, the other is interpreted, and like it or not this has an impact on its design.
Each area you suggest deserve its own debate, almost.
"Human readable" for example. In your example, I would not want a very long hash table to be described without any special character. In the real world, large XML or JSON files are a reality. Imagine those without anything to identify what goes where. Tab separated ? or indentation dependent ? I personally think Python is an abomination for that reason alone, but there I am going against the majority, so let's avoid waking up the beast
But you see, right here, by giving more focus to "human readable", you have already lost in practicality. Trade-off as I said.
"Practical" : you mentioned "it has community, tools, …" => well those things are not the language itself, and they do not make it practical. The language itself should be self sufficient, you want to compare apples with apples. The fact that a language has a huge community is just showing its popularity, not its intrinsic worth.
If I look at my own experience in scripting languages, I have done many, and I firmly believe that the best of them is Lua, but the world favors Python. So which is more practical ? Probably Python if you look at the community and tools, but I think it is Lua for the human-readable part.
As for conciseness, I think it is not really the biggest problem. At some point, you have to tell the computer what to do. The real question is how much you want to work to get there. The real question is : "how much work should be accomplished by the programmer and by the compiler ?"
If it is hard to write, it is probably easy to parse (think C++).
If it is easy to write, it is probably hard to parse (think any high-level language).
I am still dreaming of a language that is as powerful as C++ but as easy to write as Lua.
|
|
|
|
|
Fred2834 wrote: I would not want a very long hash table to be described without any special character. In the real world, large XML or JSON files are a reality. I would. If i had to enter/edit the data manually, then i would want a long hash table to be described without any special character.
I had to achieve exactly that with a new Javascript tool i created. I had to figure out a way to store human-editable data in html -- ie, plain text. So, no formatting, no tabular display.
Here's my solution. It uses no special characters at all, no tags, and unlike XML/JSON the fieldnames aren't repeated for every record. I find this quite readable. It's optimized for low-risk editing. There are no syntax to screw up or special symbols to put in the wrong place, no punctuation to get wrong. And it's far less laborious without having to type all those tags or braces.
<mt-records hidden id="tattooists">
NAME
LINK
DESCRIPTION
Genevieve Dupre
https:
This isn't what you expected.
Joey Armstrong
https://thunderhandtattoo.com
The most amazing.
</mt-records>
GitHub - johnaweiss/HTML-Micro-Templating: Lightweight, robust HTML templating system.[^]
Granted, this would quickly become unwieldy with a lot of fields. The solution above isn't intended for data with a ton of fields.
But if i had a lot of fields, then i wouldn't be manually editing raw data in plain text format. Dude, why are you doing that?
XML/JSON are best suited for machine manipulation, not human reading/editing. But this thread is about human readable languages, not machine languages. So i'm unclear how your XML/JSON contradicts my desire for human-readable code.
https://github.com/johnaweiss?tab=repositories
modified 9-Dec-22 14:12pm.
|
|
|
|
|
The major problem with your idea is "Human understandable"
you didn't define the audience, and saying "everybody" is not the answer.
my old mother trying to use a DVD player - one with not that many buttons:
"how do I make it go"
"press the 'Play' button."
"you mean this one '|> Play', with a triangle on it."
"yes."
"what does the triangle mean?" and that's not even adding in complications of her first language being English.
Let's look at your concise [anti] example
ADD YEARS TO AGE.
MULTIPLY PRICE BY QUANTITY GIVING COST.
SUBTRACT DISCOUNT FROM COST GIVING FINAL-COST. ahh the layman says, I see.
but then the accountant
it's all wrong, you've mixed up terms, "'cost' is purchasing, 'price' is selling." "price times quantity is selling price, not even 'nett cost' let alone 'cost'"
understandable to some, an abject failure to others, even the programmer and his audience spoke a different language - probably should fire the project manager for that stuffup.
Consider the image they placed on the Voyager space probe: the guy/gal in a circle with arms and legs stretched out in a circle - supposedly according to experts 'understandable' by anything that finds it. There's people on Earth, the very concept it's meant to represent that look at that and scratch their heads.
Early explorers would encounter 'natives [perhaps chanting] and shaking their spears'
- in some cases it meant 'go away, this is our [special] place, any closer we will attack'
- in others 'welcome strangers [yes we have weapons but we are choosing not to use them so be nice]'
Sorry, but "Human Understandable" is not possible, not without defining/limiting the audience and even the language.' Does say a Lithuanian farm hand that's never gone outside know what 'city' means? Even pictures don't help, how long were Egyptian hieroglyphs - pretty plain to the people of the time of writing - undecipherable before the Rosetta stone was found?
short answer is: it's impossible
pestilence [ pes-tl-uh ns ] noun
1. a deadly or virulent epidemic disease. especially bubonic plague.
2. something that is considered harmful, destructive, or evil.
Synonyms: pest, plague, CCP
|
|
|
|
|
Quote: The major problem with your idea is "Human understandable"
you didn't define the audience
But i did define it:
Quote: By "human-understandable", i DON'T mean "natural language" or "sounds like spoken English". I mean, provided you have learned the special programming syntax, and that learning that syntax is no more challenging or time-consuming than learning, say, Python.
The audience is people who have learned the special programming syntax.
|
|
|
|
|
It won't be the most concise, human-understandable and practical language but Dart sure is very concise, for a statically typed language, dropping a lot of the oop cruft that languages such as c# or java have
abstract class Item {
use();
}
class Chest<T> implements Item {
List<T> contents;
Chest(this.contents);
use() => print("$this has ${contents.length} items.");
}
class Sword implements Item {
int damage = 5;
use() => print("$this dealt $damage damage.");
}
main(){
var chest = Chest([Sword()]);
chest.use();
for (var item in chest.contents) {
item.use();
}
}
It drops public and private in favor of using "_" before private instance variables, doesn't require the new keyword, has a very concise (and imo clear) function definition style and a constructor definition that can't be made slimmer without impacting heavily on understandability.
Regarding
| Notice the lack of punctuation. Notice judicious use of whitespace as syntax.
(how do you quote text? )
Yeah, no, as you can see there is a lot of punctuation and whitespace is basically meaningless
For the practicality of this language... outside of Flutter, not much, honestly.
I find it to be very neat but it isn't going to replace js any time soon
Edit: the code is taken more or less literally from the examples on dart.dev
modified 18-May-20 3:09am.
|
|
|
|
|
Lorenzo Bertolino wrote: (how do you quote text? )
Select the text in the original message and click the "Quote Selected Text" button.
Or paste the text into the "message" box and select "Quoted Text" in the pop-up.
Or, if you want to do it the hard way, type the blockquote markup around the quoted text:
<blockquote class="quote"><div class="op">Quote:</div> Quoted text goes here...</blockquote> Quote: Quoted text goes here...
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
Just pick C#, whatever your intentions.
5 years of working with high school graduates, and that's the one with the lowest learning curve on average.
At a glance, here are definitely more concise and human readable languages out there (lolcode is a nice example) but they all come at the cost of a much higher learning curve and very limited functionality.
Notice the lack of "or" in the previous sentence. 🙂
|
|
|
|
|
I was doing Windows programming in C++ for several years before switching to C#, learning many of its small advantages over C++ as I went along.
After a number of years with C#, I was going to pick up an old private hobby project in C++, and learned one huge advantage of C# over C++ that I had never realized before: The amount of red tape in C++! You spend an unbelievable amount of code lines on setting up and and initializing things, header files, declarations of all sorts. Module interfaces are handled by VS in a "database" (I grew up with ACID, so I put the term in quotes ) rather than header files. Sure, if you go behind the curtain, you will see that VS and WPF do very similar things, but they do it for you!
A number of small things are done for you as well, such as heap management. I started using VS when switching to C#; my old C++ project was sprinkled with lint directives (i.e. lint comments) all over, cluttering up the source files. With VS and C# I never missed Lint, there was no need for it. So I could drop lint from my C++ code as well, couldn't I? But VS Intellisense doesn't work half as well with C++ as with C#, much due to the far less controlled use of pointers in C++.
So rather than fixing up and completing my old C++ code, I deleted several hundreds of lines, a good bunch of header files, brushed out the heap management code and adapted the remaining code to C# standards. I never looked back.
With C++, so much of my attention, and so many source lines, are wasted on things that are not solving the real problem; it is just red tape to facilitate the problem solution part. For C#, this is far less prominent.
Certainly, C# has inherited from C/C++ a number of elements I wish it had not. (An example: Why do we have to announce in advance with a "try" that the block has an exception handler? The handler is there, that should be enough!) Some of it may be ascribed to the old single-pass parsing ideals, but today there is no reason to accept such limitation. I can live with it, but it is ugly. But if I have the choice, I will not live with all that other required C++ blurb that really does nothing towards solving the problem at hand.
|
|
|
|
|
Member 7989122 wrote: Why do we have to announce in advance with a "try" that the block has an exception handler? The handler is there, that should be enough!
CallSomeMethod();
try
{
CallSomeOtherMethod();
}
catch (SomeFunkyException)
{
} Without the explicit try , how would you indicate that the first method call wasn't covered by the catch block?
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|