Holiday version Izmir Q4 has ended. A family gathering tonight, and flight to istanbul in the morning.
if you worry if I was in that plane crashed:
at 10:30 from izmir to istanbul
at 15:25 from istanbul to paris
at 20:25 from paris to edinburgh
and hopefully train from inverkeithing to dundee.
sunday will be possibly spent in Selcuk&Gokcen's. and in monday I'll be at work. I did miss the work as well :)
Friday, 10 October 2008
Sunday, 5 October 2008
whoops! holiday is already out!
Last week of my holiday, and there's still a lot to do!
This photo is from today's meeting of Flickr Izmir group. Lovely people, lovely day.
Saturday, 6 September 2008
Sunday, 3 August 2008
Some more good movies
The Dark Knight
This movie had deserved to be watched at cinema, at the moment it hit the 1st in IMDB. I wouldn't rate it 1st, but it's absolutely in my first ten. Classic batman theme, plus some brain activity on the meaning of the 'crime' and continuous action. Best spent 5£ of last weeks. (mm, maybe except pub lunches)
Kingdom of Heaven
Worth to watch even only to see Eva Green. She's smashing. Movie has a middle-age western theme, with a bit of eastern Islam salt towards the end. I would say who will get the Jerusalem at the end, but I don't want to spoil it.
A Clockwork Orange
Took two days to watch, since I fell asleep around the middle of the movie the first day. But second day was great enough to make me feel satisfied. Makes you review your thoughts about violence, how much of it is done individually, how much of it comes from the society.
This movie had deserved to be watched at cinema, at the moment it hit the 1st in IMDB. I wouldn't rate it 1st, but it's absolutely in my first ten. Classic batman theme, plus some brain activity on the meaning of the 'crime' and continuous action. Best spent 5£ of last weeks. (mm, maybe except pub lunches)
Kingdom of Heaven
Worth to watch even only to see Eva Green. She's smashing. Movie has a middle-age western theme, with a bit of eastern Islam salt towards the end. I would say who will get the Jerusalem at the end, but I don't want to spoil it.
A Clockwork Orange
Took two days to watch, since I fell asleep around the middle of the movie the first day. But second day was great enough to make me feel satisfied. Makes you review your thoughts about violence, how much of it is done individually, how much of it comes from the society.
Wednesday, 30 July 2008
Some good movies
The man from earth.
This is a great movie reccommended by Hazan. It doesn't let your brain out for two hours. Pretty fun, and a good ending. Very similar to the theme of '12 Angry Man'.
North by Northwest (Hitchcock)
Not impressive as much as Psycho, but still very fun to watch especially considering unique structure of its scenario. spoiler [ many plot-twists ].
Death proof
A must-watch for Tarantino lovers. After watching this movie with friends, Umut went: "Ok now somebody tell me what was the genre of this movie?". It's only Tarantino-genre.
This is a great movie reccommended by Hazan. It doesn't let your brain out for two hours. Pretty fun, and a good ending. Very similar to the theme of '12 Angry Man'.
North by Northwest (Hitchcock)
Not impressive as much as Psycho, but still very fun to watch especially considering unique structure of its scenario. spoiler [ many plot-twists ].
Death proof
A must-watch for Tarantino lovers. After watching this movie with friends, Umut went: "Ok now somebody tell me what was the genre of this movie?". It's only Tarantino-genre.
To singleton or not to singleton
A colleague (Jacques or David L.?) pointed out an article explaining why singletons are evil, and they should be avoided:
http://blogs.msdn.com/scottdensmore/...27.aspx
Although there are some valuable points coming from experience, I can't say that I totally agree with it. This article makes a better representing of my thoughts:
http://www.ddj.com/cpp/184401625
I'll try to come up with my own explanations as objections :)
In my opinion, the first reason why global variables are bad is that you have almost no control over initialization or modification operations over them. There's a global variable in the global scope who knows where it's coming from, who and when initialized it, does it contain valid information... Second, probably the strongest objection to globals is, when you keep writing code depending on globals, those globals sit in the centre of your design with an extremely tightly coupled fashion, Turning your whole code domain into a single 'deadly complex finite state machine'. [Not mentioning about debugging problems of such a code]
But they don't apply for singletons. You know when a singleton is initialized (lazy to death, if you like), and that the class initializes itself. It still only publishes an appropriate interface with read-only members, etc.
Well, it's completely right. But it's not the fault of singleton objects, It's weakness of your testing framework. If you really want your objects to be stateless at the beginning, then I'm sorry but you have to well-write those Setup() and TearDown() methods, even it comes with a cost of dynamically loading and unloading many dlls.
Well, this is possibly the most ridiculous one. A factory method, if it doesn't incorporate 'static' concept, can't do what a singleton does. And if it incorporates the static concept, it actually IS a singleton.
I don't have any objection to this. It's completely true. They do screw polymorphism. But you may have deeper problems with your design if you think an object 'will have only one instance' and there are going to be more than one objects subclassing the previous one. I better seal the singleton with a 'sealed' or 'final' keyword and take a French leave.
My objections don't eliminate the fact that singletons are abused. But I think the answer to this singleton deal is old and classic enough not to make me seem smart: "It depends.". It's always better to pass a reference to your single-instanced-object when you can, for many reasons like clear representation of coupling. But there will always be some cases you'll end up with ridiculously complex solutions just to avoid an innocent sweet singleton. It's a trade-off decision.
http://blogs.msdn.com/scottdensmore/...27.aspx
Although there are some valuable points coming from experience, I can't say that I totally agree with it. This article makes a better representing of my thoughts:
http://www.ddj.com/cpp/184401625
I'll try to come up with my own explanations as objections :)
1. "Singletons are almost like globals, and since globals are bad, singletons are bad."
In my opinion, the first reason why global variables are bad is that you have almost no control over initialization or modification operations over them. There's a global variable in the global scope who knows where it's coming from, who and when initialized it, does it contain valid information... Second, probably the strongest objection to globals is, when you keep writing code depending on globals, those globals sit in the centre of your design with an extremely tightly coupled fashion, Turning your whole code domain into a single 'deadly complex finite state machine'. [Not mentioning about debugging problems of such a code]
But they don't apply for singletons. You know when a singleton is initialized (lazy to death, if you like), and that the class initializes itself. It still only publishes an appropriate interface with read-only members, etc.
2. "Code that depends on a singleton is hard to unit-test."
Well, it's completely right. But it's not the fault of singleton objects, It's weakness of your testing framework. If you really want your objects to be stateless at the beginning, then I'm sorry but you have to well-write those Setup() and TearDown() methods, even it comes with a cost of dynamically loading and unloading many dlls.
3. "Don't use singletons, write a 'factory method'".
Well, this is possibly the most ridiculous one. A factory method, if it doesn't incorporate 'static' concept, can't do what a singleton does. And if it incorporates the static concept, it actually IS a singleton.
4. "Singletons screw polymorphism."
I don't have any objection to this. It's completely true. They do screw polymorphism. But you may have deeper problems with your design if you think an object 'will have only one instance' and there are going to be more than one objects subclassing the previous one. I better seal the singleton with a 'sealed' or 'final' keyword and take a French leave.
My objections don't eliminate the fact that singletons are abused. But I think the answer to this singleton deal is old and classic enough not to make me seem smart: "It depends.". It's always better to pass a reference to your single-instanced-object when you can, for many reasons like clear representation of coupling. But there will always be some cases you'll end up with ridiculously complex solutions just to avoid an innocent sweet singleton. It's a trade-off decision.
Tuesday, 29 July 2008
C# and beforefieldinit
C# and beforefieldinit
I didn't know that explicitly defining the static constructor could have an effect on initialization time of implicitly initialized members!
I didn't know that explicitly defining the static constructor could have an effect on initialization time of implicitly initialized members!
Subscribe to:
Posts (Atom)
