[a / b / c / d / e / f / g / gif / h / hr / k / m / o / p / r / s / t / u / v / vg / vm / vmg / vr / vrpg / vst / w / wg] [i / ic] [r9k / s4s / vip / qa] [cm / hm / lgbt / y] [3 / aco / adv / an / bant / biz / cgl / ck / co / diy / fa / fit / gd / hc / his / int / jp / lit / mlp / mu / n / news / out / po / pol / pw / qst / sci / soc / sp / tg / toy / trv / tv / vp / vt / wsg / wsr / x / xs] [Settings] [Search] [Mobile] [Home]
Board
Settings Mobile Home
/g/ - Technology


Thread archived.
You cannot reply anymore.


[Advertise on 4chan]


>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 (go to the "See also" section for other Mozilla approved tutorials, like The Odin Project)
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://flexboxfroggy.com/ and https://cssgridgarden.com/ - Learn flex and grid in CSS

>Resources for backend languages
https://www.phptutorial.net - A PHP tutorial
https://dev.java/learn/ - A Java tutorial
https://rentry.org/htbby - Links for Python and Go

>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

>Staying up to date
https://cooperpress.com/publications/ - Several weekly newsletters for different subjects you can subscribe to

>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 in this thread. 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: >>101072654
>>
>>101086152
>a
>fucking
>chameleon
>>
Is it possible to build nextjs but with process.env.NODE_ENV set to "test"?
I'm trying to write some tests with cypress but the middleware is hitting me with the production node env causing some unwanted redirects
>>
>>101143451
Just do it yourself, you're on /g/ bro
>>
>>101143477
tell that to my pm and he'll laugh in your face
>>
>>101143571
What are you even getting paid for if you can't code for shit?
>>
Hi there, my department is being "spun off" into a small new company and I decided to take severance instead of join the new company

I wan to create a portfolio website and new resume as I've been working there over a decade and I'm very out of touch (aside from interviewing people, IDK what it's like)

What are some things I should do or make note of that will be useful in the job hunt? Of course I don't want to take anything secret. But I'm thinking of things like, number of users, screenshots of the apps I've worked on, list of technologies used... And who knows what else?

I'm a Senior Web Engineer
>>
>>101143648
>i don't understand what's being told
good to know
>>
I need to code but I find myself lacking energy these days

What's a good stimulant for writing decent code? I drink coffee but it doesn't really make me more productive
>>
>>101144069
Coke, duh. Why do you think every CEO does it? Hopefully, you can afford that.
>>
>vaio
major league swag out
>>
>>101144097
coke is party drug not work drug. you save it for after you're done writing code.

>>101144069
microdose on sativa based thc/hhc
>>
why would anyone like to work in this godforsaken industry?

I had to take a job in frontend while studying compsci and I cant wait to leave this career forever behind me and get into backend tech

the amount of shit you have to eat from amateur devs and graphic designers is unacceptable
>>
How do you get code autoformatting and autocompletion on templ?
Im talking about the Golang templates
>>
>>101144097
Interesting proposal

>>101144172
Weed mongs me out though

>>101144213
Code is code. Server, client, it's still code.
>>
>>101144213
i work in backend and it's meh, it's a job and it's easy enough so fuck it
fuck frontend though, you'd have to be an imbecile to willingly do frontend
>>
>>101144172
said the guy who never did coke lol lmao
>>
>>101144287
>Weed mongs me out though
because you dont microdose properly or you're taking indica/hybrid.
>>
>>101144287
>Code is code
Sure but that's not the problem I had with the job if you properly read my post. It's the entitlement and incompetence of people involved, which I can't live with.

>>101144333
Yeah I'm not imagining backend as the cure, or holy grail of career choices but it's a huge difference when compared to frontend.

I imagine frontend can be fun in a very professional environment, but I doubt many companies take it that far, or are willing to pay for it.
>>
File: 7mamm8sb6t391.jpg (143 KB, 1169x1854)
143 KB
143 KB JPG
>>101143451
today i shall remind everyone
>>
>>101144435
the fuck am i looking at
>>
>>101144477
Some guy submitted a pull request for a very stupid change to an Epic Games repo. The commit just made some superficial documentation changes (and I think the changes had spelling errors and grammatical errors)

And he tagged a developers group, thus notifying 400,000 people (through email alerts I think)
>>
>>101142205
should I go freelance and hire a (female) philippinos $500 a month to spam call every business on county's chamber of commerce directory?
>>
>>101144554
amazing. is this the power of indian engineering? has any indian ever contributed anything meaningful to the world of IT?
>>
>>101144554
don't forget the indian english "gorgeous looks", they love speaking liike that
>>
File: file.png (256 KB, 909x372)
256 KB
256 KB PNG
Fellas, please help me make a decision. I applied for 1000+ tech jobs, have gotten 1 interview I wasn't selected for, and one more this Friday. Today I got a call from a company I applied to say they can give me some Excel bullshit job instead; pay is 18.50 (garbage, obviously), but I think maybe I take it while I work on my projects and applications? I'm running out of money in a couple of months tops.
>>
>>101145229
>but I think maybe I take it while I work on my projects and applications?
yes, do that
>>
>>101145229
is it that hard choosing between having no money or having money? If it's braindead excel shit all the better, cause it will take up minimal brainspace so you can concentrate on the things you care about.
>>
>>101145269
i think his point is the time reduction because of working
>>
>>101145281
I dunno
>I'm running out of money in a couple of months tops
seems pretty blatant and would be my personal concern in this situation, but maybe you're right.
>>
>>101145281
you cant use the free time for doing projects and applications if you dont have enough money to eat or pay rent

its not even an option at this point imo
>>
>>101145556
why not live in a shelter? all you need is a notebook, they will feed and clothe you too
>>
File: wtfamireading.jpg (57 KB, 702x702)
57 KB
57 KB JPG
>>101145678
>>
>>101145678
>go to sleep
>notebook is gone
>>
File: file.png (269 KB, 1280x960)
269 KB
269 KB PNG
>>101146352
>>
whats the current practice of writing the same website for dekstop, tablet, mobile.

Do you write all 3 front end separately ? Or do you keep messing around with flexbox/bootstrap pushing things left and right ?
>>
>>101146409
media queries, a css thing, if u have to sell it to half tech literate boomers you'll also make it "mobile first"
>>
>>101146409
even though, there's some old school approach (it's an existing solution you don't code it from scratch), that goes something like reading the user agent, and applying a set of rules and transformation to root contents to serve every device (I think it's mostly for hand held and desktop) with its own tailored solution, I know I wouldn't ever, unless paid out the ass, also I'm not certain if this is being used anymore when people are making webs and mobile apps nowadays, anyways, I gave you some buzzwords to explore
>>
>>101142205
>hacks together some php codez
>becomes glownigger's pet and a billionarie
he hates react btw
>>
File: Calibre_logo_3.png (98 KB, 1024x1024)
98 KB
98 KB PNG
>>101144837
>has any indian ever contributed anything meaningful to the world of IT?
Yes, for example the guy who made Calibre is Indian. I think it's very useful software for managing eBooks. I used it the other day to convert some eBooks so I could put them on my Kindle.
>>
Is Blazor production ready
>>
>>101144837
>>101147312
today a poojeeta gave me a literally 10 chars length pass to an account that I needed, w h e w, shit son, haven't heard more broken english in my life
>>
File: ywlvcufzvnfsxfgm85sw.png (136 KB, 1365x1024)
136 KB
136 KB PNG
>>
>>101147410
now make one of the corpo wagie dance
>>
>>101143712
Very bad idea to quit before you have a new job in line
>>
>>101147312
great software. indians....
>>
>>101147607
that android custom rom comes to mind, if you tried to unlock "premium" features the hacky way (so without paying them), they'd delete your fucking data in the phone, absolute subhuman rat behavior
>>
File: 1718723426953099.jpg (80 KB, 1024x768)
80 KB
80 KB JPG
>>101147410
>can't explain what their app does
I stopped looking at what companies do a long time ago when applying to jobs but have you ever tried to actually read what the job entails? It's all completely insane technobabble

