svetlik / core-ruby-1 Goto Github PK
View Code? Open in Web Editor NEWThis project forked from hackbulgaria/core-ruby-1
The repitory for the Core Ruby course starting October 2014
Home Page: https://hackbulgaria.com
License: MIT License
This project forked from hackbulgaria/core-ruby-1
The repitory for the Core Ruby course starting October 2014
Home Page: https://hackbulgaria.com
License: MIT License
Имаш още работа по задачата за траковете. Бутни ме тук (може да го направиш като напишеш коментар в който споменяваш @gsamokovarov) като я довършиш.
Занаятчийски идеи: не къмитвай код в който имаш дебъг информация (тези хвърчащи p
-та).
Тази задача ми харесва. Една малка забелешка, която имам: ползвал си Array#map
за страничен ефект в Array#index_by
. В този случай, e по-добре да ползваш Array#each
.
Опитай се а имплементираш не-bang методите, чрез bang методите. Виж какво ще излезе :)
Сложи няколко аксесора на Vector3D
/Vector2D
класа, който онаследява от генеричният Vector
. Иначе всичко е наред ;)
Като цяло ми харесват решенията ти. Проблемите, които имаш са дребни.
Малко проблеми при форматирането, които може да решиш като пуснеш rubocop. Като цяло избягвай експлицитен then
в if
.
Това също, бих го счел като форматираща грешка, но някой оператори ти връщат истина или лъжа, няма смисъл да го проверяваш отново. Вкарва шум в кода. Примерът е:
def anagram?(word, other)
histogram(word) == histogram(other) ? true : false
end
Имаш грешка в решението на remove_prefix
, защото не проверяваш дали префикса наистина съществува. Може да си напишеш тест, в които се опитваш да премахнеш префикс, който не се среща в текста.
И тази задача ми харесва. Малки забележки по често срещаните двойни отрицания: ... unless yield(element) != false
, ... unless item != element
. Мисля, че повечето може да го обърнеш до позитивни if
проверки.
На няколко места сравняваш с true
(... == true
). Избягвай такива провекри. Погледни този слайд защо.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.