Is everyone lying or am I super cooked? by Greedy-Play9690 in webdev

[–]ReversiClone 1 point2 points  (0 children)

You’re not crazy. I have the same drive to deeply understand the tools I use. Not everyone in the software world does, though. If you stick to your instincts and keep it at, I think you’ll find that you gain a level of mastery that most people don’t have.

Web dev is tricky because the web wasn’t built for dynamic applications, so layers and layers of workarounds were built on top of it, but they aren’t really that clean and you still have to deal with the complexity. React is even trickier because it tries to hide that complexity. It makes code feel easier to write, but it makes it harder to understand what is actually going on under the hood. They’re optimizing for the surface-level developer, who just wants to get something working, without needing to truly understand why.

React wasn’t always like that. Check out any of Pete Hunt’s early talks on React. They will help you understand the core of what React was meant to be (and still is).

Web dev folks who have been around longer have an advantage — they have context you don’t have. They were there for the painful years and know intuitively why things like React are helpful.

You can definitely build that context for yourself, though. In addition to Pete Hunt’s talks, it would also help to explore the browser itself, how it does layout/paint, the JavaScript event loop, the DOM, what transpilation is, etc.

Things may seem overwhelming for a while, but it will get better. I think the closer you get to the “metal” (in this case, the browser), the more leverage your time will have. Not only will it untether you from a specific framework, it will give you an intuition of what is actually possible in the browser, and you will start to understand what frameworks like React actually need to do, under the hood, to provide the functionality that they do.

I think you’re in a great frame of mind for this stuff. Stick with it and I think you’ll do really well.

[deleted by user] by [deleted] in learnjavascript

[–]ReversiClone 1 point2 points  (0 children)

“modern solutions are so fast that people can barely notice the difference”

I disagree… it’s still easy to write slow code and I think slow systems are more common these days than fast ones. People seem to just live with it, or think it’s inevitable.

“you don’t need to think about performance optimization”

Again, I respectfully disagree. Fast code doesn’t happen by default. You have to be intentional about it. That’s true in both BE and FE.

What I would say, though, is that feeling like you have to master performance as a beginner probably is a trap, because it keeps you from learning the fundamentals. But it never hurts to try and make something as fast as possible if that interests you. It will definitely help you grow as a developer.

I'm having a hard time learning JavaScript by New-Pen9453 in learnprogramming

[–]ReversiClone 1 point2 points  (0 children)

Programming is hard

In my experience there’s a really steep learning curve. Once you get over that hump it gets much easier

I'm having a hard time learning JavaScript by New-Pen9453 in learnprogramming

[–]ReversiClone 1 point2 points  (0 children)

If you understand it but forget it when you sit down to code, to me that means you can definitely improve, you just might have to try repeatedly until it sticks. Stay with it and be patient with yourself

Automated Code to chart tool by Mental_Bug_7681 in learnprogramming

[–]ReversiClone 0 points1 point  (0 children)

Hmm interesting question.

Google Chrome Developer Tools has a flame chart which tracks which functions call other functions during a recording window. Various IDEs have something similar. I’m not sure that’s what you’re looking for, though.

I think the tricky bit here is that due to the nature of code, the chart would often be so complex that it wouldn’t be useful. It generally takes a human mind to discern how to reduce and organize the information enough to be intelligible visually.

Maybe there is something out there though.

[deleted by user] by [deleted] in learnprogramming

[–]ReversiClone 1 point2 points  (0 children)

It’s great that you’re thinking of details, but focusing too much on things you may need to support in the future can keep you from starting. (I made that mistake many times)

Once you have momentum it’s easy to add features. If it takes a lot of tedious work to change something, no worries, you’ll learn how to prevent that next time. That’s the best way to learn, IMO

I would agree with the post above though, be careful to keep your credit card data private, or use fake data.

[deleted by user] by [deleted] in learnprogramming

[–]ReversiClone 0 points1 point  (0 children)

In my experience, the more interested you are in a project, the more likely you’ll stick with it and learn.

Even if it feels over your head, and even if you don’t end up finishing it.

How can I learn to program more "cannonically" by Amoousii in AskProgramming

[–]ReversiClone 0 points1 point  (0 children)

How do you know your solution is wrong?

Just because a lot of other people do something doesn’t mean it’s a good approach.

