[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


Thread archived.
You cannot reply anymore.


[Advertise on 4chan]


File: maxresdefault.jpg (110 KB, 1280x720)
110 KB
110 KB JPG
Do you prefer fixi.js or HTMX?
https://github.com/bigskysoftware/fixi

>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, MySQL, etc.
link:: https://my.website.com
repo:: https://github.com/user/repo
progress:: Lorem ipsum dolor sit amet

Previous: >>106741639
>>
Fresh thread, feels nice.
>>
What's your process for generating a sitemap?

I'm thinking about using a sitemap index file because the website I'm building with have almost a million pages.
https://developers.google.com/search/docs/crawling-indexing/sitemaps/large-sitemaps
>>
Fixi because it's easy to customize exactly for my needs
>>
Don't you 404 on me!
>>
>>106790868
>website I'm building with have almost a million pages.
that is disgusting
>>
Those aren't real. All this shit is fake
>>
HTMX is gay
>>
react is gay
>>
>>106793348
I bet it's AI slop description for every topic to abuse SEO
>>
>>106794367
i can think of personal use cases that could become 100,000 pages and actually provide some value. but it does seem like that.
basically turning database details into a specific call to show you all the relevant details and how things are related in organized structured ways. you'd have an individual page like 100,000 categorized items in the db
>>
>>106793348
>>106794367
>>106794382
It's not AI slop. I have scrapers that scrape info about certain products 24/7 and then I aggregate that data into product category pages and product pages. I will expand the scope of the products I scrape if it's successful and the website will then end up having several million pages.
>>
bump
>>
>>106794466
>the website will then end up having several million pages
It will have two pages:
Frontpage
product page, with dynamic content.
>>
>>106790821
>htmx
deprecated by datastar
>>
File: darkmode-polls.gif (47 KB, 361x253)
47 KB
47 KB GIF
:: kothakotha ::
dev:: blessbrah
tools:: Spring, Angular, MySQL
link:: https://www.kothakotha.com/
repo::
progress:: Now available in dark mode. Added markdown for polls and infinite scrolling. New category added for announcements.
>>
File: draw pad transmission.webm (727 KB, 1738x864)
727 KB
727 KB WEBM
draw pad for some reason (and you can save and send drawings)
>>
>>106796393
thanks for drawing me :-)
>>
which browsers do you guys use mainly for developing and surfing?
>>
File: 1759179667802905.jpg (67 KB, 600x450)
67 KB
67 KB JPG
>>106796417
You are handsome like me!
>node image scraper using bing images
https://github.com/wormpilled/bing_image_scraper
>>
>>106796473
Surfing: Firefox because I can use uBlock Origin (now banned from Chrome)

