Language Selection

English French German Italian Portuguese Spanish

Development

Programming: Rasp Pi and Python

Filed under
Development
  • Code the Classics on sale now

    TL;DR: we made a fully automated luxury gay space communist type-in-listing book. Buy it now and get it in time for Christmas.

  • Weekly Python StackOverflow Report: (ccvi) stackoverflow python report
  • Annual release cycle for Python, new Python Software Foundation fellows from Africa, and more updates

    The Python Software Foundation (PSF) is a nonprofit organization behind the Python programming language. I am fortunate to be a PSF Fellow (honorable member for life,) a Python core developer, and the liaison between my company, Red Hat, and the PSF. Part of that liaison work is providing updates on what’s happening in the Python community. Here’s a look at what we have going on in December.

    Upcoming events

    A significant part of the Python community is its in-person events. These events are where users and contributors intermingle and learn together. Here are the big announcements of upcoming opportunities to connect.

    PyCon US 2020

    PyCon US is by far the largest annual Python event. The next PyCon is April 15-23, 2020, in Pittsburgh. The call for proposals is open to all until December 20, 2019. I’m planning to attend PyCon for the conference and its famous post-con sprints.

  • A Python and Preact app deployed on Heroku

    Heroku is great but it's sometimes painful when your app isn't just in one single language.

Nginx/Rambler Dispute Over Code

Filed under
Development
Server
Legal
  • What’s yours is ours Rambler Group claims exclusive rights to world’s most popular web-server software, six months after it's sold to U.S. company for 670 million dollars

    On Thursday, December 12, Russian law enforcement raided the Moscow office of the IT company “Nginx,” which owns the eponymous web-server used by almost 500 million websites around the world. According to several reports, Nginx co-founders Igor Sysoev and Maxim Konovalov spent several hours in police interrogation. The search is part of a criminal case based on charges by a company tied to the Russian billionaire and Rambler Group co-owner Alexander Mamut, whose businesses believe they own the rights to the Nginx web-server because Sysoev started developing the code while working for Rambler in 2004. Meduza’s correspondent Maria Kolomychenko looks at how Sysoev and his partners spent 15 years creating the world’s most popular web-server before selling it to an American firm for $670 million, and how Rambler decided, half a year later, that it owns the technology.

  • ‘A typical racket, simple as that’ Nginx co-founder Maxim Konovalov explains Rambler's litigation against his company, which develops the world’s most popular web-server

    Russia’s IT industry is in the midst of a major conflict between businesses belonging to “Rambler Group” co-owner Alexander Mamut and the company “Nginx,” created by Igor Sysoev and his partner Maxim Konovalov. Nginx’s key product is the eponymous web-server used by more than a third of the world’s websites. Sysoev first released the software in 2004, while still an employee at Rambler, which is now claiming exclusive rights to Nginx, based on its interpretation of Russian law. The police have already joined the dispute, launching a criminal investigation and searching Nginx’s Moscow office. In an interview with Meduza, Nginx co-founder Maxim Konovalov described the police raid and explained why he thinks it took Rambler 15 years to claim ownership over the coveted web-server technology, which recently sold to the American corporation “F5 Networks” for $670 million.

Pi for Everyone and Everything

Filed under
Development
Hardware

Pi foundation released their first system-on-a-chip (SOC) in 2012, they had no idea how overwhelming the response would be. The credit-card-sized computer once meant to be an easy entry point for British students to get into programming and computer science has burgeoned into a whole community of add-on boards (“hats”), screens and extras that people all around the world are using for all kinds of things.

Raspberry Pi computers have ARM processors on them and most Linux distributions that support those processors will run on them. There are also Windows 10 IOT (Internet of Things) embedded platforms that will run on them as well.

The most popular operating system for it by far is Raspbian, which is a derivative of Debian Linux. The Raspberry Pi foundation also has an OS image called NOOBS, which will allow you to install a number of different options on it as well.

Getting started is as easy as buying a Pi, a case and its accompanying necessities, which you might already own, namely a microSD card, a 5V-2A wall-wart-type supply with a micro USB connection, an HDMI cable and a USB keyboard and mouse.