> To succeed, organizations must blend digital and human capabilities. Our diverse, global teams bring deep industry and functional expertise and a range of perspectives to spark change. BCG delivers solutions through leading-edge management consulting along with technology and design, corporate and digital ventures—and business purpose. We work in a uniquely collaborative model across the firm and throughout all levels of the client organization, generating results that allow our clients to thrive.”
>>
>>101144172
This, meth is for writing code
>>
>>101148277
>uniquely collaborative model
>>
What do you use to track time?
>>
>>101135632
>>101136551
>no response
figured it was a fucking troll post
>>
I want to be able to use code cleanup, but it always organizes my code in weird ways. I want to let it organize my code, but I want to customize how it does so. Where can I do that?
>>
>>101147576
why is this a bad idea? If it's job gap shit then whatever man I get it.
>>
File: htmx.jpg (25 KB, 400x400)
25 KB
25 KB JPG
First for HTMX
>>
What do you think about me using a .dev domain for my startup? It's a SaaS startup that sells a tool for developers.
>>
>>101149898
why not? React uses it
I like these nu-domains
>>
>>101149898
marketing-wise, it makes sense
>t. junior so take my opinion with a grain of salt
>>
to those halfway there, that keep on grinding, keep on grinding my bros, just finished my first year's job and got another one offered this time with no time limit, there's hope. my salary is not amazing, but I enjoy what I do, and compared to the people working their asses off in non dev jobs, I make a decent salary
>>
>>101150086
based hope posting anon
>>
>>101150142
some people need to hear this
>>
>>101149898
.dev is owned by google so it probably won't suffer any random 5000% price hike or seizing because it's a random no-name country TLD
>>
I have a button that says: Login / Sign up, and it goes to a page where you write in your email. That page goes to the login page if the email is associated with a user or the sign up page if it's not. Is there some better way of doing it?
>>
>>101150393
that way you're effectively giving potential hackers your user's emails and an open vector for them to login
>t. literally know next to nothing about web security
>>
I will answer your AWS or SQL questions until my Uber drops me off at top golf.
>I’ve been reading and reading and reading and i want to read more to learn
Don’t. Build.
>sell me on using AWS instead of a VPS
I’m not a salesman and you haven’t given me a use case.
>>
>>101150485
>until my Uber drops me off at top golf
you cheeky fuck, I appreciate your community service though, lad
>>
>>101150455
How do you avoid that though? You have to associate a user with an email assuming that you're not using some third party to handle auth.
>>
>>101150501
It’s Tuesday, my wife works late because she does Australia contracts and the time difference makes it so, so i usually go out Tuesdays for fun.
>>
>>101150508
you just hit them with the "wrong credentials" without specifying if the credentials exist to begin with, basically you won't tell them "wrong password" or "wrong email" so they can't play that game
>>
>>101150569
But the hacker will still be able to see if that email is used on the Sign up page.
>>
>>101150615
>But the hacker will still be able to see if that email is used on the Sign up page.
how? "wrong credentials" he doesn't know if that mail exists or not
>>
>>101150615
Wrong. You tell them to check their email for the sign up confirmation and instead of signup confirmation, send the email address a “you are already signed up, click here to login”
>>
>>101150628
>>101150615
oh, I see, I get you, you're right, but I guess, slightly obscuring it justifies this
>>
>>101150646
Smart, I didn't think of that.
>>
>>101150334
Didn't they sell their domains business?
>>
>>101150718
Yes, but not that part of the business.
https://en.wikipedia.org/wiki/Google_Registry
>>
>>101144213
>the amount of shit you have to eat from amateur devs and graphic designers is unacceptable
it's the liberal arts of computer science. it's the backup plan for "artsy creatives" if theyre not talented enough to be actual artists
>>
Why would you use an auth service like auth0? It's more complicated to integrate them than just writing auth yourself.
>>
I'm having a terrible time picking which backend language I want to use to write a bunch of full stack resume projects in. Thought I'd use C# since there's a lot of boomercorps near me that use C#, but after trying it it just feels like Java with a bunch of bloat tacked on. Is ASP.NET Core really pleasant to use or am I wasting my efforts and should just switch to Go instead?
>>
>>101151206
Go is not a bad choice.
>>
File: bun.png (76 KB, 610x552)
76 KB
76 KB PNG
what the FUCK did they mean by this?
>>
>>101151206
You're wasting your efforts thinking contractors care about the stack you use, be it C# or Go.
Your resume will be evaluated by someone from the HR that doesn't understand anything about those fancy technologies.
Only after passing all the interviews someone from the development team will judge your skills, and it will most likely be via work or personal interview, not by your resume that could very well be a copy-pasted code.
>>
>>101151393
My concerns are less about what people will think and more about a) keywords for the ATS and b) my own enjoyment while working on these projects.
>>
>>101151385
they got bunned in their bun by the funny comment from uwebsockets about actually being faster on node.
>>
>>101151123
They’re better at keeping up with security vulnerabilities than you are
>>
I'm new here in the US. I was looking for a job and recently got hired and started working as a BEE.

The manager didn’t ask for any SIN or documents which I think every employer asks for it at the time of hiring. Is this fine to carry on with it? Why employers need SIN? Should I ask the manager am I legally employed or not?
>>
>>101142205
>vaio
why
>>
File: file.png (118 KB, 888x623)
118 KB
118 KB PNG
>>101151385
>>101151687
Lmao I've been telling you guys uws is faster on node for weeks and that all bun's metrics were bullshit because they're built on uws which is C++. I even have receipts.

>>100970548
>>100973803
>>100973839

Glad the normies are realizing it too.
>MUH JAVASCRIPTCORE AND ZIG MAKES IT RUN FASTER THAN RUST!!!
>>
>>101151687
Also sorry to double respond but do you have the uwebsockets post? I can't find it.
>>
>>101152154
vaio rocked fuk u
>>
>>101152651
If it was so great, where is it now?
>>
>>101152800
sony does not understand how to do anything so when they hit it's not intentionally and they just can't keep it up.
>>
Whenever I see people saying that the job market at the moment is bad, I just think "don't care, I'm still applying"
>>
>tfw working with a 8 years old project that never had any dependency updated
So many features that I can't use.
So many tools that are completely deprecated.
So much work overtime because nothing can be done with a sensible deadline
When I first started working six years ago I was already using technology more modern than this.
>>
File: 1719368305223.jpg (279 KB, 2560x1355)
279 KB
279 KB JPG
How am I supposed to use this? I brew installed protoc, but apparently js support was removed. I want to output E6
>>
>>101154102
Incrementally add some type safety with JSDoc or whatever equivalent for your lang, add a basic test runner and you should slowly be able to upgrade your shit
>>
>>101152271
right on their github https://github.com/uNetworking/uWebSockets.js
>>
File: cheerleader.gif (925 KB, 540x303)
925 KB
925 KB GIF
GOOD MORNING!!!
Time to give your all today as well, anon!
>>
>>101154102
>So much work overtime because nothing can be done with a sensible deadline
why are you making this your problem?
>>
>>101143135
https://nextjs.org/docs/app/api-reference/next-config-js/env
>>
>>101155784
I knew that. I thought you meant on their twitter.
>>
good morning Sirs. what have you done for web development Today?
>>
File: 1643935255-7b5.jpg (418 KB, 2359x1749)
418 KB
418 KB JPG
>>101157992
I've only played video games and shitposted so far today
I did take a small peek at github so I feel like I've done enough today
>>
>>101152157
is this a big revelation or? I thought this was common knowledge
socket.io also uses uWS uner the hood
>>
>>101157992
I have been all day just changing some shitty things my boss asked for in frontend. Have spent two hours doing nothing, hopefully I finish soon
>>
>>101157992
I have watched YouTube videos about web dev. This is how I lie to myself that I am doing something productive.
>>
>>101157992
making my own local chan board rn
>>
I got into web dev hoping tp be a programmer but I've started to realise it's literally just plugging API's together and I'm too dumb to work on real projects like libraries or software like an IDE or something
>>
>>101160218
Same.
I thought I'd be a cool programmer who makes things, in the end I was constantly trying to make things work together in dependency hell.
And all for a minimum wage and no room to grow.
>>
If React is the poison then what is the cure?
>>
>>101161277
vue
>>
File: Ft_uS5FWAAACbq8.jpg (38 KB, 403x534)
38 KB
38 KB JPG
FUCK FAGGOT VITE.

