← Home ← Back to /g/

Thread 106141301

337 posts 92 images /g/
Anonymous No.106141301 [Report] >>106141913 >>106147856 >>106151127 >>106158814 >>106199610 >>106199981
/wdg/ - Web Development General
https://www.youtube.com/watch?v=ciNXbR5wvhU

>Free beginner resources to get started with HTML, CSS and JS
https://developer.mozilla.org/en-US/docs/Learn - MDN is your friend for web dev fundamentals
https://web.dev/learn/ - Guides by Google, you can also learn concepts like Accessibility, Responsive Design etc
https://eloquentjavascript.net/Eloquent_JavaScript.pdf - A modern introduction to JavaScript
https://javascript.info/ - Quite a good JS tutorial
https://flukeout.github.io/ - Learn CSS selectors in no time
https://flexboxfroggy.com/ and https://cssgridgarden.com/ - Learn flex and grid in CSS

>Resources for backend languages
https://nodejs.org/en/learn/getting-started/introduction-to-nodejs - An intro to Node.js
https://www.phptutorial.net - A PHP tutorial
https://dev.java/learn/ - A Java tutorial
https://rentry.org/htbby - Links for Python and Go
https://quii.gitbook.io/learn-go-with-tests - Learn Go with Tests

>Resources for miscellaneous areas
https://github.com/bradtraversy/design-resources-for-developers - List of design resources
https://www.digitalocean.com/community/tutorials - Usually the best guides for everything server related

>Need help? Create an example and post the link
https://jsfiddle.net - if you need help with HTML/CSS/JS
https://3v4l.org - if you need help with PHP/HackLang
https://codesandbox.io - if you need help with React/Angular/Vue

/wdg/ may or may not welcome app development discussion. You can post and see what the response is.
Some app technologies of course have overlap with web dev, like React Native, Electron, and Flutter.

We have our own website: https://wdg-one.github.io

Submit your project progress updates using this format in your posts, the scraper will pick it up:

:: my-project-title ::
dev:: anon
tools:: PHP, MySQL, etc.
link:: https://my.website.com
repo:: https://github.com/user/repo
progress:: Lorem ipsum dolor sit amet

Previous:
https://desuarchive.org/g/thread/105946460
Anonymous No.106141389 [Report] >>106141426 >>106141527
Is that the TCP protocol thing? If so, it's really cool. Unfortunately we live in a gay Earth
Anonymous No.106141426 [Report] >>106141482 >>106141816 >>106142136 >>106159878 >>106180651 >>106194441 >>106199972 >>106200101
>>106141389
>Is that the TCP protocol thing?
Yeah.
https://endtimes.dev/why-your-website-should-be-under-14kb-in-size/
Anonymous No.106141482 [Report] >>106151087 >>106171904 >>106200552
>>106141426
>Once you lose the autoplaying videos, the popups, the cookies, the cookie consent banners, the social network buttons, the tracking scripts, javascript and css frameworks, and all the other junk nobody likes — you're probably there.
If every web dev did the the web might actually be good again.
Anonymous No.106141527 [Report] >>106148084
>>106141389
it is a TCP configuration - burst of how many packets it starts sending before first ack. usually servers bump it to more to 40something kB. also it's size after compression
Anonymous No.106141804 [Report] >>106151413
Has anyone built a music website and if so where can I download royalty free music from?

Only need like 4 or 5 albums but more would be good. Just want to make sure the music is 100% free to use because I'll be hosting it on netlify. Will obviously give links and credits to the artists.
Anonymous No.106141816 [Report] >>106141913 >>106142091 >>106142475 >>106144759 >>106144957 >>106153516 >>106159357 >>106159423 >>106159878
>>106141426
How the fuck can you make a modern website under 14kb? Is this some epic meme?
Anonymous No.106141913 [Report] >>106141957 >>106142091 >>106153679 >>106168655 >>106201970
>>106141816
>>106141301 (OP)
It's just clickbait. The guy's a grifter. All of them are.
Anonymous No.106141957 [Report] >>106142000 >>106142007 >>106168655 >>106200559
>>106141913
He's the only real OG out there
I don't watch his videos, but I've seen enough
Anonymous No.106142000 [Report] >>106142054
>>106141957
>"He's the only real OG out there"
>makes clickbait videos on (((YouTube))) so he can amass money from forcing people to watch advertisements from gigacorporations
Real OG alright. Kill yourself, promptly.
Anonymous No.106142007 [Report] >>106142054
>>106141957
>real OG
>yt e-celeb
thanks for the laugh, you can kys now
Anonymous No.106142020 [Report]
so yeah, if you're going to come with this trash might as well leave the thread to be dead
Anonymous No.106142054 [Report] >>106142084 >>106142117 >>106159162
>>106142000
>>106142007
>no coders having an opinion
He's worth ten of you, even though he's a YouTuber.
Anonymous No.106142084 [Report] >>106142165 >>106168655
>>106142054
Is he your boyfriend? I think you're the "no coder" (disgusting brainrot-speak) here.
Anonymous No.106142091 [Report] >>106142102 >>106149366
>>106141816
>>106141913
It is genuinely embarrassing how bad all of you are.
Anonymous No.106142102 [Report] >>106142115
>>106142091
Stop projecting, e-celeb blower.
Anonymous No.106142115 [Report]
>>106142102
I haven't said anything about celebss. Why Are you so concerned with them?
Anonymous No.106142117 [Report] >>106142165
>>106142054
cool story newfaggot, should have lurked moar instead of throwing shit everywhere, does the saying "don't shit where you eat" ring a bell? enjoy your newfaggotry, retard
Anonymous No.106142136 [Report]
>>106141426
>that curvy text
That is disorientating
Anonymous No.106142165 [Report] >>106149179
>>106142084
>>106142117
Tell me where he touched you. Did he shout while he violated you? I mean that kind of response must come from a deeply traumatic place
Anonymous No.106142475 [Report] >>106146927 >>106149366 >>106151131 >>106153652 >>106194441
>>106141816
Don't use a SPA. You can use fixi.js and small amounts of vanilla JS inside of <script> tags when you want to handle state on the client. That's all you need.
https://github.com/bigskysoftware/fixi

Same goes for CSS. There's no need to use Tailwind. Use vanilla CSS inside of <style> tags because using external stylesheets is not performant (see pic).
https://danielnagy.me/posts/Post_tsr8q6sx37pl

Make sure to keep each initial page load below 14kB after compression to keep it performant and lazy load the rest.
Anonymous No.106142624 [Report] >>106142839
What is the best podcast, YouTube channel or video course on cyber security that you know?
Anonymous No.106142684 [Report] >>106142714
Is mongoDB supposed to be this frustrating?
I can't seed it/create it.
insertMany() keeps failing
Anonymous No.106142714 [Report]
>>106142684
I mean I can't create my database. I have a feeling that it should be easy but chatGPT has failed me for the final time
Anonymous No.106142839 [Report] >>106143652
>>106142624
You don't want that. You want hackboxes to pentest
Anonymous No.106143652 [Report] >>106145623
>>106142839
Any good websites for this?
Anonymous No.106143752 [Report] >>106193362
>Network location provider at 'https://www.googleapis.com/' : Returned error code 429.
What the fuck? The Geolocation API is COMPLETELY useless in Chromium.
Why would a browser give you an API which is broken and doesn't work in a consistent way?
What are some alternatives to this madness?
Anonymous No.106144759 [Report] >>106151105
>>106141816
lazyloading
Anonymous No.106144957 [Report] >>106149366
>>106141816
If you don't include pictures in this calculation, it really shouldn't be difficult. In fact, if you can't do that, you're a blight and a failure.
Anonymous No.106145623 [Report]
>>106143652
Search for vulnboxes on reddit. There used to be a site that was a huge library of open boxes, bit I can't find right now
Anonymous No.106145748 [Report] >>106145788 >>106146927
HTMX shisters need client side state but then they'd be writing javascript (iky!)
https://github.com/BookOfCooks/blog/blob/master/htmx-is-hard-so-lets-get-it-right.md
Anonymous No.106145788 [Report]
>>106145748
>BookofCucks
They aren't even trying to hide it anymore
Anonymous No.106145847 [Report] >>106147755 >>106149566 >>106159201 >>106162231
How can I write one query to get all rows of C that are related to A in an ORM like laravel/eloquent? I would ask AI but I can't even figure out how to phrase the question.
Anonymous No.106146193 [Report] >>106153652
Can't wait to the HTML+CSS+JS cancer to finally die.
Anonymous No.106146404 [Report]
https://v8.dev/blog/json-stringify

FASTIFY FINISHED AND BANKRUPT
UPGRADE NOW
Anonymous No.106146927 [Report] >>106147041
>>106145748
>HTMX
Meme
>>106142475
>fixi.js
Meme

