Some Google services do not work today (in firefox only?!)

Since yesterday there are problems connecting to Google:

Reply from 64.233.167.99: bytes=32 time=152ms TTL=9
Reply from 64.233.167.99: bytes=32 time=151ms TTL=9
Request timed out.
Request timed out.
Reply from 64.233.167.99: bytes=32 time=150ms TTL=9
Request timed out.
Reply from 64.233.167.99: bytes=32 time=151ms TTL=9
Reply from 64.233.167.99: bytes=32 time=151ms TTL=9
Reply from 64.233.167.99: bytes=32 time=151ms TTL=9
Reply from 64.233.167.99: bytes=32 time=151ms TTL=9
Reply from 64.233.167.99: bytes=32 time=151ms TTL=9
Reply from 64.233.167.99: bytes=32 time=152ms TTL=9
Request timed out.
Reply from 64.233.167.99: bytes=32 time=151ms TTL=9
Reply from 64.233.167.99: bytes=32 time=150ms TTL=9
Reply from 64.233.167.99: bytes=32 time=151ms TTL=9
Request timed out.
Request timed out.
Request timed out.
Reply from 64.233.167.99: bytes=32 time=151ms TTL=9
Reply from 64.233.167.99: bytes=32 time=150ms TTL=9

There are time-outs connecting even from the states.

Really strange. Search and Calendar work fine, Gmail does not even load:

Loading…
This seems to be taking longer than usual.
...

Google reader does not load.

It all on periods - it works, it doesn't, ...

Update: Gmail, calendar work in IE, they do not in firefox - no idea.
A friend experieces the same issues but with different services (Docs)...

dasBlog, medium trust and pingbacks

I had an issue for quite a while with pingbacks in dasBlog:

Error:
System.Security.SecurityException:
Request for the permission of type 'System.Net.WebPermission, ...
failed.

at ...
at newtelligence.DasBlog.Runtime.Proxies.WeblogUpdatesClientProxy.Ping(String weblogName, String weblogUrl)

at newtelligence.DasBlog.Runtime.BlogDataServiceXml.PingWeblogsWorker(Object argument)

The action that failed was:

Demand

The type of the first permission that failed was:

System.Net.WebPermission

It comes up that medium trust allows opening connections only to originHost (I guess localhost).

Here's how I solved it:

go to

%windir%\Microsoft.NET\Framework\{version}\CONFIG\web_mediumtrust.config

and find

<IPermission class="WebPermission" ...

and add some additional URIs:

<IPermission
    class="WebPermission"
    version="1">

    <ConnectAccess>
        <URI uri="$OriginHost$"/>
            <!-- [Mihail Stoynov] dasBlog needs it for pingbacks START -->
            <URI uri="http://rpc.weblogs.com/RPC2"/>
            <URI uri="http://rpc.technorati.com/rpc/ping"/>
            <URI uri="http://ping.blo.gs/"/>
            <URI uri="http://rpc.pingomatic.com/"/>
            <URI uri="http://ping.feedburner.com"/>
            <URI uri="http://api.feedster.com/ping"/>
            <URI uri="http://xping.pubsub.com/ping/"/>
            <URI uri="http://api.my.yahoo.com/RPC2"/>
            <!-- [Mihail Stoynov] dasBlog needs it for pingbacks END -->
        </ConnectAccess>
</IPermission>

These addresses were in %dasBlog%\SiteConfig\WebServices.xml

Stunning change (Laptop overheating, part II)

I had some free time today (just trying to avoid studying) so I decided to dismantle my laptop (due to heating problems).

With some help from my roommate (a lot more experienced than me in that area) I finally found the screw that stopped me the last few times and opened it.

Everything was fine until I settled my eyes on the fan. But first to explain - the fan gets fresh air from beneath it and blows it through a radiator. The radiator itself is connected with a heat pipe to the processor, graphics card and some other stuff. So back to the story - I'm seeing the radiator and the fan and between them I see a "block" of dirt - it was like a chocolate bar - thick and shaped like a rectangle. (Sadly enough I was so excited that I forgot to take pictures).

