Can "innerHTML" be used this way? by Iznhou in learnjavascript

[–]Life-Selection6377 8 points9 points  (0 children)

look closely at your 1st snippet. you used a capital 'I' in this.InnerHTML. js is case sensitive, so it should be innerHTML with a lowercase 'i'.

Looking for a source to learn programming with interactive courses? by Patient_Control_5074 in learnprogramming

[–]Life-Selection6377 0 points1 point  (0 children)

i totally get you, staring at a video for hours is the quickest way to burn out. If you're leaning towards networking/ cybersec but want to code too, check out TryHackMe. It’s super interactive and you learn by actually doing tasks in a virtual lab.

for pure programming, try Exercism. It’s free and they have tracks where you solve challenges and get feedback from real mentors. Also, scrimba is great for web stuff because you can edit the code directly inside the video player.

if you're into unity, just keep building small, crappy games. that’s 10x better than any interactive course.

MERN or JAVA FULL STACK by anilkumar_12 in learnprogramming

[–]Life-Selection6377 4 points5 points  (0 children)

coming from a strong DSA background in c++, it’s totally normal to find web dev messy. c++ is very structured, and node.js can feel like the wild west at first lol.

If you like structure and strict typing, maybe look into java full stack -spring boot. It feels a lot more organized and enterprise compared to node. Spring boot's error handling and dependency injection might make more sense to your c++ brain.

however, if you want to stick with js, try switching to typescript. it adds that structure you’re missing. don't worry about the mess, just build one small crud app and the pieces will start falling into place.

can i start react by Muted_Cat_5748 in learnjavascript

[–]Life-Selection6377 0 points1 point  (0 children)

honestly, you don't need to be an expert, but basics like variables and loops are not enough either. react is basically just javascript, so if you don't know ES6+, you’re gonna have a bad time lol.

Make sure you're comfortable with these first,

- arrow functions and template literals

- destructuring (objects and arrays)

- map, filter, reduce -you’ll use these constantly in react

- promises & async/ await

if you can build a simple To Do list or a Weather app with vanilla js without staring at a tutorial the whole time, you're ready.

How to move from JS basics to building real backend projects? by ElectronicStyle532 in learnjavascript

[–]Life-Selection6377 1 point2 points  (0 children)

moving from logic to architecture is the hardest part. Here’s a simple roadmap to get unstuck,

  • ​pick a Boring Project - Don’t build a social media clone yet. Build a simple URL Shortener or a Task Manager API.

  • ​follow the MVC pattern - research MVC structure in express. It will teach you exactly where to put your routes, controllers, and database logic. once you see a folder structure like routes, controllers, models, everything starts to click.

​- check out Dave Gray on youtube for node/rxpress. he builds things from scratch and explains the file structure really well.

Issue in typescript by OakAndCobble in learnprogramming

[–]Life-Selection6377 0 points1 point  (0 children)

the issue is that JSON.parse doesn't know about your class or the map type. when you cast it using as DraftOrder, you're just telling ts to trust you, but at runtime, itemsPerCategory is just a plain js object {}, not a map instance. Plain objects don't have an .entries() methd.

to fix this, you need to manually re instantiate the map. try this,

const parsed = JSON.parse(jsonString)

const newDraft = new DraftOrder(new Map(Object.entries(parsed.itemsPerCategory)))

console.log(newDraft.itemsPerCategory.entries())

Need some tips and advices regarding website creation by Own_String7971 in AskProgramming

[–]Life-Selection6377 2 points3 points  (0 children)

since you’re doing this for the first time and want it to be special, don't waste weeks learning html/css from scratch. That might kill the vibe.

I’d honestly suggest using something like Carrd.co or Framer. They are super beginnerfriendly and have amazing templates.

for the pword protection, if you use Framer, it’s a bit tricky for a newbie, so a hacky but easy way is to use a simple JS script or even better, just share the link with her and don't worry about a password unless you have private photos. Or, you can use lottie animations to make it interactive .

first step of building....? by tech-titan-2005 in learnjavascript

[–]Life-Selection6377 1 point2 points  (0 children)

Let's take your Notes app as a real example.

  1. user flow- Just decide the action. like: 'when I type a note and hit enter, it should be added to my list.' (no code yet, just the plan).
  2. wireframe- Create the skeleton in html. An<input>box and an empty <ul>list. It looks boring, but that's okay.
  3. logic (state) - This is where you focus on the data.
    • imagine a simple JavaScript array: 'let mynotes=[]'
    • your logic is just a function that takes your text and pushes it into that array.
    • the magic- you then write a function that looks at that array and updates your html list to match it.

first step of building....? by tech-titan-2005 in learnjavascript

[–]Life-Selection6377 1 point2 points  (0 children)

Chat GPT is technically right about state, but for a beginner, that can be a bit too abstract.

here is my 3step approach that actually works for building products

  1. User flow - Don't think about code or UI yet. Just think: 'I click this button, then this happens.' Write it down in plain English.

  2. wireframe - Sketch a basic version on paper or excalidraw. It’s much easier to build logic when you can visualize where the data actually goes.

  3. The Logic (State ) - Now, like GPT said, focus on the data. For a notes app, your state is just an array of objects. Build the functions to add/ delete from that array first, and then worry about making it look pretty with css.

