Решение на Седма задача - ретроспекция от Калина Бухлева

Обратно към всички решения

Към профила на Калина Бухлева

Резултати

  • 2 точки от тестове
  • 1 бонус точка
  • 3 точки общо
  • 1 успешни тест(а)
  • 0 неуспешни тест(а)

Код

REPOSITORY = 'https://github.com/kalisb/ruby-retrospective-2016'
# Двадесет неща, които научих.
#
# 1. Module#extend добавя методите на дадения модул като класови методи.
# 2. Each често добавя повече код отколкото ни трябва - използване на map или sellect,
# където е възможно.
# 3. instance_variable_get е лош подход, по-добре да се минава през getter-и.
# 4. #it only expects one thing - тестът трябва да тества най-малкато функционалност и да
# съдържа само подобни assert-и.
# 5.
# 6.
# 7.
# 8.
# 9.
# 10.
# 11.
# 12.
# 13.
# 14.
# 15.
# 16.
# 17.
# 18.
# 19. Новите версии на Ruby изполват YAVM - заразлика от Java няма JIT compiler.
# 20. Ruby не е подходящ за реализация на паралелни алгоритми - GIL. В Ruby3.0 - Guild.

Лог от изпълнението

From https://github.com/fmi/ruby-retrospective-2016
 * branch            master     -> FETCH_HEAD
HEAD is now at a22cf37 Set rubocop version to 0.46.0 to fix obsolete cop errors
Cloning into 'submission'...
HEAD is now at fb1a463 Separe same tests as they test more than unit of work.
From /tmp/ruby-retrospective-2016/checker
 * branch            master     -> FETCH_HEAD
 * [new branch]      master     -> upstream/master

Changes URL:
https://github.com/kalisb/ruby-retrospective-2016/compare/1f710b00c26...fb1a463bd6e

'tasks/1/solution.rb' -> '/tmp/ruby-retrospective-2016/checker/tasks/1/solution.rb'
'tasks/2/solution.rb' -> '/tmp/ruby-retrospective-2016/checker/tasks/2/solution.rb'
'tasks/3/solution.rb' -> '/tmp/ruby-retrospective-2016/checker/tasks/3/solution.rb'
'tasks/4/solution.rb' -> '/tmp/ruby-retrospective-2016/checker/tasks/4/solution.rb'
'tasks/5/solution.rb' -> '/tmp/ruby-retrospective-2016/checker/tasks/5/solution.rb'
Inspecting 1 file
.

1 file inspected, no offenses detected
.................

Finished in 0.00468 seconds
17 examples, 0 failures
Inspecting 1 file
.

1 file inspected, no offenses detected
...............

Finished in 0.00552 seconds
15 examples, 0 failures
Inspecting 1 file
.

1 file inspected, no offenses detected

...............

Finished in 0.00814 seconds
15 examples, 0 failures
Inspecting 1 file
.

1 file inspected, no offenses detected
....................

Finished in 19.02 seconds
20 examples, 0 failures
Inspecting 1 file
.

1 file inspected, no offenses detected
.........................

Finished in 0.02026 seconds
25 examples, 0 failures
.

Finished in 0.00167 seconds
1 example, 0 failures

История (1 версия и 0 коментара)

Калина обнови решението на 15.01.2017 19:31 (преди над 7 години)

+REPOSITORY = 'https://github.com/kalisb/ruby-retrospective-2016'
+
+# Двадесет неща, които научих.
+#
+# 1. Module#extend добавя методите на дадения модул като класови методи.
+# 2. Each често добавя повече код отколкото ни трябва - използване на map или sellect,
+# където е възможно.
+# 3. instance_variable_get е лош подход, по-добре да се минава през getter-и.
+# 4. #it only expects one thing - тестът трябва да тества най-малкато функционалност и да
+# съдържа само подобни assert-и.
+# 5.
+# 6.
+# 7.
+# 8.
+# 9.
+# 10.
+# 11.
+# 12.
+# 13.
+# 14.
+# 15.
+# 16.
+# 17.
+# 18.
+# 19. Новите версии на Ruby изполват YAVM - заразлика от Java няма JIT compiler.
+# 20. Ruby не е подходящ за реализация на паралелни алгоритми - GIL. В Ruby3.0 - Guild.