Newton's method in Go

May 30th, 2018 | #go

While taking A Tour of Go, there was a very interesting exercise which involved Newton's method. The exercise was to implement Newton's method in Go. In this blog post I will briefly look at Newton's method and show you my implementation of it in Go.

Read more

How to be repetitively affirmative: the Unix way

May 28th, 2018 | #terminal

TIL how to be repetitively affirmative: the Unix way.

Read more

Uber says to reply to unsubscribe from further SMS, but they do not support replies

May 15th, 2018 | #other

After I created an account on, they send me the following SMS—I translated it in English:

Uber: Welcome to the Uber platform. If you sign up for a free info session, we will help you on your way. Click here: See you soon! Send STOP to unsubscribe for further SMS

So I wanted to reply with "STOP", to unsubscribe from further SMS. However, Google Messages says that the sender does not support replies.

Read more

First look at functions in Go

April 26th, 2018 | #go

Recently, I started learning Go. The first thing I took a look at were functions in Go. Functions are central in Go, and have several cool features, like multiple return values. Let me share my first look at functions in Go with you.

Read more

Goals for my second year as a Software Engineer

April 25th, 2018 | #personal

Time flies when you are having fun, really. Even though it feels like it was only yesterday that I started as a software engineer, I already hit my one-year anniversary in March. What a ride it has been. I look back on a great year in which I learned a lot, gained valuable experience and met some awesome people.

Last month I took the time to reflect on my first full year as a software engineer and set new goals for my second year. In this blog post I want to share my new goals with you.

Read more

It has been a while

March 29th, 2018 | #personal

It has been a while since my last blogpost—two months to be more specific. Let me briefly explain why.

Read more

Thunderbolt Display camera not working when connected to MacBook Pro Late 2016

February 2nd, 2018 | #macos

Today I connected my MacBook Pro 15" (Late 2016) to an Apple Thunderbolt Display, using a Thunderbolt 3 (USB-C) to Thunderbolt 2 Adapter. When I closed my MBp and tried to Skype, the camera of the Thunderbolt Display did respond—I only saw a black screen where I expected to see myself.

Read more

Visibility between objects in a UML Class Diagram

February 1st, 2018 | #uml #softwaredesign

In this blogpost, I will start with briefly explaining four common ways that visibility can be achieved from object A to object B and finish with two examples how to visualise visibility from a UML Communication Diagram to a UML Class Diagram.

Read more

UML Communication Diagram cheatsheet

January 11th, 2018 | #uml #softwaredesign

The Unified Modeling Language (UML) includes interaction diagrams with the purpose to illustrate how objects interact via messages. Interaction diagrams are used for dynamic object modeling. There are two common types: sequence and communication diagrams. Communication diagrams illustrate the interactions between objects in terms of sequenced messages. In this blogpost I will provide you with a overview of basic communication diagram notations and common patterns. You should this blogpost as a cheatsheet.

Read more

A short overview of object design with GRASP

January 9th, 2018 | #softwaredesign

In the past year, I have done a lot of Object Oriented Design (OOD). I have learned that deciding what methods belong where, and how objects should interact carries consequences and should be undertaken seriously. OOD is definitely not magic. There are patterns, which are named and well-known problem/solution pairs, that can be applied in new contexts.

Read more

Year in review: 2017

January 7th, 2018 | #personal

Let me take you through some highlights of 2017 in my programming/work/study life—not in my world-at-large.

Read more

Blockchain explained like you are five years old

January 6th, 2018 | #blockchain

If you have followed the news or other media in the past year, then you have undoubtedly heard about blockchain. With this technique we can once and for all answer the question: how can we trust each other without a third party, such as a bank? Let me start with explaining blockchain like you are five years old.

Read more

Create a diff or patch file on GitHub

December 25th, 2017 | #git #github

Ever needed to email a commit to someone? Well, today I did. TIL how to quickly generate a diff or patch file for a commit page, Pull Request or a Compare View.

Read more

You do not have to leave your terminal to consult a calendar

December 24th, 2017 | #terminal

Use case: somebody walks up to you and asks if you can go lunch together on February 2nd. If February 2nd is not a Tuesday, you can. Your are busy in your terminal. You have to consult a calendar to give an answer. Why would you leave your terminal? It is a dangerous world outside your terminal. Just say no.

Just kidding about the dangerous world part, but seriously you do not have to leave your terminal to consult a calendar. TIL you have a built-in calendar in your terminal.

Read more

Mount a WebDAV drive on macOS using AppleScript

December 24th, 2017 | #applescript #macos

TIL how to mount a WebDAV drive using AppleScript.

tell application "Finder"
        mount volume "" as user name "TonnyGaric" with password "VerYStr0ngP@$$wOrd"
    end try
end tell
Read more

zipWithIndex makes looping in Scala fun

December 23rd, 2017 | #scala #playframework

TIL how to use zipWithIndex in Scala.

@for((element, index) <- list.zipWithIndex) {
    <p>index @index is element @element</p>
Read more

How du I get the disk size of a directory?

December 23rd, 2017 | #terminal

Typo in the title? Well, not really, because command du displays the disk usage statistics.

$ du -sh /Volumes/WORKSPACE/
 20G    /Volumes/WORKSPACE/
Read more

Simple, but genius: Power over Ethernet

December 22nd, 2017 | #networking

When I started my first office job, I was wondering how my VoIP phone could work with only one network cable. I know my VoIP phone needs two things: network and power. How can they be transferred through one cable?! Well, my colleague explained to me that it worked, because of Power over Ethernet (PoE). Since then, I only knew that it works. Just a few minutes ago, I learned how PoE actually works. It is some of those things, you only look up when you cannot sleep—at least in my case. 🙃

Read more

How CHAR and VARCHAR differ in the way they are stored and retrieved

December 22nd, 2017 | #sql

TIL CHAR and VARCHAR types are similar, but differ in the way they are stored and retrieved.

Read more

Software project? Identify your actors and their goals.

December 9th, 2017 | #softwareanalysis

The software industry is littered with failed projects, that did not deliver what people really needed. If you do not want your project to fail and you do want to deliver what your people really need, you should identify your people—better said: actors—and their goals in an early stage of your project.

Read more

© 2018 Tonny Garić | With from Nijmegen, The Netherlands