tell me right now. I have a "components" folder inside src directory. I import a "Card.tsx" component from the folder into App.tsx . My IDE tells me the fucking file exists and when I click on the path it sends me to the fucking Card.tsx component file. and then vite tells me

>Failed to resolve import "./components/card" from "src/App.tsx". Does the file exist?

YES IT FUCKING EXISTS YOU FUCKING RETARD.

tell me how to fix this NOW or I'm going to FUCKING KILL MYSELF
>>
>>101143135
i tried doing this a few weeks ago and had the same issue. i think if you want to build + run the server to run tests against it, setting NODE_ENV=test when running the build command does nothing from what i remember.

the gay workaround that i did was i added another env variable like "RUN_AS_TEST".

it's so retarded that i think i must have fucked something up but since you are having the same issue it might not be possible
>>
>>101162321
haha, yeah, that's what i ended up doing in the end
>>
>>101162068
>src
boomer moment
>>
>>101162068
>"Card.tsx"
>"./components/card"
Why is "Card.tsx" capitalize but the "card" in "./components/card" is not?
>>
>>101162068
do you haz the export in card?
>>
>>101142205
how do you guys tolerate web dev? I just wrote a simple alarm application and its been a huge pain in the ass with vanilla js. All the tooling around html felt like shit. Worst of all is the missing types half the time I don't know what the fuck I am operating on. I wonder if using a framework like react isn't better...
>>
>>101163684
>I wonder if using a framework like react isn't better...
of course it is
but beware, react feels weird and quirky at first
>>
>>101158729
>socket.io uses uws under their hood
Only if you attach it manually as of 4.4 or so (I mean it only takes 2 lines but still). Out of box socket.io uses node. Socket is also still pretty slow even with UWS, but way way faster with UWS than with node. It's not that much harder to just do your own room system and DMs with UWS or hyper-express.
>>
>>101163684
>Worst of all is the missing types
So use typescript and shut the fuck up?
>>
am I doing this right:

I have a react frontend / express backend / docker postgres database. I have two terminals, one to start up the frontend and the other to start up the backend server. and then I have to click another button to start the postgres container.

Is this correct? Seems like a lot of shit to get everything up and running
>>
>>101164532
>he doesn't know
>>
I NEED A FUCKING JOB AHHHHHHHHHHHH
>>
>>101161277
NOT doing additional shit on top of the toolkit that is the web. You can do class based components with vanilla ES6+ just fine. Just accept the DOM as the state of your application, you do not need a JS object on top of that to abstract the DOM away.
>>
File: GJqZy9kaYAEegph.jpg (120 KB, 768x1024)
120 KB
120 KB JPG
>wrote a pwa in vue, and made it live for a client
>push a live change, that fucker still asks for a old change
>turns out browsers are caching stuff
>made it retrieve latest versions each time
sometimes it works in some browsers, sometimes it fails, safari is the worst offender
why web dev. sucks cock and balls and what can I do to make it suck less
>>
>>101144069
unironically cardio

>>101146409
always start with mobile and then scale up with media queries. it's way harder to make a desktop-first site work on mobile than the reverse. tailwind makes this process completely brainless.
>>
>>101147287
the user agent is irrelevant unless you're trying to use device APIs (location, file storage etc.). for display all that matters is the display size, so you use media queries.
>>
>>101151123
so you have someone to sue if your auth service gets hacked. if you roll your own, your customers sue you.
>>
>>101151206
it literally does not matter. this is how you choose a language:
building for fun -> choose your favourite / comfy lang
building to learn -> choose a lang that's a different type to what you currently know (typed/untyped, compiled/interpreted etc.)
building to get employed -> look at the job postings in your area and build with the most popular lang
>>
>>101164532
normal. create a script that runs them all, or tie them together with docker compose.
>>
>>101166178
store a version number locally, check an endpoint for the latest version, prompt the user to force refresh if it's different
>>
nearly finished with building my first ever site but putting it all together is mind boggling. losing hope...
>>
>>101164532
>separate terminal to start frontend
huh? why arent you just running the server and then opening the website in your browser? you can also configure your database to just be running all the time
>>
>>101163684
if youre using a bunch of variables which ARENT referencing HTML dom elements then youre just doing it wrong
>>
>>101167390
Bingo.
>>
>>101167915
uhh bc im running everything locally
>>
Am I gimping myself out of more potential jobd if I learn Django instead of the other more popular options?
>>
>>101169015
yeah
>>
So I've been using playwright to auto apply to jobs and often times greenhouse will demand I two factor auth my email to make sure I'm not a bot. How would I beat this? I don't want to give my bot access to my email
>>
>>101169038
Oof ok
>>
>>101168866
yes, you open localhost in browser. why do you need a separate terminal for that?
>>
Is there some option for building a lot of functionality with no-code tools but that also allows you to write your own application on certain pages? I really don't want to learn user authentication or spend 500 hours working out the social media aspect of my product.
>>
>>101169244
what do you mean. my frontend is running on localhost:5371 or whatever and my backend is running localhost:3000 . yes i open localhost:5371 in my browser
>>
Is it worth learning AWS if you want to make SaaS a career?
>>
>>101169552
i was confused because you said you use a terminal to run your frontend, when you only need a browser

>>101169484
there are existing libraries for things like authentication and integrating facebook/google/etc. accounts into your website, all you have to do is look them up and use them. otherwise... wordpress? you'll have to be more specific if this isnt good enough
>>
>>101169552
hold on that IS what youre saying. why are you running frontend and backend separately? just run your server on localhost:3000 and open localhost:3000 on your web browser. why are you running your "frontend" on a separate port??
>>
>>101167390
but when the user clicks on a menu, it's still asking for a old resource
I mean, when I push the build
it'll be like home.112.js
and when I push the new update it'll home.113.js or w/e
but when users click on that home.112.js the screen become blank unless they press a new update is available by service worker
>>
>>101169973
i havent tried it myself but apparently there's a way to programmatically hard refresh the client's browser (i.e. it reloads the page from server instead of from cache). maybe you could do that at some point during or after the update
location.reload(true);
>>
>>101170008
I need a way to check if the new resource is available in the server, then do a force update.
I'm not sure but I can add something in the router to check if the version is the same or not. So this way before loading the specific menu it'll check if the numbers matches, if yes, then go ahead, otherwise do a hard reload to fetch the resource.
>>
>>101163684
Huh? Vanilla js is nice, most simple tasks are just a bunch of addEventListener and QuerySelector calls.
The tools? What issues did you have with them?
>>
>>101163684
it's the easiest language to learn and use. post your code, lets see how bad you fucked up
>>
>>101170755
>js
>easiest to learn
>easiest to use
>>
>>101169973
how does my suggestion not solve this problem?
>>
>>101147287
>>101146409
i learned that css old school approach and it’s been a game-changer. I use it, or a variation of it, in almost all my front-end projects now, just for the ease of use with laying elements out and aligning them correctly & dynamically.
>>
>>101144172
>>101148315
unironically dexamphetamine, and/or adderall. Weed to deal with the headaches, agitation, & stomach ulcers.
>>
>>101165773
>Just accept the DOM as the state of your application, you do not need a JS object on top of that to abstract the DOM away
So much this.. Although, a DOM updating algorithm that checks for changes between the real app DOM against the “fake”-DOM, and updates it accordingly without blocking, is pretty fucking neat. Why do we need react again?
>>
I wish mailto: links weren't a magnet for cock-sucker spammers. They're so nice to have.
>>
>mfw input type="number"
i have no face
>>
>>101171453
>a DOM updating algorithm that checks for changes [...] and updates it accordingly without blocking, is pretty fucking neat
Is it though? In some cases, yes, I agree. In all cases? Hell no. I mean, I am laughing my arse of at all the stuff that the reactivy folks have to go through. Just look at lists for example: when not doing reactivy, you can simply grab an element and put it somewhere else - voilá there is your reordered list. Making that into an actual object with JS is piss easy. Just like that. Now do the same in react et all. Here is your state, which is an array. Create the copy of the array, reorder. And don't forget your keys...

