[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] [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

Name
Options
Comment
Verification
4chan Pass users can bypass this verification. [Learn More] [Login]
File
  • Please read the Rules and FAQ before posting.
  • You may highlight syntax and preserve whitespace by using [code] tags.

08/21/20New boards added: /vrpg/, /vmg/, /vst/ and /vm/
05/04/17New trial board added: /bant/ - International/Random
10/04/16New board for 4chan Pass users: /vip/ - Very Important Posts
[Hide] [Show All]


[Advertise on 4chan]


"It happened again" edition.

>Free beginner resources to get started with HTML, CSS and JS
https://developer.mozilla.org/en-US/docs/Learn - MDN is your best friend for 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, PostgreSQL, etc.
link:: https://my.website.com
repo:: https://github.com/user/repo
progress:: Lorem ipsum dolor sit amet

Previous: >>108564403
>>
File: 1679011572577941.jpg (50 KB, 600x531)
50 KB JPG
js practice for a junior-mid (Me), chatgpt called it pipelines or some shit
what are experienced people's opinion on chaining operations like this?

for extra context, this pipeline or whatever this style is called used to be posted on this general some time ago, and I really liked it, and in this specific exercise, just wanted to take it a bit further, this is shorthanding everything except the return function. obviously the readability is not its strength but if the syntax is there might as well use it, what do you think?

const wordProcessor = (w) => {
return Object.entries(
w.reduce((acc, e) =>
((acc[e.length] ??= [])
.push(e),acc),{}
)
)
.map(e => e[1].sort()).flat()
}

const words = ["hi", "hello", "hey", "a", "to", "cat", "go", "no"];

console.log(wordProcessor(words))

const expected = ["a", "go", "hi", "no", "to", "cat", "hey", "hello"]
>>
>>108681495
Don't use the JS/TS ecosystem. It's not safe for prod. Use Go and stick to the standard library.
>>
>>108681569
>>108681616
it's probably fair to say that while hard to read, it also easy to read, if you know the syntax, imagine this done in many more lines, it would probably take like 15 lines let's say if not a bit more, you'd spend more time trying to figure out what's being done, while with this with a few sentences you can see quickly what's being done
>>
>>108681611
part of it is due to the formatting being giga aids. if javascript had pipe operators it would chain something like this
const wordProcessor = (words) => 
words
|> %.reduce((acc, e) => ((acc[e.length] ??= []).push(e), acc), {})
|> Object.entries(%)
|> %.map(([_, group]) => group.sort())
|> %.flat();

which is a lot more readable

holy fuck these captcha are so aids
>>
>>108681999
chegg'd, and yes, 100% agree with you my formating was aids and yours is proper formatting improving readability by a lot, and yes, the captcha is also aids
>>
>>108682051
>>108681999
sorry, I see now, but you can do that, just without the "pipes" (not sure where those are coming from) just remove the pipes and the formating is correct, maybe I'd consider breaking down the reduce one into two lines because its a tiny bit long
>>
I haven't touched the editor in months I just prooompt. Company has AI mandate requiring the entire engineering org to push for 100% AI utilisation. I just @cursor directly in the Slack thread where the raised tickets go, it can read the ticket through MCP, utilise skills we've set up. All done PR raised then I personally review it and another engineer.

In fact, all we have to do is write somewhat descriptive PRD, get Claude to break down and raise the tickets into workable chunk. Set up an event based triggering for Cursor Cloud Agent to pick up those task. Raise a bunch of PRs. Spin up environments that can be tested and kick back.
>>
>>108682078
>In fact, all we have to do is write somewhat descriptive PRD, get Claude to break down and raise the tickets into workable chunk. Set up an event based triggering for Cursor Cloud Agent to pick up those task. Raise a bunch of PRs. Spin up environments that can be tested and kick back.
So it's doing all the fun stuff whilst you're stuck doing paperwork and reading slop code. Doesn't sound too enticing.
>>
>>108682418
enjoy your dementia
>>
File: webdev.png (1.32 MB, 2184x3144)
1.32 MB PNG
>>108681495
>>
File: 1234.jpg (11 KB, 383x383)
11 KB JPG
>be me
>work with enterprise backend (db2, kafka, schedulers, spring)
>want to do a side project
>ok, let me use AI to develop the frontend
>2 days
>still stuck at generating a simple spa with sidebar in vue using shadcn ui library
>cant generate the whole project at once
>try generating individual blocks
>the ui get fucked when i try to glue the components

Any tips? im using gemini. If this AI workflow doesnt work by the end of they day, im quitting and will watch youtube tutorials like i did to learn backend.
>>
File: 1719078316774899.jpg (92 KB, 880x480)
92 KB JPG
Doe different typescript compiler output different stuff from the same input file?
>>
File: 1735368113686160.jpg (113 KB, 1024x1024)
113 KB JPG
>>108681611
I feel sorry for JnotgayS delepooers.
Look at the syntax it reminds me me trying to patch exe via assembler looking at some weird walls of random instruction. Its on the machine bytecode territory syntax.

PHP bross its not so bad.
>>
File: yes.jpg (61 KB, 1024x1024)
61 KB JPG
>>108683782
>Any tips
Yes.
The tip.
Usually it works like that. Do it manually and ask AI when something is not working it can help. 2 days is not enough SPA is quiet difficult right?
>>108684365
Yes because of the compiller settings there a lot to choose from. Read the documentation.
>>
>>108683782
frontend requires a human touch the machine could never
>>
>>108681651
My website needs a front-end though. I think npm is fine as long as you stick with trustworthy packages, where the maintainers should be smart enough to not have their credentials phished or whatever.

Axios was compromised the other day, but anybody who uses Axios in 2026 instead of fetch deserves to get compromised in my view.
>>
>>108683782
>Any tips?
if you're struggling with a relatively simple layout like this consider using free (doable) or paid templates you can find on the internet, grab the simplest one that accomplishes what you want and fine-tune it
>>
>>108684376
look at :
>>108681999
minus the |>, that's proper formatting by other anon
>>
>>108682800
I'm glad gippity was able to one shot your school assignment, but 4chan is for people 18 and above.
>>
>>108685501
don't fall for d&c bait fren, ai is just another tool it can be useful or not, just a tool
>>
>>108681611
That's just array.sort with a length check in the callback function. Fuck is this code
>>
>>108685514
I have never seen good AI-generated JS code.
>>
>>108685515
>>108685494
it's more readable
>>
>>108685522
I have, I use it to practice and learn, but it is true that if it has to generate it, it some times fails, but luckily for us we are programmers, I've gen'd simple enough tools with it, it works, even gpt free tier, but you have to be very thorough with the prompt and keep it simple
>>
do you use AI in web dev? what for?

I use it to build tools that'd take me a day or two in half a day or so, I just give them the final tweaks and call it a day
>>
>>108686308
If I want advice or info about a topic then I ask ChatGPT. I guess I could get something like Gemini CLI to generate me tons of code but I'd rather write the code myself.
>>
>>108683782
I was also thinking about learning Vue and using shadcn-vue, isn't there a ready-made sidebar you can just copy paste?
>>
>>108682347
That's the job nowadays. You review your own AI slop and other people's
>>
>>108687556
If you're reviewing every line and understanding all the implications of the code, wouldn't it be quicker to just write the code yourself?
>>
>>108685556
"it works" and "it's good code" are two very different things.
>>
File: istudiedhtml.png (913 KB, 640x960)
913 KB PNG
>>108681611
>>108685515
const sortByLengthAlphabetically = (
/** @type {string} */ wordA,
/** @type {string} */ wordB,
) => {
const lengthDelta = wordA.length - wordB.length;
if (lengthDelta !== 0) return lengthDelta;
return wordA.localeCompare(wordB);
};

const wordProcessor = (/** @type {string[]} */ words) =>
words.toSorted(sortByLengthAlphabetically);
>>
>>108688945
Much better. This is readable for everyone, even if they never used JS.
>>
>>108688945
Do you have macros for those JSDoc type annotations? Surely it's easier to just use TypeScript like a normal person
>>
>>108689081
weird, reads like alien tech to me
toSorted and localCompare are not something I come across often, very rare
>>
>>108688945
>toSorted
>ECMAScript® 2027
waait, how does thateven work? then why is it accepted by all browsers in mdn?
>>
>>108689149
You can't copypaste TS into the browser console. I just type the comments manually using my trusty keyboard.
>>108689167
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/toSorted
>Baseline Widely available

>This feature is well established and works across many devices and browser versions. It’s been available across browsers since July 2023.
>>108689154
.toSorted is just the immutable (BASED) version of .sort
localeCompare is how to do string comparisons alphabetically.
Both are useful for generic data manipulation.
>>
>>108685481
write your own js
>>
>>108689201
how old are those?
>>
>>108689154
>toSorted and localCompare are not something I come across often, very rare
Same, yet I clearly understand what the code does, unlike the original code.
>>
>>108689201
>You can't copypaste TS into the browser console
You can run it in the Deno REPL though
>>
>>108689315
the opposite happens to me
>>
>>108689210
I use React because I can't be bothered to reinvent the wheel
>>
>>108688945
toSorted() is interesting since it creates a new collection, didn't know about toSorted altogether
>>
>>108689367
I reinvent the wheel because I can't be bothered to learn React.
>>
File: hinjaku_hinjaku_dio.png (423 KB, 410x476)
423 KB PNG
>>108681611
>>108688945
>>108681999

(sort-by (juxt count first) words)


https://squint-cljs.github.io/squint/?src=gzip%3AH4sIAAAAAAAAAx3HQQqAIBRF0bmr%2BLyRgtIO3Eg0sLBUREG%2FkLsPG91zpbGWdoQIjeBzrn8nNBw0eO3lGBrPYqk4BJHstbE5J8k0XqarjsJ0x9ZZKUGU%2Buayb6w%2BlMWZTV0AAAA%3D
>>
>>108689418
based clojure enjoyer
>>
>>108689418
This will break on some inputs. I fixed the bug:
https://squint-cljs.github.io/squint/?src=gzip%3AH4sIAAAAAAAAAxXFQQqAIBAF0L2n%2BPyVLqQbdJFoYSaliAM6Qd4%2Beptn%2Fbpi453JO9Uqf5MMpAoZg5KXkE24G8AO6eqPCVueVxHlaYp8pqZZp3MGKGMJNXV1H9qVhRxZAAAA
>>
>>108688945
but is this new syntax or not? the local and the tosorted specifically
>>
>>108689614
no it's not, check MDN and run it in your browser console
>>
>>108689673
mdn says ecmascript 2027, and accepted in all major browsers, which makes it even more confusing
>>
File: 2023.png (42 KB, 794x252)
42 KB PNG
>>108689701
>>
>>108689722
damn, slowpoke me
>>
File: 1596026506163.jpg (146 KB, 678x800)
146 KB JPG
>>108682702
This picture reminds me that I need to gather resource for stuff that is a requirement but is not taught to devs, stuff like:
>SEO
>cyber security
>accessibility
>Network engineering
What else should I add to this list?
>>
The elites dont want you to know this but the columns inside jsonb are free
I have 19 tables with singleton jsonb columns at home
>>
You use Prettier or Biome, right?
>>
>>108691102

is super weird. you need to know instruments to secure code, but you have been left on your own, when is in the best interest of the company to train you in defensive operations.

This thing is, your bosses are entangled into a race to production. The strategy of dedicate hours of labor for security training eats time that can be burned rendering into production.

This means they are taking time from your personal time so you prepare yourself into security.

This happened to me.
>>
>>108692840
Prettier, yes. I just looked up Biome which it seems should be faster. Maybe I should try it.
>>
>>108689418
const wordProcessor = (w) =>
w.toSorted((a, b) => a.length - b.length || a.localeCompare(b));

Here's the JS code golf version.
>>
File: 1640444261261.jpg (159 KB, 1061x834)
159 KB JPG
>>108693635
>golf version
>>
>>108693635
wouldn't it be more correct to use .sort()? why make a copy?
>>
>>108693901
Mutability makes your program impossible to reason about.
>>
File: 2141313.png (60 KB, 1337x752)
60 KB PNG
>>108694134
>>
>>108694185
In that screenshot code .sort is called on an array that was created inside the scope of the function, making the mutation local. The wordProcessor function is pure as far as the outside world is concerned.
The code in >>108693635 calls .toSorted on the array that's passed in, not a locally created array. If .sort were used instead, the array being passed in would be mutated which would fuck with the calling code and is generally a bad idea. Try both versions if you wanna see for yourself.
>>
File: 2141313.png (44 KB, 1528x700)
44 KB PNG
>>108694245
same deal, am I missing something?
>>
>>108694287
replace .toSorted with .sort and check again. The original array will have been mutated.
>>
>>108694313
yes, you're right, I'm try to see if I can understand why on my own
>>
>>108694313
>>108694371
const wordProcessor = (w) => 
Object.entries(
w.reduce((acc, e) =>
((acc[e.length] ??= [])
.push(e),acc),{})
)
.map(e => e[1])
.sort()
.flat()


const words = ["hi", "hello", "hey", "a", "to", "cat", "go", "no"];

console.log(wordProcessor(words))
console.log(words)
const expected = ["a", "go", "hi", "no", "to", "cat", "hey", "hello"]

I assume I'm already creating a copy in one of the other methods?
>>
>>108694396
You're not creating a copy of the input array. You're creating new arrays for each different string length with ??= [] inside your reducer. You're sorting those arrays in place. However the version of the code you just posted won't work because you're sorting the entries array and not the inner word arrays. You moved the .sort out of .map so it works differently.
>>
>>108694607
I see, didn't stop to check, makes sense, thanks for explaining, I appreciate

const wordProcessor = (w) => 
Object.entries(
w.reduce((acc, e) =>
((acc[e.length] ??= [])
.push(e),acc),{})
)
.map(e => e[1].sort())
.flat()


const words = ["hi", "hello", "hey", "a", "to", "cat", "go", "no"];

console.log(wordProcessor(words))
console.log(words)
const expected = ["a", "go", "hi", "no", "to", "cat", "hey", "hello"]
>>
>>108694643
my own formatting errors were triggering my autism
const wordProcessor = (w) => 
Object.entries(
w.reduce((acc, e) =>
((acc[e.length] ??= [])
.push(e)
,acc),{})
)
.map(e => e[1].sort())
.flat()


const words = ["hi", "hello", "hey", "a", "to", "cat", "go", "no"];

console.log(wordProcessor(words))
console.log(words)
const expected = ["a", "go", "hi", "no", "to", "cat", "hey", "hello"]
>>
Question for people in web dev jobs being encouraged to use AI

Do you think AI is doing good work or creating slop?

I guess with AI you have to trust that what it gives you is good. If you're going to check every single detail of what it prints out for you, so that you understand every detail, then surely it would have taken no longer to just write the code yourself (either way you have to understand every detail of what the code does, and that's the bit that takes time - reading docs and understanding every code detail).
>>
>>108695021
>>108693635
funny how that works 2bh, fucking chatgpt, leading me down retarded paths
>>
>>108695096
No offense, I appreciate you're trying to keep the thread alive, but what kind of slop is this
>>
>>108695096
>Do you think AI is doing good work or creating slop?
only with MY supervision!
>I guess with AI you have to trust that what it gives you is good.
very unrealistic
>>
>>108695214
I'm just thinking that if someone generates a lot of code then surely you have to spend time reviewing every line, and understanding every line, to make sure it's not doing anything dodgy. So maybe you're not saving much time compared to just writing the code yourself.

