100th Post: 100x THANK YOU

We interrupt this program to thank people and entities who are important to The Casual Coder.
We're doing it in Random Order.
This is the output. Cheers!

Thank you to Brian, for the innovative mindset
Thank you to Lili, the UX ninja
Thank you to Rafael, for being my little mathematician
Thank you to Prateek, who turn the impossible into possibilities
Thank you to Shantanu, the amazing super-fast coder
Thank you to Dija, for being my brother
Thank you to Javier, the one and only one architect
Thank you to Sarah, for bringing accessibility and computing together
Thank you to Ricardo, a big engineer with an even bigger heart
Thank you to Ethan, for helping my kids with math, and being such a great friend
Thank you to Wes, pushing the limits of the cloud
Thank you to Sidd, for teaching me the math and coding of risk taking
Thank you to Patrick B, for hiring me into Microsoft after inserting a node in a BST
Thank you to Keith R, a legend
Thank you to Visw, for solving important dormant problems
Thank you to Ju, for the logic of friendship
Thank you to Janaina, an incredible hardcore engineer
Thank you to Lais, for being my second mom
Thank you to Junyan, for building any framework, in any channel, +DP!
Thank you to Janina, for building calculators into search engines
Thank you to Balbir, for being such a restless mind
Thank you to Sister, for being my inspiration
Thank you to Fei, for teaching how to build the proper pipelines
Thank you to Carlos P, the true relentless
Thank you to Esdras, when I taught you, I learned more than you think
Thank you to Howard, for merging virtual sports with advanced computing
Thank you to Max, for finding the problems to solve, and solving them
Thank you to Manish, The King
Thank you to Selma T, determined to succeed
Thank you to Austin, for the incredible professionalism
Thank you to Dani, taking a PhD and applying to software correctness
Thank you to Larissa, for her perseverance
Thank you to Saulo, the guy who 'just wants to code'
Thank you to Mom, by induction
Thank you to Abinash, the money maker
Thank you to Katia G, where it all begun
Thank you to Ram, for teaching me the art of data
Thank you to Selma, for doing all the math with us and making it all work out
Thank you to Vaibhav, a visionary
Thank you to Bruno, no one knows more C++. No. One. Period.
Thank you to Paulo L, for going down to the details
Thank you to Mansi, for bringing computer science to the world of sports
Thank you to Rahul, a leader by example
Thank you to Alex V, for tackling the hardest problems
Thank you to Vlad, a wine toast for the UX and BE
Thank you to Nice, for feeding me with protein and love
Thank you to Alex V, the JS and UX master
Thank you to Taras, the most brilliant engineer ever. Period.
Thank you to Kyle, for bringing tens of tech together
Thank you to Nick, who taught me that any UX is possible. Any.
Thank you to Shruti, for teaching me how to be expert in a tech
Thank you to Hazim, for teaching me religion and math
Thank you to Renata, for supporting me along the way
Thank you to Chris, for developing pipelines and bots relentlessly
Thank you to Sarvesh, the humble and just brilliant engineer
Thank you to Moreira, he will solve any problem
Thank you to Jonathan, a prodigy engineer
Thank you to Diala, for mixing computer science with care and kindness
Thank you to Paul, natively reacting to build great things
Thank you to Dad, for being such a quick mental calculator
Thank you to Raquel, you mean the world to me
Thank you to Amanda, for being so skilled with numbers
Thank you to Michael M, the monetization UX incredible engineer
Thank you to Alex, for always being there, even when Sum(n) != n*Sum
Thank you to Fabinho, writing code and writing best-sellers
Thank you to God, for creating all the problems and solutions
Thank you to Bojin, for truly understanding the problems and solutions
Thank you to Dite, for doing the math of just being happy
Thank you to Paolo, for merging math and transplants
Thank you to Richard, for being more than a boss: a mentor
Thank you to Yilser, for connecting different techs
Thank you to Layek, proving that persistence pays off
Thank you to Paulo O, my mentor
Thank you to Fred, an incredible memory
Thank you to Rivaldo, for showing me logic in the eyes of the law
Thank you to Danny, for thinking 3x ahead than anyone else
Thank you to Carlos F, a brilliant mind
Thank you to Ovi, the magician
Thank you to Daniel M, we grew up together
Thank you to Aman, the genious machine learning engineer
Thank you to Jose, the knowledge shall be with him, brilliant
Thank you to Jay, always solving the problem, no matter what problem
Thank you to Kumar, the storage of knowledge
Thank you to Vitaliy, the amazing post-web mathematician
Thank you to Najin, the friend who taught me math
Thank you to Daniel, for being my smart little big buddy
Thank you to Roger, for properly teaching me the numbers in English
Thank you to Marilia, who taught me chess
Thank you to Paulinho, I became your fan
Thank you to Qi Lu, for teaching me how to calculate relative index size
Thank you to Arthur, for mixing coffee with mathematics
Thank you to Abebe, for solving any problem, any time, in any language
Thank you to Isabella, for being my precious little coder
Thank you to Braden, fixing the data, and home pages in his spare time
Thank you to Chap, the apprentice who became the master
Thank you to Angela, for loving and being awesome at CSS
Thank you to David C, who taught me that anyone can learn any language, anytime
Thank you to Luis, for being my fan, I'm your fan too!
Thank you to Arun S, the first engineer
Thank you to Anyone who I forgot: otherwise, THANK YOU

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace _100ThankYou
{
    class Program
    {
        static void Main(string[] args)
        {
            string[] importantPeople = new string[100];

            importantPeople[0] = "Raquel, you mean the world to me";
            importantPeople[1] = "Isabella, for being my precious little coder";
            importantPeople[2] = "Rafael, for being my little mathematician";
            importantPeople[3] = "Daniel, for being my smart little big buddy";
            importantPeople[4] = "Mom, by induction";
            importantPeople[5] = "God, for creating all the problems and solutions";
            importantPeople[6] = "Dad, for being such a quick mental calculator";
            importantPeople[7] = "Sister, for being my inspiration";
            importantPeople[8] = "Rivaldo, for showing me logic in the eyes of the law";
            importantPeople[9] = "Renata, for supporting me along the way";
            importantPeople[10] = "Moreira, he will solve any problem";
            importantPeople[11] = "Roger, for properly teaching me the numbers in English";
            importantPeople[12] = "Amanda, for being so skilled with numbers";
            importantPeople[13] = "Alex, for always being there, even when Sum(n) != n*Sum";
            importantPeople[14] = "Bruno, no one knows more C++. No. One. Period.";
            importantPeople[15] = "Jose, the knowledge shall be with him, brilliant";
            importantPeople[16] = "Fred, an incredible memory";
            importantPeople[17] = "Manish, The King";
            importantPeople[18] = "Richard, for being more than a boss: a mentor";
            importantPeople[19] = "Ricardo, a big engineer with an even bigger heart";
            importantPeople[20] = "Paulo L, for going down to the details";
            importantPeople[21] = "Paulo O, my mentor";
            importantPeople[22] = "Carlos F, a brilliant mind";
            importantPeople[23] = "Carlos P, the true relentless";
            importantPeople[24] = "Katia G, where it all begun";
            importantPeople[25] = "Patrick B, for hiring me into Microsoft after inserting a node in a BST";
            importantPeople[26] = "Taras, the most brilliant engineer ever. Period.";
            importantPeople[27] = "Hazim, for teaching me religion and math";
            importantPeople[28] = "Rahul, a leader by example";
            importantPeople[29] = "Max, for finding the problems to solve, and solving them";
            importantPeople[30] = "Vaibhav, a visionary";
            importantPeople[31] = "Sidd, for teaching me the math and coding of risk taking";
            importantPeople[32] = "Aman, the genious machine learning engineer";
            importantPeople[33] = "Jay, always solving the problem, no matter what problem";
            importantPeople[34] = "Lili, the UX ninja";
            importantPeople[35] = "Abebe, for solving any problem, any time, in any language";
            importantPeople[36] = "Bojin, for truly understanding the problems and solutions";
            importantPeople[37] = "Braden, fixing the data, and home pages in his spare time";
            importantPeople[38] = "Fei, for teaching how to build the proper pipelines";
            importantPeople[39] = "Howard, for merging virtual sports with advanced computing";
            importantPeople[40] = "Janina, for building calculators into search engines";
            importantPeople[41] = "Mansi, for bringing computer science to the world of sports";
            importantPeople[42] = "Visw, for solving important dormant problems";
            importantPeople[43] = "Vitaliy, the amazing post-web mathematician";
            importantPeople[44] = "Vlad, a wine toast for the UX and BE";
            importantPeople[45] = "Abinash, the money maker";
            importantPeople[46] = "Alex V, the JS and UX master";
            importantPeople[47] = "Angela, for loving and being awesome at CSS";
            importantPeople[48] = "Layek, proving that persistence pays off";
            importantPeople[49] = "Nick, who taught me that any UX is possible. Any.";
            importantPeople[50] = "Sarah, for bringing accessibility and computing together";
            importantPeople[51] = "Saulo, the guy who 'just wants to code'";
            importantPeople[52] = "Shantanu, the amazing super-fast coder";
            importantPeople[53] = "Brian, for the innovative mindset";
            importantPeople[54] = "Chris, for developing pipelines and bots relentlessly";
            importantPeople[55] = "Junyan, for building any framework, in any channel, +DP!";
            importantPeople[56] = "Kyle, for bringing tens of tech together";
            importantPeople[57] = "Ovi, the magician";
            importantPeople[58] = "Paul, natively reacting to build great things";
            importantPeople[59] = "Ram, for teaching me the art of data";
            importantPeople[60] = "Shruti, for teaching me how to be expert in a tech";
            importantPeople[61] = "Yilser, for connecting different techs";
            importantPeople[62] = "Keith R, a legend";
            importantPeople[63] = "Jonathan, a prodigy engineer";
            importantPeople[64] = "Fabinho, writing code and writing best-sellers";
            importantPeople[65] = "Lais, for being my second mom";
            importantPeople[66] = "Nice, for feeding me with protein and love";
            importantPeople[67] = "Dite, for doing the math of just being happy";
            importantPeople[68] = "Paulinho, I became your fan";
            importantPeople[69] = "Najin, the friend who taught me math";
            importantPeople[70] = "Dija, for being my brother";
            importantPeople[71] = "Esdras, when I taught you, I learned more than you think";
            importantPeople[72] = "Daniel M, we grew up together";
            importantPeople[73] = "Marilia, who taught me chess";
            importantPeople[74] = "Luis, for being my fan, I'm your fan too!";
            importantPeople[75] = "Qi Lu, for teaching me how to calculate relative index size";
            importantPeople[76] = "David C, who taught me that anyone can learn any language, anytime";
            importantPeople[77] = "Ethan, for helping my kids with math, and being such a great friend";
            importantPeople[78] = "Diala, for mixing computer science with care and kindness";
            importantPeople[79] = "Larissa, for her perseverance";
            importantPeople[80] = "Ju, for the logic of friendship";
            importantPeople[81] = "Michael M, the monetization UX incredible engineer";
            importantPeople[82] = "Selma, for doing all the math with us and making it all work out";
            importantPeople[83] = "Danny, for thinking 3x ahead than anyone else";
            importantPeople[84] = "Balbir, for being such a restless mind";
            importantPeople[85] = "Prateek, who turn the impossible into possibilities";
            importantPeople[86] = "Selma T, determined to succeed";
            importantPeople[87] = "Janaina, an incredible hardcore engineer";
            importantPeople[88] = "Paolo, for merging math and transplants";
            importantPeople[89] = "Javier, the one and only one architect";
            importantPeople[90] = "Arthur, for mixing coffee with mathematics";
            importantPeople[91] = "Dani, taking a PhD and applying to software correctness";
            importantPeople[92] = "Sarvesh, the humble and just brilliant engineer";
            importantPeople[93] = "Kumar, the storage of knowledge";
            importantPeople[94] = "Chap, the apprentice who became the master";
            importantPeople[95] = "Wes, pushing the limits of the cloud";
            importantPeople[96] = "Austin, for the incredible professionalism";
            importantPeople[97] = "Alex V, for tackling the hardest problems";
            importantPeople[98] = "Arun S, the first engineer";
            importantPeople[99] = "Anyone who I forgot: otherwise, THANK YOU";

            Random rd = new Random();
            for (int i = 0; i < 100; i++)
            {
                int index1 = rd.Next(0, 99);
                int index2 = rd.Next(0, 99);
                string temp = importantPeople[index1];
                importantPeople[index1] = importantPeople[index2];
                importantPeople[index2] = temp;
            }

            for (int i = 0; i < 100; i++)
            {
                Console.WriteLine("Thank you to {0}", importantPeople[i]);
            }
        }
    }
}

Comments

  1. Congrats and thank you for keeping this blog so interesting!

    In this post you brought a very interesting problem of shuffling elements randomly, which has many solutions, most of which, despite looking reasonable, are wrong :) The tricky part is proving that all permutations are equally possible, since it requires probability theory and math, which is your area of expertise :) I always use Knuth's algorithm, also known as Fisher-Yates algorithm, for shuffling arrays, since it's super easy to implement and even such a math noob as I can prove that probability of every element to end up in any cell is 1/n.

    My implementation of Knuth's algorithm would be something like:
    Random random = new Random();
    for (int to = 0; to < importantPeople.Length; ++to)
    {
    int from = to + random.Next(importantPeople.Length-to);
    string temp = importantPeople[to];
    importantPeople[to] = importantPeople[from];
    importantPeople[from] = temp;
    }

    It's a nice and easy exercise to prove that this algorithm is indeed fair to all permutations.

    Thanks again and keep these posts coming!

    ReplyDelete
  2. Oh wow small variation that makes all the difference! Brilliant!!!

    ReplyDelete

Post a Comment

Popular posts from this blog

Changing the root of a binary tree

Prompt Engineering and LeetCode

ProjectEuler Problem 719 (some hints, but no spoilers)