Namek Dev
a developer's log
NamekDev

Fancy reactive web solutions on counter example

October 31, 2016
Fancy reactive web solutions on counter example

Some people are fascinated about spreadsheets. This lovely type of software was offered in Apple II computer back in 1979. Every cell could contain either data (text, numbers) or formula. What’s so special about it? Formulas are reactive. And that introduces the idea of reactivity.

Let’s have a look at few examples in some experimental technologies touching this idea.

→ Continue reading Design Patterns, angular2, cycle.js, elm, eve, hoplon, javascript, react, reactive, vue.js, web, languages

Interface with basic implementation in C#

February 2, 2013

Today we have simple question:

How to avoid abstract classes by giving base implementation?

The story

Once in a time I was building animation system which was planned to be used in IGWOCTISI project. It happened that I wanted to created some predefined tweens (animated translations) like ScaleTo, MoveTo, RotateBy and so on.

In the horizon appeared a requirement which was pretty straightforward:

public class MoveTo<T> : Animation<T>
        where T : ITransformable

The fact was that my type T not always was able to be some Transformable object.

→ Continue reading csharp, gamedev, languages, Visual Studio

Better Memento

November 4, 2012

Today I asked myself - how to use Memento design pattern to store object state in a more safe and effective way? Of course by automating some things using some base implementation. Read about why I needed better Memento and how did I achieved nice combination of Memento and Command design patterns. Full code is given.

→ Continue reading Design Patterns, Languages, csharp

Why is Ruby so entertaining? Mixins.

August 16, 2012

Ruby

Ruby [0] is a simple, yet powerful language, thanks to which developers are enabled to create or programmatically sketch many things in a fast manner. It’s good for prototyping GUI (Shoes [1]), web development (Rails [2], Merb [3]) or even for network administrator’s scripting (for massive or scheduled actions).

The question today is - why are there so many people interested in that language? I think that one of strong features are mixins.

→ Continue reading ruby, languages

Immutability of Java's Integer

July 6, 2012

As Wiki states

In object-oriented […], an immutable object is an object whose state cannot be modified after it is created.

That totally applies to Java’s Integer. Let’s take a look at the code to talk about:

Integer a = 5;
Integer b = a;
b = b+1;
System.out.println("a = " + a);  // a = 5
System.out.println("b = " + b);  // b = 6

Integer is a class then why variables a and b have different values?

→ Continue reading Java, Languages