Live data from Hacker News

Show HN: The current sky at your approximate location, as a CSS gradient

sky.dlazaro.ca

81–90 of 171 posts

Re: Show HN: The current sky at your approximate location, as a CSS gradient

#81

Awesome. I remember much earlier in my career I was working on a 3D turn-by-turn navigation software, and one of my tasks was to draw the sky in the background. The more senior guy on the team said, just draw a blue rectangle during the day and a dark gray one at night and call it job done. Of course, I had to do it the hard way, so I looked up the relevant literature on sky rendering based on the environment, latitu…

I’ve had similar issues at work where people really overdo something and it’s difficult. On one hand you never want to kill that joy and passion someone has. That’s a great characteristic. But projects have scopes and too often instructions like “just draw a blue rectangle” get ignored.

Re: Show HN: The current sky at your approximate location, as a CSS gradient

#82

Awesome. I remember much earlier in my career I was working on a 3D turn-by-turn navigation software, and one of my tasks was to draw the sky in the background. The more senior guy on the team said, just draw a blue rectangle during the day and a dark gray one at night and call it job done. Of course, I had to do it the hard way, so I looked up the relevant literature on sky rendering based on the environment, latitu…

This is why specifications are important, and why design is important.

The reality is that we have certain conventions that are immediately understandable, and that too much visual complexity results in confusion rather than clarity.

If the sky is hazy white when I expect it to be blue, I'm confused as to whether it's the sky or if the map is still loading. It's adding cognitive complexity for no reason. Stars similarly serve no functional purpose at night.

What you built sounds great for an actual planetary view like Google Earth. And it sounds fun to build. But it's an anti-feature for a navigation view. When you're navigating, simplicity and clarity are paramount. Not realism.

Re: Show HN: The current sky at your approximate location, as a CSS gradient

#85
post #80

As an old-timer who's not up on all the latest whiz-bang web stuff, I have to ask what is the astro/cloudflare/wrangler magic that allows the following to work: const { latitude = "0", longitude = "0" } = Astro.locals.runtime.cf || {}; I gather you're using some cloudflare feature wrapped in astro to provide lat/long but I don't see the actual plumbing that gets it to you (and I did try to spelunk through a decent am…

There is no visible plumbing because it kinda is magic! Astro provides adapters for different server runtimes (e.g., Vercel, Cloudflare, Netlify), and it's basically just plug and play. The Cloudflare adapter exposes a bunch of bindings [1] through `Astro.locals.runtime`, which can be accessed during each request. The `cf` binding contains incoming request properties [2], including latitude and longitude. These bindi…

Great explanation; thanks.

Re: Show HN: The current sky at your approximate location, as a CSS gradient

#88

Awesome. I remember much earlier in my career I was working on a 3D turn-by-turn navigation software, and one of my tasks was to draw the sky in the background. The more senior guy on the team said, just draw a blue rectangle during the day and a dark gray one at night and call it job done. Of course, I had to do it the hard way, so I looked up the relevant literature on sky rendering based on the environment, latitu…

Whipping down the innovator with the stupidity whip. Great management

It sounds like the developer spent a lot of time implementing something that nobody wanted. Drawing the sky accurately may be cool, but it wasn't required in this case. It's also not innovation. It's been done before.

This is like if you were renovating your house and the drywall guy spends a huge amount of time building up round corners, but you just wanted regular square corners. Then on some drywall forum they're bitching about how "all clients are stupid" or something.

Re: Show HN: The current sky at your approximate location, as a CSS gradient

#90
post #52

Author of Suncalc here — this is exactly the kind of stuff I love to see my code being used in, thanks for sharing!

Hey, small note that your excellent https://suncalc.net/ is showing an error due to the Google Maps API token having expired. I know that you deeply know map tech :-) but if I may make a suggestion - you might consider switching from Google Maps to Protomaps? https://github.com/protomaps/protomaps-leaflet Cheers

Yeah, I think I last updated that website even before I released the first version of Leaflet. Life is very hectic at the moment, but I do really want to get to it sooner than later and modernize everything.
Post reply on HN