IMO reactivity is a failed concept. Sometimes it might look good on paper, but often it actually does not in the real world. I cannot even count the number of times I have not been able to quickly find the state object that is causing some bullshit - because it was hidden in some implicit call to it.
Maybe if there was no real DOM to begin with, but there is and we cannot change that fact. So work with it goddamn. This is not 2004 when HTML/CSS/JS was genuine shit. 20 years have passed and most APIs are quite sane by now.
>>101163684
Yes, the tooling is bad. With a framework however, it gets worse... good luck updating npm, because your framework has breaking changes. Good luck then updating all the API calls. Good luck then having to fuck around with the deps. The JS ecosystem is hell and for me that hell is way worse than the "bad" state that the actual language is in. Reduce the attack surface buddy, use vanilla and don't worry about updating any broken shit, because there will never be a need to.
>>
>>101171720
yes, it's like that cat mean eyeing the toy cat, give me at least 4 type of number types or gimme death
>>
File: file.png (4 KB, 178x91)
4 KB
4 KB PNG
>>
>>101171220
Not him but yeah I think it is, JS is really easy
>>
>>101171924
expalin truthy/falsy js values in a really easy way
>>
>>101172217
Not my job
>>
God fucking dammit I really do need some sort of stimulant because my programming productivity has plummeted
>>
File: file.png (104 KB, 498x317)
104 KB
104 KB PNG
>classNames="flex justify-center items-center min-h-screen"
>>
>>101172217
if (! $someValueThatIsTruthyFalse) blockExecutes()

but
if ($someValueThatIsTruthyFalse != false) codeDoesNotAlwaysExecute()

People always bitch about this and that in JS, but they forget that the dynamic nature of JS allows for insane shortcuts. JS really shines when doing simple things that are bound to simple, but dynamic values.
>>
File: 1706559629448833.jpg (61 KB, 640x662)
61 KB
61 KB JPG
>>101172564
>classNames
>>
>>101172217

pretty easy. you just need to know what primitive types there are and it's makes

- String: "" is falsy
- Number: NaN 0 & -0 are falsy (yes, -0 is a thing because IEEE 754)
- null & undefined are falsy
- BigInt: 0n is falsy
- Boolean: true is falsy :^)
- Object & Symbol: always truthy (arrays are objects, functions are objects, etc) although "document.all" is an exception, dont ask why.
>>
>>101172569
you can shorten that to:

someValueThatIsTruthyFalse && codeDoesNotAlwaysExecute()
>>
>>101172569
>"explain this thing"
>explains nothing
based retard
>>101172582
great! now explain it in a really easy way. you know, like you're talking with someone that is starting with js and it needs to make sense
>>
>>101172217
it is how it is, or "das le it mane"
>>
>>101172596
Writing out a freaking list of what values evaluate to what is not explaing.
Actual explanation: A truthy value is not a boolean, but it may evaluate to one in an expression, which is absolutely needed as a feature in the case of JS, because dynamic typing allows for doing some insane shit, but also for absolute greatness. Like this insanly simple counter-component thingy...
<button onclick="this.textContent++">0</button>
>>
>>101172589
>make code less readable pls
/wdg/ is truly a goldmine
>>
>>101172644
>A truthy value is not a boolean, but it may evaluate to one in an expression
right, so if js is the easiest to learn language, there must be simple rules to it, right?
>>
>>101172596
Yeah okay I've got your explanation right here:

https://www.youtube.com/watch?v=8uFl64v7GvE

You utterly moronic stupid fucking cunt
>>
>>101172869
thanks my man, i'm more of a Yohei Kimura kind of man, also
>can't explain it so resorts to ad hominem
i accept your concession
>>
>>101172906
It's hilarious how you think you're going to get people here to spoonfeed you

You will never, ever make it
>>
I have resorted to watching Primeagen videos so I can convince myself I'm doing something productive regarding web dev

Truly this is my lowest point
>>
programming is fun but web dev is boring and I'm too dumb to make anything more complicated than a web page or API
>>
>>101173176
but i don't need to be spoonfed, i don't need any lessons from any of you. i already know everything to do my job.
like the fact that js isn't fucking easy to learn in the slightest
>>
>>101173289
Imagine being so thick that you ask 4chan of all places to explain the basics of JavaScript to you
>>
>>101173307
>X is easy
>oh yeah? explain how to do Y in X if it's so easy
>lmao why do you need someon on 4chan to explain Y to you
you are here
>>
>>101172770
>truthy/falsy is suppa hard in js
c'mon now, I can't explain the rules "simply" either, but I've never ever had much trouble with it 2bh
>inb4 I've iffed things you wouldn't believe
>>
>>101173289
>js isn't fucking easy to learn in the slightest
lmao, I consider js a good fren 2bh, the fact that you wanna paint it as a scary and difficult thing cracks me up
>>
File: state-of-js.png (170 KB, 1974x978)
170 KB
170 KB PNG
Nearly all of the respondents of the State of JavaScript 2023 survey were male

Interesting
>>
>>101173382
And how many of the women were actually women (male)?
>>
>>101173363
that's not the point anon. someone claimed that js is the easiest language to learn. if it's so easy, it should be extremely simple to explain truthy/falsy, right? or async, or "this", or NaN === NaN, coercion, parseint.... and it isn't, and js isn't easy to learn no matter what retards on 4chan say, and that's not even touching frameworks, ajax and whatever the fuck have you in the web ecosystem. it might be easier if you have dev background and you just take these things and roll with them because you know that 0.1+0.2 isn't some weird JS unexplainable quirk, but for people who have zero programming experience, js is full of counterintuitive shit. you can moan and bitch and ad-hominem me all you want, but it's a fact and nobody here has any counterargument because there isn't any.
>>
i think /wdg/ just have massive skill issue
>>
i love react
>>
>>101173735
what state management library should I use for react in 2024? I was going to use redux but there are others out there and there is also react query which seems popular
>>
>>101172770
>>101172906
You seem to define the answer to the question if JS is an easy language by the fact that you can do complex stuff with it. But that is not what easy is referring to.
>there must be simple rules to it, right?
No, why would the be the case? Comparing variables of different types is a difficult problem. JS is easy in the sense that you can simply *not* do that. Just because a tool is available, that does not meant that you have to use it. Don't compare some vars just like that and expect a boolean. Instead you should think about more "difficult" languages. Do they actually allow you to compare an array of objects to an object to a number to boolean? If so, are they actually having simple rules for that? I doubt it. Do they still allow you to learn the language as easy as JS? I do in fact also doubt that, because most languages are way more complex in their nature.
>>
>>101173883
>You seem to
no, not at all
>No, why would the be the case?
if someone said "X is easy to learn", i'd assume it was fucking easy to learn.
>>
>>101173466
I've been doing GIS in the web for years. I have yet to see some actual problem with async, NaN, coercion or parseInt (just fucking add the base already you lazy fucker).

The only real problem is "this" and that is only for newbs coming from java who somehow have not gotten the memo yet.

