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

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

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


[Advertise on 4chan]


Using pic related to help me with the circle of hell that is service workers edition.

>Free beginner resources to get started with HTML, CSS and JS
https://developer.mozilla.org/en-US/docs/Learn - MDN is your best friend for fundamentals
https://web.dev/learn/ - Guides by Google, you can also learn concepts like Accessibility, Responsive Design etc
https://eloquentjavascript.net/Eloquent_JavaScript.pdf - A modern introduction to JavaScript
https://javascript.info/ - Quite a good JS tutorial
https://flukeout.github.io/ - Learn CSS selectors in no time
https://flexboxfroggy.com/ and https://cssgridgarden.com/ - Learn flex and grid in CSS

>Resources for backend languages
https://nodejs.org/en/learn/getting-started/introduction-to-nodejs - An intro to Node.js
https://www.phptutorial.net - A PHP tutorial
https://dev.java/learn/ - A Java tutorial
https://rentry.org/htbby - Links for Python and Go
https://quii.gitbook.io/learn-go-with-tests - Learn Go with Tests

>Resources for miscellaneous areas
https://github.com/bradtraversy/design-resources-for-developers - List of design resources
https://www.digitalocean.com/community/tutorials - Usually the best guides for everything server related

>Need help? Create an example and post the link
https://jsfiddle.net - if you need help with HTML/CSS/JS
https://3v4l.org - if you need help with PHP/HackLang
https://codesandbox.io - if you need help with React/Angular/Vue

/wdg/ may or may not welcome app development discussion. You can post and see what the response is.
Some app technologies of course have overlap with web dev, like React Native, Electron, and Flutter.

We have our own website: https://wdg-one.github.io

Submit your project progress updates using this format in your posts, the scraper will pick it up:

:: my-project-title ::
dev:: anon
tools:: PHP, MySQL, etc.
link:: https://my.website.com
repo:: https://github.com/user/repo
progress:: Lorem ipsum dolor sit amet

Previous: >>107701295
>>
Any of you guys fucked around with service workers? Just trying to understand how they work is annoying but I think I'm making progress

Basically I want to cache my PWA files so that it feels like a real native app. There's pre-caching, then there's caching on fetch, etc
>>
No replies. Well I guess this thread will probably die overnight.
>>
>>107755282
Played around with it years ago. Read a case study by Starbucks some years ago too that used it heavily iirc. It's okay but you just need to make sure it updates correctly and keep in mind what you cache and what you don't.

It's perfect for mobile-like apps but for everything else I'd just use cache-control headers.
>>
>>107756048
geez didn't know it was already 7 years ago lmao
https://www.youtube.com/watch?v=ZNB-zUR-jU0
>>
>>107755282
You listen to request events and return a response. From there you can use your imagination, like using the builtin cache objects to cache responses to intercepted requests to appear offline.

But you can do anything, issue requests on your own, etc.
>>
>>107754935
Starting new job from march. It's mostly backend with Java but supposedly some Angular too.
I have decent TypeScript and React experience (even worked as a frontend dev for a year). How hard is it going to be to get up to speed in Angular? I know that it depends heavily on reactive programming model, which I've never used in js.
>>
>>107756048
>>107756065
That looks cool

>>107758176
True. I think I will try to follow what seem to be recommended practises from Google around caching, such as versioning the cache
>>
What does webdev even do nowadays? As most solutions can be done using Drag and Drop, woo, wix, squarespace, woocommerce, shopify etc.
>>
>>107758522
Okay lad, make us a Twitter/X clone with Wix. I'll give you 2 hours to get it made and deployed. I look forward to seeing it.
>>
>>107758522
i open cursor and feed it in my daily tasks
code review the output
commit
done
>>
I don't commit, I cumit
>>
Why does making a div with a width bigger than 100vw cause the page to be vertically and horizontally scrollable when rendering this page on a phone? The page is only horizontally scrollable on a desktop.

<!DOCTYPE html>
<html lang="en">
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
</head>
<body>
<div style="width: 120vw;">
Scroll right.
</div>
</body>
</html>
>>
Looking for some advice, anons. I have some time on my hands so I thought I might learn web development. I quite like programming and I would like doing it as a job. What should I learn aside from the basics? I know JS and some Go but I mainly used them to write little tools for myself.

I know that the market is in bad shape and if I go in hoping for a high salary or being hired at all with just a React crud app under my belt I will probably be laughed at so I want to know what can I do to maybe, some time in the future, be hired.

