Operators in programming languages

Do operators have to be common between programming languages? Or do we even need symbols for adding numbers together? Let’s look at some weird differences!
→ Continue readingDo operators have to be common between programming languages? Or do we even need symbols for adding numbers together? Let’s look at some weird differences!
→ Continue readingSome 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 readingToday we have simple question:
How to avoid abstract classes by giving base implementation?
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 readingToday 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 readingRuby [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 readingAs 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