So after an hour of cleaning and few attempts of assembling it (one of the times nearly until the end until I saw the fan standing outside), we tried it.

Amazing.

The temperatures before the cleaning:

The processor:
65-85 depending on the usage and access to fresh air (being on a couch for example)

Graphics card
65-80 depending on the usage and access to fresh air

HDD
No thermometer, but generally quite hot.

After the cleaning:

The processor
40-55 The fan doesn't even start, but when it does start it could drop it to 39 (previously a number I could only dream for)

Graphics card
~55; After I watch a movie I could say more.

HDD
mild to warm

I'm having ~20 degrees drop in temperatures.

That's amazing. It was undreamed of.

Update: pictures of the dirt in the radiators:

  
 

Exams

The last 30 days I've been taking a lot of exams (part of my master's degree).

Since January 26th until today I have
7 (seven) taken
3 (three) pending
2 (two) to go

That's a whopping 12 exams in a month.

Pending means awaiting results.

Please cross your fingers for the last five and especially for the last 2, because they are the cherry on top of the ice-cream - hardest mother F*ers ever.

Few words on Skype

I've always thought that whenever you distribute software or a service that does not need a central server that is under your control, people will always find ways to break that software or service for various reasons - to use it for free (think of Windows), use it for prohibited in the EULA purposes ( A good example would be ripping a movie or an Audio CD and distributing the ripped content).

I've always thought that even when having a central server but distributing clients (client applications) to the users would be hard to enforce the policy you want - ICQ guys (Mirabillis, now AOL if I'm not mistaken) would like you to use the official ICQ client because they sell ads (ads are shown in message windows), but I'm not using the official client and many others aren't.

So the perfect solution (in my opinion) would be to sell an online service - like what google is doing - search, gmail, ads, picasaweb, calendar, reader, gtalk are only a few that I'm using (without the ads). There are offline/thick client applications that google has, no doubt, but the majority is online with a thin client (browser).

Well guess what, there are companies that have a business with an offline client (thick client) that are doing their best to avoid all these problems.

All the other popular (and maybe unpopular) messenger networks have their protocol studied and many free and not so free clients written (trillian, pidgin, qip....., even online: meebo....). All of them, icq, gtalk, hotmail, yahoo, ... except for one - Skype.

Think, why is there no other client for the Skype network? Not even for chatting. There is no other that I know of. And I've searched.

Here's an article that explains why:
http://www.secdev.org/conf/skype_BHEU06.handout.pdf

It is kind of freaky - these guys have made everything they can think of to make it as hard as possible to reverse engineer the client, the protocol, the whole idea.

Skype is amazingly hard to debug and investigate - it has parts of it's code  compiled at runtime, it checks timestamps to see if there's a breakpoint. It calculates pointers at runtime to avoid debuggers. It has bogus code inserted, some code encrypted, all is really well obfuscated.

It's the same with the protocol - encrypted, hard to detect, hard to stop/filter by an administrator.

Even freakier - they have skype clients acting like proxies or routers for other clients - your client may be one. There are 20 000 worldwide.

The author says there is no antivirus that could detect a virus or a trojan if there was one. Skype client is the perfect blackbox - freaky.

They can read what ever they want from your machine and transmit it back to their servers and since the protocol is unreadable nobody would know.

Skype guys did a good job at protecting their business, but they created something far more capable that could be used for far more (how to characterize it) undocumented and unwilling-by-the-user things.

Pictures in blog entries, part II

Part I is here
It's really annoying to have pictures in the blog.

Here are a few more reasons why I find it hard:

  1. dasBlog only allows adding pictures one by one. Of course I know were is it uploading them to, but this is cheating and I avoid doing it.
  2. Thumbnails have to be done manually.
  3. Making a picture a link (<a href...><img src../></a>) is quite hard (see this) - the raw html editor has to be used.

