News for hackers. Stuff that matters.
Re:Progress Bar Badge for GitHub README Files by kator on Monday July 21, 2014 @10:34AM (#8063842)
Why a service? Seems the images are static coded from 0 to 100 and could easily just be a CDN reference rather then burning a service on every hit? URL/progress/1.png .. 100.png done.. :)
Re:Progress Bar Badge for GitHub README Files by lukeholder on Monday July 21, 2014 @10:37AM (#8063851)
I assume various options to the look and functionality could be added and having the request go to an application as opposed to a static file first allows that opportunity. In addition, there is nothing stopping them forwarding the request to a cached result on a CDN.
Re:Progress Bar Badge for GitHub README Files by kator on Monday July 21, 2014 @10:47AM (#8063907)
But the current version is just an imaged coded on the fly and compressed on the fly.. It's burning CPU for no real reason.

If you want flexibility for future you can use a CDN path that includes options you want and later could switch to code the makes the requested image and caches result, returning the cached result.

I imagine the concept is to code the service for fun but I have to wonder to myself when something like this is shared but no concept of scale is considered. I know premature optimization is the root of all evil but isn't building a service to serve a static image basically premature optimization that "maybe some day I'll add more dynamic features".. :-)

Re:Progress Bar Badge for GitHub README Files by fka on Monday July 21, 2014 @11:22AM (#8064102)
GitHub already caches into a CDN, so it just takes once.
Re:Progress Bar Badge for GitHub README Files by robalfonso on Monday July 21, 2014 @10:42AM (#8063883)
Future expansion what about passing a height/width and making a larger progress bar, or a hex code for the color of the bar, or even a gradient? Lots more options and you can always cache the url request for a sane amount of time so its not a full hit to the app.
Re:Progress Bar Badge for GitHub README Files by webmaven on Monday July 21, 2014 @02:07PM (#8065029)
Why not? Eventually stuff like this is possible: http://aaugh.com/imageabuse.html

;-)