Thanks but I'm sticking with JavaScript
Anonymous No.106147005 [Report]
Where do I find cute Chinese programmer girls that need to marry a Canadian to stay in this country?
Anonymous No.106147041 [Report]
>>106146927
You still have to write JS to handle state on the client if you use HTMX or fixi.js. They just allow you to write less JS because they handle the AJAX requests.
Anonymous No.106147725 [Report]
tailwind and effect are based
death to htmx trannies
Anonymous No.106147755 [Report]
>>106145847
Send it your schema
Anonymous No.106147856 [Report] >>106147926 >>106149126
>>106141301 (OP)
retarded question, but genuinely what could possibly happen if you ignore GDPR but you may be doing risque things?
Anonymous No.106147926 [Report] >>106147957
>>106147856
Ursula von der Leyen will dispatch a team of bureaucrats who will tie you up with red tape
Anonymous No.106147957 [Report]
>>106147926
what is an anon to do? should I bend over and just accept it?
Anonymous No.106148084 [Report]
>>106141527
ACK ACK ACK ACK ACK ACK ACK ACK ACK ACK ACK ACK ACK ACK ACK ACK ACK ACK ACK ACK ACK ACK ACK ACK ACK ACK ACK ACK ACK ACK ACK ACK ACK ACK ACK ACK ACK ACK ACK ACK ACK ACK ACK ACK ACK ACK ACK ACK ACK ACK ACK ACK ACK ACK ACK
Anonymous No.106149126 [Report] >>106150398
>>106147856
Nothing will probably happen unless you're running a big site, but it's an unnecessary risk to take.
Anonymous No.106149179 [Report]
>>106142165
go back to the homo roleplay discord you came from and stay there
Anonymous No.106149366 [Report] >>106159878 >>106201422
>>106142091
>>106142475
>>106144957
Even if i just use text and picture text, that itself is over the 14kb. Just do it on the text editor and see how stupid impossible it is to create one.
Anonymous No.106149566 [Report] >>106150244
>>106145847
>get all rows of C that are related to A
I will take what is an INNER JOIN for $200
Anonymous No.106149621 [Report]
Can I hire one of you to create a tool that will ebooks hopefully epubs into a snake like zig zag reading experience where the words don't change but each other line will be reversed for example

The dog and I went to the park
ball the him threw I
He was happy
again it threw I So

I tried using replit but it's retarded is there any other way
Anonymous No.106150244 [Report] >>106150409
>>106149566
Ok but I thought the whole point of using an ORM was so you didn’t have to write SQL anymore. Why do I need to do that for something that seems like such a common operation?
Anonymous No.106150398 [Report]
>>106149126
It seems like there are zero cases of anything really happening for small time hosts though.
The only reference of anything is from LocateFamily (dotcom) where they had a 500k+ fine back in 2021 but nothing ever happened
Anonymous No.106150409 [Report]
>>106150244
search for how to write a join in Laravel, c'mon now, it's been so long I don't remember, but Laravel is there to handhold you
you're learning "why do I need to know how a SQL DB works", Idk pham you're here in the web dev thread asking why do you need to learn how a DB works, re-evaluate your stance
Anonymous No.106151087 [Report] >>106154079
>>106141482
nah
Anonymous No.106151105 [Report]
>>106144759
its 4kB per connection dumbass
Anonymous No.106151127 [Report]
>>106141301 (OP)
>14000 bytes
absolute bloatware
ngm, skill issue, kys
Anonymous No.106151131 [Report]
>>106142475
>use *.js
enough already we dont need anymore
Anonymous No.106151413 [Report] >>106152105
>>106141804
Anyone? Can't find any free music albums anywhere. Even some of the places that say the music is free you still have to pay to download.
Anonymous No.106152105 [Report] >>106152215 >>106153664
>>106151413
failure to do basic search is a cardinal sin, especially in the age of AI
Anonymous No.106152215 [Report] >>106152306 >>106152572
>>106152105
nta, but
>google is your friend
those days are long dead, buried and rotten
Anonymous No.106152306 [Report] >>106152345
>>106152215
retard
Anonymous No.106152345 [Report] >>106152581
>>106152306
lurk moar
Anonymous No.106152572 [Report] >>106152581
>>106152215
>google is your friend
who the fuck are you quoting you giga retard
Anonymous No.106152581 [Report] >>106152697
>>106152572
>>106152345
Anonymous No.106152621 [Report]
I think php devs are subhuman
Anonymous No.106152697 [Report] >>106152744
>>106152581
what a stupid cunt you fail basic reading comprehension, fighting a strawman then try to pathetically increase your status. you should kill yourself and take your whole family out while you're at it. absolute low iq with ego, your types are the worst to work with in the industry. no wonder it's all going to shit.
Anonymous No.106152744 [Report] >>106152766
>>106152697
kek
Anonymous No.106152766 [Report] >>106152804
>>106152744
typical small brain response t b h have you considered suicide?
Anonymous No.106152804 [Report] >>106152819
>>106152766
Anonymous No.106152819 [Report] >>106152829
>>106152804
your neck + rope
Anonymous No.106152829 [Report] >>106152889
>>106152819
go talk with grok, maybe you can vibecode a calculator or something
Anonymous No.106152889 [Report] >>106152932
>>106152829
im going to vibecode a time machine to go and mentally abuse your mother
Anonymous No.106152932 [Report] >>106152945 >>106154548
>>106152889
cool story bro, attentionwhoring is femenine behavior, and you sure are desperate for a lot of attention, get well soon!
Anonymous No.106152945 [Report] >>106154548
>>106152932
kek and the truth is revealed. subhuman pajeeto didn't finish his english class?
Anonymous No.106153047 [Report] >>106153073 >>106153115 >>106153145 >>106153356 >>106158409
Why is every single one of those youtube e-celeb/instructors an absolute midwit with coding skills on par with an inbreed indian?
Anonymous No.106153073 [Report]
>>106153047
>e-celeb clickbait on the OP
Anonymous No.106153115 [Report]
>>106153047
they're entertainers, programming is just accessory
Anonymous No.106153145 [Report]
>>106153047
it appeals to the brainrot community
Anonymous No.106153356 [Report]
>>106153047
e-celeb hires indian, pretends to be a coder.
Anonymous No.106153516 [Report] >>106157127
>>106141816
Here's a site that catalogs sites under 250 kb: https://250kb.club/
Anonymous No.106153652 [Report] >>106156850
>>106142475
wouldnt using inline css / styles make it incredibly difficult to update your styling?
>>106146193
and is replaced with what?
Anonymous No.106153664 [Report] >>106153697
>>106152105
Have looked, I've found some 'free' music that you still have to pay for to download. To be fair you can pay just $1 but I'm looking for some albums from various genres that I can download and use for free.

Don't mind giving links to the artists on my site but it's just a demo project I'm doing so don't want to spend money on it but I do want to host it so the music needs to be royalty free.
Anonymous No.106153679 [Report]
>>106141913
Like all YouTubers, he got that from a blog post.
I haven't watched the video, but I guess that, just like the blog post, he's gonna ignore the TLS overhead.
Anonymous No.106153697 [Report] >>106160801
>>106153664
see if this helps, also "non copirighted" or something of the sort
https://www.google.com/search?q=free+for+non+commercial+use+music
Anonymous No.106154079 [Report] >>106154477
>>106151087
>nah
I'm afraid so, my friend
Anonymous No.106154477 [Report]
>>106154079
k, remove google then, I'll wait
Anonymous No.106154548 [Report] >>106154598
>>106152932
>>106152945
I forget what you two autists even started fighting over.
Anonymous No.106154598 [Report]
>>106154548
about google not being your friend
Anonymous No.106156850 [Report] >>106172515
>>106153652
>wouldnt using inline css / styles make it incredibly difficult to update your styling?
It would mean more work, unless you have some kind of build step, but it's the price you have to pay for better performance.
Anonymous No.106157127 [Report]
>>106153516
Besides NPR being the only good one for news. Everyone else on that list is dead website, link references or blogs. Not much of a website.
Anonymous No.106157502 [Report]
What do you guys think about a 'local only chat' website to combat all the new censorship? I'm thinking it would work something like this:
>someone posts a thread with a link to some news article
>you can go into that thread and post comments and view the comments that are made while you're in the thread
>all the comments in that thread will only be stored in IndexedDB in the browser (they will just pass through the server)
>use SSE to send the new comments to the browser while that tab is open
Anonymous No.106158409 [Report]
>>106153047
Because they're milenials and zoomers
ENTER
https://youtube.com/user/derekbanas
Anonymous No.106158416 [Report] >>106164026 >>106169111 >>106169121 >>106171167
someone got my stripe key, no idea how.
charged $1 over 10k times through the API.

