News for hackers. Stuff that matters.
Re:Ask HN: For those programming 10+ years, what do you wish... by ge96 on Thursday May 18, 2017 @04:34PM (#14370855)
Probably unrelated

It pisses me off how I keep having to rewrite/resolve this particular problem I have of deploying a photo sharing site based in a poor network area.

One day I feel satisfied with the work I've just done, the next day it is garbage and I do it again a different way.

Faster but not fast enough.

Then you get this huge block of code and feel this heavy weight like ahhh.... Slash and burn...

Am I doing this the right way? What is the right way? Look at other major sites, why don't I achieve that same performance?

It is nicer to start over but is it a waste?

Re:Ask HN: For those programming 10+ years, what do you wish... by tekstar on Thursday May 18, 2017 @05:04PM (#14371077)
Ahh, rewrite vs letting it stay! The classic maintainer dilemma!

Answering this really depends. I think I would start with "what do I hope to get out of this process". Are you doing this to learn? Are you doing it to grow a user-base? If it's a user-base, is this the biggest problem preventing your growth? If it's learning, is this the most interesting problem for you to solve?

Re:Ask HN: For those programming 10+ years, what do you wish... by ge96 on Thursday May 18, 2017 @10:05PM (#14372534)
I'm doing it because the site is too slow where people don't stay/staring at a loading icon. 0.5Mbps and lower is really annoying to deploy a photo-based site gee who would have known.

The Dom loads just over 1 second, but things are still waiting to show up(js?) So I'm thinking of building empty templates like "Hey something is here don't worry."

I don't know. I'm actually not sure what progressive loading is. I currently use that blur-up method but I've seen those sites that use a technique where the photo is super pixelated (large pixels about a quarter of an inch or 1/8) before loading the high res. I think that is true progressive loading but don't know what it means with code.

Re:Ask HN: For those programming 10+ years, what do you wish... by honopu on Thursday May 18, 2017 @11:42PM (#14372867)
server side render or put in HTML as placeholder. I've wanted to placeholder images with the primary color or some gradient that can be made in canvas but never got around to it for a project.
Re:Ask HN: For those programming 10+ years, what do you wish... by ge96 on Friday May 19, 2017 @04:22AM (#14373769)
I never really understood what that meant. Server-side render it's not template generation? Time to learn how to read.

I do build a template and spit it out according to what is requested, but then a JS function runs to "fill in the blanks" with a secondary call for the missing data. I should probably get rid of the images formatting (based on aspect ratio) to fit into the tiles. I don't know...