>not even touching frameworks, ajax and whatever the fuck have you in the web ecosystem
That's a different problem that has got nothing to do with the language that is JS. You are right - that stuff sucks. But you can indeed opt into not using it. And - frankly - if you use it and you fuck it up, that's simply a skill issue then.
>people who have zero programming experience, js is full of counterintuitive shit
And the only example that you are able to communicate is a freaking floating point error? Really?
>ad-hominem me all you want
point out skill issues is not ad-hominem.
>>
>>101173993
It IS easy to learn. If you are learning JS and you are at a point where you find a real bug because you somehow dun goofed and compared an empty array to an anonymous object ... guess what, you have already learnt the language, because otherwise you would not even be thinking about doing that kind of dumb shit. Or is there any tutorial out there that tells them noobs to compare NaN to an arraay of strings?
>>
>>101174033
>anecdotal evidence
>"i'm good at it, therefore it's other people's fault"
i rest my case
>>
>>101174112
Well, if you are ought to prove that something exists, you should be able to point at the problem in the first place. Meanwhile, NaN != NaN is only of academical nature.
>>
>>101173466
the absolute state of (You)
>>
File: IMG_1512.jpg (65 KB, 720x720)
65 KB
65 KB JPG
Does anyone know when i should use reactjs or vuejs? I’m remaking a static single page website to be more dynamic.
>>
>>101174235
>Does anyone know
...yes...
>when i should use reactjs or vuejs?
...never.
Both are overengineered monsters made for big corps that want to exploit both their users and their cheap workforce. You do not need that for a simple page.
>>
>>101174788
>made for big corps
that's the thing, they pay well for experienced devs, and some times even for graduates
>You do not need that for a simple page.
you're right for the most part, but anon, don't argue as if your life depended on it, relax, chill, leave room for healthy discussion, we can all benefit from it, I know we are all used to discussing with actual shit in shit discussions, but if you aren't a shill and neither am I, then there's no need for that

on another note, celebration for a successful wagie day
https://www.youtube.com/watch?v=UcRtFYAz2Yo
>>
I'm doing "Spring Boot 3 Project - Build a Job Portal Web Application" course on Udemy, which makes you create a full project almost from scratch, but it feels very hand holdy. You think I'll learn something from this, or is it better to do my own project from scratch through trial and error plus reading docs? Or should I do both?
>>
>>101175044
I type all the code myself btw, but its really me just following what's on screen step by step
>>
>>101175061
it's okay as long as you're typing along, it's better than just watching a video
https://spring.io/guides
https://docs.spring.io/spring-boot/
use these too
>>
Can I get feedback for my portfolio? https://dynaui-bento.vercel.app/
>>
critique my stack


golang
htmx
tailwind


nixos VM on ubuntu host.
>>
>>101176941
bad
>>
https://springstubbe.us/projects/jquery-multiselect/

The first example is exactly what I want but are there alternatives to jQuery or a simpler way to do a dropdown multiple selectable checkbox list ?
>>
>>101177003
I almost hate every single thing about it
>>
>>101177092
well get used to it
>>
>>101177161
I hope that's not necessary
>>
>>101177266
oh boy you are in trouble
>>
>>101177266
>>101177161
>>101177092
>>101177285
I messed up the reply
>>101176269
everything is moving at once everywhere and not in a good way, the gray gradient on the divs is not too pleasing to the eyes, I like the gradient on then numbers, the I am a "n" animation is ok, the animations on message me/call me are hella nice, the animation on the bottom menu is sick

that's my feedback
>>
>>101173289
>i dont understand truthy values therefore js is hard to learn
i dont think anyone's told you this but you dont NEED to use truthy values. you can just do
if(str === "") { }

and you'll get the same thing. very very easy to do.
>>
>>101175022
>You do not need that for a simple page.
if you think this is "arguing as if your life depends on it" then idek what to tell you. he was completely calm
>>
>>101176941
How do you use tailwind with go though? Don't you need some kind of node build process to find unused styles, or do you just import the entire tailwind stylesheet, which is inefficient as fuck?
>>
>>101178204
not really, see:
>>101173466
>>
>>101173466
>if it's so easy, it should be extremely simple to explain , right? or or , or , , parseint
>truthy/falsy
not required to use. you can just do if(str === "") or if(int === 0) etc. nobody is forcing you to use truthy/falsy values. there's plenty of easier alternatives if you dont understand them

>async
extremely easy. async methods happen asynchronously and your program continues running without waiting for the async method to complete. what about this is hard?

>"this"
"this" is a thing in most of the most popular programming languages. not unique to js in the slightest, but yes it is still easy to explain: the "this" keyword refers to whatever is the containing object where it is used

>NaN === NaN
if youre a half-decent programmer this will never come up

>coercion
>parseInt
you convert a type of variable into another type of variable. parseInt takes a string and tries to turn it into an int. nothing about this is difficult, nor is it unique to javascript

you just suck at programming, dude. sorry

also an insult is not an "ad hominem." something is an ad hominem only if the insult is REPLACING the argument. countering your argument and then calling you an idiot at the end is not ad hominem
>>
>>101179236
>>NaN === NaN
>if youre a half-decent programmer this will never come up
can you elaborate about this one please?
>>
>>101179236
>you convert a type of variable into another type of variable
I think this is better understood seeing how programming langs like java do it, it's called casting, very recurring method in programming
>>
>>101179328
if you know what youre doing in your own code then you should never be comparing two NaN variables. i cant think of a single good example of when this could happen except MAYBE if youre comparing something like two fixed-length arrays which could have NaN values, but then you should just be doing
if(arr1[i] && arr2[i]) { /* compare */ }

if you're a good programmer then you should either know exactly when your values will be NaN or check if they're NaN before using them

obviously if you *really* know what youre doing then none of this applies because you'll understand how NaN works inside and out, but that's not what we're talking about here
>>
styles being overridden is a major pain, man
so difficult to find what exactly is making the override when everything is bundled together
>>
>>101180197
use the "Computed" tab on the browser dev tools
>>
File: 1719413038144567.jpg (3.83 MB, 3000x2000)
3.83 MB
3.83 MB JPG
sirs im learning distributed computing and whats the difference between a distributed system and a botnet?

I know people use botnet to get volume on internet-based tasks like ddos but could you use a botnet to harvest processing power and just create an illegal hadoop cluster?
>>
>>101173466
>oh yeah, if JS is so easy then what about this?
>examples of easy things that take an hour and a half to learn

what did (You) mean by this?
>>
>>101180273
yeah, that's what i usually use, but looking at the file where the rules comes from, doesn't tell me nothing, i don't know where to look at the code
for example, right now i am looking at a next project and the rule is inside layout.css, which doesn't exist, and the imported css in the layout tsx file doesn't contain that rule
>>
File: clojurescript twosum.jpg (211 KB, 1080x798)
211 KB
211 KB JPG
let's have a twosum

I showed you mine, now show me yours
>>
is it normal to use Maps with useState? I'm just starting out with React
>>
>>101169591
It’s 1,000% worth it, and likely required.
>>
>>101181844
What are you asking?
Like can you use a map on a state variable?
Or can you use Map as the type on a state variable?
>>
>>101182663
>Like can you use a map on a state variable?
yeah, I was able to make it work here
it's just that I don't see this in code examples anywhere, usually it's a primitive, an array or a json object
>>
>>101182693
it's common practice though
>>
>>101183722
good to know
>>
File: 1b1.png (126 KB, 686x753)
126 KB
126 KB PNG
I'm considering building a simple mobile app using Sinatra and HTMX for the backend and capacitor for the front.
Nothing too complex, just a hobbyist group finder with events planner and push notifications.
What would be some free AIslop I could use to generate logos, fonts and color palettes?
>>
>>101179236
>not required to use
and there it is. the absolute state of /wdg/
>x is easy
>how about this part
>nah don't worry about that
there's nothing more to say
>>
>>101172582
>- Object & Symbol: always truthy
Which is some whacky shit because in any other coercion the object uses its toPrimitive() method that can define to do whatever you want.
>>
>>101184035
kuruminha sexo
>>
>>101179236
>>async
>extremely easy. async methods happen asynchronously and your program continues running without waiting for the async method to complete. what about this is hard?
My coworkers struggle with this a lot. They "know" JS is single threaded, but don't understand what this means.
Out frontend spends 10s of seconds to parse JSON data and the UI freezes up.
Our backend blocks for minutes at a time because of insanely slow and blocking functions, causing other requests to wait for the slow and blocking ones to complete before they can be handled, which usually causes then to time out on the client side.
My coworkers think that's since it is async, it does not block other stuff from being processed, but that's not how it works at all unless you start using web workers, or use Nodes special nonblocking async functions that's used to handle the file system etc. But my coworkers usually just use the blocking sync functions even the nonblocking async functions are available.