Developing: Chrome, because that's what most users will be using. I can check how my site works in Firefox as well I guess but mainly I care about how it works in Chrome.
>>
>>106797780
thanks
>>
how do you track pageviews
>>
>>106798225
dumb questions treads is down the catalog
or ask grok
>>
>>106798300
your life means nothing to me
>>
>>106798300
I fucking hate you.
>>
>>106798225
>get request
>read counter.txt
>write counter++
or use google analytics to give your data to the great judeojeeteo empire
or use an open-source alternative like matamo, plausible, posthog (no idea if they're good)
>>
>>106798932
...sooo, what did grok say?
>>
>>106798225
Write to a db each time someone requests a page.
>>
>>106799157
redis db are the most efficient for this shit
>>
>>106799161
Valkey is more performant.
https://www.youtube.com/watch?v=9hDvWVJtljE
>>
>>106799161
>>106799493
SQLite is going to be enough for most apps. Start with SQLite and move on to Valkey if you have a lot of users.
>>
>>106799493
That's like saying
>uhm ackshually you mean Percona / MariaDB not MuhSQL
Obviously everybody means Valkey in 2k25 when they say Redis.
>>
> 3 tips for setting up a sitemap
Good video if you're working on setting up a sitemap for a large website.
https://www.youtube.com/watch?v=zLKuG0C7dUw
>>
File: Google-flutter-logo.svg.png (12 KB, 1024x293)
12 KB
12 KB PNG
Any of you tried Flutter? It can be used to make web apps as well as desktop/smartphone apps
>>
>>106799529
SQLite everything until you need more
>>
>>106801110
>made by google
>uses a special snowflake programming language for literally no reason
>in the process of being killed as expected
Yeah I never got my hopes up
>>
>>106801110
useless when react native exists
>>
File: me.png (60 KB, 218x298)
60 KB
60 KB PNG
You can serve static pages with PowerShell:
$listener = New-Object System.Net.HttpListener
$listener.Prefixes.Add("http://localhost:8080/")
$listener.Start()
Write-Host "Listening on http://localhost:8080/"

while ($listener.IsListening) {
$context = $listener.GetContext()
$request = $context.Request
$response = $context.Response

$message = "<!DOCTYPE html><html><head><title>test</title></head><body>hello world</body></html>"
$buffer = [System.Text.Encoding]::UTF8.GetBytes($message)
$response.StatusCode = 200
$response.ContentType = "text/html"
$response.ContentLength64 = $buffer.Length
$response.OutputStream.Write($buffer, 0, $buffer.Length)

$response.OutputStream.Close()
}
>>
>>106801567
You can use bash as well.
>>
As an aspiring front end dev, what should I get into besides HTML, CSS, JS, React and all that, should I get into designing in Figma?
And if I want to transition to more back end stuff, what should I get into?
>>
>>106802905
I do this for hobby and I just use pen and paper to sketch out a rough draft then fiddle with CSS until I like it
>Figma
I would assume it's only useful for demos, not actual development so a good skill to have but not essential for a noob
>>
>>106802905
Start by learning HTML, vanilla CSS, and vanilla JS. You don't need to use React (and it's kind of bloated) but knowing vanilla JS will be very helpful if you end up using React later. It's better to learn the "foundational technologies" of the web platform like HTML, vanilla CSS, and vanilla JS. Learning how Linux works and how to set up a VPS with e.g. a Caddy server is also useful. This is evergreen knowledge. React is a tool (JS library) that uses some of these foundational technologies. This is also the reason why you should learn some vanilla CSS first instead of immediately jumping to something like Tailwind (CSS framework). And modern vanilla CSS is really good, so you don't even need something like Tailwind.

>should I get into designing in Figma?
You don't need to think about Figma now. Start by learning HTML, vanilla CSS, and vanilla JS. You can use Figma later if you need to.

>And if I want to transition to more back end stuff, what should I get into?
Go is a good choice. It's simple but still very performant and the tooling is great. It's the most performant garbage collected (GC) language. GC means that you don't have to manage memory manually (allocating and deallocating memory in the programming code) like in C, C++, or Rust.

I think you should start with creating a simple website using Go (just use the standard library) and HTML templates. So each endpoint (for example: /home) returns some HTML page (which is represented by a HTML template in Go) using a handler function. You can put your vanilla CSS inside of <style> tags in the HTML template and any JS code inside of <script> tags in the HTML template. Run it on localhost on your computer and play around with it.

Here is a good video about building a simple website in Go. Don't worry if you don't understand all of the terminology. The best way of learning is by building and you'll learn more and more over time if you build stuff.
https://www.youtube.com/watch?v=H7tbjKFSg58
>>
>>106803201
>https://www.youtube.com/watch?v=H7tbjKFSg58
*just change it so that the handler functions for the different endpoints return HTML templates. Also stick to using SQLite as your database. It's great, simple, and surprisingly powerful.
>>
>>106803070
>>106803201
>>106803336
Thanks a lot for the tips and resources, really needed it, I've actually been into this for a while, I'm already pretty familiar with HTML, CSS and JavaScript but I wouldn't consider myself to be good enough to do it all from the top of my head without googling or AI, at least when it comes to JS logic
The reason it's been taking me quite long is because I'm winging it, don't really have any guidance, also I tried getting into 3D modeling and animation for a couple of months earlier this year due to a college course but dropped it and returned to coding, and also kinda wasted a lot of time on freecodecamp and codewars instead of actually doing front end stuff
I'm currently doing front end mentor challenges because I don't know what else to do, also understanding how git works and all that

