TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

My toy project turned into a viral challenge

76 pointsby jinayover 3 years ago

7 comments

blopkerover 3 years ago
Regarding the histogram issue, I worked on a project that had a few hundred histograms based on data from over 3 billion data points. It turns out that after a few thousand data points many histograms will stop changing significantly.<p>So, unless you really need to show exactly how many data points each bucket contains, it&#x27;s much easier to run the analysis once offline, then serve just the histogram percentage data. From that you can make an SVG and overlay additional user-specific data on top. The point is that this histogram data is small and easy to cache.<p>You can then rerun the histogram analysis later if you&#x27;d like. However, for this project I never saw anything change with more data. It was overkill even to run it as a cron job.
评论 #29424876 未加载
评论 #29423611 未加载
评论 #29425994 未加载
tyingqover 3 years ago
You were sending the entire database (all times from all users) to each individual end user to compute histograms client-side after they finished? Ah, yeah, that could get expensive on Firebase.
评论 #29423647 未加载
function_sevenover 3 years ago
I have to brag here. I silently visualized a wall clock ticking off the seconds and got 60.02 seconds.<p>2 hundredths of a second off from reality!<p>I could try it again to validate, but I can&#x27;t be bothered. As far as I&#x27;m concerned, I&#x27;m super accurate judging the passage of time. No need to find out if it was a lucky random pick in the interval [58, 62] :)
评论 #29425540 未加载
评论 #29425864 未加载
post_breakover 3 years ago
Just some feed back. I started the challenge, but the constant text changing like &quot;I&#x27;m bored&quot; etc was enough to throw off my internal clock to guess when to stop it.
评论 #29431251 未加载
boberoniover 3 years ago
&gt; I pushed a quick fix to the issue by freezing the data being sent to the client, thereby halting the rapid growth in data consumption.<p>What do you mean by &quot;freezing the data&quot;?<p>Regarding the excessive download problem, my first instinct is to periodically (for example, every hour) compute summary statistics for the bar chart and store that in Firebase. This, of course, would require an additional script&#x2F;service to perform these periodic jobs.<p>I&#x27;m not sure if that&#x27;s what you ended up doing and I&#x27;m curious what your solution is.
评论 #29421989 未加载
评论 #29423591 未加载
评论 #29420110 未加载
评论 #29421816 未加载
Aeolunover 3 years ago
There used to be a very old DOS program that did this, but for 5 seconds.
notwhereyouareover 3 years ago
is there a way to see the results without going through the challenge?
评论 #29423626 未加载
评论 #29422453 未加载
评论 #29423024 未加载