Jul. 29th, 2010

juan_gandhi: (Default)
I have an entity A, and append an entity B to its set of "children". Somehow the entity A already has one child of type B, so there's more than one. It's okay. Except that I did not expect it.

Then, assuming there's just one child, I take the first one, and check its values. And kaboom, which one is retrieved, changes from test to test. Why is it? Well, it depends on its hashcode, right? Since it is in a set, etc. And the hashcode depends on its values. And its values include creation time, which is, well, since we don't care, is taken from System.currentTimeMillis(). So the test's behavior depends on the millisecond in which the test is launched.

As a solution, of course, I have to add the check for the size of the set. But, in any case, having tests which behavior depends on current time makes them flaky by default.
juan_gandhi: (Default)
Подписался на жж одной умной и приятной москвички. Вдруг кабум - утконос в жж завёлся, та самая москвичка понеслась рекламировать каких-то провайдеров. Ну я и отписался:

Ну вот, утконос пошел. А я-то думал, на приличного человека подписался. Извините.
Their reply was:

надеюсь, как выйти вон, вы знаете.
идете подальше от моей уютной жежешечки

Уютная жежешечка, my ass.

Я не против проституции, я против духовной проституции. (Кстати, сам не знаю, а почему, собственно.)
juan_gandhi: (Default)
Just saw this: http://www.youtube.com/watch?v=5kj5ApnhPAE

Rob Pike for about 95% of the time talks about problems with modern programming languages, C++ and Java, and how small little niche languages Haskell and Scala were created as a reaction to complexity. In the last 5% of his speech (rather pitch) he implies that Go language solves all these problems.

Hmm... sounds funny. In addition to historical glitches, ever heard of C#, F#... Clojure? Or have I missed something?

Oh, whatever. Celebrities.
juan_gandhi: (Default)
I write this (using Joda time):
LocalDate today = new LocalDate(2010, 08, 01);


The compiler reports an error - although LocalDate has a constructor with three ints.
What's its problem, eh?

Profile

juan_gandhi: (Default)
Juan-Carlos Gandhi

September 2025

S M T W T F S
 1 2345 6
78 9 10 111213
14 151617181920
21222324252627
282930    

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Sep. 17th, 2025 04:52 pm
Powered by Dreamwidth Studios