My only guess is my home computer is compromised or claude code shit out my stripe key somewhere. remote root login disabled, no exposed git and it wouldn't matter anyways because .env since the beginning. Fresh key.
Same exact security precautions we use on a 3 million dollar a month product at work.
Either someone in my PC (fuck you if reading btw) or they guessed the key or an LLM spit my key out somewhere?
Anonymous No.106158790 [Report] >>106158905 >>106166875
I want to build a very simple CMS backened for a friend which will be accessed once a week to create a blog post. It needs a lightweight db with just a few tables. Output will be pushed directly to a CDN. What's the simplest way to host this application & db?
Anonymous No.106158814 [Report]
>>106141301 (OP)
does anyone here put wasm in their html?
Anonymous No.106158905 [Report] >>106158965
>>106158790
WordPress
Anonymous No.106158965 [Report]
>>106158905
This needs to be a custom-built backend.
Anonymous No.106159162 [Report] >>106168655 >>106186426
>>106142054
he monetizes content other people created by reacting to it. he reads articles (badly), gives his opinion as someone that doesn't have a real job, and collects ad money. he's a net negative
Anonymous No.106159201 [Report] >>106159219
>>106145847
SELECT * FROM c
WERE EXISTS (
SELECT 1
FROM b
WHERE b.a_id = ?
);
Anonymous No.106159219 [Report]
>>106159201
sorry, sent too early
SELECT * FROM c
WERE EXISTS (
SELECT 1
FROM b
WHERE b.c_id = c.id
AND b.a_id = ?
);
Anonymous No.106159357 [Report] >>106159832
>>106141816
grifters gonna grift.
14kB are about 175 lines of 80 characters. If you say each line has half the characters it, it's like 400 lines tops. This counting only text.
Anonymous No.106159423 [Report]
>>106141816
>How the fuck can you make a modern website under 14kb?
Easy, just don't be a spastic and get rid of all those jeetware frameworks you've been using.
Anonymous No.106159832 [Report] >>106159891
>>106159357
It's 14kB after compression using something like gzip or brotli, so it's actually something like 50kB. You don't need to fit the entire page in 50kB. You can just sent the above the fold content with the first request and lazy load the rest. Including any images, just set the dimensions of the images so you don't get layout shift. Everyone should be following the 14kB rule and it's not hard to do it.
Anonymous No.106159878 [Report]
>>106141426
>>106141816
>>106149366
Just use brotli and br headers on content. Jeez..
Anonymous No.106159891 [Report] >>106159975 >>106168744
>>106159832
doesn't have to be, I use h2 and all loads with ASGI asynchronously in parallel
https://github.com/emmett-framework/granian/blob/master/benchmarks/asyncio.md#event-loops
uvloops my near dead uncs
Anonymous No.106159943 [Report] >>106162388 >>106162893 >>106162907
anons how do i install a whole custom font onto my website? it's sort of hard to figure out how to convert it to web formats instead of just .tff
also i want to get rid of all the retarded characters like the arabic
Anonymous No.106159975 [Report] >>106164625
>>106159891
>asynchronously
We have been doing that in Go since forever. Does it use SSE?

>in parallel
Loading everything at once will cause the main thread to be blocked and the browser will freeze.

>uvloops
Not sure what that is, too pythonic for me I'm afraid.
Anonymous No.106160801 [Report]
>>106153697
Thanks, using a random album from youtube.

https://musac.netlify.app/
Anonymous No.106161163 [Report]
>review 5 PRs yesterday that I finally had time to get around to
>4 more PRs have been made today
Anonymous No.106161426 [Report] >>106161433
This is not matching 4chan-XT
/\b4chan\s*X?(-XT?)?\b/gi
Anonymous No.106161433 [Report]
>>106161426
testing 4chan-xt
Anonymous No.106161463 [Report] >>106161555
This regex is not matching that -xt by the end of the link in pic related. Why is that?
>>106157250
/\b4chan\s*X?T?(-XT?)?\b/gi
Anonymous No.106161555 [Report]
>>106161463
Yep, it is a bug in the script manager
/\b4chan(?:[-\s]?X(?:T)?)?\b/gi
Anonymous No.106162231 [Report]
>>106145847
>in an ORM like laravel/eloquent
well are you asking for an SQL or are you asking for the Laravel way???
Anonymous No.106162388 [Report]
>>106159943
It’s called programming, this is unavoidable task if you’re using blank severs with no framework or tools.
Anonymous No.106162893 [Report] >>106162907
>>106159943
>google the online converter from your font format to all the other formats you need
>get all the files
place them somwhere near the CSS files
>figure out in google how to link the fonts through css
that's it, that's how it works in full vanilla
Anonymous No.106162907 [Report]
>>106162893
>>106159943
to get rid of the unwanted characters you'll probably need a font editor, there are probably opensource ones
Anonymous No.106163996 [Report] >>106164480 >>106165870 >>106167324 >>106168782
recursion, flatten this
const arr = [1,2,[3,4],[5,[6,7,[8,9]]]]
// desired output
// [1,2,3,4,5,6,7,8,9]

using recursion, don't use .flat(infinity)
Anonymous No.106164026 [Report] >>106164342 >>106169111 >>106171167
>>106158416
found the answer to this btw. All my security was bypassed because when you visit the direct ip address of a server it uses the default server config and not the one you want. This ignored my htaccess and everything and displayed my entire env in the browser lol.

How did I find out? by installing Claude Code on my vps an asking it to find out what happened.
Anonymous No.106164342 [Report]
>>106164026
if you don't know what you're doing, just use a platform like vercel instead of trying to manage your own server
Anonymous No.106164444 [Report]
I shouldn't worry about structuredClone compatibility right
Anonymous No.106164480 [Report] >>106164567 >>106164578 >>106164599 >>106164990 >>106165638 >>106168782
>>106163996
I literally don't know recursion but isn't it like
function flatten(accumulator, currentElement){
if(!Array.isArray(currentElement)) {
accumulator.push(currentElement);
} else {
for(const element of currentElement) {
flatten(accumulator, element);
}
}
}
const acc=[];
flatten(acc,arr);
Anonymous No.106164567 [Report]
>>106164480
yes, a function calling itself is recursion
Anonymous No.106164578 [Report] >>106168782
>>106164480
and you got it almost right, tip: it's like you're doing it but a bit more simple, you got one part twisted, I believe
Anonymous No.106164599 [Report] >>106164617 >>106164990 >>106168782
>>106164480
nta but you don't need the accumulator

function flatten(nums) {
const result = []

for (let element of nums) {
if (Array.isArray(element)) {
result.push(...flatten(element))
} else {
result.push(element)
}
}

return result
}
Anonymous No.106164617 [Report] >>106164678
>>106164599
>result.push(...flatten(element))
this part I don't like, I'd go for just flatten(element)
Anonymous No.106164625 [Report] >>106168744
>>106159975
ASGI 3.0 is a standard like WSGI
it should exist in Go, but i guess you do FCGI FastCGI
Anonymous No.106164678 [Report] >>106164723 >>106164787
>>106164617
that won't work because flatten() returns an array. you would be pushing an array back into the array and back at square one
Anonymous No.106164723 [Report] >>106164787
>>106164678
it worked for me, I think I used .forEach or some shit, but that was the concept anyways
Anonymous No.106164787 [Report]
>>106164723
>>106164678
I think I did something else though, like a function with a function inside that did recursion alone or some shit, later I might try to re-do my version, hm, it might be on my chatGPT saved
Anonymous No.106164990 [Report] >>106165037 >>106168782
>>106164480
>>106164599
here it is what I was saying, pulled it form my gpt history, I was kind of happy, because I made it relatively quick and didn't have much experience with recursion
const flatten = (arr) => {
const result = []
const subFunct = (arrRec) => {
arrRec.forEach(el => {
if(Array.isArray(el)) {
subFunct(el)
} else {
result.push(el)
}
})
}
subFunct(arr)
return result
}
Anonymous No.106165037 [Report]
>>106164990
Ah right, you can easily define functions within functions in JS. It's convenient.
Anonymous No.106165638 [Report]
>>106164480
great job anon, though typically people like to either set accumulator last or have a default accumulator without needing to specify one
flatten(array, acc = []) {
...check head
...flatten tail
}
Anonymous No.106165870 [Report]
>>106163996
function flatten(arr, acc = []) {
if (arr.length == 0) {
return acc;
}

const head = arr.shift();
// or without shifting
// let [head, ...rest] = arr;
// then use rest instead of arr everywhere

if (!Array.isArray(head)) {
acc.push(head);
return flatten(arr, acc);
// or without pushing
// return flatten(arr, [head, ...acc])
}

return flatten(arr, flatten(head, acc));
}

const arr = [1, 2, [3, 4], [5, [6, 7, [8, 9]]]];
console.log(flatten(arr))

probably shift and push is faster in javascript, let [...] needs to be garbage cleaned. but this way means you are also modifying the original array. such is the life of a javascript
Anonymous No.106166377 [Report]
so many code-posts, feels good, comfy
Anonymous No.106166396 [Report] >>106166742
Business idea: big D dating app.
>dating app for people with big Ds
>everyone has to upload ID to prove that they're a real person
>big D havers have to upload proof of their big D
>female users have to upload proof of their female vagana