Several starter kits are available that include cases, power supplies and NOOBS already installed on a microSD card. If you already have access to a microSD card, it is simple enough to go to www.raspberrypi.org and download any of the OS images that they have there. There are also details on how to get the image onto the card.

Read more

Programming: GAction, Research on Developers, JavaBeans and Python

Filed under
Development
  • Sébastien Wilmet: Providing GActions in a library

    GAction represents an action that the user can do in an application, it’s usually present in a menu item or a button. It’s not just a function to launch, it’s a little more involved than that.

    Overall, providing GActions in a library can be done quite naturally, once the library provides a framework for the application.

    TeplApplication and TeplApplicationWindow both provide GActions in their public API. They are namespaced with the "tepl-" prefix, to avoid conflicts with other libraries or the application; so the full name of the GActions are "app.tepl-something" or "win.tepl-something". And all the GActions are documented in the class description.

    Note that TeplApplication and TeplApplicationWindow are not subclasses of GtkApplication and GtkApplicationWindow, because several libraries might want to extend those GTK classes and an application needs to be able to use all those extensions at the same time. A nice solution that doesn’t require to hold a new object in the application: use this design pattern that I’ve already described on my blog.

  • Research: Developers are trusted by the business but the alignment is not felt evenly across different generations

    Welcome to the first in a series of in-depth articles looking at the developer’s role in the modern organisation. In this first post: a new generation has arrived. As organisations shift to becoming technology-focused, developers’ roles have evolved so that they are now playing a crucial role in decision making across their businesses. However, all this newfound alignment isn’t so keenly felt across the whole developer workforce…

  • Jakarta EE: Creating an Enterprise JavaBeans timer

    Enterprise JavaBeans (EJB) has many interesting and useful features, some of which I will be highlighting in this and upcoming articles. In this article, I’ll show you how to create an EJB timer programmatically and with annotation. Let’s go!

    The EJB timer feature allows us to schedule tasks to be executed according a calendar configuration. It is very useful because we can execute scheduled tasks using the power of Jakarta context. When we run tasks based on a timer, we need to answer some questions about concurrency, which node the task was scheduled on (in case of an application in a cluster), what is the action if the task does not execute, and others. When we use the EJB timer we can delegate many of these concerns to Jakarta context and care more about business logic. It is interesting, isn’t it?

  • Python Dictionary Comprehension

    In this tutorial, we will learn about Python dictionary comprehension and how to use it with the help of examples.

Screencasts and Shows: ArcoLinux 19.12 Run Through, TechSNAP and Python Bytes

Filed under
Development
GNU
Linux

Programming Leftovers

Filed under
Development
  • Fedora 32 Will Feature Bleeding-Edge Compilers Again With LLVM 10 + GCC 10

    Fedora Linux is on track to deliver another bleeding-edge compiler toolchain stack with Fedora 32 due out this spring. 

    Fedora's spring releases have tended to always introduce new GNU Compiler Collection (GCC) releases that are generally out a few weeks before the April~May Fedora releases. Thanks to Red Hat employing several GCC developers that collaborate with Fedora, they tend to stick to ensuring Fedora ships new GCC releases quite quickly while managing minimal bugs -- in part due to tracking GCC development snapshots well before launch to begin the package rebuilds. 

  • What makes Python a great language?

    I know I’m far from the only person who has opined about this topic, but figured I’d take my turn.

    A while ago I hinted on Twitter that I have Thoughts(tm) about the future of Python, and while this is not going to be that post, this is going to be important background for when I do share those thoughts.

    If you came expecting a well researched article full of citations to peer-reviewed literature, you came to the wrong place. Similarly if you were hoping for unbiased and objective analysis. I’m not even going to link to external sources for definitions. This is literally just me on a soap box, and you can take it or leave it.

    I’m also deliberately not talking about CPython the runtime, pip the package manager, venv the %PATH% manipulator, or PyPI the ecosystem. This post is about the Python language.

    My hope is that you will get some ideas for thinking about why some programming languages feel better than others, even if you don’t agree that Python feels better than most.

  • Python String Replace

    In this article, we will talk about how to replace a substring inside a string in Python, using the replace() method. .replace() Method In Python, strings are represented as immutable str objects. The str class comes with many methods that allow you to manipulate strings. The .replace() method takes the following syntax: str.replace(old, new[, maxreplace]) str - The string you are working with. old – The substring you want to replace.

