Pull to refresh
823.79

Programming *

The art of creating computer programs

Show first
Rating limit
Level of difficulty

How to Write a Smart Contract with Python on Ontology? Part 2: Storage API

Reading time3 min
Views1.3K
image
This is an official tutorial published earlier on Ontology Medium blog
Excited to publish it for Habr readers. Feel free to ask any related questions and suggest a better format for tutorial materials

Foreword


Earlier, in Part 1, we introduced the Blockchain & Block API of Ontology’s smart contract. Today we will discuss how to use the second module: Storage API. The Storage API has five related APIs that enable addition, deletion, and changes to persistent storage in blockchain smart contracts. Here’s a brief description of the five APIs:
Read more →
Rating0
Comments0

Machine Learning for your flat hunt. Part 2

Reading time9 min
Views1.6K


Have you thought about the influence of the nearest metro to the price of your flat? 
What about several kindergartens around your apartment? Are you ready to plunge in the world of geo-spatial data?


The world provides so much information…



Read more →
Total votes 4: ↑4 and ↓0+4
Comments0

Regular Avalonia

Reading time4 min
Views8K
Sometimes we don’t understand how the regular expression that we have composed works and want to check. There are many applications like regex101.com or vs code. I wanted to add one more to this list.

In this article we will see how you can wrap Regex in cross-platform graphics and create a simple application for testing regular expressions.


Read more →
Total votes 14: ↑13 and ↓1+12
Comments0

For professors' note: use PVS-Studio to get students familiar with code analysis tools

Reading time4 min
Views1.6K

Picture 1

Our support chats and some other indirect signs showed that there are many students among our free users. Here's the reason: PVS-Studio is now more often used by professors in courses related to software development. We are very pleased with this, and we decided to write this small article to fall under notice of other teachers. We are pleased that students become acquainted with the methodology of static code analysis in general and the PVS-Studio tool in particular. Our team will try to contribute to this trend.
Read more →
Total votes 24: ↑23 and ↓1+22
Comments0

A new video series for beginners to learn Python programming

Reading time2 min
Views1.4K
Probably the largest hurdle when learning any new programming language is simply knowing where to get started. What’s important? What do I need to know to be proficient? It’s hard to follow docs when you’re not even sure what you’re reading.

You might be taking a look at Python. Maybe you’re drawn because of its popularity. Maybe you’re drawn to its flexibility. With Python you can create solutions of all shapes and sizes. You can dig into web development. Simplify your life through automation. Or maybe begin building the future with machine learning.

Picking up a new language is a common situation for modern-day developers. The days of going your entire career focused on one language are long since gone.

Fortunately, concepts typically don’t change as you move from one programming language to the next. Sure, the syntax might be different, but an if statement is still an if statement even when it’s written using { } or End If. So, we don’t need to learn how to program, but rather how to program in a new language.

This is why Susan and I created this series of videos! You might know how to write code, for example in JavaScript, Java or C# (or COBOL, or Bash, or… it doesn’t matter, really). Maybe you learned in a college course, online, or reading a book. So, you don’t need to be taught what an if statement is, but rather what an if statement looks like in Python.

Read more →
Total votes 7: ↑6 and ↓1+5
Comments0

Quintet instead of Byte — data storage and retrieval approach

Reading time13 min
Views1.6K
Quintet is a way to present atomic pieces of data indicating their role in the business area. Quintets can describe any item, while each of them contains complete information about itself and its relations to other quintets. Such description does not depend on the platform used. Its objective is to simplify the storage of data and to improve the visibility of their presentation.



We will discuss an approach to storing and processing information and share some thoughts on creating a development platform in this new paradigm. What for? To develop faster and in shorter iterations: sketch your project, make sure it is what you thought of, refine it, and then keep refining the result.

The quintet has properties: type, value, parent, and order among the peers. Thus, there are 5 components including the identifier. This is the simplest universal form to record information, a new standard that could potentially fit any programming demands. Quintets are stored in the file system of the unified structure, in a continuous homogeneous indexed bulk of data. The quintet data model — a data model that describes any data structure as a single interconnected list of basic types and terms based on them (metadata), as well as instances of objects stored according to this metadata (data).
Read more →
Total votes 8: ↑8 and ↓0+8
Comments2

Python in Visual Studio Code – September 2019 Release

Reading time3 min
Views2.7K
We are pleased to announce that the September 2019 release of the Python Extension for Visual Studio Code is now available. You can download the Python extension from the Marketplace, or install it directly from the extension gallery in Visual Studio Code. If you already have the Python extension installed, you can also get the latest update by restarting Visual Studio Code. You can learn more about  Python support in Visual Studio Code in the documentation.

This was a short release where we closed 35 issues, including improvements to the Python Language Server and to Jupyter Notebook cell debugging, as well as detection of virtual environment creation. The full list of enhancements is listed in our changelog

Read more →
Total votes 8: ↑8 and ↓0+8
Comments0

New Dark Theme Available on Visual Studio App Center

Reading time1 min
Views1.8K
We are committed to building Visual Studio App Center for you. Thanks to you taking the time to request features via our Github repo, we are excited to announce that dark theme is available in App Center.

In the next few screens, you can get an idea of how App Center’s dark theme looks:


App Center Distribute in Dark theme


App Center Test in Dark theme
Read more →
Total votes 7: ↑7 and ↓0+7
Comments0

Introducing Cascadia Code font

Reading time2 min
Views1.8K
Cascadia Code is finally here! You can install it directly from the GitHub repository’s releases page or automatically receive it in the next update of Windows Terminal.



