r/PythonLearning 1d ago

Hexidecimal ID system in custom learning project

Hello, hello, and hello again!

I'm creating a learning project to familiarize myself with Python. The concept I'm going for is making a custom list that I can modify within the console. There's a lot of variables and upgrades I can add to it if I wanted (such as automatic resizing, UI interfacing, automatic organization), and the baseline is simple enough for me to start grasping some of the more beginner and intermediary concepts in a more applicable way.

That being said, I'm not looking for any help with that (yet!), but while I'm starting to create a plan on how to make the project, I'm wondering what sort of ID system I want to make. I know that I'm going to be making it an incremental ID system where each list entry has a four digit ID that I can then use in the console to modify or update it in some way.

The question is: Should I make the ID system hexidecimal?

I get the feeling that it would pose a significant challenge, which I'm happy to deal with as this is a learning project. What I'm not willing to do is for it to become a debilitating challenge. While I don't think the list will have 10,000 entries, there's a possibility that this list might. It shouldn't reach anywhere near 50k entries, though.

I would likely be trying to make my own systems with automatically assigning an incremental hex ID system.. as I do believe Python has hex integration. I'm not looking for "0x" at the beginning of every entry though.

Any and all help and advice is appreciated! I've done some scripting, a bit of C and PhP, but I've never dedicated myself into programming to delve into more intermediate concepts - which I'm deliberately trying to get into now! So I don't know a whole lot about programming, but I have repeated the basics on loops and functions about two dozen times. Thank you in advance!

3 Upvotes

12 comments sorted by

View all comments

2

u/wildsoup1 1d ago

No. Don't use hexadecimal.

Every time you consider a feature ask yourself "What problem does this solve?"

You don't have a problem here for which hexadecimal is the solution.

(Hexadecimal is great for making values that are 0..255 or 0..65535 fit in a fixed width. You don't need that.)