[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

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]


>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: >>101142205
>>
File: 1719648074093233.jpg (318 KB, 995x1024)
318 KB
318 KB JPG
good morning sirs.
only people from superpower countries (and upcoming superpowers) can post here.
flex your github activities and wordpress plugins in this thread
>>
>>101213513
good morning Sir
>>
>>101209159
>>101209577
>>101209619

Thx. I was asking cause wondering if it was possible to have something like that secure.
I wanted to create an easy website template for an association where I would minimize the number of actions to do.
But I think I'll just create a database and make a good tutorial and install script.
>>
for me it's nextjs mongodb typescript
>>
int(rovert)
>>
ES 2024
https://2ality.com/2024/06/ecmascript-2024.html
discuss
>>
>>101213630
I still have no idea what the advantages of Mongo are over SQL databases
>>
>>101213741
nta, it's big boy shit, apparently NoSQL can handle more raw data, but only if you design the DB according to NoSQL paradigm, else the performance won't be there
>>
>>101213696
>>101213547
>>
>>101213779
the absolute state of (You)
>>
>>101213579
I just checked the host, and they want to sell me a 250MB database for 20€ per year.
Yeah I'll just go with the encrypted file.
>>
>>101213774
isn't postgreSQL better ?
>>
>>101213810
Default to SQLite for initial development and Postgresql when you have a working product.
>>
>>101213810
postgreSQL is good, and so is OracleDB, since both of these come with the most SQL features. Things like triggers and other advanced stuff. Somethign that you won't need unless your project is complex on the DB side.
But that's not the point, the point is that NoSQL can perform really well but for that you'll need to structure your data in a very specific way, far away from the Relational SQL mode. Which is old, intuitive and battle tested. I'm assuming those who can master NoSQL are few and well paid. But to be fair, I don't know of any big companies that are using NoSQL at a scale other than Amazon with DynamoDB to just track order delivery.
Maybe someone more knowledgeable can give his two cents.
>>
>>101213446
So am I the only idiot thinking using a ChromeBook 16gb is a potentially good idea?
>>
>>101213879
I'm working on a routing app. Last tool I found out was recommending to use postgreSQL for performances instead of mariaDB.
Oracle was also fine.

On the professional side, I worked for a big company that was slowly transitioning from Oracle to postgreSQL to save money. I guess the performances were good enough for them, but I wasn't able to talk with their admins.
They also had mariaDB for "small" projects
>>
>>101214815
I don't know about performance, but one thing is certain most if not all of the performance projects on that back end performance rank graph thingie site use PG
>>
Can i just write go templates with .html extention?
>>
>>101215269
Yes, but I also used Gin so I'm not sure if it's from one or the other.
>>
>>101215322
I use whisky for the most part, would recommend
>>
>>101213741
I'm a know nothing retard, but it's basically a trade off of minor data duplication for speed. SQL's purpose is to have absolutely zero data duplication to save space, because it was invented when a megabyte of data was the size of a fucking house. To accomplish that, it has to do a bunch of joins, which is (technically) costly in terms of time/processing. NoSQL is basically just one big document for something SQL might need several joins for. Think of it like storing everything in a text file for a particular thing.

Say for a customer profile, the address would just be in that customer's document, so the cost of getting that data is still just 1 process vs 2 in SQL - looking up customer, then doing a join for the address field in the address table. The data duplication for this example would be that you might store an array of order numbers in the customer's document, and the order document would also have the customer's id in it, just like it does in the customer's document.

The biggest problem is when people who are very SQL minded design on a NoSQL project. I learned NoSQL first and it was essentially just like using objects in any programming language. Because of that, SQL was kind of difficult to wrap my head around, or to understand its benefits. As long as you're using the paradigm in its intended way, either should be fine for most cases.
>>
>HTML5 Drag & Drop API
Why the fuck is this shit? Explain yourselves!
>>
File: MOZILLA.png (14 KB, 558x240)
14 KB
14 KB PNG
Everything will be Ghromium
>>
>>101215711
>SQL's purpose is to have absolutely zero data duplication to save space
From my perspective, it is more important to not have duplicate data to avoid the issue of what's correct or not. Saving storage is less important, especially now. But it is very important to make sure the data is correct.
SQL RDBMS makes sure that's the case and they can guarantee data correctness and do it in a very perfomant manner.
>>
>>101216416
My bank no longer works with Firefox... Only works on Chrome.
>>
How do I easiest make a React component which functions like a class which has a state with a bunch of data and methods to modify the data?
This shit keeps having issues with re-renders.

