ngeor.net | blogProudly under construction since 2010

31Jul 2010 Welcome to Arizona

Translation in English can be found below

Το θέμα της μετανάστευσης και της ενσωμάτωσης των μεταναστών φαίνεται να απασχολεί αυτόν τον καιρό αρκετά μέρη του πλανήτη μας. Στην Αριζόνα η δικαιοσύνη μπλόκαρε στο παρά πέντε την εφαρμογή του νέου νόμου της πολιτείας ο οποίος μεταξύ άλλων όριζε ως αδίκημα την εργασία από παράνομους μετανάστες. Στην Αγγλία η νέα κυβέρνηση συνασπισμού προωθεί όριο στην αριθμό των μεταναστών από χώρες εκτός Ευρώπης. Στη Γαλλία πρόσφατα ο Σαρκοζί μίλησε για την ανάγκη σκληρότερων κανονισμών στην μετανάστευση και την ενσωμάτωση των μεταναστών. Στην Ολλανδία της ανεκτικότητας, οι διαπραγματεύσεις για νέα κυβέρνηση συνεχίζονται ακόμη, ωστόσο το σενάριο του δεξιού συνασπισμού με τη συμμετοχή του Βίλντερς επανέρχεται στο προσκήνιο.

Πολιτικές ορθότητες. Πιο κοφτά και πιο ειλικρινά: στην Αριζόνα δεν θέλουν άλλους Μεξικάνους, στην Αγγλία δεν θέλουν άλλους Ινδο-Πακιστανούς μουσουλμάνους, στη Γαλλία δεν θέλουν άλλους Αφρικανούς-Αλγερινούς και στην Ολλανδία δεν θέλουν άλλους Τούρκους-Μαροκινούς-μουσουλμάνους. Ή καλύτερα, θέλουν λιγότερους από όσους δέχονται σήμερα. Το να ειπωθεί όμως με αυτά τα λόγια αυτή η κρυφή επιθυμία, θεωρείται ρατσιστικό. Είναι όμως;

Από τη στιγμή που ακόμη έχουμε κράτη και σύνορα, είναι νόμιμο δικαίωμα ενός κράτους να αποφασίζει ποιος μπορεί να ζει και να εργάζεται σε αυτό και με ποιους όρους, απολαμβάνοντας πάντα πλήρη ισότητα με όλους τους συμπολίτες του, χωρίς κανένα φυλετικό ή άλλο διαχωρισμό. Η Νότια Αφρική ήταν ρατσιστικό κράτος γιατί επέβαλε διαχωρισμούς στους πολίτες της με βάση την καταγωγή τους. Το να βάζεις περιορισμούς στο ποιοι πολίτες άλλων χωρών μπορούν να έρθουν στη χώρα σου δεν είναι ρατσιμός, είναι μεταναστευτική πολιτική. Όσον αφορά τους ήδη υπάρχοντες νόμιμους μετανάστες, το να βάζεις κανόνες στην εθνοτική σύνθεση του πληθυσμού, ίσως να είναι όχι μόνο θεμιτό αλλά και απαραίτητο, αν δούμε την υπόθεση του Κοσόβου.

Πώς θα μπορούσε το Κόσοβο να αποτελέσει ένα μάθημα για τον υπόλοιπο κόσμο; Κάποτε το Κόσοβο ήταν μία περιοχή όπου το σερβικό στοιχείο ήταν κυρίαρχο. Προοδευτικά όμως, οι Αλβανοί ξεπέρασαν σε πληθυσμό τους Σέρβους για να φτάσουν στην σχεδόν αποκλειστική επικράτηση και με τελικό αποτέλεσμα την απόσχιση αυτής της σερβικής επαρχίας.