Of couse images can be linked from external sites, but I wouldn't want to depend on that because links can change.

I was thinking of directly copying thumbnails from picasaweb, but then all the styles also came through and broke the whole idea.

Another think I was thinking was to embed the flash picture viewer from picasa, but it only works if you read the entry from the website directly. Google Reader blocks it:

Picasaweb picture viewer (you have to read the blog entry directly - I have no idea which rss readers support it):

If someone has had the same issues, please share your experience and possible solutions.

Sharam, Cedrik and Yasen (Deep Dish in Sofia)

Half of Deep Dish was in Sofia. The party was great. Personally I enjoyed Cedric more than Sharam. Cedric made contact with the public and whenever the euphoria started to leave he took some action to bring it back, while Sharam started the beat and didn't care that much

Here are some pictures:

There was no one around eleven

  
  
 

Sharam and Cedric

This guy was constantly fixing something

Why were they at the party - I have no clue

Full size here

Pictures in blog entries

A really annoying lack of functionality in dasBlog is emerging in my mind.

That's what MS Word has:
(the pictures are into the text, which is quite nice)

Here's how it's done in MS Word:

In the dasBlog text editor such functionality is missing. Of course, there's raw html editor, but that's too burdensome (I'm lazy).

Even the border in the upper pictures is done via the raw html editor - It's only setting the border from 0 to 1, which is not that hard, but for something more complex I'd rather use a rich text editor.

So if someone knows how to tweak this, please give me a call.

dasBlog and emails

dasBlog can be made to send emails on every single event - comments, edits, referencing, ....
A good practice would be to have a separate email for the blog, at least that's what I did. Then if there's SMTP Server (google mails is perfect for that), the application sends messages to a designated email for every defined event. Perfect.

Another great thing: if your mail account has POP3 (google mail again), then the application (dasBlog) can be defined to check the mail regularly and if there's a mail with a subject containing a secret word, like that:

Subject:

ALABALA  I just passed my exams

Body:

I got an A in <b>Marketing</b> and F in Accounting....

Then the title of the new blog entry would be "I just passed my exams", and the body would be the message body, keeping the formatting. Of course ALABALA should be defined as your secret word in dasBlog settings.

They say, that they support inline images and attachments, but I haven't tried it yet.

There's a small chance for dasBlog to delete all your emails in that account (a special option in settings, that strangely enough is enabled by default), that's why it's better to have a separate account.

Amazing, search Google Images for "picasaweb"

While checking the logs to see what's going on (yea, now it's documented - I do have one reader), I found out that when doing a Google Images search for "picasaweb" one of the pictures in the blog (the blog entry with the picture - here) appeared in the first search page:

Strangely enough, the picture is not hosted at picasaweb, although there is a copy of it in one of my albums.

Weird.

Duplicate entries in Search

While I was updating to dasBlog 2.0 I found out that search displayed duplicate entries (every entry is displayed 3 times). I though I broke it while I was updating.

After doing a clean install and testing the search bug appeared again so I decided to look for the problem in dasBlog itself. I found another blog using the 2.0 version and it too had this bug.

So now I'm happy the "problem is not in my TV".

I'll try to contact the guys and file a bug entry.

And then there's nothing better but to wait for an update.

Newer version

I just updated the software (dasBlog 2.0.x).

While doing so I decided to start the blog at http://blog.stoynov.com and blogging from that address.

Well, I managed to delete two blog entries and to send an updated feed for another 10, which would fill the blog readers people are using.

