It happened 2 years ago when I started my career as a Senior CRUD developer.I remember this day like it was yesterday , I have been developing REST service for SPA based frontend but design part was not ready yet therefore I have tested everything by my own using POSTMAN and integration tests(not really) . But when design was finished one of the frontend developers asked me to add one HTTP OPTION method that will return the following header as a response Access-Control-Allow-Origin: * I didn’t care why and just have created new endpoint. …

Hey ! I really like plain SQL instead of Abstraction given by ORM technologies because of SQL power.Today I want to describe the concept of Window functions in Postgres (9.5). Let’s start.

We have two tables Department and Employee

CREATE TABLE dep
(
id integer NOT NULL DEFAULT nextval('dep_id_seq'::regclass),
name text,
CONSTRAINT dep_pkey PRIMARY KEY (id)
);
CREATE TABLE public.emp
(
id integer NOT NULL DEFAULT nextval('emp_id_seq'::regclass),
name text,
salary integer,
dep_id integer,
CONSTRAINT emp_pkey PRIMARY KEY (id),
CONSTRAINT emp_dep_id_fkey FOREIGN KEY (dep_id)
REFERENCES public.dep (id) MATCH SIMPLE
ON UPDATE NO ACTION ON DELETE NO ACTION
);

Let’s insert some…

Firstly I want to write some words about best language to learn. As you know I mostly write code on Java , sometimes on Groovy and more rarely on Python(because of Postgres native support) . I’m not so professional as I want to be but sometimes people ask me what language should I learn to become a programmer(Yes I don’t know why they ask me 😅) .First of all ,according to most blogs , there is no best language , but each one is better in specific task , I absolutely disagree with it. Let’s say you write back end…

I think all of us know what is inheritance.It’s one of the main concept in OOP. What is really interesting, Alan Key (father of OOP ) didn’t create such concept as inheritance , who did it ? I don’t know.

We see inheritance daily in almost all OOP languages , in all video tutorials and so on. The simplest example.

class Moveable{ public void move(){ print(“Move”); }}class Car extends Moveable {@Overridepublic void move(){}}

In my opinion ,inheritance is the worst thing happened with Object oriented programming.WHY? Because of casting and side effects .Let …

Hello . In this weak I started work on one open source project , in simple words it’s non blockchain based cryptocurrency .So I want to provide some design decisions which I made during the work to make the code more elegant and understandable .

Validation

All projects need to validate the data , whether it html form or database table. How people usually do it ? For example you have a class which represent your table in database (for example User) . If you Java programmer I’m 100% sure you will use javax.validation API.

import javax.validation.constraints.*; public class User {…

How to make startup ? You choose your favorite programming language , whatever it Java , Python or Ruby . Then you create a new project using cool framework with build in ORM support and it’s great , but one day, amount of users was increased from 100 to million and your application became as slow as hell. As it is startup I hope you use Postgres instead of legacy MySql.

I want to provide a basic information about Postgres entrails so you will be able to understand how to use database resources on 100 %

Topic for current part…

We all know what is ASCII , but do we really know what is encoding ? Can you explain to yourself the difference between UTF-8 and UTF-16 , no? Let me help you

Lets start with ASCII.This is the Definition from wiki

ASCII (American Standard Code for Information Interchange) is the most common format for text files in computers and on the Internet. In an ASCII file, each alphabetic, numeric, or special character is represented with a 7-bit binary number (a string of seven 0s or 1s). 128 possible characters are defined.
ASCII table

Each English character,number,symbol can be represented as number…

sql

What do you imagine when hear word “Transaction”?

If you asked me this question 2 years ago I would say , that when you have an Exception in your code , your Database state rollback to state before you changes, or Atomicity(the action either happens completely or not at all) . And this is true, but only partly .

Let me say Transaction definition , but in my words.

Transaction — is the sequence of actions and these actions need to follow 4 rules

These 4 rules can be represented as word ACID:

Where is my memory bro . PART 2

So , today we are going to look into String class. This tutorial will cover String class from JAVA 8 and JAVA 9 . If you don’t know , there were a huge changes in Java 9 . For those who are interested you can watch this video Lord of the Strings (in Russian )

Lets start with JAVA 8 .As you remember from first tutorial , to calculate total size of Object we need to know all global fields of the class of this object. This is the content of String.class

String.class

Structure Oriented Programming

Do you know what does OOP mean ? If Yes , please explain it to me.

By statistics , the majority of Java programmers come to Java after C or C++

Let’s say you are student who study in university . The first thing you will be explained is Classes, don’t think in procedural way , think by Classes.

What is class ? So this definition from wiki

class is a blueprint for creating objects (a particular data structure), providing initial values for state (member variables or attributes), and implementations of behavior (member functions or methods).

The…

Almas Abdrazak

I moved to github pages strogiyotec.github.io/

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store