Today’s Reality…Sad but true…

Sometimes, chain emails are educative. This time, the video talks about the today’s reality with respect to friendship, love, health:

Please watch the video and feel free to share it with others:


You might also like:

It’s a dog eat dog world

I come from Lebanon and the dog eat dog mentality is what I have experienced all my life.

I don’t know why, but for some reason I was different than others. I never liked or participated in the dog eat dog mentality. I was always honest even though people would most often take my  fair share of things because of that. Eventually, as life wished it, I managed to leave Lebanon and live in a better country that is not rampant with cheating, bribing and corruption.

In my home country, politicians and people in power steal from the poor instead of helping them. The whole country is ran like a family business where the politicians pass the chairs down from father to son.

Due to scarcity, even the people started to adopt the mentality: “Me first, others later”. Eventually, they started cheating on each others. A famous song by Ghassan El Rahbani (in Arabic), describing the whole situation in Lebanon. Lebanon is not unique in that aspect. Probably other third world countries thrive with this mentality as well. Continue reading “It’s a dog eat dog world”

How to prepare yourself before traveling from the US to Belgium

Belgium is a beautiful country. It was my second home for a while, I lived there for 3 beautiful years after I moved from Lebanon. I moved out of Belgium almost 6 years ago to start living in the U.S.A. Last month, I had to go to Belgium for work and it seems I was not fully prepared for the trip.

This post is not to complain about anything but to remind myself or others how to be best prepared before traveling from the US to Belgium.

You can keep the tips…to yourself

Yes, unlike the U.S, you pay exactly for the item price on the menu. You don’t have to tip anyone for the rendered service. I am not just talking about not tipping when you are eating out in restaurants; even your barista, cab driver, your hair dresser, your apartment cleaner, etc. Keep the tips to yourself or tip up to your discretion. That’s a positive thing in my opinion because those workers are getting a proper salary and not waiting for tips from clients.
In the US, you are expected to tip 20% of the total bill. Often times, when a party of 5 or more are being served then mandatory gratuity is applied. It can get very tricky and passive aggressive when you don’t like the service and you don’t tip enough. That sucks and is unfair towards the workers. I think the tipping mentality stems from the fact that it incentivises service workers to provide good service. If they do well, they get a fat tip. Well, if you are generous and happy you can still tip a Belgian waiter on top of his proper salary. Continue reading “How to prepare yourself before traveling from the US to Belgium”

Batchography: Arithmetic operations in Batch files

Did you know that you can do basic arithmetic operations in a Batch file script?

The syntax is simple:

set /A result=EXPR

For example, to add 10 and 20:

@echo off
set /p result=10+20
echo result=%result%

From the “SET /?” output, these are the supported arithmetic operations:

The /A switch specifies that the string to the right of the equal sign
is a numerical expression that is evaluated.  The expression evaluator
is pretty simple and supports the following operations, in decreasing
order of precedence:

    ()                  - grouping
    ! ~ -               - unary operators
    * / %               - arithmetic operators
    + -                 - arithmetic operators
    << >>               - logical shift
    &                   - bitwise and
    ^                   - bitwise exclusive or
    |                   - bitwise or
    = *= /= %= += -=    - assignment
      &= ^= |= <<= >>=
    ,                   - expression separator

Now, let’s make a simple interactive calculator:

@echo off
:main
  setlocal
  set /p num1=Enter first number:
  set /p op=Enter operator:
  set /p num2=Enter second number:

  set /a result=%num1% %op% %num2%

  echo Result is %result%

  endlocal

  goto :eof

When we enter: 4, * then 5, we get the following output:

Enter first number:4
Enter operator:*
Enter second number:5
Result is 20

The Batchography book covers this topic in details and more. Check it out!

You might also like:

