Introduction to Ruby (from other languages)

[Introduction]

Yes. Weekly output time. I'll leave the PlayFramwork app for a moment and output about Ruby that I read and read on weekdays.

By the way, the reference books used are as follows. An introduction to Ruby for professionals From language specifications to test-driven development and debugging techniques (Software Design plus series)

People who can PG using another language as a target, If you start using Ruby for your next job, that's the match. In my case, I highly recommend it as if it were a great match and a crisp pair pro. What is if? What is for? Methods are not recommended for classes.

The author says that this alone will give you the minimum necessary knowledge in the field, so believe it and call it for output.

[About the environment]

When you want to do it from another language, for example, you can't use Ruby unless you install the JDK in JAVA. There is a difference in the introduction depending on the OS, but I picked up the one that seems easy to investigate.

Linux ⇒ Use OS standard Ruby. Windows ⇒ Use Ruby Installer.

Regarding the OS difference, it looks like this, when I recognized Ruby, it felt like a Linux-only machine, but it seems that the installer came out and started working on windows. By the way, in the case of windows, there is another way, which is as follows.

-Install and use the Linux OS in the virtual environment. -Use AWS Cloud9.

By the way, I remember that the mainstream of virtual environment was to install the OS by dividing the HD area in the old days, but recently there is a virtual environment, such as VirtualBox, VMware, and so on. If you are interested, you can find out and it will help you to expand your knowledge.

Roughly speaking, it means that you can install the OS on the software. It's like the software does the old-fashioned way of separating the HD area and installing the OS, and if you want to do Ruby firmly but only have a windows terminal, you don't want to deal with various languages. I recommend the method. Besides Ruby, the server is almost Linux, so you need to get used to handling Linux.

For those who want to speak various languages, the method using AWS Cloud9 is recommended. Cloud9 is an IDE that can be used just by connecting to the cloud, and it can run not only Ruby but also Java, C and html. If it is a terminal managed by the company, administrator authority is required when installing something, and the development environment is not ready! Recommended for those who like it. The disadvantage is that it is completely English, so I think some people will struggle.

So, this time I used Cloud9 considering the future. By the way, Cloud9 can easily introduce rails.

[Ruby-specific memo]

First of all, Ruby is dynamically typed, and unlike Java, it throws an error when it is run. Java shows an error when compiling, and that's why eclipse throws a deficit.

Below, I will summarize it roughly to recognize the difference, although it may be slightly different, it seems that you do not have to remember the essence by mapping it with the existing knowledge. Actually, I hit the source on AWS, so I wanted to put it on ...

・ All objects ⇒ Any method will be attracted. -There is nil instead of null ⇒ It is convenient to use nil like false in the judgment process that seems to be slimy with java -Very flexible handling of arrays. You can compare arrays that can handle even character strings like arrays. ・ Hash ⇒ JAVA MAP -Symbol ⇒ It's like making a variable an index number. Processing can be made smart by using a hash key. ・ Block ⇒ Flexible version of extension for in java ・ Constants have to be frozen ⇒ Static final in JAVA doesn't solidify only with magical sentences. Moreover, if you do not solidify the elements, it will be loose -Module ⇒ Use something like a library in java, include or extends. ・ Self ⇒ static feeling

Read about two-thirds and pick up the digest. Of course, in addition to this, there are examples so that you can follow the details of the explanation, so it is recommended to purchase a reference book. Up to here for this time

[Impression that I did a little]

The reference book I chose was excellent, so I can proceed quite quickly. You can enjoy programming with! The writing pattern and flexibility are amazing according to the idea. I think this is a great merit. On the contrary, I think it is a disadvantage that there are too many writing patterns. There is a refactoring phase in the middle of the reference book, but I think that the difference in code between experienced and beginners will be noticeable. The larger the scale, the more different the writing style will be, so it will be difficult to adjust the awareness of the meeting rules.

【Finally】

I think that engineers always have a catch-up life, but it's quite difficult when there is a wide range of jobs and when it overlaps with job change activities or work ... I have something to think about while changing jobs, and I'm doing Java ⇒ I think that there are companies that are looking for Java, but minor languages may be rude, but people who have experience in that language meet in the first place I thought it was difficult. I wonder if there are many people who need to catch up and change their skills in another language.

Recommended Posts

Introduction to Ruby (from other languages)
Introduction to Ruby 2
Ruby from the perspective of other languages
From Java to Ruby !!
[Ruby] Introduction to Ruby Error statement
Introduction to Ruby processing system self-made
From introduction to usage of byebug
Introduction to Ruby basic grammar with yakiniku
[Ruby] From the basics to the inject method
Introduction to monitoring from Java Touching Prometheus
I tried to build Ruby 3.0.0 from source
From terminal to Ruby (standard input / output)
Introduction to web3j
Get started with "Introduction to Practical Rust Programming" (Day 4) Call Rust from Ruby
[Java] Introduction to Java
Introduction to migration
Introduction to java
Introduction to Doma
Sample to create PDF from Excel with Ruby
[Ruby] How to convert from lowercase to uppercase and from uppercase to lowercase
[ruby] How to receive values from standard input?
[Introduction] Try to create a Ruby on Rails application
Introduction to JAR files
Changes from Java 8 to Java 11
Sum from Java_1 to 100
Migrate from JUnit 4 to JUnit 5
Introduction to programming for college students (updated from time to time)
Introduction to bit operation
Introduction to Ratpack (6) --Promise
Introduction to Ratpack (9) --Thymeleaf
[Updated from time to time] Ruby on Rails Convenient methods
Introduction to PlayFramework 2.7 ① Overview
Introduction to design patterns (introduction)
Introduction to Practical Programming
Introduction to javadoc command
Introduction to jar command
Introduction to Ratpack (2)-Architecture
Ruby Regular Expression Extracts from a specific string to a string
Introduction to lambda expression
[Beginner] How to use devise Change settings from introduction
Introduction to java command
Introduction to RSpec 2. RSpec setup
[Ruby on Rails] From MySQL construction to database change
Introduction to Keycloak development
Introduction to javac command
From 0 to Ruby on Rails environment construction [macOS] (From Homebrew installation to Rails installation)
<Dot installation> Introduction to Ruby on Rails5 Source code comparison
From Ruby on Rails error message display to Japanese localization
What I did in the version upgrade from Ruby 2.5.2 to 2.7.1
[Rails] Integration test using Capybara (from introduction to simple test execution)
Introduction to Parallel Processing + New Parallel Execution Unit in Ruby Ractor
Prevent other users from going to the post edit screen
Try Spring Boot from 0 to 100.
Migration from Cobol to JAVA
Switch from slim3-gen to slim3-gen-jsr269
Moving from AWS to PaizaCloud
Introduction to RSpec 5. Controller specs
Introduction to RSpec 6. System specifications
Introduction to Android application development
Try using Cocoa from Ruby
Introduction to RSpec 3. Model specs