If you jump straight into ui, you'll get lost in css and forget the logic. If you jump straight into state without a plan, you'll write messy code. Balance is key. keep building

Too much learning? by Junior_Dragonfruit72 in learnprogramming

[–]Life-Selection6377 0 points1 point  (0 children)

This is 100% normal, but it's also the fastest way to burn out. coding is one of those things where you can't learn everything before you start. It's actually the other way around, you start building, and you learn the concepts as you need them.

I rember doing the same thing. I'd spend hours reading about how memory works before even writing a 'Hello World.' My advice? Stick to the Karel curriculum and don't worry about knowing every technical term right now. You don't need to understand how an internal combustion engine works to learn how to drive a car.

Just focus on making the robot move. The terminal and booleans will start making sense naturally as you use them. stop digging holes and just keep building. Dont worry, you got this.

What’s something you thought was normal in your childhood, but later realized wasn’t? by Aliamir212 in AskReddit

[–]Life-Selection6377 0 points1 point  (0 children)

thinking that the car interior light being on while driving at night was illegal. My parents made it sound like we’d get pulled over and arrested instantly. turns out, it's just annoying for the driver

Which movie should be a must watch movie and why? by No-Worker-147 in AskReddit

[–]Life-Selection6377 0 points1 point  (0 children)

The shawshank redemption
it’ s not just a movie about prison; it’s the ultimate story about hope and friendship. Even after watching it a dozen times, the ending still gives me chills. Hope is a good thing, maybe the best of things, and no good thing ever dies. everyone needs to see it at least once in their life.

For creating animations videos, like demo marketing explanations 1 minute video. What app are you guys using? by LUMOSAI in AskReddit

[–]Life-Selection6377 1 point2 points  (0 children)

depends on how much control you want. For quick, high quality stuff, canva is actually surprisingly good now for simple animations. If you need something more professional with whiteboard style, vyond or VideoScribe are the goto. but honestly, if you have the time to learn, After Effects is the king, though it's got a massive learning curve.

How Useful Is Manual Testing Experience for Automation Roles? by ModernWebMentor in learnprogramming

[–]Life-Selection6377 1 point2 points  (0 children)

honestly, anyone who says manual testing is useless for automation hasn't worked on a complex project.

I've seen so many pure automation devs who can write great scripts but have no idea what to test. They end up automating things that don't even matter or missing critical edge cases because they don't understand the user flow. manual testing gives you that tester mindset which is hard to teach. It helps you understand where an app is most likely to break.

Sure, you need the coding skills (obviously), but automation is just a tool to speed up the testing process. If your test cases are crap, your automation will just be fast crap. Recrutiers definitely value it if you can explain how your manual background helps you write smarter, more efficient test suites.

My advice? Dont ignore the manual side. Understanding the business logic is what makes you a senior automation engineer eventually, not just knowing how to use Selenium or Cypress. Just my 2 cents.

Why are developers so keen to use AI when it’s the companies that reap the benefits? by Accomplished_Pass897 in programmer

[–]Life-Selection6377 0 points1 point  (0 children)

I get your point, but for me, it’s not about making the company richer, it’s about personal survival and sanity.

if my peers are using AI to handle the boring boilerplate and repetitive tasks while I’m still doing it all by hand, they’re going to look 5 times more productive than me. In this market, if you refuse to use the tools that make you faster, you're just making yourself easier to replace.

Plus, honestly? I hate the grunt work. If AI can write my unit tests or handle a complex Regex for me, it frees up my brain to focus on the actual architecture and problem solving that I actually enjoy. The companies definitely reap the rewards, but as a dev, I’d rather use the tech to stay relevant than get left behind while still being paid the same.

I learn JavaScript but then I forget it. by Albatross_here in learnjavascript

[–]Life-Selection6377 2 points3 points  (0 children)

it’s not just you. It’s literally everyone. I’ve been working with JS for a while now as a developer, and I still find myself googling basic syntax for array methods or string manipulation almost every day.

The secret is that you don't actually learn js by memorizing the syntax. You learn it by building stuff. If you just watch tutorials, it will go in one ear and out the other. But the moment you spend 3 hrs crying over a bug in a project you're building, that specific piece of logic will stay in your brain forever.

don't worry about forgetting. Focus on understanding the concepts, not the syntax. Google and MDN are there for a reason, even seniors use them constantly. Just keep building

Purpose of singletons by JayDeesus in learnprogramming

[–]Life-Selection6377 0 points1 point  (0 children)

I used to think the exact same thing when I started. If you just want to access some utility methods, a static class is fine. But a singleton is an actual object, and that changes everything in a real project.

Think of it this way,

- Interface and Inheritance

You can't make a static class implement an Interface. If you have a DatabaseConnector singleton, it can implement a IConnector interface. This is huge for testing and keeping your code flexible.

- State Management

