.NET (283) administrative (42) Ajax (42) ASP.NET (144) bicycle (2) books (152) browser (7) C# (121) cars (1) chess (25) CodePlex (10) Coma (7) database (37) deployment (3) Entity Framework (2) essay (96) flash/shockwave (2) flex (1) food (3) friend (2) game (14) idea (5) IIS (8) javascript (76) LInQ (2) Linux (6) management (4) manga (35) misc (590) mobile (1) movies (70) MsAccess (1) murder (2) music (62) mysql (1) news (96) permanent (1) personal (58) PHP (1) physics (2) picture (261) places (12) politics (13) programming (462) rant (107) religion (3) science (38) Sharepoint (3) software (53) T4 (2) technology (10) Test Driven Development (4) translation (2) VB (2) video (87) Visual Studio (44) web design (45) Windows API (8) Windows Forms (2) Windows Server (4) WPF/Silverlight (60) XML (10)

Saturday, May 04, 2013

The ad-blocker arms race

Funny how ad blocking software (notably Adblock Plus) managed to unclutter the web pages we visit by removing most of the advertising, then how web sites and advertisers raged for months against the practice that saves you from bother, but removes them from their profits, and then how web sites increasingly detect ad blockers and try to convince you what you are doing is wrong. The next step is, of course, updating the ad blocking software to detect the notices web sites put on sites to convince you to remove ad blocking and remove them. Then the sites will hide or show content based on whether you have an ad blocker. Then ad blockers will look for hidden content and show it. Then sites will remove the content altogether. Ad blockers will get stealthy. Sites will continuously poll the server to tell it if the ads are present. Ad blockers will hack the scripts polling the server. Sites will add encryption of messages. Ad blockers will decrypt the messages... ... ... 2030, ad blockers achieve self awareness and start nuclear war in order to remove advertisers.

Now, seriously, if you don't have the Adblock Plus extension (for Chrome or Firefox), you are missing out. Unfortunately there is no Internet Explorer version, but I am sure someone will clone it, if the new versions of the Microsoft browser are designed properly.

Wednesday, May 01, 2013

Life with the Corporation

It is getting close to two years since I've been employed by a large international corporation and I've decided to write a blog entry describing my feelings towards this kind of work. This is not a rant against my employers, mind you, but an attempt to explain to folks what being in a corporation actually means. And the best analogy I could find... is marriage.

Now, while this may seem funny it is also very true, if you ask me. People start their career by looking for a direction, rather than an employer, but they use employment as a tool to find and validate that direction. You may have finished college or university, but it is not clear yet where you would like to work. You still nurture thoughts of starting your own company and selling it for billions. You don't know what exactly you are good for yet. How is that different from when starting your love life? You don't know your "type", you look gratefully to any girl that would look back at you, you still hope you will find that "one true love" that will be pristine, beautiful, smart, good in bed and totally in love with you and your greatest fear is that if you talk to her, all kind of crap is going to spew out because you are not yet sure of yourself, or that in the blessed event you get her to bed, you will suck at it.

