Reflective Surface » Use dynamic languages
But trust me on the dynamic languages.
Related cards:
Async control flow in JavaScript: Promises, Microtasks, async/await
Slides for Henning's talk on Sep 21st 2017.
Understanding sync vs. async control flow
Talking to synchronous (or "blocking") API
print('script start')
html = get('/foo')
print(html)
print('s...
Reflective Surface » Tests: Pragmatism or ideology?
The argument that using tests is a ideologic waster of time fails when one considers how it can help to insure architectural decisions.
Why UML Fails to Add Value to the Design and Development Process « Learning Lisp
UML is applying an abstraction at the wrong end of the problem. It is primarily used to sketch object models for inferior languages.
Webpacker: Loading code on demand
Sometimes you want to load code on demand. For instance, when a a large library is only used on a single screen, this library should only be loaded for that screen. It should not blow up the bundle size for all screens.
You can load code on deman...
Get the initial username which you used to login to your Linux system
If you need the initial user which you used to login to your Linux system or the time when you login you can do:
whoami
One purpose of this could be the .bashrc to show different Bash Prompts for root to different users:
if [ $(whoa...
LÖVE - Free 2D Game Engine
LÖVE is an unquestionably awesome 2D game engine, which allows rapid game development and prototyping in Lua.
Space Invaders Enterprise Edition
Rule engines are commonly used in enterprise-level companies to decide things like how much your car insurance premium will be. Let’s start using this for something more fun!
Useful tricks for logging debugging information to the browser console
During debugging you might pepper your code with lines like these:
console.log('foo = ' + foo + ', bar = ' + bar)
I recommend to use [variable interpolation](https://makandracards.com/makandra/30113-the-developer-console-can-do-more-than...
Use a Bash function to alias the rake command to Spring binstubs or "bundle exec" fallback
There are different ways to run rake:
- On Rails 4.1+ projects, you have Spring and its binstubs which dramatically improve boot-up time for Rake and similar. You need to run
bin/rake
to use them. - On older projects, you want to run "bundle ex...
CarrierWave: When your uploader generates filenames dynamically, use model.save! instead of uploader.recreate_versions!
If your Carrierwave uploader dynamically generates the filename (e.g. by incorporating a user's name), you must call model.save!
after recreating versions.
uploader.recreate_versions!
does not update the model with the stored filename.