Life-time learner's blog

Tag Archives: MIPT

darth_vadly: TENEBA PARTUM

Take a listen to the piece of work of one young and promising composer (and a friend of mine)! Waiting for your comments.

For those who are interested:


Table description: Leisure time in Someland

Task: Write a report for a university lecturer describing the information in the table below.

Hours of leisure time per year in Someland

Possible model of answer.

The table shows the average amount of leisure time among different age groups per year in Someland. Seven age groups are covered from teens to 70+ and 6 different activities are mentioned, specifically: watching TV, socializing with 4 or fewer people, socializing with more than 4 people, individual exercise, group exercise, cinema.

The highest amount of spare time people of all ages spend watching TV and videos, with the maximum being equal to 1,200 hours in teens. The vast majority of elderly people aged 70 watch TV 1,100 hours per year. The least popular activity is cinema. People spend their leisure time in cinema about 50 hours per year, with the highest number being 100 in teens. The table shows that teens and people in their 20s tend to socialize with 4 or more people, while other age groups usually socialize with less number of people. The same pattern can be observed for individual and group exercises. The latter is more popular among the youth: teens spend 450 hours per year being involved in group sports, which is 3 times as many as the number of hours of individual exercises.

On the whole, the table shows that a quarter of their leisure time watching TV and videos and only about 1/6 of time corresponds to physical activity. The youth spend more time socializing with many people and doing some group sport activities. But the numbers are gradually decreasing with the age.

Presentation: Academic Grading

Again, we have another presentation here. The topic for today is Education. Let’s see what presentation I created.

Education: Academic Grading

[Greeting] Good morning, everyone. My name is Anton Danshin. I’m a student of Moscow Institute of Physics and Technology.

In my today’s presentation I’m going to tell you about the academic Grading in different countries.

[Why?] The topic is very interesting and the information I’ll give you might be useful for those students who want to continue their education abroad.

[What?] There is an infinite variety of academic grading systems in different counties and there is no way to cover all these systems. And I will cover only common ones.

First of all, I’ll tell you what an academic grading is. Secondly, I’d like to tell a few words about the system that is used in Europe. Thirdly, I’ll familiarize you with the american grading system. Then I’ll tell a little bit about Russian system and systems used in the countries of CIS. And finally, I’ll highlight the main points of my presentation and make a conclusion.

[How?] The presentation won’t take long – just about 10 minutes. You may ask your questions at the end.

Lets get started!

What is an academic grading? The answer is quite obvious. The academic grading is the way of measurement of student’s knowledge and skills in a certain subject which he or she acquired during study at educational institution.

A perfect academic grading system should provide an objective assessment of the quality of student’s knowledge, rather than the quantity. Let’s see what functions a perfect grading system should fulfil.

  • Firstly, it should help to compare stated aims with results achieved by a student.
  • Secondly, it should reveal the main difficulties which students have.
  • Thirdly, it should determine the quality of teachers work.
  • And finally, a perfect grading system should motivate student to study.

Now that we know what academic grading is all about and what it stands for, we can move on to the next point of my presentation.

European Grading System: ECTS

In Europe the most common grading is so called ECTS – European Credit Transfer and Accumulation System. It is a standard for comparing the study attainment and performance of students of higher education across the European Union and other collaborating European countries.

For successfully completed studies, ECTS credits are awarded. One academic year corresponds to 60 ECTS-credits that are equivalent to 1500–1800 hours of study in all countries irrespective of standard or qualification type. To get bachelors degree it is necessary to have at least 180 – 240 ECTS-credits, and 300 credits for masters.  ECTS also includes a standard ECTS grading scale, intended to be shown in addition to local (i.e. national) standard grades. The ECTS grading scale is shown on the slide.

That’s all I wanted to say about European grading system. Now let’s pass over to the American academic grading system.

American academic grading

In the Unated States of America they also have letter grades scale but it is very different from European one. They use 4-points scale. In addition, there is not any rating system, the Grade Point Average (GPA) is calculated instead.

Most graduate schools require a 3.0 (B) average to take a degree, with C or C- being the lowest grade for course credit. Most undergraduate schools require a 2.0, or C average to obtain a degree with a minimum of D or D− to pass a course. But this all depends on laws of a certain state.


That’s all about the USA. Let’s move on to the next point and see what we have in Russia and some neighbouring countries. As we can see from the table, some countries from Eastern Europe tend to have 10-point scale. Our country still has 5 point scale, but is it enough to represent the knowledge of students? Or there is no difference? These (actually difficult) questions bring me to the end of my presentation.