Am I just supposed to have all methods outside the React component and then have to call them with all the setField arguments needed?
>>
>>101213774
>apparently
So you actually have no idea and is just spreading rumors.
>>
>>101216600
Really depends on the application. Typically the duped data is just the IDs of other documents, or other data that's basically static. Like in the previous example, the customer shouldn't have their current address anywhere else but the customer's document, but a document for a specific order would likely have the customer's address at the time of the order being created stored in the order document as well. They're both the customer's address, but they're independent occurrences of it where one changing - like the current address being updated, wouldn't change which address the order was to be shipped to at the time of the order being placed. Meanwhile the order's document ID is likely being stored in an array in the customer's document, and obviously in the oder's document as well - but this kind of data would never change, so there would never be an instance where you're updating one, and forgetting to update the other.

This really isn't a one or the other being better sort of thing. One is better at some things than the other and vise versa, and unless massive throughput is needed, they could likely be used interchangeably in nearly all cases so long as the chosen paradigm is adhered to.
>>
We need another browser war so we can land a new treaty
https://www.sam.today/blog/html5-dnd-the-api-that-is-gaslighting-you
>>
>>101212100
Is Oneechan loaded after 4chanX?
The 4chanX css sets .fa classes within #shortcuts to font-size: 0;
So you shouldn't be seeing text there.
>>
>>101217314
Check out the css of the button's "a" tag element
>>
>>101216896
no retard, I parrot a DynamoDB expert working for amazon, and also my DB teachers insight on it
>rumors
it's not just a rumor that you're a massive faggot though now, is it?
Swear to god, the nerve of these newfaggots
>>
>>101217296
wbkit's proficiency, one would think that the luxury computer brand could come up with a nice browser, shame
>>
>>101217491
>I parrot a DynamoDB expert working for amazon
You do not. You probably misinterpreted whatever that so called expert said.
>>
>>101217685
>You do not.
ok retard
>>
>>101216614
People say there's no browser competition if everything's Chromium, but surely that's not true, since Chromium is open source. If Microsoft or Brave ever became too unhappy with Chromium, for example, then they could just fork it.
>>
>>101218189
edge is a chromium fork as far as I know, and pretty sure brave is too
>>
>>101218189
>People say there's no browser competition
you could argue webkit/safari is the B) option for a lot of mac drones, and it'd be true at least in some cases, those mac drones bring in a lot of cash to some sites
>>
>>101218284
I don't think they've forked Chromium, I think they import Chromium then add their changes on top

So they're always pulling in the latest code from Chromium I think
>>
>>101213870
What if I already have Postgres installed and therefore using Postgres is no effort for me at all
>>
I've been working as a web developer since 2019. Tomorrow I'll have my first interview for a senior position on an Eurocuck company. The recruiter said it wouldn't be a technical interview but I will be asked about my career.
What exactly they expect from me? They already know I'm not a senior webshitter right now, but they were fine to continue with the interview anyway.
What can I say to impress them? What would you expect from a mid level programmer trying a senior position?
>>
>>101213843
What's stopping you from coding like this?
>>
>>101219662
I hate programming and computers and anything related to it.
>>
>>101219660
give em a firm handshake
>>
>>101219906
It's online lmao
>>
>>101213741
Out of box scaling like sharding and replication. Simple to start and use. I would say good choice for startups that hopes to hit it big but doesnt need very strict data integrity ( e.g. ok for memes website but not ok for financial transactions app). If you suddenly need to scale a lot you dont need any third party expensive options. It supports transactions for a while now but I remember there were some issues with integrity. Probably resolved by now but for such use cases postgre is probably simply better. I dont know latest benchmarks but really doubt it has speed advantages over postgresql if we compare same things (no tx vs no tx).
>>
>>101219662
working with legacy code at my job took away my interest in coding
>>
File: 1719680379126235.jpg (59 KB, 669x639)
59 KB
59 KB JPG
work hard, that's all i can do
>>
>>101219682
You're in the right place
>>
https://www.youtube.com/watch?v=kKAue9DiHc0
who the fuck finds these funny?
>>
>>101218284
they are both soft forks.
what >>101218189 meant was a hard fork.
For example: The KHTML engine was hard forked by Apple in 2003, they called it WebKit. WebKit was hard forked in 2013 by Google, they called it Blink.The Blink engine is what everybody here refers to Chromium-based browsers.
By the way, here's a time chart of web engines: https://eylenburg.github.io/browser_engines.htm
>>
>>101214149
I guess I am the only idiot then, eh?
>>
I'm going to make my next project with Go and jQuery :)
>>
how the fuck do you document functions that return an object that has methods in JSDoc?