Will Apple and Google allow this app on their appstores or will it have to be a webapp?
Anonymous No.106166742 [Report]
>>106166396
No, they won't allow this sexist stuff.
Add a section where female users can post pictures of their boyfriends' Ds alongside their name, email address, address, date of birth, SSN, phone number, height, and weight (all this for their safety) and your app will not only pass but it will be regarded as a pinnacle of female safety and empowerment.
Anonymous No.106166875 [Report] >>106166879
>>106158790
I give up. I'm using Cl*udflare.
Anonymous No.106166879 [Report]
>>106166875
consider digitalozean
Anonymous No.106167324 [Report] >>106176328
>>106163996
function flatten(arr) {
return "[" + (""+arr).replace("[\[\]]", "") + "]";
}
Anonymous No.106167791 [Report]
webgl does wibbley wobbeley
Anonymous No.106167848 [Report]
>started new front end job
>all they want mostly is landing pages and other easy shit
>today they tell me I need to do a whole ass payment gateway for them

do you guys have any recommended guides for that? Because most I could find are just propaganda for services instead of actual guides
Anonymous No.106168112 [Report] >>106168576
I regret not using Jekyll earlier.
Anonymous No.106168576 [Report] >>106168618
>>106168112
is that the thing to make your peepee bigger
Anonymous No.106168618 [Report]
>>106168576
Well it certainly gave me some confidence.
Anonymous No.106168655 [Report] >>106168812 >>106168855 >>106171876
>>106141913
>>106141957
>>106159162
>>106142084
Primeagen completes Advent of Code every year
https://www.youtube.com/watch?v=BS1vV5ZiaT0
https://youtu.be/WpFyF8bE_W4
Primeagen's github showing all the Open Source software he wrote while at Netflix and his personal project
https://github.com/theprimeagen
https://github.com/Netflix/falcor
He may be a grifter but fact is he regularly streams himself programming for 8 hours a day and he's a better programmer than anyone ITT
Anonymous No.106168744 [Report] >>106176952
>>106159891
>>106164625
>Muh gateway interface.
Nigger, just use an application server. Oh yeah I forgot, Embedding Python is a nightmarish boondoggle, lmao.
Anonymous No.106168782 [Report]
>>106163996
>>106164480
>>106164578
>>106164599
>>106164990
Good morning saaars! I too enjoy LLM slop and street shitting.
Anonymous No.106168812 [Report] >>106168835
>>106168655
>he's a better programmer than anyone ITT
Told on yourself right there. Imagine being a worse programmer than this midwit.
Anonymous No.106168834 [Report] >>106168850
How do I become a great Front End dev / engineer?

I have been working for a while on this field but most things I did were very simple and not that challenging at all. I am doing a post graduate course but I feel like that won't be enough
Anonymous No.106168835 [Report] >>106168866
>>106168812
>anyone ITT
that includes you dumbass
Anonymous No.106168850 [Report]
>>106168834
You don't. Only tards go into that job. You can either be a pragmatic webshitter and fess up to your mediocrity or a webshitter with delusions on grandeur. 99% fall into the latter category.
Anonymous No.106168855 [Report] >>106168887
>>106168655
I don't think most people doubt his programming skills, it's just that his content is all slop. You can watch hours upon hours of his videos without learning ANYTHING at all. It's super sterile entertainment for the lowest common denominator.
Anonymous No.106168866 [Report] >>106191758
>>106168835
Oh shit you got me there. How will I recover from this? Will you accept my concession?
Anonymous No.106168887 [Report] >>106168908 >>106169009
>>106168855
>I don't think most people doubt his programming skills
I definitely do. Any time he speaks about something I know a lot about, he drops all kinds of beginner tells, but in an over-confident "my audience won't know any better" kind of way. The guy is a larping grifter, just like Lex Fridman, etc. All slop content creators are.
Anonymous No.106168908 [Report] >>106168945 >>106168950
>>106168887
>Any time he speaks about something I know a lot about, he drops all kinds of beginner tells,
example?
Anonymous No.106168917 [Report]
>e-celeb cock sucking thread
>MUST DEFEND HIS AD REVENUE
>I MUST GENERATE REVENUE FOR HIM
Go away jeets.
Anonymous No.106168945 [Report]
>>106168908
Check the comment section on any video that features code
Anonymous No.106168950 [Report] >>106171127
>>106168908
Terminals for one. For someone who's supposedly a senior engineer and lives in a terminal, you'd expect him to have at least a high level understanding of how it works. I don't remember a specific example because I haven't watched his slop in months, but it wasn't just once and it wasn't just that subject.
Anonymous No.106169009 [Report] >>106169059
>>106168887
He has industry experience, and he's done several projects on stream, and he certainly has the "can-do" attitude you need to be successful. You don't need to know everything by heart to be a good programmer, it's enough if you know where to look when you need it.
>over-confident "my audience won't know any better" kind of way
He definitely drops beginner info without the intention of actually teaching the audience much about it, but I don't feel like his purpose is to misrepresent his skills. I mean obviously he wants to come off as very confident in general, but he's no Maldavius Figtree.
Anonymous No.106169059 [Report] >>106169088 >>106169152
>>106169009
Industry rewards people who get work done, yes. I'm sure he's great at that.
>there's a strong correlation between shipping corpcrud and superior programming skills
Source?
Anonymous No.106169088 [Report]
>>106169059
>there's a strong correlation between shipping corpcrud and superior programming skills
For a counter example of this, just look at Peter Levels. The guy is bordering on retarded and not at all a good programmer, but still filthy rich.
Anonymous No.106169104 [Report] >>106169120 >>106171178
How come every web dev team has such shit developers? I program circles around this team that has been here for years.
Anonymous No.106169111 [Report]
>>106164026
>>106158416
you sound like a jeet
Anonymous No.106169120 [Report] >>106169132
>>106169104
Because they were attracted by high salaries and played the game just right. This is why "AI is going to replace you bro" is unironically right. It's going to replace those types of people.
Anonymous No.106169121 [Report]
>>106158416
>placing .env files in a public directory or web root

That was entirely a you problem
Anonymous No.106169132 [Report]
>>106169120
AI will replace everyone. It's over.
Anonymous No.106169152 [Report] >>106169285
>>106169059
By "industry" you mean the "entire world," yes.
>superior programming skills
I never said that.
I think good programming skills are skills used for getting work done well enough depending on the requirements. The act of programming itself is not the point. Creating something is the point. Like, it doesn't matter what kind of uber autistic genius you are who can solve leetcode questions with obscure algorithms, if that's all you produce, it's just masturbation. Meanwhile, people who know far less about programming may be cranking out projects which actually do something.
Anonymous No.106169211 [Report]
I will answer your AWS and SQL questions until my trazadone kicks in and i go to sleep.
>what should i read to learn more?
Don’t. Build.
>sell me on using AWS instead of a VPS
I’m not a salesman and you didn’t give me a use case.
Anonymous No.106169285 [Report] >>106169368
>>106169152
Superior programming skills are measured in terms of efficiency and correctness. That's what separates webshitters who do things like parsing non-regular languages with regex and people who care about doing things properly. But sure, it doesn't matter a lot of the time (until it does). That was my point. Whatever those kinds of people are good at, it isn't programming. Primatard is no Fabrice Bellard.
Anonymous No.106169368 [Report] >>106169411
>>106169285
I think there are a lot more important things than muh efficiency, and there are a more shades to the story than literal retards vs. literal /g/ memes. An obsession with "perfection" in programming circles is why so many people never get anything meaningful done.
To me, programming is about the entire process, it's not just about the code.
Anonymous No.106169411 [Report] >>106169596
>>106169368
>programming is about the entire process
It's not though. Programming is just programming. What do you think would happen if Primeagen had 5 years to create a better qemu or FFMPeg? Slop shippers can only ship when efficiency can be papered over with more hardware.
Anonymous No.106169596 [Report] >>106169680
>>106169411
Programming is just solving problems. though. You break down complicated problems into simpler problems.
>if Primeagen had 5 years to create a better qemu or FFMPeg
I suppose his response to such a challenge would be the same as 99.9999% of people. I'm not a fan of the guy, but I think his general attitude toward programming seems pretty good.
I don't think of it as a hierarchy with people developing FFmpeg at the top and web developers at the bottom.
Anonymous No.106169680 [Report]
>>106169596
Classic motte and bailey.
>programming doesn't actually mean anything bro. It can just mean whatever I stretch the definition to.
Anonymous No.106169737 [Report]
ThePrimeTime is a sloptube reaction channel for baseddevs and you should stop posting it
Anonymous No.106171014 [Report] >>106201967
anons is there any nice program that you like to do website code in? i like nano alright but it just feels a bit slow, probably because im a bit slow but yah
Anonymous No.106171087 [Report]
Why can't my MERN stack post?
Just too many errors in my controller to fix in one day I suppose
I wish the server wouldn't start until all errors were cleared but what can you do. Stuck in dev mode for god knows how long now.
Anonymous No.106171127 [Report] >>106175173
>>106168950
What about terminals specifically? He spends half of his streams in Neovim.
Anonymous No.106171167 [Report]
>>106164026
>>106158416
next time you ask yourself why webshitters have such a bad reputation, remember this anon
Anonymous No.106171178 [Report] >>106171378
>>106169104
web dev has such a low barrier to entry
Anonymous No.106171378 [Report]
>>106171178
GPT will save us Nodevs
It's gotten us this far
It can't quit now
Anonymous No.106171395 [Report] >>106172431
SAAAR JAVASCRIPT BAD SAAR YOU MUST EMBRACE THE HTML SAAR
>breaks the anchor tag in your path
>shits and fards uncontrollably when asked to fix
https://github.com/bigskysoftware/htmx/issues/2469
Anonymous No.106171412 [Report]
I have been working on fixing my cs knowledge for the past few years. So far I have read CS:APP, OSTEP, DDIA, crafting interpreters and SICP. I did the exercises using various languages: rust, zig, C, typescript and ocaml. I also learned linear algebra and am currently applying it to my ray tracer that uses web gpu. Hopefully it will be enough to get me real dev job that isn't web shit. I am tired of dealing with retards that can't understand how react rendering works.
Anonymous No.106171876 [Report]
>>106168655
>https://github.com/Netflix/falcor
that's a wrapper for the native fetch api, trying to abstract over network traffic happening. it's technological nonsense, cost netflix millions of dollars to create and is now abandoned, just another source of frontend churn. that's his experience, working on something that generates zero business value because the company hired too many engineers and let them run wild without oversight. great for the engineers to get paid to do inconsequential bullshit without deadlines, unclear requirements, legacy code constraints, anything that requires actual engineering, just solve the little problem you imagined yourself to have. that's my problem i have with him, he calls himself a "netflix engineer" while getting paid from the results of the work the real engineers did. a trend he continue on youtube where he reads their content for ad money to cash in on their work as well
Anonymous No.106171904 [Report]
>>106141482
Lose the text too, maybe. Text takes up a surprisingly large portion of the size of minimal websites and although it compresses well that can only get you so far.

