Pull to refresh
1073.72

Programming *

The art of creating computer programs

Show first
Rating limit
Level of difficulty

Small things that pollute your code

Reading time4 min
Views2.4K
I'm not going to discuss global things like design patterns and so on, as there's enough literature on that topic. Instead, I'd like to attract your attention to some small things that still affect lucidity and maintainability of a code.

Polluting code with 'test-only' methods or access modifiers


First of all, if you give access to something that shouldn't be used in production code, it gets used sooner or later. Just because it exist. The argument that it's an internal stuff doesn't work as it absolutely shouldn't be matter, writing you a library or isolated project! Treat people who will add anything to your internal codebase the same way as if they use your existing code as a different library.

Thus, if for some reason in test, you need to call something that should not be called on prod — use reflection or whatever else but do not expose it in production code! And there's no reason to afraid of reflection for test proposes, at the end, you using Mockito, shouldn't it be bad in that case as well?
Read more →

How to find an English teacher. Part 2

Reading time4 min
Views916
image

This is a continuation of story about using Data Science for finding an English teacher. If you have not read it yet - there is an opportunity to become familiar with it

Briefly  -  we had information about language teachers and tried to apply some basic ideas using pandas and our expectations. Unfortunately we got stuck on the third step, because there is not enough information for resolving our the last requirements  -  we need not more 3 candidates at the end.

Disclaimer
It is an approach based on my own experience and can be unsuitable to your point of view, ideas, or principles.

PVS-Studio is now in Compiler Explorer

Reading time4 min
Views1.1K
image1.png

Not so long ago, a landmark event has happened: PVS-Studio appeared in Compiler Explorer! Now you can quickly and easily analyze the code for errors right on the godbolt.org site (Compiler Explorer). This feature opens up a large number of new possibilities – from quenching curiosity about the analyzer's abilities to being able to quickly share check results with a friend. This article will cover the topic on how to use these features. Caution – large GIFs!
Read more →

How to find an English teacher. Part 1

Reading time5 min
Views1.6K


In the modern world, here and there ideas are arising about using data science for an extra benefit. For instance, Google can use a history of watched videos for providing recommendations about new ones. Online shops are using a recommendation system for increasing your receipt. However… if companies use the data for their benefit, could we do the same for own needs such as looking an online English teacher?


Disclaimer

It is an approach based on my own experience and can be unsuitable to your point of view, ideas, or principles.

How to introduce a static code analyzer in a legacy project and not to discourage the team

Reading time8 min
Views1.7K


It is easy to try a static code analyzer. But it requires skills to introduce it in the development of an old large project. If the approach is incorrect, the analyzer can add work, slow down development, and demotivate the team. Let's briefly discuss how to properly integrate static analysis into the development process and start using it as part of CI/CD.
Read more →

Implementation of Linked List in PHP

Reading time3 min
Views7.9K

A linked list is a linear data structure, which contains node structure and each node contains two elements. A data part that stores the value at that node and next part that stores the link to the next node as shown in the below image:


Linked List Node

The first node also known as HEAD is usually used to traverse through the linked list. The last node (next part of the last node) points to NULL. The list can be visualized as a chain of nodes, where every node points to the next node.


Linked List

Implementation of Singly Linked List


Representation:


In PHP, singly linked list can be represented as a class and a Node as a separate class. The LinkedList class contains a reference of Node class type.


//node structure
class Node {
  public $data;
  public $next;
}

class LinkedList {
  public $head;

  //constructor to create an empty LinkedList
  public function __construct(){
    $this->head = null;
  }
};

Read more →

Future of PHP: Bright or Dull?

Reading time4 min
Views3.7K
image

PHP is a popular scripting language founded in 1995 designed to perform several functions. Do you think the essence of PHP has faded away since the newer programming languages and frameworks have come into the market?

If you think so, then let me tell you that your perception is totally wrong! In fact, in the contemporary market of custom software development, it has become the most popular language in server-side programming.

image
Read more →

The Anatomy of LuaJIT Tables and What’s Special About Them

Reading time10 min
Views3.8K
I don't know about you, but I really like to get inside all sorts of systems. In this article, I’m going to tell you about the internals of Lua tables and special considerations for their use. Lua is my primary professional programming language, and if one wants to write good code, one needs at least to peek behind the curtain. If you are curious, follow me.


Read more →

Programming as an endless educational pursuit

Reading time5 min
Views1.4K
When one embarks on the journey to master the craft of programming, they come to the realisation that it has no finish line. No matter how good you are, there are still things to learn, solutions to explore.

