Twenty-three years ago, during my daily trips to the university campus, I had the exact same idea. However, I became distracted by calculating the position of the sun and delved into astronomical algorithms, which led me to never complete it. Kudos to you, that's really impressive!
The hard part was obtaining information such as solar azimuth, altitude, declination, hour angle, etc without using external APIs. Spent around 5 days implementing backend.
Way too late now, but to help others this fancy Excel sheet provided by NOAA is awesome! It implements all of these equations in Excel and is pretty easily portable to your programming language of choice. https://gml.noaa.gov/grad/solcalc/calcdetails.html
P.S. Using this has made it clear to me how bad most sunrise/sunset calculators actually are.
> P.S. Using this has made it clear to me how bad most sunrise/sunset calculators actually are.
That may just be a function of how you define "sunrise" and "sunset". It is never as simple as "when the sun hits the horizon", but something about some number of arc minutes from something something.
Dependent on the refractive index, which depends on air density and temperature and humidity too; and we have to integrate over the region between the horizon and the upper atmosphere (diagonally, of course)…
To be clear I was complaining that basically everyone calculates “sunrise” and “sunset” differently. If you check half a dozen different “sunset” calculators you will get a surprisingly wide variation in the times they provide. At least where I live the error seems to average 5-10 minutes.
I'm not sure what you mean by external APIs but is there a reason you're not using SunCalc[1] on the client to process the route after it's returned from the routing engine?
I don't always manage to adhere to my own advise here. But talking to "customers" really solves this.
Half these customers can't be bothered by the edge cases that I've been poring over for nights. The other half puts forward edge cases that I've never been aware of. Some of which are critical to their work-flow. Many are implemented in mere minutes. "Wow. That saves us 30 minutes typing over prices, every day!".
As an engineer I love to find solutions. But as an entrepeneur I really must understand the problem and scope. that 0.1% edge cases is hardly ever part of the success.
Thanks for posting this, honestly the 0.1% scare me sometimes on technical project. I think you're right, just gotta talk to my customers directly if they even care about it.
You could probably make it in a few minutes - the direction of the sun is, to a first approximation, 15 degrees times the number of hours it is after midnight. This leads to a trick for using an analog watch as a compass:
> The equation of time describes the discrepancy between two kinds of solar time. The word equation is used in the medieval sense of "reconciliation of a difference". The two times that differ are the apparent solar time, which directly tracks the diurnal motion of the Sun, and mean solar time, which tracks a theoretical mean Sun with uniform motion along the celestial equator. Apparent solar time can be obtained by measurement of the current position (hour angle) of the Sun, as indicated (with limited accuracy) by a sundial. Mean solar time, for the same place, would be the time indicated by a steady clock set so that over the year its differences from apparent solar time would have a mean of zero.
The equation of time would be in there! But the largest that gets is about 16 minutes, corresponding to a 4-degree error in position, and there are much bigger sources of error. But thanks for the link to the Clock of the Long Now!
Thank you for that! Adaptive comparative judgment gives a name to something I've always believed, but never really quite put my finger on; that comparing things one to another is more reliable than random 1-10 ratings.
As for the algorithm, it's a basic Quicksort, building on the work of Leonid Shevtsov[0].
I think merge sort would provide a better experience.
Quicksort can be great for human-comparison sorting if you let the user pick the pivot, and if you have a direct-manipulation interface for dividing a big pile into two smaller ones. Humans are great a scanning large numbers of objects, and can split piles much faster than operating one by one.
You are quite right. I had already been thinking about merge sort because it’s guaranteed to lead to fewer comparisons, but what you said about piles would work great when combined with showing more episodes at once, asking the user “which of these 5 episodes is better” and getting those comparisons out of the way all at once.
Your post really brought back memories of softice and w32dasm. Incidentally one of the websites from that era (gamecopyworld) is still alive! Mind blown.
Ahh SoftIce (and later WinIce for Win9x).. Great RING0 debugger..
I used it quite a bit for crack some games myself :)
Oh look, it still here on disk: siw405w9x.exe
Why I keep it... ;)
It wouldn't surprise me if that narration trend was reversed for fanfic though, and that the AI has been trained on a lot more fanfic
(For similar reasons, when I asked ChatGPT to write a story about Draco Malfoy and Harry Potter it tells me about how they began to notice each other and it blossomed into a beautiful friendship [ChatGPT is far too prudish to take it as far as the fanfic...]. When I asked for it in the style of JK Rowling it told essentially the same story, minus the "once upon a time" opening...)
Why don't they setup https://ruffle.rs/ on their website? I've managed to rescue a website using it and seems to work pretty much with all modern browsers.
Will point that customer to ruffle. They are not terribly sophisticated, technically, as you can imagine. Nor do they seem willing to spend any money to fix the Flash problem. Nothing about the site needs Flash, it could be implemented in plain HTML+Javascript. They just don't want to pay anything to do that.
I'm more interested in the algorithm behind the pairing. I wonder if it's randomly pairing colours or using something similar to adaptive comparative judgement.
reply