These people have masters, bachelor's and engineering degrees, yet don't know the basics at all. Mostly because they just don't seem to care even if I give them the exact documentation to read, and tell them what not to do, they simply don't care.
>>
>>101184903
i dont understand what the problem is. "js is easy" doesnt mean "every single part of js is easy to understand" it just means that it's generally easy and all of the "hard" parts have easy ways around them, so you dont need to engage with anything particularly difficult. just like C++ having template functions doesnt mean it's a loosely typed language, javascript having unclear parts to it doesnt mean it's not an extremely simple to learn and use language

>there's nothing more to say
no i think you need to explain yourself, or are you just desperately flailing around to cope with the fact that you suck at programming and have been called out as a complete fool?
>>
>>101184903
i'll say once again: post your code. let's see how badly you fucked up that you started thinking javascript is hard
>>
Jesus Christ I can't believe you guys are still arguing over whether JavaScript is hard

Obviously it's not hard and the guy who said "it's hard, prove it isn't by explaining the basics" is a no-coder moron who wants the basics of JavaScript spoonfed to him
>>
>>101172770
JavaScript is not a good first language, start with python, ruby or java instead
>>
Other languages apart from JavaScript have "truthiness" too, right? In Ruby the empty string seems to be truthy, and in Python it seems to be falsey

Presumably the only way you don't have truthiness is with strongly typed languages where you can only use booleans in conditionals
>>
>>101161277
Hobbyist here. Is React really that bad? I used it a while back for a small project that involved things like very rapid writes to state and it seemed pretty performant, and while I did have some weird bugs to work out, I'm pretty sure most of them were because I was new to the framework and hadn't figured out all the best practices for structuring the SPA. It definitely made it easy to update the DOM coming from a position of not knowing what the hell I was doing, and I got my project done.

Are these problems things that only come up when you try to build at real scale in industry or something?
>>
File: mdn.png (22 KB, 1188x397)
22 KB
22 KB PNG
Vanilla web components have my balls in a vice.

How am I expected NOT to hate everything related to modern web development?
>>
>>101186859
React "works" for simple things, but it makes you think about them in a weird way. React-brain is real thing. I mean you are even saying...
>coming from a position of not knowing what the hell I was doing, and I got my project done
yes, React makes something like that possible. But someone who knows his shit might see a way simpler way to do the same thing without a framework like React. And people who only use React et al. will start to think that every problem is solved in this way and they start producing crap.
It is entirely possible that what you have produced is nothing but crap. Yet you won't notice until you have to integrate a new feature or fix a bug.
>Are these problems things that only come up when you try to build at real scale in industry or something?
...and then there is the corporate view on things like React: It also "works" for them, because they can hire (sorry for that) dumb fools for little money - and somehow they all settle for the lowest common idiotic solution that they can find.
>>
>>101186862
>How am I expected NOT to hate everything related to modern web development?
You could try not having skill issues.
>>
>>101187184
>It is entirely possible that what you have produced is nothing but crap. Yet you won't notice until you have to integrate a new feature or fix a bug.
Yeah, I wouldn't be surprised either.

What are the reasonable alternatives? My main design constraints for that project were:

1. Update UI smoothly whenever server data is sent (>1/s)
2. Show/hide pieces of the UI based on that data (standard things like lists of similar elements)
3. Hold at least a little local state, like client-side show/hide behavior that isn't driven by the server
4. Be at least a little predictable, I want minimal nondeterministic behavior

React gave me some pretty natural answers as to how I was supposed to do these things. Is there a way to do this all in vanilla JS without effectively writing a slimmed-down React replacement? Or is there another approach? (I've looked at HTMX, and while it's cool, it looks like a poor fit for these reqs.)
>>
I have yet to see react haters come up with a viable replacement, and believe me I'd love to see one.
>>
>>101187349
What you describe is what 99% of all web apps have to do, but we had been doing that just fine before React was a thing.
1. How exactly is React helping with this in your case? Because I have seen so many projects where this was *not* solved by the use of a framework.
2. That's like really easy with standard html/css/js - it only gets difficult once have think that you have to force an abstraction on top.
3. The DOM is a local state. The user only has control over the DOM. The server is not doing shit unless the client requests stuff or subscribes to some even stream (see 1)
4. Adding a stateful object abstraction on top of a DOM abstraction on top of the DOM surely does not help with things being well defined...

>Is there a way to do this all in vanilla JS without effectively writing a slimmed-down React replacement? Or is there another approach?
Of course there is. Accept html and the web for what it is:
* you do not control the client. Clients doing different things with the input that you offer them is a feature, not a bug
* the web is request based, so the server is not obliged to forcing resources on the client.
* the DOM is a an abstract object structure, why would you default to abstracting it away in the first place?
* reactivity is not an end to all. What is wrong with objects? I am by no means a "fan" of OOP, but sometimes a plain old object with methods (which in the case of the web may simply "render" some stuff) is totally fine.

Especially lists are a funny thing to mention. With a framework you usually have to copy the state array, do your modifications, then let the framework render it. Without a framework you simply do the modifications to the list. Which may even simple include something like
<li onclick="this.remove()">
- no need to go through states and stuff, just remove the li (ListItem !)
>>
>>101187921
Thanks -
>1. How exactly is React helping with this in your case? Because I have seen so many projects where this was *not* solved by the use of a framework.
Made it very natural to pipe the data through. New data incoming? It goes into the appropriate object's state. Initialization and mutation are identical operations.
>2. That's like really easy with standard html/css/js - it only gets difficult once have think that you have to force an abstraction on top.
Okay - say I have a list of Foos, inside a FooContainer. When I have no Foos, the FooContainer doesn't render. When I do, it does. I get how to create a FooContainer with a list inside, but how should I handle a subsequent lack of data when all the Foos disappear (due to server mutations)?
>3. The DOM is a local state. The user only has control over the DOM. The server is not doing shit unless the client requests stuff or subscribes to some even stream (see 1)
The page in question was a literal Single Page Application - using the page requires the client to subscribe to a stream, otherwise there's nothing useful it could do. I don't think it's correct to describe it as a "web page" but rather as an application that I wanted to try implementing over the web. The data and its mutations were server-driven.
>4. Adding a stateful object abstraction on top of a DOM abstraction on top of the DOM surely does not help with things being well defined...
Specifically, I'm concerned with trying to spin off multiple async actions at once. Not hard to make those conflict. I dunno how often that would come up, but better not to find out if possible...

>Of course there is. Accept html and the web for what it is:
This sounds like being generally opposed to the idea of web applications, and preferring web pages with dynamic content. Is that a fair summary? It definitely makes sense to me that you shouldn't write web pages with dynamic content as web applications...
>>
>>101186833
>Presumably the only way you don't have truthiness is with strongly typed languages where you can only use booleans in conditionals
yes but even C++ has truthy values where objects/pointers=true and nullptr=false
>>
>>101188467
>This sounds like being generally opposed to the idea of web applications, and preferring web pages with dynamic content. Is that a fair summary?
NO! Absolutely not! Quite the opposite actually: Everything that can be a web app, should be a web app! Get rid off all the other stuff. You don't need native binaries or mobile apps for most stuff. Do it web based instead.