It seems that the 14 KB thing is more about trying to get something useful above the fold to fit in that limit?
Anonymous No.106172431 [Report] >>106172450
>>106171395
HTMX is bloated. You should use fixi.js and please stop it with the anti-Indian racism.
https://github.com/bigskysoftware/fixi
Anonymous No.106172450 [Report] >>106172492 >>106172540
>>106172431
OR you could just write JS/TS, perhaps even with a framework, like a normal person.
Anonymous No.106172492 [Report] >>106172540 >>106172607 >>106172763 >>106173767
>>106172450
That is not an option if you want to make performant web apps.
Anonymous No.106172515 [Report]
>>106156850
You could just embed all your styles to be inline during build time
Anonymous No.106172540 [Report] >>106172763
>>106172450
>perhaps even with a framework
>>106172492
Anonymous No.106172607 [Report] >>106172625 >>106173195
>>106172492
What if we made faster hardware (not an option I know)?
It amazes me how we've gone backwards with server side rendering HTML because people still own cheap Chinese crap that can't compute shit.
Anonymous No.106172625 [Report] >>106172763
>>106172607
the fix is to create browser apis that don't rely on mutating a giant xml file but draw to the screen directly
Anonymous No.106172763 [Report] >>106172912 >>106173106 >>106173195 >>106174255 >>106176716
>>106172492
>>106172540
>>106172625
An SPA can definitely be performant and lightweight. These days I can visit a web page which is a few megabytes big, when you include fonts and images and everything, and all of it will download in maybe 1 or 2 seconds. That's fine. You can make an SPA where the initial load is much smaller than that. Then you just load new stuff from the server as the user navigates around the SPA.

SPAs are often more efficient than pure SSR web pages. In the old days you'd navigate a website where much of each web page was exactly the same (same header, same sidebars, same footer), with just some different content in the middle. Despite the shared content, you still needed to download a whole new HTML document for each page, right? These days you can make it more efficient with an SPA. Keep a web page in the browser, with the header and footer etc, and just load new bits of content with JS.
Anonymous No.106172912 [Report] >>106173195
>>106172763
This. People keep seeing about muh javascripterino but they rarely think about anything beyond that.
Anonymous No.106173106 [Report]
>>106172763
you'll have to re-downloaded the shared content a lot to amortize the js blob required for the dom stitching infrastructure, at least in the current js frameworks
Anonymous No.106173195 [Report] >>106173231
>>106172607
>>106172763
>>106172912
1) HTML compresses much better than JSON payloads.

2) The browser is much better at rendering HTML directly because it has to do less work. The difference is very significant if you use cheaper smartphones.

3) SPAs make SEO harder because different displays of content often get the same url.

4) It's hard to get a good FCP with a SPA.

