makandra Curriculum

Learn Enough Command Line to be Dangerous (it's in our library => Google Drive) CLI tricks every developer should...

If you have content inside a page that is hidden by CSS, the following will work with Selenium, but not...

...the window's resize event, that might call your event listener many times. A better way is to subscribe to changes of the MediaQueryList object that is returned by matchMedia...

I frequently find myself needing a combination of group_by, count and sort for quick statistics. Here's a method...

...also in our library): Designing a Complex Form Designing a Dashboard Designing Content Designing Beautiful Shadows in CSS Pairing typefaces Then, take the quiz at cantunsee.space. Did you spot all...

...system's environment specifies. This is usually good enough. To test any timezone-dependent behavior in Chrome, you can change the time zone using the Chrome DevTools Protocol. Example

Is your application doing something expensive every few seconds? Maybe an animated slider that rotates images? Maybe you are updating...

Capybara and most assistive technology will fail to find tags that are missing an href attribute. This will probably happen...

makandra dev

This card shows you how to center a float horizontally in CSS. Also: find out what techniques are available for...

morris-photographics.com

Some browsers render PNG images with color profiles and other shenanigans, some don't. The cleanest way to have consistent...

...DateTime.strptime is not what you want You may eventually encounter DateTime.strptime. It's a "better" Time.parse where you can actually define the date format to parse, e.g. >> DateTime.strptime...

...If you use Rails' time_zone_select, you will be juggling zone names like "Berlin" which are actually unsupported. Unsupported zone identifiers are silently discarded and you'll end up...

...It's much easier to detect the current Rails environment instead. You might be better of checking against the name of the current Rails environment. To do this, store the...

...lot of logic and callbacks for a particular form screen, but then the model becomes a pain in tests, where all those callbacks just get in the way. Or we...

...have different forms for the same model but they need to behave very differently (e.g. admin user form vs. public sign up form). There are many approaches that promise help...

makandra dev

Git has the concept of hooks: bash scripts that are invoked at certain points in the Git lifecycle. One handy...

Recent IRB versions include a multi-line autocomplete which may be helpful to novice users but can be distracting.

Software engineering principles Read about the following software engineering principles and code smells: Single Responsibility Principle Law of Demeter

...component is using this class to render and modify some html, it may fastly become boilerplate to define every call of the method. Here callFake comes in handy, because it...

...of any dependent on the received arguments without having to know the exact arguments beforehand: spyOn(Random, 'shuffle').and.callFake((array) => array.reverse()) Now you can just assume any result of your...

When using Rails to truncate strings, you may end up with strings that are still too long for their container...

So your Cucumber feature sometimes dies with this exception: Modal Dialog Present (Selenium::WebDriver::Error::UnhandledAlertError) As a seasoned Selenium...

Creating records in specs can be so fast that two records created instantly after one another might have the same...

makandra dev

This may be awkward to set up, but will work once you're done. Fun facts:

Recently we detected a memory leak in one of our applications. Hunting it down, we found that the memory leak...

These steps are now part of Spreewald. Here are some useful examples how to use the attached Cucumber Timecop steps...

Sidekiq 7 adds a new feature called capsules. Use cases: a chrome queue limited to 1 for e.g. PDF processing...