Episode: 595 Title: HPR0595: Read 'n Code - 1 Seneca and Python Source: https://hub.hackerpublicradio.org/ccdn.php?filename=/eps/hpr0595/hpr0595.mp3 Transcribed: 2025-10-07 23:39:49 --- Today we launch 3 new programs. Apa m Hello, welcome to the first episode of the Read and Code podcast. The only podcast about Lurcher and Computer Programming. My name is Flavue. Today, we're going to talk about Seneca and the Xenof Python. Before we start, I would like to talk a little bit about the book itself. Seneca, letters from Aestolic, is the name of the book, is published by Penguin Classics. And Penguin may perhaps be the worst publisher out there. I particularly dislike it, not just because of its ugly covers, but also because of low-quality paper. I certainly appreciate a good cover, but more importantly, I really appreciate white paper that I could easily read from. So in terms of fiction books, that is non-techy books, I particularly enjoy Harper Perennial and my favorite, Every Man's Library. Modern library is also good alternative. But Every Man's Library has acid-free paper and it just comes in a nicer book that you enjoy reading more. And I might sound like a snob, but that's really important when you start spending hours and hours with this thing in front of you. So moving on to the actual topic, the contents of the said book. Seneca, that is Lucius Anius, Seneca. He was a Roman statesman and philosopher. He was born four years before Jesus. He tutored the Emperor Nero and was an exile and then back at various times throughout his life. Stoicism, the philosophy existed long before him, but Seneca did not adhere to it entirely and certainly contributed his own ideas. His ideas and opinions are expressed in his letters of guidance to various students that would write to him while in exile. He also is extremely turs. This book is about 200 pages and it contains more or less his entire philosophy. One of the quotes from the book that expresses this turseness is quote, language which devotes its attention to truth, ought to be plain and unadorned. The popular style has nothing to do with truth. Its object is to sway a mass audience to carry away unpracticed ears by the force of its onslaught. So that gives you an idea of what he thinks of many other writers and speakers in the Roman Empire and otherwise at this time. Stoicism that I mentioned earlier is a philosophy that holds that man should resign completely and uncomplainingly to whatever fate may send him. Only by not setting too high a value on material things can man discover true, unshakable peace and content to which ambition, luxury and avarice are the greatest obstacles. So that's more or less what many people understand by Stoicism. Seneca himself was not entirely a stoic, however, he was sort of a hypocrite. So while he advocated these stoic principles, he also served high in the Roman Empire and actually made himself very wealthy and led quite a comfortable life. So in many sense, he did not practice what he preached. What did he preach though? Well, I'm just going to go over just a few quotations from this book that I thought were most meaningful. He writes, quote, to be everywhere is to be nowhere. So people who spend their entire life traveling abroad end up with many places where they can find hospitality, but no real friendships, end quote. So I think this particularly strikes me. I'm originally from Romania and I've traveled here 10 years ago and I live in Charlotte, North Carolina now and I certainly have traveled a lot throughout the world and I certainly find this to be true that the more you travel, it seems as though the more you are nowhere. Second quote, quote, you asked me to say what you should consider particularly important to avoid. My answer is this, a mass crowd. He goes on to talk after that. He goes on to talk after that about how when you're the more people you are together with, the more likely you are to be, you know, to catch some sort of vice or bad practice from other people, I thought that was funny. See next quote, quote, the outcome of violent anger is mental raving and therefore anger is to be avoided, not for the sake of moderation, but for the sake of sanity. I think that's pretty much self-explanatory. Next quote, quote, a man is as unhappy as he has convinced himself to be, unquote. That's interesting. He's very much an advocate of having one's mind control. His reactions to everything and therefore letting nothing affect it and that's a fairly stoic principle. And last quote, quote, life itself is slavery if the courage to die is absent, unquote. So he goes on to talk quite a bit about how he and philosophers should consider death on a fairly regular basis in order to better be able to cope with the idea, as well as I guess be ready at any point in time for it. Now I'm going to move on to Python and the Zen of Python. One is a high-level computer language, very much like Java or C-Sharp or PHP even, like many of those languages you can do pretty much anything you want a computer to do. It was invented in 1989 by Guido Van Rossum and its design philosophy emphasizes code readability. Python aims to combine remarkable power with very clear syntax that less sentence was a Wikipedia quote. Furthermore, Python has a Zen, unlike any of those languages I mention and any others that I have encountered. I find that to be extremely meaningful in that there is an actual higher goal in writing the code rather than simply solving the problem that you happen to face at that time, though that is a worthy enterprise in it of itself. But I do find that the Zen of Python that I'm about to read, those serve as a great guidance in learning as well as writing Python, the Zen of Python is by Tim Peters. Beautiful is better than ugly, explicit is better than implicit, simple is better than complex, complex is better than complicated, flat is better than nested, sparse is better than dense, readability counts, special cases aren't special enough to break the rules although practicality beats purity. Errors should never pass silently unless explicitly silenced. In the face of ambiguity refuse the temptation to guess. There should be one and preferably only one obvious way to do it. Although that way may not be obvious at first unless you're Dutch. Now is better than never, although never is often better than right now. If the implementation is hard to explain, it's a bad idea. If the implementation is easy to explain, it may be a good idea. Name spaces are one honking great idea, let's do more of those. That was the Zen of Python and it has some jokes in there regarding Guido, who is Dutch and the name spaces idea, but I definitely think that the idea of a Zen itself is what's most meaningful here. For further explanation of what each line may mean in terms of how it affects writing code and Python, I recommend you go to the from Python import podcast. It's a podcast about Python and its name is from Python import podcast. Those four words together will lead you to a very nice podcast, which they spend two full episodes going over every line and how it might affect your writing of Python code. I think it was great to listen to that. So you may wonder what does all this have to do with Seneca? What does Seneca have to do with Python? Well nothing directly and while there are many many differences, I think there are also some similarities and those are the ones I'm going to talk about right now. Here is a Seneca quotation I did not state above. People who are forever acting as interpreters and never as creators are always lurking and someone else's shadow. So this here I interpret to be writing code, but in the shadow of a bigger company or a bigger project that's so big that's beyond you and you don't really identify with it. I certainly, I've coded a lot of Java and I felt that way because the community itself seems so enterprising that it's difficult to actually contribute something for the greater good, partially because of the numbers of coders that are involved, partially because of the corporations that control many of the very large projects. Open source on the other hand, which Python certainly is a part of, makes creation a lot easier. There are many small projects, the community itself, it's much smaller and tighter knit and you can actually find it somewhere on free node and IRC network. Many of the open source projects, if not all, I haven't found one that does not have an IRC channel dedicated to it where people that don't get paid for it at all just donate their time to help you and help each other learn more about that particular software or just open source in general. Then there are mailing lists and there are sprints, the conferences, for instance, PyCon, the Python conference that I attended last spring has an unbelievable community that I've never encountered before, a more corporate or Java oriented conference, especially the sprints at the end are a great way to jump in and contribute on projects that many use throughout the community and you'll get immediate feedback from the leading community people for that particular project. So in the open source community, especially because I'm most familiar with the Python community, it makes it so much easier to be a creator rather than an interpreter just being passed down orders. The second quote is quote, isn't it the height of folly to learn inessential things when times so desperately short? This quote is a bit subjective because how do you define inessential things? Somebody has to decide that those things are inessential. But in the programming world, it's generally recognized that fewer lines of code are better because you'll in the end have fewer lines of code to debug and correct. So companies are always trying to minimize the development time. Python can cut the lines of code from a Java program often by two, three, or four times fewer lines of code to do the exact same thing, while also retaining readability. And I think that's very important because if we're trying to minimize time, writing less code is certainly one way to do it, but it might lead to the code being less readable. So for instance, writing a proscript with trying to shorten the number of lines of code would work great, but it would make it very readable for the next person to come along and read it and edit it as it needs to fit. So I think Python combines a mixed accommodation grade in that you can minimize time with fewer lines of code while also making it more readable. And hence the zen of Python line that says readability count. The quote from Seneca that I'm going to share in this the last one is quote, I have no respect for any liberal study if its end is in making money. There is only one liberal study that deserves the name because it makes a person free. And that is the pursuit of wisdom. So he basically says the pursuit of wisdom is more important than any liberal study and he goes on to talk about math and science and various other liberal studies that he does not think are really pursuing wisdom and only his philosophy really is. In the same way, I think the open source community, Python community, do on those IRC channels that on those IRC channels I mentioned previously. Why do say dozens or hundreds of people stay on various channels for their particular projects to help others out, obviously they don't get paid for it, obviously they have jobs and responsibilities just like anybody else. So do they do it just to share and because they love everybody else, I think that's certainly part of it. And while I didn't put any such cheesy quotes from the Seneca, they are there. He does address the need to serve for others as being more important and serving for yourself. But I think there's that but there's also a second piece of it and I do think that many are there in part to just become smart themselves to learn more by teaching, to learn more by sharing because even though you may be helping someone who's a total beginner, you never know when you might also learn something yourself from them. So I think that pursuit of wisdom is probably what drives the open source community and the Python community more than just the share and fuzzy love feeling of sharing and making it all open source. So with that, I end this podcast. Please address any passionate approval, dismissal or comments at FlavvyU at readincode.com. That's F-L-A-V-I-U. That's my first name at read the letter N code. The next podcast will be in a few weeks I'm working on the website using pinax, which is a Django app, Django of course being a Python framework and then I'm choosing to use that because WordPress would have been too easy and too PHP-ish. Until next time, read and code. Thank you for listening to Haftler Public Radio, HPR sponsored by Carol.net, so head on over to C-A-R-O-DOT-N-T for all of us in need. Thank you for listening to Haftler Public Radio, HPR, HPR, HPR, HPR, HPR, HPR, HPR, HPR, HPR, HPR, HPR, HPR, HPR, HPR, HPR, HPR, HPR, HPR, HPR, HPR, HPR, HPR, HPR, HPR, HPR, HPR, HPR, HPR, HPR, HPR, HPR, HPR, HPR, HPR, HPR, HPR, HPR, HPR, HPR, HPR, HPR, HPR, HPR, HPR, HPR, HPR, HPR, HPR, HPR, HPR, HPR, HPR, HPR, HPR, HPR, HPR, HPR, HPR, HPR, HPR, HPR, HPR, HPR, HPR, HPR, HPR, HPR, HPR, HPR, HPR, HPR, HPR, HPR, HPR, HPR,