koko

@koko2000

脱ニート

Joined on Feb 23, 2023

  • Goals vs. Achievements Manual Familiarity with Rakuten Travel QA Workflow (Hands-On Experience) [x] Compile a list of QA terms with a total of 200 words: My QA Internship Word List [x] Write test cases using PratiTest (PRD418.2) [x] Write test specs on Confluence (PRD586) [x] Report bugs on jira and create kanban [x] Understand TDD Workflow[x] Docs:[x] Estimation [x] Test Spec
     Like  Bookmark
  • :::info A compilation of essential vocabulary gathered during my internship at Rakuten, with a sum of 167. ::: Travel Word count: 7 Racco: Allow employees to reserve accommodations for business trips, with the associated fees being covered by their respective companies. Balloon: Incorporating JR into current platform. Current Platform: Japanese one Domestic Hotel (DH): Hotels within japan
     Like  Bookmark
  • 物件 = 狀態(名詞) + 行為(動詞) 在 Ruby 裡,幾乎什麼東西都是物件 那什麼不是物件?block 類別與實體 class and instance 定義類別 & 使用類別 class Cat # 類別的命名規定 = 必須是常數 def eat(food) puts "#{food} 好好吃!!" end
     Like  Bookmark
  • Intro Sinatra Sinatra其實也是一款 Rack 應用程式,Rack 是基底! Sinatra 與 Ruby on Rails:機車 vs 汽車 安裝 Sinatra $ gem install sinatra require 'sinatra'
     Like  Bookmark
  • Rack 是什麼? a Ruby Webserver Interface Rack Ruby 實作的網站伺服器介面。 規格 提供一個能夠回應 call 方法的物件,並且回傳一個包含以下三個元素的陣列: 1.HTTP 狀態(數字) 2.HTTP Header(Hash)
     Like  Bookmark
  • 發生情況 當我們試圖查找一條不存在的記錄時,會產生 ActiveRecord::RecordNotFound 例外。 這種情況通常發生在我們嘗試使用 find 方法根據 id 查找記錄時,而該id對應的記錄不存在。 @發生問題點 使用 begin / rescue 為了處理 ActiveRecord::RecordNotFound 例外,我們可以使用 begin/rescue 捕獲該例外,並在捕獲到例外時執行一些操作(例如顯示一個錯誤消息、重定向到另一個頁面) def find_burger begin @burger = Burger.find(params[:id])
     Like  Bookmark
  • # 切換到使用者的 home 目錄中的 project 裡的 namecards 目錄 # 這個 "~" 符號表示 home 目錄 $ cd ~/project/namecards/ # ls 指令可列出在目前目錄所有的檔案及目錄 # 後面接的 -al 參數,a 是指連小數點開頭的檔案(例如.gitignore)也會顯示 # l 則是完整檔案的權限、擁有者以及建立、修改時間: $ ls -al # 把檔案 index.html 複製一份成 about.html:
     Like  Bookmark
  • 開放類別 open class # 兩個同名的類別撞在一起不會覆蓋而是融合 class Cat def hello end end class Cat # 重複定義 def world end
     Like  Bookmark
  • Block 簡介 Block = 一段不會被主動執行的程式碼 5.times do |i| puts i end p (1..100).select { |n| n.odd? } 1.upto(10) { |n| puts n } do .. end 與 { } 兩種寫法
     Like  Bookmark
  • 模組化 把程式碼寫在不同檔案 require 只會載入一次 load 每次執行就載入一次 require './calculators.rb' # 引入 load './calculators.rb' # 載入 require './calculators' # 可以不用接.rb load './calculators' # X 找不到,必須明確指出完整檔名 load './calculators'
     Like  Bookmark
  • 使用方法 def say_hello_to(someone) puts "Hello, #{someone}" end say_hello_to('孫悟空') # 印出 Hello, 孫悟空 say_hello_to('魯夫') # 印出 Hello, 魯夫 參數與引數 parameter vs argument 一個蘿蔔一個坑
     Like  Bookmark
  • CI/CD 平台比較 Jenkins GitLab 一條龍 起手式 建立 .gitlab-ci.yml 新增 Pipeline Job # JOB helloworld:
     Like  Bookmark
  • 環境安裝 安裝 stable 版 node.js 有出現版本號表示正確安裝:$ node -v 常用指令 # 安裝套件包 $ npm install 套件包名稱 # 所有的 package 套件包都是小寫 $ npm install jquery
     Like  Bookmark
  • :::info 參考:Hash 官方手冊 ::: 建立 Hash # 使用 Hash 類別 a = Hash.new # 使用大括號 b = {}
     Like  Bookmark
  • 範圍 Range puts (1..10).to_a # 印出 1 ~ 10 puts (1...10).to_a # 印出 1 ~ 9 (1..10) # 範圍 1 ~ 10 ('a'..'z') # 範圍 a ~ z ('A'..'Z') # 範圍 A ~ Z 應用 # Loop for i in 1..10
     Like  Bookmark
  • :::info 參考:Ruby Array 手冊 ::: 建立陣列 # 使用 Array 類別 a = Array.new # 使用中括號 b = []
     Like  Bookmark
  • 符號 符號 = 有名字的物件 an object with a name 1 是一個數字物件, "aa" 是一個字串物件 :hello 是一個符號物件 符號不是變數,它就只是一個值(或說是一個物件)
     Like  Bookmark
  • 迴圈種類 for 迴圈 while 迴圈 loop 迴圈 method 式迴圈 迭代式迴圈(常用) 迴圈跟迭代有什麼不同? 迴圈:你就跑個 5 圈吧! 迭代:你把這 5 個元素全部都看過一次吧!
     Like  Bookmark
  • 參考 Ruby Coding Style Rubygems $ gem install 套件名稱 Hello World puts "hello, ruby" comment =begin 這是多⾏註解
     Like  Bookmark
  • normal 模式 --> insert 模式 # i (insert) # a (append) # o (new line) insert 模式 --> normal 模式 esc鍵 存檔、離開 :w 存檔 :q 關閉這個檔案(但若未存檔會提示先存檔再離開)
     Like  Bookmark