PROGATE recommended in Rails Tutorial
In the Rails tutorial, we have also prepared a course where you can learn the basic knowledge of the Web in Japanese in partnership with the programming learning service "Progate" for beginners. This service is especially suitable for people who have no programming experience because it does not require environment construction and allows you to experience coding on a browser. Of course, you can continue reading this tutorial as it is, but If you find it "difficult" to read, we recommend that you try to learn the basic knowledge in the course indicated by "Related" in the text. If you have little programming experience, we recommend starting with Progate's Ruby on Rails before reading the Rails tutorials. Quote: Rails Tutorial Chapter 1
Progate is a repetition of "read the explanation slide" ⇒ "write the code". I have used it, but it is very easy to understand and it is easy to challenge. It's definitely worth 980 yen a month.
However, personally, I recommend that you proceed to Chapter 4 first.
Maybe it ’s because I have learning experience, Of all the things I've learned so far, the Rails Tutorial Chapter 4 Rails-flavored Ruby was the easiest to understand. As was the case with Progate, When the concept of object-oriented comes out, it feels like (.´ ・ ω ・)? Why do you write this? I was wondering, but I couldn't help but remember the code and it was incomplete combustion. This time, I finally found out why I did the Rails Tutorial and wrote it in an object-oriented way.
#STEP1:Display of character string|The string must be""(Double quotation)Or''(Single quote)Surround with|
puts ("Hello World") :Puts are automatically broken(I use this one more often)
print ("Hello World") :Print does not break.
#STEP2:Understanding variables 1|Variables are temporarily stored in a box|
a = "Hello World"
print(a)
-> Hello World
#STEP3:Understanding variables 2|Of course, numbers are also included|
a = 3
#STEP4:Understanding variables 3|Only one can be stored & the last data entered is stored|
a = "Hello World"
a = "Hello Japan"
puts(a)
-> Hello Japan
#STEP5:String manipulation| +Combine strings using|
a = "Hello"
b = "Japan"
puts(a + b)
-> HelloJapan
puts(a +" "+ b)
-> Hello Japan
#STEP6:Array 1|If you want to put multiple things, use an array|
a = ["Hello World", "Hello Asia", "Hello Japan"]
puts(a)
-> ["Hello World", "Hello Asia", "Hello Japan"]
puts(a[0])
-> Hello World
puts(a[1])
-> Hello Asia
puts(a[2])
-> Hello Japan
#STEP7:Array 2|Add things to the array|
a = [] #This makes an empty array
a.append("Hello World")
a.append("Hello Asia", "Hello Japan")
puts(a[0])
-> Hello World
puts(a[1])
-> Hello Asia
puts(a[2])
-> Hello Japan
#STEP8:hash|Named array|
user = { "name"=>"Michael Hartl","email"=>"[email protected]" }
puts(user)
-> { :name=>"Michael Hartl", :email=>"[email protected]" }
puts(user["name"])
-> "Michael Hartl"
puts(user["email"])
-> "[email protected]"
#STEP9:Hash 2|There is more than one notation ...|
user = { name:"Michael Hartl", email:"[email protected]" }
puts(user[:name])
-> "Michael Hartl"
puts(user[:email])
-> "[email protected]"
#STEP10:Combined hash and array technique|I often use it like a matryoshka doll|
user_data = []
user = { name:"Michael Hartl", email:"[email protected]" }
user_data.append(user)
puts(user_data)
-> [{:name=>"Michael Hartl", :email=>"[email protected]"}]
user = { name:"Michael Jacson", email:"[email protected]" }
user_data.append(user)
puts(user_data)
-> [{:name=>"Michael Hartl", :email=>"[email protected]"}
{:name=>"Michael Hartl", :email=>"[email protected]"}]
puts(user_data[0][:name])
-> "Michael Hartl" #In the 0th array"name"Take out
#STEP11 length method|Returns the number of characters / the number of contents in the array|
a = "length"
puts(a.length)
-> 6 #Returns the number of characters
user_data = [{ name:"Michael Hartl", email:"[email protected]" },
{ name:"Michael Hart", email:"[email protected]" },
{ name:"Michael Har", email:"[email protected]" },
{ name:"Michael Ha", email:"[email protected]" }]
puts(user_data.length)
-> 4 #Returns the number of hashes contained in the array
#STEP:Loop processing|Use each often|
user_data = [{ name:"Michael Hartl", email:"[email protected]" },
{ name:"Michael Hart", email:"[email protected]" },
{ name:"Michael Har", email:"[email protected]" },
{ name:"Michael Ha", email:"[email protected]" }]
user_data.each do |user|
puts("name: " user[:name] + "mail address: " + user[:email])
->name:Michael Hartl Email Address: [email protected]
->name:Michael Hart Email Address: [email protected]
->name:Micheal Har Email Address: [email protected]
->name:Micheal Ha Email Address: [email protected]
#Let's understand the contents of the process(^_-)-☆
1 user_The first line of data|user|Store in the variable user defined in
#user = { name:"Michael Hartl", email:"[email protected]" }Enters.
2 puts("name: " user[:name] + "mail address: " + user[:email])Shaped and displayed
#name:Michael Hartl Email Address: [email protected]
3 .Each is a method that repeats until there are no more arrays
for sentence ...? while statement ...? I don't see much. Someone has created an each method using a for statement or the like. When I learned programming when I was a student, I used a for statement to describe the process of extracting one by one. It's convenient thanks to each method, but you can't see the actual processing content, right? I think this is the cause of the haze. On the other hand, if you can understand complicated processing (^ ω ^) ... Since the processing is complicated, I'm really grateful that it can be used quickly with convenient methods.
Progate is a repetition of "read the explanation slide" ⇒ "write the code". It's very easy to understand, so I thought it was worth 980 yen a month. What I learned with Progate is HTML / CSS / Python / JavaScript / jQuery.
After studying at Progate, you will learn how to write code. You will reach a level where you can create a static website or a website with a little movement.
Nice single page site 1 that can be used as a reference for design If you really do your best, you can create a nice static website.
Even so, there are some parts that are not knowledgeable if only Progate is used.
When I tried to make something, I didn't have enough knowledge ... There is a lot of information, so what should I do to make it chaotic? That's right. I think the best environment is one where you can listen to people who are familiar with what you want to make.
Recommended Posts