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


File: 20180502181055.png (77 KB, 1024x605)
77 KB
77 KB PNG
The great debate (part two) 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: >>108260794
>>
Is there more tutorial for http://tululoo.com/ or can anyone make one?
Also for the twat who said "buy an ad" no,fuck off, kys, I have no account here, moron.
>>
>>108275902
My recommendation is to read the documentation
>>
>>108275562
working with laravel made me admire the concept and abstraction, tehn later went back to php, and made me admire naking ur own micro implementation oh laravel
>>
>>108275902
Your dumb ass can buy two ads.
>>
>>108264667
Here's a solution with no mutations or side effects.
/** @typedef {Record<string, any>} Tree */
/** @typedef {ReadonlyArray<string>} Path */

const paths = [
"src/index.js",
"src/utils/helpers.js",
"src/utils/math/add.js",
"public/index.html",
"README.md",
];

const toPathArray = (/** @type {string} */ str) => str.split("/");

const pathToBranch = (
/** @type {Path} */ path,
/** @type {Tree | undefined} */ branch = undefined,
) => {
const pathSegment = path.at(-1);
if (!pathSegment) {
if (!branch) throw new Error("Invalid params.");
return branch;
}
if (!branch) {
return pathToBranch(path.slice(0, path.length - 1), {
[pathSegment]: null,
});
}
return pathToBranch(path.slice(0, path.length - 1), {
[pathSegment]: branch,
});
};

const toMergedBranch = (
/** @type {Tree} */ tree,
/** @type {Tree} */ branch,
/** @type {Path} */ path = [],
) => {
if (!branch) return pathToBranch(path, tree);
if (!tree) return pathToBranch(path, branch);
const pathSegment = Object.keys(branch).at(-1);
return toMergedBranch(
tree[pathSegment],
branch[pathSegment],
path.concat(pathSegment),
);
};

const mergeBranchReducer = (
/** @type {Tree} */ accumulatedTree,
/** @type {Tree} */ currentBranch,
) =>
Object.assign(
structuredClone(accumulatedTree),
toMergedBranch(accumulatedTree, currentBranch),
);

const toFileSystem = (/** @type {string[]} */ path) =>
path
.map(toPathArray)
.map((p) => pathToBranch(p))
.reduce(mergeBranchReducer, {});


