News for hackers. Stuff that matters.
Re:Things I wish I knew before moving 50K lines of code to R... by mediumsmart on Friday September 01, 2023 @01:10AM (#37347033)
In server-side rendering, clients are sent HTML that they can see immediately

I noticed this too. You can put a plaintext file on the server and it gets transferred to the browser pretty fast. You can also put another plaintext file ending with .css on the server and it can make things on the first page move and look really nice just because the browser knows what to do with it.

It’s a neat trick but still second to useful content on the first page (that is the page you get to read, if it lets you).

Re:Things I wish I knew before moving 50K lines of code to R... by arthur_sav on Friday September 01, 2023 @04:23AM (#37348141)
What is this sorcery you speak of?
Re:Things I wish I knew before moving 50K lines of code to R... by lkrubner on Friday September 01, 2023 @05:00AM (#37348378)
Careful, my child, for those who speak of these things are forced to leave their tribes and wander forever in the deserts and the wastelands.
Re:Things I wish I knew before moving 50K lines of code to R... by gabereiser on Friday September 01, 2023 @05:07AM (#37348419)
Truth
Re:Things I wish I knew before moving 50K lines of code to R... by phero_cnstrcts on Friday September 01, 2023 @04:31AM (#37348190)
I thought we had lost that technology.
Re:Things I wish I knew before moving 50K lines of code to R... by the_gipsy on Friday September 01, 2023 @04:45AM (#37348290)
We must seek the knowledge of the dwarves.
Re:Things I wish I knew before moving 50K lines of code to R... by xwolfi on Friday September 01, 2023 @05:13AM (#37348460)
Every CPU in the whole must regenerate websites from json descriptors. That's how it should always have been.
Re:Things I wish I knew before moving 50K lines of code to R... by bnt on Friday September 01, 2023 @07:02AM (#37349184)
Why did we abandon XSLT?
Re:Things I wish I knew before moving 50K lines of code to R... by baq on Friday September 01, 2023 @07:15AM (#37349291)
Never have. Just renamed it to node yaml.
Re:Things I wish I knew before moving 50K lines of code to R... by froh on Friday September 01, 2023 @10:16AM (#37351144)
nah. xml was much better !!!
Re:Things I wish I knew before moving 50K lines of code to R... by colanderman on Friday September 01, 2023 @10:56AM (#37351614)
XSLT still works in browsers believe it or not. It's great for making templated static sites.
Re:Things I wish I knew before moving 50K lines of code to R... by masfuerte on Friday September 01, 2023 @11:15AM (#37351906)
I find XML quite readable but XSL's mix of logic expressed in XML and XML content is just awful. Syntax highlighting does help somewhat though.
Re:Things I wish I knew before moving 50K lines of code to R... by foderking on Friday September 01, 2023 @06:39AM (#37349012)
lmao
Re:Things I wish I knew before moving 50K lines of code to R... by Hitton on Friday September 01, 2023 @11:38AM (#37352201)
[delayed]
Re:Things I wish I knew before moving 50K lines of code to R... by 0xblinq on Sunday September 03, 2023 @02:20PM (#37372812)
We should probably create a vault in the Artic and store bits of HTML, just in case... you never know.
Re:Things I wish I knew before moving 50K lines of code to R... by marban on Friday September 01, 2023 @05:05AM (#37348404)
To cap it all off, I'll add some dynamism with cgi-bin magic.
Re:Things I wish I knew before moving 50K lines of code to R... by ljm on Friday September 01, 2023 @05:33AM (#37348590)
Why use kubernetes and the cloud when you can FTP or rsync your code onto a box?

Simpler times.

Re:Things I wish I knew before moving 50K lines of code to R... by spinningslate on Friday September 01, 2023 @08:28AM (#37349944)
2nd law of Thermodynamics: Entropy increases over time.

Quoting[0]:

"The entropy of a system can in fact be shown to be a measure of its disorder and of the unavailability of energy to do work."

I rather like that - where "work" is the time spent solving first order business problems, and "disorder" is a measure of the energy spent not directly solving the business problem. AKA dealing with accidental complexity.

[0] https://www.coursehero.com/study-guides/physics/15-6-entropy...

Re:Things I wish I knew before moving 50K lines of code to R... by danuker on Friday September 01, 2023 @08:30AM (#37349973)
I deploy my static blog via rsync. I also have Isso [0] on it. No need for a back-end web framework or anything.

[0] - https://isso-comments.de/

Re:Things I wish I knew before moving 50K lines of code to R... by Scarblac on Friday September 01, 2023 @08:38AM (#37350053)
I just ssh to the server and edit the code there, I never understood why people need to have two whole environments that they keep in sync.

(though seriously, in my dorm room in the 90s, my pentium 90 desktop at the end of my bed had a fixed IP address and was the server...)

Re:Things I wish I knew before moving 50K lines of code to R... by phist_mcgee on Friday September 01, 2023 @09:02AM (#37350281)
Now add 5 people doing that at the same time and report back on how scaleable that solution is.
Re:Things I wish I knew before moving 50K lines of code to R... by yumraj on Friday September 01, 2023 @11:25AM (#37352029)
You need Kubernetes for a product which has a 5 people team?
Re:Things I wish I knew before moving 50K lines of code to R... by baq on Friday September 01, 2023 @01:10PM (#37353552)
Resume/CV won't pad by itself
Re:Things I wish I knew before moving 50K lines of code to R... by ljm on Friday September 01, 2023 @12:49PM (#37353230)
That's how we did it at my first gig with PHP and Drupal. I'm not going to say it was great or even particularly good, but given our work was split across different modules, you could easily have multiple people either uploading changes over FTP or doing some quick hacks over SSH. After all, you only needed to copy over your changes and not re-deploy the entire project. The server was a little Dell box sat under the desk of the 'CTO' in his office.

There were some cowboy-level engineering practices for sure, to the point that I'm not sure you could call it 'software engineering', but there was definitely some beauty in the simplicity of that setup compared to what we typically have to do these days. At least after you set up the box and the access to it, anyway.

Re:Things I wish I knew before moving 50K lines of code to R... by Cthulhu_ on Friday September 01, 2023 @08:23AM (#37349864)
I've developed a simple programming language to make this a bit easier, I've been using it for my Personal Home Page.
Re:Things I wish I knew before moving 50K lines of code to R... by postmodest on Friday September 01, 2023 @09:57AM (#37350907)
You have lost the Perl of Wisdom possessed by the ancients....
Re:Things I wish I knew before moving 50K lines of code to R... by raverbashing on Friday September 01, 2023 @10:24AM (#37351224)
Well get ready for Advanced Server Pages then! /s
Re:Things I wish I knew before moving 50K lines of code to R... by dakna on Friday September 01, 2023 @10:45AM (#37351457)
I wonder if you could use it to call some existing C libraries. Maybe just add some wrapper functions to execute the compiled binaries, and return the result. As long as you keep the same order of arguments for the function call, this could be quite straightforward. /s
Re:Things I wish I knew before moving 50K lines of code to R... by gear54rus on Friday September 01, 2023 @07:59AM (#37349648)
Sure, that's what we'll do! Sounds grand!

By the way, we need to add another feature to our page, would you mind looking through that file so there are no class collisions? What do you mean its too long? 50k lines? Pfft.. But at least it 'gets transferred to the browser pretty fast'

Re:Things I wish I knew before moving 50K lines of code to R... by SanderNL on Friday September 01, 2023 @08:14AM (#37349779)
Be sure not to disturb this apprentice's troubled mind with such highly advanced topics as server side includes and related sorcery.

Do not awaken the Ancients for only the pure of heart will survive such an encounter.

Re:Things I wish I knew before moving 50K lines of code to R... by gear54rus on Friday September 01, 2023 @09:33AM (#37350617)
Yeah 10 different files with 10k unorganized lines each is totally different :D

I swear you js haters never fail to make me laugh with all the ignorant lamentations.

Re:Things I wish I knew before moving 50K lines of code to R... by vitro on Friday September 01, 2023 @09:38AM (#37350689)
You are not your technology.
Re:Things I wish I knew before moving 50K lines of code to R... by gear54rus on Friday September 01, 2023 @09:53AM (#37350863)
Im14andthisisdeep :) Did I ever say otherwise? Tools are invented to make things more convenient and not learning them properly is not an excuse to whine.
Re:Things I wish I knew before moving 50K lines of code to R... by ricketycricket on Friday September 01, 2023 @12:06PM (#37352572)
You are wholesale calling people ignorant over a technology decision.

> When disagreeing, please reply to the argument instead of calling names. "That is idiotic; 1 + 1 is 2, not 3" can be shortened to "1 + 1 is 2, not 3."

Re:Things I wish I knew before moving 50K lines of code to R... by SanderNL on Friday September 01, 2023 @09:57AM (#37350905)
You utter these heresies whilst holding 10k files each containing 10 demonic incantations.

Let us not sink into unproductive musings of the intellect, but meditate on the nature of the pendulum swing.

Re:Things I wish I knew before moving 50K lines of code to R... by gear54rus on Friday September 01, 2023 @10:23AM (#37351216)
My ducks are in the row and there is no pendulum swing. There is one only in people's heads. People who didn't learn the tools then (when JS era started) and are refusing to learn them now (when more and more focus is on SSR). These people's opinions are irrelevant as their only argument is that they didn't invest the time to understand the benefits.
Re:Things I wish I knew before moving 50K lines of code to R... by SanderNL on Friday September 01, 2023 @10:46AM (#37351482)
I, too, hail from those lands overrun with the elemental curly brackets. Yet my understanding has matured and is now ready to receive new wisdom and insights.

I would be careful assuming too much about us, who are wise in the ways of the world and, dare I say, exceedingly goodlooking.

Re:Things I wish I knew before moving 50K lines of code to R... by bdcravens on Friday September 01, 2023 @10:47AM (#37351488)
> These people's opinions are irrelevant as their only argument is that they didn't invest the time to understand the benefits.

Wouldn't the same be true of "JS era" developers who never learned the basics of a static website or a templated server-side app? If the issue is being too lazy to have more than one tool in your toolbox, then it applies to everyone.

Re:Things I wish I knew before moving 50K lines of code to R... by starkrights on Friday September 01, 2023 @12:32PM (#37352993)
Do these guys actually think you should only write a singular (or maybe even a low plural number of) html file(s)? That’s crazy haha, that’d be pretty rough to maintain!

Could they have been joking that, maybe, there’s a lot of folks who are a little too tunnel visioned on the newest most modern js metaframeworks that they have little or limited knowledge of the foundations of their ecosystem? Given that you know something about html files and basic web servers, was your position necessarily the original subject of the joke/point here? Surely it was! Gruff old school devs are so obstinate and short sighted haha.

You opened, intending to construct an argument on your genuine position, with a massive strawman, on a lighthearted commentary over a line from the article that was purposefully taken slightly out of context- not even remotely a tirade on “js hating.” You’re not having an argument in this comment thread with anyone, because no one was even discussing anything to begin with.

I think there’s things to laugh at here (like the original joke) that aren’t how genuinely stupid you think the commenter who is ironically replying to every of your comments in a vague and mystical tone.

Re:Things I wish I knew before moving 50K lines of code to R... by sodapopcan on Friday September 01, 2023 @08:57AM (#37350233)
My brother just started learning web development this past year and his mind was blown when I told him you could send HTml over HTtp.
Re:Things I wish I knew before moving 50K lines of code to R... by datavirtue on Friday September 01, 2023 @09:40AM (#37350715)
Please help the guy before he gets too far along. Some of us might have to work with him.

Seriously though, I saw someone described as a 22 yr old software engineer in an article. There is a better term: "Software Engineering Apprentice"

Re:Things I wish I knew before moving 50K lines of code to R... by sodapopcan on Friday September 01, 2023 @10:45AM (#37351459)
For context, he's 40 years old and working in data science after a career switch from another data-heavy field. He's just learning web dev to build internal pages for displaying stuff, so no need to worry :D
Re:Things I wish I knew before moving 50K lines of code to R... by EricMausler on Friday September 01, 2023 @12:07PM (#37352605)
Unionize already.

It's not just about wage, it's about assigning appropriate work to peoples level and having them progress through the most efficient steps to mastery while also completing billable hours

Re:Things I wish I knew before moving 50K lines of code to R... by chasd00 on Friday September 01, 2023 @02:02PM (#37354218)
> ...it's about assigning appropriate work to peoples level and having them progress through the most efficient steps to mastery...

that's the opposite of what a union does. A union rewards seniority and nothing else.

Re:Things I wish I knew before moving 50K lines of code to R... by datavirtue on Friday September 01, 2023 @07:13PM (#37357145)
Yeah...OK. Found the union hater.
Re:Things I wish I knew before moving 50K lines of code to R... by fortzi on Saturday September 02, 2023 @05:41PM (#37365783)
Normally workers unionize to improve their poor conditions vs an abusive employer, and when they have little to no ability to find another job for similar/better terms. Is that the situation for software devs where you’re at?
Re:Things I wish I knew before moving 50K lines of code to R... by EricMausler on Tuesday September 05, 2023 @11:43AM (#37393294)
That may be common circumstances where a union becomes the only viable option for the workers, but unions have additional benefits that something like it would greatly benefit the software industry.

In particular, it's the assignment of work to the union and then the union is responsible for pairing workers with the assignments which enables the union to create a training funnel where different requirements of the same job can be split among different workers of varying seniority such that apprentices are able to work on the easier items even when there are things beyond their skill involved in the overall work assigned to the union.

Typically a union does primarily exist to create CBAs for wages but this is another function of them which I think would be very helpful for SE and future protection.

So maybe not a traditional union is necessary, but I think there are some functions more or less exclusive to unions right now that would be beneficial to apply to SE. Hopefully that makes sense

Re:Things I wish I knew before moving 50K lines of code to R... by BeefyMcGhee on Saturday September 02, 2023 @11:34AM (#37362432)
While we're gatekeeping, how about "Software Developer Apprentice"? This stuff isn't technically engineering.
Re:Things I wish I knew before moving 50K lines of code to R... by renegade-otter on Friday September 01, 2023 @10:19AM (#37351166)
God help us. It's not his fault, to be clear, but God help us.

The problem is the dogmatism of it all. If you point to a simpler and a more obvious solution, your coworkers will ridicule you and turn you into an old man pariah.

Re:Things I wish I knew before moving 50K lines of code to R... by sodapopcan on Friday September 01, 2023 @10:47AM (#37351485)
Tell me about it. I had a lot of trouble in job interviews last year.
Re:Things I wish I knew before moving 50K lines of code to R... by yoyohello13 on Friday September 01, 2023 @10:37AM (#37351376)
I slapped my forehead when I was reading a thread about HTMX and someone asked. "How can you send HTML to the browser without JavaScript?"
Re:Things I wish I knew before moving 50K lines of code to R... by sodapopcan on Friday September 01, 2023 @10:47AM (#37351497)
Yep... yep.
Re:Things I wish I knew before moving 50K lines of code to R... by pier25 on Friday September 01, 2023 @11:27AM (#37352047)
It's not React's fault but the ignorance of the average React dev never stops surprising me. From using divs for buttons or links to this.
Re:Things I wish I knew before moving 50K lines of code to R... by mock-possum on Friday September 01, 2023 @02:33PM (#37354563)
Yeah modern JavaScript frameworks heavily discourage semantic markup, and I’m salty about it.
Re:Things I wish I knew before moving 50K lines of code to R... by FractalHQ on Saturday September 02, 2023 @05:11PM (#37365559)
Svelte must be an exception to that rule because semantic html is a first-class citizen.
Re:Things I wish I knew before moving 50K lines of code to R... by botverse on Friday September 01, 2023 @03:38PM (#37355300)
react-native-web
Re:Things I wish I knew before moving 50K lines of code to R... by bakuninsbart on Saturday September 02, 2023 @07:45AM (#37360610)
I think a big part of the problem is how online education and bootcamps/college degrees for web-dev are structured. Often times people are so overwhelmed with the stack they are supposed to learn that quite obvious and important stuff gets lost. People just try things out until it works without understanding the underlying structure. If you come from a simpler MVC framework like Rails or Laravel, it enables you to focus on the really important stuff first, and explore from there. It is also much more rewarding to see some solid results early.
Re:Things I wish I knew before moving 50K lines of code to R... by pier25 on Saturday September 02, 2023 @09:44PM (#37367008)
Yeah the issue is that beginners are not learning web dev or even front end, they are learning React.
Re:Things I wish I knew before moving 50K lines of code to R... by SilasX on Friday September 01, 2023 @02:21PM (#37354452)
Reminds me of the joke about, "Omg, that's amazing, the new iPhone will support voicechat ... and you can use your phone number as your screenname!"
Re:Things I wish I knew before moving 50K lines of code to R... by j5155 on Friday September 01, 2023 @06:11PM (#37356689)
A joke made even funnier by being true (FaceTime Audio)
Re:Things I wish I knew before moving 50K lines of code to R... by consoomer on Friday September 01, 2023 @09:25AM (#37350517)
What next? Are you going to tell me you can send down a text file that runs code on a page by page basis?
Re:Things I wish I knew before moving 50K lines of code to R... by swader999 on Friday September 01, 2023 @10:30AM (#37351299)
Blasphemy!
Re:Things I wish I knew before moving 50K lines of code to R... by layer8 on Friday September 01, 2023 @11:20AM (#37351969)
The problem is that browsers started out as hypertext clients and unwittingly evolved into application platforms to implement, among other things, custom hypertext clients in it. Somehow “lets add more features to make hypertext more capable” turned into “you’re on your own now to implement a usable application with this huge pile of impedance-mismatched features”.
Re:Things I wish I knew before moving 50K lines of code to R... by satvikpendem on Friday September 01, 2023 @05:10PM (#37356211)
You might be interested in this article by the creator of the HTML5 spec: https://news.ycombinator.com/item?id=34612696

He talks about using WASM for applications and HTML/CSS/JS for basic websites.

Re:Things I wish I knew before moving 50K lines of code to R... by solardev on Saturday September 02, 2023 @09:48AM (#37361509)
The article link (not yours, but the link to the article from your link) doesn't seem to work.

What does he suggest we do about the UI layer? Draw pixels on a canvas from WASM?

Re:Things I wish I knew before moving 50K lines of code to R... by satvikpendem on Saturday September 02, 2023 @10:43AM (#37361961)
Try this link: https://docs.google.com/document/d/1peUSMsvFGvqD5yKh3GprskLC...

Yes he says to use a language that compiles to WASM for the UI parts to draw pixels on the screen.

Re:Things I wish I knew before moving 50K lines of code to R... by solardev on Saturday September 02, 2023 @10:45AM (#37361983)
Isn't this a redo of Flash and ActiveX, then?
Re:Things I wish I knew before moving 50K lines of code to R... by satvikpendem on Saturday September 02, 2023 @10:57AM (#37362099)
Yep, and it's pretty nice. However, he talks about important things that weren't in Flash, like accessibility, and how to handle them cleanly.

It really seems like WASM will be the write once run everywhere runtime that was touted in the past. Java almost got us there but was too dependent on Java, whereas WASM is for any language. I've been using Flutter with their experimental web WASM support and it's very fast.

Re:Things I wish I knew before moving 50K lines of code to R... by solardev on Saturday September 02, 2023 @11:23AM (#37362325)
I think this makes sense for complex apps like games, CAD and design software, etc.

I hope it doesn't replace the lowest common denominator of HTML for generic apps, though, if only because it would dramatically raise the barrier to entry (not that your typical React app is particularly readable in the inspector...).

Re:Things I wish I knew before moving 50K lines of code to R... by satvikpendem on Saturday September 02, 2023 @11:26AM (#37362349)
Yeah Figma is in WASM and it's great that it is. I don't see it coming for React apps, really. Or if it is, that the JS tooling itself will automatically convert it to WASM.

I personally use Flutter for a lot of my apps, as well as React/NextJS for SEO based apps, the combo works pretty well.

Re:Things I wish I knew before moving 50K lines of code to R... by solardev on Saturday September 02, 2023 @11:30AM (#37362380)
Yeah, Figma's tech is incredible! Especially when I use side by side with Microsoft Teams, lol. One's a complex layered drawing app with plug-ins and imports and the other is a glorified chat app... guess which one is 10x slower and crashes every half an hour?

Whelps. Time to learn C++ again!

Re:Things I wish I knew before moving 50K lines of code to R... by satvikpendem on Saturday September 02, 2023 @11:32AM (#37362408)
Might I suggest...Rust? It really is a great language and it has excellent WASM support due to not being GCed, just like C++.
Re:Things I wish I knew before moving 50K lines of code to R... by solardev on Saturday September 02, 2023 @11:33AM (#37362419)
Good idea. Sounds fun, actually!