You are on page 1of 33

/g/ - Technology

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

Janitor acceptance emails will be sent out over the coming weeks. Make sure to check your
spam box!

[Return] [Catalog] [Bottom] [Update] [ Auto] 238 / 41 / 87 / 5

File: web dev.jpg (104 KB, 1080x972)


/wdg/ - Web Development General Anonymous
03/11/23(Sat)09:13:37 No.92022875 ▶ >>92024435 >>92024912 >>92029270
>>92041826 >>92055104

>Free beginner resources to get started with HTML, CSS,


JavaScript and PHP
https://eloquentjavascript.net/Eloquent_JavaScript.pdf - A modern
introduction to JavaScript
https://developer.mozilla.org/en-US/docs/Learn - A good starting
point to learn about web dev fundamentals
https://javascript.info/ - Quite a good JS tutorial
https://www.theodinproject.com - Curriculum including
HTML/CSS/JS, and either Ruby on Rails + SQL, or Node.js +
MongoDB
https://fullstackopen.com/en/ - Requires you to have basic web dev,
db and git knowledge
https://flexboxfroggy.com/ and https://cssgridgarden.com/ - Learn flex/grid in CSS
https://phptherightway.com/ - A decent PHP resource
https://www.phptutorial.net - A PHP tutorial

>List of design resources


https://github.com/bradtraversy/design-resources-for-developers

>All useful documentation in one place


https://devdocs.io

>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
We have our own website: https://wdg.one
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 thread: >>91990881 →


>> Anonymous 03/11/23(Sat)09:25:26 No.92023007 ▶ >>92023054 >>92023253

Huh apparently the actual last thread was this one:


https://desuarchive.org/g/thread/92022037

Although it only had one reply (from OP), and was deleted after 5 minutes, and it doesn't exist in 4chan's
archive.

>> Anonymous 03/11/23(Sat)09:31:00 No.92023054 ▶ >>92023253


File: file.png (191 KB, 712x532)

>>92023007
Yeah, I was about to reply right
as it 404'd.

I liked the OP pic.

>> Anonymous 03/11/23(Sat)09:34:05 No.92023097 ▶ >>92023491


File: Z.jpg (5 KB, 225x225)

Made my first crud react app


today.

>> Anonymous 03/11/23(Sat)09:43:59 No.92023232 ▶


File: 1678538287533765.gif (2.5 MB, 360x374)

How do I use PIXI.js in


Electron

>> Anonymous 03/11/23(Sat)09:45:44 No.92023253 ▶ >>92023361

>>92023007
>>92023054
I deleted it because there is already a thread, albeit a shit one >>92021537 →

>> Anonymous 03/11/23(Sat)09:53:08 No.92023361 ▶

>>92023253
Yeah, but the idiot put the topic title in the post name, so it's not searchable by /wdg/.
Use this thread instead.

>> Anonymous 03/11/23(Sat)10:03:04 No.92023491 ▶ >>92023615

>>92023097
What language did you write the backend with?

>> Anonymous 03/11/23(Sat)10:11:40 No.92023615 ▶ >>92023866 >>92025570

>>92023491
I'm assuming he just used useState, maybe useReducer and did everything on the frontend.

>> Anonymous 03/11/23(Sat)10:15:07 No.92023675 ▶

What's the reliable way to find the root directory of a project?

Say I have some node scripts nested somewhere, how do I make em create files in the root directory?
Using stuff like "./name" or just "name" will create file in the directory from which I am running node but
that isn't universal

>> Anonymous 03/11/23(Sat)10:28:28 No.92023866 ▶

>>92023615
Bingo.

>> Anonymous 03/11/23(Sat)10:39:52 No.92024015 ▶ >>92026584


File: 1678548986115003.png (13 KB, 667x50)

My fucking sides

>> Anonymous 03/11/23(Sat)10:40:15 No.92024021 ▶ >>92024197

Is web dev your dream job, /wdg/?

Or do you have another dream, and if so, what is it?

>> Anonymous 03/11/23(Sat)10:55:24 No.92024197 ▶ >>92024229


File: sample-3a768763ffcff0e52b(...).jpg (139 KB, 850x601)

>>92024021
I'd like to own a cafe. One of those dark places with barely any customers because I
don't like noise nor people. Maybe one day when I'll be old

>> Anonymous 03/11/23(Sat)10:57:28 No.92024229 ▶ >>92024254

>>92024197
Maybe in your ESL country that's a sustainable business model, but in most of the Western world you'll be
broke.

>> Anonymous 03/11/23(Sat)10:58:57 No.92024254 ▶ >>92024285

>>92024229
>your ESL country
You say that as if it was a bad thing

>> Anonymous 03/11/23(Sat)11:01:59 No.92024285 ▶ >>92024324


>>92024254
Half of shit's still shit, kid.

>> Anonymous 03/11/23(Sat)11:02:17 No.92024290 ▶ >>92025424


File: Screenshot_20230311_185140.jpg (25 KB, 887x127)

So, this doesn't work...

How to dynamically render an element and set its width to parent element width?
Is there a way without declaring new variables?

>> Anonymous 03/11/23(Sat)11:05:37 No.92024324 ▶

>>92024285
No need to be so hard on yourself man, english is great

>> Anonymous 03/11/23(Sat)11:08:38 No.92024355 ▶ >>92024361 >>92024371 >>92024694


File: Screenshot_20230311-080644.png (1.84 MB, 1440x2197)

Guys please use my site https://conj.app it basically works like


4chan.

>> Anonymous 03/11/23(Sat)11:09:30 No.92024361 ▶ >>92024397

>>92024355
Fix your fucking margins you dumb cunt, half the body of the page is dead space. <3

>> Anonymous 03/11/23(Sat)11:10:43 No.92024371 ▶ >>92024397

>>92024355
Last time an anon posted an altchan it was flooded by a scat spammer angry at OP for having a loli
board. Hope you won't upset anyone

>> Anonymous 03/11/23(Sat)11:12:33 No.92024397 ▶ >>92024407 >>92024588


File: Screenshot_20230311-081149.png (927 KB, 1440x1125)

>>92024371
I added ban tools on my side to stop that.

>>92024361
The replies are actually smaller on margin.

>> Anonymous 03/11/23(Sat)11:14:02 No.92024407 ▶ >>92024436

>>92024397
What are you gonna do with my IP now that I clicked on it?

>> Anonymous 03/11/23(Sat)11:17:17 No.92024435 ▶ >>92033495


File: 1621430056026.png (360 KB, 1080x1234)

>>92022875 (OP)
kek 10/10 OP, full stack chads raise
up!
>> Anonymous 03/11/23(Sat)11:17:25 No.92024436 ▶

>>92024407
I should actually add IP tracking again so I can add my old auth system back in. I have oauth now so
people don't create new accounts when they get banned.

>> Anonymous 03/11/23(Sat)11:30:20 No.92024588 ▶

>>92024397
> picrel
Google was trying to sell its search engine/indexer around that time. For several years following, they
were almost constantly on the verge of bankruptcy. The business model espoused in that picture was not
sustainable.

>> Anonymous 03/11/23(Sat)11:38:28 No.92024694 ▶


File: 1662835541634975.png (181 KB, 1118x727)

>>92024355
kill yourself

>> Anonymous 03/11/23(Sat)11:54:24 No.92024912 ▶ >>92042010

>>92022875 (OP)
Nice gun. Anyone know the make/model?

>> Anonymous 03/11/23(Sat)12:10:51 No.92025112 ▶ >>92025376 >>92025577 >>92025954 >>92025990

Why is webdev all about introducing and replacing framework X with Y every three months or something?

>> Anonymous 03/11/23(Sat)12:31:07 No.92025376 ▶ >>92025448 >>92025498

>>92025112
React is the most popular and widely used framework for 10 years, mate

>> Anonymous 03/11/23(Sat)12:34:13 No.92025424 ▶

>>92024290
width:100%

>> Anonymous 03/11/23(Sat)12:35:52 No.92025448 ▶

