Posts

Showing posts with the label Technical

Gitflow using source tree

Image
In early 2010, Vincent Driessen wrote an article called   “A successful Git branching model”  which recommended an approach called  git-flow  to use git branches in your development cycle. The idea was to standardise branching and merging when developing features, handling releases and managing hot fixes, in order to be consistent and gain the advantages of git’s ‘branchy’ development model. Using many separate branches in Git gives you lots of flexibility, but it can get complex. Adopting a standardised approach has many advantages: ·         Keep your repository tidier ·         Keep your procedures clearer ·         Move between projects more easily with familiar branch structures ·         Get new developers up to speed more quickly SourceTree   now integrates with git-flow and presents it to you in a friendly and intuitive way. Summary of the concept The general idea of git-flow is to use the following branch structure in your repository: ·         Develop

Migrate from SVN to Git

If you are in process of migrating from SVN to Git you are not alone and many people have already done it time and again. There are many good articles to guide you on that matter, the purpose of this article is to tell you my experience in the process. Migration to git from SVN comprises of few steps:- 1)Getting contributors:-                                     First step is to get the list of contributors from SVN, to do so right click to open git bash on source folder and  execute command below:- svn log -q | awk -F '|' '/^r/ {sub("^ ", "", $2); sub(" $", "", $2); print $2" = "$2" <"$2">"}' | sort -u > authors-transform.txt This may take a while so don't be disheartened git is doing its job and once done will output the file in command above. If you get error saying SVN is not a known command you may not have SVN command line utility so you would like to install the same, if it

Build/Deployment Automation

Image
Introduction:- •         Many of the problems encountered in software application deployments can be traced to reliance on manual processes to build, test, and package release targets. •         Modern software development practices such as continuous integration (CI) focus on executing integration builds early and often, rather than waiting until the software product is almost ready to deliver. Architecture:- Benefits Of CI:- •         Increased productivity •         Enables shorter feedback cycle when changes are made •         Code is kept in a “releasable” state •         Code gets back into the hands of testers quickly •         Frees the team to do more interesting and valuable work •         Improves morale, making it easier to retain good developers •         Enables more frequent releases with new features •         Improved quality •         Makes it easier to find and remove defects because frequent integration and testing identifies bugs as

ViewState vs Session vs Cache

HTTP is a stateless protocol. This implies that every time a new request is sent from the client to the server the state information of the previous request is lost When it comes to persisting data across PostBack(round trip to application server) which is basis of web application, there are various options available and they all have there own pro/con. Lets have a detailed look at each of them. 1)ViewState:- ViewState is the method that web application uses to preserve page and control values between round trips. When the HTML markup for the page is rendered, the current state of the page and values that must be retained during PostBack are serialized into base64-encoded strings. Since ViewState is serialised and stored on the page back to client, payload increases as ViewState increases , which means if you have more data in ViewState size of page will be more and it will take more time to reach and load on client side.Hence size of page is directly proportional to ViewState

Python vs Rest

By now you must have heard about Python which is being used everywhere right from Web/Windows development to Big Data and AI/ML. There are so many open source libraries already made using Python, and that is the reason you cannot ignore power and influence of Python. Comparing all languages at once would be a difficult task, so below is an attempt to compare lines of code needed to get the same job done in C# and Python, even though below is comparison of C# and Python, same stands true for most of OOP languages like Java,F# and etc. Python is cross platform language and it already has so many libraries available. Python is easy to read/understand and requires less lines of code to get similar job done. Python may not be better in terms of performance but its easy to learn and more expressive. Consider following side by side comparison of what we have to do in C# compared to Python. Feature Python C# Get Data From DB import sqlite3 conne

Do We Need Unit Test

Scenario 1(New Application/Module):- Lets us assume below two classes which are exposed by a windows application:-        public   class   Multiplication     {          public   int  Multiply( int  x,  int  y)         {              return  x * y;         }     }      public   class   CalculatePower     {          public   int  RaiseTo( int  number,  int  power)         {              if  (power < 0)             {  throw   new   ArgumentException ( "Power cannot be negative" ); }              int  result=1;              Multiplication  multiply= new   Multiplication ();              for  ( int  i = 1; i <= power; i++)             {                 result = multiply.Multiply(result, number);             }              return  result;         }     } Now developer will have to wait till UI is ready for him to test his code " Hence Unit Test Is Needed In This Scenario " which will test his code without any interfa