const main = params => {
const kek = "lel"
const inner = () => {
return params.foo += 1
}
return {inner,kek}
}

export default main


i'm trying to get the `inner` fn to show up in docs in a reasonable way and can't figure it out
>>
>>101216884
memoization, nigga
>>
>>101221528
How are you going to webdev on it?
I have been thinking of using Samsung DeX as my main and only device, but I'm not sure if it's worth the hassle
>>
>>101217296
Imagine caring about dragging that much that you let it decide your browser.
>>
>>101222143
ChromeOS has Crostini which is a Debian bag Linux vm similar (from what I hear) to wsl. Other distros can be installed as well.
>>
>>101213446
Hello sirs. I am but a lowly C++ Developer that wants to build a social media platform. I've never written any JavaScript. What stack should I use? Why? I just want to build a Reddit clone for learning purposes.
>>
>>101222410
I'm using the MERN stack for learning purposes
https://www.mongodb.com/resources/languages/mern-stack
>>
>>101222410
What do you develop with C++?
>>
>>101223110
I'm a firmware engineer for a government contractor.
>>
>>101222410
best to keep it simple
you can write everything you want with pure html/css/javascript and i'd recommend a node server using uWebSockets.js. if you're more comfortable in C++ than js then you can also use plain uWebSockets, which is written in C++ (uWS.js is the same thing but you interface with it through javascript).

