Joined June 2013
1 Photos and videos
"Does your job give you a creative outlet? Do you often feel that you're bringing your art to the job, and not just your labor?"
Two of the reasons are duck typing and ability to reopen the classes. 2/2
In Ruby, DI is not discussed as extensively as in Java/Scala because DI impl. is easier in Ruby. 1/2
DI eliminates that dependence by passing the instance as a parameter. 2/2
Dependency Injection: if a class instantiate another class, it is said to be dependent on that another class 1/2
Inheritance vs Mixin: mixins are modules that are not supposed to be used alone or instantiated where the super class in inheritance can.
Ruby is a language of mutable references. No concurrency library can prevent the user from making thread safety mistakes.
Changing a global variable from a thread breaks thread safety. Two or more threads can change its value at any time.
Multithreading in Ruby can be done via "Thread" class
Scala has @tailrec annotation. 2/2
Tail recursive function is a function that has recursion at the end of the function. Many languages have optimization for such func. 1/2
Never declare connection to external sys (DB, Kafka, etc.) as class/instance variable. Initialize it or construct it.
How to show git graph? Add the following under the [alias] section:
1
"If the code deserves to be written, it deserves to have tests".
Hate Capistrano v much. Can't get remote user's home folder easily, makes it very hard to compile-locally-deploy-remotely among others!!
Homebrew - a package manager for OSX
For example, V8 javascript engine (use in Chrome) compiles javascript - scripting language - into binary code rather than interprets it.
Nowadays, the line between compiled and interpreted implementations becomes blur. Partly due to on-the-fly compilers. 1/2
PHP/Perl/Ruby are scripting languages and the implementation of which does not require an explicit compilation steps.
Pure compiled implementation can be seen at C for example. The compiler compiles C source code into binary code for underlying machine.