Στη λεγόμενη Δύση, αυτό το ζήτημα δεν φαίνεται να μπαίνει ως ενδεχόμενο. Κανείς δεν φαίνεται να πιστεύει ότι σε 200 ή 300 χρόνια οι πληθυσμιακές αναλογίες θα έχουν αλλάξει τόσο ώστε να μπορούν οι νότιες πολιτείες της Αμερικής να ενωθούν με το Μεξικό, ή το Ρότερνταμ να γίνει ανεξάρτητη Ισλαμική Δημοκρατία. Ο λόγος είναι η λέξη ενσωμάτωση. Η ενσωμάτωση πετυχαίνει ακριβώς αυτό, κάποιος με εμφανώς ξένη καταγωγή (σκούρο δέρμα, ξένο ονοματεπώνυμο, ξένη θρησκεία) να αισθάνεται μέρος της κοινωνίας που ζει, να αισθάνεται ότι μπορεί να φέρει τον προσδιορισμό Γάλλος, Βρεττανός, Ολλανδός, κλπ. Όσο η ενσωμάτωση λειτουργεί, δεν υπάρχει φόβος για αποσχιστικές τάσεις από τους ξένους. Από τους ιθαγενείς όμως;

Το ερώτημα είναι αν είναι διατεθειμένοι και οι ιθαγενείς να αποδεχθούν ένα μέλλον όπου θα είναι αυτοί η μειονότητα. Η λευκή Ευρώπη γερνάει, σπουδάζει και δεν γεννάει. Οι ξένοι κάνουν τις χαμαλοδουλειές που οι λευκοί πλέον δεν θέλουν να κάνουν και κάνουν περισσότερα παιδιά σε μικρότερη ηλικία. Χάρη στους μετανάστες και την δημογραφική τόνωση που προσφέρουν, οι συντάξεις των ηλικιωμένων λευκών είναι εξασφαλισμένες και ίσως αυτό να είναι αρκετό. Προς το παρόν, το μόνο που συμβαίνει είναι το λεγόμενο white flight: οι λευκοί μετακομίζουν μακριά από τις περιοχές όπου οι μη-λευκοί αυξάνονται.

Πιστεύω ότι μια ακόμα λεπτομέρεια είναι η λεγόμενη λευκή ενοχή. Οι σημερινοί Βρεττανοί, Γάλλοι, Ολλανδοί, κλπ αισθάνονται ενοχή για το αποικιοκρατικό παρελθόν τους και αυτή η ενοχή μεταφράζεται ως ανοχή απέναντι στην παραβατικότητα και την επιθετικότητα των νεαρών με ξένη καταγωγή, ενώ καθιστά και την όλη συζήτηση ένα μεγάλο ταμπού. Για μένα πρέπει να τεθεί το ερώτημα: αποδεχόμαστε ένα μέλλον για την Ευρώπη όπου οι «γηγενείς» πληθυσμοί θα αποτελούν την μειονότητα; Αν ναι, τότε η ενσωμάτωση αρκεί, ώστε η μετάβαση στη νέα πραγματικότητα να γίνει ειρηνικά. Αν όχι, πρέπει η μετανάστευση να περιοριστεί με βάση την προέλευση των μεταναστών ώστε να προστατευτεί η ιστορική εθνική σύνθεση της Ευρώπης.

Κλείνω το κείμενο με δύο επισημάνσεις: τη δήλωση του Σαρκοζί: «Υποφέρουμε από 50 χρόνια ήπιας μεταναστευτικής πολιτικής που κατέληξε σε αποτυχία της ενσωμάτωσης» καθώς και με την υπενθύμιση ότι η πόλη της Βενετίας κάποτε κατάφερε να γίνει μία τεράστια δύναμη, χάρη και στην αποδοχή και στο σεβασμό που επέδειξε προς οποιονδήποτε ήθελε να ζήσει εκεί.

Article in English:

The issue of immigration and integration of immigrants seems to be a hot topic in many places of our planet. In Arizona, the courts blocked a state law that among others defined work by illegal immigrants as a crime. In the UK, the new coalition government is setting a cap on the allowed immigrants from non Europe countries. In France, Sarkozy stressed the need of more strict rules in immigration and integration of immigrants. In the tolerant Netherlands, negotiations for a new government are ongoing but the scenario of the right coalition, with the participation of Wilders, is again a likely outcome.

A bunch of political correctness. Sharp and honest: Arizona doesn't want Mexicans, UK doesn't want Indo-Pakistani muslims, France doesn't want African-Agerians and the Netherlands doesn't want Turkish-Moroccan-muslims. Or, they want less than what they get today. But using these words to describe this secret demand is considered racist. Is it really?

Since we still have countries and borders, it is a legal right of a country to decide who can live and work in it and under which terms, enjoying of course full rights as the rest of the citizens, without any separation, racial or other. South Africa was a racist state because it discriminated its own citizens based on their origin. Setting limitations on which citizens of other countries can live and work in your country is not racism, it's immigration policy. And for the existing immigrants, setting rules in the ethnic composition of the population might be necessary, as we can realize by examining the Kosovo case.

How could Kosovo become a lesson for the rest of the world? Once upon a time, Kosovo was an area where the Serbian population was dominant. Nevertheless, as centuries passed, Albanians exceeded the Serbs and they finally became the dominant ethnic group in the population, which led to the declaration of the independence of the former Serbian province.

In the so called West, this is not regarded as something that could happen to them. Nobody seems to believe that in 200 or 300 years population analogies will shift enough for the southern USA to become a Mexican province or for Rotterdam to become an independent Islamic Republic. The reason for that is integration. Integration prevents this problem. With integration, somebody of evidently foreign origin (darker skin, foreign name, foreign religion) can feel as a part of the society. He can also feel that he can identify himself as French, British, Dutch, etc. As long as integration works, there's no fear of separatist movements from the foreigners. But what about the natives?

The question is whether the natives are willing to accept a future in which they become the minority. White Europe is getting older, is studying more and gives less birth. Foreigners do the petty jobs that the white don't wont to do anymore and they have more kids at a younger age. Thanks to the immigrants and the demographic boost they offer, the pensions of the elder white are secured, and maybe that's enough. So far, the only thing that is happening is the so called white flight; white people tend to move away from areas where non-white people increase.

One more detail that I think fits this puzzle is the so called white guilt. Modern day British, French, Dutch, etc, feel guilt for their colonialist past and this guilt is manifested as a tolerance against aggressive or law breaking behavior of young people of foreign descent. Even more, it makes the whole discussion a big taboo. As far as I'm concerned, the question should be asked: do we accept a future where the indigenous population of Europe is a minority? If we do, then integration should be enough, to provide a peaceful transition to that reality. If we don't, we should have more limitation to immigration, in order to maintain the historic ethnic compositions of Europe.

I have two extra notes as a conclusion. A statement by Sarkozy: «We are suffering from 50 years of lax immigration regulation which has led to a failure of integration» and a reminder that once upon a time the city of Venice grew to become a superpower, also due to the acceptance and respect it showed to anybody who wanted to live there.

Categories: News and Politics

25Jul 2010 Combine subversion post-commit hooks with NAnt

Subversion offers a mechanism called post-commit hook that allows an executable file to be run on the subversion server after a successful commit has been made. Since I host my own home server, containing both this website and my own subersion server, I thought I could use this mechanism to automatically update some files on the website when a commit has been made. For example, if I commit some changes on a web page template, it would be nice if it would automatically be updated on the website and also be packaged as a zip file for visitors of the site to download.

To make it a bit simpler at first, I want a post-commit hook on a repository that will get the latest version after the commit and copy certain files to a certain folder. From time to time, I would like to modify that list of files. Now, the executable that can be run in the post-commit hook can be an .exe or a .bat file. An .exe file doesn't seem right, because it's tedious to update an .exe file everytime I want to modify the list of files I want to copy. The batch file is a better alternative but, and this applies also to the .exe solution, being a hook it means that it will not live inside the repository. Therefore, I would have to modify the batch file separately before every commit that changes the list of files to be copied. And I will have to open up remote access of some sort to the hooks folder of the subversion server in order to do so. That doesn't seem right either. Wouldn't it be nice if my source code also describes the post-commit actions? So I need to find a way to bring the control of the post-commit actions inside my source tree. That's where I though I can use NAnt.

The idea is that the post-commit hook will be really minimal and do only the following actions:

  1. Create a temporary folder
  2. Export the latest source code into the folder
  3. Run NAnt specifying a special target name, e.g. postcommit
  4. Delete the temporary folder

