Roles are collections of methods and attributes that can be mixed into classes. A role provides an alternate form of code reuse from inheritance. Roles are mixed in using "is" or "does".
Being a long time Ruby user and Lisp dabbler, Rakudo Perl 6 meta-programming capabilities ranked high on my list of curiosities. Meta-programming can be described as "writing code that writes code". This includes code that can alter itself. I was experimenting and...
Given a matrix of m x n elements (m rows, n columns), return all elements of the matrix in spiral order.
I wrote a console version of Blackjack in Elixir:
I wrote a web version of TicTacToe in ReactJS using Typescript:
At my work I'm on an agile team and we do pair programming. Here are some git commands I find useful and use almost every day.
I wanted to change my default SSH port to something else. Here are the commands I used.
I wrote a console version of Blackjack in Crystal: