Skip to content

Instantly share code, notes, and snippets.

Evolution through Education

Artem Sychov suchov

Evolution through Education
View GitHub Profile
View Communication-Etiquette
Most of our communication happens with each other via text. Without the benefit of verbal tone, facial expressions and other non-verbal queues, these communications tend to be [heavily influenced by how we are feeling at the time](
## Listening/Reading
* ALWAYS make the most respectful interpretation of what the others say.
* NEVER make negative assumptions about others' motivations. Unless a person clearly and explicitly communicates a negative intent one should never assume the worse based on non-explicit statements.
## Talking/Writing
* ALWAYS communicate in a respectful manner.
* NEVER act on or disclose confidential information to other people outside of a confidential circle.
View Job Description
1. We recommend to describe:
- what does the team do, what product do they develop, what business-model is in use,
project investment source, risks for a potential employee if one is engage
- the kind of work: is that a temporary contract, hourly rate, full-time, remote,
are you ready for move compensation from another city/country and what type of visa do you suggest.
- technology stack: what do you use and why? If you can't answer this question,
it would be better not to publish a job offer.
- process organization: timezones, calls, business trips, where does the code stored, how do you release, demo etc.
View aliases git
# Branch (b)
alias gb='git branch'
alias gbc='git checkout -b'
alias gbl='git branch -v'
alias gbL='git branch -av'
alias gbx='git branch -d'
alias gbX='git branch -D'
alias gbm='git branch -m'
alias gbM='git branch -M'
View binary search
View pay in 12 months
monthlyPayment = 0
monthlyInterestRate = annualInterestRate /12
newbalance = balance
month = 0
while newbalance > 0:
monthlyPayment += 10
newbalance = balance
for month in range(1,13):
View year with interest
year = 12
while year > 0:
monthlyInterestRate = annualInterestRate/12
minimumMonthlyPayment = monthlyPaymentRate * balance
monthlyUnpaidBalance = balance - minimumMonthlyPayment
balance = monthlyUnpaidBalance + (monthlyInterestRate * monthlyUnpaidBalance)
# print("Remaining balance: " + str(balance))
year -= 1
print("Remaining balance: " + str(round(balance, 2)))
View binary search
suchov / Factories Like Fixtures
Created Apr 12, 2017
Using Factories Like Fixtures
View Factories Like Fixtures
While we prefer factories over fixtures, it is important to use factories appropriately
to get any benefit. Occasionally we’ll see test suites create factory definitions as if they were fixtures:
factory :pam, class: User do
name "Pam"
manager false
factory :michael, class: User do
name "Michael"
View Helper Methods
Common helper methods should be extracted to `spec/support`, where they can be
organized by utility and automatically included into a specific subset of the tests.
# spec/support/kaminari_helper.rb
module KaminariHelper
def with_kaminari_per_page(value, &block)
old_value = Kaminari.config.default_per_page
Kaminari.config.default_per_page = value
View NO excessive database interaction
Persisting to the database takes far longer than initializing objects in memory, and
while we’re talking fractions of a second, each of these round trips to the database
adds up when running your entire suite.
When you initialize new objects, try to do so with the least overhead. Depending
on what you need, you should choose your initialization method in this order: - initializes the object without FactoryGirl. Use this when you
don’t care about any validations or default values.
You can’t perform that action at this time.