Pull to refresh

Development

Show first
Rating limit
Level of difficulty

Writing The Matrix in Python

Reading time 6 min
Views 3.1K

Programming textbooks usually do not indulge us with variety of examples. In most manuals, exercises are similar to each other and not particularly interesting: create another address book, draw a circle using turtle, develop a website for a store selling some kind of "necessary" advertising nonsense. Too far from the authentic imitation of "The Matrix". Although…

How about taking over the control and starting to invent exercises yourself?

Would you like to write your own personal little "Matrix"? Of course, not the one with skyscrapers, stylish phones of the time, and the ubiquitous invincible Agent Smiths. We will need a couple of more months of learning for that. But any beginner programmer can write a model of the cult splash screensaver with the green streams of digits flowing down the screen. Let's try to creat it in the "great and mighty" Python.

Read more
Total votes 11: ↑10 and ↓1 +9
Comments 0

DSL (domain-specific language) implementation with macros

Level of difficulty Medium
Reading time 8 min
Views 2K

image
This is a translation of my own article


The release of NewLang language with a brand new "feature" is coming, a remodeled version of the preprocessor that allows you to extend the language syntax to create different DSL dialects using macros.


What is it about?


DSL (Subject Oriented Language) is a programming language specialized for a specific application area. It is believed that the use of DSL significantly increases the level of abstractness of the code, and this allows to develop more quickly and efficiently and greatly simplifies the solution of many problems.

Conditionally, we can distinguish two approaches to DSL implementation:


  • Development of independent syntax translators using lexer and parser generators to define the grammar of the target language through BNF (Backus–Naur form) and regular expressions (Lex, Yacc, ANTLR, etc.) and then compiling the resulting grammar into machine code.
  • Development or integration of the DSL dialect into a general-purpose language (metalanguage), including the use of various libraries or special parsers / preprocessors.

We will talk about the second option, namely the implementation of DSL on the basis of general-purpose languages (metalanguages) and the new implementation of macros in NewLang as the basis for DSL development.

Read more →
Total votes 2: ↑2 and ↓0 +2
Comments 2

Use of Python to write plugins for GIMP

Level of difficulty Medium
Reading time 9 min
Views 2.6K

GIMP (GNU Image Manipulation Program) is a free and open-source image editing software that provides users with a wide range of tools for editing and manipulating digital images. Python is a high-level programming language that is often used for scripting and automation tasks. The combination of GIMP and Python provides a powerful platform for users to create custom image editing plugins that can automate repetitive tasks, extend the functionality of GIMP, and customize the software to suit their specific needs.

Python provides a flexible and easy-to-learn language for writing GIMP plugins. GIMP provides an API (Application Programming Interface) that allows Python scripts to interact with the image editing program Python plugins for GIMP can be used for a wide range of tasks, including automating repetitive tasks, enhancing the functionality of GIMP, and customizing the software to suit specific needs. Some examples of tasks that can be automated using Python plugins include batch processing of images, resizing and cropping of images, and converting file formats.

Plugins can also add new features to GIMP, such as custom brushes, filters, and effects. Additionally, plugins can be used to create custom user interfaces that enable users to interact with GIMP in new and unique ways.

Read more
Total votes 1: ↑1 and ↓0 +1
Comments 0

Will transport planners lose their jobs as AI becomes smarter?

Level of difficulty Medium
Reading time 13 min
Views 1K

As a Product Manager who has worked on the development of delivery route optimisation software for 10+ years, I see that modern technologies can significantly improve the optimisation process and deliver better solutions. AI, machine learning, and other modern technologies have the potential to revolutionise the way delivery routes are optimised in the future.

With the increasing availability of data and the advancement of AI and machine learning algorithms, it is becoming possible to develop more sophisticated prediction models that can be integrated into optimisation algorithms to make more accurate and informed decisions about route planning and scheduling. Machine learning algorithms can be trained to predict customer demand based on historical sales data and other market trends, allowing businesses to optimise their delivery schedules and routes accordingly. AI can also be used to optimise delivery schedules based on customer preferences and other relevant factors.

Blockchain technology could be used to create a secure, decentralised database of information about deliveries, including information about the products being shipped, the route they are taking, and the status of the delivery. This could help increase transparency and accountability in the delivery process as well as reduce the risk of fraud and theft.

Internet of Things (IoT) devices, such as sensors and GPS trackers, may collect real-time data about delivery vehicles and their surroundings. This data could be analysed and used to optimise delivery routes in real time, as well as to track the location of deliveries and monitor the condition of the products being shipped.

Read more
Total votes 1: ↑1 and ↓0 +1
Comments 13

How to Create a Color Picker in React Native

Level of difficulty Easy
Reading time 2 min
Views 1.8K