5) SPAs are almost unusable for people on slow 3G or satellite internet.
Anonymous No.106173231 [Report] >>106173613 >>106173664
>>106173195
>3) SPAs make SEO harder because different displays of content often get the same url.
Isn't that solved problem for ages though? You simply don't use the same URL for different displays of content (that's bad) and render a different version of your web page for bots like GoogleBot with all of the links and content fully accessible to them.
Anonymous No.106173613 [Report] >>106173664
>>106173231
>Isn't that solved problem for ages though?
yes, so is SEO bots executing js.
this retard is stuck in 2009
Anonymous No.106173664 [Report] >>106174094
>>106173231
>>106173613
You can work around it, but it's harder. I constantly run into SPAs that render different content for the same url. That's not good for SEO.
Anonymous No.106173767 [Report] >>106173915
>>106172492
When MPA maxis talk about performance they only mean load times with completely empty cache. They dont mean 500ms to open dropdowns or modals. Because then they'll say you dont need dropdowns and modals
Anonymous No.106173915 [Report] >>106175886
>>106173767
>They dont mean 500ms to open dropdowns or modals
It most likely won't take that long if you follow the 14kB rule. You could also lazy load them: send the HTML and CSS that displays the dropdowns and modals with the first request (if they are above the fold) and then lazy load the content.
Anonymous No.106174094 [Report] >>106174113
>>106173664
that means either your web server or SPA router are setup incorrectly. this has been a solved problem for over a decade at this point
Anonymous No.106174113 [Report]
>>106174094
>SPA router are setup incorrectly
Not surprising considering how complicated they are.
Anonymous No.106174255 [Report]
>>106172763
>download a whole new HTML document for each page
Unless you're in deep with the FAGMAN, it's a fucking tiny text document. Everything else is a cached image.
Don't lie to yourself, you're not making another twitter. You're making another shitty "about us" image carousel
Anonymous No.106174846 [Report]
FUCKING COMMIES ARE COMING FOR YOUR JSON API
https://datatracker.ietf.org/doc/html/rfc9457
I WILL RETURN WHATEVER THE FUCK ERROR I WANT
YOU WILL LIKE IT
Anonymous No.106175173 [Report]
>>106171127
Like I said, I don't remember a specific example, I just remember the conclusion I drew after watching a bunch of his stuff.
>Source: trust me bro
Yes.
>He spends half of his streams in Neovim.
OK, and?
Anonymous No.106175886 [Report] >>106176108 >>106176349
>>106173915
That would look ugly if the modal is rendered using branching logic. MPA is awful for complex web apps and also scales terribly.
Anonymous No.106176108 [Report]
>>106175886
>also scales terribly
How many daily users do you have? 2?
Anonymous No.106176311 [Report]
one of my favorite times of my web dev trade study was when the teacher showed squirtel in the screen and said "squirt"
Anonymous No.106176328 [Report]
>>106167324
kek, I said recursion, but this is cool
Anonymous No.106176349 [Report] >>106176459 >>106176563
>>106175886
>MPA is awful for complex web apps and also scales terribly.
False. And why do you say that it "scales terribly"? No one has ever said that.
Anonymous No.106176459 [Report] >>106176685
>>106176349
It's always faster for the server to shit out JSON than HTML
It is known.
Anonymous No.106176563 [Report] >>106176685 >>106176701
>>106176349
Maintaining state in the server instead of client consumes unecessary bandwith. MPA is only good for TTI. SPAs with a sync engine beats MPAs everytime.tRry building figma, google sheets or linear using MPA.
Anonymous No.106176618 [Report]
>2x4s are fucking stupid! Never use 2x4s! You can't build a skyscraper with 2x4s!
Anonymous No.106176685 [Report] >>106176701
>>106176459
>It's always faster for the server to shit out JSON than HTML
In practice, it's not. HTML compresses well and the difference between the compressed JSON and HTML response is often on the order of hundreds of bytes. That assumes equivalent data content which is often not the case. JSON payloads tend to be larger and we need more of them to render the same UI.

>>106176563
You will likely consume less bandwith by sending the needed HTML when it is needed instead of loading several MB at once on the first visit. That will also lead to a bad FCP.
Anonymous No.106176701 [Report] >>106176912 >>106176912
>>106176563
>>106176685
Also, you can use caching with a MPA.
Anonymous No.106176716 [Report]
>>106172763
>iframes your static content
heh
Anonymous No.106176912 [Report] >>106176939 >>106177980
>>106176701
The network overhead for bundling an app and sending it once is less than breaking it to chunks. You can deploy your entire web app through a cdn thus saving network bandwith for your server. You can't do that with MPA.

>>106176701
You can't do granular caching like in SPA. You have to cache the whole web page.
Anonymous No.106176939 [Report]
>>106176912
That caching is heavy and resource intensive too, say you have a Wordpress site that you want to cache bits of, well you better be well versed in PHP's opcache and memcache, etc, and know how to tune it just right. You can't just let the CDN handle it.
Anonymous No.106176951 [Report] >>106177150
MPA with HTMX retrieving only necessary content. Now fuck off.
Anonymous No.106176952 [Report] >>106177011 >>106201914
>>106168744
Well they are kind of comfy for coding up quick dirt that werk™ great. I wrote a few servers for upload, download, template generation. Flask and quart are fun. But I know there is better stuff. I hope though that HTTP/3 and QUIC fails. Web peaked at HTTP/2 SPDY without that UDP dorkness. Big corpo thinks we want it.
Anonymous No.106177011 [Report]
>>106176952
>She doesn't want QUIC/HTTP3 zero round-trip time
Anonymous No.106177123 [Report]
>QA and tech support sends me 5-10 minute loom videos to the issue rather than just send me an email with a screenshot and what is wrong
Anonymous No.106177150 [Report] >>106178171 >>106179989 >>106181288
>>106176951
Even the HTMX author admitted that SPAs are better suited for complex apps like google sheets. If you want best of both worlds than you can just use a hybrid framework.
Anonymous No.106177980 [Report]
>>106176912
>sending it once
>spend thrice the amount of time before first contentful paint
>not interactive until 10 seconds have passed
>oops cache out of date, gotta do it all over again
Anonymous No.106178171 [Report]
>>106177150
Are you making apps or websites?
Of course the requirements are different.
Anonymous No.106178382 [Report] >>106178477 >>106178822 >>106178897 >>106180253
building a quant news website with an integrated UI for backtesting, this is the Research page, the home page is a (quant focused) news feed with comments and brief market overview. the backtesting UI will be a front end for NautilusTrader, I was developing my own backend but it's endless work and this one is similar to what I was going for (but probably a lot better)

and yes there is a dark mode for the site, I will probably default to that but I like how the light version looks
Anonymous No.106178477 [Report] >>106178822 >>106178897 >>106180253 >>106180317
>>106178382
front page, needs some work but here's the idea. there will be a Develop tab that functions as an IDE so users can write new strategy or execution code if desired, etc.
Anonymous No.106178822 [Report] >>106178897 >>106180253
>>106178382
>>106178477
new strategies can be created with code in the IDE, and existing ones can be combined with others and analyzed in the UI to form a new strategy from existing pieces. still working on this part. I want users to be able to easily perform analysis, it's basically a button driven Jupyter Notebook. for power users, there is also a Jupyter Notebook UI with a library of snippets.
Anonymous No.106178897 [Report] >>106180253
>>106178382
>>106178477
>>106178822
the last page is the Monitor page, which will be a dashboard for live deployment, and also used to 'step through' strategies bar by bar to evaluate their behavior, make sure it's doing what you want, check indicator values, debug etc. it's all got a very long ways to go but it's fun. I hope that combining a news + discussion community plus built in features / UI like this will be useful to some. trying to focus on making the UI extremely pleasant to use
Anonymous No.106178992 [Report] >>106179047
Hello!
I hate your lack of style!

Thanks,
AgingEyes87
Anonymous No.106179047 [Report]
>>106178992
who was that directed at
Anonymous No.106179989 [Report]
>>106177150
And I absolutely agree with that. If youre building an interactive app like Google Sheets, Figma, etc, definitely go with a bloat JavaScript framework that will make your life easier. If you're just building a website(landing page, ecommerce, blog, wiki, etc) then MPA with HTMX is more than enough.
Anonymous No.106180253 [Report]
>>106178382
>>106178477
>>106178822
>>106178897
Very cute style. Which CSS framework is that?
Anonymous No.106180317 [Report] >>106180588
>>106178477
I'd say give the mini-graphs some kind of frame or, something, they look lacking, at least to me, experiment, get inspiration for minimalist graphs

I'll share the design copypasta

/*design*/
https://medium.com/refactoring-ui/7-practical-tips-for-cheating-at-design-40c736799886

/*desing inspiration web*/
https://dribbble.com/
https://www.uplabs.com/
https://www.behance.net/
http://www.goodweb.design/
https://onepagelove.com/
https://www.awwwards.com/
https://medium.com/refactoring-ui/7-practical-tips-for-cheating-at-design-40c736799886
https://codepen.io/nicolaspavlotsky/full/ZJPXgy
https://hype4.academy/articles/design/glassmorphism-in-user-interfaces

/* fonts */
https://fontpair.co/

/* design theory */
https://www.ibm.com/design/language/illustration/flat-style/design/
https://www.ibm.com/design/language/

/* hosts refactoring UI pdf */
https://z-lib.org/

/* design from refactor ui dude */
https://twitter.com/i/events/880688233641848832?lang=fr
https://www.youtube.com/watch?v=7Z9rrryIOC4 [Embed]
https://gofile.io/d/KCQMw2
Anonymous No.106180576 [Report]
design deez nuts
Anonymous No.106180588 [Report] >>106180649
>>106180317
thanks! I had Claude make the CSS, inspired by this site:
https://fullstackopen.com/en/

It calls it a Neo-brutalist design, and when searching that term it was indeed right. I agree about he charts on the front page, there's a lot of tweaking I still have to do. The biggest value prop of the website IMO will be the intuitive strategy building UI, and that's such an open ended problem so I've been mostly mulling that over.

I'll check out those resources, designing ui has been hard
Anonymous No.106180649 [Report] >>106180866 >>106192642
>>106180588
I'd say the design is good enough, just the mini charts rubbed me the wrong way, but neo-brutalism is a good way to describe them
Anonymous No.106180651 [Report]
>>106141426
What about SSL? Everybody uses encryption now to prevent ad hijacking by ISPs
Anonymous No.106180854 [Report] >>106181673
apparently, in js, and probably in other langs as well, Set and Map lookups, like set.has(value) are way more performant than their array (specially) and object counterparts.
Anyone here on the know and willing to give us a micro-class, their take, or merely open a discusson on the subject?
Anonymous No.106180866 [Report] >>106180914
>>106180649
this is the IDE page with the terminal open
Anonymous No.106180914 [Report] >>106181080
>>106180866
25/10
Anonymous No.106181080 [Report] >>106181096
>>106180914
lmao thx, trying to fix syntax highlighting causing text overlap right now but overall I like it
Anonymous No.106181096 [Report] >>106181278
>>106181080
interesting, the nerds at desktop and progremlin thread some times have interesting color combinations for their syntax highlighting
Anonymous No.106181278 [Report] >>106181333
>>106181096
fixed it, somewhere along the way it stopped integrating Monaco
Anonymous No.106181288 [Report]
>>106177150
Sure but most web apps are not google sheets or figma. And hypermedia frameworks like datastar is going to be a much better choice for web app with a lot of real time data. SPAs are too slow for that.
Anonymous No.106181333 [Report]
>>106181278
interesting, I believe there might be more levels of syntax coloring than what your'e showing, in case you want to dig that way
Anonymous No.106181673 [Report] >>106181728
>>106180854
To find something in an array you must check each item.
Set and Maps are sorted so only one or a few entries must be checked.
Anonymous No.106181728 [Report] >>106181751
>>106181673
so it's actually sorted array, or a linked list kind of deal internally? and the algo performs whatever smart search to optimize the looup. sick, is there somewhere where I can read about this?
Anonymous No.106181751 [Report]
>>106181728
Look up the two functions in Spidermonkey and V8
Anonymous No.106183212 [Report]
not so fast
Anonymous No.106185607 [Report]
new thread
Anonymous No.106186145 [Report]
canon /wdg/ opinions on ljharb?
Anonymous No.106186426 [Report] >>106186513 >>106186549
>>106159162
If he was a net negative, he wouldn't collect money.
Anonymous No.106186513 [Report]
>>106186426
>if it earns money, it is morally good
thank you for sharing ranjeet
Anonymous No.106186549 [Report]
>>106186426
you know the websites that are listed first for every google search but contain nothing but fluff, content stolen form somewhere else and ads? I'd call those a net negative as well, yet they make money, else they wouldn't exist
Anonymous No.106186824 [Report] >>106186959 >>106187328
how do you create a floating post window like 4chan and submit it with htmx or tranny fixi.js
Anonymous No.106186959 [Report] >>106187375
>>106186824
probably use a tiny javascript library or write it yourself
Anonymous No.106187328 [Report] >>106187375
>>106186824
HTMX and fixi.js are not meant to manage state on the client so you would have to write your own JS code or use a third-party library.
https://htmx.org/examples/sortable/
Anonymous No.106187375 [Report] >>106187507
>>106187328
>>106186959
I was just more of less thinking how in the case of HTMX, it's really an analog for more classical web like forums/blogs/imageboards that follow a PRG pattern. In case of 4chan, I hit post and receive a JSON payload that tells me to either redirect or promt a captcha etc. Or for Xenforo/PhpBB when you perform a search the server responds with a redirect to a search result (/search/{id}/{slug} etc...). I'm just really confused by the purpose of HTMX and fixi.js beyond toy examples, at that point I'd rather just write my own ajax.js that handles my use case perfectly. At least from reading the fixi.js repo and source code, I would rather use fixi.js because it's very easy to extend/customize. HTMX is just a mess, I would not dare touch it.
Anonymous No.106187507 [Report]
>>106187375
>I'm just really confused by the purpose of HTMX and fixi.js
To make it easier to send and swap in HTML directly instead of sending some JSON and then rendering it on the client. It's much faster and simpler to just send HTML directly. You're correct that it's not enough for everything you might want to do, but you can always write your own JS to handle that or use another third-party library.

I agree that HTMX is too messy and bloated. I have used it in the past but I don't think I'll ever use HTMX again. I'm currently using fixi.js on one of my web apps and it works great. I also use the "fixi event debouncing extension" to get active search. It's true that it's not enough for everything my web app needs to do but that's ok. I just write some JS inside of <script> tags when I want to handle state on the client and it works fine. JS is fine if you don't have to write too much of it and using fixi.js significantly reduces the amount of JS you have to write.
Anonymous No.106188623 [Report]
bump
Anonymous No.106190130 [Report] >>106190159
Prompting AI to make backend CRUD apis is trivial but idk how to even begin prompting for the frontend
I think pure backend roles will go away
You either fullstack or frontend
Anonymous No.106190159 [Report]
>>106190130
And as for frontend I was too bearish about AI replacing frontends
Textual UX can be too slow for doing CRUD than a well crafted UI
So you still need UI
I now think you will continue needing UI until elon musks brain chip allow you to communicate your CRUD intent at the speed of thought. So my job is safe until brain chips.
After that though, you can just feed your thoughts into an LLM which will do CRUD directly on the backend.
No need for UI
Anonymous No.106191416 [Report] >>106192163
people using AI to progm for them and I'm here using AI to improve my progremming skills
Anonymous No.106191758 [Report] >>106203525
>>106168866
Accept the loss. Anon dunked on you
Anonymous No.106192163 [Report] >>106193370 >>106193385
>>106191416
I'd be careful, the AI can provide you false info or outdated (and sometimes dangerous) information. For example, latest ChatGPT model will still write code that uses net.IP instead of netip.Addr
Personally I found AI really good at "double checking my code". I can provide it a method, redacted of course, give context, and it can write tests and also find bugs. I did find a few that to this
Anonymous No.106192642 [Report] >>106192655 >>106192685
>>106180649
>charts
I fixed them, but the earnings calendar is messed up (will fix later). they were so bad before lol thanks for the tips
Anonymous No.106192655 [Report] >>106192685 >>106193670
>>106192642
forgot pic
Anonymous No.106192685 [Report]
>>106192655
>>106192642
I pushed changes to the site too, feel free to look around. I can post the CSS style from GitHub too if anyone wants it
https://alphapulse.org
Anonymous No.106193362 [Report]
>>106143752
Finally fixed this. You guys were fucking useless as expected.
Anonymous No.106193370 [Report]
>>106192163
yes and worse, I correct ai, lately less, I think it's getting better. I'm repelled ny the very nature of cybersecurity. mostly because new vulnerability every day and some times at 3 in the night. I'm not about that life.
I'm just practicing progremming in js, cause it's comfy. I "know" programming, to some degree, I'm merely trying to not lose skills and gain some while I'm at it.
Anonymous No.106193385 [Report]
>>106192163
Interesting uses 2bh
Anonymous No.106193670 [Report]
>>106192655
I really like the style of this, is this custom, or are you using a framework?
Anonymous No.106194441 [Report] >>106194551 >>106194567 >>106194609 >>106196328 >>106201871
General question to all /wdg/ posters:

Would you keep each initial page load below 14kB after compression (you can lazy-load the rest) and keep all critical CSS inside of <style> tags or inline it? Why/why not?

It seems like that leads to the best performance:
>>106141426
>>106142475
Anonymous No.106194551 [Report]
>>106194441
>Would you keep each initial page load below 14kB after compression (you can lazy-load the rest) and keep all critical CSS inside of <style> tags or inline it?
No
>Why/why not?
The same reason I don't make websites by writing machine code
Anonymous No.106194567 [Report] >>106194591
>>106194441
Progressive enhancement dictates you only load the essentials i.e. the text of the article or the table of data with only the minimal CSS required for conveying information inlined in a <style/>, and you can load in extra non essential CSS classes non-blocking.
https://web.dev/articles/defer-non-critical-css
The way I understand this is you keep everything under 14kb for that first paint, and then progressively add information. But, the first visit is the most important one and speed is important until the user caches assets.
Anonymous No.106194591 [Report]
>>106194567
The only concern is how you would prevent content moving around once things load in, I guess you would need to define a size of the container somehow.
Anonymous No.106194609 [Report] >>106194807 >>106196297
>>106194441
No because nobody gives a shit. My client won't notice (and isn't paying me enough) and users won't notice except that one guy on dial up. Most code you write for money is slop and should be treated as such.
If you mean my personal website or project then yes.
Anonymous No.106194807 [Report] >>106194859 >>106199105
>>106194609
I'm that dial up guy and I give a shit, go fuck yourself.
Anonymous No.106194859 [Report]
>>106194807
I recognise that you give a shit. If the client gave a shit about you giving a shit, I'd accommodate with pleasure, but they don't. That's the way she goes.
Anonymous No.106196297 [Report] >>106196768
>>106194609
I understand, but it's still sad. I would be nice if more web devs cared about the craft.
Anonymous No.106196328 [Report]
>>106194441
No, there’s no reason for optimization in web. All the dead machines that couldn’t run Java or high performance PHP are gone. Any machine in current state can run any website.
Anonymous No.106196582 [Report]
Anyone else stuck in a role they can't stand? I've been applying to jobs nonstop. I'm probably in the hundreds now. I don't hear a single thing back. Crazy, just a year or two ago, I was constantly getting invites for interviews. Now I'm not hearing shit. It feels like I've been added to a blacklist or something.

