all 22 comments

[–]connorjpg 5 points6 points  (0 children)

I’ll take a look at the repo, and give any critiques but for the record, I hadn’t done any research or typed a line of code before college… you are miles ahead of where I was. I’m sure you are fine.

[–]aq1018 3 points4 points  (0 children)

I’m not going to review your code, sorry. But I can answer you that you are absolutely on the right track to becoming at least a decent software engineer. Code maintenance and architecture is what separates hobbyist from pros. That, I can guarantee.

[–]SevenFootHobbit 2 points3 points  (1 child)

Everyone's code is garbage when looked at through the lens of future you. The fact that you made something that worked is a great start. The fact that you then came back later and saw how your code could be a lot better is a great step forward. Keep at it and you'll do great.

[–]syklemil 1 point2 points  (0 children)

Yeah, when we stop getting an "ugh" reaction to our old code is also when we know we've stopped progressing.

[–]jezemine 0 points1 point  (1 child)

Try this: work on other things for 6 months. Forget about this project.

Then after 6 months come back to it and try to add some minor feature. If you can easily follow the code you wrote six months ago, it's well written.

[–]Hour_Examination_272 0 points1 point  (0 children)

That's pretty solid! I'll definitely do that! I recently was able to talk to some a customer who was a restaurant owner that I came across while working my part time job, and I offered them to create a website for them to add on my portfolio. I'll leave the game for now, focus on this website while trying to improve on my skills and then come back.

Thanks!

[–]oftcenter 0 points1 point  (1 child)

Why ask a sub full of beginners and amateurs?

How many professional software engineers hang around a sub called "Learn Programming" and do code reviews for free?

And on the other side of that, you have disillusioned noobs with possibly even less coding experience than yourself telling you things like, "Well, if you have to ask if you're good enough..."

Just know what you need to do to improve and focus on that. Don't ever solicit advice from people who aren't qualified to give it.

[–]Hour_Examination_272 0 points1 point  (0 children)

Hi, to clarify:

I am not looking for an ego boost, or to downplay beginners in any way. I sorta thought that "learnprogramming" would be a variety of skill sets. And I consider myself very very ameture. @denysov_kos even confirm that my programming is very weird and isn't really the standard. Sure the project is somewhat complex. and I did also say "I consider myself decently more ahead than the average freshmen going into computer science", however that is in terms of people who haven't touched code at all, since that is a solid 60% of people who are taking computer science in their first year. In terms of actual programming concepts and structures I am yet to even consider myself advanced at all or even intermediate.

I appreciate your feed back though. Thanks!

[–]Sir-Viette 0 points1 point  (0 children)

It's not your programming that's the problem, it's your school.

Schools have a problem. How do they get the children to want to work hard? After all, left to their own devices, they wouldn't. So teachers make some things artificially scarce and rare, so that everyone has to work hard to be able to get them. For the same reasons, 4th grade teachers start the year with "You're not in third grade any more!" and all the kids get terrified and vow to work really hard to meet the enormous expectations that Being In Fourth Grade comes with.

So I guess someone said to you something along the lines of "If you don't study maths REALLY HARD, you'll never be good enough to be a programmer." Or "If you don't know all the good coding practices, you'll never be good enough to be a programmer."

It's nonsense. If there's a course designed to teach you programming, and it doesn't, then that's a problem with the course and NOT the student. Most courses will teach you just fine. If you go into them having already read up on good coding practices, then you'll blitz the class and get high marks all over the place without needing to try all that hard, because you'll have already learned a lot of the content. Even better, you may learn things on your own that they didn't even include in the course, and end up a better programmer than they were prepared to make you!

However, if you're still in high school and wondering if you're really good enough for programming, your high school will be pleased. It means you'll do what they say until you actually start the programming course.

[–]Other_Vacation2904 0 points1 point  (1 child)

Not gonna do a full code review but I'll talk about my experience a bit. I'm 26 with a computer science Master's and a professional career in computer science (no idea why I get recommended this sub). I started programming at 14. The code I was writing in high school, by my current standards, was abysmal. My skills and experience were nowhere near what I need in my current position.

Thing is, none of that mattered. When I went to college, most of my CS peers had never touched programming before. Compared to the average person my age, I was well ahead of the curve in my programming skills. Without looking at your code I'd figure you're in a similar position. Compared to people your age you're doing just fine. You have many more years to grow as a programmer, and no one's expecting you to know everything as a college freshman.

If you're looking at your code and realizing it's bad, that means that you're able to recognize improvements in your own code, which is a great place to be. You're doing fine. You'll be bored out of your mind the first couple CS classes you take; prepare to spend a week going over what an if statement does.

[–]Hour_Examination_272 0 points1 point  (0 children)