Things may be bad right now but I assure you that being in the rat race for a tech job is leagues easier than doing a normal job in the position I'm currently in.
>>
>>107760324
I got into tech by knowing React and JS on very good level, with a couple of personal projects. That was at the end of 2022, when market was already bad. I managed to transition to backend and now I'm doing backend/devops only using Java/Kotlin and AWS.

If was a noobie trying to get into tech right now, I would absolutely choose Java. It has the largest amount of job postings, which means there will also be a chance for offers for people like you, with no experience.
You can keep Go as your other skill and potentially transfer to it in the future (would be best to get job as Java dev and try to internally transfer to Go projects, if company would allow you this).

I wouldn't recommend doing frontend, unless you truly like it and you're okay with many quirks and downsides of working with JS """people""".
>>
>>107760324
also to add to >>107760428
get certificates. Unemployed people on /g/ will tell you they're not worth it, but they are, trust me. The legit ones I mean, like ones from AWS / Azure / GCP / Linux Foundation.
You have to try to stand out as much as possible from the hundreds of thousands of jeets you'll be competing with.
>>
>>107760428
I know some very basic Java. I could chase that down then. Do you have any advice on projects and whatnot I could do?
>>
>>1077604>>107760445
Much appreciated. The other anon told me to go the Java route and I think it's feasible for me. You know any certificate specific to that?
>>
>>107760462
If you want highest ROI I would go straight to Spring. I would suggest some basic CRUD project in Spring. Like a task management system. That way you can familiarize yourself with Spring Data (Hibernate), practice writing DB queries, and you could add Spring Security with OAuth, if you want to be fancy. Write tests too.
Then you can try writing some applications for the cloud, to showcase that you can actually deploy stuff and know how to wire up different services.

Here are resources I recommend. Don't get overwhelmed though, just pick 1 or 2 and commit.
https://hyperskill.org/categories/2 (very good for doing first projects)
https://dev.java/
Effective java (book)
https://jenkov.com/tutorials/java-concurrency/java-memory-model.html (more advanced for interview prep)
You could look on Udemy for courses on Spring Cloud, OAuth and for some projects to deploy on AWS.

Also feel free to search for stuff yourself. These are just a suggestion. I don't want you to blindly follow my advice, always think stuff through yourself before commiting to learning stuff. Also, talk to Chatgpt about learning stuff / certificates etc. It can help you choose a direction in which you want to take your career.

