AlpineJS (+ you're a lazy asshole for not making a thread already) edition>Free beginner resources to get started with HTML, CSS and JShttps://developer.mozilla.org/en-US/docs/Learn - MDN is your best friend for fundamentalshttps://web.dev/learn/ - Guides by Google, you can also learn concepts like Accessibility, Responsive Design etchttps://eloquentjavascript.net/Eloquent_JavaScript.pdf - A modern introduction to JavaScripthttps://javascript.info/ - Quite a good JS tutorialhttps://flukeout.github.io/ - Learn CSS selectors in no timehttps://flexboxfroggy.com/ and https://cssgridgarden.com/ - Learn flex and grid in CSS>Resources for backend languageshttps://nodejs.org/en/learn/getting-started/introduction-to-nodejs - An intro to Node.jshttps://www.phptutorial.net - A PHP tutorialhttps://dev.java/learn/ - A Java tutorialhttps://rentry.org/htbby - Links for Python and Gohttps://quii.gitbook.io/learn-go-with-tests - Learn Go with Tests>Resources for miscellaneous areashttps://github.com/bradtraversy/design-resources-for-developers - List of design resourceshttps://www.digitalocean.com/community/tutorials - Usually the best guides for everything server related>Need help? Create an example and post the linkhttps://jsfiddle.net - if you need help with HTML/CSS/JShttps://3v4l.org - if you need help with PHP/HackLanghttps://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.ioSubmit your project progress updates using this format in your posts, the scraper will pick it up::: my-project-title ::dev:: anontools:: PHP, MySQL, etc.link:: https://my.website.comrepo:: https://github.com/user/repoprogress:: Lorem ipsum dolor sit ametPrevious: >>106619601
>want to learn PWA>decide to make something simple with vite>look for an API to show some content>ultimately decide to use 4chan API>find out you can't use it for shitSo apparently only requests coming from within 4chan itself, outside of the browser or from a proxy will work. Why must browsers cuck me so much with their CORS jewery?
>>106687188I applied for a job which used Alpine but they rejected me. Bummer.>>106687371You could just find another API.
Which is /g/ web devs preferred git service, github or gitlab?
web call
>>106687556Source? I'll apply.
>>106688337what are we seeing there pham?
>>106688822it's a webrtc chat app with continuous clipping and reactions with audio notes (the bubble trees)you can scroll through the audio for 30 minutes and clip up to 5 minutes into a bubble.
>>106688077I have accounts with both. Most of my repos are on GitHub but I pushed a couple of the best ones to GitLab as well. I might push all my repos to GitLab so that if GitHub loses all my data somehow then I'll have another copy.
I love my users, even if they sometimes fight like little kids or get stubborn as teens, i still appreciate them
>>106688077GitHub, it's more of the social media of coders anyways which is better for job prospects/building your portfolio
>>106690265This, I love every shit poster that visits my service
what orm do you guys use for nodejs?I am new to webdev and wanted some thoughts on orm choicesAlso what about logging? is there a common consensus or recommendation on logging ingestion?
>>106691829>I am new to webdevstop asking gay fucking senior tier questions that are focused on optimizing and just make stuff you procrastinating fuck
>>106691829i might be stupid but i decided to use kyseley instead of ORM for my mid-size project.
>>106692220was that a lot of work?query builder doesn't help you with database connection and other things right?
>>106688337blockforests
>>106691281why is github better for building a portfolio? I can link to my gitlab projects the same as I would on github. doesn't make sense.
Deleted my entire DB by mistake, i guess it was bound to happen. I had to restore and i've spent since then rebuilding part by part everything that was done today. Now i run backups every 8 hours, and a master backup that runs every hour or so, on different drives too just in case
WHY WON'T ANYBODY FUCKING HELP ME
>>106688337can comments graph upwards and towards other branches?
>>106694085link to your post
>>106693399gitlab is rarely used in companies I believe
>>106693895>Deleted my entire DB by mistakehow exactly?fun fact, dropping relational tables completely (not at db level) can be quiet a complicated task, you have to drop foreign keys from cross referencing tables or it won't let you drop the tables
>>106694085because this isn't chat.com, go there if you want to ask your useless nigger questions
>>106694085Why do you think we should help you for free? Are you going to help us for free if we need help in the future? No you won't. So fuck off. /wdg/ is for web devs who do their own work instead of expecting free help from strangers.
>>106695216nta, I've been helped and also helped "for free" countless times, you fuck off
>>106695319I think you might have meant this directed at me here: >>106695291I just dislike people who turn up here without making any effort to solve their problems by themselves. When I have a problem I go and RTFM in order to solve it. Surely a big part of programming for any programmer is the ability to look through documentation and find answers to your problems. Some people seem to come to /g/ expecting to be spoon fed answers without them putting in any effort themselves.
>>106696194sometimes the documentation doesn't have the answer to begin with, that's when I asked for help and got itand some times writing short scripts, etc, I just even find enjoyable, I do it during work time even, to keep learning (writing short scripts, not helping people here)some of you either forgot or didn't get to know that we're supposed to be brothers hereI don't disagree with RTFM, but c'mon you guys don't even know his question to begin with
vanilla js, but if it had everything you wanted it to havedescribe it
>>106697324support for big numbers including decimals, official and well supported web3d implementation, canvas becomes flash for real
>>106694132not really
>>106697651that'd be the simulation of a 4chins comment, I'm thinking, a thread even
>>106694889This is why you never hard delete and instead do soft deletes only
>>106698047I was talking about tables not registers, but similar thing happens with registers too
What's the best data structure to represent a 4chan thread? I was thinking of a Map since it's fast and behaves well when deleting mid stack
>>106698738An array you dumb gorilla nigger.
>>106698984Explain your reasoning like a white man
>>106694889Users reported a network error, i wanted to copy the DB to my local testing machine, i did it in the wrong order and pasted my testing DB on the deployed machine, then i panicked hit a few CTRL+z, almost lost some scripts i had made, and i ended up having to resort to my backups, all due to introducing a sound for when clicking as users requested.
>>106699017>all due to introducing a sound for when clicking as users requestedhilarious
>>106699017>copy pasting a dbgui or command line, are we talking about SQLite?
>>1066987381. I don't know2. let me theorizeapparently objects have faster look up time than arrays, while maps have faster look up time than objects, the drawbacks I don't knowa linked list over arrays? I'm asking kek
I've been tinkering with FastAPI for about 3 days now and I've spent most of that trying to add react as a front end but it seems impossible right now. I managed to get HTMX going which seems enough if I wanted to throw something basic together but I wanted to try out React and Tailwind instead because I've seen them mentioned a lot. I've spent all day trying to get it to work.I've also been trying to get the FastAPI/React template in the FastAPI docs to function but what's driving me nuts is that I can get the front end functional but now the backend wont even install the requirements it needs to work and every time I want to do something it feels like I have to install 3 other things to install something else. I know fullstack is difficult but I feel like such a brainlet that I cant even get the template to work.Im trying to do this with FastAPI because I'm most familar with Python.
>>106699200Well I chose maps because they are id based (key) just like posts so I would be able to effortlessly look for a post just by using posts.get(123); and another reason is the fact that arrays leave empty spaces when you delete an element.At first I thought of a java queue but it's not like a post is always deleted at the end. Maybe it would make sense for sticky generals with a fixed limit of posts per thread but that can simply be handled by a cleanup routine that compares the current thread with what an endpoint returns.A possible drawback would be the fact that if you delete an element at the top and then re-add it it will end up at the bottom so the sequential order of ids would be lost. Unsure if that can technically happen on 4chan
>>106700659>>106698738For what purpose? I'd just store them as a list and order by id when selecting them. I think their order is more important. You can build a map of the relationships between the posts in a thread pretty simple from the base thread data.>if you delete an element at the top and then re-add it it will end up at the bottom so the sequential order of ids would be lost4chan style IDs don't have this problem, and 2ch style threads (with post numbers going 1-1000 in every thread) will keep deleted posts but remove their content. Rely on ids for order.
>>106698738It doesn't fucking matterthreadId timestamp content
>>106697687I have a different plan to implement something similar, but yes I agree with the logic, I just have a different idea I want to chase
>>106699171GUI, Indeed SQLite. I should've seen it coming since i stopped my local server, as otherwise it complains about the active connection, but i thought it was bugged or just didn't thought about it so i tried it a few times, which was not good. I'm going to just make a script hat will ask me to be extra sure which side i want to make the transfer from and to of the DB's
What is /wdg/'s favorite CMS? Every body says nice things about Ghost but I want a second opinion.
>>106703216check payload
>>106700845A map preserves the order in which elements are added so there's no need to order them>For what purpose?None for now. Just a mental experiment I started when I was in line for a medical examination yesterday>>106701290I've seen cases of posts made at the same time listed like>20:00:00>19:59:59>20:00:00>20:00:01so I am not sure if a timestamp is really reliable
>>1066989861) 4chan threads are chronological, easily represented with an array2) Deleting in the middle of an array is fast for a thread, and is rarely done to justify any more complexity
>>106701651I love the way these behave, the movement, so nice
>>106703686>A map preserves the orderI see, so that should be okay as long as you render server-side, but if you think in terms of simple data structures supported by JSON, I don't think I'd rely on the data being serialized and deserialized in the same order.>not sure if a timestamp is really reliableIt isn't unique, so no.
>>106703686>A map...your database?
>>106704616anon might be trying to do a in-memory idk, whatever problem he's having doesn't exist if you use any SQL database lol
>>106703686>A map preserves the orderThat is implementation specific and not a guarantee
>>106703216if it's not too complicated, make your own
>>106702201>make a scriptyeah brub, guis are not to be trusted, if the db doesn't weight too much, you might consider dealing with it in git
>>106705051The complete lack of LTS is literally my only gripe with DotNet. What the fuck were they thinking
>>106705094I think .NET does have LTS versions though. The current LTS version of .NET is version 8. The current non-LTS version is 9. The upcoming release will be the next LTS, version 10. So I guess they alternate between non-LTS and LTS versions.https://dotnet.microsoft.com/en-us/download
>>106705218No, they have a version they call "LTS", which is supported for 3 (THREE) years. 3 years is not LTS. LTS stands for Long-Term Support.
>>106705349>.NET 8.0>Long Term Supporthttps://dotnet.microsoft.com/en-us/downloadFine they don't support it for as long as you wish but it's still Long Term Support, it literally says so
>>106705516It's not LTS if it's only 3 years. Don't bother with .NET because it's a shitty Microsoft product masquerading as open source. Use Go instead. Go code written 10 years ago still works fine. And Go is simpler and more performant than .NET.
is Laravel/Symfony any use for personal hobby projects? I feel like it's made for making sovlless corpo CRUD over and over and your project doesen't have any "identity" so to say if you use these frameworks. Am I right?
>>106706928Most applications are CRUD over and over in different forms. It doesn't have to be soulless, but that part's up to you.
Why bother with heavy frameworks? Just do this for every endpoint/url in your webside or web app:>one that is 'full page' and that has everything, all HTML/CSS/JS>one that is AJAX and that only includes the HTML/CSS/JS that changes between pages (on the same website). So for example not including the 'website header - e.g. logo, nav, search bar...Set a value in the header of the request to indicate if it's an AJAX request. So they would have the same url and handler function (or you could use different handler functions if you want to). Just execute a different HTML template depending on if it's an AJAX request or not.If you go to the page from another page on the same website, then you use the AJAX version and only the HTML/CSS/JS that changes is sent. If you go to the page from lets say some random link on another website, then you get the full page.This is going to be the most performant type of website. You can also lazyload content below the fold to speed it up even more (to make sure you keep each request below 14kB after compression), and include the CSS inside of <style> tags so that it loads faster.
>>106707861Already do that. HTMX and AlpineAJAX (I think) set a header for you. What I do is have one handler function, and 2 private methods one to render a full page and another that only renders the resource. I also made one handler server HTML, JSON, and XML. Based on the accept header I would decide what render function to use. Useful for RSS feeds and for scripts/bots depending on what you need.
>>106707936Nice.
>>106707861>>106707936>>106708056You might have to add from which page you're coming from for the AJAX request. For example, you might have this on your website or web app: page_1 --> page_2 and page_3 --> page_2 (where '-->' is a link that uses the AJAX request part of the handler function for that endpoint). And page_2 and page_1 share a header and a subheader but page_3 might not have that subheader. So you don't need to send the HTML of that subheader if you go from page_1 to page_2 but you will have to send it if you go from page_3 to page_2.
>>106705516It says so, it's just not what that word means. Look at Oracle's support for Java if you want to see what an enterprise system should mean by LTS.
bump
single page apps were a mistake.The number of fucking websites that don't work properly anymore trying to maintain state between things slower than you can navigate around them and getting caught on a page you aren't supposed to even be on according to the URL is too fucking high.
>>106710045This >>106707861 >>106708127 is the solution: Faster performance than SPAs and doesn't easily break because the server is actually returning HTML that the browser is really fast at rendering.
>>106710045spas are very fucky, maybe, browsers should step up around them, same as search engines, because it BTFO's having to reload a page or loading a different page
>>106707861sort of this was what old school you throw so much shit at ideal way of doing itin other words, just build everything html css, it should "work" at every url, then implement a js layer on top, main reason why they did this was because "but what if they disable js", which is completely alien line of thought to today's web worldor put in simple terms,
>>106710555>"but what if they disable js"Some browsers don't even support js (like pre-smartphone mobile browser applets)
>>106710595give me a % of total users of a normal corporate web that sells shitmany users used to disable js, back in the days, corporate decision was "lol fuck 'em", because %
>>106687188gentlemen, are there any free and good face recognition apis or libs that work entirely on the front end that you guys recommend? I have been tasked to create one of those proof of life apps but I never worked with that shit before. Got to be one where the use needs to blink and turn his head in different directions to prove he is a real person kind of thing.
>>106710720Show them this and tell them it's a waste of developer hours and money
>>106710720>face recognition>work entirely on the front endThis is how face recognition is done:>put a bunch of images into a vector db using some embedding model>run the image the user is searching with through the same embedding model and find the most common images using similarity searchYou can't do this in the browser obviously. You need to talk to your backend (that has a vector db, which can be Postgres for example). Unless you are talking about only consuming some API? That is also a bit complicated because of privacy laws (GDPR). It's a big no no at the company I work for anyways.
>>106710815>Unless you are talking about only consuming some API?yeah. are there any free services that do that? i know there are paid ones but since they want something like a proof of concept I can't really pay for any of that.
>>106710045im making a single-page imageboard. currently there is just one variable in state so it works easily but we'll see how it holds up later on.
>>106710868>any free services that do that?I don't think.
>>106710932not even as a free trial or something?
>>106710944Look at the footer of >>106710790That logo is a company providing that serviceimage search the logo
fuck angular n*ggers for changing everything every 6 monthsnuke mountain view
Is it just me or software that runs under Java always seems to have memory issues or config suggestions for how much memory to have availableYeah its not limited to Java but it feels like Java programs seems to crash once a week because of memory issues
>>106703446??>>106704944It can't be that simple.
>>106712058i'd say it's way better to just engineer your own for-specific-task CMS, pic related. instead of trying to learn and use some other system, thats trying to do a bunch of "unfocused" stuff.for example i could use letterboxd, IMDB, or other movie watching websites to search stuff, follow genres, directors. i could just find a random stream site and browse it like a cow till i find something i like. or i can put in the effort to make a movie CMS for myself that just does whatever i need and can have a button for torrent lookup or streamSiteA,B,C link from a movie page.its better to make your own platform, easier to fix stuff. just keep it simple and understand its just a tool. move on when the tool works.
>>106687371if you cant bypass this maybe you should just quit
>>106712247sadly this seems to be the way to go. Sure, I'll try but I know I'm going to hate it.
https://www.kothakotha.com/Alright guys, I built (Spring, Angular, MySQL) a very simple anonymous, text only forum inspired by 4chan/Reddit. It supports markdown for formatting. There's even a report system for moderation. Right now there is only one category (like boards/subreddits) on it. Feedback is welcome.
transcripts
>>106713349i visited and said hi
>>106713378well visited
What's /wdg/'s take on .ico vs png in various sizes as favicon?
morning web devs, got a question.do you know of any good and especially open source kanban board web app? I am using gitlab and there I can set up one but I don't want other people to see my kanban, it is not a problem when I put the repo to private but I am going to put it as visible some day and don't want others to see what trash I have written there>>106713592I am using svg, maybe it's bad, I don't know but I like it
>>106713592You should use .ico because all the big websites use that format.
>>106713349Nice. Do you like Spring? I tried and it's okay. It seems a bit bloated though. I also tried Javalin, a minimal Java web framework, which was easier to figure out. But I guess Spring experience is what employers want.
>No Frills, Just Go: Standard Library Only Web AppsGo has such a great standard library:https://www.youtube.com/watch?v=BNSjnUZMXEA
good morning party people.I am a web dev, mostly frontend with JS/TS, React/Next and I want to learn more about the backend and wonder if I should stay in the JavaScript/TypeScript area or learn additional stuff to be more valuable, I thought about Java for the backend. Would this be a good route or is this stupid?
>>106715232for one, examine the job postings in your area, see what's in demand, what requirements, what stacks, salary, overall quality of the job offer etc.
>>106715232I would recommend Go. It's simple, performant, has great tooling, and there's a growing job market for it. But Java is not a bad choice either.
>>106715629nta, how verbose it is when compared to Java or .net? conceptually is what makes more sense, but you know, google is the big satan of the web
>>106713359you're killing it dude, gj, any insight to share?
>>106715731>how verbose it is when compared to Java or .net?It's only verbose when it needs to be, i.e. making errors explicit.>google is the big satan of the webGo is an open source product though, unlike e.g. .net which is something in between an open source project and a Microsoft product.
Just did some work on my shitty website which I'm only making because I thought it might impress employers. Maybe I should have chosen a more interesting project idea.
new OP pic
>>106687188>Trying out Webstorm because some autist recommended it to me in uni (for ThreeJS dev)>404 not found error when running the project>what.exe>check deployment, looks good>wait a few minutes>it works in brave>open the link in Firefox>404 not found!>restart webstorm, wait a few minutes>open in firefox>it works>open it in brave>404 not found!FUCK Webstorm! python3 -m http.server saves the day!
>>106715787>>google is the big satan of the web>Go is an open source product though, unlike e.g. .net which is something in between an open source project and a Microsoft product.I think he's right to be more concerned about Google fucking up any of their products than Microsoft fucking up their main system it's been doubling down on for decades.Both are open source, and neither of those are threatened realistically though.
>>106715741It's a stupid insight; but indignation has pushed me more than the thought of reward.
>>106717818>I think he's right to be more concerned about Google fucking up any of their products than Microsoft fucking up their main system it's been doubling down on for decades.Go isn't a product, it's an open source project. Go hasn't changed a lot while .NET is being changed all the time. Google also has a lot of infra written in Go, so I don't see them fucking it up; it would cause too many problems for them. Go is also used by a lot of other companies, so many big companies have a stake in Go not being fucked up.
>>106718166Pretty much all of those are true about dotnet too. In fact, I'm pretty sure dotnet is more widely used than Go.
>>106714848Yeah, it's fine for what I do. I've used it for work, so it feels comfy for me. Javalin seems interesting, though.
>>106713592ICOs can contain PNGs
hello anons i am new here. ive learned the basics of html/css/js from the mozilla tutorial, what should my next steps be? fancier js stuff? i dont really have any concrete goals in mind as it currently stands, atm i guess these languages are just a bit of a hobby for me. i knew java beforehand, which was helpful for picking up js since a lot of concepts carry over even if the structure/syntax is different; is it the case that java integrates with html/css/js as part of a stack or is that what things like nodejs are for?
>>106719024java is unrelated unless your webserver is running it
>>106719024Java and NodeJS are for the same purpose: running on the web server (backend). It uses the database and gives back HTML to the user.
>>106719024you seem to be just having fun, for having fun I recommend js + canvas, work on 2d animations, mozilla docs can start you iircI'll suggest you one exercise, bouncing ball (which you might find in mozilla under canvas), then modifying it to simulate physics like friction and energy/hieght loss
>>106720320>I recommend js + canvasUsing a canvas would be leaving the realm of web dev for graphics/game dev.Stick to HTML elements and CSS animations/keyframes or start learning the server side of the full stack.
on second thought,learning how to draw charts in canvas or SVG would be a worthwhile experience to avoid depending on an external charts library.