DEAR READER (I know you're only one), I APOLOGIZE

I think now everything is stable, http://blog.stoynov.com is only a forward.

Imagine a project, part II

Part I was a description of a crazy project where requirements' changes were on a daily basis.

How do you handle such a component?

The most important thing would be to make sure that after every change, every completed task, the project's code is consistent, there is no left-out code, and all tests run.

Automation, daily builds and good code coverage (in terms of unit tests) become your best friend.

Imagine a project

    Imagine you're in a project whose sole purpose is to mediate between a handful of really large systems. Even worse, the application is a front-end for the user, handling his money - so if something goes wrong, guess who gets blamed. In the beginning you investigate and develop a plan how to implement such system. You write an architecture, detailed design, do estimations.
    After a campaign for gathering capital, you start the project.
    Imagine that most systems you depend on, have different rules on how to connect with you - some require you to install systems on-site and these systems to be active, some expect you to implement an interface, and just wait for a call 🙂
    Imagine you neglected the legal part of the thing and you have to compensate that mistake by going through the user interface with a lawyer who changes a significant part of it, which on it's turn changes the business logic.
    Imagine you have a marketing office that says that in order to profit more you again have to change how user interacts with the system.
    Imagine that you're in the middle of development and have to meet a deadline with version one just in few months.

    Imagine there's a component in that system that handles communication between other components in the project. This component is affected by every single change in the whole project - requirements change daily, not to mention the domain model that this component serves.

    ...now imagine you're the team leader of that component...

Firefox's spell checker

Recently (it took me quite a while) I found firefox's spell checker - it's a great thing, but it's not enabled by default

Maybe it's not a bad idea to say a few words for guys that still do not use it (like me).

How to enable it:

Also by default, there are no dictionaries, how to install a few:

then:

I installed Eng and BG, the bulgarian one works well enough:

Oddly enough, I had quite a lot of errors on the blog, by average 2 per blog entry. All fixed now.

Transformations between Domain Models, OOP fails, no such Design Pattern

The issue:
There are 3 (three) Domain Models (Object hierarchies, groups of objects). They are parts of different tiers of an application. Their hierarchy trees are nearly the same.
Why we have three DM is another issue, but is not in the focus of the following discussion.

The task is to convert objects from one Domain Model to another. As I said, the objects are nearly the same, data objects, no logic.

Until now there were static methods that do that. It's ugly - there's another class, inheritance is impossible - logic has to be extracted like this

public static M2Object convertM1toM2(M1Object) { /* logic */ }

becomes

public static M2Object convertM1toM2(M1Object m1) { convertM1toM2(m1, result); }

private static void convertM1toM2(M1Object m1, M2Object m2) { /* logic */ }

because the result is now an inheriting class and cannot reuse M2Object convertM1toM2(M1Object), but can reuse void convertM1toM2(M1Object m1, M2Object m2).

What I proposed was to put converters in one of the Domain Models, M2 was chosen.
so now M2 has

new M2Object(M1Object)
new M2Object(M3Object)

M1Object toM1()
M3Object toM3()

Inheritance with constructors is working smoothly. The problem comes from the toXXX() methods. Inheritance is difficult because the super toXXX() creates the result (base M1/M3 class), but the result in inheriting toXXX() method should be inherited M1/M3 class.

So now I'm thinking of (M2InheritedObject):
protected final void convertTo(M1InheritedObject m1) {
   super.convertTo(m1);   // convert base class properties (reuse happens here)
   /* +extra logic */     // convert inherited class properties
}
public M1InheritedObject toM1() {
       
M1InheritedObject result = new M1InheritedObject();
        this.convertTo(result);
        return result;
}

This method is gonna be reused, inheritance is weird  - this is actually kinda unclean, but the best I can think of.

I'm thinking of some design pattern, (Adapter for example), but that good for objects, not object hierarchies.

If somebody thinks of something, I'd appreciate it.

Comparing source code on check-in and check-out

A great practice I follow is to do compare when checking in and out some source code.

When in a new project (my current situation) it's really fast to find out what code is hot - heavily changed, and how it is changed. Even when into the project, the new guy can follow what others are doing, can find out if someone accidentally overrides something (it happens more often than you think), and generally keep track of what everybody's doing.

There's an overhead involved - the whole procedure needs some time. I try to commit (check-in) relatively often, and on every sync I do compare. This way the committed code by others could not pile up.

There are also tricks to optimize the process - if the comparator highlights horizontally changed code (most of them do comparison only vertically - line by line) you can ignore code formatting changes faster, because no code is highlighted. If some refactoring takes place, you could ignore the changes in subsequent files after you've seen them in the first one. Example (only spaces and quotes changed):

A good reason for frequent commits is that a frequent update would be easier - when you update a file you see a single change.

Comparing code on commit (check-in) makes some bugs obvious and helps avoid typos. Frankly I don't do it always.

Two additional things I would recommend: when committing, write a description (it helps others understand what's going on) and do atomic commits - commit a single task as one thing (select all changed files and commit them together with an understandable description - it's really helpful for the guy after you.
Note: not all repositories support atomic commits, but still it's a good habit.

The second thing is always to update before commit - avoid partial commits and breaking the build accidentally.

Don't make me think

Today I was on a lecture - http://www.devbg.org/seminars/seminar-Software-Engineering-20-February-2008/

Mihail Mihailov had a great lecture on rapid development (based Steve McConnell's book).

It seems I'm gonna have to check out Steve's less popular books - Rapid Development, and something about estimations.

Because of participation I won a copy of "Don't make me think":

It seems like a book I would enjoy reading and that would have the same way of thinking as I do.

It was signed by Mihail, and funny enough Mihail's signature is something like M2:
Cool, I like it.

Laptop overheating comes out to be a Vista Search issue

My laptop started heating more and more until at some point I had to start forcing it to "Sleep". (it has Vista on it)

At some point I got really aggravated by that fact and started investigating. Forums revealed that the issue could be linked to heavy processor usage.

Process Explorer showed that I had some wierd behavior even when the machine was idle (Indexing service is disabled - dummest thing ever) - explorer.exe taking 100% for 5-10 seconds.

Repeatedly.

There was a wierd dll doing that (SHLWAPI.DLL):

At some forum I found out that this was related to the start menu search. WTF?

It comes out that the start menu search (which I find one of the few useful things that come with Vista) does a search in the index first and then goes the the hard drive.

We don't want that.

There is an option in the start menu settings which stops that - problem solved.

The good thing is that while searching at the forums I found a pretty useful tool - Dell fan control - one can see everything and EVEN control fans:

dell fan control.png (78.88 KB)

DNS Configuration issue - partly solved

A while ago I had an issue with accessing gateway machine by its external network address as discussed here: DNS Configuration issue

The solution with the local DNS server kinda worked - now there is a local DNS server with local names (machine1, machine2...) and mapping the domain names (stoynov.com) with the local addresses. It works pretty well.

The only problem is synchronizing the sub-domains (msdnaa.stoynov.com) with the local DNS server - now they should be added by hand. Kinda sucks. The good thing is that there aren't too many of them.

DNS Configuration issue

There's this problem I've been having for some time.

I have a small server (http, mstsc, file-, ...) at home. It has a real IP address. It also acts as a gateway (AP, lan, bluetooth lan) and shares it's internet connectivity. For that reason that machine acts as a DNS and a DHCP server and has an internal IP address.

There's a domain name resolving to the external (real) IP address.

The problem is seeing the the stuff that should be seen from the outside world from the internal network. All that stuff works when using the internal IP to access that machine, so it's not a firewall issue.

What works and what not: pinging the external address works, telnetting to external IP:80 fails as with any other port.

A simple site wouldn't mind internal or external address.
My blogging application on the contrary would fail because the resources (pictures) are with FQN URLs.
And I would like to make this work in a pretty way.

One solution - local DNS server supplying the internal IP address for that domain name.
This works now, but my local DNS has to have an entry for every single domain/sub-domain - this approach sucks. I also have different services exported on the two different IPs and this local DNS approach break that.

I have seen this problem with the networks of midsize companies. Example with deploying a product inside that network (have to supply internal names).

I'm looking for a better solution.

Anyone?

Car accidents' day, part II

Look here for part one.
I had promised myself until the end of the day to use only first and second gear - I didn't do it.

So what happened until that notorious day was over.
It was snowing all day and after work I decided to go to a nearby mountain (Vitosha) and test my driving skills on an empty road. At some point I parked outside the cleared road to see the view to night Sofia. ...and I couldn't get out of there - the car was stuck in high snow. Digging was necessary. To dig I used a thing I bought for cleaning my windshield - it did an amazing job and I got out.

Few turns and a lot of drifting after that I lost control and got stuck (again!) in ditch stopping just a few inches from a tree. The car was inarguably unable to get out of there on it's own. I was just imaging how now I should start calling friends (it was around 12 o'clock already) which would arrive at least an hour after I called them, when I saw some lights. I got out and raised my thumb and these guys stopped. I had a rope and a Subaru 4x4 got me out in no time. And the car wasn't damaged at all. What a day.

I definitely believe in god now.

Unfortunately there isn't a single picture of all the stuff that happened.

Car accidents' day

Today for a while I started believing in god.

I had to get up really early to take a friend to a car repair shop. It was (and still is) a rainy day and I was really sleepy. On the way there (driving kinda fast) I missed a right turn and went in the left lane (missing two cars and a van, whose driver lost control and stalled the thing missing me only for half a meter - fortunately he didn't hit anything). I stopped, apologized and continued on my to the shop without even my heart rate going any faster - I guess I was too sleepy (but not too much - as to avoid the accident).

Few hours later getting out of a parking lot I hit a car - quite a limousine with some mafia guys in it. Only a scratch on it and nothing on my car. After hearing the regular threats on my life, we (me and one of them) decided to call the police. Now is the time to mention that driver had parked on a bad place causing a jam and a lot of horns. He then moved the car to a different place but still causing a jam and a lot of angry drivers. At some point he decided to leave without even telling me. After a few minutes I called the cops to tell them not to come. I didn't even get a ticket.

What a day.

Until the end of the day I'll use only first and second gear.

Wierd eclipse configuration

On a recent project I joined I was amazed to see how things were working in regards to the IDE.

First, the environment was not uniform, there were:

  1. An
    ad hoc approach towards the IDE - different IDE versions and different
    set of plugins. Good plugins were not easily distributed among all the
    developers.
  2. Different way of
    getting and storing the local version of the source code - different
    plugin for the IBM ClearCase. Some people even downloaded and committed
    the source manually - through an outside (to the IDE) application.
  3. no
    one-step build even for debugging - the building required a few manual
    steps to build and run. Some developers did not use debugging, some
    used it manually since the IDE could not automatically deploy everything

So after some days on the project I proposed to make a uniform environment that would have automatic building and deploying.

Maybe
now's the time to give some info on the project: Web project including
ajax written in java, IDE: Eclipse. Lot's of legacy code and legacy
dependencies (which had to be removed).

The problems:

  1. Scattered source code and resources:

    There were several projects and each had the source in a java directory, some web resources in a web directory and all kind of tests plus test resources in a tests directory.

  2. Dependencies on numeroous (~150) libraries scattered around.

So
first I had to separate web content from source code. This could work
with linked folders. So I created a few java projects with only the
source code.
Then create a new web project that depended on all the
other projects and had several linked resources for all the web
content. The hardest thing was that in an Eclipse web project one can
have only one folder that's gonna be the root one, vis à vie you can't
have two directories with web content that shall be deployed in the web
root folder. (At least it looks that way when one goes through the configuration of a web project)

After some research it appearred that actually this was possible (manually):
Web-project/.settings/org.eclipse.wst.common.component:


So after this was done the only thing left was to configure the deployment to different servers.

So the moral of that story is that even with a directory structure that complicated one could be able to abstract all that from developers and create an IDE that can do most common tasks automatically.

Bowling sucks

I just can't play this freakin' game. I hate it. At least today for a first time in my life there were 2 games at which I was NOT last. I don't care what you think - for me this is a progress. Even in one of the games I was 1 point from being second. And I'm playing with with a bunch of guys that can't do a 100. I really suck at this game...

...but who cares - I had a really good time 🙂

What the F am I doing home on a Friday night? I'm just getting old 🙂

Where's the technical part of this blog?

Lately (maybe even since I started the blog) I haven't written a technical post in this blog. Mostly I'm posting fun stuff (like the last one) or complaining about my fights with management (like this) or talking about life and the endless string of obstacles it puts when one strives for happiness (like this one).

Why's that? I don't know. Maybe writing a technical post requires more time than just the usual gibberish. Maybe I just need an outlet for the negative energy that I have. Maybe work is getting too much. God knows what else.

Anyway, I have some interesting technical things I wanna share, they waiting in the drafts, but need to be further investigated. I plan to do that sometime soon. I kinda, wanna liven up this blog, and not create yet-another-started-and-left-out-because-I-lost-interest-but-wanted- -to-try-out-in-the-first-place-because-it's-what-everybody-does-these-days blog.

Also I guess I'll continue to waste the time of everybody that reads this blog with the things that are on my mind, but, hey, it's a good place to channel out bad energy 🙂

I also noticed that I already have readers. Interesting. I didn't expect it. Haven't told a lot of people about it. Thank you for the attention 🙂

Have fun,
M

Fighting lost causes

I recently realized that I want to be the moral winner of every argument. The price doesn't matter. I'm ready to sacrifice everything for it. I just feel better if I do win. I take personally every injustice in the world and sympathize with the victim and not the winner and I take it personally if the injustice is not righted.
... and I go too far. And when I go too far I start regretting for loosing it. Then I become too humble and people take advantage of it.

It's hard to accept a lost cause, so I fight them long after they're clearly lost. I guess my ego cannot accept failure. I guess I have an ego that's too big. (Did you notice how many times I started my sentence with an 'I' ?)

But at least I realize it, right?

Here's a good article on ego:
Are You an Egomaniac?
(read the whitepaper at the end - it's worth it).

To try not to take it personally

Sometime ago I was having some "disagreements" with "higher management". The guys (from the "higher management") had no grounds really, did speak in a tone that was inappropriate and tried to convince me that I should feel guilty defending my point of view.

At some point I was really feeling bad, couldn't work and it was really difficult to focus on the tasks at hand. I did take it personally. I was expecting the righteousness to triumph. I was expecting the other side to confess of being wrong and apologize. That didn't happen.

I'm a Leo and I expect righteousness. I did not take into account my purpose of discussing my issues with the higher management.

At some point one of the guys on the other side took things personally and lost his temper. This sobered me up. Then I realized that his behavior is counter-productive. His loosing his temper has worked in my advantage.

What I'm trying to say in this post is that taking things personally will probably not work in one's favor. There will be so many times that things will not look right. At some point I did ask myself what is the purpose of the talk with the management. When I answered my question I realized that in order to achieve it I should change my behavior and stop asking god to administer justice.

Keeping self control in times like that is vital. At some point in time it will come back. Loosing one's temper will also at some point strike back and not in the good way.

The other important lesson I learned is: patience. Currently things look like I've lost, but the truth is that I couldn't have won anything more, so getting angry will only make me loose more.

Лора

Една приятелка почина вчера.
Тъжно: https://mihail.stoynov.com/blog/2007/08/15/InMemoriamLorkis.aspx

За първи път в съзнателния си живот се сблъсквам от толкова близо със
смъртта. В началото нищо не почувствах, но днес разгледах снимки и ми
стана адски тъпо. По-скоро тъжно и мъчно.

Наскоро си мислих какво става ако нещо ми се случи (всички ми разправят, че шофирам доста опасно) и си мислех, че е хубаво да напиша някъде до къде са ми стигнали делата и семейството ми да има отправна точка - да може да се възползва от това, което имам.

Също наскоро една приятелка ми каза, че готините хора си отиват
по-бързо. Вярно е. Лора беше един от най-готините хора, които познавам.
Общото мнение е, че беше много усмихната. Така е, беше. Но на мен много
повече ми допадаше това, че беше добър приятел. Не отказваше помощ. Ако
съм искал да се забавлявам винаги съм търсел нея. Напоследък като
излизахме беше по-скоро като гид на софийските заведения. Знаеше ги
всичките. С нея постоянно беше забавно. Фен. Беше от готините хора.
Беше точна. Беше готова за всякакви простотии. В нейното присъствие се чувстваш в приятелска обстановка.

Като съм тук сега и животът си върви. Сигурно в БГ е много по-тъжно.
100% е - всичките ѝ приятели са в траур, родителите ̀ѝ също. Не искам да знам какво е на родителите ѝ. Единствено дете. Децата винаги трябва да надживяват родителите си. Винаги. Тук никой не скърби, защото не я познава и мен това ми държи настроението добро, ама само като погледна снимките ... Слушам едно
парче вече втори ден. Само него въртя. Eva Cassidy - autumn leaves

Много е хубава

Сега си мисля какво мога да направя, но то няма какво да се направи. В БГ всичките ѝ приятели ще се погрижат.

Питаха ме дали не съжалявам за нещо, което съм пропуснал да ѝ кажа. Не знам. Може би не. Не съм си траел - всичко съм ѝ казвал. Може би съжалявам, че толкова често я наричах "пиянде". Тя го приемаше на сериозно. Не си пиянде, бейби.

Чао, усмихвай се дори там горе, не пуши толкова много и започни да си отспиваш.

Having a blog

 Having a blog is not as easy as it seems.
 I wanted to have the blog on my own server. So I had to find the proper software for that. I had to install it. One day is gone.
 Then I started writing. This is easy because I'm full of useless stories.
 Then I had to subscribe to my own blog in every possible reader, so I could see how it looks like inside it. In google reader it has the " by Your DisplayName here!" suffix which I don't know the source of. Also in google reader it didn't display my post with the Amsterdam pictures (this one).
 Then I have to define the look and feel so that it looks good to me.
 Then I have to make sure that my posts are final, because frankly I don't know what happens if I make a change to a post.
 Then I have to make sure that I don't make syntax or grammar errors, because ... it's obvious.
 
 And finally I have to be persistent and write in a consistent manner in regards to time. Which is the hardest thing.

 But frankly I don't care about all that, the important thing is that I have a blog.
 Let's see how that would work.

JavaScript and its traits

This is a story about my trying to print a date using javascript.

I was working on an ajax component and had to display a date in the following
format: YYYY.MM.DD.
First of all js (javascript) doesn't supply a formating method. At least
I didn't find one.

Then I tried to get the months using the js method Date.getMonth().
It comes out that the months are in the range 0-11, and not 1-12 as
expected. WTF?

After that I try to print the day, logically using the Date.getDay(). Wrong.
The getDay() returns the day of the week (0=Sunday, 6=Saturday). I read
a little more. The correct method is Date.getDate(). I expect the range
0-30, again wrong. The range is 1-31. Go figure...

Then I try to print the year. Again a surprise. Years before the year
2000 are returned in a two-digit format. The year 1997 is returned as
97. And the biggest problem there is that the js calendar (a fancy
js thing that we use to choose a date) sees 97 as the year 97
and not 1997. Crazy!

JavaScript sucks. Sucks big time.
How about a good naming convention?

And if you think java is better, look at this:

If you have a java.util.Calendar object and want to see the time in
milliseconds since the start of the Era (00:00:00 01.01.1970) you have
to write this:

calendar.getTime().getTime()
\________________/
 returns a Date
\__________________________/
     returns a long

Does this look clean or neat? Would it be clear if I didn't tell you
what it did? For me - not really.

Again, how about a good naming convention.

And don't even get me started on inline conditionals - in java and in
javascript they have different priority. Again: go figure... One has to
put extra brackets just to make sure.