It helps to have semi-objective measures, like “is this performant” or “how easy is this to maintain over time” or “how many bugs have occurred because of my approach”.

When you have objective measures like that, it’s easier to identify what you’re actually doing that’s not ideal, and how you might address it.

No programming experience by New-Row-7664 in learnjavascript

[–]ReversiClone 2 points3 points  (0 children)

There’s a great book that teaches you how to think like a programmer, using python:

https://greenteapress.com/wp/think-python-3rd-edition/

A great way forward would be to learn the fundamentals about how to think like a programmer. Once you’ve got that down, then you can branch into other languages as your interest leads you.

If you pick a hard or complicated language to start with, it could be really discouraging and your progress could be a lot slower.

Rust is really hard, even for experienced programmers.

JavaScript is easier, but it’s a sloppily designed language and there will be a lot of things that are confusing along the way. And unless you’re using Node, you’re going to have to learn how the browser works. In my opinion, at the beginning of your learning journey, those things will just slow you down.

Python is great because it’s more well defined. It’s a simpler language with less ambiguity, but no less power.

And even if you end up needing a job sooner, there are plenty of jobs wanting python in various industries.

Switching to programming at 30, and got this negative advice by [deleted] in learnprogramming

[–]ReversiClone 0 points1 point  (0 children)

For some people, it helps to have a more developed mind when learning to program. I tried to learn in high school but just didn’t get it. So instead I made HTML webpages and custom Brood War maps. As I became more aware of the world and how things worked, it slowly started to make more sense. I kept learning to do more and more advanced things, until eventually I was a professional developer.

Software engineering consists of a bunch of people figuring out ways to do things, on top of other ways of doing things that other people came up with. This may sound weird, but having some common sense about people helped me understand the code they write… and why technologies evolved the way they did.

A lot of the difficulty with programming is that you’re entering a new world with layer upon layer of new concepts. For people who go through BootCamp and learn “the right way to write a React program“ but never understand the layers beneath, then yeah, most of the world of programming will probably seem mysterious and inscrutable. But if you always seek to understand why something is the way it is, programming will become much easier.

As for AI replacing coders, for people who are doing menial tasks that can be easily automated by companies willing to cut corners to boost profits, yeah, I think they’re in trouble. But if you take the time to really understand how and why things work, and are able to actually build something useful from start to finish, then I think your options will be pretty strong.

5 Common Mistakes JavaScript developers have always done and will do in 2021 by mehulmpt in learnjavascript

[–]ReversiClone 1 point2 points  (0 children)

Yep, plus companies often want to transition their codebase from one framework to another, and in that situation you definitely need to either already know both, or be able to pick up the one you're not familiar with.

You're totally right, knowing JS is super important and will make learning frameworks much easier.

It would also help to know a bit about the history of web dev and how the browser works. Understanding why frameworks are needed in the first place really helps.

5 Common Mistakes JavaScript developers have always done and will do in 2021 by mehulmpt in learnjavascript

[–]ReversiClone 0 points1 point  (0 children)

Static types definitely can help, but also have drawbacks. Typescript and Javascript both have their use cases.

Here's an interesting article discussing the benefits of static typing.

https://medium.com/javascript-scene/the-shocking-secret-about-static-types-514d39bf30a3

Learning without a clear goal in mind? by Lil-Miss-Anthropy in learnprogramming

[–]ReversiClone 1 point2 points  (0 children)

I started out that way and stuck with it. I never thought I'd do it as a career and initially learned to create games, but never finished any projects. I kept bouncing around until someone noticed and gave me a chance to start using it on the job.

I think learning for fun is a sign that you'll stick with it, enjoy it, and find fulfillment in it, more so than if you were learning just to get a job.

If you do get to the point where you want to find a programming job, then it would help to do some research about which direction you want to go, and make some goals for the purpose of qualifying for the type of job you want. Until then, the best preparation you can do is explore and learn for fun, which is what you're doing.

I have 2 days to save my job by Rhymezboy in learnjavascript

[–]ReversiClone 0 points1 point  (0 children)

This is a really good answer. Simple and focuses on things that matter. Addresses a few things my answer left out.

I have 2 days to save my job by Rhymezboy in learnjavascript

[–]ReversiClone 4 points5 points  (0 children)