some people like using react.js for the frontend (it's what facebook is written with) and maybe that'll make things easier for you since it makes html/javascript a bit more object-oriented, but if you're not familiar with webdev at all i'd just say start with the vanilla basics without any fancy frameworks and then if something feels bad/inefficient to you, look into frameworks that might help
>>
have you guys made web apps for ios? like, create a local server and open a webview in the app?
I got some mixed signals about apple allowing this type of thing in the app store.
>>
>>101214149
it's fine. if you dont care about having finer control over your pc then it'll do. just install linux on it
>>
>>101224563
>create a local server and open a webview in the app
not sure what exactly youre saying. phone apps open up websites all the time
>>
>>101224590
how does a webdev not know what a local server is
>>
>>101224563
I just made one recently in Capacitor with javascript/html/css that hooks to Digital Ocean server. There's no specifics saying "You have to use Apple servers" or anything, I don't think they check what backend you use at all.

Unless you mean localhost, in which case don't do that lol. I test my localhost server in capacitor then in production it hits my DO web server.
>>
>>101224689
>Unless you mean localhost
yeah, that's what I mean. the phone will be running the server
>>
>>101224736
Why would you do that?
>>
>>101224606
lol i know what a local server is but i dont understand the purpose of it. if your app is going to be entirely local then there's no real point to having a server at all, local or not.
>>
>have a github org
>every repo is private
>coworker creates a new repo using github desktop
>pushes the initial commit to remote
>the commit gets pushed with a completely different account, supposedly his private account
>this account is not added to the org
how is this possible? if i haven't added this account to the org, how can it push commits to my private repo in this org?
>>
>>101225461
Because he authenticated through the ssh key attached to one of the accounts in the org
>>
>>101225701
you mean the token thing?
>>
>tfw I see a megacorp using one of my favourite color palettes
feels good nigga, my nondesigner ass is enterprise level now
Note: it was a coincidence I don't work for that company nor I have used that palette in any web design, but I used it in animation
>>
>>101225753
Yep, they used a SSH key associated with one of the github accounts -- https://github.com/settings/keys

Doesn't matter what their name/email address is on the commit itself
>>
>>101226108
thanks anon, that makes sense
>>
>>101226108
nta, I remember usibg SSH keys (and the many headaches that gave me the first times and then some more) on gitlab, felt pro
>>
>>101213696
this happened
>>
I'm going to make a successful website

You'll see. You'll all see.
>>
I do not know where to ask, but can any of you help with this?
>>>/lgbt/36360996
>>
>>101227033
the pastebin 404d
>>
>>101227046
check the other reply to that thread
>>
Leetcode's website seems to use a lot of CPU for some reason, it makes the fan on my laptop spin up

Very annoying. Another website which does a similar thing is one of the popular jobs websites in my country. I guess it's some random, poorly-written JavaScript doing some pointless work.
>>
File: .png (39 KB, 844x240)
39 KB
39 KB PNG
>>101227064
oh sure, so this here:
 for (let cOption of document.getElementsByClassName("flagSelector")[0].options) {


is coming up with an empty array, so add guard code to it:

const flagElement = document.getElementsByClassName("flagSelector")[0];

if (flagElement) {
for (let cOption of flagElement.options) {
// ...
}
}
>>
Is it a good idea to use next js on front and Golang on backend? Or am i complicating things too much
>>
>>101227100
First of all thanks for the reply, but this does not solve it. Can you do a new pastebin for me?
>>
      // Installation instructions: Open the 4chan-X userscript in the editor. Hit ctrl+f and search for "if (g.BOARD.config.board_flags) {" and paste the contents of this pastebin into the previous line
// If there are no board flags declared, but we can see that the flag selector exists, then we know that we have to add them ourselves.
if ((g.BOARD.config.board_flags == null) && document.getElementsByClassName("flagSelector")[0].options) {
console.log("Board flags not declared. Using workaround.");
// create board flags object
g.BOARD.config.board_flags = {};
// go through the options in the flag dropdown menu and add them to the list
const flagElement = document.getElementsByClassName("flagSelector")[0];
if (flagElement) {
for (let cOption of document.getElementsByClassName("flagSelector")[0].options) {
g.BOARD.config.board_flags[cOption.value] = cOption.textContent;
}
}
// delete the "None" option
delete g.BOARD.config.board_flags["0"];
console.log("Detected the following flags: ", g.BOARD.config.board_flags);
}


This is what I put as code.
>>101227100
>>101227614
But does not work
>>
>>101227440
I thought Next.js was meant for back-end too (like SSR) but I dunno because I haven't used it
>>
>>101227709
>
  if ((g.BOARD.config.board_flags == null) && document.getElementsByClassName("flagSelector")[0].options) {


document.getElementsByClassName("flagSelector")[0] is undefined, so accessing .options on undefined will break.
>>
>>101227768
I am sorry but I am autistic, I would like to be sponfed to a pastebin where I can copy paste it and make it work. Anyway I can understand that you might not wanna help me this way. But I have nothing to lose.
>>
>>101227837
sure, something like this

const doSomethingWithBoardFlags = () => {
const flagElement = document.querySelector(".flagSelector");
if (!flagElement || g.BOARD.config.board_flags) {
return;
}

console.log("Board flags not declared. Using workaround.");

g.BOARD.config.board_flags = {};
for (let cOption of flagElement.options) {
g.BOARD.config.board_flags[cOption.value] = cOption.textContent;
}

// delete the "None" option
delete g.BOARD.config.board_flags["0"];
console.log("Detected the following flags: ", g.BOARD.config.board_flags);
}

doSomethingWithBoardFlags();
>>
>>101227033
Why do people use 4chan X when the native extension exists
>>
>>101228034
Mmm I don't remember why I put it back in the days, but it's just comfy now I find it weird to use the extension. Also, I put OneeChan on top of it for themes.
>>
>>101226686
go get 'em champ!
>>
>>101227066
or worse, some kind of bitcoin mining
>>
>>101219660
My guess is that they're confident that you're smart enough to code (maybe you work for a place they trust) but want to hear about projects that you've led or had significant independent (read: beyond following instructions) input on. Senior positions tend to be about leading projects and doing technical designs, so it makes sense that the career comes before the leetcode for that.
>>
is it possible with drizzle to select one element and return one or undefined/null ?
>>
>>101228505
>>101224922
>>
>>101228552
if i do query and then [0] the result typescript won't show me it could be undefined, like
      const user = (
await db.select().from(testUserTable).where(eq(testUserTable.id, id))
)[0];


isn't this annoying or is it just me
>>
>>101228083
Maybe it's just what you're used to. I tried 4chan X once but I couldn't get used to it, I'm too used to using 4chan without it, so I uninstalled it
>>
>>101228581
not sure if this would apply, but maybe you could do something like
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Nullish_coalescing
in fact I didn't even know this existed, but I knew it "should"
>>
>>101217314
Thank you for answering!! I had given up hope someone had seen it

>Is Oneechan loaded after 4chanX?
Yes it is
>The 4chanX css sets .fa classes within #shortcuts to font-size: 0;
Thanks, this made me spot the problem. It seems the fork I'm using (4chan XT) doesn't just import all of fontawesome - rather it is selective about exactly which icons are needed and imports those.
https://github.com/TuxedoTako/4chan-xt/commit/79115f3404ad719e3f1628fe1c6d9b660bad6928
When I did a sanity check and tried 4chan X again, the gears appeared without having to edit OneeChan.
I'll just have to try to replicate what they did on XT I guess. Without knowing anything about javascript/typescript. Wish me luck
>>
Leetcode taught me about binary trees today

I'm sure that will be very useful when I'm trying to eliminate component re-renders in React, and write complex queries with SQL, and look up the CSS rules I need for an animation
>>
>>101227100
If you're doing a [0] then just use QuerySelector
>>
>>101228034
It's a lot nicer, json based index, replies on bottom, etc.
>>
what's the least ass backwards way of doing a POST /logout widget? I'm guessing I'm going to need a form somehow. only plus I can see in a form is I can send the current url for a redirect back, I guess.
For the js version, it's just as easy as a click event and submit via fetch(), but still.
>>
>>101230466
Oh I see, XT renders the icons using inline svg, while X uses FontAwesome. Is there a reason you're using XT over X? They're about the same right now
>>
>>101230855
nvm.
buttons can have a form= attr so I'll just tack a hidden form at the bottom of the page and change from anchor for login to button[submt] when the user is logged in.
>>
>>101230877
>Is there a reason you're using XT
There's several little things it does that I like, such as adding a "randomize filename" button in the quick reply window (instead of having to go all the way to the settings menu to toggle that on/off constantly), incorporating the sounds player from filenames (instead of needing a separate script for that), and a few others I'm forgetting right now
>>
What's the take on ASP.NET Core Blazor?
I've never seen anyone post about it here
>>
>>101231467
>I've never seen anyone post about it here
Probably because nobody uses it
>>
>>101230933
you dont need a form element at all, you can just have the <a> element trigger a javascript function that sends whatever message you want to the server
>>
>>101226686
there are many ways to determine success, if you can actually finish a project I'd say you're leagues above everyone else on /g/
you can do it anon
>>
>>101231467
I've seen it mentioned a few times, never used it, but I personally find awkward the move from back end html templates + js to SPA and back to square one because SSR
>>
>>101230466
>>101230981
I made a simple userscript to replace it with the svg from the FontAwesome Icon. I did play with the svg code viewBox a bit, hopefully it works. Here you go: https://github.com/VireV/OneeChan-4chanXT-Icon-Inserter
Click the .user.js and then click "raw" on the right of the github webpage - tampermonkey/greasemonkey/etc should then pick it up. Well, if you trust me at least ( ͡~ ͜ʖ ͡°)
>>
>>101231871
// @description  try to take over the world!
// @author You

lol

thanks anon I really appreciate that! It works.
If you've already gone so far as to put it on github, I might recommend you do a PR for XT
>>
>>101231700
I know, but I need a nojs version because this guy I know uses an ancient blackberry still and nojs is about the safest I can make it, imo.
>>
>>101231871
I'm not that anon you're replying to, can you redpill me on mutation observers? based on your code I deduce that it's obeserving an element element with ID shortcuts, and when it changes or loads or ends its mutation then the function is called
>>
File: 1719861570604663.png (34 KB, 307x174)
34 KB
34 KB PNG
>>101232133
btw here's the proof it werks
>>
>>101232133
Well, this is a "problem" with OneeChan, and I'm not sure if they officially support XT
>>
>>101232246
I guess my thinking was a conditional in XT, sort of like "if OneeChan is also loaded, do this"
But you're right of course

Just figured OneeChan is not gonna take PR's since its last commit was a year ago
>>
>>101232143
I mean, it's a decent API, where the callback is called whenever the objects observed get modified in various ways (whichever ways is defined by the options object when calling observe)
https://developer.mozilla.org/en-US/docs/Web/API/MutationObserver
https://developer.mozilla.org/en-US/docs/Web/API/MutationObserver/observe
There's also IntersectionObserver for managing things as they move across the screen (usually due to scrolling)
>>
>>101232133
That will brake stream isolation.
>>
>>101232288
thx a lot for the info, every time I learn something new from js I hate myself for not already knowing it
>>
>>101231784
Thanks anon. I was sort of kidding, I do have an idea for a site I want to make but I know it will take a fair amount of time and I'm not sure it's worth investing that at the moment. I might just stick to smaller and more manageable stuff for now.
>>
>>101232898
whats the idea? might be fun to help out
>>
File: 1719080063709300.jpg (55 KB, 785x1051)
55 KB
55 KB JPG
>>101213446
How do you do fellow web devs? I don't know if this is the right place, but If I want to hire a fullstack dev to build me a website, what does he need to get started? A wireframe, technical specifications in great detail?
>>
I'm looking for a good reason to make a local first app with powersync or electricsql
>>
>>101232932
I am keeping it to myself because maybe it's a valuable idea, I dunno. I have tried working on this idea before but it ended up being more work than I thought. And the end product wasn't great so it might take a fair bit more work to make it good.

In all likelihood if I made this site public, nobody would care about it. But I am clinging to the 1% chance that 100 people might care about it.
>>
>>101232965
they definitely need a design document, at the very least. they need to know what you want, what it should do and a general idea of how it should look and feel. beyond that, it's up to you how much control you want to give them over the end result. unless you have some specific ideas or requirements for how the website should be, i'd say let them decide the technical specifics since they'll probably have something they're comfortable with and they'll probably know better than you how to implement it (since you're hiring them). wireframe is nice but a decent developer will be able to make you something that looks nice if you at least give them a rough drawing, even if it's not specifically what you want. just figure out how particular you are with the details and then give the dev whatever they need to stick to those details, then trust them with the rest
>>
>>101233069
do whatever you feel like, more power to you, but keep in mind that ideas are cheap and honestly almost worthless. the only thing people care about is execution
>>
>>101232362
what do you mean
>>
>>101232975
>electricsql
i dont see a reason
const shape = await db.projects.sync({
where: {
owner_id: auth.user_id
},
include: {
issues: {
include: {
comments: {
include: {
author: true
}
}
}
}
}
});


this looks fucking terrible. just write the query yourself like a normal person
>>
>>101232517
To be honest, they're less useful in actual websites since you're in charge of the js that's making modifications. And for user input that use any of <input>, <select>, <textarea>, contentEditable, or designMode elements, you already have the input event.
>>
>>101233304
Thanks for the answer, pal. It definitely helped
>>
>>101233345
Fair point. Maybe I should just focus on smaller stuff for the moment then instead of investing lots of time into a time-consuming idea which nobody ends up being interested in
>>
File: 117679948_p11.jpg (1.01 MB, 1532x2317)
1.01 MB
1.01 MB JPG
shit is fucking terrible at work now, it is incredible how a workplace can go from good terrible in a span of days. Wish I didn't get on the bad side of my boss because now she is 24/7 up on my ass.
>>
File: completed.png (159 KB, 1856x796)
159 KB
159 KB PNG
>>
File: Gook.jpg (203 KB, 1067x1600)
203 KB
203 KB JPG
I need some help /wdg/. To keep it short, I need a reliable list of VPN IP addresses to block. My site simply can't handle the bots and spam. I already have a system in place to ban all Indians from accessing the site, but I can't find good resources on VPNs. I tried contacting them directly but they refuse to help.
>>
>>101235043
Just put it behind cloudflare
>>
File: 1719873959379992.png (22 KB, 410x90)
22 KB
22 KB PNG
>>101231871
This seems to break in certain situations
>>101234972
>>101235064
>>101235103
>>101235214
Weird >>>/vg/484243279
>>
>>101228298
Thanks mate.
>>
>>101235232
Ok, seems to work now? Update your userscript
>>
File: file.png (2 KB, 119x25)
2 KB
2 KB PNG
why notuse lucia for auth????
>>
>>101235587
Thanks anon, that did the trick
>>
i've been doing servicenow development for a couple years, so it gave me exposure to AngularJS (RIP) and some guard rails

started learning modern Angular and it's been pretty nice, while remaining familiar. it feels so robust for what i'm using it for, would it be better to use React?
>>
>>101235043
put a captcha on your website when it first loads. it's that easy
>>
Is Sendgrid or Postmark better when it comes to sending emails?
>>
>>101226686
Wishing you the very best, anon :D
(srs)
>>
>>101226686
>I'm going to make a successful website
>You'll see. You'll all see.
Me too. I will post a link here in a few days
>>
fun ways to practice html css and js?
>>
>>101238594
make a website
>>
Function declarations vs expressions.. which is more based?
>>
>>101238792
they serve completely different purposes and most websites will use both frequently. comparing them is dumb
>>
>>101238792
it's like saying
>let vs const... which is more based?
>>
>>101238976
const is objectively more based
>>
>>101239082
This but unironically.
>>
>>101239082
>>101239092
do you people just forget that these things serve completely different purposes? why compare them when they're both needed for normal js to function
>>
>>101238968
So if you make top level functions, you use const or the function keyword?
>>
>>101239561
it completely depends on context, but by default i usually use "function" because i dont have to worry about defining it before or after where it's used. if i want to be able to reassign the function signature, i'll define it to a variable
>>
>>101240208
nvm what i said; cant redefine a const. im dumb. i default to "function" but again, both function and const have their specific uses... though there's no real reason to use const for a top level function since all it does is force you to define it before where it's used
>>
File: mdn.png (85 KB, 749x944)
85 KB
85 KB PNG
>nearest ancestor element
Isn't that always the same as the parent element?
What the heck is the difference between 'nearest ancestor' and 'parent' ? Is there any?
>>
>>101240653

kind of, it's just talking about how many levels you need to go up

something like this would suffice:

<div style="transform: translateY(100px)">
<p>
<span style="position:fixed">this content is fixed, but only within the div containing the transform</span>
</p>
</div>
>>
>>101240912
Oh, d'uh. I'm being stupid and missed the qualifying clauses
>>
>>101238792
arrow functions is more h4xt0r
>>
File: html + js.png (33 KB, 580x381)
33 KB
33 KB PNG
pic

why is my console auto logging 'hello1' messages without being clicked ? click also doesn't work.
>>
>>101241973
you call the function and bind the undefined result the the event listener.
>>
consoleHello()
->
consoleHello
>>
File: js.png (28 KB, 641x246)
28 KB
28 KB PNG
>>101242012
oh ok. thanks.

what about the case when function have variables and i need to use parenthesis to include them ?
>>
>>101242070
addEventListener expects a function. You will have to write one.
div1.addEventListener("click", () => changeInnerHtml("div1"));
or

function doTheThing() {
changeInnerHtml("div1");
}
div1.addEventListener("click", doTheThing);

or

div1.addEventListener("click", function doTheThing() {
changeInnerHtml("div1");
});
>>
Anyone else just waiting to get fired?
>>
>>101242194
duh? I'm not working right now. not a webdev though, at least not in name.
>>
>>101242070
div1.addEventListener("click", doTheThing('div1'));

function doTheThing(v) {
return function doTheThingHelper() {
console.log(v);
}
}
>>
pic

I just went on one of the popular news website, copied <head> and put it into beautifier.

Do pros write this type of code ? I don't think ill ever be able to even understand something like this. It's not that it's overwhelming but I honestly saw webdev as an easier path to coding and I will never be able to write something like that so just need drop it all together.
>>
ok i did another one, but it's still a bit too much
>>
>>101242462
>Do pros write this type of code ?
No, it's been minified.
>>
>>101242462
given it's google aids, it's probably rewritten with closure compiler.
>>
I have a website that takes advanced search queries like this:

type=spell power>4 lesson=p|q
This tells the search to pull spell cards with a power of 4 or greater that are potions or quidditch. This is an example of how it works: Accio Harry Potter TCG Search . And these are the options I've coded:

The problem is that it's a bit buggy, hard to maintain, and not cached at all. I was considering adding Redis or something on top for caching and then working through the issues. But then I thought if I was going to go down that route, I might consider ElasticSearch or something. But this is a free project and I don't want to pay much for a service like that. That and the data only changes a few times a year, so it doesn't need to be a super robust system.

I'll continue as I am if there's nothing that fits the bill. But I figured I'd ask
>>
>>101242436
>Factory Pattern
Fix the names and this is the best option imo
>>
File: patterns.png (9 KB, 327x212)
9 KB
9 KB PNG
Ah yes, programming.
>>
>>101242732
they just call that 'currying' in JS
>>
>>101242791
>Object schizophrenia or self schizophrenia is a complication arising from delegation and related techniques in object-oriented programming, where self/this can refer to more than one object.

Interesting
>>
>find myself using pic related website
>it has genuinely useful programming info on there
>notice in the footer that the site is indian
4chan was wrong, Indians can program
>>
>>101244011
thanks for cursing that site for me forever, I always assumed they were white and considered their advice and code samples good quality ;_;, I'm gonna get Michael Jackson's illness but in reverse now
>>
>>101244331
>i think their code is "good quality" by my own admission, but now i consider them cursed just because they're brown
Sure you could stop using their site but surely you'd just be shooting yourself in the foot
>>
>>101244331
If you look at the C++ code on there, the submissions are absolutely awful. Then again, basic js DOM manipulation stuff doesn't require much
>>
anyone mind helpin me on how to get an image MD5 on 4chan to search it in the archives?
>>
>>101244011
never used it. RosettaCode always seemed better for drive-by examples of any CS bullshit you'd need to know.
>>
My PM is trying to make us switch from PSQL to elasticsearch, I never used it, is it actually a good idea? We are the tech branch of a pharmacy chain.
>>
>>101213446
Is there a easy way to chunk and send huge 10 GB+ files from frontend to backend ( node ) other than tus ?
>>
>>101246544
What kind of website do you have where people are uploading 10 gig files?
>>
>>101246662
I'm making my own "google drive" with a focus on privacy.
>>
Not sure if the right place to ask but how does DNSSEC etc. keep my domain safe? I mean, if I get a domain for personal email how I can be all traffic (email, possible web traffic) to my domain ends where I want?
>>
>>101246819
Fair enough, that's cool. There is Proton Drive but I guess some people don't trust that for whatever reasons
>>
>>101246662
You don't want to know. It's basically a case where the client wants it.
>>
do you use AI assistance in the editor? which one? I have concerns about copilot because fuck github
>>
>>101246903
bla bla bla cryptography this and that...

In short, you can't; you'll simply have to trust that nobody changes "your" address at the registrar.
>>
We still use phone numbers for christ's sake. Why do we need domain names? Get a static IPv4/6 address and start making people save addresses and bookmarks like they used to!
>>
>>101247464
>Looking to buy cheap [things]? We've got cheap [things]!
>Just visit 216.58.201.110. That's 216.58.201.110.
I don't think you'll get many visitors
>>
>>101247397
So unless my domain registrant fucks up I should be reasonably safe? Do I still need a "dummy" web page if I want just use my domain for email?
>>
>>101247597
Radio ads? Zoomers don't listen to the radio.
TV ads? QR codes.
>>
>>101242462
oftentimes when you see shit like this it's either minified code and/or it's a bit of generated API code that you're not really meant to understand-- you're supposed to just copy and paste it into wherever the API says to paste it
>>
>>101242705
you dont need a completely separate service just to cache data. just save the data to a runtime variable on your server so you can access it later lol. literally just
let storedData = queryResults;


if you want it saved on the user's end, you can store it on the user's browser. i dont see why you would need anything more than this
>>
>>101247302
no because you need to proofread the AI anyway and in the time you spend doing that you may as well have just written the code you want correctly the first time around
>>
>>101247667
>Just scan this QR code!
Okay let me just get my pho- oh the advert has ended
>>
File: ungarbled.png (29 KB, 579x307)
29 KB
29 KB PNG
>>101242503
>>
File: 0d8-776956208.jpg (33 KB, 600x493)
33 KB
33 KB JPG
>>101247951
>he cant memorize a simple QR code
>>
>>101248143
My achilles heel
>>
File: file.png (2.77 MB, 1250x833)
2.77 MB
2.77 MB PNG
I'm torn between Flask, Django or FastAPI

Currently working on my computer science thesis. I have to create a RESTful API in Python for serving an ML model, as well as handling user registration and login, and support for non-relational data (MongoDB for example). I also like to have clean, modular code that is easy to maintain and test.

I can’t really decide between the frameworks.
I think it’ll either be Flask or FastAPI because Django is more focused on full-stack development and has bad support for non-relational data from what I’ve read.

Curious to hear your thoughts.
>>
>>101245689
With 4chanX, it's under the post's arrow menu. On desuarchive/archived.moe/etc, you click the "view same" button on posts with images
>>
>>101247893
Hey anon you seem knowledgeable, my use case is a bit different than his, I'm trying to implement a sort of memory system for my rat neuron + arduino based sensor, I'm storing a fuckload of data from the sensors in psql atm, but I'm trying to find a good solution to search through this data for relevant bits, would elasticsearch work for me? I don't think redis would be a good choice since I would need a fuckton of ram.
>>
>>101249103
django has a built-in user registration/login/etc. system that you can very easily use. idk about the others but figured id throw that out there
>>
>>101250054
i agree with this anon, django is great especially if you're fine with server-side rendering and don't need to make a SPA
>>
>>101249277
what's stopping you from just writing normal SQL queries? it's pretty easy to do and a lot more efficient to just straight up execute a query than go through some separate framework that ends up doing the same thing
SELECT * FROM DataTable WHERE (col1 > 0 AND col2 = 10);
>>
bump bloody



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