I could have done a lot of things, you are totally right.
Or I could have just set a cron job up or a shell script to do them .
Don't get me wrong, if I cared for phones I would be programming for them probably (I am actually mostly working with Java console apps these days that process/monitor data) ...
The big difference is that when you have the power of command line, you don't have to "write a program" for every little stupid task you want to achieve.
Compare the effort of setting up a cron job (to stay with the example) to send you the location of the phone every 5 minutes.
In cron (given that you have a theoretical program called GPSutil and SMSutil) would be
crontab -e; put time, path GPSutil --currentlocation| SMSutil 12345667 ....
in an other 10 minutes of tinkering, if there is no net, you could log it to a file, then send the batch when there is net again.
You can also install the dev tools, start reading the API, the docs, figure out how to compile .. set up an app, see how you can run that in the background, use a crapload of unnecessary resources to keep an app running, automate its startup, check (if possible) how to restart if it fails ... write the app, deploy.. blablabla...
And solution 2 is perfect ... will take you from cold start .. at least 2 weeks.. more if you are not a Java dev.
Solution 1 for someone using linux for almost 20 years : 15-30 minutes, if you really polish it.
It is like the thing I always tell to the windows admins/programmers:
solve this problem: open a file, and replace every instance of "blabla" but only if it is the first word on the line with a tab before.....
You can write an app and regex, you can install VI or SED.... the difference, is that my preferred OS (osx or linux) comes with that installed, I just need to chain them together to get what I want .. and I am done before you found it on google what to install