Reintroduction to Java for Humanities 0: Understanding the Act of Programming

The learning speed of programming is really a problem

I heard that I learned Java in a school class but I don't understand it. This is an article that reminds me of the results of daily anguish about why I stumble in the early stages of a programming language. I hope it helps students who have started learning programming but honestly don't understand at all. The text has become longer than I expected.



Hello World The first thing we touch on in many language samples is this process of "outputting a character string". Somehow, I remember that the expression "outputting a character string" was rigid, or that the first impression was "somewhat high-pressure sentences."

public class HelloWorld {
	public static void main(String[] args) {
		System.out.println("Hello World");

I think there are a lot of samples like this in the streets.

Who is the subject of the program

Not limited to the Java language, the sentences that you encounter when learning programming are like "The output method of character strings is as follows." Or "Learn how to input and output files." There are many sentences. Certainly, the person who writes the code is the person who thinks "let's study now". I often speak this way myself. It's like "OK, let's use BlueTooth for a while today!" However, at the same time, I often see sentences such as "A program is an instruction to be sent to a computer." This is a sentence to clarify that it is the computer that actually runs the program. From this,

  1. Actively write instructions to the computer in a programming language
  2. If written correctly, the source file will be converted to a class file at compile time
  3. The program works as described in the class file = it works as instructed by the computer (it is a different matter whether it works as expected) I think that would be the case, but I suddenly thought that this was the largest and best groove.

System.out.println(String text) How many people actually get the program right with this code? What I felt was a faithful reproduction of the first touch of "I don't know what it is, but it works awesome yeah yeah yeah yeah". After that, I met many friends, and one of them, who I thought was the boss in my heart, said, "I didn't get any tension when the letters appeared on the terminal." My feeling that something moves is purely amazing is similar to a toy moving. When I was a child, I liked watching monkeys make strange sounds, ring cymbals, and shake their faces at stores, but I don't know what they are, but they are moving (what kind of thing). (Although I have a preference for movement), it seemed even more amazing because I didn't understand the principle, and I was excited. But that wasn't the impression that everyone felt. Maybe it's just a matter of "moving (doing something)". However, it is not difficult to imagine that if you do not come here suddenly, your motivation for learning will be lost. If I can find a way to break through this, I think I can learn programming with Tension MAX from the beginning. I usually try to give lesson samples that are as enjoyable as possible, but that's another story. This time, I'm trying to find out how to tell people who don't come to the program what the program is like.

Digression: Those who start studying start without permission (advance without permission)

It seems that some people have this kind of recognition. Perhaps this means that I've been doing it all the time since I was scared when I tried it. And such people are generally more motivated to learn about the program. Because "bibi" is already coming. The question is how people who aren't freaking out face programming and how they can get a good understanding of it. Ultimately, if you can't find value in what you can make as a result of learning programming, you won't be motivated to learn, but when you say that, you have no body or lid, so I'd like to do something about it. As a result, this sentence was born.

Is the programming language "word"?

The reason I like programming is that when I write it, the computer runs it, and there is a sense of unity in words. Natural language can be expressed in a variety of ways. I like to try and error the combinations because there are so many ways to express them, such as the order of words, the beginning and end of words, and the emotions when speaking. However, even though programming languages have inferior variations in expression to natural languages, there is a sense of unity that natural languages do not have (although it depends greatly on how they are written). Therefore, rather than knowing the meaning of the description, if I can replace it with the words I have used so far, or if I can map it, I think it will match humanities. And even among the people I have met, those who have (believed to be) high linguistic competence have the impression that the start of learning programming is smooth. A programming language is a human-created word for human use. However, I think it is quite different from the natural language that humans usually use. The usage is different. What can be expressed is different. But it's a word. I would like to start from this recognition.

"Hello World" again: The wall of technical terms

It's the beginning of learning, so I'm not sure about each part. However, you can confirm that the text inside "()" is displayed on the screen if the code moves. Even if it's a speculation that "apparently". And if you rewrite that sentence, the displayed sentence will change as well. The question is, "Can I put this extraordinary sentence into myself in a convincing way?"

Roughly writing Hello World in Japanese looks like

Anyone can use,A program called Hello World{
Anyone can use,Fixed process named main, (Congest a chunk of string data with the name args)Move{
Spit out with Java standard output, ("Hello World"Sentence)To;

Is it like this when I try to write it in Japanese? Unfortunately, the native language of the Japanese, what is called Japanese, does not match the major programming languages as a language form. Complementation in the brain is important. You will understand it by making full use of Apple's catchphrase-like inversion method. It is inevitable to try to understand the computer system because we cannot escape from the technical keywords, but human beings often cannot be verbalized without understanding the human social system, so we enter the town. Let's learn the word "follow the town".

Is it a problem to work with copy?

The extreme theory is "just move". However, I don't know what it is, but I think it's very dangerous to move. For Japanese people, it is possible to communicate with people who cannot speak Japanese only by gestures, but it is the same as the fact that it may be transmitted incorrectly depending on the cultural area of the other person, or it may not be transmitted. Language is established as a tool of communication only because of common recognition (the rule that "this is what it is"). I think that programming that skips that common understanding tends to be a rigid program with a one-to-one correspondence. When the one-to-one correspondence is reproduced in Japanese, I do not understand the common rule of the words "crane and turtle slipped" and "dog and cat slipped", and I remember it as a completely different and unrelated expression ( I think it's in a state of remembering). When you actually learned Japanese, you should have learned the words by imitating the people around you. You should have read the printed matter, touched on new words and sentences, and learned how to express them. In essence, learning is to understand the copy. However, what I think I should be careful about is that I am constantly comparing and correcting wrong expressions and words (such as saying "delicious" because I can't say "delicious" well). Does it mean that it is "noticeable"? Internally, I think it is the work of correcting the memory to the optimum (wording that seems to be correct compared to the surroundings) according to what you want to do (what you want to convey). It would not be a pure one-to-one memory. In order to "verbalize what you want to do," you may only be able to grasp patterns and remember the best words. As a premise, it is important to be in an active state where "what you want to do" is decided. However, programming works by copying. Even if you haven't been able to specify exactly what you want to do actively, if you search and copy it, "what you want to do vaguely" may move. When a toddler expresses anything "Wanwan !!", the words do not match, but what he wants to express is fixed. There is no problem if the "Wanwan" and the "Target you want to instruct" match, but if they do not match, the people around you have no choice but to imagine and match. And many people are kind, so they kindly say, "It's not one-on-one, it's Nya Nya." Computers can't move like that. The first language is learned through a tremendous amount of repetition and categorization and patterning because of this cleanliness. However, since the second and subsequent languages can operate one language poorly (I think), I feel inconvenience, and I think that this unclear rule and word is. Easily fall into. Since the people around me don't use it all the time, the amount of input is extremely small, and as a result, I think it makes me feel sad that it is "esoteric." Words are difficult to begin with. Communication in our words is possible with the help of the understanding of the people around us. But I don't think there are many people who think that they are not good at using Japanese. That's because the people around me are doing their best to understand their own words, but there are few opportunities to reflect on that. Most of the time, it ends up being filled with sad feelings that they don't understand. In programming, even if you point out grammatical mistakes, there is no follow-up to what you want to convey. As a result, our programs often do not reach the compiler or are misrepresented. Therefore, I think that it is necessary to understand what the copy and paste source is saying, and to have the skill (programming ability) to rewrite sentences as appropriate according to the state you want to convey and the person you want to convey.

It's different from natural language

I wrote it loosely in the previous section, but I will say that the learning style is different in the first place. I think many people learned natural language from words. I think that you will learn how to express emotions by repeating "dog!" And "cat!", And learn "expression methods" for connecting words, but programming languages should be natural language. It is something to wear with. Memories of repeating simple words are probably not very effective. This is because nouns in natural language are defined as variables by the person who writes the program, and methods are close to understanding the meanings of each other and adjectives. However, once I learned how to wear words first, I think that it is an obstacle that I can not get out of this feeling well. It seems that there are people who recognize that it is a word because it is separated by "." At the beginning of learning and try to learn it as a noun. Therefore, instead of "understanding and reusing the meaning", we learn with the same one-to-one correspondence as nouns, and as a result, the question "I don't know where to write what" pops up. I expect that what is important is the recognition of writing a program as a sentence.

Think of a programming language as a word that only considers making a "request"

People in areas that can handle programming languages and keyboards, such as their own limbs, may be asked "?", But I think that such a state may be a step in learning.


What I swore to my heart

Recommended Posts

Reintroduction to Java for Humanities 0: Understanding the Act of Programming
How to check for the contents of a java fixed-length string
Introduction to java for the first time # 2
About the procedure for java to work
Java Programming Style Guide for the Java 11 Era
Output of the book "Introduction to Java"
Practice of Java programming basics-I want to display triangles with for statements ①
Practice of Java programming basics-I want to display triangles with for statements ②
The story of learning Java in the first programming
[Java] How to get the authority of the folder
[Introduction to Java] Basics of java arithmetic (for beginners)
Java Welcome to the Swamp of 2D Arrays
[Java] How to get the URL of the transition source
How to write Scala from the perspective of Java
[For beginners] Quickly understand the basics of Java 8 Lambda
Initialization of for Try to make Java problem TypeScript 5-4
[Java] How to get the maximum value of HashMap
[Java] When writing the source ... A memorandum of understanding ①
Introduction to Java for beginners Basic knowledge of Java language ①
Java: Use Stream to sort the contents of the collection
How to execute WebCamCapture sample of NyARToolkit for Java
[Introduction to Java] List of things that got caught by the 14th day of programming
[Java] Beginner's understanding of Servlet-②
Get to the abbreviations from 5 examples of iterating Java lists
20190803_Java & k8s on Azure The story of going to the festival
[Java] Beginner's understanding of Servlet-①
Command to check the number and status of Java threads
From the habit of creating Value Objects for object-oriented understanding
[Java] To know the type information of type parameters at runtime
The idea of C # (lambda expression, for statement) to chew
[Java] Summary of for statements
How to derive the last day of the month in Java
A memorandum to reach the itchy place for Java Gold
The story of pushing Java to Heroku using the BitBucket pipeline
Be sure to compare the result of Java compareTo with 0
Aiming for a basic understanding of the flow of recursive processing
Input to the Java console
In order not to confuse the understanding of getters and setters, [Do not use accessors for anything! ]
The story of Collectors.groupingBy that I want to keep for posterity
How to get the contents of Map using for statement Memorandum
[Rails] How to change the page title of the browser for each page
The milliseconds to set in /lib/ of Java jre is UTC
From fledgling Java (3 years) to Node.js (4 years). And the impression of returning to Java
I tried to summarize the methods of Java String and StringBuilder
kotlin & Java: How to hide the toolbar only for specific fragments
How to get the length of an audio file in java
How to increment the value of Map in one line in Java
[Java] Delete the elements of List
[For beginners] Summary of java constructor
[java8] To understand the Stream API
[Java version] The story of serialization
Introduction to Functional Programming (Java, Javascript)
[Java] Input to stdin of Process
Welcome to the Java Library Swamp! !!
Introduction to Programming for College Students: Introduction
Step-by-step understanding of Java exception handling
Summary of object-oriented programming using Java
The origin of Java lambda expressions
By checking the operation of Java on linux, I was able to understand compilation and hierarchical understanding.
I want to display the number of orders for today using datetime.
The story of forgetting to close a file in Java and failing