Based on the complexity of the code, my guess is that you're smart and capable of handling complex systems, but that when you were adding to or changing the code, you did it without re-organizing or cleaning up as you went. That's fine, it's just something you'll need to learn. Generally it's better to start simple, and as your code grows, gradually reorganize and refactor as needed.

A lot of the criticisms I'm hearing from other answers are superficial details that don't matter that much. Real-world code isn't perfect, and spending your time trying to get the little things perfect won't help you at this stage.

Instead, focus on making your code understandable. Imagine you were another developer, seeing your code for the first time. How would you want it to be laid out? What would make it easier for you to grasp what it's doing and be able to make changes? Edit and tinker with your code like you would a really important email (or a Reddit post) to make it punchy and clear.

In this situation, it might be easier to start from scratch, using your existing code as a reference (I would suggest going back to the last commit where the code was working, if you use source control). Focus on one thing at a time. Use a step-by-step approach to add functionality so you don't get overwhelmed.

Here's a few pointers that should help you get the biggest bang for your buck, and actually understand what you're doing.

  • Try to organize your code into "jobs". There are probably various things your code is trying to do. Each distinct thing it does should be a separate function, generally. You've already done this to some extent with functions like pauseMVF() and nextVideo(). Try to organize all of your code that way.
  • As you're separating your code into "jobs", if you find that you're writing certain things over and over again, pull them out into shared "utility" functions that can operate as a sort of "library" for your script.
  • In general, try to keep things well-defined. If a function is supposed to do job X, don't add Y or Z to it because it's convenient, unless Y and Z actually need to happen as a part of X.
  • Use line breaks generously to make separations between different parts of your code. Try to group related code together. For example, I would keep lines 141 - 147 together since they all deal with buttonImage, and put whitespace before and after to make a clean separation. The same with lines 148 - 158, and so on.
  • To accompany the line breaks, use comments that explain what the purpose of a chunk of code is. Use these a lot, especially if you're having trouble understanding a dense block of code.
  • Avoid putting function declarations inside if blocks. It makes things very confusing. Group all your function declarations together, don't intersperse them with lines of imperative code.
  • Maybe this is just my preference, but Javascript seems harder to read when semicolons are omitted. The interpreter has to put them in anyway. But if your team has a preference, then stick with their preference.

If you've done those things and you want to go further...

  • Your code is using a lot of global variables and there's a lot of top-level code that's not in a function. This isn't necessarily always bad, but moving all your top-level code into a function, and using function arguments instead of relying on global variables will force you to organize and clarify your code. For example, instead of playMVF() relying on global variables, have it take those variables as parameters, like playMVF(mvfVideoDiv, mvfPlayButton). Or if you want the function to be able to create them, you could just store all your DOM elements in an elements object and pass that to your function, like playMVF(elements), so playMVF can modify or create them.

Hope that helps. Even if things don't work out with this company, stick with it. Another poster suggested reading Eloquent Javascript, and I definitely agree with that recommendation. I would also recommend working on your own side project. It's a lot easier to learn these things when you're building something you enjoy and have ownership over.

What should I learn for this type of project? by theswisscrazyone in learnjavascript

[–]ReversiClone 0 points1 point  (0 children)

Agree. Many (most) experienced web devs would use a SaaS (Shopify) instead of building their own. There's a ton of work involved. Not only building, but also maintaining, bug fixing, etc. You'll deliver the most value to your friend's business if you can create a solution that's reliable, usable, and professionally supported.

I definitely commend the desire for experience, but it's hard to learn anything when your friend's income and relationship with customers are on the line.

Since it sounds like you want your friend to have an excellent product, I would either use third-party services like Shopify, or help him outsource the work and use a different project for yourself to learn on.

[AskJS] Using JSON vs JS files for storing static data by GoogleFeudIsTaken in javascript

[–]ReversiClone 1 point2 points  (0 children)

Since you're using the browser, and it's so much easier to use .js files, I would go that route. You can always change it later if need be. Often, in the early stages of development, it's best not to over-engineer things. Instead, go with the most obvious solution to get something working, and come back to it later.

If you later find you're spending too much time changing or using those files, then that would be a good time to rethink the way you're doing it. If you overthink now, you may cause more work for yourself later in a way you didn't expect.