Notes on Grokking Algorithms

Chapter 2 Linked lists Upside: are memory efficient (no need to reallocate the list if an element is added). Downside: It is only (mostly?) good for iterating through all elements.... Read more »

Reminders about indexes

Some thoughts Bitmap index scan - Uses index Bitmap hash scan - No index Indexes are sorted lists PG (and maybe other DBMS) has the concept of pages A page... Read more »

Hacking your Rails app error handler

Sometimes applications won’t respond to json requests with json responses. If that is the case for production, that is a bug. But sometimes, in development environment, developers leave unknown exceptions... Read more »

Fixing installation problems on mac

Error installing mysql gem bundle config --global build.mysql2 --with-opt-dir="$(brew --prefix openssl)" source Bundler Traceback (most recent call last): 2: from /Users/marcelojacobus/.asdf/installs/ruby/2.5.3/bin/bundle:23:in `<main>' 1: from /Users/marcelojacobus/.asdf/installs/ruby/2.5.3/lib/ruby/2.5.0/rubygems.rb:308:in `activate_bin_path' /Users/marcelojacobus/.asdf/installs/ruby/2.5.3/lib/ruby/2.5.0/rubygems.rb:289:in `find_spec_for_exe': can't find... Read more »

Install PHP7 on mac os

Here it goes brew tap homebrew/homebrew-php brew install php72 brew install homebrew/php/php72-xdebug export PATH="$PATH:`brew --prefix php`" Read more »

Gem loading problems with spring

Sometimes, while running specs with spring preloader, I got the warnings that some times led to erros, like follows: ./bin/rspec spec/some/class_spec.rb:12 WARN: Unresolved specs during Gem::Specification.reset: spring (>= 0.9.1) WARN:... Read more »

Fixing error compiling gems on MacOS (Alternatively)

If this did not work… Project ERROR: Xcode not set up properly. You may need to confirm the license agreement by running /usr/bin/xcodebuild. current directory: /Users/marcelo.jacobus/.gem/ruby/2.3.5/gems/capybara-webkit-1.15.0 /Users/marcelo.jacobus/.rubies/ruby-2.3.5/bin/ruby -r ./siteconf20180320-92074-jgag5q.rb extconf.rb... Read more »

S.O.L.I.D

Note: Also, the bellow exemples are not complete. They are only pseudo code and there could be improvements to that. These are the solid principles Single responsibility principle - a... Read more »

Rails is not your architecture

This is only a draft. Here are some links I want to explore https://medium.com/@vsavkin/hexagonal-architecture-for-rails-developers-8b1fee64a613#.niwmr5bhm https://martinfowler.com/articles/badri-hexagonal/ http://mikepackdev.com/blog_posts/24-the-right-way-to-code-dci-in-ruby http://archive.oreilly.com/pub/a/ruby/excerpts/ruby-best-practices/worst-practices.html https://www.quora.com/What-are-some-worst-practices-for-Ruby-on-Rails-applications http://daniel.fone.net.nz/blog/2013/05/28/why-you-should-never-rescue-exception-in-ruby/ https://www.sitepoint.com/10-ruby-on-rails-best-practices/ https://github.com/jimweirich/wyriki https://github.com/hanami/model/issues/240#issuecomment-140703858 Read more »

Composer Library Skeleton

I often extract code I use into libraries so I can reuse them. Creating a new library is a bit overwhelming since there is plenty of boilerplate code to write,... Read more »

Highlights from DDD Europe 2016

The first edition of DDD Europe took place in Belgium, during January 26th to the 29th. Thanks to Goodgame Studios, the five of us Gregor, Marco, Marius, Oliver and myself... Read more »

DDD Europe 2016

So last weekend I attended DDD Europe. Thanks to Marco Muths. Here is a summary from someone on the internet. Event sourcing and Stream processing at scale Arm yourself with... Read more »

Vim Autocompletion for PHP

You can achieve autocompletion like the cool IDEs (such as PHPStorm or NetBeans) by using the built in omni completion. How you do that? Go to the variable you want... Read more »

Mac OS Tips

Moving fotos and videos from ipad/iphone to the computer Applications > Image Capture Read more »

Fixing error compiling gems on MacOS

I was not able to compile gems. The reason was XCode needed me to agree with its new license. Solution: Open XCode. Agree with the new license. bundle install Read more »