I will look into Go as well, that seems interesting
>>
>>106803512
Go is a good language for a beginner imo, it's simple but you also understand exactly what you're doing without too much magic. It also have a very healthy eco system for the web, I recommend sticking to the standard library net/http and html/template for your first project.
>>
>>106802905
svelte
react is a bloated dinosaur
>>
>>106801567
Thankfully I don't use Macroshit Wangblows
>>
>>106801567
interesting ngl
>>
>>106801567
bash babbies BTFO
>>
https://www.reddit.com/r/programming/comments/1nyzrgk/the_real_cost_of_serverside_rendering_breaking/
Why are reddos shitting on this guy? 20ms for rendering and 100ms for a complex sql query makes sense
Sure you could squish that 20ms to 2ms with something like rust but 20ms on js sounds about right.
And i know for a fact that ppl saying rails does 10ms are lying. Rails will easily add 2 to 300 on top of your sql timings.
>>
>>106790821
https://github.com/wormpilled/schizoposter
>>
File: 1750212074585586.png (61 KB, 830x481)
61 KB
61 KB PNG
>>106806042
forgot pic
>>
Nobody in this industry is ever going to give me a job despite my many applications. Fuck's sake.
>>
I'm trying to wrap my head aroudn programming in TypeScript
Like I'm used to thinking about programming in OOP style or in struct with functions that operate on the structs
But TypeScript seems to be about setting boundaries for very abstract types and then writing functions that can safely assume what things are without too much validation or something like that
But then you also have interfaces and classes and generics and unions and intersections and inheritence

Please help
>>
>>106806944
Liar
>>
>>106790821
I prefer HTMZ
>>
>>106806944
It's kinda like java-lite
>>
>>106806890
Start your own company. Here's an idea: scrape some data and build an MCP server.
>>
>>106808224
To be honest maybe I should be less lazy and try to freelance
>>
>>106809453
Yes. Create your own work. Don't depend on others.
>>
Any europoors around here working with US companies? I have a job offer that is with a good stack and cloud stuff(which I wanna do but lack experience). The pay is good too, however I’d have to work on their time which is basically from 10 in the morning to 7 in the evening.


Now I’m sadly accustomed to classical 4-6 hours a day working with Germans. Do Americans have a stricter work culture or can I piss off work at around 5 as usual? I know some meetings will be starting at 4 my local time.
>>
File: 1736593119494463.png (160 KB, 1296x828)
160 KB
160 KB PNG
Not a web developer here who doesn't enjoy web development. From a web developers perspective how retarded and or autistic is it for me to use PHP to dynamically serve a page based on the contents of a json file

picrel
>>
>>106811415
>europoors
Bro, get some self-respect.
>>
>>106811623
As long as you can cache and reuse the generated page
>>
>>106811623
It's not ideal but that isn't a very big json file so it's not the end of the world. Consider using SQLite though. SQLite is really easy to use and it's very performant because it's an embedded database. Fun fact: SQLite is even faster than the file system. You could also cache the page on a CDN if performance is important.

In short: It's not great but it's probably ok.
>>
>>106811676
He's not sending the json file. How does the size matter?
>>
>>106811697
I'm assuming that he needs to parse it for each request.
>>
>>106811715
It doesn't appear to have any variable data, doing that would be terribly inefficient. Hopefully he's not doing that.
>>
>>106811731
>doing that would be terribly inefficient. Hopefully he's not doing that.
Yes, it's not good obviously. I assumed that he was doing that though. Certainly not how you should do it but it's not the end of the world as long as the json file is pretty small.

Using SQLite and rawdogging some SQL is a much better way of doing it. LLMs can also help with generating the SQL. You can use something like SQLC if you want to get fancy and if you use Go.
>>
>>106811769
You can stop sucking off SQL. For that little data it'd be the same as keeping the in json in memory.
>>
File: 1753734974870273.jpg (63 KB, 582x700)
63 KB
63 KB JPG
>>106811673
>As long as you can cache and reuse the generated page
Why exactly is this important?
The json config is stored on the web server
>>106811676
>It's not ideal but that isn't a very big json file so it's not the end of the world
its smol for testing atm but i'd like to have more menu items with different functionality eventually. This was just bare minimum for emergency purposes while i was out of town
>>106811715
>I'm assuming that he needs to parse it for each request
so there is a default file locally that is a fallback but before using the default, it sends a request to a flask api for the json file with the idea being that the webpage can change depending on user actions or permissions but i havent gotten to that yet.

