ngeor.net | blogProudly under construction since 2010

31Aug 2010 1142

[ Ελληνικά ]

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

[ English ]

Starting tomorrow 1st of September smoking is forbidden in all public closed spaces in Greece. There will be a dedicated phone line, 1142, at which people will be able to communicate their complains and report violations of the law. Given how much Greeks smoke, the following drawing is a small comment about the 1142 phone line.


1142 smoking line might be busy

31Aug 2010 Job Interviews: Programmer vs Male Suit Model

[ Ελληνικά ]

Όταν ένας προγραμματιστής πηγαίνει σε συνέντευξη για μια δουλειά γενικά συνιστάται να φορέσει κουστούμι και γραββάτα, αν και δεν πρόκειται να τα ξαναφορέσει ποτέ πια πέρα από την συνέντευξη. Αναρωτιόμουν αν συμβαίνει το αντίστροφο αν είσαι υποψήφιος για θέση μοντέλου που φοράει κουστούμια και γραββάτες...

[ English ]

When a programmer goes to a job interview it's recommended and expected that he'll wear a suit and tie, even though he's most likely not going to wear them again after the interview. I was wondering if the same applies to people who are interviewing for a job as male suit models...


Programmer Interview

15Aug 2010 First Umbraco experience

Today I played a bit with Umbraco for the first time. I mostly focused on its multilingual support, which is a feature I usually expect from a CMS.

Friendly URLs

These days it seems that if your URL has a file extension, such as .html or .aspx, it's a sin. I don't get why an extension matters so much for SEO but I'll play along. Umbraco supports this out of the box, by modifying the web.config file. In appSettings, find the property umbracoUseDirectoryUrls and set it to true. That will give you the popular extensionless URLs.

Multilingual Support

Being a noob in Umbraco, I googled around a lot to find information about its multilingual support. Most of what I did is based on this article. The basic approach is to indicate the language in the query string. I'm going to do the same thing, but I'll use friendly URLs by modifying the configuration file UrlRewriting.config, which is in the conifg folder. I added the following rewrite rule:

<add name="languageRewrite" 
    virtualUrl="^~/(en|el|nl)/([0-9a-z\/]+)"
    rewriteUrlParameter="ExcludeFromClientQueryString"
    destinationUrl="~/$2?lang=$1"
    ignoreCase="true" />

with this rewrite rule, I get virtual URLs in the form: http://mysite/language/originalurl that will be translated to http://mysite/originalurl?lang=language without the user seeing this translation. This is the way I have organized the URLs in my own website and I like it, but in my case they're not virtual; I have to create them individually. One good enough reason for my to migrate my site to Umbraco :-)

Using the querystring parameter

Now all I need is my templates to be aware of this new query string parameter. In the tutorial I consulted I got lost in the XSLT magic, so for the time being I'm using the very simple approach of ASP.NET. Inside my page template:

<% if (Request.QueryString["lang"] == "el") { %>
    <umbraco:Item field="message_el" runat="server"></umbraco:Item>
<% } else { %>
    <umbraco:Item field="message" runat="server"></umbraco:Item>
<% } %>

It's ugly, but it works and it looks familiar to the ASP.NET developer. If the language on the query string is Greek (the code is el), use the message_el field. Otherwise, fallback to the default (English) message field.

Overall experience

