Hitting a brick wall

I’m struggling with two exercises from LPTHW; ex23 and ex25. I’m struggling to understand the encoding and the concept of encoding and decoding bytes and a string plus the running of a module in python from the terminal; I can understand what the functions we made are trying to do but running it in python terminal is confusing to me.
I also don’t really know why I’m learning python or programming I have a lot of time on my hands and I think it is useful to have some knowledge about computers and coding but I have no idea where I want to go with it or have clear projects to work. I do really like the whole open source projects but those require quite a lot of knowledge and it’s a long journey to get there.

I don’t know if anyone else has struggled with purpose in relation to programming.

1 Like

Is it fun? Because if it is then maybe you don’t need to know where it’ll lead you?

As for your questions, you’ll need to be a little more precise. What exactly is it that you don’t understand? Try writing down specific questions. That might help you already, and if not, ask them here.

I’m not sure if I find it fun some parts are interesting. I guess it is in the sense that it feels rewarding when you work on and solve problems on your own. I’ve been working on those two exercise for a few days now and I think I’m starting to understand them somewhat; in ex25 I didn’t understand that we were importing it as a module in the python interpreter. I still don’t really know what an interpreter is and how it works. I also don’t know how computers work which makes it difficult understand this concepts on a deeper level and if you don’t have the terminology then it’s even difficult to articulate what you don’t know. Also with ex23 I didn’t understand what encoding and decoding means, now my level of understanding is that it’s just something that’s used in python on bytestrings and strings; decode bytes and encode strings. I also don’t understand how python stores bytes in different codecs / encodings and then turns them into readable human text. For example you have b’Afrikaans’ as a bytestring it’s not in hexadecimal form with the numbers that represent the letters, and I guess python takes the first 170 numbers or so out of 255 as their letters in ASCII then uses hexadecimal form for the rest? 0x00 - 0xff

A free service run by Zed A. Shaw for learncodethehardway.org.