>>92025376
I guess so, but somehow whenever I take a look in this godforbidden place that is called /wdg/ it seems
like you people change (and shill) frameworks like you (should) change your underwear. Daily.
>look at this, it totally solves problem X
[a few minutes later]
>we've got this new anti pattern problem thing, we need a new framework/language/feature to solve this
[cycle repeats]
>> Anonymous 03/11/23(Sat)12:38:29 No.92025498 ▶ >>92025913

>>92025376
Just like jQuery used to be. React is showing its age, + it's made and maintained by indians

>> Anonymous 03/11/23(Sat)12:43:30 No.92025570 ▶

>>92023615
>serialize the entire client side state as a .json
>send it to the server as it is
>server saves it as a plain text in a bucket
>the next time the client is logged, server sends that .json back

GraphQL was a good attempt at allowing the client to determine exactly what data it needs to receiver. We
should take the next step and allow the client to completely define the database itself and make the server
just host the raw data. I'm going to call this BlobStore.

>> Anonymous 03/11/23(Sat)12:44:00 No.92025577 ▶ >>92025913

>>92025112
the only thing that stops all other software from being reinvented all the time is other things being built on
top of it, making it harder to change without breaking something important.
webdev is close enough to the top that nothing really "important" depends on it remaining the same

>> Anonymous 03/11/23(Sat)12:45:06 No.92025596 ▶ >>92026285 >>92026357


File: download.jpg (10 KB, 189x267)

Requesting a list of websites for practicing coding


challenges.

>> Anonymous 03/11/23(Sat)13:04:31 No.92025913 ▶ >>92026117

>>92025577
but there still has got to be some motivation for this. I cannot be the egos of just some devs, because
even they should get tired by this nonsense.
>>92025498
Care to explain how react is showing its age?

>> Anonymous 03/11/23(Sat)13:08:09 No.92025954 ▶ >>92026101

>>92025112
why are you blatantly lying? Are you that desperate for attention?

>> Anonymous 03/11/23(Sat)13:10:31 No.92025990 ▶ >>92026101

>>92025112
more like implementing project with X and then maintaining it while project X decides to have three major
updates and hundreds of breaking changes throughout a single year

>> Anonymous 03/11/23(Sat)13:17:24 No.92026101 ▶

>>92025954
How am I lying? This general always makes it seem like this is what is up. Use react? Replace with some
unknown shit like alpine or svelte. Use bootstrap? Replace with tailwind. Replace with tailwind with
bulma... Use rails? Replace with django. But replace django with express really quick because the snake
is le shitty amiright.

And that is only the surface.

>>92025990
True, which is why in the real world only the major stuff gets used in the first place.

>> Anonymous 03/11/23(Sat)13:18:40 No.92026117 ▶ >>92026180

>>92025913
>Care to explain how react is showing its age?

The constant addition of "new features" which are just workarounds for circumventing design limitations
should be a hint

>> Anonymous 03/11/23(Sat)13:22:13 No.92026176 ▶ >>92026535 >>92026602 >>92027273 >>92028693 >>92028962


>>92033811

best place to put up a db for free?


railway says its limited to 500 hours per month which implies itll shut off after 3 weeks running.
i just want to add a like button to articles on my site. at most maybe 5 likes per day but most likely 1 or 0.

so i guess options are


>railway
>planetscale
>supabase
>cockroachdb
>mongodb

>> Anonymous 03/11/23(Sat)13:22:15 No.92026179 ▶

Should my scss files be somewhere like /src rather than /styles or /css ?

>> Anonymous 03/11/23(Sat)13:22:19 No.92026180 ▶ >>92026535

>>92026117
Which features do you mean? What design limitations are they hinting at? How are they handled better in
new frameworks? These are legitimate questions, I have no clue about this stuff but googling it is like
entering a black hole. Information won't come out.

>> Anonymous 03/11/23(Sat)13:30:13 No.92026285 ▶

>>92025596
just type what you wrote in google and press enter

>> Anonymous 03/11/23(Sat)13:35:08 No.92026357 ▶

>>92025596
leetcode, hackerrank

>> Anonymous 03/11/23(Sat)13:39:12 No.92026421 ▶ >>92026659 >>92026706


File: file.png (38 KB, 578x302)

WHY NOW

>> Anonymous 03/11/23(Sat)13:45:45 No.92026535 ▶


>>92026176
Mongo pay-a-you-go plan

>>92026180
Redux is an example. A react-based website needs a makeshift message passing mechanism to have basic
functionality.

>> Anonymous 03/11/23(Sat)13:48:37 No.92026584 ▶

>>92024015
top kek

>> Anonymous 03/11/23(Sat)13:49:29 No.92026602 ▶

>>92026176
bunch of anons here have recommended planetscale, haven't used it myself tho

>> Anonymous 03/11/23(Sat)13:52:29 No.92026659 ▶ >>92027299

>>92026421
You can't code for one second without it. You will be exposed by your boss soon.

>> Anonymous 03/11/23(Sat)13:54:58 No.92026706 ▶


File: 1676689387365213.jpg (122 KB, 1024x1006)

>>92026421

>> Anonymous 03/11/23(Sat)13:58:35 No.92026767 ▶ >>92026803 >>92026810 >>92027167 >>92040683 >>92041609


File: 1662932687653.jpg (32 KB, 334x400)

I'm at that part of the project where I have to make sure everything is responsive and I
am hating every single second of it

>> Anonymous 03/11/23(Sat)14:00:47 No.92026803 ▶

>>92026767
i feel you brother. i used bootstrap but it was still not easy for me (brainlet)

>> Anonymous 03/11/23(Sat)14:00:55 No.92026810 ▶

>>92026767
I always start with this
@media (min-width: 1024px) {
html {
font-size: 150%;
}
}
>> Anonymous 03/11/23(Sat)14:27:25 No.92027167 ▶ >>92027313 >>92028755 >>92032783 >>92041973

>>92026767
Nobody builds their own responsive design. Use existing libraries like bootstrap, material ui, etc....

>> Anonymous 03/11/23(Sat)14:34:29 No.92027273 ▶ >>92028479

>>92026176
Heres how you nigger rig it.
Make a google spreadsheet and send post data to fill in cells with and also retrieve.
I did it for my portfolio site with email responses and notifies.
Its janky but works.

>> Anonymous 03/11/23(Sat)14:35:50 No.92027299 ▶ >>92028159

>>92026659
>You can't code for one second without it. You will be exposed by your boss soon.
Without stackoverflow development around the world would slow down for sure

>> Anonymous 03/11/23(Sat)14:37:10 No.92027313 ▶

>>92027167
>Nobody builds their own responsive design. Use existing libraries like bootstrap, material ui, etc...
Work at a start up that uses a mix of angular flex box and tons of custom styles.
Sometimes you got to write it.

>> Anonymous 03/11/23(Sat)15:22:11 No.92028039 ▶

sockets are fucking confusing

>> Anonymous 03/11/23(Sat)15:28:39 No.92028159 ▶

>>92027299
this desu

>> Anonymous 03/11/23(Sat)15:46:41 No.92028479 ▶

>>92027273
nah thats autistic as fuck im not going that

>> Anonymous 03/11/23(Sat)15:58:44 No.92028693 ▶

>>92026176
Just get an ocean droplet and use it to host your site and db. It's like $5

>> Anonymous 03/11/23(Sat)16:01:52 No.92028755 ▶ >>92041943

>>92027167
I guess we know who doesn't know how to do responsive design, lol. I don't even do frontend and I know
how to do it.

>> Anonymous 03/11/23(Sat)16:10:19 No.92028923 ▶

remember to keep your pipelines flushed or it will bite you when least convenient

>> Anonymous 03/11/23(Sat)16:11:55 No.92028962 ▶


>>92026176
If you're already using Cloudflare, you can make a worker that uses KV or D1 and have it accessible as an
endpoint for your server.

>> Anonymous 03/11/23(Sat)16:21:02 No.92029154 ▶

is it possible to somehow register a service worker without actually calling