With experience comes enlightenment, though. You realize that some companies are not worth working for, that some bosses are just insufferable, that you are actually good at some things and you can pursue a career in that direction (while other directions would be a waste of everybody's time) and that being friends with your employer is nice, but not actually required. You realize you have a "type", a sort of working environment where you would like to work, while making yourself and everybody else happy. You are not working for a large company yet, you are just exploring your options and gaining confidence. "Listen", you say to your boss, "it was a great time working for you, but I need my space. It's not you, it's me. I can do better.". You can do that because you start to know your worth (or at least your minimum worth).

After this period of dating, you start to have longer relationships. You start to like your working place, give your loyalty to it, enjoying when your employers are praised of their product. At this stage, most companies are startups or small branches. Your boss is not far from where you could imagine yourself. Maybe he was a skilled worker too and, after "getting the ropes", he started his own company, thus effectively "graduating" to the next level. It's not so far from the "world as a school" view that many students have. This means if you do something bad, you are likely to get the negative feedback from the clients thrown at you, shouted at, made to feel ashamed for failing "the family". Not different from getting scolded by a parent or big brother or maybe a teacher. When you do something right, your boss might reward you, either by praise or by a bonus. You are also likely to find out what went well. You think of your employer as your peer and you start to get feelings of commitment towards the company, maybe even dream that as you evolve as a worker, you will be more and more appreciated, maybe even become owner, pulling that company up with you.

So, at this stage you think your girlfriend likes you as you like her, that if there is anything wrong she will tell you and that the relationship works great. Great disappointment awaits when you become more and more invested in the relationship and her response is just to smile at you more. At one point you tell her that you need more, time when you face reality and see that she will agree with you and break it off either directly or by remaining indifferent to your efforts. You could, of course, become complacent in this dysfunctional relationship, in which neither will make an effort and the results will be mediocre at best. You will not be happy.

Let's assume that it is over. You took the cold shower, realized that as an employee your role is to do your job and maybe take the blame for the bad things you do. No benevolent employer will come to you, pat you on the back, admit that his company has grown largely because of you and bring you up as a partner. You will become a bit cynical, starting to look less at the interesting work and the smart people and more for objective benefits like salary and working conditions. You still have the passion for what you do, after all, it is the reason you went for this career in the first place: you think you are good at it. You also have a medium large resume that proves it. You may not be your job, but you are your work, still.

This is the moment when the corporation becomes attractive and when they start to want you. The working conditions are great, the money is good, there is a system in place that guarantees quality and that allows you to continuously grow. They will even train you. It's like a new dream, now that the first two (having your own firm or being elevated to partner if you work well) have gone out in smoke. There are people that will pay you more to do the same thing and even support you in becoming better.

Once you go this way, you have a stable place to work, great kitchen, good furniture, console games. You are even allowed to play them if you are doing your job well. Your remuneration is not increasing exponentially anymore, but you have good chances you will get a raise annually, after being reviewed by managers and peers. You hardly hear of any of your clients, unless the entire product line is bad. Occasionally you get whiff of comments from clients that sound wonderful, but just feel fake: lots of "great" and "awesome" for a work you know to be good at best and most likely mediocre. With a corporation the strategy may change at any moment: products abandoned, directions chosen arbitrarily, features appearing out of nowhere. You still remember what it meant to be an important part of a company and so you start suggesting ways of improving the end result, only to be met with condescendent pats on the back. Not only your idea is not very good, it is you who doesn't understand what the company wants. Yes, it would work, but best for you and your colleagues, not for the greater entity. If in a small company your superior was somebody like you, only better or richer or older, now you have people of the same age as you that never did your work and that have completely different sets of values determining what and how you do your job. You really want to please them, but you feel misunderstood and you are incapable of understanding them in return.

You have reached the marriage stage. Your wife looked so good when you first met and she still does, only she walks in loose pyjamas in the house, doesn't smile so much, has completely different habits and a weird value system. Doesn't like what you like, wants you to "compromise" all the time and do things for "the couple". And while you "work on the relationship" the result is boring. You hardly hear her complain, but neither do you say anything, that would be rude, you would hurt her feelings. You read psychology books on how to improve your relationship or how to resolve conflicts without aggression. You do the things that you both like a little instead of doing the things you like a lot. Whenever you feel down, disappointed with your life, you consider all the years you gave to the marriage, the children, the way things might still get better in the future. Maybe it's your fault or you can still fix it somehow.

Just as in a marriage, your company does not pay you for your efforts, but for the fact that any other company would pay the same for a man of your qualities. You don't get to choose the direction of your life, because it is not yours anymore. Your job is to do the things you are told, not less and certainly not more, integrate with the process (maybe with your team, but that's a bonus. Process always beats people in a company), appear pleasant and always consider the consequences of your actions and words. Everybody is polite, even if they fire you or tell you your work sucked. If you somehow get noticed and start a real relationship with your betters you are immediately despised by your peers. You go up in the hierarchy for social reasons. If you are good enough in that, you may join the management track and continually getting raises, bonuses and promotions. Fail to do that and everyone will notice how hard working you are right until the moment they don't need you anymore.

And this is the point when you think "Wow, if I ever get out of this, I will start my own company!" only you spent too much time doing menial work and you lost your edge, you lost contact with any potential clients, you lost contact with your field of work, you got used to the comfort of getting a lot of money on a regular basis. You think "Oh, dear, if I quit this, I will have to go dating again and now I am old and forgot how it is done!". You are not really miserable, you are just not happy. You can live with that.

What do I think? You are not made for a single direction only. You may choose to change it at any time or even walk several at a time. Having chosen a direction, you must never stop. Others keep going forward and will leave you behind. The purpose of money is to allow you to survive. It's for housing, nourishment and maybe a bit of comfort, it is not a "level" you reach, or a unit of your value. Your value is determined by the results of your actions. Shitty actions, shitty value, no matter who's at fault. It's never too late to date, because it is worth finding someone you love, even if you end up marrying her afterwards :-)

Of course, you will all ask me now "Siderite, how come you are not following your own advice? Why do you stay?". There are several reasons. I am a little afraid. There is this economic crisis and no one is actually hiring. There are few startups. If I go somewhere else, I would only be switching one corporation for another. I may also be not "not happy" enough; complacency is in my blood. I certainly have that disgusting habit of watching a movie till the end, even if it is a bad one, just to be able to comment on it in full knowledge. I do feel that I have more things to learn here. Rest assured, though, if I spend too much time considering my options until none remain, you will read it in this blog and know not to follow my example.

