Category: Technology, Web & Cloud

The author has a background in computer science and a passion for new technology. When the degree was earned, the web was not too popular yet. That opened an opportunity to follow the entire process with huge fascination, and the journey didn’t end yet. Most of the development happens in Python and Django these days, but all other facets are interesting, too.

  • Switch Boot

    Hack of the day: A physical switch to chose which OS your PC boots

  • Python 3.10 in Beta

    Python 3.10 in Beta
    Python 3.10 in Beta

    New Features include:

    The full changelog.

  • Have a bad day in IT?

    Read this, then:

    Always remember. It could be worse.

    This is exactly why people matter, knowledge is important, backups are essential and documentation key. Safety and Security are not exclusively about the bad guys.

    #monday

  • Django Model-Owner

    The option to make a model owned by a user is actually documented for the Django Admin app. However, for reference, here are the steps:

    First, the model you want to have an owner needs to reference “User” as a foreign key: (in models.py)

    class Website(models.Model):
        submitted_by = models.ForeignKey(User, on_delete=models.CASCADE)
        url = models.URLField()

    Provided you want to use this model in Django-Admin, there is an explicit method the app provides when defining admin models: (in admin.py)

    @admin.register(Website)
    class WebsiteAdmin(ModelAdmin):
        model = Website
        list_display = ('url', )
        exclude = ('submitted_by', )
    
        def save_model(self, request, obj, form, change):
          if not change:
            # only add owner if not changed object
            obj.owner = request.user
          super().save_model(request, obj, form, change)

    A heads-up: Django documentation is explicit that both save_model and delete_model have to call the corresponding super()-method in order to actually save the modified model. Reasoning here is these methods are meant to interact with the process and add extra steps, they are not meant to veto.

    Additional thoughts: For a model having an owner is really convenient in plenty of situations, in particular when managing permission. The field can e.g. be matched when viewing details of an object.

    There are other, potentially more flexible approaches to the problem. In particular when solving in custom views, the field has to be set manually. The same is true when using more complete solutions like “django-guardian”.

  • Auth0: Log in to BTP with your social accounts.

    BTP Trial

    The recent acquisition of Okta (Auth0) caught my attention. Until last week, I didn’t know Auth0 beyond the libraries they provide for JWT. Upon further investigation, I was pleasantly surprised to discover that they are a company that was born in Argentina in 2013 and that their founders are passionate developers (When was the last time you saw a CEO of a $6.5B company pushing his codes to Github and blogging about his hobbyist Arduino projects?

    Source: Auth0: Log in to BTP with your social accounts.

  • DuckDuckGo calls out Google for spying on users.

    When Apple introduced labels in their app store to indicate which data an app would link to user information it created transparency for many. Only Google seemed to stop on moving forward and did not publish new versions of its apps. Until recently. Now that they are updated, DuckDuckGo, a search engine advocating privacy in the digital age, calls out the abundant use of personal data.

  • Katherine Johnson

    Katherine Johnson fundamentally contributed to the calculations that led the Apollo-11 Mission to the moon. She received a Presidential Medal of Freedom for these achievements in 2015. The above comic found on Reddit honours her work.

  • to be optimistic about robots

    to be optimistic about robots

    The older of readers may recall the (similar) name of Financial Times‘ reporter, asking the right questions about robots. Sarah O’Conner may not share the exact same name with one of Terminator’s main characters, but still triggered a few thoughts with her headline.

  • Linux on Apple Silicon

    Chris Wade, CEO of Corellium

    The announcement is vague, the link gives 404. However, still somebody made a first move to port Linux to the recently announced M1 Chip, that will power future generations of Apple notebook devices. The community criticizes the approach: the port comes in a single patch with no documentation. Given the size of the patch this is pretty difficult to comprehend. Plus, the patch requires third party code, that apparently is not committed to git.

    To conclude, this is a twofold message: while it’s good to see such developments and have Linux ported to such hardware, the approach indeed is difficult. On a more positive note, there are other working groups still motivated enough to work on a more complete port.

  • Post Mortem

    Remember when the Cloud was off earlier this month? Google published a post mortem article and root cause analysis on their Cloud Status Blog.

    (more…)