Currently security/authentication is handled by my Firewall with the idea that the webserver used is also dynamic and can change depending on who logs in
>>106811731
>It doesn't appear to have any variable data
wdym, the page is generated from the contents of the json. If you remove the json then there is no html to display
>>106811769
>>106811785
I'll look into sqlite but i was mainly interested in using it to store credentials, I'd don't think i'd use it for the json since the api can change it and give it to the PHP on the fly
>>
File: walkout.gif (2.19 MB, 640x352)
2.19 MB
2.19 MB GIF
I give up.
>>
>>106811623
pretty easy desu, this really just involves:

- json decode
- run a for loop on the "content" key
- match statement against `content[i].type`
- create a bunch of html templates based on the content type and echo them in the match statement
>>
>>106811623
It's perfectly fine to store this in json.
>>106811807
Don't worry about performance and such if it's not necessary for your use case. If a simple solution is good enough, use it.
>>
File: 1728407029510674.jpg (96 KB, 976x850)
96 KB
96 KB JPG
>>106812204
Do gangstalkers force your web application to stop loading?
>>
File: tarantula-crochet.jpg (393 KB, 1536x2048)
393 KB
393 KB JPG
I'm wondering how everyone is doing out there nowadays. I'm in the States specifically Seattle WA, and I've been having trouble finding work for the last 2-3 years after 8 YOE. I've made it into many interviews just can't wow them like I could before, tighter guidelines, more expectations perhaps, doesn't matter I'm not making it in. I want to know how your guy's experience is working lately, are your teams short staffed, are things hunky dory and you're chugging along, how's it all going out there?

Also am I just retarded? I've been referred and failed as well, so I'm feeling a little bummed out. I've got too much experience to be a security guard or a retail worker because they're afraid I'm going to quite but I can't land any position even if I undersell myself.
>>
>>106812475
I'm also in Seattle WA still a student, currently working on learning Go and making a change clone. I hope that's enough to not starve to death!
>>
>>106812475
australia, 10 yoe, currently at a 3 man startup and got a 50% raise by joining.
trying to hire a third dev (so output isn't cut by 75% if i'm ever away) has been miserable. both juniors and "intermediates" just completely relying on AI and still fucking up my basic typescript/nextjs exercise.
honestly it's a little horrifying seeing how bad the """talent""" is out there but also gives me a bit of hope in that my career is secured for a while longer
>>
File: movies and tts.webm (685 KB, 1100x1100)
685 KB
685 KB WEBM
TTS keyboard on screen, and sendable videos
>>
>>106812475
also seattle area, similar problems.
>>
File: 1759710946248971.jpg (6 KB, 187x250)
6 KB
6 KB JPG
>>106812244
>you'll be dead soon
Did them niggas really just say that for ong
GYATT ZAYUM
>>
>>106812475
>>106812964
I'm in the UK and trying to get a junior job. LinkedIn gave me a free trial of Premium and that allowed me to see how many people were applying for each job. For many jobs it was hundreds, and sometimes over 1,000.
>both juniors and "intermediates" just completely relying on AI and still fucking up my basic typescript/nextjs exercise
Interesting. Maybe I shouldn't be too discouraged then - hopefully many of the applicants I'm competing against are awful.
>>
>>106812475
2. something yoe
making money relatively speaking, I can't complain, but can't sleep either, don't want to see myself looking for job in this market, so I grip on this one hard
>>
>>106812964
Grim or not, the future involves a lot of AI code generation. I think people are going to rely on it too much though, which will lead to a lot of bad software. The really grim part is that a lot of people let the AI take architectural decisions.
>>
>>106816134
i don't have a problem with AI usage, i do a lot of my work through claude code nowadays. the problem is when people blindly commit what it outputs with no regard for quality or established project convention.
in the exercise i've been giving people, i explicitly say AI usage is okay but it needs to be responsible and methodical. yet all people are doing is pasting the instructions into copilot/cursor and handing me the slop it generates.
>>
>>106816177
Yes, I agree. You need to write tests as well. TDD is needed if you're going to use AI code generation imo.
>>
>>106796345
Added shareable links to replies.

