A day trip to Manhattan, New York City

Back in August, while visiting Boston, I took the Saturday morning Amtrak train to the Pennsylvania Station, New York City. It was a pleasant 4 hours ride in the train. After I arrived, I left the station and found myself in the center of Manhattan.

I was greeted by a bus tour saleswoman. I figured, why not, let me ride the tour bus and familiarize myself with the city. Unfortunately, it was raining the most part of the day.

It was a very busy day. People everywhere and there were barely room for pedestrians. The trash bins were full, homeless people were everywhere and the city was very very dirty. It felt like a zoo. Manhattan is not like what you see on TV. In reality it is a dog eat dog city. People were pushing each other and were very unfriendly. Later that day, I did my best to go away from Times Square and deep into the other parts of Manhattan. The further I got away from Manhattan the more tolerable and pleasant the city felt to me. What struck me most was that on each block you would find a pizza place. No wonder why the Teenage Mutant Ninja Turtles, who live in New York, love Pizza 😉 Continue reading “A day trip to Manhattan, New York City”

Batchography: Converting numbers to characters (or the CHR() function)

In various programming languages, you might sometimes need to convert numbers to characters. In simple terms, each character you see has a numerical representation. The ASCII table  shows the numbers of each character and its corresponding glyph.

Converting numbers to their corresponding characters would be useful to generate a random string for instance. The first step to generating a random string is to generate random numbers between 65 and 90 (upper case ‘A’ to upper case ‘Z’) or between 97 and 122 (lower case ‘a’ to lower case ‘z’).

While the Batch language is pretty primitive, you would be surprised how many things you can do with it. In the Batchography book, I cover various topics that would bring your Batch programming skills to the next level.
batchography-good-res

Get the book from Amazon:

  • Paperback editionbtn-buy-on-amazon
  • E-book editionbtn-buy-on-amazon

flower separator Continue reading “Batchography: Converting numbers to characters (or the CHR() function)”

Batchography: How to do a “switch/case” in Batch files

You have found this blog post because you are wondering if there is a way to express a “switch/case” logic in Batch files.

The short answer is: “no, not exactly”. However, there are ways to achieve the same in Batch files.

In the Batchography book, I explain in details the “switch/case” construct, but in this blog post I will illustrate this mechanism briefly. For more advanced Batch scripting topics, please grab a copy of the Batchography book.

batchography-good-res

Get the book from Amazon:

  • Paperback editionbtn-buy-on-amazon
  • E-book editionbtn-buy-on-amazon

flower separator Continue reading “Batchography: How to do a “switch/case” in Batch files”

Are you Christian? Are you Muslim? What’s your religion? Tell me, I want to feel better

I am writing this blog post just to rant and vent off and share with you one incident that happened with me.

 

The other day, while visiting Vancouver, BC, I was stopped by a family to take a photo. They observed my accent and they asked me where I am from. When I mentioned Lebanon, they wanted to know if I am a Christian or a Muslim. When I said Christian, they felt really happier and more friendly!

If you live in the West, some (if not many) people are Islamophobe. They ask you if you are a Christian or a Muslim so they feel a bit of relief if you have a more “positive” and “peaceful” religion.

I just hate the fact that I have to declare my religion so that others around me feel better. Even if they don’t ask directly, I feel this covert need to disclose my religion. Too bad, what a state of affairs. Having said that, I was born to a Christian family.

Today, based on the current world events, more and more people are brainwashed by the mainstream media to hate the religion of Islam. Where is the real freedom of expression?

When it comes to me, I treat others not based on their religion, but on how they act towards others. I try not to generalize because each person is different.: there are bad Christians as there are good Muslims and vice versa.

You might also like:

The Zen master Shichiri Kojun and the thief

One evening, Zen master Shichiri Kojun was reciting sutras when a thief entered his house with a sharp sword, demanding “money or life”.
Without any fear, Shichiri said: “Don’t disturb me! Help yourself with the money, it’s in that drawer” and he resumed his recitation.

The thief was startled by this unexpected reaction, but he proceeded with his business anyway.
While he was helping himself with the money, the master stopped and called, “Don’t take all of it. Leave some for me to pay my taxes tomorrow”.
The thief left some money behind and prepared to leave. Just before he left, the master suddenly shouted at him, “You took my money and you didn’t even thank me?! That’s not polite!”. Continue reading “The Zen master Shichiri Kojun and the thief”

No Wifi – Talk to each other! Pretend it’s 1993!

no wifi, talk to each otherDo you remember the days when you used to go to a coffee shop to meet and talk with new people?

Well, it is no longer the case. You go to a coffee shop and you see people with headphones absorbed in their own bubbles or just glued to their smartphone screens!

It takes more efforts these days to strike a conversation with strangers because you have to find the right way not to interrupt or annoy people as you start a conversation.

Often times, I also go to a coffee shop to work and focus and thus I don’t want to talk to new people. But even still, often times I want to take a break and meet/talk to strangers. Continue reading “No Wifi – Talk to each other! Pretend it’s 1993!”

7 simple methods to achieve success in life

Source: http://www.jamesaltucher.com/2016/03/started-bottom-now-im/
Tips for success
  1. Study hard when you’re young
  2. Work hard when you’re older
  3. Never shy away from making connections
  4. Leverage your network for opportunities
  5. Life 10% below your means -> save 10% of your income
  6. Don’t foster any addictions (alcohol, cigarettes, drugs, gambling)
  7. Don’t fall for scams

Those really are “proven steps”!

flower separatorYou might also like:

Batchography: How to do string substitution in the Batch scripting language?

There are so many undocumented or obscure features in the Batch scripting language and in this article I am going to illustrate how to do string substitution.

For more advanced Batch scripting topics, please grab a copy of the Batchography book.

batchography-good-res

Let’s get started! Continue reading “Batchography: How to do string substitution in the Batch scripting language?”

The stereogram experience

I first learned about stereograms in 2001. Back then, the term was new to me and I had no idea that it was possible to see 3D shapes on a 2D screen with the naked eyes.

What are stereograms you ask?

A diagram or computer-generated image giving a three-dimensional representation of a solid object or surface

Wikipedia, as usual, has a nice article explaining stereograms.

After a long week of trying hard, researching and learning various techniques, I managed to see my first stereogram:

snowman-softsource
3D snowman

Continue reading “The stereogram experience”