And the real set of actions to be performed will be defined as a NAnt build script in the root of my source tree, using a predefined target name (e.g. postcommit). I find this approach more generic and powerful. In effect, we are converting our subversion server into a powerful tool that can do whatever NAnt allows: automatic build, automatic unit-testing and continuous integration, e-mail reports, backup, whatever. As long as you can specify it in a NAnt build file, the subversion server will run it.

This is how my post-commit hook looks like:

REM Create Temp folder
mkdir c:\Temp
cd C:\Temp

REM Export source code into trunk folder
"C:\Program Files\Subversion\bin\svn" export \
  --username myusername \
  --password mypassword \
  svn://svnhost/repository/trunk \
  trunk

REM Go into trunk folder
cd C:\Temp\trunk

REM Run NAnt
"C:\Program Files\nant-0.90\bin\nant" postcommit

REM Cleanup
cd C:\Temp
del /f /q/ s trunk
rmdir /q /s trunk

and this is a sample of a NAnt file:

<?xml version="1.0"?>
<project name="demo" default="postcommit" basedir=".">
	<description>demo autodeploy script</description>
	<property name="dest.dir" value="C:/Web" overwrite="false" />
	<target name="postcommit" description="">
		<touch file="${dest.dir}/it_worked.txt" />
	</target>
</project>

If you noticed the full paths in the post-commit batch file, that's because post-commit hooks run in an empty environment, which also means empty PATH variable. Also, it assumes that there's a trunk folder in your source tree and that folder contains a NAnt build file which has a target called postcommit. The trunk folder should exist, if you use the recommended root folder structure for the subversion repositories (trunk, branches, tags). So, if you copy the post-commit hook into the hooks folder of your repository on every commit NAnt will kick in and execute your custom actions. The sky is the limit! Hope this helps.

24Jul 2010 Playing with Castle DynamicProxy

If you've ever used an ORM tool, such as NHibernate or the Entity Framework, you'll probably have noticed that their goal is to be as unobtrusive as possible. They say, and I agree, that you shouldn't be forced to have your business objects inherit from strange classes like MarshalByRefObject, or to annotate your properties with all sorts of ORM specific attributes. In that aspect, I find NHibernate to be rather clean.

But in the end, every ORM tool expects you to call some Save method in order to indicate that at this point you would like the ORM to kick in and do its magic. I was wondering, is it possible to have a piece of code like this:

Person person = new Person();
person.Lastname = "Smith";
person.Firstname = "John";

and just by using that code to end up with a new record in my database?

Well, technically, it's possible. I played a bit with DynamicProxy to make it work and I enjoyed it. What does DynamicProxy do? It creates dynamic subclasses of your classes at runtime, overriding all virtual members (properties and methods). All calls to those members are intercepted and your interceptors can do additional pre and post processing with those calls. If this reminds you of Aspect Oriented Programming, it's no coincidence. In fact, let's see an example of DynamicProxy in action, using the classic AOP example: Logging all method calls of a class.

So our class Person should look something like:

public class Person {
	public virtual string Lastname { get; set; }
	public virtual string Firstname { get; set; }
	public virtual void Print()
	{
		Console.WriteLine(
			"My name is {0} {1}",
			Firstname,
			Lastname);
	}
}

Note that all members are virtual so that DynamicProxy will be able to override them and intercept them. We want to print a message to the console everytime a property is being read or written. We'll implement the IInterceptor interface:

public class LogInterceptor : IInterceptor
{
	#region IInterceptor Members

	public void Intercept(IInvocation invocation)
	{
		if (invocation.Method.Name.StartsWith("get_"))
		{
			Console.WriteLine("Getting property");
		}
		invocation.Proceed();
		if (invocation.Method.Name.StartsWith("set_"))
		{
			Console.WriteLine("Property set");
		}
	}

	#endregion
}