t. 10 years experience
Anonymous No.106196768 [Report] >>106197294
>>106196297
It is sad. As soon as the LLMs got half decent, programming threads are dead. Hardly anybody did it for the joy, apparently.
What you might be missing is that every successful project ever needed compromise to get finished, on budget. Usually our dial up guys get the chop in favour of writing the code faster. But it's the same reason we're not all writing pure functional clojurescript or whatever.
Anonymous No.106197222 [Report]
My one friend hasn't been able to get a job in 4 years, what do I do.
Anonymous No.106197294 [Report]
>>106196768
I want to contribute but I'm a GPT user and so no one responds so I'm just better off working with stupid broken GPT code cause I'm in too deep now.
it fucked up my posting system so badly I'm having to learn it all myself just by reading the code and stuff..MERN just isn't as fun as vanilla so I'm struggling to match up my stupid middleware with my react component. I fucking hate middleware, hooks, helpers, etc. If I could just use components, models, controllers and routes I'd be fine.
Anonymous No.106198648 [Report]
how difficult is it to develop a face scanner that tries to find faces of people on the internet that is publicly available and return the results based on a image you submitted? Where do you even start?
Anonymous No.106199105 [Report]
>>106194807
Sounds like a you problem
Anonymous No.106199610 [Report] >>106199655
>>106141301 (OP)
>decide to use copilot to make an app
>the further I get into it the more I just let it do its thing
>deep enough that I no longer know how the app works but each file is 1000 lines long
>hit my premium credits limit (didnt even know this was a thing) for the month
>august 9th

Yeah none of this was worth it…
Anonymous No.106199655 [Report] >>106199956
>>106199610
The vibe coder should fear the 10x developer
Anonymous No.106199813 [Report]
GPT chads are oppressed
Anonymous No.106199956 [Report] >>106203104
>>106199655
the final boss is the 10x vibeloper
Anonymous No.106199972 [Report]
>>106141426
This minmaxing of damn near inperceptible load times that no one cares about is why they aren't hiring you fags.
Anonymous No.106199981 [Report] >>106200000 >>106200029 >>106200301 >>106200921 >>106201844
>>106141301 (OP)
>npm install lodash
>500kb size in build after only using one util function
>Fuck it we ball
Anonymous No.106200000 [Report] >>106200029 >>106207157
>>106199981
based, this was literally the jquery pill
Anonymous No.106200029 [Report] >>106200074
>>106199981
>>106200000
>lodash
Disgusting
>jquery
Also disgusting
Anonymous No.106200074 [Report] >>106200117
>>106200029
$('#106200029').attr('name', 'not based')
Anonymous No.106200101 [Report] >>106200734
>>106141426
Lol what a bunch of stupid horseshit
No one who gets any shit done cares about this autistic garbage
Anonymous No.106200117 [Report] >>106200164
>>106200074
Use native JS. There is no need for jQuery.