Python Programming, Rust and Puppet Enterprise 3

Filed under
Development
  • Circuit Python at PyConf Hyderabad

    Coding in/with hardware has become my biggest stress buster for me ever since I have been introduced to it in PyCon Pune 2017 by John. Coding with hardware provides a real-life interaction with the code you write. It flourishes creativity. I can do all of this while I learn something new. Now I look for auctions to offer me a chance to code in/with Hardware. It gives the chance to escape the muggle world.

  • New in testmon 1.0.0

    Significant portions of testmon have been rewritten for v 1.0.1. Although the UI is mostly the same, there are some significant differences.

  • Determining affected tests

    Automatically determining affected tests sounds too good to be true. Python developers rightfully have a suspecting attitude towards any tool which tries to be too clever about their source code. Code completion and symbol searching doesn't need to be 100% reliable but messing with the test suite execution? This page explains what testmon tries and what it does not try to achieve.

    [...]

    After running the test with coverage analysis and parsing the source code, testmon determines which blocks does test_s.py::test_add depend on. In our example it's Block 1,2 and 4. (and not Block 3). testmon doesn't store the whole code of the block but just a checksum of it. Block 3 can be changed to anything. As long as the Block 1,2 and 4 stay the same, the execution path for test_s.py::test_add and it's outcome will stay the same.

  • How to set-up and use py.test in Pycharm

    I've been using Vim and terminal as a weapon of choice for years. I've had a good time with it, however, more and more people ask me why I'm using this setup. And honestly, I don't know the answer.

    I'm aware that things can be done more efficiently and an IDE can help with a lot of things. I guess that my weak spot is the unit tests and testing my code in general. I'm not running my tests when on the coding spree, I'm breaking lots of stuff, and only when I think I'm finished, I'll do the fixing and make everything running green again.

    Well, I would like to change that. And I'm also curious about trying out new ways of doing things. The obvious choice for programming in Python is the PyCharm. It's a nice IDE, supports many features that I like and most importantly, it can help with the testing. PyCharm can easily integrate with popular test frameworks and run the tests for me.

  • This Week in Rust 316
  • Continuous Delivery for Puppet Enterprise 3.0 is now available

    I am very excited to announce the immediate availability of Continuous Delivery for Puppet Enterprise 3.0! Over the last year, we’ve taken to heart the challenges and recommendations our customers have shared with us on how we can make Continuous Delivery for Puppet Enterprise better. Our intent is to be truly customer-obsessed, meet our customers where they are, and help them get to where they want to be. This release focuses on our customers’ needs by providing more context into the impact of a proposed Puppet change by offering Hiera support for Impact Analysis, a simplified approach to defining pipelines as code, and the ability to easily compose custom deployment processes (currently in beta!). Let’s dive in!

Programming: PHP, C++, Python and More