(technically Object.assign() mutates the first param, but it's an anonymous clone inside the method's scope so it's fine)
>>
>>108277228
Please use TypeScript and the `function` keyword. Thanks.
>>
File: 1757543491654.jpg (46 KB, 700x686)
46 KB
46 KB JPG
>>108277380
>>
>>108277453
If I ever start my own company I will single-handedly determine the formatting and linting rules. Anybody who contravenes those rules will be fired.
>>
>>108277500
If I ever become a sigmallionnaire I will single-handedly bankrupt (You) with silly lawsuits. Anypony who contravenes will be sent to the shadow realm.
>>
>>108277228
your code implements clean code principles (I believe) and that should make it more understandable and clear, I have no clue what your code does after briefly reading it
>>
>>108278584
which specific clean code principles does it implement?
>>
>>108279307
I'm not a book or documentation
>>
I'm building a JSON/JS object tool for shits and giggles and am worker on a parser. Would it be better to go character by character or use regex to capture tokens then skip ahead?
>>
>>108279481
please just admit that you were saying random bullshit and trying to back it up with big words.
>>
>>108279759
that's 0% the case
>>
>>108279499
Look up how parsers are normally written I guess. There's probably an idiomatic way of doing it which is more performant than other ways
>>
Alright lads I'm going to bed, please make the thread survive until tomorrow
>>
>>108275562
Picrel is basically a ruby vs PHP vs python.
Just pick you favorite language and dedicate a few weeks to learn the framework, each one implements best practices and dev convention for their respective language modern development (ruby is comfier IMHO).
>>
>>108276435
I read it. Tululoo.chm. There's only so much to call, a sample game even. Nor even anything modern.
Otherwise, refresh me.
>>108276568
>This guy again
For what, gee. Also, welcome back, nig.
>>
>>108280456
u did it pham
>>
>>108282273
>Just pick you favorite language
Or pick the language which is most likely to get you a job
>>
File: raa6bubkge1e1.jpg (62 KB, 1170x1060)
62 KB
62 KB JPG
>>108278584
toPathArray takes a string of slash separated substrings and transforms it into an array of substrings.
pathToBranch takes an array of substrings and transforms it into a tree branch such as:
{
src: {
utils: {
math: {
"add.js": null
}
}
}
}

toMergedBranch takes a tree and a branch, walks down the overlap between them keeping track of the path, and when they diverge, creates an updated branch with the path walked so far and the remaining dangling part of the branch or tree.
mergeBranchReducer takes a tree and a branch, and returns an updated tree with the branch merged into it.
toFileSystem maps each string into an array of substrings, then into branches, then merges all the branches into the final tree.

It's not really clean code principles, more like immutability and functional programming. All iteration is replaced with tail-recursion, and no variable is ever changed during the computation. The entire program is stateless and just maps value inputs to value outputs.
Note that array.slice() and structuredClone() create clones and are inefficient for compute and memory.
Also, JS engine implementations don't optimize tail-calls, so this could cause a stack overflow and is less efficient than iteration.
I just wanted to do it in this style of programming for the fun of it.
>>
File: 1772512484259.jpg (28 KB, 270x380)
28 KB
28 KB JPG
>>108283371
>job
I got a job as a rails dev in a late stage startup company and only worked 15min a day, besides the daily humiliation ritual. Sometimes as backend, sometimes as frontend working with Vue - peak comfy
>>
>>108284869
>besides the daily humiliation ritual
heheh
>>
Why are these threads so slow now? Haven't been here in a while
>>
>>108286090
breh, mass layoffs after mass layoffs after mass layofs, that's supposed to tank the thingie
>>
File: 77e.png (801 KB, 982x658)
801 KB
801 KB PNG
maintenance bump, and all of you saving the thread from 404ing with bumps, I salute you
>>
I need to refresh my webdev skills
Is React + node + TS still the most popular stack?
>>
>>108287542
ye
>>
>>108286090
Maybe some people have been scared off from web dev because they believe AI will take all the jobs

>>108287492
Thank you for saving the thread

>>108287542
Depends on your area maybe. I see more PHP jobs near me than Node jobs.
>>
>>108287872
>Maybe some people have been scared off from web dev because they believe AI will take all the jobs
Yes that's me
>>
File: 1772584368927.jpg (11 KB, 190x266)
11 KB
11 KB JPG
>>108275562
> be me
> have janky python scripts for monthly reports + jira-like sync
> team depends on me, vacations not real

> rewrite everything in ruby + sinatra
> make actual web UI like a civilized dev
> plan to deploy to VPS

> VPN required for half the integrations
> can’t install corp VPN on VPS
> well.jpg

> pivot
> wrap sinatra app in electron
> app boots local server on random port
> opens browserwindow to localhost
> done

now they click a button instead of pinging me on vacation
>>
Bump
>>
bunupu
>>
>>108288670
Does this mean your Electron app has Ruby bundled within it? And when you say a browser window, do you mean within the Electron app? Or does the Electron app open a separate web browser?

Pretty cool anyway. Also if you're using a random port every time, does that mean your app could choose a port that is used for something important? If it were me I would probably look at the list of used port numbers, find a port that isn't in general use, and stick with that.
>>
What tutorial can help one build actual, modern game in http://tululoo.com/ from controls to menus, to gameplay and even multiplayer s???
>>
swer to god I'm getting filtered by getting a bunch of items by specific attr value but also ids contained in other set of ids
sounds simple enough, but I just can't because the fuckery has multiple levels of nesting to find the specific attr
>>
>>108275562
>Web Development
Dead profession
>>
File: 1772631976845.jpg (40 KB, 710x842)
40 KB
40 KB JPG
>>108291396
Yes, ruby comes bundled with it and browser window means the electron app (which is just a chromium browser). The random port algorithm checks for available ports on the machine, as to not conflict with another application using the same one.

And thanks, anon, most of it was vibe coded with supervision, saved me lots of time not only to write the code but also for testing if the idea would work at all without having to deep dive into a course just for a proof of concept.
>>
>>108287872
>Maybe some people have been scared off from web dev because they believe AI will take all the jobs
To be honest I am a webdev right now and claude/codex are killing it for me.
And by killing it I mean that the jobs I used to take a month to do can be done in three days.
Fucking left freelancing to get a secure job because I just wanted a monthly pay, but it's a matter of time before the company downsizes and whether I will get the boot or spend the rest of my days working but worrying that I might get it any day... I think this field is indeed kinda dead.
>>
>>108292523
Nice, sounds cool
>>108292631
>I think this field is indeed kinda dead.
Maybe it is. I don't know. I will keep applying for jobs anyway and hope that someone hires me.
>>
>>108292080
i fuggured it out
>>
Why does Django use URLs with trailing slashes when the rest of the web doesn't

I don't want to navigate to `example.com/thing/`, I want to navigate to `example.com/thing`



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