What is happening here? If we access a member of the class that this interceptor is, well, intercepting, the Intercept method is call instead. The invocation argument can provide information about the original call but the most important method is the Proceed, which proceeds with the execution of the original non-intercepted code. The name of the method being called can be found by invocation.Method.Name. Note that properties are actually treated as method calls. The name of the method is the name of the property prefixed with get_ if it's a getter or set_ if it's a setter. In this code, all members are allowed to execute, since the invocation.Proceed() is always called. But if we're getting a property, a message will appear immediately before getting it and if we're setting a property the message will appear immediately after setting it. This doesn't have much value other than demonstrating pre and post processing in an interceptor.

In order to take advantage of the interceptor, we can no longer create our Person objects directly but we have to use DynamicProxy's Proxy Generator. The code for that looks something like this:

ProxyGenerator generator = new ProxyGenerator();
IInterceptor logInterceptor = new LogInterceptor();
Person person = generator.CreateClassProxy<Person>(logInterceptor);

And that's it! If we now call person.Firstname, instead of our code (which is not much since we're using an automatic property, but ok) what gets executed is the LogInterceptor. In there, a message will be printed notifying us that a property has being accessed and the invocation.Proceed() call allows the execution to proceed normally, returning the property value to the caller as expected.

I had a lot of fun playing with this tool and creating objects that are instantly persisted to the database without requiring an explicit call to a Save method. Of course, this "instant persistancy" technique is a disaster for the database, since every property modification results to a trip to the database. But it was very interesting nonetheless and I hope I'll have a chance to use more of DynamicProxy in the future.

18Jul 2010 Daleri Structure: the BlogEngine.NET version

For this blog, and for the rest of this site, I'm using the Daleri Structure template by Andreas Viklund. Since I've ported it to BlogEngine.NET, I think it's a good idea to publish it so that other BlogEngine.NET users can use it.

I've submitted it to BlogEngine Theme and until they've reviewed and - hopefully - approved it, it's also available for download here. I hope this helps.

Preview Download for BlogEngine 2.5 Download for BlogEngine 1.6

Screenshot of DaleriStructure

Categories: Themes

15Jul 2010 Δεν θέλει να δανείσει η Σλοβακία την Ελλάδα

Διαβάζω ότι η νέα κυβέρνηση της Σλοβακίας αλλάζει την απόφαση που είχε πάρει η προηγούμενη και λέει τώρα ότι δεν θέλει να συμμετέχει στο πακέτο βοήθειας προς την Ελλάδα.

Από περιέργεια έριξα μια ματιά στην κατάταξη των χωρών βάσει του ΑΕΠ τους, για να δω πού βρίσκεται η Ελλάδα και πού η Σλοβακία... μήπως είναι λίγο άκυρο η Ελλάδα που βρίσκεται στους πρώτους 30 να ζητάει βοήθεια από τη Σλοβακία που είναι σχεδόν στην εξηκοστή θέση;

Categories: News and Politics

13Jul 2010 Too fast for my computer

I've been working on the same project since January and up to recently we had been using Visual Studio 2008 with ReSharper 4.5. A few weeks ago, we upgraded to Visual Studio 2010 and ReSharper 5. I don't know which one is to blame, but the IDE has become a bit slower. Two features in particular are really annoying:

  1. Ctrl+Click to navigate to the declaration of an identifier. This functionality was instantaneous in the previous version. Ctrl, Click, done. In the new version, in the beginning I had thought that it's not supported anymore. But I figured out that there's a small delay. I have to press the Control key, keep it down for almost a second, then the mouse cursor changes into a hand and then I can click. That's really disappointing.
  2. Auto-complete, intellisense, or whatever it's called these days. In the previous version it appeared immediately as I started typing. Now, if I type too fast, it doesn't have enough time to appear so by the time I hit Enter to apply the auto-complete that I know will be applied, I just get only the partially entered input. And then I have to go back, type it again, wait for it, wait for it, ok it appears now I can hit Enter.

As a colleague said when I complained about it: "maybe you're too fast for your computer then".

Categories: Coding

12Jul 2010 Ημέρα Πάγκαλου