>>107760475
You would have to pick a cloud provider first. You could look locally on job portals to see if you have particularly high demand for a certain cloud provider. For junior level I would suggest an entry cloud level certification. So something like AWS cloud practitioner or equivalent from other providers.
>>
>>107760475
nta, and I only know the basics of spring and a fair amount of java, never worked with it even.
my take though: pursue projects and certs that prove that you can: work on "any project" aka old/normal shit and another one that proves you can roll with the new tech projects, like (I'm parroting) koltin for example
>>
>>107760601
too add to >>107760601
Getting good as Java / Spring dev from ground up takes a lot of time. Of course if you add stuff like cloud or devops it will be even longer.
Make sure to really think this through before commiting. The worst thing is to commit to some stack and then decide that you want something else.
>>
>>107760635
nta, second, and to add to it, java/spring is verbose like a motherfucker
>>
>>107760601
I was looking for some guidance and you gave me just that. Thank you, anon. Sincerely.
>>
>>107760661
Is Java verbose? Yeah. With newer versions it's definitely much better than it was in the past. No language is perfect, and what matters more is the ecosystem, employability and what you can build with the language.
He could just commit to Go, but I doubt it would be possible for him (or anyone) to get a junior job in it without any previous experience, especially in current market.
>>
>>107761773
sounds reasonable, what would you think would take to get a junior job in go though?
>>
>>107761797
Experience the most. But I doubt there will be much in go, for juniors. if you somehow found such offer, then if you deploy a fairly complex microservice project to cloud or k8s, then that will increase your chances probably the most.
>>
File: 139.jpg (19 KB, 480x357)
19 KB
19 KB JPG
remember to bump the thread before going to sleep, threads die overnight for some reason
>>
>>107763239
I remember actively posting here in 2023, shit was moving crazy fast, now it's barely staying alive, wonder what changed
did anons just move on / stopped coming here once they got jobs, or maybe the other way around, maybe most of them were bootcampers who didn't make it
>>
>>107763256
>wonder what changed
the big companies made it their policy to fire people on the hundreds of thousands every year or months
>>107763256
there was also this one subhuman faggot shitting up the thread, that probably made some people quit as well, n*g*ers gonna n*g
>>
>>
>>107763256
The thread dying fast is a reflection of the sentiment on web dev in 2025/2026 in general, mainly due to:
● Paid course grifting and youtube shills constantly underlining that you're one step away from earning a five digit salary from the comfort of your home, programming should be treated as a passion or hobby much like fishing or cycling, not a means to financial stability. The unrealistic expectations produced by the aforementioned parties led to massive burnouts and stagnation.
● People didn't have much to do during covid so coding was a comfy getaway , 21/22/23 offered a short-lived resurgence in web dev.
● AI was constantly being misused, rather than treating it as a single stepping block, people made it their entire foundation. There was no intrinsic problem solving or brainstorming, only rapid code production with no intuitive thinking. Hence everyone quit after they hit the wall and realized AI only solved junior/intermediate tier roadblocks.
● A lot of people spent more time reading what other people think about coding, rather than doing actual coding themselves. The online sentiment was dark so people naturally grew uninterested in investing time and learning.
>>
>>107759975
Have you tried with a real device? Likely your browser tools might not display correctly
>>
Am I in over my head trying to create and run a 4chan clone or is it not really all that hard?
It's been fun and I'm nearing production, just kinda worried about security on my backend not being gigaMode
>>
>>107763256
i kinda stopped browsing here once they changed their captcha system initially like 2 years ago. especially when it was 10 min waits on new sessions
it's slightly better now but holy shit it's unbearable to post nowadays
>>
>>107767079
it's not that hard, the annoying parts are always to do with handling user input securely and also the legal shit that comes with uploading content
>>
>>107767095
yeah moderating it for a bunch of schizo-glowies not to shit themselves is kind of obnoxious honestly. thinking of adding word-filters but that already seems cringe and gay.
Should I start a discord to find mods and admins?
I'm also not to keen on how to beef up the OS or create a dashboard that's capable of adding new boards or whatever.
Just seems like such a hassle, is it absolutely necessary?
>>
>>107767126
*too keen
>>
>java in the year of our lord 56
Kekw

>>107763256
This new captcha is ass
>>
>>107767075
Yes, I even tried it on two devices with two different resolutions. Both were vertically scrollable.
>>
>>107764372
R.I.P. my nigga <center>.
>>
>>107763239
Based

>>107763256
Maybe there are people who don't want to try web dev any more because they think AI will take over the jobs
>>
If I want to test my websites on an iPhone should I:

(a) Buy a cheap second-hand iPhone for testing
(b) Buy a cheap Mac for the iPhone Simulator (I do need a new computer at some point anyway)
(c) Run an Amazon EC2 Mac instance with the iPhone Simulator, which costs $17.18 per day (minimum provision period is 24 hours)
>>
>>107768371
Wouldn't you need to test on Safari too? So that would necessitate a mac device?

regardless if you're planning to get a laptop, I wouldn't get anything other than a macbook. Would let you build iOS apps using xcode (though you need a dev license) and also test the website on Safari.

If you're testing native features (like A/V playback, bluetooth, speech recognition or whatever) then I'd consider a physical iPhone SE
>>
>>107768371
browserstack is an option (paid as far as I know)
>>
>>107768584
I'm more concerned about iPhones since so many people have them. Also if a website works on Safari on iOS it'll probably work on Safari on a Mac too.
>regardless if you're planning to get a laptop, I wouldn't get anything other than a macbook. Would let you build iOS apps using xcode (though you need a dev license) and also test the website on Safari.
Yes it would have those advantages... I'm not sure I really want to buy a Mac though given how expensive they are, and the RAM/storage are soldered, etc. I guess I'll think about it more.

>>107768680
Maybe I should look at that
>>
>>107769024
>maybe
my company supports mobile and desktop, with mac making the top percentage of devices, most specifically iPhones
we use browserstack, we have mac laptops
browserstack takes the role of android, iPhone iPad, windows desktop, android, etc.
>>
>>107769238
Interesting. $50 a month for an individual plan if you pay monthly. I guess that's cheaper than buying tons of devices but I just buy a cheap used iPhone I can use it for a long time.
>>
>>107769883
hmh, u have 1 iPhone version, there's like 3 relevant ones, bound to render things differently, in different browsers each
note, I'm not shilling browserstack, but alas
>>
File: sncae.png (8 KB, 225x224)
8 KB
8 KB PNG
I have a personal blog where I post code snippets frequently, and I've been looking into how to get syntax highlighting and it seems like the only way to do it is javascript. Just for bragging rights, I'd like to try and do it without JS. Is there some way to do it? If not, what is the absolute best way to minimize the site loading impact using some script? Yes I'm autistic about this shit.
>>
>>107770571
same way js can so it so can a be do it, it's parsing text, I believe, there might be libraries for that
>>
>>107770056
Fair point. I imagine all iPhones running iOS 26 should render websites pretty much the same though. And if someone is on an older version of iOS I can just tell the user to update their software.
>>
>>107771150
support only latest browsers and devices, that is the standard, if you wanna deviate from that, good luck with that because it is a lot of work for no reason
>>
>>107770571
>I'd like to try and do it without JS. Is there some way to do it?
I guess the two obvious ways to do it without JS are:

1. Do syntax highlighting on the server before you send the output to the browser
2. Do syntax highlighting in the browser with WASM instead of JS
>>
File: 1476014320079.gif (1.41 MB, 500x500)
1.41 MB
1.41 MB GIF
Hello, i'm a pain in the ass complete noob here.
Need your advices please.
I started a website years ago (it's just a photographic portfolio)
Since (back then) the yearly cost of the popular webhost was too much,
i picked "Portfoliobox" which was like 80€ a year only.
With that i created a domain etc.
Now the question: Portfoliobox costs 130€ a year now.
Should i switch Webhosts ??
How much do you guys pay in average for nothing too fancy ?
And what webhost would you recommend me, for simple photographic portfolio ?
Are 130€ average for a webhost ?
>>
>>107771167
>. Do syntax highlighting in the browser with WASM instead of JS
nta, but teh fuc? WASM can't manipulate the dom so how would it'd be doing it?
>>
>>107771199
if it is just static u can do it in githubpages 4 free, else digitalozean is cheapest hosting, there's also namecheap for domains, idk about total vost, but it should be cheap-ish
>>
>>107771264
i didn't understand shit lol
>static
?
> githubpages
on portfoliobox i simply pick a template, load my pictures, name them
slightly edit (sizes, thumbnails etc) done
>digitalozean
compute, database, networking, storage ???
Which one is for me lol
>>
>>107767126
>Should I start a discord to find mods and admins?
this is a ngmi tier question, sorry. work on your project, but don't even approach trying to build a community if this is where you're starting point is

the reward for building well-made forum software will always vastly outweight the reward for building an "online community", especially in the days of dickscord and red(fagg)it
>>
>>107771427
If u want clickity build pages, I believe wordpress has some kind of free tier, but it's usually slow as fuck as slow loading the pages


>what is hosting?
where you upload and "host" the page so everyone can access it, this won't magically "build" the page, it will just "display" it
honestly in ur specific use case idk what to.tell you, we build pages arround here and not use page editors for.the most part
>>
>>107771427
static, meaning the page doesn't load dynamically or have user-generated content. as in it only has the images you place, in the order you decide. your website sounds like it would be static

just keep trying popular options until you find one that meets your needs. wordpress sounds like it might be what you want, and there's a free option. wix and squarespace are cheap and simple aren't they? i know non-tech people who have used those for their sites
>>
>>107771235
Good point, but I guess you could implement the logic in something which compiles to WASM if you really want to
>>
>>107771783
as far as I know, JS => manipulates the dom, and without it there's nothing you can do, you can build abstractions on top of JS, but they're manipulating the dom for you
>>
we're getting more traffic, I guess it's new year's resolution or something
>>
>>107771856
Sure, I was going to say "I think you will need some JS too to make it work" but I was lazy. You could still implement syntax highlighting logic in something which compiles to WASM

The easiest way to solve this problem though is just to use a package/library which already exists of course. Either something on the server before you send the response to the client, or something JS-based which runs in the browser
>>
>>107772144
that's logic
>>
>>107772219
Yeah but I mean parsing syntax or whatever. But in reality you should probably just use a package/library to do syntax highlighting
>>
HELLO SIRS IS THIS WHERE BHARAT ARYAN HANG OUT?
>>
>>107773793
what I'd do, is check the best examples for syntax highlighting, figure out if they use a built in library, if they do just use that, if it is a js library, then check if there's any for BE that's worhty and use that, and if that doesn't exist, then figure out how syntax highlighting as a concept works in the web world, then do it
>>
>>107773837
They tend to hang out in >>>/int/bharat
>>
File: 1696183693174644.webm (2.95 MB, 960x540)
2.95 MB
2.95 MB WEBM
>>
my new year's resolution is to release another npm lib, what's yours?
>>
>>107776444
my new year's resolution is to bump this thread every evening
>>
>>107776444
I have too many and they're all too personal
>>
ChatGPT Challenge:

JS Challenge: Array Compression

Write a function that compresses consecutive duplicates in an array.

Rules

Keep the original order

Only remove consecutive duplicates

Return a new array

Examples
console.log(compress([1,1,2,2,2,3,1,1])) 
// [1,2,3,1]

console.log(compress(["a","a","b","a","a","a"]))
// ["a","b","a"]

console.log(compress([]))
// []
>>
>>107780313
function compress(arr) {
return arr.reduce((acc, curr, i) => {
if (curr != acc.at(-1)) {
acc.push(curr);
}
return acc;
}, []);
}
>>
>>107780375
>acc.at(-1)
interesting... didn't even know that was a thing I used .slice(-1) which does the same thing, when was that introduced?
>>
>>107780400
>>107780375
chat's 1up
const compress = arr =>
arr.reduce((acc, el) => (
acc.slice(-1) != el && acc.push(el),
acc
), [])


mine was like yours except using slice
const compress = arr => { 
return arr
.reduce( (acc,el,i) => {
if(acc.slice(-1) != el) {
acc.push(el) } return acc
} ,[] ) }


btw ur fas as fuck boy
>>
mine was in ts
function compress<T>(arr: T[]): T[] {
return arr.reduce((p, q) => (p.length !== 0 && p[p.length - 1] === q) ? p : [...p, q], [] as T[])
}
>>
>>107780426
>p[p.length - 1]
look at the alternatives suggested by me and the other anon
no "needed" but a nice to have
>>
File: 213123213.gif (46 KB, 812x988)
46 KB
46 KB GIF
sleep 10800000
>>
File: berkshire.png (58 KB, 1763x606)
58 KB
58 KB PNG
>web dev
why do we need this again?
>>
File: hero-image.jpg (807 KB, 5615x3158)
807 KB
807 KB JPG
>>107781377
>chef
why do we need this again?
>>
File: 46521.jpg (22 KB, 300x278)
22 KB
22 KB JPG
guise?
>>
Spent today working on my shitty project and it's still shitty. But at least I got some things done.
>>
>>107784653
*flex emoji*
>>
how much time outside of work do you dedicate to learning, for personal growth?
I've been doing 2 hours everyday (1 hour before 1 hour during my job) and my mental state has significantly worsened. I spend the whole day in front of computer, and I wanna kill myself.
>>
>>107785083
I'm planning on spending like 6 hours a week, I have to get a cert, it sure is fucking hell and I hate it, after that off course is full 0 grind 0 studying for several months
if you get burnout, you don't win, nor does your company
>>
>>107785116
good luck then. I am studying for a cert too but it's going so slow. I think I'll reduce learning time, I can't keep this up. Also I have to go for a walk everyday or something, cause I feel like shit.
>>
>>107785224
it's tough pham, good luck
>>
How do I keep my Neutralino extension working in the app after I've made an installer from the app? It's like it doesn't run in the app at all. Is NL_PATH in config the culprit?

 "extensions": [
{
"id": "extNode",
"commandDarwin": "${NL_PATH}/extensions/node/run ${NL_PATH}",
"commandLinux": "${NL_PATH}/extensions/node/run ${NL_PATH}",
"commandWindows": "${NL_PATH}\extensions\node\run.cmd ${NL_PATH}" <----------------
}
],


I am 99.9% sure the installer maker script itself is correct i.e. copies all the needed files.
>>
>>107785224
do you have friends with whom to spend the weekends?
>>
>>107785461
nah, I'm an antisocial type.
>>
>>107785483
then you're going to need something to let off steam, ride a bike around town or whatever the fuck, go hiking, go watch sports, idk, find something to compensate all the stress that's building up
>>
As a 2nd year student in CompSci what is a decent idea for a web dev project that should take 3 months that isn't too simple? This is supposed to be a big project so I need to have a more complex idea for the project. The project allows me to create any web app of my choice and which hypothetically be used for a business (any sort of business). How do I find something that is complex enough to where I pass comfortably but at the same time not too complex to where I can't finish it or fuck it up? I'm not a genius btw and lack any sort of creativity.
>>
File: CSS_master.png (245 KB, 680x525)
245 KB
245 KB PNG
post going to sleep bump, remember to keep the thread alive lads
>>
What’s the superior stack for shitting out prototypes these days? Next+Supabase? Phoenix? Good old fashioned Rails?
>>
>>107785927
Use your imagination lad
>>
>>107785927
I’m happy i graduated in the 2000s when webdev was barely part of the curriculum. Good luck
>>
>>107787214
That's not what I asked for boomer. Learn to fucking read.



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