Fueling Curiosity, One Insight at a Time
At Codemancers, we believe every day is an opportunity to grow. This section is where our team shares bite-sized discoveries, technical breakthroughs and fascinating nuggets of wisdom we've stumbled upon in our work.
May 17, 2018
while tesing with enzyme if you are unit testing your component method with component.instance().methodName() always double check if the method that you are testing have access to "this" variable manually. Currently even if it does not have "this" access the test will pass
Harshwardhan
May 16, 2018
You can create a quick screencast using hangouts and then share the video as a private youtube video
Emil
May 15, 2018
fresh_when, more here https://medium.com/rubyinside/https-medium-com-wintermeyer-caching-in-ruby-on-rails-5-2-d72e1ddf848c
Mrinmoy
May 15, 2018
emacs has a "M-x base64-encode-region"
Mrinmoy
May 14, 2018
In ruby you can use any single non alpha numeric character as delimiter for % notation. The following are all same %(foo bar); %w[foo bar]; %w%foo bar%; %w$foo bar$; And many more. https://en.wikibooks.org/w/index.php?title=Ruby_Programming/Syntax/Literals#The_%_Notation
Manu
May 11, 2018
Rails 5 prevents accidental halting of the callbacks. In order to explicitly halt, we can make use of
throw(:abort)
in the callback chain.Akshay
May 11, 2018
Sidekiq by default does 25 retries (about 21 days) based on exponential back off formula ie. to retry multiple times with exponential delays. If need be, we can explicitly configure max_retries in sidekiq.yml.
Akshay
Apr 27, 2018
while writing test for a parent component which renders child component based on some state/prop and if your child component is connected, always import unconnected child component and do assertion on that.
/code
import { ChildComponent } from 'path/to/component';
expect(component.find(ChildComponent).length).toBe(1);
//instead of
expect(component.find('ChildComponent').length).toBe(1);
/code
import { ChildComponent } from 'path/to/component';
expect(component.find(ChildComponent).length).toBe(1);
//instead of
expect(component.find('ChildComponent').length).toBe(1);
Harshwardhan
Showing 66 to 68 of 80 results
Ready to Build Something Amazing?
Codemancers can bring your vision to life and help you achieve your goals
- Address
2nd Floor, Zee Plaza,
No. 1678, 27th Main Rd,
Sector 2, HSR Layout,
Bengaluru, Karnataka 560102 - Contact
hello@codemancers.com
+91-9731601276