Today, we’ll talk about the importance of remaining a lifelong student, language adoption trends according to StackOverflow and why programming itself might not be what you end up learning to become better.

Read more →

Why I keep track of spendings in a personal app made with Git+JS

Reading time4 min
Views1.5K

Hi, folks, let me share my experience of creating an application to keep track of my spendings. Specifically, let me do it by answering the following questions:


  1. Why keep track of spendings in an application?
  2. Why did I create the application as a personal project?
  3. Why does the project use Git+JS?

1. Why keep track of spendings in an application?


I, like many people out there, wanted to become rich and successful. To become rich, one is often advised to run a personal budget, that's what I started to do several years ago. I'd like to point out that running my personal budget hasn't made me rich and successful, and I increased income simply by moving to Moscow.

Does gender segregation in the labor market still persist?

Reading time6 min
Views1.7K
Common sense prompts that gender segregation and gender discrimination on labor market have declined. There is a popular opinion that too much is talked about smaller women’s chances to blossom forth at work, while the problem was solved long ago. Actually, women all over the world have the same opportunities as men to get higher education, to hold a supervisor or manager position, to climb the career and salary ladder.



The biggest corporations and companies run special programs to shorten gender inequality on labor market. That seems like the evidence: smaller firms try to imitate the policy, and also values, of world famous companies in order to succeed and gain benefit like the second ones do (it is an economic-sociological proved behavior), so in nearest future, or perhaps in present, all players on labor market will popularize the idea of gender equality in all its senses. However, the state of affairs is far from desired. Even if organizations follow gender unbiased strategy, will it solve the global problem of gender inequality at work overall?

This is the guest article by Maria Antomony, HSE University graduate student, sociologist and code passionate.
Read more →

Juggling work and study at ITMO University: CS edition

Reading time3 min
Views1.2K
We talked to the graduates of the Speech Information Systems MA program at ITMO about the ways our university helped jumpstart their careers. [More stories from our startups]:


Read more →

Esoteric programming languages: a systematic approach

Reading time6 min
Views2.3K
A surprising number of programming languages were created to accomplish unusual tasks that have nothing to do with programming. These are commonly called esoteric. Today, we’re going to paint a general overview of the esolang landscape, and try to figure out why people are continuing to create them.

Read more →

Legacy Languages still Pretty Hard to Beat

Reading time3 min
Views2K
image

Evolution and development have always been the integral parts of every sector you come across. Same is the case with programming languages. Numerous up gradations and invention of entirely new languages have divided the world of programming into legacy and modern. But no matter what, legacy programming still makes the foundation of many software, web applications and AI based techniques.
Read more →

Analyze your builds programmatically with the C++ Build Insights SDK

Reading time4 min
Views2K
We’re happy to announce today the release of the C++ Build Insights SDK, a framework that gives you access to MSVC build time information via C and C++ APIs. To accompany this release, we are making vcperf open source on GitHub. Because vcperf itself is built with the SDK, you can use it as a reference when developing your own tools. We’re excited to see what sort of applications you’ll be building with the SDK, and we’re looking forward to receiving your feedback!

Read more →

[Interview] Top Programming Trends And Practical Advice to Follow in The New Decade

Reading time3 min
Views2.3K


Image credit: Unsplash

What will the future bring to the programming world? Are there any specific technologies that will rise and fall? Which programming language one should learn to succeed in their career? What should a newbie programmer know and understand to build a successful career in the 2020s?

I had the opportunity to sit down and talk about these issues in greater detail with Vitaly Kukharenko, a CTO with 10+ years of experience and creator of several high load startups.
Read more →

Developing and deploying Python for secured environments with Kushal Das

Reading time7 min
Views1.6K
Here is the translated Russian version of this interview.

The company of speakers at Moscow Python Conf++ 2020 is great, and it's not a good luck but thorough Program Committee's work. But who cares about achievements, it's much more interesting what the speaker thinks about our own questions. Conferences suits good to find it out, get insider information or advice from an experienced developer. But I got an advantage of being in Program Committee so I already asked our speaker Kushal Das some questions.

A unique feature of Kushal's speeches is that he often unveils «secret» ways to break Python code and then shows how to write code so that the NSA can't hack it. At our conference Kushal will tell you how to safely develop and deploy Python code. Of course I asked him about security.

Read more →

Augmented Reality: A perfect vehicle for 21st-century education

Reading time4 min
Views1.4K
With the advancements in technology, new ways are being explored and introduced to make teaching and learning more productive. This has taken the e-learning industry to new heights. It has been expected that the global e-learning market revenue will reach $300 billion by 2025.
Read more →

Authors' contribution