nedelja, 2. avgust 2009

Great year for games

Some games I am looking forward this and next year

Risen RPG eta 2 months from now

Gothic 4 RPG eta unknown sometime 2010

While I never was fan of RPG games. I am quite fond of Gothic series. Looking forward to this 2 games.

Operation flaspoint 2 Military "simulation" game eta 2 months from now

Red Orchestra: Heroes of Stalingrad again military "simulation" eta unknown somewhere 2010

I am not much fond of shooter games but "realistic" military fps are an exception.

Mafia II eta unknown early 2010. Who doesn't want to play a role in the Godfather;)

Looking forward to October.

sreda, 8. julij 2009

Programming Standards

I think that standards are good thing but there can always be to much of a good thing.

Buying a lightbulb that fits perfect in the socket. That is a good way to make standards. Having 1 universal phone charger that is a good idea.

But for doing let say Object Relational Mapping or DI is it really a good thing to be forced to use this class with this interface with this xml config with this lines of code to get this specific use case covered? I don't think so.

Not to mention the sounding of totalitarianism. That is not a good thing. Programming practices or better said Programming craft is an evolving craft I am sure that in a couple of months we will find a better or at least a more refined way of doing ORM or DI. But in order to find better solutions we need to apply better code in the field. Why wait for a next version of desing by comeete standards? If you can get better productivity and quality TODAY! That doesn't make sense in engineering. Probably makes sense in politics. But politics != engineering.

On the other hand will we find a more optimal size for the lightbult socket? I don't think so. Should we make a standard for it? Sure.

Are we going to find a better way of doing ORM,DI, WebServies...etc. Sure we will. Should we make a standard? Nope. Better just make some guidelines.

četrtek, 14. maj 2009

eurovision if youtube were judge

So the year is 2009 and we got - youtube, iPods, iPhones, etc. Yet a singing competition known as Eurovision is "voted" exclusively by phones. I find that a bit so 1980s style.

Ok, enough my yada yada. It has been a long day for me. Anyway

How would Second Semi Final Eurovison 2009 results look like if Youtube were judge. Why I think Youtube is a good juddge

o) Majority of people have youtube access i.e. 2/3 of population (yes I know could say the same for phones). But the point is in second point;)
o) People can watch the videos on their own time and not at a very limited time frame (when the competition is aired live)
o) People will watch/listen what they like numerous times giving it deserved higher rating

The results of Youtube rankings in bold if passed to final via phone voting

Views are from the official eurovision youtube channel for the music video (no rehearsals)

AySel & Arash – Always | 870,293
Alexander Rybak – Fairytale | 531,680
Sakis Rouvas – This Is Our Night | 497,410
Svetlana Loboda – Be My Valentine | 446,804
The Toppers – Shine | 439,359
Kejsi Tola – Carry Me In Your Dreams | 342,717
Sasha Son – Love | 304,715
Nelly Ciobanu – Hora din Moldova | 245,531
Urban Symphony – Rändajad | 204,346
Niels Brinck – Believe Again | 190,429
Christina Metaxa – Firefly | 168,446
Lidia Kopania – I Don't Wanna Leave | 163,280
Marko Kon in Milan Nikolić – Cipela | 156,833
Sinead Mulvey & Black Daisy – Et Cetera | 140,238
Intars Busulis – Sastregums | 133,332
Kamil Mikulčík & Nela Pocisková – Leť tmou | 105,009
Igor Cukrov – Lijepa tena |103,469
Quartissimo feat Martina – Love Sypmhony | 98,895

I expected the results to be different i.e. that phone voting will not be the best but I guess that phone voting is not such a bad judge after all.

The only surprise here is that
The Toppers – Shine with 439,359 views didn't go to the finals.

četrtek, 5. februar 2009

Financial Crisis - dumbasses

Why is there a financial crisis?

Because the middle class i.e. 2/3 of the population doesn't have enough money to buy stuff!!!!

Will giving money to banks and companies solve anything?

Nope. It will just mean that the companies, of the guys in the top of the pyramid, will continue to produce stuff the middle class cannot buy for a little more time. While the guys at the top will continue to amass economical figures in their bank accounts.

What am I saying?

Go ahead, destroy the middle class but don't forget doing so you destroy the consumer market! What will be the result? A new dark age of feudalism - you will be either a peasant, a soldier, a monk,an engineer/scientist(*new addition*) or a landlord.

Is this really the best human kind can do?

sobota, 24. januar 2009

Prolog Sweet Spot

The first time I came across Prolog I'd vomit. But first impressions are hardly objective.

For practice I wrote an evaluation function that takes an arbitrary statement of logical connectives and constants and print if it is true or not.

e.g.

?- eval(¬t → f,R).
R = t.


And the code

% this code comes without any kind of warranty!
% define operators
:- op(100,fy,¬).
:- op(200,yfx,∧).
:- op(300,yfx,∨).
:- op(400,yfx,→).
:- op(500,yfx,↔).

% define operator predicates
¬(f).
∧(t,t).
∨(f,f):-!,fail.
∨(_,_).
→(A,B):-eval(¬ A ∨ B,t).
↔(A,B):-eval((A → B) ∧ (B → A),t).

% define evaluation predicates
eval(t,t):-!.
eval(f,f):-!.

eval(Exp,Corr):-
Exp =.. [Op,Left,Right],
eval(Left,Corr1),
eval(Right,Corr2),
Top =.. [Op,Corr1,Corr2],
(call(Top) -> Corr = t; Corr = f),!.

eval(Exp,Corr):-
Exp =.. [Op,Left],
eval(Left,Corr1),
Top =.. [Op,Corr1],
(call(Top) -> Corr = t; Corr = f),!.


It is very easy to get this done in Prolog. In Java I don't think it will be that easy or fast. Just to think how to solve this and which library to use with Java will probably take more time than it took to write this Prolog code.

While I can't imagine writing database code in Prolog or something like that, but when it comes down to problems such as the mentioned Prolog wins hands down. Although negation is a bitch in Prolog.