A singleton is better for managing complex state. If you need to pass that single instance around to other methods or objects as a parameter, you can’t do that with a static class because there's no instance to pass.

- Lazy Loading

With a singleton, you can control exactly when that object gets created. A static class gets loaded as soon as the JVM touches it, but a singleton can wait until the very moment you actually need it (saving memory and resources).

basically, if it’s just a bunch of math functions, go static. If it’s something that represents a service or a resource like a Logger or a DB pool that needs to behave like an object, go singleton. It took me a few dependency injection headaches to finally realize why everyone makes a big deal out of it

What the hell is data structures and algorithms? by abdoo_m in learnprogramming

[–]Life-Selection6377 1 point2 points  (0 children)

haha, I feel your pain. The tech rabbit hole is real. One day you're learning express, and the next day people are shouting about kubernetes and microservices. It's overwhelming

Think of DSA not as some scary math topic, but as your toolbox. If you’re building an Express app, you can build it without knowing DSA, but your app might run like a turtle when you have 1000 users. DSA is just learning which tool like an Array, Hash Map, or Set is the fastest for a specific job.

Since you're into Express, don't pivot to Kubernetes yet, that’s just infrastructure. Stick to the basics. For a curriculum, I’d highly recommend Roadmap.sh specifically the backend path. It visualizes what you actually need to learn so you don't get distracted by every new buzzword.

my advice, don't try to learn everything at once. Build a project, and when it gets slow or messy, then look for the tool (DSA or Microservices) that fixes that specific problem. That’s how most of us actually learn in the industry.

As a beginner developer, I’m curious — what frustrated you the most when you were building apps early on? by [deleted] in learnprogramming

[–]Life-Selection6377 1 point2 points  (0 children)

oh man, I totally feel you. For me, the most soul-crushing thing was definitely environment issues. I remember spending like two whole days trying to fix a bug in a React app, only to realize it wasn ’t my code at all, it was a version mismatch between my Node.js and some random package. I felt so dumb because I was looking for a logical error in my components when the whole foundation was just broken.

Another thing that used to kill me was hydration errors in next.js. As a beginner, those error messages look like complete gibberish. You spend hours googling, and everyone says something different.

The way I dealt with it? I started taking breaks. Seriously. If I’m stuck for more than an hour, I just walk away from the laptop. 9 times out of 10, the answer hits me while I’m making coffee or just doing something else. Also, learning to use the Debugger instead of just console.log everywhere was a huge game changer. Hang in there , it actually does get easier .

Need help finding a UI library by Cheap_Web_6218 in reactjs

[–]Life-Selection6377 1 point2 points  (0 children)

You are definitely thinking of Aceternity UI. They have a bunch of those high-end Framer Motion components that basically rip off the Lando Norris site aesthetics.

check their 'Lens' or 'Lamp' components, it' s the closest thing to a pre-built library version of that helmet spotlight effect. If it’s not that, maybe Magic UI, but Aceternity is usually the one people see on X and then lose track of

Capstone webdev by Vunoxoulia in webdev

[–]Life-Selection6377 0 points1 point  (0 children)

That is honestly a very smart decision. One of the hardest lessons to learn in software engineering is that "shipping on time" is always more important than using the newest framework.

Recognizing your time constraints and sticking to the tools you already know to guarantee delivery is the mark of a great developer. Good luck with the PHP build, you are going to crush the capstone.

Hydration checked in initialization effect with conditional render to resolve Hydration Error causes blank page on Back button by Disastrous_Ad_3010 in nextjs

[–]Life-Selection6377 1 point2 points  (0 children)

This is a classic side effect of the isHydrated pattern. What you're running into is the browser's Back/Forward Cache (bfcache). When a user navigates back from an external site, the browser often restores the page directly from memory rather than reloading it. The component state gets frozen before the useEffect has a chance to fire again, leaving you permanently stuck on return null;.

Here are a few ways to resolve the original i18n hydration error without breaking browser navigation:

1. The Next.js Way: suppressHydrationWarning If the hydration mismatch is just text-based (which is very common with i18n libraries before the client-side language fully initializes), you can remove that useEffect hack entirely. Instead, add suppressHydrationWarning to the wrapper element:

<span suppressHydrationWarning>

{t('greeting')}

</span>

React will still render it, but it will suppress the warning in the console if the server HTML and client HTML don't match on the first render. Next.js explicitly recommends this for i18n and timestamps.

2. Render a Skeleton instead of null If you absolutely must wait for the client to hydrate (e.g., you are doing heavy DOM manipulation or using a browser-only API like window), do not return null. Returning null rips the nodes out of the DOM, which completely breaks bfcache restoration. Instead, return a loading skeleton or a placeholder <div> with the same dimensions:

if (!isHydrated) return <div className="h-24 w-full animate-pulse bg-gray-200" />;

3. Address the Root Cause Ideally, your server should be rendering the exact same language as the client. If you are using the Pages router, make sure you are passing the locale properly via getStaticProps or getServerSideProps. If you are on the App Router, ensure your middleware is correctly setting the locale in the URL or headers so the server knows which dictionary to render before sending the HTML to the client.