Defensive Programming : Object Calisthenics

I came across this nice and somewhat strongly opinionated video on Defensive Programming:

Marco Pivetta makes quite a few good points with I agree (and a few with which I disagree).  One thing that he mentioned though I haven’t heard about – Object Calisthenics.  Which turns out to be yet another set of rules and best practices for the object-oriented design and programming.  Here are the rules to get you started:

  1. Only One Level Of Indentation Per Method
  2. Don’t Use The ELSE Keyword
  3. Wrap All Primitives And Strings
  4. First Class Collections
  5. One Dot Per Line
  6. Don’t Abbreviate
  7. Keep All Entities Small
  8. No Classes With More Than Two Instance Variables
  9. No Getters/Setters/Properties

Read the whole article for explanations and examples.

Fungal Intelligence

With all the recent hype around artificial intelligence, this thing that I came across today is a breath of fresh air.  The subject is: fungal intelligence.  “WTF?”, I hear you ask.  Have a look at this tiny video:

Crazy, right?  Well, crazy enough to be found in this article at Nature.com.  And, how the heck did I end up there?  That’s the first link in the Google search results for “fungal intelligence”, which I had to look up after watching this video:

https://www.youtube.com/watch?v=QrFSAbnhKYI

Fascinating stuff!

Charlottesville: Race and Terror

Charlottesville was a lot in the news recently.  I didn’t pay much attention, but now I see why.  This is crazy.  It almost feels unreal, like a really long trailer or a promotion video to a new movie.  But it’s not.  It’s real life and it’s happening now.

It’s far from funny, but standup comedians are often some of the smartest people, with excellent observation skills and the unbeatable use of words.  So here’s Jim Jefferies take on this, with which I agree wholeheartedly.

Replacing default MATE window manager with i3wm

For the last few month I’ve been torn between i3 tiling window manager and MATE desktop environment.  I love them both, even though they are very different from each other.

When I’m alone, and have all the time in the world to write code, i3wm is my best friend.  When I’m in the office, or need to move between tasks, monitors, and locations, MATE is the best.  But I want both.  I don’t want to choose.

Today I came across this YouTube video with a screencast of how to setup i3 window manager instead of the default MATE’s one.  Yes, i3 running inside MATE!  This sounds like magic!

Things I have to do this week make tweaking a working desktop a really bad idea, so I probably won’t try this until the weekend, but it does look exciting!