DEV Community

Is coding a lenguage like english or portuguese?

Jana on October 23, 2020

Hello, my name is Jana and I am new here. I have never wrote a code in my life and I'm doing a very very very basic course to see if that is somet...
Collapse
 
jmfayard profile image
Jean-Michel πŸ•΅πŸ»β€β™‚οΈ Fayard • Edited

Hello, I'm a polyglot and a programmer and I find that there are lots of common points:

  • both have a grammar - for a programming language that's the syntax
  • both have a vocabulary - name of functions, APIs, ...
  • once you know one foreign language / programming language, learning one more is way easier
  • both are used to express yourself
  • both only makes sense if you can write in a way that is clear and understandable for others
  • both are shaped by how the community use it - you have design pattern, "idiomatic" way of writing things, ...
  • both are best "learned by doing" - sitting at school is way less efficient than opening your mouth and speaking in the street, just like if you don't build a project, you will forget soon what you have "learned"

One big difference is that programming languages are much easier to learn than human languages. Programming languages were designed to be easy to learn, consistent. They don't have tons of irregularities.

With the possible exception of JavaScript among programming languages and Esperanto among human languages :P

Collapse
 
kallmanation profile image
Nathan Kallman

Computer languages also come in "families" like human language. Just like Spanish, Italian, and French are all "Romance" languages and have similar grammar, because they all originated from the same Latin root; languages like Java, C#, PHP all read similarly, because they all were majorly inspired by the earlier C language.

And like those romance languages are totally different from oriental languages; those three languages appear totally different from languages like Haskell and Lisp.

Collapse
 
jana profile image
Jana

Thanks! This link between the origin of lenguages helps a lot my understanding of it :)

Collapse
 
jana profile image
Jana

Thank you so much for this complete analysis!
It's awesome to know that makes sense to relate one to another because i was always told and therefore told myself that science is hard and lenguages are easy. Now I can see the other way around and it makes me feel more confident :)
Thanks

Collapse
 
offirmo profile image
Offirmo • Edited

Hi Jana, I would rather compare a programming language to a recipe:

  • add 700g of flour
  • add 2 eggs
  • mix until smooth
  • etc.

Since this recipe will be read by a robot, it must be "flawless". For example, if you make a typo "700g of flor" the robot won't get it and stop.

Similarly, if you make an obvious mistake like "700 kg of flour", the robot won't catch it and attempt to do it anyway.

Collapse
 
jana profile image
Jana

You won my heart with this!
And i was thinking about it when I was translating some recipes and i thought how precise you need to be in both ;) thanks

Collapse
 
offirmo profile image
Offirmo

Glad it helped! Programming is really great!

Collapse
 
anja profile image
Anja

Hey I can recommend the app Sololearn to get an impression about different programming languages.

Collapse
 
khangnd profile image
Khang • Edited

Agree, SoloLearn is a great platform :)

Collapse
 
jana profile image
Jana

Thanks Khang :)
If it teaches me to do a cool personal site like yours I'll be happy ;)

Thread Thread
 
khangnd profile image
Khang

You will do it cooler, not just like mine πŸ˜‰

Collapse
 
jana profile image
Jana

Thank you! I'll try it :)

Collapse
 
siddharthshyniben profile image
Siddharth

They are similar, as in programming is like a chat to the computer. Here's a sample:

  • You: Declare the variable x to be 10;
  • Computer: OK
  • You: Now, add a random number to x, and put it in the variable y
  • Computer: OK

The computer is very strict about your language, ie. If you make a typo, the computer will throw an error:

  • You: Dclre the variable x to be 10;
  • Computer: Error!

There is also more to code, like functions (similar to functions in math):

  • You: Declare a function called add, which takes two numbers, adds them, and returns them back.
  • Computer: OK
  • You: Declare x to be the value of calling the add function with 1 and 2
  • Computer: OK (x will be three)

So you can consider programming a superset of languages? Maybe, I'm not sure.

There is much more to know, but this should give you a basic idea about this.

Collapse
 
divinopudim profile image
Dial J For Jorge

I would say that the comparison between what you called "street style" and "formal" would go better whith the concepts of "clean" and "dirty" code.

Collapse
 
jana profile image
Jana

Pode crer! Mas me diz uma coisa, a linguagem de backend Γ© mt diferente do front?
Que vc acha?

Collapse
 
divinopudim profile image
Dial J For Jorge

EntΓ£o, como eu ainda sou um estudante, eu nΓ£o posso falar com 100% de certeza. Eu diria que depende. Javascript, por exemplo, serve para os dois. Mas uma coisa pra se ter em mente Γ© que linguagens de programação sΓ£o muito parecidas, o que vocΓͺ vai ver sΓ£o pequenas diferenΓ§as na sintaxe.

Thread Thread
 
jana profile image
Jana

Hummmm massa! Obrigada :)

Collapse
 
jana profile image
Jana

It helped a lot!
Now I can see the difference of both uses of code more clearly. And now I really want to learn java :)
Thank you!

Collapse
 
lucioeiras profile image
Diego Eiras

IncrΓ­vel ver mais brasileiros por aqui! Sucesso, Jana!

Collapse
 
jana profile image
Jana

Valeu Diego!
TΓ΄ muito no comecinho de tudo, espero que a jornada seja tΓ£o legal quanto usar essa rede ;)

Collapse
 
jwp profile image
John Peters • Edited

Yes coding is exactly like learning a language. I written about this here.. dev.to/jwp/why-do-some-believe-typ...

Collapse
 
jana profile image
Jana

Your article is amazing John, thank you!
It gave me a lot to research for, like the history of programming languages.
And I don't trust or like Microsoft either lol
Thank you!

Collapse
 
gvsakhil profile image
G.V.S Akhil

U want to learn the frontend or backend?

Collapse
 
jana profile image
Jana

Front-end at first and then backend.
If I don't use backend on daily basis at least I want to know how it works...

 
jana profile image
Jana

Thank you! This community is so open and warm to newbies that I certainly will not feel embarrassed to ask for help :)

Collapse
 
jana profile image
Jana

The video really connected the dots in my head, very helpful! I already know khan academy, I'll try something there :)