Uparix

About Software Craftsmanship.

post.image

The Eleven Commandments of OO Programming

Software entities (classes, modules, etc) should be open for extension, but closed for modification. (The open/closed principle -- Bertrand Meyer) Derived classes must usable through the base class interface without the need for the user to know the difference. (The Liskov Substitution Principle) Details should depend upon abstractions. Abstractions…
Continue Read

Image

Open Source Pearls

Parsii Super fast and simple evaluator for mathematical expressions written in Java. https://github.com/scireum/parsii dependencies { compile 'com.scireum:parsii:1.1' } Thymeleaf An XML / XHTML / HTML5 template engine (extensible to other formats) that can work both in web and non-web environments. http://www.thymeleaf.org dependencies { compile…
Continue Read

Image

FizzBuzz Clojure Edition

Your browser does not support the video tag. (ns fizzbuzz (:use clojure.test)) (defn fizzbuzz [n] (cond (zero? (mod n (* 3 5)) ) "FizzBuzz" (zero? (mod n 3)) "Fizz" (zero? (mod n 5)) "Buzz" :else n ) ) (dorun (map (fn [n] (println(fizzbuzz n)) ) (range 1 100) ) ) (deftest fizzbuzz-test (is (= 1, (fizzbuzz…
Continue Read

Image

FizzBuzz Java Edition

Your browser does not support the video tag. Please note this is just a draft. Video needs further improvements. package com.uparix.blog.fizzbuzz; import org.junit.Test; import static org.junit.Assert.assertEquals; public class FizzBuzzTest { @Test public void fizzbuzz() { assertEqual("0", 0); assertEqual("1", 1); assertEqual("2", 2)…
Continue Read

Image

Github Companion Repository

Here you can find the url to the github repository where you'll find all the code I'm talking about or showing in the upcoming videos: https://github.com/uparix/blog…
Continue Read

Image

Six Stages of Debugging

That can’t happen. That doesn’t happen on my machine. That shouldn’t happen. Why does that happen? Oh, I see. How did that ever work?…
Continue Read