Alternatively you just trust that the AI knows what it's doing. But if you don't fully understand what it has generated then you could end up with behaviour you didn't expect.
>>
>>108695257
>surely it would have taken no longer to just write the code yourself
This is blatantly false, and you know it.
>you have to spend time reviewing every line
Sure, but that's a lot faster and easier than writing everything yourself.
>Do you think AI is doing good work or creating slop?
It's both. If you know what you're doing, AI is a tremendous help.
It does enable people to pump out slop. If someone tells me they don't know what their (important production) code does exactly because it's vibe-coded, I can't take them seriously.
There are also tasks where vibe-coding a quick script makes your life easier when investigating a problem.
>>
>>108681495
>Libraryslop devs getting owned again
Love to see it
>>
File: buttons.png (34 KB, 301x669)
34 KB PNG
currently going through the mozilla developer guide for html and css but have been going offscript for a project. made these button designs, but for readability on my part, i put this in a separate css file from the traditional style.css. once im finished with the project, should i combine everything into one style sheet or is it considered good practice to keep it in its own file? also any suggestions for stylizing these are appreciated. trying to keep everything simple and clean,
>>
>>108695471
>any suggestions for stylizing these are appreciated
some links might be dead by now, very old pasta


/*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
>>
>>108695510
awesome, thank you. i need to get the HTML down before i start to really tighten up the style but this will be a huge help when finalizing everything. the bandcamp, archive and soulseek buttons especially need some love.
>>
>>108695558
imo, the bandcamp one looks very corporate, like it was pre-made by them
>>
>>108695703
do you think it stands out for being to on brand? the links to those site are the most important for me. on mobile that will be the first thing you see, acting similar to link tree. the sites main purpose will be to get people to the music.
>>
>>108696014
>do you think it stands out for being to on brand?
kind of, yes, I'm not a designer though, lels
>>
File: eva22.jpg (84 KB, 631x409)
84 KB JPG
I tried LGBT friendly LinkedIn and dont want to anymore. Any other good place to find a job?
>>
:: tagVotes ::
dev:: Spring
tools:: Laravel + Vue
link:: https://tagvotes.com/home
repo:: N/A
progress:: Public beta launch
>>
>>108698045
forgot muh cute pic
Do you guys think my site is normie enough
>>
File: me.png (949 KB, 2988x1650)
949 KB PNG
>>108698080
why the fuck is the image not uploading hello
>>
>>108698080
>normie enough
To me its nice. You shoul add language and lang prefix. Are you frontend/backend/fullstackninja?
>>
>>108698148
yeah fullstack, built the entire thing.
& ok
>>
>>108698045
You should work on the performance; it takes 4 seconds to load a post each time I click on one.
>>
>>108698223
it takes a second for things to cache, it should be quicker once you move through a few pages. I've been working on caching and performance
>>
>>108698235
It's after I moved back and forth. On first load it took over 10 seconds.
Still, it's refreshing to see a new site that's not vibecoded.
>>
>>108698235
Yea i noticed too, thats way too slow.
Also how do you rate yourself? Junior/mid/mid-senior?
>>
>>108698252
thanks, im going to investigate
>>
>>108698252
>>108698309
im just retarded. It should be faster (also going to upgrade server later this week)
>>
>>108698492
Also how do you rate yourself? Junior/mid/mid-senior?
What do you think?
>>
>>108698540
mid-senior
>>
>>108698577
Im askin becuz interesting becuz of the complexity of the project and to compare with mine and to tell you that to get a senior badge you need to operate with system that has a least 20 000 - 30 000 or more users usually 100k - said mr "ChatGPT".
>>
File: 1749428460362464.png (66 KB, 1026x1270)
66 KB PNG
>>108698045
>>108698085
Very cool project, I really like it so far. It looks clean and professional, and it works on both mobile and desktop. How long did it take you to make it?

By the way, I found a bug on the frontend, the log in and sign up buttons are wrong when you collapse the sidebar.
Also it's not possible to see the exact datetime of a post on hover, it only displays the approximate relative time.
>>
>>108698614
well i mean professional, i work as a regular dev so maybe mr GPT is right :(
>>
>>108698622
What kind device sir? and dimensions please if you dont mind
>>
>>108698647
Chrome, 1440p
Happens at smaller window sizes and in firefox too
>>
>>108698678
oh and windows desktop
>>
>>108698678
>>108698687
Forgot to answer - like 7 months.
Also, looking into this now.
>>
File: 1749590424365094.png (2 KB, 153x133)
2 KB PNG
>>108698694
Looks like it works now
>>
>>108698871
ye thx man.

Also, two of you should sign up so I can hit 250 users
>>
Holy shit is golang a meme?? It feels like I messed up not learning JS first
>>
>>108681611
the formatting is aids so I pasted it into https://prettier.io/playground and got this:
const wordProcessor = (w) => {
return Object.entries(
w.reduce((acc, e) => ((acc[e.length] ??= []).push(e), acc), {}),
)
.map((e) => e[1].sort())
.flat();
};

const words = ["hi", "hello", "hey", "a", "to", "cat", "go", "no"];

console.log(wordProcessor(words));

const expected = ["a", "go", "hi", "no", "to", "cat", "hey", "hello"];


that helped a bit but it’s still too clever by half for me because I need my reducers simpler than that unless I’m writing them myself
>>
>>108689149
VS Code will autocomplete and fill in everything it can about function arguments if you type /** above a function
>>108689614
it’s not new anymore, but it’s newer than any kind of in-place sort function
>>108695096
>then surely it would have taken no longer to just write the code yourself (either way you have to understand every detail of what the code does, and that's the bit that takes time - reading docs and understanding every code detail).
this is false
>>
>>108681495
hello webfags
will ai fuck fullstack harder than something like devops/systems shit/sysadmin shit
trying to figure out my direction
>>
>>108699847
>this is false
Let's say you get AI to generate a 10 line function for you. The resulting code calls another function which you're not familiar with. So you go and read the docs on that function you're not familiar with. That takes time. So whether an LLM generates the code or not, you still have to do the time-consuming bit, which is reading documentation to understand the code you're committing.
>>
File: forecasted-vs-observed.png (270 KB, 2562x1540)
270 KB PNG
In this study from last year, AI actually slowed down open source developers, instead of speeding them up. Pic related.

https://metr.org/blog/2025-07-10-early-2025-ai-experienced-os-dev-study/
>>
>>108681495
Dear web developers.

The businesses will betray you very early on. Remember this.
>>
for hosting do I buy a vps and host node shit on there or do I have to do something specialized
>>
File: CvMJiT9UAAA2f7k.jpg (122 KB, 1200x680)
122 KB JPG
I've started building a three.js and SpacetimeDB vibecoding pack. It's going to render terrain visually on the front end in a separate thread using workers but on the GPU with webGPU's wgsl and use three's LOD to be able to view large maps open world. But the collision and coordinates will live identically on the backend and streamed to the frontend, only the chunks. Gonna use cel shading to get away with lower res models and just give it an anime feel (pic related) but still use enough TSL tricks to make it look high end while still being performative.

The idea is basically a nice looking starter pack for vibe coders to have something genshin impact like with characters and an anime island and open world. So for example if someone said "go through everything and learn the system" then said "make a rogue like, use the monsters I put in assets/monsters folder and do the powerups as follows..." they'd be able to start vibe coding a rogue like with next to no game knowledge. Just drag and drop assets and tell the ai what to do.
>>
File: eva18.jpg (164 KB, 589x923)
164 KB JPG
>>108697390
Bump question.
>>
>>108695096
>>108695257
You do review it the first time
But by the 100th time you're just hitting accept all
Thats just human nature.

I think with AI its inevitable that ppl will start shipping code they never read. (And thats okay)
>>
>>108701423
It might be okay for some things but if you're handling sensitive data you probably don't want AI slop which leaks that data
>>
>>108701476
It becomes a difference of cost. If healthvaultr.ai occasionally leaks data but its 10 times cheaper than existing solution the market will just accept it.
Unless you bring in government regulations to prevent it. (And thats not okay)
>>
>>108681495
Suggest me something web related to build. Nothing too crazy, something doable by a single person. I plan to use Go with templates, no frontend.
>>
File: 14921023252710.png (932 KB, 1261x1000)
932 KB PNG
>>108695257
>>108701423
I my case AI is just a perfect teacher. Really teach you with speed of light like no one else and you progress very fast but you should be already experienced with computers, not a random Cletus basically.

Also how picrel is relevant for a web dev?
>>
>>108701568
web crawler ->
>>108701633
>>
claude really loves writing n+1 queries
>>
>>108695257
AI did help me solve a tough problem in a Java backend, but I took time to understand the solution and wrote the code myself apart from some copypasting.
If "vibe coding" becomes mandatory - ie using the chat window to build the program as opposed to the code editor - I will leave the profession entirely.
>>
>>108700447
matches my experience of feeling like i'm having a stroke every time i read slop code after giving it the exact requirements even if it's just a single function
>>
File: 1764668026039384.jpg (346 KB, 1005x1011)
346 KB JPG
>>108701251
pls sar redeem the questioning
>>
>>108701950
People host websites on shitty pis and other low end tech, a VPS is fine, use nginx
>>
>>108702254 this
>>108701950
Also follow one of those Digitalocean tutorials where they show how to set up SSH keys
>>
>>108701251
No, a VPS is meant for this exact purpose.
You do need Cloudflare before that though.
>>
how does 1 properly shill his website
how do i get ppl to learn about tagvotes
which one of you has a large following and will shill me
>>
>>108681495
>"It happened again" edition.
as it becomes more valuable, hackermen will continue to do it. this is what happens when you go from a functional high-trust society (people are employed, can make FOSS contributions without 6 gorillian lawyers and other legal bullshit) to a society based on degenerate gambling, FOMO and rampant joblessness.

really sick thing to see desu.
>>
>>108681999
anything you can do with "pipeline" you can do with a temporary assignment. since you can't shadow let/const bindings, it's a self-inflicted wound and Tc39 is retarded.
>>
>>108702407
case and point:
function wordProcessor(words) {
const t1 = words.reduce((acc, e) => ((acc[e.length] ??= []).push(e), acc), {});
const t2 = Object.entries(t1);
const t3 = t2.map(([_, group]) => group.sort());
return t3.flat();
}


I don't understand what purpose pipeline operator serves. making it so you can shadow const bindings would make this even easier, since I'd just reuse const words over and over.
>>
>>108685481
>My website needs a front-end though.
use go templ with htmx or datastar
>>
>>108702434
Wouldn't overwriting const declarations defeat the purpose of const?
>>
>>108685481
Use importmaps and CDNs to import your frontend libs. NPM avoided.
>>
>>108702493
const t1 = "x";
const t1 = "y";
is problematic how? it isn't mutating t1, it's redeclaring it. you can already do that with a new scope anyway:

function x() {
const y = "a";
{
const y = "b";
console.log(y);
}
console.log(y);
}
>>
>>108702493
honestly, I think they did this because var decls get hoisted and const has the whole retarded "temporal deadzone" runtime bullshit check because engines probably silently rewrite let/consts as vars internally and hide that with TDZ
>>
>>108702510
Shadowing is a code smell THOUGH
>>
>>108702254
>>108702282
>>108702370
I see. That's useful. Thanks.
One more thing, if I ever got hit by big, regular traffic, how would I scale for it? Do I just upgrade the hardware?
I heard that stackoverflow used to run on one server that would handle ten million hits daily, but the specs were probably beast
>>
>>108702619
As long as upgrading the hardware makes sense technically and financially, upgrading the hardware is a legit strategy.
You also look into caching solutions. It depends on the application. With the right caching, you can serve a lot of requests on mediocre hardware.
>>
>>108702619
You buy a bigger vps. nginx will shield your crappy web apps from slowloris and other comical DoS stuff. You can tweak your cache controls or cache page renderings when it becomes a problem as well.
>>
>>108701716
Yeah I think it can help but I don't think it's anywhere near ready to replace programmers yet, although maybe in the future it might be
>>
>>108702434
not having to make up a bunch of names to put things through a pipeline
you use pipe operators plenty at the command line
>>
>>108703030
so, there is no usecase then.
>>
>>108703030
>>108703068
nta, you guys... this probably comes from other shady language, where it is originally from, and it was designed specifically to implement pipelines, and they probably serve a specific purpose and might even go as far as have performance implications
>>
>>108703232
the "hack" style that has any traction with Tc39 is no different than using temp bindings.
>>
>>108681495

I'm not a programmer but what made me love computers were Windows games. So, to me C++ is the "real thing" and because of this I've always thought web development as something "weak." It's a feeling that I can't get over. Can you guys help me to change my mind?
>>
>>108703652
No because you're correct
>>
>>108703652
But you're right.
>>
File deleted.
>>108703652
She's right.
>>
>>108702434
im used to writing elixir so it came naturally, i agree pipeline operators will be massively retarded for a lang like js given the stdlib is mostly members and not namespaced functions. original post was purely to highlight readability.
that being said the const style is giga retarded and id prefer to just wrap everything instead of having multiple temp consts with shit names
>>
>>108703659
No, there is a huge ecosystem built around web dev, JS is like 10 times more popular than C++, bun js, nodejs, ts, electron, many many many more stuff. I know all of these but still I can't accept it for some reason
>>
>>108703652
you're right. I would prefer to make a living by writing natively compiled desktop apps, but people prefer using ad-riddled and slow webshit over paying even a very a small sum for real software, so here I am.
>>
>>108703652
One can write games in C++ and compile them to WASM now
but dealing with webshit, while very much a pain in the ass, is less difficult most of the time to satisfy clients
so yes, you’re basically correct except maybe for 0.01% of cases where the webshit gets really hard because you’re dealing with a bunch of interlinked systems over the internet that are connecting to each other only sometimes
t. webshitter
>>108704036
Come to macOS (not iOS), we have four decades of culture of people paying money for things
>>
>>108704265
I'm using rust and web right now. I'd prefer c++ but this architecture I'm using in the backend is written in rust, and I need to port parts of it to the frontend through wasm to make everything sync accurately.
>>
File: poop.png (232 KB, 1287x904)
232 KB PNG
cross post from a new /gdg/ >>108705215
this is an in-browser debugging emulator for the digital logic of a tile-based GPU i designed.
the debugger works in the main thread, while the emulator works in a worker. it has a graphics editor, but the drawing code for it is in the main thread; i really need to 1) move it to a worker and 2) have an option to turn off syncing if the emulator is running since that can kill the framerate.

>>108704265
i was considering writing this stuff in WASM. how easy is it to interface with browser functions like fetch and the console log?
>>
>>108705328
Gee if only there was another person in the thread working in wasm right above you that you could have asked.
>>
>>108701633
They can quickly bring you upto speed at a beginner level for sure. But I'm not convinced after that
>>
>>108702434
This was found to be needless boilerplate back when humans were writing the code
>>
>>108705328
>i was considering writing this stuff in WASM. how easy is it to interface with browser functions like fetch and the console log?
I have _no_ idea. I figure that any kind of glue code is something a reasonably competent LLM would be able to spit out relatively easily, though. These techniques tend to be pretty public because it’s all on the internet
>>
>>108705968
it’s not needless boilerplate if you’re on a team that isn’t comprised of all ex-lisp programmers
>>
File: nah.jpg (116 KB, 800x549)
116 KB JPG
>>
>>108681495
Web developers get what they deserve. Maybe if you knew C you could figure out a way to stop this from constantly happening LOL
>>
I'm close to finishing a small e-commerce website using symfony and basic JS all by myself using no AI as my first project.
How close am I to be a real web programmer? What should I do next to complete my understanding of this subject?
>>
>>108707047
how are you doing auth and backend?
>>
>>108707093
What's auth?
>>
>>108707047
sounds like you’re pretty close
>ecommerce
how are you making sure you’re not responsible for being PCI-DSS compliant? Stripe?
>>
>>108707099
generally when people buy stuff they have to make accounts
“auth” is short for “authentication” (who are you?) and/or authorization (“what are you allowed to do?”)
so how do you handle logins and how sure can you be that you haven’t fucked this up and accidentally allowed people to see each other’s accounts and pretend they’re someone else
>>
File: file.png (558 KB, 1348x644)
558 KB PNG
>>108707102
>PCI-DSS compliant
What's that?

>>108707108
Why would I need logins I already got my php generating HTML
>>
>>108707093
Basic MVC architecture in PHP using Symfony

>>108707102
The payment is the last part I need to do basically and yes, I plan on simply using stripe. I'm in the process of checking how it works, I see that they have a PHP sdk so I'll look that up.
>>
>>108707047
There a lot to do:
Do you have cart, users, orders history, search, filters, order proccessing, checkout, categories, multilanguage?
>>108707093
Symfony should have auth out of the box? Thats the reason why frameworks exists, to remove such routine for a developer.
>>
>>108707113
Also I'm trans btw. Anyone who wants to use my PHP bussy hole can come pound it
>>
>>108707110
I’m rooting for you but you probably should get at least one AI thing (Codex is the best at the moment) to look over your code and explain to you what needs to be correct before your code is trustworthy enough to handle other people’s money
>>108707119
>Symfony should have auth out of the box?
yeah but you still need to wire it up right and not fuck that part up
>>
>>108707119
>Do you have cart, users, orders history, search, filters, order proccessing, checkout, categories, multilanguage?
Yes to all of that except the checkout. The only part that took me a bit of time and trouble was doing a dynamic modern cart system but that was fun.

>>108707120
kys
>>
>>108707133
>I’m rooting for you but you probably should get at least one AI thing (Codex is the best at the moment) to look over your code and explain to you what needs to be correct before your code is trustworthy enough to handle other people’s money
Don't tell me what to do I've been following these w3schools and Rajeesh academy of PHP on Youtube for weeks now I know fucking more than you do nigger
>>
>>108707144
>>
Is the switch from test-engineer to webdev still possible in the current year of ai or is it over for experienclets?
I only care about fancy design/ux and im thinking about moving in to the design engineer meme since being a pipeline janny is incredible boring and uninspiring
>>
p. 9 bupn
>>
can you guys check out tagvotes.com
and let me know if its running smoother for you?
>>
>>108709293
Yeah it loads like 4x faster now
>>
>>108709364
sweet, thanks
>>
>>108709293
Feels good now
What was making it slow?
>>
>>108709880
my server provided cucked me and had OPcache turned off for some fucking reason. I chewed them out and got a refund for the first two months i used them
>>
>>108709880
>>108709913
for reference opcache is turned on by default ALWAYS
>>
>>108709913
>I chewed them out and got a refund for the first two months
explain the tactics in detail, some of us are socially retarded
>>
>>108709945
I explained that opcache is enabled in php 5.5 by default and that they also maintain Laravel, the framework that I use and should know this.

I explained that I spent 50 hours troubleshooting this and that having opcache disabled as a fucking toggle on their control panel is unacceptable etc.

They basically just relented instantly, i mean it was 30 bucks.
>>
>>108688945
Calling localeCompare within a sorting delegate a potential N log N times is not very smart.
It constructs a new Collator instance under the hood for each call and is incredibly wasteful.
You should instead instantiate the collator once and then pass its compare method as the sorting delegate.
>>
>>108709913
>>108709921
Oof. Yeah, that's supposed to be turned on by default.
>>
>>108692840
I use Stylistic ESLint which gives me more control over formatting my code just how I want it.
I fucking HATE opinionated preset formatters, because there's always ALWAYS something with them to not-like.
>>
>>108681495
If you are using anything other than C/C++ for backend then you are a dalit low caste vermin and should be shot.
>>
>>108701517
>Unless you bring in government regulations to prevent it. (And thats not okay)
Spotted the ancap.
>>
>>108707039
The way to prevent this is to repeatedly put a steeltipped boot up the collective ass of all the NPM maintainers until they make it an out-of-box default to not run postinstall scripts except for specific white-listed packages at specific version numbers.
>>
>>108710041
you were on the phone and with an angry tone?
>>
File: 1748395698800343.png (357 KB, 756x767)
357 KB PNG
>>108710109
C and C++ are literally the low caste languages.
Brahmin chvds use Python.
>>
>>108710149
>meem
reads like alternative world humor, but it is irl, fucking surreal
>>
>>108710148
no it was email support
>>
>>108710215
I hate that I don't have this mentality and can't demand things easily, but at least I got money and stuff back from a hotel I booked not long ago ;_;



[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.