navigator.serviceWorker.register()
in my code?
similar to how browsers will fallback to /favicon.ico
can I put a service worker script file and have it registered automatically by the browser?

background: I've got a web server, outside my control, which creates HTML directory listings if there's no
index.html file in the requested directory. These listings are very bare bones and I'd like to apply some
additional styles etc.
If I can get a service worker registration, then I suppose I should be able to intercept the requests and
inject some style elements into the HTML directory listings.
I would like this to happen automatically, rather than having to specifically direct users to
/enable_pretty_styles.html or something.

>> Anonymous 03/11/23(Sat)16:26:53 No.92029270 ▶

>>92022875 (OP)
>MySQL
dropped

>> Anonymous 03/11/23(Sat)17:13:33 No.92030117 ▶ >>92037434


File: 1671254883119958.png (58 KB, 556x492)

So Im working on this database for the like feature. Decided to add a tag system (I
was inspired by how cool databases are).

So I'm thinking it'll go like this:


>I store the liker's ip address in the db
>save a string in their localstorage that says the time they liked the article
>3 likes are permitted per ip address in case there are multiple users on the ip
>obviously someone can clear cookies and like the article multiple times but who cares
Thoughts?

>> Anonymous 03/11/23(Sat)18:37:32 No.92031603 ▶

>page 9
Bump needed

>> Anonymous 03/11/23(Sat)18:39:43 No.92031630 ▶

What should I use for authentication for a sveltekit app?

>> Anonymous 03/11/23(Sat)18:44:05 No.92031702 ▶ >>92032621


File: Screenshot from 2023-03-1(...).png (99 KB, 655x831)

I'm learning Javascript. The code in picrelated works for finding the oldest person in that
list of objects. But why is it that when I put "let one" and "let two" in to the curly brace
sections, rather than at the start, variable "one" ends up not being defined? I fixed the
issue by moving the "let" parts to the top but I don't know what difference it's making.

>> Anonymous 03/11/23(Sat)18:44:28 No.92031707 ▶ >>92032027 >>92032463


rate my wepsite, any ideas? was thinking of adding a music player
https://team-zd.vercel.app/

>> Anonymous 03/11/23(Sat)19:02:25 No.92032027 ▶ >>92032134

>>92031707
Why is the cursor confused?

>> Anonymous 03/11/23(Sat)19:07:56 No.92032134 ▶

>>92032027
think it looks cool and sovlful

>> Anonymous 03/11/23(Sat)19:14:06 No.92032251 ▶ >>92042007 >>92042028 >>92057057

For fellow employed web devs - how much are you getting paid and what are your working conditions?

