Skip Navigation
xurxia

I introduce myself: I am Galician and citizen of the World. Proud father. I love science (specially astronomy), technology, nature and photography. I play padel and surf and whenever I can I escape with my camper van.

www.xurxia.net

Posts 4
Comments 11

Erosion as a sculptor

iPhone 15 Pro ISO 80, 24 mm, f 1.78, 1/4310 s

0

NewsWave - An RSS feed agregator

github.com GitHub - xurxia/newswave: NewsWave RSS reader

NewsWave RSS reader. Contribute to xurxia/newswave development by creating an account on GitHub.

GitHub - xurxia/newswave: NewsWave RSS reader

I have developed a project in #python to follow #RSS feeds and send an email with daily news. It is more an excuse to practice python, git and design patterns than a real project, but feel free to use it if you find it useful. Suggestions, opinions and feedback are welcome.

https://github.com/xurxia/newswave

1
Microsoft is bringing Python to Excel
  • After preview it will be a paid subscription additional to Office365, the same strategy as Office Copilot. I hate this policy of pay for a product then still paid for more functionalities... at the end of the year you will have paid a lot.

    Microsoft says Python in Excel will be included in a Microsoft 365 subscription during the preview, but โ€œsome functionality will be restricted without a paid licenseโ€ after the preview ends.

  • Writing Python like itโ€™s Rust
  • I fully agree with the post. Except for a fast prototyping or a short personal script where it could be not necessary, type hint is a must. The subject is not only to guarantee that the program now runs without errors, but it will be still working right in the future too, even after a developer (either the original or other) make changes to the code.

  • BUG - Preferences are randomly ignored

    Since the last update, half of the times I open the app I see All posts but in my preferences I have set Subscribed. The rest of the times it woks fine.

    I want to thanks one more time to the developers who are making this great app ๐Ÿ‘๐Ÿป๐Ÿ‘๐Ÿป๐Ÿ‘๐Ÿป I really love it!

    2
    donno2048/pygoto: Use goto in Python
  • Hi,

    I have used goto instruction a lot when I started to program in Basic ( an Amstrad CPC ๐Ÿฅน). In this context goto had logic. But in modern languages like python I think it is a very bad idea:

    • Understand the logic is more complex
    • Functions and methods are a better and more powerfull alternative
    • It is dangerous: add or remove a new line of code could have bad consequences

    Regards

  • [BUG] Errors in v0.1.0
  • The most probably! Thanks a lot!

  • [BUG] Errors in v0.1.0
  • You are more lucky than me! ๐Ÿ˜‚

  • Errors in v0.1.0

    I have just installed the last version and it comes with some errors:

    • I can't set NEW as default option for sort posts in config
    • I can't see communities wich I am subscripted
    • When I search the communities section is always empty
    7
    How do you make config data available to all classes?
  • You can use global variables, it is true, but I prefer singleton because I have all config variables and logic encapsulated in a class. The first time the singleton object is created it reads all the config variables from a file, and with its methods get and set manages them. The Config class doesn't know the parameters names of the config file neither the number, it dynamically reads the file and creates the attributes, so It is a very reusable code that when you program using OOP is a more natural way than implementing like a module.

    Related to this, I group config variables by sections so it is more clearly for me, then the singleton object dynamically creates an array for each section, and a variable into the array for every variable in this section of the config file. Access to the config info is as easy like this:

       conf = Config()
       conf.get('DB', 'server')
       conf.get('DB', 'login')
       conf.get('DB', 'password')
    
  • How do you make config data available to all classes?
  • I use a singleton class called Config (some times I use it as a Cache too)

    Singleton pattern: https://www.geeksforgeeks.org/singleton-pattern-in-python-a-complete-guide/

    Config class using Singleton pattern: https://charlesreid1.github.io/a-singleton-configuration-class-in-python.html

  • Python book recommendation
  • Hi! Other great book is "Fluent Python". I think PCC could be better as first contact and then this one as next step.

    https://www.oreilly.com/library/view/fluent-python/9781491946237/

  • Error submitting vote
  • If your instance is lemmy.ml the most probably is due to a overload on the server