React Native is a popular JavaScript library for creating mobile applications for both Android and iOS devices. One of the most useful components that you can use in React Native is a color picker. A color picker allows users to select a specific color from a range of colors. In this tutorial, we will show you how to create a color picker in React Native.

Read more
Total votes 1: ↑1 and ↓0 +1
Comments 1

SwiftUI & ChatGPT. The world is changing. Again

Level of difficulty Easy
Reading time 4 min
Views 2.9K

Everything that follows from this point forward input prompts, followed by ChatCGP’s responses, complete with sample code in Swift.

> Hey ChatGPT, can you make a SwiftUI registration form with name, address and city fields?

Read more
Total votes 5: ↑4 and ↓1 +3
Comments 1

Swift 5.7: Regex. Shorthands for optional unwrapping. Unlock existentials for all protocols

Level of difficulty Medium
Reading time 3 min
Views 992

Swift 5.7: Regex. Shorthands for optional unwrapping. Unlock existentials for all protocols.

Shorthands for optional unwrapping. Improved type inference for complex closures. Better string parsing with Swift Regex. Creating a Regex with Regex literal. Creating a Regex using RegexBuilder. Unlock existentials for all protocols.

Read more
Rating 0
Comments 0

State Management for processes flow

Reading time 12 min
Views 1.1K

Most of the processes that people use in their work lives can be represented as some object that goes through some flow. Each flow contains many stages, in each one of them the object can be manipulated by certain group of users.

In this article I want to suggest an approaches to effectively handle such flow based systems. 

Read more
Rating 0
Comments 1

5 Ways to Prepare Your Business For The Metaverse

Reading time 4 min
Views 482

The Metaverse is a futuristic concept that has been transformed into reality with ongoing advancements in technology. The term Metaverse was first coined in 1992 in the Sci-fi Novel “Snow Crash'' by Neal Stephenson. However, ever since Facebook rebranded itself as Meta in 2021, it has become a trending buzzword in today’s technological space. Ever since then, various renowned companies including Microsoft, Nike, Adidas, Roblox, and more have invested millions in this concept. Although the Metaverse for business is still in its initial phase, it holds the potential to revolutionalise various industries from gaming to real estate. 

The Metaverse is an amalgamation of various advanced technologies like AR/VR, AI, 3D reconstruction, and more. It aims to create a virtual universe where users can interact with each other and carry out various types of daily chores including working, shopping, travelling, etc. 

This article will focus on the various ways that will tell you how to enter the Metaverse and make profits. So without further delay, let’s get started. 

Read more
Total votes 1: ↑0 and ↓1 -1
Comments 0

The Best NBA Fantasy Apps in 2023

Reading time 3 min
Views 3.5K

[Image Credit: dunkest.com]

Are you looking for the best NBA fantasy apps in 2023? If yes, then you have landed on the right article. As we all know, in recent years fantasy sports like the fantasy NBA have really grown in terms of audience and more people are showing their interest in it. Players are very excited to use the best NBA fantasy app.

For a basketball fan, the NBA season is the best time of the year, and fantasy sports app development have become the latest trend where you can create your own team and can compete with real-time teams. It offers you not only fun but also offers you an opportunity to make money.

Let's know about the fantasy basketball league. 

What is a Fantasy Basketball League?

Basketball fantasy leagues are a popular medium for millions of fans where they play their popular online NBA sports every year. Such a platform allows you to create your own team, play alongside your featured team, watch live highlights, draft your lineup, and many more. Here you can choose the top world of the world and can make your fantasy team in order to compete with a real team in an online fantasy basketball platform. Using this kind of platform, fans are able to create private leagues with their friends, view the latest scores, analysis, lineups, and trades, and configure rules. 

Now, Let's know about the popular NBA fantasy app

Top NBA Fantasy Apps in 2023

Players are highly fascinated by NBA fantasy sports, and day by day the number of players is increasing. There are various platforms where you can enjoy the NBA fantasy app but choosing the right platform may be a tedious task. So, for your help, we have prepared a list of the best NBA fantasy app for both Android and iOS. 

Read more
Rating 0
Comments 0

«Divide and Conquer» for OpenStreetMap world inside PostgreSQL

Level of difficulty Medium
Reading time 28 min
Views 1.6K

I will continue the story "How to put the whole world into a regular laptop: PostgreSQL and OpenStreetMap" with secrets about OpenStreetMap geodata, on which many companies have built their business, but not everyone shares the details... Well, today we will open crucial details.

