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:

Batchography: Function calls in Batch file scripts

The Batch files programming language is a powerful language but unfortunately, not many people know it that well. In an effort to pass the knowledge, in this article I am going to illustrate how to do function calls in Batch scripts.

Let’s get started!

The basics

The following example illustrates how to define and call a function:

@echo off
:main
  call :hello
  call :world
  goto :eof

:hello
  echo This is the Hello function
  goto :eof

:world
  echo This is a second function call
  goto :eof

The following outputs:

This is the Hello function
This is a second function call

From the example above, it is obvious how to call a function and return from it:

  1. Define a function as you would define a label
  2. Use the “CALL :function-name” syntax to call the function
  3. Use the “GOTO :EOF” to return from the function back to the caller

Recursive functions are also supported in the Batch language. Just make sure you avoid infinite recursion. Continue reading “Batchography: Function calls in Batch file scripts”

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: