Random Character With LINQ


Just now, I checked my forgotten stackoverflow account. I looked on some common questions and upvoted the good ones. Then I stumbled to this great answer. Why it was so great? Because it solves common problem, just creating random characters, but using such advance thing. I mean people usually just use Random and create character. This awesome man, using LINQ, giving range of characters to create the random set of character. If you are too lazy to see that, you can see the code below.

var chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
var random = new Random();
var result = new string(
    Enumerable.Repeat(chars, 8)
              .Select(s => s[random.Next(s.Length)])
              .ToArray());

all credits goes to dtb

Advertisements

Man Who Cried On Dead Dogs In A Movie


I know that I am not the only one. I use 9gag and there are a lot of people with the same feeling as me. Maybe more or less than I know. Somehow, I think this topic is quite interesting since I cried more when my dog was dead or I saw a dog must die in a movie. Remember Seymour waiting for Fry? I bet you cried like a little bitch back then. If you don’t watch the movie, just imagine you lost your little cutie cat.

Just now, I listened to Baba Yetu. Old song, but it was awe-inspiring for me. I heard it the first time I played Civilization 4. It was the theme song, and I can’t take it out of my mind. I watched this wonderful video, well, at least they are wonderful to me. What comes to my mind is what comes to Christopher Tin¬†when he composed this song? IT SOUNDS SO MAJESTIC!!! It really describes how a simple prayer shows the greatness of our God. It is like, Jesus said, pray like this, because it truly describes the greatness and fulfill your needs.

Now about Baba Yetu, I cried when I heard that song. I cried when Andy must leave Woody and pals to Bonnie. I cried when I have to lost my dog, Shiro and Kiki, for old age. I didn’t cry for times when my little cousin hit his head on a fence. Was that wrong?! I don’t think so! It is just we, people like me, have sad nerves which is triggered when we see something really sad.

For example, seeing an old lady had to sell stick ice for living, I cried. A young man asking for money in bus (commonly seen in Jakarta) because he could have robbed us, but he didn’t do that, I am angry. An old man had to pick plastic bottles to continue living, I pity him. A man with quite big posture begging for money because he is healthy, everything is well and he just sit on near a bus stop, I really want to kick him to death with my boots!

For people like us, we have our own style of compassion and pity and sadness. Don’t call us inhuman or lost your humanity because of us.