However, a web app does not always have to be a "single page" app.
>It goes into the appropriate object's state. Initialization and mutation are identical operations.
Exactly the same when using the DOM without abstraction. Got a new li to insert? Insert it then. Want to shuffle a list? Shuffle it then. Have to change some text? Change the text already.
>how should I handle a subsequent lack of data when all the Foos disappear (due to server mutations)?
With CSS of course. The DOM does not need to change any further. Modenr CSS especially makes this like really easy...
.FooContainer {
display: none;
&:has(.Foo) {
display: whatever
}
}

You do not need to do additional DOM mutations in this case. Let the actual rendering engine handle this.
>multiple async actions at once. Not hard to make those conflict. I dunno how often that would come up, but better not to find out if possible...
But that is like a big fat React-gotcha, too. Have you actually taken a look at how many times your app re-renders in certain cases? Chances are, it is way more often than you think.
>>
>>101186833
in Clojure(Script) false and nil are falsy, everything else is truthy
>>
>>101188789
>With CSS of course. The DOM does not need to change any further. Modenr CSS especially makes this like really easy...
That's really interesting. I'll take some time to read through advanced CSS behavior. I'm still not sure how best to handle the simple server-initiated delete case (e.g. what happens if the deletion gets lost in transmission, do we lose track of the deletion), but I get where you're coming from with this.

Anyway, thanks for the advice, and I'll take a look at composing base JS/CSS to handle my application needs. I won't promise that I'll actually stop using React, because there are still some convenient behaviors I don't really want to implement myself from the ground up, but you've convinced me it's at bare minimum worth looking at.

If you know of any projects on Github that do things "the right way", in your opinion, I'd appreciate a link so I can take notes.
>>
>>101188902
Don't stop using React, if it does indeed work for you. But you should be aware of the caveats. And you should be aware of the way it makes you think about things.

Not gonna post links though, they'd probably dox my company or something ;)
>>
post some js cool shit, btw, new ES just dropped, some kind soul take care of doing an overview in the thread
>>
>>101149898
Find a good name and get a .com if at all possible
>>
i just started using electron for a project that needs to be ezpz for idiots to use, and the whole IPC model seems to be the most idiotic convoluted garbage i've ever seen

