git merge easy – github: This branch has conflicts that must be resolved Use the command line

  1. install git:
    1. important to select “checkout as-is, commit as-is”
    2. use only git from windows command line no other Unix tools, usually a good selection
    3. select: git bash from here , git GUI from here .
  2. install kdiff3
  3. kdiff3 with git integration
    1. edit C:\Users\user\.gitconfig
    2. copy snippet from
      see “Git Command-Line Integration” section
      instead of “/Applications/” for windows you probably need “c:/Program Files/KDiff3/kdiff3.exe”
    3. to use the merge tool, you type “git mergetool” or from git GUI right click on the code and choose mergetool
  4. when you get a conflict you simply type git mergetool
  5. how to use kdiff3?
    1. in the toolbar, there are up/down double arrows that skip merge conflicts.
    2. the left column(A) is the common ancestor. then you choose from toolbar which version you want column B version or C version,
    3. after all of the conflicts are resolved it is possible to click in the toolbar save and exit.

Build MariaDB on Ubuntu 14.04/ Ubuntu 16.04 with compression

in the package from mariadb there is no compression avalible,
it is possible to have compression in mariadb, for this it is required to compile mariadb.

here are the linux commands i have used to compile it and package it into a deb repository.
Continue reading Build MariaDB on Ubuntu 14.04/ Ubuntu 16.04 with compression

How to improve, Videos I liked

Suggest edits to this article

If you are like every other normal human you like instant gratification. instant gratification probably controls your life. it is related tightly to procrastination and adhd. procrastination is a low energy state. When I had heard first Tim Urban, I thought to myself “hureca!”. It explains every human behavior on earth.
it turns out all people act on instant gratification. this is all the products we have in the supermarkets. all the sales pitches, adhd’s simply have addiction to instant gratification. and today youtube contributes to it a lot. as children grow they get used to receive satisfaction quickly and if it is not so they do something else.
Continue reading How to improve, Videos I liked

Modern business plan outline

Suggest edits to this article

in situation we have today, when new disruptive businesses created quickly.
business landscape changes every 1.5 years or sometimes couple of weeks.

the regular business plan is not adaptive and is not good for fast changing situation we have today.

There was a research about how to have more probability of success methodically in in a new business and in old business more efficiently with less wasted energy, that also costs money.

It’s called lean startup and business canvas.

It answers questions like

What customers really want?

What to change?

How can you be more successful ahead of making a product?

How to be competitive?

what’s next to do, in a methodical and adaptive to changes, way.

If you are a familiar with plans and planning you probably know that plans change and become absolute quickly.

sure it takes time to sit down and learn each thing and then to implement it. but it is what it is all that it takes to have more probability of success in a business.

At the end I had made an outline for a business plan.

A Modern business plan consists of all kinds of canvases, And they are below
Continue reading Modern business plan outline

MVP – minimal viable product

The problem here is to build a car:

link: How to reduce Product Development – Risk Reduce your Idea to its core function

  1. Reduce the number of people it can transport to one — motorcycle. (We will fix that problem later)
  2. Remove its self-propelling capacity — bicycle. (We will fix that later)
  3. Remove its power transmission — we have something like a skateboard with steering now.
  4. Remove steering — skateboard.

link2: HowSpotifyBuildsProducts.pdf

:MVP Canvas

Key Metrics – be smart: measure it, check your assumptions.

link: The Minimum Viable Canvas – Product first, Market next. Product first

any language also javascript optimization principles

pro optimization tips:

  • Minimize reference use. Use direct values, Use x not obj.x, every time you access a reference it adds O(1). if you access a reference in a loop. then it multiplies the access time, times the looped amount. see all about prefetcher at @23:30 to @55:00
    • Sometimes coping vars and functions to locals helps. local variables are faster to find for the script. and faster to access. fewer references hooping is more efficient as described in above link.
    • Several simple type arrays for each parameter are much faster than an array of objects. described in above link.
    • also helps to make var obj_x=[],obj_y=[],
      instead of var obj=[ {x:1,y:2} , {x:1,y:2} ];
  • To prevent memory duplication on events give anonymous functions a name outside, then attach a named function to the event. if anonymous functions are copied or recreated each time. then they create an unnecessary JIT compilation overhead and memory duplication.
  • Minimize dom access see velocity.js – a fast animation library’s secret sauce. it is faster because less reference hoping when accessing Browser DOM.  So cache some DOM or results.
  • On the fast part of the code, Don’t use jquery $(…) it takes a lot of time , instead use parts from I rewrite all dependency on the library in simple code. , And so I compose simple and specific to my task functions that not call other functions.
  • Functions under 600 chars including spaces and comments are inlined (in Node.js or Chrome V8 Crankshaft), So maybe use Scope to convert long names to short names like (function(){…code here…})() and Use short var names and put comments outside
  • Cache previous results, in a recursive or looping code it is a good idea to cache previously calculated accumulated-to-this-point data and not recalculate it in further loops. this is the idea behind “dynamic programming” text search algorithm. to cache the previously calculated data in a useful way for the further loops.
  • Put everything in memory instead of a database. like an in-memory database.
  • Also maybe with sorted ahead indexes. an index is an array with a value to sort by and a reference. in insertion to array use binary sort next position to figure out next insertion position.


But, First of all, Write Simple and Understandable code. in small functions. So maybe optimize just the important parts.