I also played with Media and I managed to display my images (it wasn't as straight forward as I would expect). I had a first taste of XSLTs, Macros and the usual CMS stuff, Document Types, Contents and Templates. XSLT in particular seems to be the way you can do powerful stuff with Umbraco, but I haven't gone there yet. For the next time, I'll try to use the Dictionaries for localized text, in combination with what I have already and try to make the ASP.NET template more reusable.

Tags:

10Aug 2010 How to fail your project

The following list presents a few ways to screw up a project. Please use it only to save your project and not otherwise. Using this list for intentionally screwing up a project is forbidden.

Don't write documentation. Why spend time writing down stuff that nobody reads anyway? Instead use face to face conversations where everyone leaves happy with their own conclusions. Make sure that you don't include in these conversations other people that might benefit from them. The best thing to do is keep them out of the loop and let them continue with their work. Don't communicate the results of these conversations with e-mail or any other tangible means; this can lead to proof and proof can lead to documentation. If you do send an e-mail, follow the same rule and don't send it to anyone who might actually gain knowledge from it or provide additional or different information. Every bit of knowledge must be kept in a "he said she said" level, so that nobody can be held responsible about anything.

Don't respect the coding guidelines. Code is poetry, poetry is art and art should be free. Don't listen to the lead developer who insists on maintaining a coding style. Live for today and forget about tomorrow. All these warnings that ReSharper (or anyother tool) display are for informational purposes only. If the compiler can read it, then the other developers can read it too. Extra bonus if you type in documentation in broken English that only you can understand.

Don't write unit tests. You know that it works. You tested it from the GUI. Once. Well, sort of. Anyway, it doesn't matter. If the other developers find out that it doesn't work, they probably are the ones who broke it. Claim that "it worked on my machine" and "I don't know what happened". It's a slim chance that they will be able to present evidence that they didn't break. If the others feel unit tests are important, they can write them themselves. You've got better things to do, like, write the actual code. You're saving the project while the others are slacking off writing unit tests. They should give you a medal!

Don't communicate with the others. If you do something that will affect others, don't tell them. If they are smart they will figure it out themselves. Why distract them anyway? They're busy. And it's a minor change anyway, right?

Don't ask for help. This is a special case of the previous one. If you are not sure about something, don't ask for help. Instead, assume how it should work and just write some code. Ideally, sneak-in the code and don't have it reviewed by another team member. This ensures that other people will consider it a fact. Think of all the endless meetings you just saved your team.

Bonus for international teams: Don't speak English (or whatever language that the entire team happens to speak). Effective communication is only done by speaking in your native language. If you are the most knowledgeable person in the team, this ensures that your job safety is guaranteed, at least until your company goes bankrupt, for some other unrelated reason of course. If on the other hand you're the person who knows the least, you can continue to work happily while the others discuss in their own language about how the feature you've been working on for the past week should be dropped altogether.

If the developers in your team are doing one or more of the above, your project will probably fail in some way. If the developers in your team are doing all of the above, you can rest asured that your project will fail so bad that people will actually discuss about it in the years to come and even refer to it as "that failed project".

Final tip for managers: If you are a manager in such a project, don't make the mistake of firing the person or persons who have repeatedly practiced the above examples, especially if you're the one who hired him. That will make you look bad for hiring an incompetent developer in the first place. Instead, let the mess continue, with the sane developers sinking further more in despair. This way, all the developers will look bad, but you won't, ensuring that your bonus is not harmed in any way.

Categories: Work

4Aug 2010 Δύσκολοι καιροί για φιλέλληνες

Translation in English follows below

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

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

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

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

Είναι ενδιαφέρον το ότι ουσιαστικά βρίσκεται σε προνομιακή θέση σε σχέση με εμένα: έχει γνωρίσει περισσότερες ομορφιές της Ελλάδας από μένα, χωρίς να έχει ταλαιπωρηθεί ποτέ (ελπίζω) από το ελληνικό κράτος. Είναι κατά συνέπεια ένας πολύ καλύτερος πρεσβευτής της Ελλάδας από εμένα γιατί έχει μόνο θετικά πράγματα να πει. Με άλλα λόγια, είναι ένας μοντέρνος φιλέλληνας.

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

English translation follows:

In the last couple of months Greece comes up often in the news in foreign countries. For many people, Greece is a synonym of financial problems, strikes and riots. Greeks are depicted as lazy people that go to retirement at the age of 50. I often have to face this new stereotype and then I'm forced to explain to our western friends that the 8 working hour day is a utopia for my generation in Greece (unless you work for the public sector) while the retirement age is more or less the same (65 for Greece, 67 for the Netherlands).

Besides that, jokes and questions are also common. Jokes are quite nice actually, like the most recent "yeah but if you go for vacation to Greece, maybe there won't be gasoline to come back!" that refers to the recent strike that caused a general lack of gasoline. Nevertheless, the most frequent phrase is the question "what is happening in Greece man?".

In these times, a coworker stands out. He loves Greece a lot and every year he spends his vacation there. His eyes shine when he tries to speak Greek with me; and usually he does a pretty good job at it. He always has something to remember about some city of Greece or more usually about some island. It's not without surprise that, if I remember correctly, he's the only person who hasn't asked me the "what's happening in Greece" question.

Today, when some other colleague joked about outsourcing to Greece now that it's a third-world country and all, he volunteered to move to Greece if we open up offices there. As long as it's not in Athens, he said.

It's interesting that he's actually in a better position than I am: he has discovered more nice things and places in Greece than I have, without ever being harassed by the Greek state in the everyday life (but then, you never know, maybe he has). Therefore, he's a much better ambassador for Greece than me because he only has nice things to say. In other words, he's a modern times philhellene.

I hadn't met him for quite some time and I have to confess that it felt really nice to listen to a foreigner saying only the best of things for Greece. I guess it hadn't happened for a long time now.

Categories: Personal Being Greek

Recent Comments

Comment RSS

Tag cloud

Month List

Log in