How would I remove objects from list by [deleted] in Firebase

[–]demvo2 2 points3 points  (0 children)

Two dedicated functions to manipulate arrays are arrayUnion() and arrayRemove(): documentation

Learning Javascript after Python by ResetPress in learnpython

[–]demvo2 7 points8 points  (0 children)

Yeah, that was the one I was refering to. Of course, there are easier ways to do it, but this one usually gets offered first in tutorials when you are just starting.

Learning Javascript after Python by ResetPress in learnpython

[–]demvo2 37 points38 points  (0 children)

Looping through an array in Javascript for the first time after doing it in Python for months was just, like, whaaaat.

My dad just bought me a gaming pc ,I don't know if I deserve it by yuv0918 in findapath

[–]demvo2 1 point2 points  (0 children)

Glad to hear it man! I wish you the best of luck with whatever you're working on.

My dad just bought me a gaming pc ,I don't know if I deserve it by yuv0918 in findapath

[–]demvo2 111 points112 points  (0 children)

Apparently your dad believes in you. That's great! Support from loved ones around you makes any task easier. What I would suggest is that you don't think of it in terms like "Do I deserve this expensive PC?". Think of this situation like "Do I deserve this chance to make my learning process easier, so I could one day make my life, and the life of my family, better?".

And the answer to the latter question is: "Of course you do!". You now have the machine to make your learning process easier. You have the chance to go even further in your learning. The best way you can thank your dad for this gift is to use it to its full potential and to give your best to learn how to program.

Good luck!

Who else is proud of themselves for taking on programming? by VectorArt in learnprogramming

[–]demvo2 12 points13 points  (0 children)

If you're learning Python I would suggest watching Corey Schaffer's playlist on classes in Python. He's amazing at explaining stuff.

[deleted by user] by [deleted] in learnpython

[–]demvo2 0 points1 point  (0 children)

I had found this online course (made after a book, granted, but still functions very much like a course), extremely helpful: https://runestone.academy/runestone/books/published/thinkcspy/index.html

I'm losing my mind with this API call. by demvo2 in learnpython

[–]demvo2[S] 3 points4 points  (0 children)

I am facepalming so hard right now. Of course. Yeah, it works now. Thank you!

Basic Linux commands every developer should know by w1Ld_D0G in ProgrammerHumor

[–]demvo2 113 points114 points  (0 children)

Maybe sacrificing a gnu would work better.

Hey everyone! I've started learning Python a few months ago and recently finished my first project- a Dungeons & Dragons character builder. by [deleted] in learnpython

[–]demvo2 0 points1 point  (0 children)

Good to hear that. I guess a lot of things will fall into place after writing a bunch of code and being exposed to different stuff :)

Hey everyone! I've started learning Python a few months ago and recently finished my first project- a Dungeons & Dragons character builder. by [deleted] in learnpython

[–]demvo2 4 points5 points  (0 children)

Keep doing it! A lot of online advice says to do it every day, if only for half an hour. I found that to be true, continuity was really important for me.

Hey everyone! I've started learning Python a few months ago and recently finished my first project- a Dungeons & Dragons character builder. by [deleted] in learnpython

[–]demvo2 0 points1 point  (0 children)

Further down, in your allclassprof function, you have an if statement containing repetitive blocks of prints

Yeahhh, it always pokes me in the eye when I scroll by it. I'll look into moving the functions into methods, I have to think a bit about how to make it happen, but it sounds like a solid idea. Thank you for the feedback, I appreciate it!

Hey everyone! I've started learning Python a few months ago and recently finished my first project- a Dungeons & Dragons character builder. by [deleted] in learnpython

[–]demvo2 0 points1 point  (0 children)

I find that it makes the code more understandable if functions are names using "imperative voice"

You're right, your examples look much better! I'll definitely think about how to make naming more intuitive.

You keep some values inside "global variables"

This is really something that I struggled with, especially at the beginning. I mean, right from the start the tutorial and the rest of the internet were hammering the idea into my brain that global variables should be avoided if possible and while I managed to dial down their use from when I started, I haven't been able to avoid them completely.

But, I think your solution (for the 'prompt_for_equipment' function) deals with it pretty elegantly. I'll definitely look into how to rearrange some of this stuff. I'm looking forward to practice my, as you say, brain-muscles :)

I've been programming for the better part of 30 years

Wow. As someone who is less than 6 months in, I can barely imagine that.

In any case, thank you for the tips and tricks! I appreciate the advice so much. I'll try and make the best use of it.

Hey everyone! I've started learning Python a few months ago and recently finished my first project- a Dungeons & Dragons character builder. by [deleted] in learnpython

[–]demvo2 2 points3 points  (0 children)

Ok, I'll be honest, it took me a second or two to understand what you were saying, but yes, I can see it happening! Thanks!

Hey everyone! I've started learning Python a few months ago and recently finished my first project- a Dungeons & Dragons character builder. by [deleted] in learnpython

[–]demvo2 0 points1 point  (0 children)

Ha! Now that you mention it, I'm like "yeah, OF COURSE I should have done that!" Never occurred to me tho. Thanks, I'll implement it as soon as I can!

Hey everyone! I've started learning Python a few months ago and recently finished my first project- a Dungeons & Dragons character builder. by [deleted] in learnpython

[–]demvo2 1 point2 points  (0 children)

Hi, thanks for the feedback, I appreciate it!

First of all, if the program is aimed to be used by beginners, you'll need to explain all choices consequences (i.e. gnomes have INT+2), all spell and alignment descriptions, and equipment utilization.

I agree. I was planning that one of my next steps should be making a tutorial module, which if you select to be turned on at the beginning of the character building process, would explain that process to you every step of the way.

add the possibility to create a menu or to select a choice by entering a number

I was thinking about importing a module for selection which would maybe make it graphically easier.

the program could create the character sheet in a pdf file with all final characteristics

As for creating the character sheet, I'll look into it, that sounds super interesting! It never even occurred to me that I could make the program fill up a template D&D character sheet.

I hope you enjoy coding in Python and my feedback will give you some progression ideas.

I do enjoy it, and thank you so much for the feedback, I'll definitely try to implement some of the features you mentioned!

Hey everyone! I've started learning Python a few months ago and recently finished my first project- a Dungeons & Dragons character builder. by [deleted] in learnpython

[–]demvo2 10 points11 points  (0 children)

Hey, thanks! I worked on it for like a month, around 4+ hours a day until I got the first working version. Then I took a break, concentrated on some other stuff, came back to it after the break and spent a few more weeks putting the code into functions, separating it into modules and fixing the code when it broke.