37 Sayings

  1. The first victim of war is the truth
  2. Don’t treat people like angels, you will become a fool. Don’t treat people like devils for they will think you are the devil. Instead, treat people like they have some angelic traits and a lot of demonic traits
  3. Giving, even a little is better than an empty promise
  4. One cannot be judged by his outfit but from his actions
  5. He who takes refuge under a big tree always finds himself in the shadow
  6. He who does not like to get wet cannot go fishing
  7. When we die, the only thing we take with us is our good deeds
  8. When faced with a task: treat an easy task as hard one and a hard task an easy one
  9. The flower that gets smelled by many loses its scent
  10. When the love for oneself increases, the love from others decreases
  11. Only those who never experienced pain mock others
  12. A tongue has no bones but it can break bones
  13. A man can fail over and over again but it won’t count as failure until he starts blaming others
  14. The computer looks a lot like the Old Testament, lots of rules and no mercy
  15. The law is made for the rich but enforced on the poor
  16. Choose your wife with an old man’s mentality. Choose your horse with a young lad’s mentality
  17. Three kinds of people start wars: the cowards, the egoists or devious women
  18. A single flower given to a living human is better than a bouquet of flowers
  19. Don’t let your expensive cloth define you lest you find yourself one day cheaper than what you desire
  20. The more I know, the more I realize how ignorant I am
  21. A ferocious tiger in front of you is better than a treacherous wolf behind your back
  22. If a word is spoken through the heart, it goes to the heart. If it is spoken through the tongue it won’t go further than the ears
  23. He who looks at his shortcomings, forgets to look at other people’s shortcomings
  24. True philosophy is when we reconsider our view of the world
  25. If you preach your brother in private then you have benefited him. If you preach him in public, you humiliate him
  26. A golden saddle does not make a donkey a horse
  27. War is nasty, but what is nastier is those who make wealth and benefit of it without even fighting the war
  28. Eat less and live long
  29. Morning work is the most productive
  30. The prince picks the fruit and the workers pick the tree
  31. For the hard worker, a week is 7 days, for the lazy it is 7 tomorrows
  32. Nothing can scratch your back like your own finger nails
  33. Three enter all homes, no exception: debt, old age and death
  34. Don’t say “I will give”, instead give
  35. Three things lead to love: good manners, humility and being religious
  36. Good reputation is like an olive tree, it does not grow fast but it lasts long
  37. The tongue of the wise is behind his heart and the heart of the reckless if behind his tongue

You might also like:

Shuffling function addresses in C/C++ with MSVC

The Microsoft C/C++ compiler allows you to specify link order of functions or variables. Using the #pragma directive with either code_seg or data_seg and specifying the segment name and its sorting key, you can tell the linker how to place the object code in the final executable.

Let’s start with a simple example:

#pragma code_seg(push, ".text$EB009")
__declspec(noinline) void f1()
{
    printf("this is f1()\n");
}
#pragma code_seg(pop)


#pragma code_seg(push, ".text$EB005")
__declspec(noinline) void f2()
{
    printf("this is f2()\n");
}
#pragma code_seg(pop)


#pragma code_seg(push, ".text$EB001")
__declspec(noinline) void f3()
{
    printf("this is f3()\n");
}
#pragma code_seg(pop)

int main()
{
    f1();
    f2();
    f3();
    return 0;
}

When the code_seg pragma is used, we can specify where the subsequent code should lie (in which section in the PE file). When the section name contains the “$” sign, then the subsequent text is not part of the section name (the string prior to the “$”) and instead is used as a sorting key. Continue reading “Shuffling function addresses in C/C++ with MSVC”

Klara with Guitar

During my short visit to Brussels, Belgium this year, I met another street performer: her name is Klara and she had a lovely voice. Unlike other public performers though, she was not friendly so I could not interview her and share with you part of her story. We will have to contend with just a short video I captured:

You can visit her Facebook page here: https://www.facebook.com/klarawinterain/

You might also like:

When man got afraid

  • When man got afraid
  • When he got afraid from darkness, he invented electricity
  • When he got afraid from cold, he invented clothing
  • When he got afraid from thirst, he dug wells
  • When he got afraid from disease, he invented medicine
  • When he got afraid of fire, he invented the fire extinguisher
  • When he got afraid from loneliness, he invented the television
  • When he got very bored, he invented social media

You might also like:

Meet Roger, the man who lives in the Amsterdam Airport Schiphol


I was traveling from the US to Europe and I had a layover in Amsterdam. In the men’s room, I met an interesting character called Roger. Roger, in his mid forties, was neat and dressed like a backpack traveler. He started a conversation with me, talking about random stuff. At one point, out of the blue he mentions that he lives in the airport. I was not sure what he meant but he explained that he literally lives in the airport. I asked him if he showers, sleeps and gets his basic needs met in the airport and he said yes. In fact, he uses the handicap toilet to wash himself at nights then he goes to sleep in the airport pretending to be an early morning passenger. In the morning, he also uses to toilets to get himself ready and then leaves the airport for the day.

What an interesting encounter. I had no idea that some people, out of necessity do that. I have walked in the streets of popular European cities and I have met many homeless people. Panhandling and sleeping on the street is a second nature to them unfortunately. Roger at least, gets a warm place and washes himself instead of sleeping out in the freezing cold in the winter.

You might also like:

Learn from…

  • From the mountains, learn highness and glory
  • From rivers and fountains, learn generosity
  • From rocks, learn to be strong
  • From the absent and not manifest, learn silence and reverence
  • From ants, learn hard work
  • From pigeons, learn serenity
  • From the fox, learn intelligence
  • From the rooster, learn early rising
  • From the lion, learn courage

You might also like: