## Project Showcase: Uzhin Doma

I am happy to announce, that my first “serious” project for an already established project finally been released. It is a Russian service for food ingredients delivery, ‘Uzhin Doma’ (roughly translated as dinner at home). You don’t receive a precooked meal, but rather a list of ingredients, exactly measured for each dish and you can cook it yourself.

So, basically, you save time twice – you don’t need to buy ingredients yourself and you don’t have to think about what to cook every day. You just lean back, relax, follow the instructions and receive an extraordinary result.

Enough small talk, let’s get down to business. Some of this project’s interesting features are:

• custom design (thanks to @bender)
• custom front-end (thanks to @antiquar)
• full integration with Russian CRM Bitrix
• delayed_job integration
• SMS verification upon login (everything via AJAX)
• checking for a valid promo code on creating a new order
• a lot of AJAX overall 🙂
• Cloudpayments integration for credit card processing

## Bitrix API Integration

Since this is a heavy topic, I decided to dedicate a complete description to it. Integration with Bitrix provides few things:

• searching for user based on phone number
• if user is found, a new deal is created
• if no user is found, a new lead is created
• to each deal/lead are added bitrix-internal products which are based on site’s internal products
• if credit card is processed correctly, Bitrix is updated accordingly
• on profile page all old orders from Bitrix are wired up (once. After that we only query the internal page’s orders to reduce the load)

Enjoy the screenshots:

Our route:

Approx. total cost: 3000€ (two persons) – 15 days, 14 nights, total km traveled: 3000 km

Cost breakdown

When we first started to decide where to take our vacation I was luckily able to persuade my wife not to stay whole 2-3 weeks at one place. The roadtrip decision was made. Why Greece? Well, first of all – because of Zeus! Other argumentation points include – clear waters, beatiful landscapes and presumably amazing food.

Here we go, this was our charger in the battle, Pegeaut 301 (manual shifting, which was kind of welcomed change after all the years driving automatic):

It was surpisingly expensive. If you stick to the Greek salad and tzatziki it’s okay (salad, bread, tzatziki and a drink will result in about 10 Euro and because the portions are enormous it is really enough for a grown up person), however if you want to try out some fish or other sea products, prepare to pay 30-40-50 EUR per kilo (which still results in 20-30 EUR per dish (for one person!)). Don’t know how it comes – here in Russia you can get a caber (and this guy gives black freaking caviar) for 10 EUR/kilo and we don’t have a lot of seas close to Moscow. On the Greek coasts you just have to grab your boat and your fishing net… Strange.

We tried to book as often as possible through AirBnB service, because we wanted to live “authentic” and not in a standard hotel-way (we didn’t manage to do it all the time, had to book a hotel twice). To disillusion you right from the beginning – it is often not cheap at all. And there are a lot of hotel-like offers you might fall into. However the overall experience was still awesome, we managed to book a lot of different appartments throughout Greece.

So basic rule – don’t expect it to be cheap (same as with food).

This was the main reason for our holidays and it was simply stunning. The Greek nature and it’s landscapes are truly exquisite and our the experience was a precious one. From the east coast, down to the most southern point, up to Zagori mountains past west coast and visiting the most northern islands we can now claim to have seen almost all parts of Greece. Be prepared to drive through, around, beyond and above mountains. There are a lot of them (in fact, we had seen only a short sight of flatland around the west coast). You will see crystal clear waters (and by the way we had them at every point of the country, which was fascinating), villages built into the mountains, turtles on the freeway, huge rocks on the road, deserted little islands and much more.

I would even say – this is the only reason to visit Greece – to see it’s stunning nature. Do not linger at one place for a long time – get a car, reward yourself with an interesting Greece car roadtrip.

## How to write useful technical specs

I might be not that wrong in assuming that a lot of IT people out there encounter same problems regarding tech specs all the time – they become obsolete sooner than they are written. Mostly created to show the client – hey, we’re doing stuff here, here is the result, 100 pages of pure informational power. However, the result is often the same – after one glance, each team member will soon forget that this spec ever existed.

So how make specs more useful? In this article I won’t show how to formulate your spec, but more how (technically) to manage, that your spec stays up to date.

## Use LaTeX

No, not in the bedroom with your girlfriend (on the other side – who am I to judge you?), but the document markup language (according to Wikipedia).

LaTeX is not only cool – writing specs feels almost like writing code – but it allows you to maintain a healthy development process considering your spec.

### Problem No. 1

When your specs are starting to get bigger and you add stuff here and there, it is very (VERY!) hard for your team to follow up on changes. Using GIT in combination with LaTeX allows you to commit any changes just if it were code. And GIT markup fantastically highlights all changes that were made. So next time you can just give your team a link to the latest commit to they will see only the new and recent parts.

### Problem No. 2

Have you ever tried to create links within a document, say in MS Word? Yeah, you kinda able to do that, but if you add, say, a new point to your numerical list, all your links will get messed up. Regardless to say what happens if you add a whole new chapter at the beginning. LaTeX allows you to define variables, just like any programming language. Just use a simple

/label{section:intro}

where section:intro is just a clear variable meaning that your content is in the section called “intro”.

### Problem No. 3

As soon as you try to maintain your MS Word spec you realize how this program is clearly not created to write large documents. Ever tried to create a numerical list, then add a break and continue the list? Then you’ll know how easy it is to screw things up. By being completely controllable there is always an easy solution for almost everything you want to achieve with a LaTeX document.

## Use GIT

I mentioned it already in the previous paragraph, but I can’t stress it out enough – your LaTeX spec will really shine bundled with GIT. Not only you have a neat version control (and don’t need to save “project_x_tech_spec.v.1.0.docx”, “project_x_tech_spec.v.1.8.docx” and so on), an ability to link only your recent changes by sending a commit link, but you also have one place for your always up-to-date end format, because recently github learned how to display pdf-files.

So basically your pdf url stays always the same, something like this:

## My setup

Since TeX is permissive free software (to me it sounds a lot like open source), there is a bunch of good free editors (honestly, even notepad will do it). However I felt in love with Texpad – it’s available only for MacOS (and iOS) and makes full usage of your retina display. It costs 25 \$ and is available for download at Texpad homepage.

Starting writing documents with TeX may be a bit hard the very first time (on the other hand – what isn’t hard the very first time?), but there are plenty amount of templates out there on the interwebs helping your out to fire your document up. My personal favorite (there are few Russian language related things which you might omit) :

\documentclass[DIV=calc, paper=a4, fontsize=11pt]{scrartcl} % Документ принадлежит классу article, а также будет печататься в 12 пунктов.
\usepackage{ucs}
\usepackage[T1,T2A]{fontenc}
\usepackage[utf8x]{inputenc} % Включаем поддержку UTF8
\usepackage[russian]{babel} % Пакет поддержки русского языка
\usepackage{titling} % Allows custom title configuration

%for frames
\usepackage{framed}

%For image using
\usepackage{graphicx}

%Numbering subsubsubsections etc
\setcounter{secnumdepth}{5}

%For code highlightning
\usepackage{listings}

%Further enumeration - you might omit that! It can lead to strange numeration!
\usepackage{enumitem}
\setenumerate[1]{label=\theparagraph.\arabic*.}
\setenumerate[2]{label*=\arabic*.}
\setenumerate[3]{label*=\arabic*.}

%For referencing within enumeration lists
\usepackage{enumitem}

%Packages for word-like comment style
%This is really awesome! You can add marks that are highlighted.
%My personal favorite usage is like this: \todo[inline]{some comment goes in there}
\usepackage{todonotes}

%Package for images
\usepackage{float}
\floatstyle{boxed}
\restylefloat{figure}

%For a nicer reference
\usepackage{fancyref}

\usepackage{titlesec}

\titleformat*{\section}{\LARGE\bfseries}
\titleformat*{\subsection}{\Large\bfseries}
\titleformat*{\subsubsection}{\large\bfseries}
\titleformat*{\paragraph}{\large\bfseries}
\titleformat*{\subparagraph}{\large\bfseries}

%For some math formulas if needed
\usepackage{mathtools}

% Some nice visualization
%\usepackage[svgnames]{xcolor} % Enabling colors by their 'svgnames'
\usepackage{fullpage}
%\renewcommand{\footrulewidth}{0.4pt} % Thin footer rule
% End visualization

%smart enumeration
\renewcommand{\labelenumi}{\arabic{enumi}.}
\renewcommand{\labelenumii}{\arabic{enumi}.\arabic{enumii}}

\title{Some title goes in there}
\date{22/04/2015}

\begin{document}

\maketitle

... Here goes your content with \section{} and \subsection{} and everything else...

\end{document}

Happy writing!