On Fri, Oct 11, 2019 at 10:40 AM pyotr filipivich <ph...@mindspring.com> wrote: > > Chris Angelico <ros...@gmail.com> on Fri, 11 Oct 2019 09:49:03 +1100 > typed in comp.lang.python the following: > >On Fri, Oct 11, 2019 at 9:41 AM Dennis Lee Bieber <wlfr...@ix.netcom.com> > >wrote: > >> > >> On Thu, 10 Oct 2019 08:47:07 -0700, pyotr filipivich <ph...@mindspring.com> > >> declaimed the following: > >> >"A simple program" to divide the amount of "today's" daylight into 12 > >> >even '"hours", so that Dawn begins the First hour, the third hour is > >> >mid-morning, noon is the middle of the day, the ninth hour mid after > >> >noon, and the twelfth hour ends at sunset. Is simple, no? {no.} > >> > > >> Even ignoring "phone" this is anything but simple. It relies upon > >> knowing one's latitude and date to allow computing the angle of the sun. > >> And you'll need to handle the fact that above/below arctic/antarctic > >> circles you will run into "zeros" where there is either 24 hours of > >> daylight or 24 hours of night. > >> > > > >Or.... maybe it's really simple, because there's an HTTP API that > >gives you the information. There's an API for everything these days. A > >quick web search showed up this: > > > >https://sunrise-sunset.org/api > > Thanks. > > > >Which means the project is a matter of taking the data and formatting > >it. (Also probably getting lat/long from the phone's location API.) > >I'd say this is a good-fun project - a one-week project for a student, > >a weekend project for an expert. And yes, there WILL be edge cases to > >deal with, but for the most part, it shouldn't be too hard. > > A one week project for a student. or Longer for a non-student. > > Oh well, as I say a lot: this wild be easy if I was doing it forty > hours a week. And this part is a spin off of a larger mess, trying to > understand how astronomy was done before the invention of mechanical > clocks. I get some off the wall inspirations.
Sure, you can gauge your own skill level to get some idea of an actual timeframe. I'd recommend starting with a simple non-phone version of the idea, and then think about porting it to a phone. That should reduce the problem's complexity significantly. ChrisA -- https://mail.python.org/mailman/listinfo/python-list