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.

Jul 18, 2018
Ruby has a class called SimpleDelegator which can be used to used to implement decorator pattern. It can be used to delegate all supported method calls to the object passed into the constructor.
akshay
Akshay
Jul 15, 2018
You can use a tool called [Telepresence](https://www.telepresence.io) to create a 2-way proxy between your local dev machine and a k8s cluster. Uses : be able to inherit env vars and other configs from k8s locally, make use of other services running in the cluster when running your dev instance of a service you want to test
emil
Emil
Jul 12, 2018
Arel is a SQL abstract syntax tree manager for ruby. It helps to simplify creating complex SQL queries and interfaces with various RDBMS. Arel modifies it's AST nodes based on the methods you call on it and ActiveRecord makes use of this to build composable chainable queries and then executes them. A detailed post on Arel: https://jpospisil.com/2014/06/16/the-definitive-guide-to-arel-the-sql-manager-for-ruby.html
akshay
Akshay
Jul 6, 2018
You can speed up image builds by making use "--cache-from". This is useful when 1) you already have a previous version of the image which you can pull 2) docker pull is faster than docker build 3) intermediate layers in the previous version can be reused. This is useful for speeding up builds in docker container builder
emil
Emil
Jul 5, 2018
There is something called QoS for pods using which we can prevent unwanted rescheduling of pods
yuva
Yuva
Co-founder
Jun 26, 2018
you can use GCP cloud shell and use it to run kubectl commands instead of having to create a k8s context on your local kubectl CLI tool. This is very useful for doing some adhoc debugging on a k8s cluster you have access to. Just login to google cloud using google auth, and then click on "Connect" next to the cluster you want to connect to, then use cloud shell.
emil
Emil
Jun 26, 2018
We can leverage structs in ruby to encapsulate and hold internal class data into a struct object. Since struct saves us from writing attr_accessor methods or initializer method, we can easily leverage it when in need of a temporary data structure and need to have the data grouped.
akshay
Akshay
Jun 26, 2018
If you are using materialize, you need to initialize the select element with material_select(). Otherwise the select box will not get rendered.
kamal
Kamal

Showing 66 to 68 of 82 results

Ready to Build Something Amazing?

Codemancers can bring your vision to life and help you achieve your goals