Wait, what’s Cascadia Code?


Cascadia Code was announced this past May at Microsoft’s Build event. It is the latest monospaced font shipped from Microsoft and provides a fresh experience for command line experiences and code editors. Cascadia Code was developed hand-in-hand with the new Windows Terminal application. This font is most recommended to be used with terminal applications and text editors such as Visual Studio and Visual Studio Code.
Read more →
Total votes 9: ↑9 and ↓0+9
Comments2

Tests vs. Types — Rust version

Reading time5 min
Views2.4K

A few days ago 0xd34df00d has published the translation of the article, describing the possible information about some function if we use it as a "black box", not trying to read its implementation. Of course, this information is quite different from language to language; in the original article, four cases were considered:


  • Python — dynamic typing, almost no information from signature, some hints are gained by the tests;
  • C — weak static typing, a little more information;
  • Haskell — strong static typing, with pure functions by default, a lot more information;
  • Idris — dependent typing, compiler can prove the function correctness.

"Here's C and there's Haskell, and what about Rust?" — this was the first question in the following discussion. The reply is here.

Read more →
Total votes 18: ↑18 and ↓0+18
Comments0

Make it easier to get finished: Interview with John Romero, developer of Doom

Reading time12 min
Views5.8K
At the last Tech Train IT festival, we met the legendary John Romero, who designed and developed the iconic Wolfenstein 3D, Doom, and Quake. We talked about whether game developers need soft skills, which working tools to pay attention to, and which co-founder of Id Software's favorite toys are. Questions were asked by Nikita Tsaplin, the founder of RUVDS.


→ Text and video in Russian
Total votes 26: ↑25 and ↓1+24
Comments0

Handling Objections: Static Analysis Will Take up Part of Working Time

Reading time5 min
Views998
bugTalking to people at conferences and in comments to articles, we face the following objection: static analysis reduces the time to detect errors, but takes up programmers' time, which negates the benefits of using it and even slows down the development process. Let's get this objection straightened out and try to show that it's groundless.
Read more →
Total votes 33: ↑32 and ↓1+31
Comments0

Tips and tricks from my Telegram-channel @pythonetc, August 2019

Reading time4 min
Views1.6K


It is a new selection of tips and tricks about Python and programming from my Telegram-channel @pythonetc.

Previous publications


If an instance of a class doesn’t have an attribute with the given name, it tries to access the class attribute with the same name.

>>> class A:
...     x = 2
...
>>> A.x
2
>>> A().x
2
Read more →
Total votes 29: ↑27 and ↓2+25
Comments1

Analysis of the Apache Dubbo RPC Framework by the PVS-Studio Static Code Analyzer

Reading time9 min
Views1.5K

Picture 2

Apache Dubbo is one of the most popular Java projects on GitHub. It's not surprising. It was created 8 years ago and is widely applied as a high-performance RPC environment. Of course, most of the bugs in its code have long been fixed and the quality of the code is maintained at a high level. However, there is no reason to opt out of checking such an interesting project using the PVS-Studio static code analyzer. Let's see how it turned out.
Read more →
Total votes 25: ↑24 and ↓1+23
Comments0

Escaping the Thicket of Tests: Building a Shortcut from a Fixture to an Assertion

Reading time15 min
Views1.1K


In this article, I would like to propose an alternative to the traditional test design style using functional programming concepts in Scala. This approach was inspired by many months of pain from maintaining dozens of failing tests and a burning desire to make them more straightforward and more comprehensible.


Even though the code is in Scala, the proposed ideas are appropriate for developers and QA engineers who use languages supporting functional programming. You can find a Github link with the full solution and an example at the end of the article.

Read more →
Total votes 8: ↑6 and ↓2+4
Comments0

An Easy Way to Make Money on Bug Bounty

Reading time5 min
Views5K

Рисунок 2


Surely you've heard the expression «bug hunting» many times. I dare to assume, you won't mind earning one or two hundred (or even thousand) dollars by finding a potential vulnerability in someone's program. In this article, I'll tell you about a trick that will help analyzing open source projects in order to find such vulnerabilities.
Read more →
Total votes 24: ↑20 and ↓4+16
Comments0

Modern Environment for React Native Applications

Reading time4 min
Views2.1K
In this article, we will consider the process of setting up a React Native environment using expo-cli, Typescript, and Jest.
Typescript will help us avoid development mistakes and write a more efficient mobile application.

Modern tools allow integrating Typescript into the development environment. We can also use VS Code that supports Typescript.

Integration with React Native will give us the opportunity to use the auto-completion service, code navigation, and refactoring.

Expo is a toolkit that simplifies the creation of native React applications. This tutorial will give you an idea of how you can quickly create native React applications using Expo.


Read more →
Total votes 7: ↑6 and ↓1+5
Comments0

How to Catch a Cat with TLA+

Reading time3 min
Views1.9K
Many programmers struggle when using formal methods to solve problems within their programs, as those methods, while effective, can be unreasonably complex. To understand why this happens, let’s use the model checking method to solve a relatively easy puzzle:

Conditions


You’re in a hallway with seven doors on one side leading to seven rooms. A cat is hiding in one of these rooms. Your task is to catch the cat. Opening a door takes one step. If you guess the correct door, you catch the cat. If you do not guess the correct door, the cat runs to the next room.
Read more →
Total votes 9: ↑9 and ↓0+9
Comments0
Change theme settings

Authors' contribution