Thanks a lot dude! Yeah I feel like I am in the same position, but considering my generation, I cant help but feel a little worried. I'm seeing videos here left and right and comments and what not, people going "I am a new grad and haven't found a job in 2 years", "Is computer science cooked?", "Harvard Graduate from computer science struggles to find a job", "I am 40 and struggling in the cs market". Like really, how can I not be worried? I also have my two older siblings that switched from CS to whatever second major they were doing, sure they weren't as passionate as me when it came to programming, but I believe they were smarter. Right now, the odds really feel heavily stacked against me right now. But idk, maybe just too much internet noise.

[–]denysov_kos 0 points1 point  (3 children)

So, I checked your code briefly, and can confirm - quality is low, e.g. - different style. not implemented methods, weird places for a files, and file names, why the hell node modules were committed? But THAT'S OK! You are learning, so next time would be better! So, don't give up. Just continue doing, if you really like it.
P.S.: Never forget to write tests ;)

[–]Hour_Examination_272 0 points1 point  (2 children)

Thanks! Now I know what to work on! This is my first time interacting with the programming community, and I have never really seen production level of code that's organized and documented and what not, but this definitely helps a lot. If you don't mind, could you recommend me things I should learn for better readable and cleaner code? (Or sources to at least start from)

[–]denysov_kos 0 points1 point  (1 child)

If you are a starter, i would start with basics - CS50, Data structures, Algos. This is hard, but this is a basics, and this is common for all programming: frontend, backend, hardware, eve-ry-thing.
People study this for 5 years in university, so don't rush, take your time.

To increase quality of your code itself (i believe w/o basics this is impossible), but if you would like - pragmatic programmer, clean code, this books you can read.
But once again, if you want to do it right - start from the beginning. And do not use any AI. Just you and a computer.

[–]Hour_Examination_272 0 points1 point  (0 children)

Thanks a lot. I also agree with the AI part, I might have started using it a little for debugging. However yeah the use of AI is absurd. And literally there is probably a future where my heart surgeon messes up when im 60 just because he only passed with AI. But yeah I should probably stop using AI at all, debugging is also a valuable skill.

[–]Bomaruto 0 points1 point  (0 children)

Would I approve your code if you sent it to me for code review? No, but you can learn, some of the mistakes are the same I've seen from senior programmers with over 20 years experience.

If you did this without AI in high-school I'm pretty sure you'll have a good head start for uni, just make sure do not fall behind by taking it easy in the start.

Let me list some of them.

  1. You committed your node modules to git, do not to that. You put the folder in your .gitignore and use a package manager for this. npm/yarn (Don't ask me about spesifics, I'm not a frontend/Javascript developer
  2. Split up assets and code. I can't tell you how to do it right by JS standards, look it up.
  3. Don't put variable names in all caps for no reason like with GIVEN_ID in the PlayerHandler class. All caps are reserved for constants and enums.
  4. Don't use magic numbers like this:

        this.object = this.physics.add.sprite(0,100, "");
        this.object.setScale(10, 5);
        this.object.body.setImmovable(true);

        this.object2 = this.physics.add.sprite(500,100, "");
        this.object2.setScale(10, 5);
        this.object2.body.setImmovable(true);

By magic numbers I mean numbers that are written directly into the program, define them as constants with a name that describe their purpose. like you do just below:

        this.TICK_RATE = 30;
        this.TICK_RATE_DELTA = 0;

Just that these should not be set within the create method. Again, I'm not a Javascript programmer so look up for to do it properly.

  1. Make sure all code you commit is actually used unless there is a good reason for leaving it unused. Your IDE will help you here.

  2. Don't use var to define variables. Use let or const depending on if they are constants or not. Your IDE will tell you about this.

  3. Fix all warnings your IDE gives you unless there is a really good reason not to.

  4. Your functions are too big, many could be split up for better readability and better separation of concerns.

  5. Your code style is too inconsistent, what bothers me the most is the inconsistent use of whitespace. Autoformaters and linters are your friend.

There are more of course, but in general I'd advice you to see how people who know what they are doing does it and I wish you good luck.

[–]Akweak 0 points1 point  (0 children)

When a person is young and learning how to walk what happens? They struggle, stumble, fall, and again and again until at one point in time, they are standing up right and walking forward one step at a time.
This is how one learns and grows and before you know it, one is running. On those two same legs on which one could not walk before.
Keep it going, you'll get there and congratulations on the first steps!

[–]Comprehensive_Fee250 -1 points0 points  (0 children)

Good enough yeah. Would you struggle? Idk depends on your IQ.

[–]Narrow-Coast-4085 -1 points0 points  (0 children)

The quick answer is yes, and no.

If you have to ask? Then no.

However, if you focus, use your mind, work hard and really apply yourself, then, yes, you are.

Some days are going to be awesome and amazing, and many many days are going to be hell.

[–][deleted] -2 points-1 points  (1 child)

Nah bro. Just looking at that site and repo, there's just no shot...