Experience Speaks

I was hoping that the script was good enough, but my mentor(Mr. Paul Bignier - paro) took almost no time and pointed out the mistakes in it by taking a mere look at it. It is correctly said experience does matters, he told me a following points which I missed and should have considered.
  1. I didn't include any code to check for installation errors, which almost made my script useless.
  2. I was using a Mac OS High Sierra (10.13.4) so I was installing latest versions of various packages
    But he pointed out that what about people using previous versions of Mac, those packages were not supported in earlier versions
    Again making my script useless


My solutions

I started working on a new script in which I assumed that fink is installed, which can be found here
I did this to help me save time for checking for fink and its dependencies each time.
I decided I will work on a specific part, debug it and then place it abck in the original script.
The new script did include following points
  1. It did include the code to check for errors and it gives following output when all packages are installed with a Congratulations message:


    And a message for failed installed packages with a message to install them manually.
  2. Also I did remove the versions from fink install, as fink will automatically choose the best suited version for any Mac OS.
The script seems to work fine now, but again I have asked my mentors, let see if I missed something again.

Lesson Learnt

  1. Never believe the work is very easy
  2. Always think for corner cases, think loop holes in your code.
  3. Do consider taking opinion from others, because sometimes you may feel its perfect but it might not necessary be the case.
Hoping for Best.
Happily Coding
Divyanshu Kumar