https://www.kothakotha.com/miscellaneous/thread/b/reply/f
>>
>>106813096
killing it
>>
File: 139.jpg (19 KB, 480x357)
19 KB
19 KB JPG
>>106793013
soul, save it this time, this meme is probs15 years old + at this point if not more
>>
File: 1734105879747813.gif (335 KB, 550x600)
335 KB
335 KB GIF
r8 anons, was this an organic or a shill-post?
>>106791555
>>
>>106818812
100% shillpost
I see the exact same "$product solved my problem" in every store's review section
>>
>>106818812
I'm OP and I didn't make that post, so it's organic.
>>
>>106818812
Shill, Fixi sounds extremely tranny
>>
>>106819222
>>106819564
>>106819568
we should launch a request on that endpoint
>>106791555
explain yourself
>>
>use htmx
>use svelte
>use some other flavour-of-the-month framework
Thanks, but I'm still sticking with React.
>>
>>106819568
Fixi is just HTMX lite. It's literally like 90 lines of JS. It just makes it so that you don't have to write a bunch of JS functions that calls the backend. You still have to write JS to handle state on the client.
https://github.com/bigskysoftware/fixi/blob/master/fixi.js
>>
>>106820892
I like the concept, but 2bh, sounds like it solves a literal non-issue to begin with
>>
>>106820906
>it solves a literal non-issue
It reduces the amount of JS you have to write.
>>
>>106820914
but you have to write very little js to begin with, that's my point
>>
>>106820914
It's very easy to write `const response = await fetch(`${baseApiUrl}/thing`)` and stuff like that. No need for some meme framework like HTMX or Fixi or whatever.
>>
>>106820929
>>106820950
Fixi is easily extendable though, because it's so simple. You can even do it yourself; try that in React or HTMX...

For example, get infinite scroll by add this.
// fixi intersection events extension
document.addEventListener("fx:init", (evt) => {
let trigger = evt.target.getAttribute("fx-trigger")
if(trigger === "intersect") {
let obs = evt.target.__fixi_ob = new IntersectionObserver((entries)=>{
for(const entry of entries) {
if (entry.isIntersecting){
// done observing, remove
obs.unobserve(evt.target)
evt.target.__fixi_ob = null;
// trigger event
evt.target.dispatchEvent(new CustomEvent("intersect"))
return;
}
}
})
obs.observe(evt.target)
}
})


And here is active search.
// fixi event debouncing extension
document.addEventListener("fx:init", (evt)=>{
let target = evt.target
// if this element has the debounce extention
if (target.hasAttribute("ext-fx-debounce")){
// add a listener for the fx:inited event, when the __fixi property is available
target.addEventListener("fx:inited", ()=>{
// remove the default listener
target.removeEventListener(target.__fixi.evt, target.__fixi)
let debounceTime = parseInt(target.getAttribute("ext-fx-debounce"))
let timeout = null
// install a debounced version that delegates to the default listener
target.addEventListener(target.__fixi.evt, (evt)=>{
clearTimeout(timeout)
timeout = setTimeout(()=>target.__fixi(evt), debounceTime)
})
})
}
})


You can do this writing JS yourself, but you're going to have to write a lot more code.
>>
>>106821294
that's cool I might give this a look, those two are, I think relatively complex things to do by yourself
>>
File: y1237.png (41 KB, 1482x598)
41 KB
41 KB PNG
>>106819870
>React
last time I went to React's website they told me to use NextJS

just the ABSOLUTE state of web development
it's a fucking disaster because of faggots like picrel
you just can't rely on anything to be stable for the long-term because who knows if Netanyahoos are going to buy them or private equity, etc
>>
File: images (41).jpg (17 KB, 640x360)
17 KB
17 KB JPG
>>106820929
But I like JS



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