any real reason i shouldn't just treat it as a normal webapp and make myself a websocket between backend/frontend and ignore their ipc/contextBridge/preload script trash?
>>
>>101192829
websockets are already ezpz to use. any idiot could figure them out just by looking at an example
>>
>>101192829
I use capacitor (What Electron is made from, made by the same people but you don't have to use react/angular/vue).

You can use websockets. Just tweak a few things in settings.
>>
>>101192994
the ezpz i'm referring to is the end user app not an api, i'm saying i want to use websockets for ipc rather than their idiotic built in ipc
>>101193034
wat, you don't have to use react/angular/vue to use electron
>>
>>101144069
Where to get coke

Someone give me onion
>>
>>101167297
>unironically cardio
Maybe you're right, I am fucking unfit these days
>>
>>101142205
vaio were pretty dope back in the day.
>>
>>101175044
drop the course, download "spring in action" from libgen, read cover to cover and then build the same project yourself without the guide.
>>
>>101176941
tell me you're unemployed without telling me
>>
>>101186833
Always use === on all langs and never have to worry about type coercion
>>
>>101196777
i only use == everywhere because i want all of my variables to be coerced
>>
ES 2024
https://2ality.com/2024/06/ecmascript-2024.html
discuss
>>
>>101196777
>>> 3 === 3
File "<stdin>", line 1
3 === 3
^
SyntaxError: invalid syntax
>>
>>101196094
>>
>>101196628
hah, I was reading that book before I started this course on Udemy, but didn't finish it.
IMO it's pretty much the same thing. Using the book I was just typing the stuff that was in the book. And explanations for how stuff works are about as elaborate in the course on Udemy.
I'll go through it after the course maybe.
>>
https://www.rejuven.hu/ This is an old site made my a friend. I want to make something more modern looking. Should I use Shopify, Woocommerce and Elementor or what?
>>
>>101198795
meh nothing to get excited over
>>
>>101198795
still waiting for standardisation of Record & Tuple
>>
Ok ladies, what's the best way to build an ecommerce website ? I'm thinking shopify with a next frontend for that custom feel and extra features. What other alternatives are there ? I've heard (headless) wordpress is a dumpster fire and woocomerce is obviously inferior to shopify.
inb4 build from scratch
>>
>>101200413
see if there's a way to send ES feedback, there might be a github of some sorts
>>
console.log('%c Hello Nigger!!', 'font-weight: bold; font-size: 50px;color: red; text-shadow: 3px 3px 0 rgb(217,31,38) , 6px 6px 0 rgb(226,91,14) , 9px 9px 0 rgb(245,221,8) , 12px 12px 0 rgb(5,148,68) , 15px 15px 0 rgb(2,135,206) , 18px 18px 0 rgb(4,77,145) , 21px 21px 0 rgb(42,21,113)'); 
>>
console.log('%c post good shit with this, fuckos!!', 'font-weight: bold; font-size: 50px;color: red; text-shadow: 3px 3px 0 rgb(
>>101198795
>>
>>101203390
whew, embarassing, let me try again:
console.log('%cpost good shit with this, fuckos!!', 'font-weight: bold; font-size: 50px;color: red; text-shadow: 3px 3px 0 rgb(217,31,38) , 6px 6px 0 rgb(226,91,14) , 9px 9px 0 rgb(245,221,8) , 12px 12px 0 rgb(5,148,68) , 15px 15px 0 rgb(2,135,206) , 18px 18px 0 rgb(4,77,145) , 21px 21px 0 rgb(42,21,113)'); 

>>101198795
>>
what is a good config for jsdoc?
does it really not warn you when you have a @typed a variable as object wit h x,y,z parameters and you try to use parameter k?
>>
File: 1719640012702.jpg (219 KB, 1080x1080)
219 KB
219 KB JPG
>there is no series where I can find Javascript and React questions to prepare for int-
>>
>>101204251
>lady sir you don't say you do it for HALF, rejected!
>>
i'm making extra bucks on the side, essentially working two dev jobs, one full time and the other as a freelancer
the freelance job is way more rewarding than my current full time
>>
>>101204375
they always are until they forget to pay you for 6 months

(which don't get me wrong, still worth)
>>
>>101142205
I don't understand tailwind ;__;

lg:px-7 max-lg:py-4

The fuck this even means?
It will apply px-7 to devices larger than 1024px and py-4 to devices smaller than 1024px???
help
>>
>page 10
Why is nobody talking about web dev
>>
is it possible to create a secure login system without a database ?
Like with server side encryption of the username and password into a file or something
>>
File: .png (122 KB, 1138x441)
122 KB
122 KB PNG
>>101206617
use the tailwind vs code extension
>>
>>101209013
just encrypt the password and store it in the file but why do you wanna do that?
>>
>>101209151
I'm using it, but I don't understand the:
not
>>
>>101209013
i did this in a group project in college because we ran out of time to decide on and use a real database
>>
>>101209013
a database is basically just a fancy text file with an overhead API
>>
File: 1714035798066.png (147 KB, 762x436)
147 KB
147 KB PNG
Which language do you use in the backend? Why? Which one would you recommend for a beginner?
>>
>>101210542
javascript with node (node isnt a language btw)

it's extremely convenient to have both the frontend and backend written in the same language

id recommend javascript

everything else is usable but usually dependent on what exactly your project is. if your website relies heavily on python-specific libraries, for example, you may as well just write the backend in python
>>
>>101210617
>it's extremely convenient to have both the frontend and backend written in the same language
This is true, but I also read that JS in the backend isn't as efficient as the other languages. I'll learn an OOP language like Java or Python just in case.
>>
>>101142205
Any of you idiots use ChromeOS/Crostini for full time web dev? Genuinely curious how the experience is
>t.autist
>>
>>101210710
it is extremely efficient if you use uWebSockets.js
it's essentially a C++ server that you interface with through javascript, so it's almost as fast as a pure C++ server
it's also more efficient because your code and build process will be significantly simpler than whatever you end up doing with any other language

if youre going to learn a different language anyway then learn C#, rust and/or python, maybe C++, but not java. java has fallen completely out of fashion because it just doesnt bring anything particularly useful to the table compared to other languages. also python is object-oriented but nobody really uses it that way because its strengths lie in being a scripting language
>>
>>101210542
c++ (if you are based)> go > rust
>>
File: file.png (74 KB, 1745x416)
74 KB
74 KB PNG
>>101210789
>java has fallen completely out of fashion
Java is still as used nowadays as it was 10 years ago.
And it's not because of legacy code, PHP and Ruby are examples that actually have lost users through the years.
>>
>>101210789
I was learning Java, kek. People say that Java and C# are interchangeable in a way, so I just went with it. But thanks for the insight.

>>101210891
Interesting. Now that puts me on top of the fence.
>>
>>101210891
>And it's not because of legacy code
how do you know this? and i still dont see any reason to use it for website backend over something like C++, go, rust or javascript
>>
>>101211027
>i still dont see any reason to use it for website backend over something like C++, [...] rust
You clearly have never developed a backend using those languages and have just adopted someone's else opinion, that was just as much uneducated.
>>
>>101211091
nice ad hominem anon. instead of actually explaining anything which might be useful you just go straight for calling me stupid lol
>>
File: file.png (18 KB, 973x80)
18 KB
18 KB PNG
What would be a modern way to style a bar like this? I'm rebuilding one of my old favorite websites (synchtube) with modern web tech and am having creative block on this part. Everything has to be fluid since I'm designing for desktop and mobile.

>archive of the original site
https://web.archive.org/web/20120511230000/http://www.synchtube.com/r/vidya4chan#
>working copy of it
https://backup-server.sosnych.com/
>another remake of it I'm basing design heavily on
https://instasync.com/r/lollol

And I know Cytube exists but it's fucking ugly and over 11 years old now.
>>
>>101211109
Ok anon, but you're the one who brought C++ and Rust into the conversation. Burden of proof is on you.
Tell me why you think C++ or Rust is a good idea first and then I may counter your argument.
>>
File: file.png (54 KB, 1917x901)
54 KB
54 KB PNG
>>101211151
This is my current design btw. I have a light mode too. It's using Bulma and Alpine on the front end and Hyper-express/node/Mongo on the back.
>>
>>101167365
>iterally does not matter
So if a given benchmark shows a RoR app handling 5k RPS, and the same app in Go handling 140k RPS this doesn't matter?
>>
>>101211158
>Tell me why you think C++ or Rust
Not that anon but C++ and Rust are both fast fuck compared to most other languages. See what >>101211171 just said about Requests per second.

That said the anon you're replying to also mentioned Javascript so I'll answer what you said and what >>101211171 said at the same time.

Just use uwebsockets.js or something made from it. They call to a C++ server and are faster than Rust in RPS while still letting you use node.js and familiar syntax. Why settle between speed and ease when you can have both? Java has no advantage over Javascript whatsoever when you take the UWS pill since the biggest complaint about node.js was low RPS.
>>
>>101211220
>Just use uwebsockets.js or something made from it. They call to a C++ server
Neato. I'm the RPS anon, and I wish I liked or was even slightly familiar with JS so I could try this out for my next thing, but I'm rusty as fuck and don't feel like relearning it
>>
>>101211264
Understandable. If you know C++ you can use UWS (not to be confused with UWS.js) directly. It's the exact same server UWS.js is made from but you use C++ rather than the node.js and javascript wrapper for it. Or if you ever feel like using javascript and change your mind I'm using Hyper-Express, it's built just like the very popular express but it's made on top of UWS.js and is nearly as fast. It's a good option because express is pretty easy and there's tons of guides on how to do stuff in Express so learning isn't a big deal.
>>
>>101211220
So you're aiming for speed or easy to use? You're inconsistent with your own argument, and terribly naive to the point of ignorance.

>C++ and Rust are both fast fuck
Only in execution time. Have you considered development cycle, compilation time, environment, devs availability?
If those languages were productive we wouldn't use anything besides C++. There would be no need to create any new languages, but instead we have a whole plethora of languages that aim to be either more accessible, or safer, or overall more productive.
Hell Go was a direct response to C++'s terrible compilation times. It's that bad. It affects development cycles that much.

>Just use uwebsockets.js or something made from it. They call to a C++ server and are faster than Rust in RPS while still letting you use node.js and familiar syntax.
You're only solving (more like improving) a small problem of a big ecosystem. JavaScript will still have dozens of bottlenecks not tied to the IO. In fact IO has never been JavaScript's bootleneck.
>>
>>101211382
>Have you considered development cycle, compilation time, environment, devs availability
I don't give a shit about all that stuff. I want my web SERVER to SERVE requests fast. That's literally it.

I could swap to bun.js if I cared about all that other stuff.
>>
>>101211401
You clearly do not care about response time either, else you wouldn't be saying to use Node.
>>
>>101211450
You realize a bunch of crypto sites use uwebsockets and uwebsockets.js because it's fast as fuck right? You can stop pretending you know more than everyone else now. Bitfinex and Kraken both use uws.js. Which is the node version.
>>
>>101211743
What's even your point?
You know Facebook was built with PHP and Instagram was built with Python, right?
>>
>>101206617
>when lg screen or bigger, padding on the X-axis (left and right) is level 7 (probably 7em, I don’t really know tailwind I’m just not retarded)
>only while in lg screen, padding on Y-axis (top and bottom) is level 4 (probably 4em again)
>>
>>101211158
they are both very fast. i recommended using uWebSockets.js specifically because it has the execution time speeds of C++ with only a minor delay added by the javascript interface, letting you have most of the performance benefits of C++ and all of the convenience of a javascript node server

rust because it's fast but also popular and lots of companies are hiring rust developers
>>
>>101211264
https://pastebin.com/bKZhcXJ2
you can use this as a base uws.js server. serves files via http and handles websocket messages. it's so easy a monkey could do it
>>
File: 1717629279564275.png (34 KB, 320x173)
34 KB
34 KB PNG
Apologies to ask this question here, but I figure since it's already hit bump limit it won't be too intrusive

I am using 4chan XT with the OneeChan userscript (loaded through Violentmonkey) on Firefox. I noticed the top right favicon (fa fa-gears) wasn't showing, and instead it displayed plain text "OneeChan" next to the other buttons.
Does anyone know why that might be? The other font awesome stuff seems to work.
I just changed it to a plain gear emoji in the meantime

relevant piece of code is on line 1088
https://github.com/KevinParnell/OneeChan/blob/master/src/script.js#L1088
other people have already said it werks on their machine
>>
>>101211974
I legit started reading this and thought I wrote it at first since I push uwebsocket.js so hard here like >>101211220
>>
File: file.png (102 KB, 944x671)
102 KB
102 KB PNG
>>101211982
Oh hey I'm the hyper-express guy. I used the pastebin you gave me the other day for uwebsockets.js to swap my static file serving over to how you did it. Thanks for that.

I ended up figuring out my question by looking at how you did UWS.js and how the Hyper-Express.js documentation looked since they were pretty similarly written. You should try Hyper-Express sometime if you enjoyed express/socket.io and wanna try something as a hobby.

Picrel is what I did, I used HE's router.upgrade before the /connect so I could use express-like syntax to get the cookie on the initial http handshake, and you can pass stuff from the initial handshake over withthe res.upgrade function then call it later with the ws.context. Like here I signed the jwt inside the socket using the ws.context.token I passed.

I forgot what the initial question I asked from other /wdg/ UWS users was when you handed me that pastebin, but I remember your pastebin answered it.
>>
Char(mander)
>>
New thread
>>101213446
>>101213446
>>101213446
>>101213446



[Advertise on 4chan]

Delete Post: [File Only] Style:
[Disable Mobile View / Use Desktop Site]

[Enable Mobile View / Use Mobile Site]

All trademarks and copyrights on this page are owned by their respective parties. Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.