Η μπλογκόσφαιρα αφιερώνει την σημερινή ημέρα στον αντιπρόεδρο της κυβέρνησης Θεόδωρο Πάγκαλο, με αφορμή τις δηλώσεις του για το ΚΚΕ.

Σχετικά έγραψε η Krot, από όπου μπορείτε να βρείτε και άλλους που ασχολήθηκαν με το θέμα. Ωραία και η φωτογραφία που έφτιαξε το Ιστολόγιον.

Εγώ να θυμηθώ μόνο ότι προεκλογικά ο Πάγκαλος μας είχε τάξει αποδείξεις για τις επιχειρηματικές δραστηριότητες του ΚΚΕ, τις οποίες αποδείξεις ακόμα περιμένουμε.

Η ουσία είναι ότι τα ΜΜΕ είναι τόσο ισχυρά που μπορούν να σε παρουσιάζουν ως φωστήρα της πολιτικής, ακόμα κι αν είσαι ένας κύριος τίποτα (όρος με τον οποίον αποκαλούσε ο Θεόδωρος Πάγκαλος τον αντίπαλό του Δημήτρη Αβραμόπουλο όταν διεκδικούσαν το δήμο της Αθήνας). Χαρακτηριστικό και ανατριχιαστικό παράδειγμα η επί σειρά ετών εξύμνηση του Καραμανλή και η μετέπειτα καταβαράθρωσή του μέσα σε μία νύχτα. Όσο κάποιος προβάλεται ως «σοβαρός» πολιτικός, τόσο θα εξακολουθεί να θεωρείται σοβαρός από πολύ κόσμο.

Ακόμη, ένας χύμα τύπος όπως ο Θεόδωρος Πάγκαλος είναι πάντα χρήσιμος για το κομματικό ακροατήριο που κινείται στα γηπεδικά επίπεδα, ώστε να μπορεί ο οπαδός να πει στον αντίπαλο οπαδό «σας την είπε ρε ο Πάγκαλος». Μιλάμε για το ίδιο ακροατήριο που όταν ο Αντρέας είπε το mea culpa, νομίζανε ότι αποστόμωσε τους αντιπάλους του.

Από την άλλη αυτά που εξαπολύει ο Άδωνις Γεωργιάδης εναντίον του ΚΚΕ και της αριστεράς γενικότερα, όπως τα ακούω από την Ελληνοφρένεια, είναι μακράν χειρότερα. Ίσως να είναι και λίγο αποπροσανατολιστική η όλη υπόθεση, δεν ξέρω. Στην ουσία των πραγμάτων, ένα ενδιαφέρον άρθρο για τις αμυντικές δαπάνες της Ελλάδας. Έχει πλάκα όταν το εξηγώ στους ξένους. Πάει περίπου ως εξής: ναι η Ελλάδα έχει τεράστιες αμυντικές δαπάνες, για να πάρουμε το δάνειο από τη Γερμανία συμφωνήσαμε να αγοράσουμε κάτι υποβρύχια που γέρνουν, για τα οποία θα πάρουμε μάλλον κι άλλο δάνειο, και τα αγοράζουμε επειδή ανταγωνιζόμαστε σε όπλα την Τουρκία, με την οποία είμαστε σύμμαχοι στο ΝΑΤΟ και προωθούμε την ένταξή της στην ΕΕ. Κάπου εκεί νομίζουν ότι τους κάνω πλάκα.

Μάλλον δε μου «βγαίνει» η συμμετοχή στην Ημέρα Πάγκαλου. Ίσως, όπως με πολλές ενοχλήσεις σε αυτή τη ζωή, και αυτός να έγινε συνήθεια.

Categories: News and Politics

12Jul 2010 070-536 Again

Today I took again the 070-536 exam and I passed it once more, this time with an even higher score (861, while the previous time I had scored 838 points). I'm crossing my fingers that this time the testing center will not go bankrupt... hopefully within a few days I will get a notification from Microsoft verifying that I passed the exam. In combination with the 070-528 that I had passed on March, I should now have the MCTS .NET 2.0 Web Applications certification, which is my first certification!

Categories: Personal

Recent Comments

Comment RSS

Tag cloud

Month List

Log in