My first job: $60K/yr, midwest US, fully remote, flexible working hours (it doesn't matter when I work), only
25hrs per week of work need to be logged. So it's a 25-hour work week but ends up being over 30 when
you include talking to clients and figuring out what they want, setting shit up and being able to focus.

I work with React, React Native, PHP, and a shitton of shitty custom WP themes for the smaller projects.

I have about a year of experience now and can do fullstack work completely alone.

Should I look to jump ship soon, or stick with this longer? I want more money but I don't want to work
longer hours. Anything except remote work is no-go for me, I'm not wasting 1-2hrs per day in a fucking car

>> Anonymous 03/11/23(Sat)19:25:00 No.92032463 ▶ >>92032583

>>92031707
As soon as I went on it my CPU started melting so I quit the tab

This is why I don't like sites with heavy use of animations

>> Anonymous 03/11/23(Sat)19:32:00 No.92032583 ▶ >>92032790 >>92033053

>>92032463
what cpu u got anon?

>> Anonymous 03/11/23(Sat)19:34:02 No.92032621 ▶

>>92031702
let and const are block-scoped, which (in simple terms) means they only exist within the block of code
denoted by curly braces
for example:
if (condition) { let foo = 5 }
here foo is only defined within the body of the conditional expression but not outside of it

if you were to use "var" instead, it would work as you originally expected because var is scoped to the
whole function in which it is declared. But you should not be using var in 2023. Try to use const wherever
possible.
In the code you provided, you can use const if you replace the if statement with the ternary operator like
this:
const one = a.yearOfDeath ? a.yearOfDeath - a.yearOfBirth : year - a.yearOfBirth
or even:
const one = (a.yearOfDeath ?? year) - a.yearOfBirth
Lastly, there's no need to sort an array if you only want to find the largest or smallest element. This operation
is O(n) if you iterate over the array only once while keeping the "greatest element so far" in a variable.
Update the variable when you encounter an older person.

>> Anonymous 03/11/23(Sat)19:38:55 No.92032714 ▶ >>92032858

What's the conventional way to "skip" variable declaration in a callback function? Say for example you are
looping like this:
>[...something].forEach( (item, index, array) => {} );
and I don't need index, what would you call that variable? There has to be a convention for this right? I
just had a nested loop pick the wrong iterator from the outer one because of the way I generally call my
variables during loops

>> Anonymous 03/11/23(Sat)19:42:51 No.92032783 ▶

>>92027167
said like a true coder

>> Anonymous 03/11/23(Sat)19:43:09 No.92032790 ▶ >>92032849


File: file.png (199 KB, 1253x423)

>>92032583
Not OP but this is from my mere
t440s. 4300U

>> Anonymous 03/11/23(Sat)19:46:09 No.92032849 ▶


File: brave.jpg (104 KB, 1919x1080)

>>92032790
works on my machine
i7-4700MQ

>> Anonymous 03/11/23(Sat)19:46:51 No.92032858 ▶

>>92032714
the convention is to use underscore as the first character of the name
[].forEach(item, _idx, arr)
of course if you only need "item" then you can just skip the remaining parameters altogether

>> Anonymous 03/11/23(Sat)19:51:54 No.92032949 ▶ >>92033105 >>92036623 >>92040710

Had my first round of challenges for a junior role today. I have a question about double precision floating
point in JavaScript. I know there's a hidden bit in the mantissa and I know the smallest distance between
floating point representations is an ULP. Luckily I knew how an ULP and machine epsilon differed in that
it's a constant whereas a ULP is relative (they tried to trick me). My question is moreso about the guard
digits. It was a kind of simple question:

Why does (square root of 2)^2 - 2 not equal 0. So I walked through the process of adding the exponents
and shifting the radix point which in turn increments the exponent. However I was a bit lost on how floating
point actually rounds. I just answered that since the 54 bit was 1 it was rounding upwards and it seemed
correct.

Also does anyone know if the ECMAscript specifies anything about twos complement integer encoding?

>> Anonymous 03/11/23(Sat)19:57:04 No.92033053 ▶ >>92033089

>>92032583
Some old Intel laptop chip, I'm on an old laptop at the moment.
Also everything I click on that site doesn't do anything, is that intentional?

>> Anonymous 03/11/23(Sat)19:59:43 No.92033089 ▶

>>92033053
Yeah, nothing yet works. Will update tomorrow

>> Anonymous 03/11/23(Sat)20:00:41 No.92033105 ▶ >>92034257

>>92032949
ecmascript doesn't have integers, everything is a double

>> Anonymous 03/11/23(Sat)20:08:03 No.92033220 ▶ >>92041857 >>92044355

Going through Odin Project now and learning about linting, is there any way to simplify an ESLint install
with custom rules every time for any future project I want to work on? Like automatically make the config
files include prettier, fix syntax on save, etc. I just don't want to edit config files every time it sounds
annoying, and I heard you're not supposed to install ESLint globally.

>> Anonymous 03/11/23(Sat)20:27:32 No.92033495 ▶

>>92024435
I cant imagine being a front end dev.
and I love the power that full stack gives me.
I know exactly whats going on (not to say that there are people that I see doing wizard things, but I
understand how they do the wizardry)

>> Anonymous 03/11/23(Sat)20:48:23 No.92033811 ▶

>>92026176
Get a vps you cheap fuck

>> Anonymous 03/11/23(Sat)21:24:04 No.92034257 ▶

>>92033105
Doesn't IEEE 754 use Two's Complement for subtraction?

>> Anonymous 03/11/23(Sat)21:52:08 No.92034548 ▶ >>92034584

:: passable-forum ::
dev:: passable
tools:: Angular, Java/Spring-Boot, Mongo, Node, Grpc, Keycloak, AWS Fargate
link:: https://passableprogrammer.co.uk
repo:: N/A
progress:: It's a forum with the main page similar to 4chan kindaish and threads similar to reddit but with
streamed comments. Free tier expired so gonna take it down probably within a month. Everything gets
auto purged every few days anyway. Mostly half works. Comments can be made anonymously but need
to create an account to post articles/create collections of tags.

>> Anonymous 03/11/23(Sat)21:55:09 No.92034577 ▶

I have been doing a Java course for fun on my free time (the one offered by University of Helsinsky), but I
see they also have Full Stack Open.

If I wanted to switch jobs into tech, which should I keep doing? Right now I don't have time for both. I
know Java is very versatile, so I can't go wrong if I finish it, right? I know I'd have to learn frameworks and
such after.
>> Anonymous 03/11/23(Sat)21:55:38 No.92034584 ▶

>>92034548
meant to start with www. well whatever.

>> Anonymous 03/11/23(Sat)22:02:19 No.92034672 ▶ >>92035445 >>92035604 >>92035965

Do you guys get the feeling that you have to know so much for something that is ultimately so small. You
put all this work just to make "web-applications". But these webapps are so small in the grand scheme of
things they are just websites that people click and type on.

>> Anonymous 03/11/23(Sat)22:54:55 No.92035313 ▶ >>92035759 >>92049900


File: 1677253371924.png (15 KB, 908x249)

Is the conventional wisdom that iterators are slower than just filling an array and
looping over that, antiquated?
>Setup
function getNumberArray(maxValue) {
const a = [];

for (let i = 0; i < maxValue; i++) {


a.push(i);
}

return a;
}

function getNumberIterator(maxValue) {
return {
i: 0,
maxValue,
[Symbol.iterator]() { return this; },
next() {
return { value: this.i, done: ++this.i < this.maxValue };
}
};
}
let dummyCalculation;
const numIterations = 99999;
>Iterator
const iterator = getNumberIterator(numIterations);
for (let val of iterator) {
dummyCalculation = numIterations - val;
}
>Populate Array
const arr = getNumberArray(numIterations);
for (let i = 0, j = arr.length; i < j; i++) {
dummyCalculation = numIterations - arr[i];
}
https://jsben.ch/i5uNy

>> Anonymous 03/11/23(Sat)23:08:48 No.92035445 ▶

>>92034672
Yes. The only reason to do this shit is for money which is why I'm so lazy about actually doing it. I could
quite literally go build "apps" for small businesses that would massively increase their bottom line but I'm
just too fucking lazy because my non-tech job is fine and my income is alright so there's no motivation. I
tried to convince myself that because my apps/sites were insanely quick, not-bloated, served a purpose
and looked good that I was somehow making some kind of difference in this shit heap of an online
landscape but it doesn't lol
>> Anonymous 03/11/23(Sat)23:22:15 No.92035604 ▶

>>92034672
Many people have jobs with a small impact. Like someone who works stacking shelves in a supermarket.
Just one supermarket out of the handful in their town; just one town out of thousands in their country; just
one country out of hundreds on the planet.

Web developers (or any software developers) could work on small projects yes, or they could end up
working on products that are used by billions of people across the planet.

>> Anonymous 03/11/23(Sat)23:35:03 No.92035759 ▶

>>92035313
>done: ++this.i < this.maxValue
is this bait?

>> Anonymous 03/11/23(Sat)23:54:23 No.92035965 ▶

>>92034672
I am small in the grand scheme of things, who cares. I enjoy web development, would enjoy it even more
if I could get paid to do it, but it's not a passion. Caring about doing something important or wanting a
passion is gay and something women think about

>> Anonymous 03/12/23(Sun)01:00:17 No.92036623 ▶ >>92038180

>>92032949
Pretty strange question to go that deep into how floating point numbers are calculated. I guess it make
sense for a fresh grad to check if they remember what they learned. Any other frontend interview would
have you make a basic component or something.

>> Anonymous 03/12/23(Sun)01:02:16 No.92036648 ▶ >>92036747 >>92037101

In a react project, I have a potentially very long array of similarly structured objects (data from an API), if I
knew a particular field on those objects that I wanted speedy access to, I could obviously preprocess the
array of responses into a hash table keyed on that field.

What if I wanted to do this on any key of the object? The naïve solution is to make a hash table for every
possible key That seems suboptimal spacewise, but it would get the job done timewise. Is there a better
solution I'm not thinking of?

>> Anonymous 03/12/23(Sun)01:09:42 No.92036747 ▶

>>92036648
Since you just reference the original objects, you just copy each value one time. So you should just end
up with O(n) for the array + O(n * map objects) or something like that.
Basically just double the size and a bit more depending on how much extra a map object uses.
So it should not be that bad. If you can handle one array, you can probably handle the double the size.

>> Anonymous 03/12/23(Sun)01:10:29 No.92036757 ▶


File: 1678396172700633.png (374 KB, 745x680)

I can't get a job. ~50 applications in and I've only gotten 4 rejections back so far. I
know that's not a lot of applications, I'm aiming for at least 400 by the end of the
month before I consider switching things up.
My main issue is just that I don't meet the experience requirements for any of the
jobs listed. Would it be feasible to apply for internships, or help desk/entry level IT
shit? I'm sure that things will get better after I get a few years of experience in the
tech industry.
>> Anonymous 03/12/23(Sun)01:36:12 No.92037101 ▶

>>92036648
What do you mean by "want speed access to"?

Like you want to get a list of every element of the collection where that key = a certain value? Or you want
to iterate the entire collection and get that value out for each element?

Honestly this sounds like a premature optimization unless you know this is an actual bottleneck. Shit like
iterating a list with 10000 elements takes microseconds on even a pretty slow computer. It'd probably be
faster with a for loop than with .filter() though. What is slow 99% of the time is DOM operations, API calls
or doing actual calculations.

But yeah, you can make an array indexed by the key you want to search on, if you use a string based key
then JS will just make a hash table automatically I'm pretty sure. And yes, it'll trade off space for
performance, but that's the nature of indexes.

>> Anonymous 03/12/23(Sun)02:03:29 No.92037411 ▶

reposing cause posted in wrong thread

React Query looks very appealing - anyone here ever used it? How is it?

>> Anonymous 03/12/23(Sun)02:04:41 No.92037434 ▶

>>92030117
not an expert on this by storing an IP address sounds like an issue. maybe generate an ID based on the
IP + something else?

>> Anonymous 03/12/23(Sun)03:11:56 No.92038142 ▶


File: png-clipart-pepe-the-frog(...).png (17 KB, 900x843)

*sighs*
ERROR 1:

In login.classes.php inside the getUser() method, I made two important typos that
will make your code not work. (WHOPS! ty Sentinel Corps for letting me know)

The first SQL execution should be:


$stmt->execute(array($usn, $usn));

The second SQL execution should be:


$stmt->execute(array($usn, $usn, $pwdHashed[0]['user_pwd']));

ERROR 2:

As someone pointed out in the comments, using rowCount() to check how many results we get when we
query the database, isn't a method that work in all database types. Instead you should use count() after
you returned the data. Make sure you do it ALL PLACES where you SELECT from the database.

SO INSTEAD OF:

if($stmt->rowCount() == 0) {
$stmt = null;
header("location: login.php?error=usernotfound");
exit();
}
$profileData = $stmt->fetchAll(PDO::FETCH_ASSOC);
return $profileData;

IT SHOULD BE:

$loginData = $stmt->fetchAll(PDO::FETCH_ASSOC);
if(count($loginData ) == 0) {
$stmt = null;
header("location: login.php?error=usernotfound");
exit();
}
return $profileData;

>> Anonymous 03/12/23(Sun)03:15:01 No.92038180 ▶

>>92036623
I'm not a grad. Honestly all of my interviews have been pretty challenging. But I guess it's because I'm so
new. I had to do lexical analysis for a dataset and I ended up basically just building a Lexer like you would
for a language. I didn't touch regex tho.

>> Anonymous 03/12/23(Sun)04:48:17 No.92039114 ▶


File: 1678614359918.png (610 KB, 850x1268)

I just want to finish this project, move on, and forget about this mess
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA

>> Anonymous 03/12/23(Sun)04:58:33 No.92039204 ▶


File: 1663648847337759.jpg (13 KB, 252x198)

What are some good books/courses/guides/etc for someone who can do fizzbuzz
and not much else? Resources I've used before have been either too boring and
verbose or too confusing and brief.

>> Anonymous 03/12/23(Sun)06:54:14 No.92040263 ▶ >>92040792


File: htrhr6t.png (543 KB, 722x738)

Trying to deploy a vite project on netlify but I get this error:


Loading module from “https://blah-blah-4ce070.netlify.app/las2/assets/index-
48a9e657.js” was blocked because of a disallowed MIME type (“text/html”).
I've tried all the google results so I'm out of ideas.
Any help would be appreciated.

>> Anonymous 03/12/23(Sun)06:56:47 No.92040289 ▶ >>92040295

Our bank failed. Who jobless from Monday?

>> Anonymous 03/12/23(Sun)06:57:40 No.92040295 ▶ >>92040310

>>92040289
ChatGPT going to replace all of us

>> Anonymous 03/12/23(Sun)06:59:24 No.92040310 ▶

>>92040295
Yea, but its not happening right NOW
>> Anonymous 03/12/23(Sun)07:05:16 No.92040362 ▶ >>92040761 >>92057215

why bother learning this any further when it's quite unironically over?

>> Anonymous 03/12/23(Sun)07:35:58 No.92040683 ▶


File: E7AyliKXsAMoOjr.jpg (227 KB, 1200x1200)

>>92026767
same

>> Anonymous 03/12/23(Sun)07:37:54 No.92040710 ▶ >>92040721 >>92040852 >>92041075 >>92058897


File: 1661493872689.jpg (84 KB, 692x577)

>>92032949
I dropped out of CS because of this because they bored me to no end with math and
physics before letting me code anything. Is this really what junior web devs have to
go through or was just this company very particular with the hires they wanted?
Honestly scary if you ask me

>> Anonymous 03/12/23(Sun)07:39:27 No.92040721 ▶ >>92040876

>>92040710
Only this company thing. Most companies would ask you to do something more directly related to your
web dev job.

>> Anonymous 03/12/23(Sun)07:43:13 No.92040761 ▶

>>92040362
get a bullshit average wage frontend job
watch youtube and rice your desktop half of the time

>> Anonymous 03/12/23(Sun)07:45:52 No.92040792 ▶


File: oh-god-im-retarded-copy.jpg (26 KB, 300x300)

>>92040263
Never mind I got it.

>> Anonymous 03/12/23(Sun)07:49:55 No.92040852 ▶ >>92040897

>>92040710
I mean that's pretty basic stuff to know. You'd be surprised how many people don't even know the
difference between unicode encoding formats.

If you can't work with something as basic as numbers then why even try being a programmer?

>> Anonymous 03/12/23(Sun)07:52:27 No.92040876 ▶ >>92040959

>>92040721
What kind of challenges did they give you?
>> Anonymous 03/12/23(Sun)07:54:45 No.92040897 ▶ >>92041460

>>92040852
>Why does (square root of 2)^2 - 2 not equal 0
Is very different from
>Why are there different unicode encoding format and which one do I pick if I want X
Maybe it's just dropout cope but I didn't sign up for a math theory class. I just want to find solutions to
problems, that's why I'm into programming

>> Anonymous 03/12/23(Sun)08:00:19 No.92040959 ▶ >>92041114 >>92041391

>>92040876
>Here is the Pokemon API
>Write a program that fetches 10 unique pokemons and displays them on a simple webpage. No
duplicate Pokemons.
That was my coding test.
Then during the interview they asked me JS questions and what I did at my previous jobs.

>> Anonymous 03/12/23(Sun)08:09:43 No.92041075 ▶ >>92041111

>>92040710
>physics
>cs
wut?

>> Anonymous 03/12/23(Sun)08:12:42 No.92041111 ▶ >>92043978

>>92041075
It wasn't as big as math but it was mandatory along with other classes. I think it depends on which
university you pick

>> Anonymous 03/12/23(Sun)08:12:53 No.92041114 ▶ >>92042019

>>92040959
Did you have access to google for the coding test or did you have to fly solo?

>> Anonymous 03/12/23(Sun)08:34:34 No.92041391 ▶

>>92040959
jeez those are some low standards they have

>> Anonymous 03/12/23(Sun)08:39:34 No.92041460 ▶ >>92041546 >>92044392

>>92040897
Floating point errors are very common. 0.1 + 0.2 = 0.30000004. It's basic shit.

>> Anonymous 03/12/23(Sun)08:46:08 No.92041546 ▶ >>92041779

>>92041460
When did a problem like this last occur to you?

>> Anonymous 03/12/23(Sun)08:50:56 No.92041609 ▶ >>92041677

>>92026767
You don't do testing while building?

>> Anonymous 03/12/23(Sun)08:56:50 No.92041677 ▶ >>92041861


File: all the bags at once.png (348 KB, 630x348)
>>92041609
To an extent. I prefer reaching a checkpoint and only then looking behind me and build
form there or I'll never get anywhere

>> Anonymous 03/12/23(Sun)09:04:11 No.92041779 ▶

>>92041546
When I needed positions of multiple items at once and had to do Arithmetic on them to update their
coordinates. The errors accumulate.

>> Anonymous 03/12/23(Sun)09:07:22 No.92041826 ▶ >>92041908


File: bread.webm (1.72 MB, 480x854)

>>92022875 (OP)
I've been called back for a SEO focused webdev position. I try to look as hard as I can, but
every SEO guide out there just says
>Make your website not shit and not irrelevant
>Make it easy to find shit on it, like with a normal site
>Spend 10 minutes to check out keywords and put them on the site, but not as many times to
make it look like a scam from the 90s
>Strike a balance between too vague, and too specific
>Use Google Analytics and Tag Manager
with far far many more words, in usually long-ass vids by pajeets.

Is really all there is to it?

>> Anonymous 03/12/23(Sun)09:09:14 No.92041857 ▶

>>92033220
I wrote a five-line shell script that makes a .prettierrc.yaml file in the current directory

>> Anonymous 03/12/23(Sun)09:09:30 No.92041861 ▶ >>92041880


File: babyooyeah.webm (593 KB, 904x488)

>>92041677
How long before checkpoints?

>> Anonymous 03/12/23(Sun)09:10:33 No.92041880 ▶

>>92041861
Generally when I get sleepy and it's 2am. I don't always follow my own advice

>> Anonymous 03/12/23(Sun)09:11:59 No.92041908 ▶

>>92041826
Websites are basically dead. Things like reddit, discord, YouTube and now chatGPT have taken over.

>> Anonymous 03/12/23(Sun)09:14:02 No.92041943 ▶

>>92028755
You sound like a faggot. I am not saying you are a faggot. You just do come off like a turbo faggot.

>> Anonymous 03/12/23(Sun)09:15:34 No.92041968 ▶ >>92042221


File: file.png (144 KB, 786x703)

Is the sass npm module alright to use as compiler? Its page reports quite a few
behavioral differences from the ruby compiler (which I assume is the default one)
>> Anonymous 03/12/23(Sun)09:16:03 No.92041973 ▶ >>92042003

>>92027167
retard

>> Anonymous 03/12/23(Sun)09:17:53 No.92042003 ▶ >>92042445

>>92041973
Explain why

>> Anonymous 03/12/23(Sun)09:18:04 No.92042007 ▶

>>92032251
If you can round trip a form with validation front end and backend. You can be making 100k. People
making less than 100k are retards, jeets, or they have a second job.

>> Anonymous 03/12/23(Sun)09:18:44 No.92042010 ▶

>>92024912
Yes.

>> Anonymous 03/12/23(Sun)09:19:27 No.92042019 ▶

>>92041114
1 hour, take-home test.
So yes, I could search online.

>> Anonymous 03/12/23(Sun)09:20:04 No.92042028 ▶

>>92032251
Continued. Don't jump ship, just take on another job.

>> Anonymous 03/12/23(Sun)09:34:57 No.92042221 ▶ >>92042264

>>92041968
The Ruby one is old and busted
Dart is Google’s TypeScript
I’d use the NPM one

>> Anonymous 03/12/23(Sun)09:38:17 No.92042264 ▶

>>92042221
Alright I added it to my project. Relying on a vscode plugin was bothering me. I should have done this
from the very beginning. The article about starting a project with sass also made me add a script in my
package.json for ez watch and export of css files where I wanted as opposed to the addon I was using
that did everything in the same folder
"scripts": {
"sass": "node-sass styles/sass/main.scss styles/css/style.css -w"
},
>> Anonymous 03/12/23(Sun)09:52:30 No.92042445 ▶

>>92042003
Because that's only partially true. These libraries help for sure, but I think in majority of cases are not
enough. Eg. we're using React with MUI but still write quite a bit of SCSS.

>> Anonymous 03/12/23(Sun)10:27:42 No.92042958 ▶

Lads, I'm a FE dev with 4+ years of experience looking to go fullstack. Let's say I currently make
$100k/year, how much more would I get paid if I go fullstack ? ( I'm thinking Node + GraphQL )

>> Anonymous 03/12/23(Sun)10:31:05 No.92043009 ▶ >>92044320 >>92048064 >>92048216

How do you go about actually making a back-end service? I see a lot of tutorials about how to make APIs
but what if I want to take the request of the user and do some heavy processing, that cant be done in an
API right?

I think of APIs as gateways into my system but im having difficulty understanding how I actually make the
"system".

>> Anonymous 03/12/23(Sun)10:37:06 No.92043099 ▶

>bought a wireless pci-e adapter for 100$ 5 years ago


>it's worth 250$ now

Wut

>> Anonymous 03/12/23(Sun)11:37:58 No.92043978 ▶

>>92041111
i'm guessing you also take calculus

>> Anonymous 03/12/23(Sun)12:01:56 No.92044320 ▶

>>92043009
Sure you could call external stuff from your backend but if you use a reasonable language/framework
there's really no need to do so, unless what you are doing is very heavy to process. For normal use? Just
use the backend itself.

>> Anonymous 03/12/23(Sun)12:03:40 No.92044355 ▶

>>92033220
if you use a framework and start projects with a template you could just customize that template (like
custom create-next-app etc)

>> Anonymous 03/12/23(Sun)12:06:24 No.92044392 ▶ >>92050483

>>92041460
no math is required to understand "floating point is inaccurate" which is something you can find in every
single basic programming course

>> Anonymous 03/12/23(Sun)12:51:32 No.92045191 ▶ >>92045230 >>92045244 >>92045482 >>92047946

best way to exchange code between 2 laptops ?

>> Anonymous 03/12/23(Sun)12:53:36 No.92045230 ▶

>>92045191
Infra-red
>> Anonymous 03/12/23(Sun)12:54:13 No.92045244 ▶

>>92045191
git?

>> Anonymous 03/12/23(Sun)13:07:10 No.92045482 ▶

>>92045191
Burn the code onto minidiscs.

>> Anonymous 03/12/23(Sun)13:07:39 No.92045489 ▶ >>92045645

Made a board game in React and I wanted to try and use sockets to make it multiplayer but it's actually
been harder than making the game. I managed to get it where two people could join a game with each
other but because of react's re-rendering bullshit it disconnected both of the users from their room and I've
put in all of that work just to be at square one

Is working with sockets usually this hard or am I being retarded?

>> Anonymous 03/12/23(Sun)13:15:08 No.92045645 ▶ >>92045674

>>92045489
This is a learning opportunity.
Why does react re-rendering disconnect users from their room?

>> Anonymous 03/12/23(Sun)13:16:26 No.92045674 ▶ >>92045753 >>92046204

>>92045645
it's because I'm using the auto-generated socket id to connect users, so when the state changes to reflect
a room being created it re-renders it, leaving the users from the game.
I just can't be bothered to go back and change everything again

>> Anonymous 03/12/23(Sun)13:21:02 No.92045753 ▶ >>92045885

>>92045674
What's the minimum you would need to change to prevent the issue?

>> Anonymous 03/12/23(Sun)13:28:07 No.92045885 ▶ >>92045934

>>92045753
well I'd have to persist Id's using something like uuid and cookies which is easy enough, but on the
backend socket.io automatically creates rooms for the auto-generated socket id so I'd have to write a
bunch of code that filters the auto-generated ones, on top of that I already have janky code as it is to
prevent showing users occupied rooms and I don't know whether react's re-rendering would still
automatically break up rooms that were previously connected by users. I guess I'd have to persist the
session somehow

It's been like 2 days of this constant trial and error and i'm just getting really tired of it

>> Anonymous 03/12/23(Sun)13:30:44 No.92045934 ▶

>>92045885
i was thinking more like have top level state for being connected, room id, etc. be separated from the child
components rendering the game

>> Anonymous 03/12/23(Sun)13:47:02 No.92046204 ▶ >>92046237


>>92045674
Are you making the socket connection inside the component and just using a regular variable? You could
probably use useRef to store the websockets.

>> Anonymous 03/12/23(Sun)13:48:44 No.92046237 ▶

>>92046204
Any object inside a useRef is persisted between renders, and changing a "ref" variable doesn't cause a
re-render just FYI.

>> Anonymous 03/12/23(Sun)14:22:51 No.92046812 ▶

>page 7
Bump

>> Anonymous 03/12/23(Sun)14:33:30 No.92046990 ▶ >>92047041 >>92047052 >>92047109 >>92047122 >>92047472


>>92047977 >>92053139

I'm a fucking noob so help me out here.


I get that you'd use JS for the frontend.
But why the fuck use it for the backend?

>> Anonymous 03/12/23(Sun)14:36:23 No.92047041 ▶ >>92047143

>>92046990
le only le one le language, but node/express is really modern

>> Anonymous 03/12/23(Sun)14:37:19 No.92047052 ▶ >>92047143 >>92047352

>>92046990
Nodejs is actually quite simple to get up-and-running, tons of serverless support, lets you share
components between front and backend, and performs reasonably well. For 95% of jobs that require
building server backends, it's 100% sufficient.

>> Anonymous 03/12/23(Sun)14:41:22 No.92047109 ▶ >>92047143

>>92046990
why not?

>> Anonymous 03/12/23(Sun)14:42:26 No.92047122 ▶ >>92047143

>>92046990
nobody wants to learn a second language nowadays when you can do everything using js

>> Anonymous 03/12/23(Sun)14:43:41 No.92047143 ▶ >>92047159 >>92047185


File: Nietzsche-Gun.jpg (26 KB, 524x400)

>>92047041
>>92047052
>>92047109
>>92047122
My god.
So you're telling me that this entire field is
made to entice newfags?

>> Anonymous 03/12/23(Sun)14:44:53 No.92047159 ▶

>>92047143
Pretty much, yes
>> Anonymous 03/12/23(Sun)14:46:50 No.92047185 ▶

>>92047143
>always has been
The reason web development blew up in the first place was the proliferation of PHP and MySQL on cheap
VPS in the early 2000's. It allowed javascript-shitters to make "good enough" sites and web apps and is
the reason everything is on the web now. Nodejs was a natural evolution so pajeets had to learn one less
language to destroy. There was actually quite a nice sweetspot in history when webapps were largely
pure JS or simple jQuery and 90% server rendered with a little bit of AJAX when it served functionality,
rather than enabling a client framework to mimic MVC.

>> Anonymous 03/12/23(Sun)14:58:54 No.92047350 ▶ >>92047423

Go or ASP.Net core?

>> Anonymous 03/12/23(Sun)14:58:59 No.92047352 ▶ >>92047423

>>92047052
60% of the time it works every time

>> Anonymous 03/12/23(Sun)15:04:13 No.92047423 ▶ >>92047458

>>92047350
.NET, easy
>>92047352
I've been using it since 2010, and the amount of times I couldn't use it for a production application rounds
to 0. I almost abandoned it because callbacks were frustration-generators but async/await saved the
language.

>> Anonymous 03/12/23(Sun)15:06:45 No.92047458 ▶ >>92047496

>>92047423
>.NET, easy
Why? Not disagreeing, but I keep wandering framework to framework and I'm trying to convince myself to
stick with one to actually build something.

>> Anonymous 03/12/23(Sun)15:07:31 No.92047472 ▶

>>92046990
Why not?
> JS runtimes like node are much faster than python,php etc because they piggyback of performance
improvements for chrome.
> IO libraries are async by default so you don't have the clusterfuck of different async libraries mixed with
non async
> Ability to reuse type definitions and code between both
> Simpler tooling since you only have to deal with one language
> JS Ecosystem is massive, easy to find libraries for what you want and developers who know the
language
> Server side rendering is easier
> Typescript gives a consistent type system

Really the onus is the other way around. If we already have one language in the project, you should need
to justify adding another.

>> Anonymous 03/12/23(Sun)15:08:47 No.92047496 ▶ >>92047569

>>92047458
I've worked in both. I find the tooling around .NET easier to comprehend, I find it has some really nice
mature frameworks (Entity Framework being one), and I find its parallelism to be much easier to manage
and understand. You can also deploy it pretty much anywhere because it runs fine on linux now, and I don't
like Go's error handling.

>> Anonymous 03/12/23(Sun)15:13:33 No.92047569 ▶ >>92047593

>>92047496
>I don't like Go's error handling.
I've been looking into Go for a few hours today and this is really fucking annoying and I haven't actually
written anything in it.

>> Anonymous 03/12/23(Sun)15:15:10 No.92047593 ▶

>>92047569
Yeah. I get what they were going for, taking the C-ish route. I think it has the beginnings of a good idea,
but in its current form, it's worse than just throwing exceptions.

>> Anonymous 03/12/23(Sun)15:36:27 No.92047946 ▶

>>92045191
airdrop

>> Anonymous 03/12/23(Sun)15:37:56 No.92047977 ▶

>>92046990
JavaScript is the best, bud

>> Anonymous 03/12/23(Sun)15:38:59 No.92048001 ▶


File: rljn7xizdegz.jpg (332 KB, 1800x1293)

>> Anonymous 03/12/23(Sun)15:42:43 No.92048064 ▶

>>92043009
>write function do_something()
>within the /mysite/whatever endpoint definition, call do_something() and return result as JSON in
response body
literally simple as

>> Anonymous 03/12/23(Sun)15:48:52 No.92048176 ▶


File: 1678654128955.png (283 KB, 860x822)

>programming should be harder because.... because it


just SHOULD okay!!!

>> Anonymous 03/12/23(Sun)15:51:02 No.92048216 ▶

>>92043009
> heavy processing
Depends what you mean by that.
Usually, you want your API responses to return fast. But that's not always possible, if something complicated
is requested. So you have to make a judgement call.

If you have something heavy to do and you don't want the API response to be slow then your best bet is to
use a queuing library like rabbitMQ etc.

So you have
> API endpoint that creates a "task". This adds a job to the queue and then returns a unique ID for that job.
> API endpoint that queries the job, takes the ID from previous as endpoint and either returns the result, or
returns a "status" that tells you if it is incomplete to failed.

The other alternative is to have some kind of webhook or websocket that "pushes" the result when it is
complete.

Or you can just have a slow API response for some things, but you need to make sure this is properly
documented and make sure you don't have a timeout etc. You also probably don't want to have your UI wait
on the response.

>> Anonymous 03/12/23(Sun)17:23:48 No.92049834 ▶

>page 9
Bump

>> Anonymous 03/12/23(Sun)17:26:53 No.92049900 ▶

>>92035313
>Is the conventional wisdom that iterators are slower than just filling an array and looping over that,
antiquated?
maybe because the iterator doesn't tell the computer how much memory it needs and it doesn't have to
populate the array afterwards
however iterators are for iterating thought an indeterminate set, using them to gain a small
memory/processing advantage over array at a huge cost of readability in an era of excess memory and
CPU/GPU power, I just can't see the use case unless you're writing shit for NASA and every bit of memory
must be put to the best use possible
and I doubt even NASA have been that anal in a long time

>> Anonymous 03/12/23(Sun)18:05:52 No.92050483 ▶

>>92044392
"You don't need Math to explain how Math works".

What is the maximum error of a floating point representation bounded by?

>> Anonymous 03/12/23(Sun)18:20:13 No.92050651 ▶ >>92050699 >>92050733 >>92050959 >>92050986 >>92051100


>>92051301
File: id4ozwelytl81.jpg (88 KB, 672x900)

EXPLAIN THE OVERVIEW TO ME RIGHT FUCKING NOW!!!


RIGHT NOW!!! WHY IS THIS NIGGER USING REACT, NEXT AND EXPRESSJS? WHAT
THE FUCK IS THIS SPAGHETTI SHIT? HOW THE FUCK IS ALL THIS CRAPOLA
REQUIRED FOR A FUCKING SIMPLE APPLICATION? WHAT TH
EFUUUUUUUUUUUUUUUUCK??!
https://github.com/clintonwoo/hackernews-react-graphql

>> Anonymous 03/12/23(Sun)18:23:12 No.92050699 ▶

>>92050651
Welcome to modern webdev, hope you enjoy your stay

>> Anonymous 03/12/23(Sun)18:25:37 No.92050733 ▶


>>92050651
it's just babby's first web project, pay no attention

>> Anonymous 03/12/23(Sun)18:42:02 No.92050959 ▶

>>92050651
Why does this have 4.4k stars?

>> Anonymous 03/12/23(Sun)18:43:45 No.92050986 ▶

>>92050651
Idk I'm going back to good old fashion SSR with raw SQL and good CSS transitions. Web apps are a
meme. Servers and modern languages can handle like 5 billion reqs a second ran on the cheapest single
instance VPS... We've all been made for fools

>> Anonymous 03/12/23(Sun)18:51:22 No.92051100 ▶

>>92050651
> He used 3 free libraries
Absolutely seething

>> Anonymous 03/12/23(Sun)19:05:27 No.92051301 ▶ >>92051824 >>92053606

>>92050651
>FUCKING SIMPLE APPLICATION
Can you give your version of a simple web app version of a hacker news clone? I would like to see how it
should be implemented according to you.

>> Anonymous 03/12/23(Sun)19:43:48 No.92051824 ▶

>>92051301
Not him, but I'd personally just do it as a fully server rendered PHP site and use a simple 10-30 line JS for
hiding/showing comment trees.

The page would respond with s-maxage/stale-while-revalidate headers so that pages are cached on
CloudFlare. Lighthouse metrics would be 100.

You could get a little more complex and do it using Astro, it doesn't require any opt in to any UI library like
React/Svelte so you can just do raw JS. it's probably easier to deploy as well with providers like Vercel
and Netlify having full support for running JS on edge functions.

>> Anonymous 03/12/23(Sun)20:55:19 No.92052788 ▶ >>92053367 >>92054546

What's the most practical fullstack SSR framework?

>> Anonymous 03/12/23(Sun)21:20:45 No.92053139 ▶

>>92046990
because its works. js sucks but the js ecosystem is great.

>> Anonymous 03/12/23(Sun)21:40:44 No.92053367 ▶ >>92053591

>>92052788
jQuery

>> Anonymous 03/12/23(Sun)21:41:22 No.92053378 ▶ >>92053600 >>92053661

can i get a non meme answer about if ruby on rails is the future or not?
>> Anonymous 03/12/23(Sun)22:00:38 No.92053591 ▶
File: hand.png (543 KB, 569x726)

>>92053367

>> Anonymous 03/12/23(Sun)22:01:22 No.92053600 ▶

>>92053378
Nope lol

>> Anonymous 03/12/23(Sun)22:02:05 No.92053606 ▶

>>92051301
Serve the content with a node js backend and use vanilla js for interactions on the frontend.

>> Anonymous 03/12/23(Sun)22:06:22 No.92053661 ▶

>>92053378
bruh ruby is dead

>> Anonymous 03/12/23(Sun)22:20:54 No.92053835 ▶ >>92054070 >>92054515

Is it possible to make a checkbox (or radio button) have a certain state (checked or not checked)
WITHOUT JAVASCRIPT? `checked` doesn't work; it needs to always be the same when the page is
loaded.
If so, how?

>> Anonymous 03/12/23(Sun)22:41:05 No.92054070 ▶ >>92054176

>>92053835
'checked' does exactly this.

>> Anonymous 03/12/23(Sun)22:49:43 No.92054176 ▶

>>92054070
No, it is overridden by the user's selection, even when the page is reloaded.

>> Anonymous 03/12/23(Sun)23:18:35 No.92054515 ▶

>>92053835
Well duh, you're going to need JS if you're going to do any interactivity. I'm not exactly sure what else
you're expecting. Otherwise you're just limited to what it's initial checked state is, e.g.

<input type="checkbox" checked />

>> Anonymous 03/12/23(Sun)23:20:34 No.92054546 ▶ >>92054621

>>92052788
easily nextjs

>> Anonymous 03/12/23(Sun)23:26:32 No.92054621 ▶


>>92054546
How does it compare to sveltekit?

>> Anonymous 03/12/23(Sun)23:39:41 No.92054803 ▶ >>92054855

Hey guys, I have a project with webpack which I try to get into production. When webpack builds, I guess
it runs npm install.

Is there a way I can force webpack to use npm i --legacy-peer-deps?

>> Anonymous 03/12/23(Sun)23:44:22 No.92054855 ▶

>>92054803
Never mind, just threw out the conflicting packages. What a pain lol.

>> Anonymous 03/12/23(Sun)23:52:00 No.92054958 ▶


File: a45.jpg (58 KB, 1000x1024)

got a c++ job

later nerds

>> Anonymous 03/13/23(Mon)00:04:00 No.92055104 ▶ >>92055225


File: computerjak6.png (176 KB, 560x689)

>>92022875 (OP)
Everyone share your websites! I don't mind if they are a WIP, I am just curious to see
what everyone is working on!

>> Anonymous 03/13/23(Mon)00:14:20 No.92055225 ▶


File: computerjak5.png (177 KB, 560x689)

>>92055104
I am adding, expanding to my website at a rate of i quirky page per day lately. Really
looking forward to keeping it going.

>> Anonymous 03/13/23(Mon)01:58:37 No.92056357 ▶


File: 1678079859992010.jpg (41 KB, 735x515)

>so much shit to learn


>learn framework pisscum to do easy
pissingcumming
>use eatshit preprocessor so your
eatshitting is faster
>use this css framework gaynigger to do
gaynigger things easier

Jumping into web dev was a mistake.


>> Anonymous 03/13/23(Mon)02:22:05 No.92056609 ▶

going to spend some time learning webgl and three.js this week

>> Anonymous 03/13/23(Mon)02:55:32 No.92056943 ▶ >>92056967

Is anyone familiar with Django?


I can write an additional (persisting) keys to an incoming session like this:
def my_view(request):
request.session['test'] = 111111
print(request.session['a']) # 11111
but I don't get where it gets stored?

I have a session cookie in my browser and Django session data in the database but there aren't any keys
I set earlier

>> Anonymous 03/13/23(Mon)02:57:49 No.92056967 ▶

>>92056943
Forgot to rename the key
>def my_view(request):
> request.session['test'] = 111111
> print(request.session['test']) # 11111

>> Anonymous 03/13/23(Mon)02:59:45 No.92056989 ▶ >>92057056


File: 1674799743122235.jpg (86 KB, 784x709)

I'm a reducefag
reduce is such a cheat, man

>> Anonymous 03/13/23(Mon)03:06:27 No.92057056 ▶ >>92057065

>>92056989
reduce meaning?

>> Anonymous 03/13/23(Mon)03:06:32 No.92057057 ▶

>>92032251
Market conditions seem pretty rough now, but even then you should be able to make more jumping ship.
Might even be a good opportunity to get a good deal on some equity before prices bounce back. Take my
advice with a grain of salt though because I live in SV where living on 60k is unimaginable.

>> Anonymous 03/13/23(Mon)03:07:34 No.92057065 ▶ >>92057153

>>92057056
Array.prototype.reduce()

>> Anonymous 03/13/23(Mon)03:16:22 No.92057153 ▶

>>92057065
all of them are great - filter, map, reduce, some, every

>> Anonymous 03/13/23(Mon)03:23:57 No.92057215 ▶


>>92040362
I have nothing better to do with my life and I can't go outside so this is pretty much my only option for a job
that seems somewhat decent

>> Anonymous 03/13/23(Mon)04:06:13 No.92057654 ▶

<span class="postNum desktop"><a href="#p92057065" title="Link to this post">No.</a


" title="Reply to this post">92057065</a></span>

so I can literally just copy this rigth?

>> Anonymous 03/13/23(Mon)05:20:07 No.92058357 ▶ >>92058377 >>92058529

Hey wdg. Would you mind tearing my janky code apart?

I am learning react and trying to create an old fashioned desktop in the browser. I am having trouble
making a component draggable across the screen. This "process" component is the window in which
individual apps will be rendered in. At the moment I have all of the dragging logic inside this component. I
am keeping track of two states(MouseCoords, OldMouseCoords) and the mouse position (up/down).
Basically Movement is determined by compairing old mousecoords to mousecoords and figuring out
which way the box needs to move, then editing the css style to make it rerender somewhere else.

This feels like a really hacky way to do this, any suggestions? I'll reply with the component

>> Anonymous 03/13/23(Mon)05:21:41 No.92058377 ▶ >>92058529

>>92058357
type ProcessProps = {
exitApp: (processID: number) => void;
process: ApplicationProcess;
}

const Process: FC<ProcessProps> = (


{

exitApp,
process,

}
) => {
const [MouseCoords, setMouseCoords] = useState({ x: 301, y: 301 });
const [OldMouseCoords, setOldMouseCoords] = useState({ x: 300, y: 300 });
const [BottomLeft, setBottomLeft] = useState({ bottom: 300, left: 300 })
const [mouseDown, setMouseDown] = useState(false);

const MousePosition = (event: React.MouseEvent<HTMLDivElement, MouseEvent>) =


if (mouseDown) {
setOldMouseCoords({ x: MouseCoords.x, y: MouseCoords.y });
setMouseCoords({ x: event.screenX, y: event.screenY });
}
}

>> Anonymous 03/13/23(Mon)05:37:03 No.92058529 ▶

>>92058357
>>92058377
A somewhat better way for this would be to use "movementX" and "movementY" of the mousemove event
IMO.
But generally speaking your approach is correct.

>> Anonymous 03/13/23(Mon)06:18:21 No.92058897 ▶

>>92040710
lol it took me almost 3 hours to solve a leetcode easy question that basically only used for loops & arrays
then, i got to a question that used trees, had no idea how to solve it, looked at the answers, had no idea
what i was looking at, and just gave up on leetcode entirely
i just accepted the fact that i will fail interviews that use leetcode questions
i'm hoping that they ask me work-related questions, or just give me take home projects
i can't be fucked to learn DS&A and git gud at leetcode, when 90% of my work is just fetching APIs and
handling JSON data, or updating CSS colors
i don't care if this makes me stupid, i'm just not wasting time on that shit

[Return] [Catalog] [Top] [Update] [ Auto] [Post a Reply] 238 / 41 / 87 / 5

Delete Post: [ File Only] Delete Style: Yotsuba B

You might also like