Filed under
Development
  • Excellent Free Tutorials to Learn PHP

    PHP has been at the helm of the web for many years. It’s an extremely popular, interpreted scripting language that is ideally suited for web development in part because it has an approachable syntax and supports different operating systems. This language powers millions of web sites on the net and is extremely well supported by its user community.

    PHP is also used as a general-purpose programming language. PHP code can be executed with a command-line interface (CLI) and to implement standalone graphical applications. CLI PHP programs often automate common tasks such as testing, deployment, and application administration. The language offers a very complete set of object-oriented programming features as well as support for functional programming. The latest TIOBE Index (August 2019 at time of writing) ranks PHP in 8th place, behind Java, C, C++, C#, Python, Visual Basic .NET, and JavaScript.

    The language is released under a non-copyleft free software license / open source license. The latest stable version adds lots of new features.

  • Intel's MKL-DNN/DNNL 2.0 Beta 3 Release Adds SYCL + Data Parallel C++ Compiler

    Intel's MKL-DNN Deep Neural Network Library (DNNL) that is open-source and catering to deep learning applications like Tensorflow, PyTorch, DeepLearning4J, and others is nearing its version 2.0 release. With DNNL 2.0 is now support for Data Parallel C++ as Intel's new language as part of their oneAPI initiative.

    MKL-DNN/DNNL 2.0 Beta 3 was released on Wednesday and to my knowledge is their first public test release of the forthcoming 2.0. Notable with DNNL 2.0 is supporting SYCL API extensions and interoperability now with SYCL code, the single-source C++-based programming language backed by The Khronos Group and a crucial to Intel's new oneAPI initiative.

  • Watch this machine made out of Lego sort other Lego using AI

    Dubbed the “Universal Lego Sorting Machine” by its creator, Daniel West, it’s a pretty neat contraption that’s far more useful than any of the Lego science projects I used to make. The machine is apparently able to use AI to sort Lego into one of 18 different buckets at a rate of “about one brick every two seconds.” West says he trained the neural network that sorts the bricks using 3D images of Lego parts, and he says the network can learn to recognize any piece as long as there’s a 3D image to train on.

  • Reactive programming, a new way of thinking

    Get to know Reactive Programming and Grace Jansen, co-author of a new O'Reilly report that introduces Reactive and Reactive Architecture.

    [...]

    At Devoxx Belgium, Grace gave a number of talks, including one about Reactive programming and the pitfalls, entitled “Reacting to the future of application architecture.” In the talk, she uses an analogy from biology, namely how bees live and function together. “I compare the behavior of bees with how we would like applications to function and meet the requirements and expectations of users.”

  • Future-proof monolithic applications with modular design

    DevNation tech talks are hosted by the Red Hat technologists who create our products. These sessions include real solutions and code and sample projects to help you get started. In this talk, you’ll learn about future-proofing applications from Eric Murphy and Ales Nosek, Architects with Red Hat Consulting.

    When building an MVP software application, you may immediately jump to a microservices architecture because it’s the new norm for building cloud-native applications. You may also be skeptical about starting off with a monolith because of the perception of such applications as relics of the past.

  • Merge Sort in Python

    Merge Sort is one of the most famous sorting algorithms. If you're studying Computer Science, Merge Sort, alongside Quick Sort is likely the first efficient, general-purpose sorting algorithm you have heard of. It is also a classic example of a divide-and-conquer category of algorithms.

  • Updates on Unoon in December 2019

    This Saturday evening, I sat with Unoon project after a few weeks, I was continuously running it, but, did not resume the development effort. This time Bhavin also joined me. Together, we fixed a location of the whitelist files issue, and unoon now also has a database (using SQLite), which stores all the historical process and connection information. In the future, we will provide some way to query this information.

  • Summarising, Aggregating, and Grouping data in Python Pandas

    In this post, I will talk about summarizing techniques that can be used to compile and understand the data. I will use Python library Pandas to summarize, group and aggregate the data in different ways.

    I will be using college.csv data which has details about university admissions.

Programming Leftovers