Let’s go over the main points I covered.

  • Academic grading is a way to assess the quality of students’ knowledge and skills.
  • A perfect grading system has to fulfil a lot of functions and there is obviously no the perfect one.
  • There are a lot of different grading systems.
    • Europe: ECTS
    • the USA: 4-point scale + GPA
    • Russia: 5-point scale

It’s quite difficult to decide which one is the best. But I think that the main problem is not in the grading scale at all! The main problem is in student’s ability and desire to study.

As the proverb says: ‘You can bring a horse to the water. But you can’t make it drink’. In other words, you can design any kind of grading scale but the final choice to study or not is up to students.

Thank you very much for your attention. Now you can ask your questions.


You can easily download my presentation from Google Docs:

Let me know if you find a mistake. Good luck with your English!

Anton Danshin

MPI: Calculating sum 1/n! in parallel

I’ve spend several hours to understand how to programme in MPI and how to calculate the sum of 1/n! in parallel (it’s my task from university). (By the way, why do I have study this shit? I don’t think I will be working in the field of parallel/distributed computing.)

But finally I wrote a decent programme, which showed not bad results. And I am very excited to share with you! Read more of this post

How to install MPI in Ubuntu

I am starting a series of articles devoted to distributed computing that we are now studying at MIPT. For programming we will use MPI.

Message Passing Interface (MPI) is a standardized and portable message-passing system designed by a group of researchers from academia and industry to function on a wide variety of parallel computers. The standard defines the syntax and semantics of a core of library routines useful to a wide range of users writing portable message-passing programs. We can use it for creating programmes for distributed computing systems (parallel computing).

MPI is a standard. There are different implementations of MPI for different platforms and programming languages. This article is about how to install MPI platform to your Ubuntu.

Read more of this post

Presentation: Software design patterns


For my previous English class a had a task to create a presentation on design. This topic was pretty hard for me because I am not very good at describing design and I am not an expert in it!

I’ve spent nearly 2 hours just to choose what I wanted to speak about in my presentation. And finally I came up with an idea to create a presentation about software design patterns. I know, it is rather boring topic to speak about because is quite technical, but I’m just know about it way more than I know about design of furniture or design of cars.

Presentation: Software Design Patterns

Good morning everyone. My name is Anton. I’m a student of MIPT. Today in my presentation, I’m going to speak about Software Design patterns. My presentation will take about 15 minutes. Feel free to interrupt me and ask a question.

The plan of my presentation is shown on the slide. Let’s start!

Design Patterns

Simplicity is the soul of efficiency.
— Austin Freeman, “The Eye of Osiris”

The first thing I want to tell you about is what a software design pattern is. Does anyone know the answer to this question?

In software engineering, a design pattern is a general repeatable solution to a commonly occurring problem in software design. A design pattern isn’t a finished design that can be transformed directly into code. It is a description or template for how to solve a problem that can be used in many different situations.

Now that we know what it is we can move on to the question “Why do we use design patterns?”

Why do we use design patterns?

Design patterns can speed up the development process by providing tested, proven development paradigms. Effective software design requires considering issues that may not become visible until later in the implementation. Reusing design patterns helps to prevent subtle issues that can cause major problems in the future.

In addition, patterns allow developers to communicate using well-known, well understood names for software interactions. More than that, common design patterns can be improved easily.

Also, design patterns improve code readability for coders and solution architects. The code becomes understandable and maintainable.

So, the design patterns is actually a good thing! And there are over 30 patterns to solve almost any problem. This brings me to the next point.

Classification of design patterns

There are a lot of design patterns and they all are divided into four classes: creational, structural, behavioural, and concurrent.

Creational design patterns

These design patterns are all about class instantiation. This pattern can be further divided into class-creation patterns and object-creational patterns. While class-creation patterns use inheritance effectively in the instantiation process, object-creation patterns use delegation effectively to get the job done.

Structural design patterns

These design patterns are all about Class and Object composition. Structural class-creation patterns use inheritance to compose interfaces. Structural object-patterns define ways to compose objects to obtain new functionality.

Behavioural design patterns

These design patterns are all about Class’s objects communication. Behavioural patterns are those patterns that are most specifically concerned with communication between objects.

Concurrent patterns

These patterns help to control the execution flow of the applications and provide solutions to problem of concurrent access.