There is a guy in /wdg/ (maybe it's you) who always makes the argument "but jQuery is good because it caused JavaScript itself to adopt new, better APIs". Okay maybe that's true, I dunno. Even if that's true, it's also true that jQuery in 2025 is dumb.
Anonymous No.106200164 [Report]
>>106200117
dont worry anon nobody brings up jQuery when seriously considering anything. sometimes i just miss YOLO-ing some CDN into a HTML and start blasting
Anonymous No.106200301 [Report]
>>106199981
>npm install preact
>3kb
>npm install tiptap editor
>300kb
Anonymous No.106200552 [Report]
>>106141482
>just remove javascript
you can just read books at this point
Anonymous No.106200559 [Report]
>>106141957
terrible bait
Anonymous No.106200734 [Report]
>>106200101
No shit. You can't make a useful website in less than 15kb, unless it's just a blank html which dynamically pulls data or just a wall of text like that link is.
Even my minimalistic website isn't this small. 0 JS, 3Kb CSS, 50Kb html, and 3MB of dynamically loaded images. Anything under 1MB is small enough for 99% of the population, and the 1% of poorfags and autists doesn't matter.
Anonymous No.106200758 [Report] >>106200796 >>106201366 >>106202231
If you care about performance: shouldn't you only fetch the HTML, CSS, and JS you need and then use pushState to update the url?
https://developer.mozilla.org/en-US/docs/Web/API/History/pushState

This would mean that you wouldn't have to fetch the HTML etc. that doesn't change.
Anonymous No.106200796 [Report]
>>106200758
If I cared about performance I wouldn't map the same 100kb array 10 times on the client side just to render a list.
Anonymous No.106200921 [Report] >>106200988 >>106201811
>>106199981
>using lodash in 2025
>using lodash instead of lodash-es
>using a bundler that doesn't treeshake
skill issue
Anonymous No.106200988 [Report]
>>106200921
>lodash-es
why would you use a Spanish version of lodash?
Anonymous No.106201366 [Report]
>>106200758
Based SPA enjoyer
Anonymous No.106201422 [Report]
>>106149366
It is 14kb after compression, the site itself is around 28kb
Anonymous No.106201811 [Report]
>>106200921
look at this nigga shakin trees, my vibes are simply enough
Anonymous No.106201844 [Report]
>>106199981
“A little copying beats a little dependency” — the Go authors
Anonymous No.106201871 [Report]
>>106194441
Too much work
I’d rather have all my CSS in one or more files and not worry about minification
“Hundreds of kilobytes” is fast enough to load for me
Anonymous No.106201914 [Report]
>>106176952
I remember reading that 3 is better with a bit of mobile-phone packet loss but otherwise 2 wins for performance
Also isn’t 2 UDP-based, too?
Anonymous No.106201967 [Report]
>>106171014
Visual Studio Code
Anonymous No.106201970 [Report]
>>106141913
he's literally in the pocket of vercel and shills nonsense. there's often some kind of technical merit to what he's talking about, but it's not worth watching his videos for. I can summarize it: 14kb fits in one tcp packet, so it can in the most extreme cases be around 600ms faster. Yeah, that's great and all, but try maintaining that, and communicating the technical challenges revolving around that to your team leader who is trying to communicate with lower executives. It's not happening. 14kb is basically only something to be aware of. That's it.
Anonymous No.106202231 [Report] >>106202743 >>106203092
>>106200758
This but with htmx
Anonymous No.106202743 [Report] >>106203900
>>106202231
I think fixi.js would be a better choice (made by the same guy who made htmx) because it's less than 90 lines of JS, so you could put it inside of a <script> tag. So you wouldn't need to download the JS file. Everything would work directly after the HTML file has downloaded (assuming that you have all your CSS inline or in a <style> tag). And you would keep that HTML file below 14kB after compression and then lazy-load the rest that's below the fold.

And you would only need to download that JS (fixi.js) once since you would be swapping out all the content that's changing using fixi and then use pushState to change the url (to make sure that SEO is still good).

You would end up getting a hyper-performant SPA. In fact it would be the most performant web app possible.
Anonymous No.106203092 [Report] >>106206387
>>106202231
htmx is a useless meme
Anonymous No.106203104 [Report]
>>106199956
Secret boss AI inventor for Microsoft
Anonymous No.106203525 [Report]
>>106191758
>nothing smart to say
>oh wait, I'll just samefag and compliment myself
lmao.
Anonymous No.106203900 [Report] >>106204960 >>106208596 >>106210433
>>106202743
>hyper-performant SPA
But, that defeats the entire purpose of hypermedia. Redirecting to a new page is always ideal. The 14kB rule is a meme, but a good rule of thumb to always keep in mind. For example take 4chan, you visit /g index and presented with many threads which as of right now for me is ~20kB of transferred data just for the HTML. You wouldn't want to lazy load the threads, because you will be screwing the users without JS.
>pushState
Also a bad idea in practice, I don't remember all the edge cases of the top of my head but one that I did personally face was the absolute hell of browser navigation with the back/forward buttons.

Ideally, when a user clicks a link they should be sent to that new page. Again, for 4chan if I click [Open] I should be sent to a new page with that thread not use fixi.js to replace content in the <body> or some #main element. You should only use fixi.js for dynamic content such as validating a form, or in the case of 4chan a [Update] button to update the thread with new posts etc.

The way I would implement a thread update is have a htmx/fixi 10s auto-poll for a button to an endpoint like /thread/:id?last-seen=123 and it returns either a button with link [Update to see new posts] or [No updates] and clicking [Update to see new posts] would poll the thread page and replace the content.
Anonymous No.106204960 [Report] >>106205060
>>106203900
>Redirecting to a new page is always ideal.
But the user will still get the correct url if you use pushState, so how is it worse? It won't have any negative SEO impact. You will need to send less data. The page will never "flash" when you go to a new page. And it will be faster.

>Also a bad idea in practice, I don't remember all the edge cases of the top of my head but one that I did personally face was the absolute hell of browser navigation with the back/forward buttons.
The McMaster-Carr website uses pushState and it seems to work fine. And pushState has been around for a long time now and all the major browsers support it. Wes Bos covers it in this video:
https://www.youtube.com/watch?v=-Ln-8QM8KhQ

Can you show some examples of it not working well in practice? I have never seen any examples like that and I have messed around with it a bit.

>you will be screwing the users without JS
That's a fair point but most users enable JS these days. Most websites will be unusable without JS. My baseline is that I want everyone to be able to use my websites, even if they don't enable JS. But I'm not willing to sacrifice big performance gains (for almost 100% of my potential users) for the very small amount of users who don't enable JS.
Anonymous No.106205003 [Report] >>106205060
https://github.com/jon49/html-traits
oh shit, here we go again
Anonymous No.106205060 [Report]
>>106204960
I don't remember, I just have a negative emotion memory with pushState so I never bothered to look into it. Sounds interesting and I take your word on it.
>screwing non-JS users
I guess it depends, from my perspective the users that disable JS don't do it for any technical merit but purely for shizo privacy reasons, a fad, or the user that no longers exists: someone who actually can't run JS. Never really thought about it, but it may be time to tell the shizos to fuck off and the JS I run on my sites is AGPLv3 and easy to read anyways.
>>106205003
Cool, I'm just going to read the source code and ctrl c/v all the good bits I like
Anonymous No.106206387 [Report]
>>106203092
Why?
Anonymous No.106207157 [Report]
>>106200000
I will acknowledge your quints.
Anonymous No.106208596 [Report]
>>106203900
>because you will be screwing the users without JS.
Literally the only """""users""""" you will be getting who don't have JS are scraper bots. If a user doesn't have JS, it's a red flag, and I don't care if they can't use the site.
Anonymous No.106208946 [Report]
Why was Odin Project removed from MDN's suggestions?
Anonymous No.106209425 [Report] >>106209622
I don't know what's going on with twitter age verifcation at the moment, but it seems to be filtering posts that are SFW and then showing them and then displaying NSFW stuff occasionally and then to get around it you just click on the posters media tab and everything is visible?

Is this the power of Musk's "highly skilled" indian engineers?
Anonymous No.106209622 [Report]
>>106209425
Eh it's whatever, do you personally care? I'm pretty sure there's a way to block all nsfw stuff just Google
Anonymous No.106210433 [Report]
>>106203900
>the absolute hell of browser navigation with the back/forward buttons
that's just navigating through the history
is it possible you were in in a frontend library and that it handles history on its own?
Anonymous No.106210466 [Report]
So basically, if you want good performance you need to do this:
>compress everything (brotli etc.)
>keep each initial page load below 14kB after compression (lazy-load the rest)
>keep all CSS inside of <style> tags or inline it
>use a fast language on the backend (Go)
>use a small JS library like fixi.js
>use the Speculation Rules API to preload stuff (only in Chromium rn)
>use avif and webp over jpg and png

Did I miss anything?
Anonymous No.106210533 [Report] >>106211106
I am using https://raw.githack.com/ to import a css url from my repo inside 4chan's custom css. The changes pushed to the repo aren't immediately visible on 4chan but if I try to manually open the githack link I can clearly see them. is this esoteric browser caching? how do I address it?
Anonymous No.106211106 [Report]
>>106210533
I changed to jsdelivr hoping for.. something.. to happen
Anonymous No.106211593 [Report] >>106211678
Anonymous No.106211678 [Report]
>>106211593
Bump limit reached. I could make another thread but I'm lazy, and I need to go out soon.