Filed under
Development
  • A static-analysis framework for GCC

    One of the features of the Clang/LLVM compiler that has been rather lacking for GCC may finally be getting filled in. In a mid-November post to the gcc-patches mailing list, David Malcolm described a new static-analysis framework for GCC that he wrote. It could be the starting point for a whole range of code analysis for the compiler.

    According to the lengthy cover letter for the patch series, the analysis runs as an interprocedural analysis (IPA) pass on the GIMPLE static single assignment (SSA) intermediate representation. State machines are used to represent the code parsed and the analysis looks for places where bad state transitions occur. Those state transitions represent constructs where warnings can be emitted to alert the user to potential problems in the code.

    There are two separate checkers that are included with the patch set: malloc() pointer tracking and checking for problems in using the FILE * API from stdio. There are also some other proof-of-concept state machines included: one to track sensitive data, such as passwords, that might be leaked into log files and another to follow potentially tainted input data that is being used for array indexes and the like.

    The malloc() state machine is found in sm-malloc.cc, which is added by this patch, looks for typical problems that can occur with pointers returned from malloc(): double free, null dereference, passing a non-heap pointer to free(), and so on. Similarly, one of the patches adds sm-file.c for the FILE * checking. It looks for double calls to fclose() and for the failure to close a file.

  • RUST howto getting started – hello world

    if one is viewing this site using Firefox or Gecko-Engine… one is running RUST already.

    At the beginning – one was big fan of Java – Java was/still is all the rage – theoretically write once – run anywhere linux, osx and (thanks to Google) on mobile and even on the closed source OS who’s name shall not be mentioned, nobody knows what the Java Virtual Machine does besides running bytecode, Java on slow ARM CPUs is kind of a burden.

  • Async Interview #2: cramertj, part 3

    This blog post is continuing my conversation with cramertj. This will be the last post.

    In the first post, I covered what we said about Fuchsia, interoperability, and the organization of the futures crate.

    In the second post, I covered cramertj’s take on the Stream, AsyncRead, and AsyncWrite traits. We also discussed the idea of attached streams and the importance of GATs for modeling those.

  • Python 3.7.6rc1 and 3.6.10rc1 are now available for testing

    Python 3.7.6rc1 and 3.6.10rc1 are now available. 3.7.6rc1 is the release preview of the next maintenance release of Python 3.7;  3.6.10rc1 is the release preview of the next security-fix release of Python 3.6. Assuming no critical problems are found prior to 2019-12-18, no code changes are planned between these release candidates and the final releases. These release candidates are intended to give you the opportunity to test the new security and bug fixes in 3.7.6 and security fixes in 3.6.10. While we strive to not introduce any incompatibilities in new maintenance and security releases, we encourage you to test your projects and report issues found to bugs.python.org as soon as possible. Please keep in mind that these are preview releases and, thus, their use is not recommended for production environments.

  • Print all git repos from a user (only curl and grep)
  • Linux Fu: Debugging Bash Scripts

    A recent post about debugging constructs surprised me. There were quite a few comments about how you didn’t need a debugger, as long as you had printf. For that matter, we’ve all debugged systems where you had nothing but an LED to flash or otherwise turn on to communicate with the user. However, it is hard to deny that a debugger can help with complex code.

    To say you only need printf would be like saying you only need machine language. Technically accurate — you can do anything in machine language. But it sure makes things easier to have an assembler or some language to help you work out your problem. If you write a simple bash script, you can use the equivalent to printf — maybe that’s the echo command, although there is usually a printf command on a typical system, if you want to use it. However, there are other things you can do with bash including a pretty cool debugger if you know how to find it.

    I assume you already know how to use echo and printf, but let’s dig into how to use trace execution line by line without the need for echo statements on every other line. Along the way, you’ll learn how to get started with the bash debugger.

Heroku Review apps available for Treeherder

Filed under
Development
Moz/FF

In bug 1566207 I added support for Heroku Review Apps (link to official docs). This feature allows creating a full Treeherder deployment (backend, frontend and data ingestion pipeline) for a pull request. This gives Treeherder engineers the ability to have their own deployment without having to compete over the Treeherder prototype app (a shared deployment). This is important as the number of engineers and contributors increases.

Once created you get a complete Heroku environment with add-ons and workers configured and the deployment for it.

Looking back, there are few new features that came out of the work, however, Heroku Review apps are not used as widely as I would have hoped for.

Read more

Syndicate content

More in Tux Machines

Type Title Author Replies Last Postsort icon
Story OSS: Adoption, Creative Commons (CC), Mozilla and LibreOffice Roy Schestowitz 15/12/2019 - 12:06am
Story Red Hat's Openwashing and IBM Using Red Hat to Sell Proprietary z/OS Roy Schestowitz 15/12/2019 - 12:02am
Story This week in KDE: building up to something big Roy Schestowitz 14/12/2019 - 11:45pm
Story GNOME in Review and Outreachy in GNOME Roy Schestowitz 14/12/2019 - 11:42pm
Story Proprietary Software and Digital Jails Roy Schestowitz 2 14/12/2019 - 11:19pm
Story D9VK 0.40 Roy Schestowitz 14/12/2019 - 11:09pm
Story Graphics: Mesa 20.0 Development, Mir Work and Radeon's Linux Limits Roy Schestowitz 14/12/2019 - 11:07pm
Story today's howtos Roy Schestowitz 14/12/2019 - 11:04pm
Story KDE at Upcoming Events: Chaos Communication Congress and foss-north Roy Schestowitz 14/12/2019 - 10:52pm
Story Games: Sail Forth, Backspace Bouken, Receiver 2 Roy Schestowitz 14/12/2019 - 10:47pm