Now, lets have a look at an example of a simple but very useful creational design pattern – Singleton



  • Ensure a class has only one instance, and provide a global point of access to it.
  • Encapsulated “just-in-time initialization” or “initialization on first use”.


Application needs one, and only one, instance of an object. Additionally, lazy initialization and global access are necessary.


Singleton should be considered only if all three of the following criteria are satisfied:

  1. Ownership of the single instance cannot be reasonably assigned
  2. Lazy initialization is desirable
  3. Global access is not otherwise provided for

The example of the implementation of Singleton in Java you can see on the slide.

The main disadvantages of this implementation are that deleting a Singleton class/instance is a non-trivial design problem and this implementation is not thread-safe.

OK. Design patters are good. But what about the other side of the coin? Let’s  have look at its bad points.


The concept of design patterns has been criticized by some in the field of computer science.

Targets the wrong problem

The need for patterns results from using computer languages or techniques with insufficient abstraction ability. Under ideal factoring, a concept should not be copied, but merely referenced. But if something is referenced instead of copied, then there is no “pattern” to label and catalogue. Paul Graham writes in the essay Revenge of the Nerds.

Peter Norvig provides a similar argument. He demonstrates that 16 out of the 23 patterns in the Design Patterns book (which is primarily focused on C++) are simplified or eliminated (via direct language support) in Lisp or Dylan.

Lacks formal foundations

The study of design patterns has been excessively ad-hoc, and some have argued that the concept sorely needs to be put on a more formal footing. At Oopsla 1999, the Gang of Four were (with their full cooperation) subjected to a show trial, in which they were “charged” with numerous crimes against computer science. They were “convicted” by ⅔ of the “jurors” who attended the trial.

Leads to inefficient solutions

The idea of a design pattern is an attempt to standardize what are already accepted best practices. In principle this might appear to be beneficial, but in practice it often results in the unnecessary duplication of code. It is almost always a more efficient solution to use a well-factored implementation rather than a “just barely good enough” design pattern.

And final bad point is that design patterns are very bad when they are used improperly or overused. So, DO NOT OVERUSE IT!

Let’s move on to my next point which I want to cover in my presentation.


Anti-patterns are complete opposite to patterns. Patterns, as you now know, are the examples of good programming practice. In contrast, anti-patterns are the examples of mistakes, which are made in solving different problems.

Here are the most common anti-patterns:

  1. Copy and Paste Programming
  2. Spaghetti Code
  3. Golden Hammer
  4. Magic Numbers
  5. Hard Code
  6. Soft Code
  7. Reinventing the Wheel
  8. Reinventing the Square Wheel
  9. Blind Faith
  10. Brute Force Coding
  11. Boat Anchor
  12. God Object
  13. Unnecessary comments
Choose the one you like, and I’ll explain what this anti-pattern means.


Now, I’d like to make a conclusion to my whole presentation. Let’s go over the main points.

  1. Design pattern is a general solution to a commonly occurring problem in software design
  2. Using design patterns makes your code better
  3. Design patterns are divided into:
    • Creational
    • Behavioral
    • Structural
    • Concurrent
  4. Do NOT OVERUSE design patterns
  5. Creating your software avoid anti-patterns.


Here you may find all about software design patterns and anti-patterns.


Thank you very much for your attention! 🙂

Download my presentationSoftware Design Patterns (.pps, 500 kB)

If you find any mistake, let me know. Good luck with your English.

Anton Danshin

P.S. My presentation should have been shorter. But it is not possible to cover this topic in 10 minutes! Sorry, my dear teacher. I should have also learn the speech by heart, but we had too little time to get prepared.  🙂

[Unix C] ID implementation


Last time I posted my implementation of linux command echo. Now I’d like to introduce my implementation of id (which was another task from my IT teacher). This unix-shell command is rather simple and its task is to print real and effective user and group IDs.

Firstly, let’s see how to obtain current user’s ID and group ID. Take a look at the folowing code:

#include <stdio.h>
#include <unistd.h>

int uid, gid;

int main(){
    uid = getuid();
    gid = getgid();
    printf("UID: %d; GID: %d\n", uid, gid);
    return 0;

But functionality of ID command in Linux is way more complex! It took me almost 3 hours to implement all it’s features. Read more of this post

[Unix C] ECHO Implementation

When I was at my 2nd year, we studied architecture of operating systems. Our IT seminars were devoted to writing C applications for Linux. The first programme that we had to write was a simple terminal command “echo”. I’ve spend 2 hours to do it! Read more of this post