Language Selection

English French German Italian Portuguese Spanish

Programming Leftovers

Filed under
Development
  • IntelliJ IDEA plugin catches cut'n'pasted Java code • The Register

    Boffins affiliated with dev tools biz JetBrains and HSE University in Moscow have devised an open-source plugin for the company's Java development editor that guards against copy-and-paste coding.

    AntiCopyPaster, available on GitHub, works with IntelliJ IDEA, JetBrain's integrated development environment (IDE) for Java programmers. It was created by Anton Ivanov, Zarina Kurbatova, Yaroslav Golubev, Andrey Kirilenko, Timofey Bryksin to help mitigate the problems that can accompany copied code.

    In a paper posted to ArXiv, the researchers observe that while "[c]opying and pasting constitute an essential part of writing programming code," doing so can lead to code maintenance, security problems, and licensing issues.

    "While there is nothing wrong with the copying and pasting as such, research also shows that having clones inside a project can make its maintenance more difficult due to overgrown codebases," the paper explains. "Fixing vulnerabilities across multiple duplicate instances can be difficult and lead to increased security risks."

  • Extracting information from Python source code | Red Hat Developer

    What library symbols does a Python source code file use? And what symbols does it provide to its users? A simple tool called invectio can provide this information based on static source code analysis. Invectio means “import” in Latin. As the name suggests, this small tool can extract information about imports as well as information about what users can import from Python modules.

  • Get current date in python

    The current date must be read for different types of programming purposes. Python has different modules to get the current date. The datetime module is one of them. It is a built-in module of Python. So, you don’t need to install it. To read the current date, you have to import this module into your script. The uses of this module to get the current date have shown in this tutorial.

  • PyPI is not trustworthy: zaitcev — LiveJournal

    I was dealing with a codebase S at work that uses a certain Python package N (I'll name it in the end, because its identity is so odious that it will distract from the topic at hand). Anyhow, S failed tests because N didn't work on my Fedora 35. That happened because S installed N with pip(1), which pulls from PyPI, and the archive at PyPI contained broken code.

    The code for N in its source repository was fine, only PyPI was bad.

    When I tried to find out what happened, it turned out that there is no audit trail for the code in PyPI. In addition, it is not possible to contact listed maintainers of N in PyPI, and there is no way to report the problem: the problem tracking system of PyPI is all plastered with warnings not to use it for problems with packages, but only with PyPI software itself.

  • 5 ways to learn the C programming language in 2022 | Opensource.com

    I am proficient in several programming languages, but my favorite has to be C. Developed in the 1970s as a systems programming language, C remains one of the most popular programming languages in 2021.

  • Against Pair Programming

    I'd argue that pair programming isn't only ineffective, but detrimental. Pair programmers tend to give feedback that's more appropriate in a design or code review. The overall strategy should be agreed to before you write any code. For the pairs that follow this, the only feedback that's left tends to be bikeshedding or stylistic, both of which kill velocity. It's like having a backseat driver. Not to mention the coveted flow state that most developers look for.

  • How programmers make sure that their software is correct

    The importance of producing correct software has long been understood. The best scientists and engineers have been trying to do this for decades.

  • Neural Network From Scratch

    In this edition of Napkin Math, we'll invoke the spirit of the Napkin Math series to establish a mental model for how a neural network works by building one from scratch. In a future issue we will do napkin math on performance, as establishing the first-principle understanding is plenty of ground to cover for today!

    Neural nets are increasingly dominating the field of machine learning / artificial intelligence: the most sophisticated models for computer vision (e.g. CLIP), natural language processing (e.g. GPT-3), translation (e.g. Google Translate), and more are based on neural nets. When these artificial neural nets reach some arbitrary threshold of neurons, we call it deep learning.

  • How to Do Bash Nested While Loop

    The loops are quite well-known in most programming languages to iterate the data or increment or decrement the values in the code. The loops can be used alone or in nested forms. One of the most famous loops used in programming is the “While” loop. This loop continues to get executed until the mentioned condition is satisfying. Within this guide, we will be deliberating the way to use the nested “while” loop in bash programming. As most of our work would be through a terminal, so we need to open it first. Hence, we are trying the shortcut key “Ctrl+Alt+T” to open the terminal shell application of the Ubuntu 20.04 system.

    Let’s start creating a nested “while” loop in the bash script of Ubuntu 20.04. This will be started from the creation of a new file in a terminal with the help of a simple touch query with the bash file name. The file name is “new.sh”. This file is now held at the home folder of our Ubuntu 20.04 system. We need to open it within some editor to add bash code. So, we have been utilizing the “GNU Nano” editor for this purpose. This file has been opened with the help of a simple “nano” instruction and quickly opens it within the editor. Both the touch and nano instructions are shown in the attached screenshot picture.

  • Pyqt5 and MLT compiled in OE

    I have been looking around at video editors, as having ongoing issues with LiVES. There are a couple that require 'pyqt5' and at least one that requires 'mlt'.

  • GNU libunistring-1.0 released

    The license has changed from "LGPLv3+ or GPLv2" to "LGPLv3+ or GPLv2+".

More in Tux Machines

digiKam 7.7.0 is released

After three months of active maintenance and another bug triage, the digiKam team is proud to present version 7.7.0 of its open source digital photo manager. See below the list of most important features coming with this release. Read more

Dilution and Misuse of the "Linux" Brand

Samsung, Red Hat to Work on Linux Drivers for Future Tech

The metaverse is expected to uproot system design as we know it, and Samsung is one of many hardware vendors re-imagining data center infrastructure in preparation for a parallel 3D world. Samsung is working on new memory technologies that provide faster bandwidth inside hardware for data to travel between CPUs, storage and other computing resources. The company also announced it was partnering with Red Hat to ensure these technologies have Linux compatibility. Read more

today's howtos

  • How to install go1.19beta on Ubuntu 22.04 – NextGenTips

    In this tutorial, we are going to explore how to install go on Ubuntu 22.04 Golang is an open-source programming language that is easy to learn and use. It is built-in concurrency and has a robust standard library. It is reliable, builds fast, and efficient software that scales fast. Its concurrency mechanisms make it easy to write programs that get the most out of multicore and networked machines, while its novel-type systems enable flexible and modular program constructions. Go compiles quickly to machine code and has the convenience of garbage collection and the power of run-time reflection. In this guide, we are going to learn how to install golang 1.19beta on Ubuntu 22.04. Go 1.19beta1 is not yet released. There is so much work in progress with all the documentation.

  • molecule test: failed to connect to bus in systemd container - openQA bites

    Ansible Molecule is a project to help you test your ansible roles. I’m using molecule for automatically testing the ansible roles of geekoops.

  • How To Install MongoDB on AlmaLinux 9 - idroot

    In this tutorial, we will show you how to install MongoDB on AlmaLinux 9. For those of you who didn’t know, MongoDB is a high-performance, highly scalable document-oriented NoSQL database. Unlike in SQL databases where data is stored in rows and columns inside tables, in MongoDB, data is structured in JSON-like format inside records which are referred to as documents. The open-source attribute of MongoDB as a database software makes it an ideal candidate for almost any database-related project. This article assumes you have at least basic knowledge of Linux, know how to use the shell, and most importantly, you host your site on your own VPS. The installation is quite simple and assumes you are running in the root account, if not you may need to add ‘sudo‘ to the commands to get root privileges. I will show you the step-by-step installation of the MongoDB NoSQL database on AlmaLinux 9. You can follow the same instructions for CentOS and Rocky Linux.

  • An introduction (and how-to) to Plugin Loader for the Steam Deck. - Invidious
  • Self-host a Ghost Blog With Traefik

    Ghost is a very popular open-source content management system. Started as an alternative to WordPress and it went on to become an alternative to Substack by focusing on membership and newsletter. The creators of Ghost offer managed Pro hosting but it may not fit everyone's budget. Alternatively, you can self-host it on your own cloud servers. On Linux handbook, we already have a guide on deploying Ghost with Docker in a reverse proxy setup. Instead of Ngnix reverse proxy, you can also use another software called Traefik with Docker. It is a popular open-source cloud-native application proxy, API Gateway, Edge-router, and more. I use Traefik to secure my websites using an SSL certificate obtained from Let's Encrypt. Once deployed, Traefik can automatically manage your certificates and their renewals. In this tutorial, I'll share the necessary steps for deploying a Ghost blog with Docker and Traefik.