Children of Dune (Dune 3), by Frank Herbert

book cover, back when it was only a trilogy The third book in the Dune saga is a strange mix between the first two. It has the epicness of the first, the setting up of the next book like the second and a length that is between the lengths of the previous books. It becomes obvious that Herbert has become too connected to his own characters and he is sometimes talking, so to speak, to himself. Characters say obscure lines that somehow strike a strong emotional or intellectual cord in their interlocutors, giving the impression they are very smart and perceptive, but that's all it is: an impression. There is a strong mix (not to say melange) of behaviours in single characters or of interactions between them that makes no sense at closer examination. If there is a word that would most fit with Children of Dune, it would be "pompous". The characters are wallowing in their hidden powers and arrogantly spewing big words that ultimately mean nothing.

That doesn't mean I didn't enjoy the book. I remember when I was younger I was debating if this or the next, not the first, were the best books. Now I believe that it was somehow a rushed release. A little more effort, maybe even with a splitting of the book in two smaller ones with more substance, would have made this a contender for the title. As such, though, it only mirrors the shine and edge of the first Dune book, while being less powerful. How much time did the idea of Dune mature in Herbert's head before he put it on paper and how much time did he have for Children of Dune, under the pressure of fans and publishers?

If something really hurt the consistency of the story it was the larger than life characters introduced at first: the Bene Gesserit legacy of memory and terrible training, the prescient, the Tleilaxu, the indomitable Fremen. Hard to keep the pace with such monsters. What mistakes could one do having the entirety of their ancestors' memory at their disposal? What effect would knowing the future or taking any shape you desire have on you? What would happen to fierce desert warriors when presented with a life in comfort? These are the questions that the book tried to ask, while it couldn't keep up with the immensity of the described universe and characters. Hard to describe specific bits without spoiling the story, but a good example is The Preacher, or the childish fits of anger on people that were supposed to be weathered by hardship, training and past lives.

Now, Frank Herbert is no fool. He not only noticed that the book he wrote is a little too arrogant, he has a plan. The next book will take that arrogance and throw it in our faces like a sin of all humanity that must be punished. I remember the God Emperor of Dune as a fantastic book and I can hardly wait to read it. But I also thought Children of Dune was bigger than life and now I have changed my opinion. We'll see.

Monday, April 29, 2013

Careful with the new .NET overloads of String.Join when moving to .Net 4.0

I was trying to figure out an issue with our product and, in order to understand what was going on, I copied a class from the project into a small sandbox project to see how it would work. Lo and behold, a problem occurred in one of the utility functions that would have made the entire feature unusable. Yet the feature worked fine, except the little detail I was working on. What was going on?

Let me show you the code first (simplified for your pleasure):
Dim al As New ArrayList
al.Add("A")
al.Add("B")
Dim result as String = String.Join(":", al.ToArray(GetType(String))))

What do you think the result will hold?

In our production site the result was "A:B". In my sandbox project the result was "System.String[]". It took me a little to understand what was going on. You see, the sandbox project was .Net 4.0 while the production site still worked with 3.5. New to .Net 4.0 are overloads for the String.Join method, including one that receives a params array of objects. Since ArrayList.ToArray(Type type) returns Array no matter the type boxed inside, this is the overload that is chosen. The list of strings is taken as the first parameter, stringified, and the result is what you saw.

Conclusion: be very careful of the types you send to methods. Even if Visual Basic automatically casts method parameters, you never know for sure which type it will choose to transform into. And if you want to upgrade a VB project from .Net 2.0-3.5 to 4.0, be careful of the new overloads that have appeared.

Sunday, April 21, 2013

Dune Messiah (Dune 2), by Frank Herbert

Book cover Dune Messiah is the second book of Frank Herbert's Dune saga. It is two and a half times smaller than the first book and it feels almost completely different. Paul has been emperor for some time, not much, but enough for his jihad to bring the death of tens of billions. The government of the universe is now his, a combination of religion and bureaucratic despotism that he foresaw, but could not have prevented. The house of Ix and the Bene Tleilaxu make their appearance. There are conspiracies against Muad'dib and his family from every corner and, if the first book was of his victory over his enemies, however painful, the second book is all about his defeat at the hands of the future. He walks the edge, loses almost everything, all in the name of a better future for human kind. All the characters are weaker, more human, some less human but still weak.

All in all, it is a nice book, well written and interesting, but it felt like a kind of bridge between Dune and the next two books, which have their focus on Paul Atreides' children. We are certainly looking forward to brilliant stories and great writing, but Dune Messiah seemed a little too melodramatic, less focused, with less work done on it. Compared to its predecessor, it seems a disappointment; compared to most other books, it is still great.