Live data from Hacker News

A minimalistic site to vent and see others doing the same in realtime

ventscape.life

41–50 of 148 posts

Re: A minimalistic site to vent and see others doing the same in realtime

#41
post #40
post #38

You're warned: const messageText = inputTextBox.value.replace(/ ]+(>|$)/g, ""); var $newdiv = $(' ' + messageText + ' ').css({ 'opacity': '0.95' });

The safe, proper way to do this is both shorter and more readable! Both with jQuery: const $newdiv = $(' ') .addClass(messageDivClass) .text(inputTextBox.value) .css({'opacity': '0.95'}); and without: const newdiv = document.createElement('div'); newdiv.classList.add(messageDivClass); newdiv.innerText = inputTextBox.value; newdiv.style.opacity = '0.95';

Hey, creator of the site here, thank you so much for the tip!

Unfortunately I'm quite new to full stack. ~1.5 months ago I didn't know a lick of HTML (let alone CSS, JS, any backend framework, AWS, etc), and I'm making lots of mistakes along the way. Currently trying to figure out how to improve my DB performance as Spring's default pagination seems to be quite slow and my site is getting hugged to death at the moment. If anyone has any tips for that especially I'm all ears.

At any rate, your suggestion seems easy enough to put in, so I'll put it in ASAP! Thanks again

Re: A minimalistic site to vent and see others doing the same in realtime

#42
post #40

Earlier quoted context omitted.

The safe, proper way to do this is both shorter and more readable! Both with jQuery: const $newdiv = $(' ') .addClass(messageDivClass) .text(inputTextBox.value) .css({'opacity': '0.95'}); and without: const newdiv = document.createElement('div'); newdiv.classList.add(messageDivClass); newdiv.innerText = inputTextBox.value; newdiv.style.opacity = '0.95';

Hey, creator of the site here, thank you so much for the tip! Unfortunately I'm quite new to full stack. ~1.5 months ago I didn't know a lick of HTML (let alone CSS, JS, any backend framework, AWS, etc), and I'm making lots of mistakes along the way. Currently trying to figure out how to improve my DB performance as Spring's default pagination seems to be quite slow and my site is getting hugged to death at the momen…

Congratulations on getting to the front page of HN and Reddit / mostly surviving the hug of death!

Re: A minimalistic site to vent and see others doing the same in realtime

#43

Looks like you can query the database directly via their REST API: https://api.ventspace.life/api/v1/ventpost?sort=id,desc&size...

I'm not sure why there is a database at all, if you want messages to just appear and not stick around you could do this over websockets and never need to touch a database

I'm brand new to full stack so I have no idea what I'm doing. Kind of figuring it out as I go along. Decided to start with short polling since I was having trouble getting websockets working and just wanted to get a v1.0 out in the wild.

Switching over to websockets eventually is 100% on my mind, but I have a near infinite amount of work to do on all fronts so we'll see when I have time!

Re: A minimalistic site to vent and see others doing the same in realtime

#44
post #12

Looks like you can query the database directly via their REST API: https://api.ventspace.life/api/v1/ventpost?sort=id,desc&size...

I wonder what the most common word will be? I'd guess between "covid" and "Maddie"

Who is Maddie?

Re: A minimalistic site to vent and see others doing the same in realtime

#45
post #37

Earlier quoted context omitted.

Is that your only experience with Twitter? Twitter fills about a million more roles than venting. I don’t see any “cesspool” on my feed in fact.

It's a personalized echo chamber. YMMV

Following stuff that interests you is not an echo chamber.

Re: A minimalistic site to vent and see others doing the same in realtime

#46
post #45
post #37

Earlier quoted context omitted.

It's a personalized echo chamber. YMMV

Following stuff that interests you is not an echo chamber.

A machine learning algorithm then uses that stuff to recommend content which is similar. If one engages with opinionated stuff, then they'll only get recommended stuff that conforms to their original opinion, forming an echo chamber.

Re: A minimalistic site to vent and see others doing the same in realtime

#47

Earlier quoted context omitted.

I'm not sure why there is a database at all, if you want messages to just appear and not stick around you could do this over websockets and never need to touch a database

I'm brand new to full stack so I have no idea what I'm doing. Kind of figuring it out as I go along. Decided to start with short polling since I was having trouble getting websockets working and just wanted to get a v1.0 out in the wild. Switching over to websockets eventually is 100% on my mind, but I have a near infinite amount of work to do on all fronts so we'll see when I have time!

Good on you. Learning about DB structure is far more important than websockets when starting out full-stack. You’d need to run your own websocket server anyway or pay through the nose for a service like Pusher (or stay on the free tier and not learn a single thing about either).

You choose well! Nice job, keep at it :)

Re: A minimalistic site to vent and see others doing the same in realtime

#48
post #44
post #12

Earlier quoted context omitted.

I wonder what the most common word will be? I'd guess between "covid" and "Maddie"

Who is Maddie?

I think Maddie McCann, she was a young girl who disappeared in Portugal sometime a few years ago. She's been in the news recently I believe.

Re: A minimalistic site to vent and see others doing the same in realtime

#49
post #40

Earlier quoted context omitted.

The safe, proper way to do this is both shorter and more readable! Both with jQuery: const $newdiv = $(' ') .addClass(messageDivClass) .text(inputTextBox.value) .css({'opacity': '0.95'}); and without: const newdiv = document.createElement('div'); newdiv.classList.add(messageDivClass); newdiv.innerText = inputTextBox.value; newdiv.style.opacity = '0.95';

Hey, creator of the site here, thank you so much for the tip! Unfortunately I'm quite new to full stack. ~1.5 months ago I didn't know a lick of HTML (let alone CSS, JS, any backend framework, AWS, etc), and I'm making lots of mistakes along the way. Currently trying to figure out how to improve my DB performance as Spring's default pagination seems to be quite slow and my site is getting hugged to death at the momen…

Sounds like you're using offset for pagination.

https://use-the-index-luke.com/no-offset

Re: A minimalistic site to vent and see others doing the same in realtime

#50
post #45

Earlier quoted context omitted.

Following stuff that interests you is not an echo chamber.

A machine learning algorithm then uses that stuff to recommend content which is similar. If one engages with opinionated stuff, then they'll only get recommended stuff that conforms to their original opinion, forming an echo chamber.

You need to change the viewing setting to "latest first"
Post reply on HN