The OSM database in PosgreSQL after loading from the dump takes up more than 587 GB. This is already a large database by the standards of a DBMS, and one huge table for each type of object will not work. For manageability, such data must be partitioned, it's good that PostgreSQL supports declarative data partitioning. It remains only to figure out how to split geographical data. After searching and comparing, the H3 hierarchical hexagonal geospatial indexing system came to rescue. All this was implemented in my openstreetmap_h3 project for fast processing and loading of the world dump into the PostGIS database.

I considered following options from geopartitioning systems...

Read more
Rating 0
Comments 0

Building your own CLI with Swift Programming Language

Level of difficulty Easy
Reading time 5 min
Views 3.2K

Command-line interfaces (CLI) are a common way to use applications. In iOS, we usually use scripting languages like Bash or Ruby to build those CLIs and automate mundane tasks. The most popular CLI for app signing and build automation is, without a doubt, Fastlane, which was initially written in Ruby. Fastlane is a great tool, convenient and fairly easy to use, and a lot of effort came into building it.

However, there's a great chance you considered moving away from Fastlane to avoid learning Ruby and to lower the entry threshold for your developers. Setting up a Ruby environment could be quite tedious and require additional devs' expertise to write and support those scripts.

Explore how to build your own command line tools with Swift in this article.

Read more
Total votes 2: ↑2 and ↓0 +2
Comments 5

How to put the whole world into a regular laptop: PostgreSQL and OpenStreetMap

Level of difficulty Easy
Reading time 12 min
Views 2.4K

When a person used to say that he controls the whole world, he was usually placed in the next room with Napoleon Bonaparte. I hope that these times are in the past and everyone can analyze the geodata of the entire Earth and get answers to their global questions in minutes and seconds. I published Openstreetmap_h3 - my project, which allows you to perform geoanalytics on data from OpenStreetMap in PostGIS or in any query engine that can work with Apache Arrow / Parquet.

First of all, I say hello to the haters and skeptics. What I developed is really unique and solves the problem of transforming and analyzing geodata using the usual and familiar tools available to every analyst and data science specialist without bigdata, GPGPU, FPGA. What looks easy to use and code now is my personal project where I have invested my vacations, weekends, sleepless nights and a lot of personal time over the past 3 years. Maybe I will share the background of the project and the rake that I went through, but first I will still describe the end result.

Read more
Total votes 8: ↑8 and ↓0 +8
Comments 0

Roads and building density in North America. 100GB geodata processing OSM data in PostgreSQL

Reading time 15 min
Views 1.4K

Today I will discover America to you based on OpenStreetMap data in PostgreSQL15/PostGIS and my project openstreetmap_h3. Let's run the query and compare its execution time on the Citus column store in PostgreSQL and on the standard 100GB database partitioned by H3 geoindex.

We will find the top15 buildable locations in North America and the total length of roads, as well as their type and surface. I will not overload the publication with program logs, let's focus on the data! You can easily repeat all requests yourself on your laptop/computer.

Read more
Rating 0
Comments 0

PyGMTSAR is Next Generation Interferometric Synthetic Aperture Radar (InSAR) Software for Everyone

Reading time 6 min
Views 2.5K

Do you need to produce satellite interferometry results for your work or study? Or should you find the way to process terabytes of radar data on your common laptop? Maybe you aren't confident about the installation and usage of the required software. Fortunately, there is the next generation of satellite interferometry products available for you. Beginners can build the results easily and advanced users might work on huge datasets. Open Source software PyGMTSAR is available on GitHub for developers and on DockerHub for advanced users and on Google Colab for everyone. This is the cloud-ready product, and it works the same as do you run it locally on your old laptop as on powerful cloud servers.


Read more →
Total votes 1: ↑1 and ↓0 +1
Comments 0

The first joint project with friends or how it turned out that each of us is good in his field

Level of difficulty Easy
Reading time 3 min
Views 635

Not so long ago, a good friend of mine suggested that I could make a mobile application that could allow him, as well as other less experienced football scouts, to be able to collect and store analytical information on football players, to provide reports to clubs or agencies and also to communicate with more advanced scouts.

How can it be useful?

At the moment, there is no analogue to similar applications in the Russian segment. This is because there is no great need for it. Clubs don't want to spend money on it, and agencies don't have such resources. Moreover, the implementation takes too much time. And scouts are used to working according to their own schemes and storing information in notebooks and so on. However, it does not mean that such an application cannot be useful for young scouts. It would teach you how to make reports correctly, focus on the data that football clubs and agencies are interested in, and would also allow you to select those scouts who would have potential.

By that time, I had already worked enough in mobile development to make such an application. However, the right approach for the implementation was required, in order to understand what this product should represent as a result, and also design.

By a lucky coincidence, the last question disappeared by itself because my friend's girlfriend was just finishing her design studies at Yekaterinburg University, so her graduation project became our design.

Read more
Total votes 1: ↑1 and ↓0 +1
Comments 0