TILs - 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.

Published
Author
user-image
Codemancers
We can make use of ActiveRecord's unscoped method to accept a blocks, such that we can obtain associations bypassing the default scope on the associations.
Published
Author
user-image
Codemancers
We can make use of Set instead of an Array in Ruby when we would like to create sequences without duplicates and also can be used to compare two sets disregarding order as compared to array for which order of elements matter.
Published
Author
user-image
Iffyuva
When using docker-compose and when in doubt that containers are getting cached, pass --build option. Works like charm
Published
Author
user-image
Codemancers
chrome://net-internals
Published
Author
user-image
Codemancers
use chrome(v65 and above) local overrides to modify a webpage's assets and store on your local which will be loaded everytime you open the website - https://www.youtube.com/watch?v=UOn0b5kn3jk
Published
Author
user-image
Codemancers
If you have a dimple, it's a muscle atrophy - basically your muscle doesn't work
Published
Author
user-image
Codemancers
Use AbortController to cancel the promise.
/code
const controller = new AbortController();
const signal = controller.signal;
// pass this signal as option in your fetch request
fetch(url, {signal}).then(...).catch(...)

// now you can reject the above promise by calling abort like this
signal.abort()

//promise will get rejected with error "AbortError"
Published
Author
user-image
Codemancers
rendering templates outside of controller "SomeController.render :index, formats: :csv, locals: { users: users }"
Published
Author
user-image
Codemancers
Never Wrap a component with HOC inside the render method. This will cause numerous unmount and mount of same component on each render.
Published
Author
user-image
Codemancers
Vim tip - Hitting g Ctrl-g will show you some tech info about the current file, like number of words or how many bytes it has
-- Col 1 of 25; Line 184 of 184; Word 471 of 472; Byte 4266 of 4291
Published
Author
user-image
Codemancers
In ssh url [email protected]:code-mancers/engineering-blog.git git is the user on github.com server. Even ssh://[email protected]/engineering-blog.git is a valid git url since git tries to clone it but since there is no code-mancers user on github hence git is not able to clone it.
Published
Author
user-image
Codemancers
You can use https://www.fullstory.com to record user sessions and play back interactions. UX designers use this tool to understand how to improve their design.

Showing page 36 of 42

Your competitors are already using AI.
The question is how fast you want to unlock the value.

Don't know where to start?

AI is everywhere but it's unclear which investments will actually move your metrics and which are expensive experiments.

Your data isn't ready

Most AI projects fail at the data layer. Pipelines, quality, access all need work before LLMs can deliver value.

Internal teams are stretched

Your engineers are shipping product. They don't have capacity to also become AI specialists with production-grade experience.

Legacy systems block everything

Aging, undocumented codebases make AI integration slow, risky, and expensive. They need to move first.

Don't worry. We've got you covered.

Start with the audit.