Coding Guidelines: Programmer’s Daily Bread and Butter

As we work in startup, we are under time pressure to release a lot of new features on time, features which do not have well defined requirements and the complexity of those features is often underestimated and we end up taking a lot of shortcuts / adding hacks to release such time sensitive features.

This may work for a short time, but over the period of time we realize that the same shortcuts that you took to release features quickly are now slowing you down. You can not scale and add new features on top of it, even if you do, they become quite unstable. In this situation you might want to take a step back and revamp/refactor you base system.

One of the easiest things that you can do to avoid this situation is follow coding guidelines.

Coding Standards

Well, what according to you is a good code? The simple definition could be: if it can’t be understood, maintained and extended by other developers then its definitely not a good code. The computer doesn’t care whether your code is readable. It’s better at reading binary machine instructions than it is at reading high-level-language statements. You write readable code because it helps other developers to read your code.

Naming conventions:

As the name suggests, it is a simple concept where you follow a specific naming conventions across teams. This becomes important when your team is growing and are solving problems on daily basis and pushing a lot of code every day.

camelcases vs underscore

This helps a lot when your team becomes big and a lot of developers are working on the same code-base. If you follow some fixed patterns while defining classes/functions/variables names, it becomes really easy for fellow colleagues to understand your code. This directly impacts delivery time taken by a developer to build/modify a feature on top of existing code. For example, let us suppose you want to define a time-stamp field in a database table, how would you name it ? If you have a fixed pattern like a “action_ts” or “action_at” for giving names then you can easily guess what could be the field name in the schema. If its a created time-stamp then it could be either “created_at” or “created_ts”. You do not have to go and check every-time you writing any logic over different database tables.

Function/Module/API writing (Size and Purpose)

Simplicity and readability counts. It’s always better to write to concise code than a messier one so that if any other developer is also looking at it who has no idea, should get what exactly it is doing. Not more than max 10–15 lines. Jenkins is considered as one of the greatest implementations, and has average function length of 2 lines.

A function/module should only do ONE thing and should do it NICELY. By following this, code becomes modular and it helps a lot in debugging. You can solve the problem better and debug faster when you know where exactly it’s coming.

When you are developing features over an established products, more than 50% times, new requirements are of the nature which you can build on top of existing code. In such cases, you can ship those requirements really faster and stable if existing code-base is modular and stable. Writing library functions a savior. There are countless advantages of writing a library code. It avoids code repetition, no surprises when it comes to response formats and of-course code re-usability.

Exception/Error Handling

Unknown errors are real pain in developers life. It’s always better if you know probable exceptions and errors in code in advance. But that is not the case always. Irrespective of all this, you definitely do not want your end-users to see unexpected errors on their screens.

When you have different micro-services and bigger development teams, if you follow standard response formats for across APIs and standard exceptions then there will not be any surprises in production. You can agree upon one format across all the services. Every API can have certain ‘response_data’ and standard set of error-codes. Every Exception will have an error-code and a message. Message could have variation viz, tech specific message and user facing message.

Writing test cases:

If you want to have a good night sleep, then you better have thorough test cases covering almost all aspects of your code. The best way forward with building test cases is at requirement stage only. Whenever a requirement comes, products managers discuss it with developers as well as QA. Both teams start preparing for possible use-cases and test-cases.

A testing unit should focus on one tiny bit of functionality and prove it correct. Each test unit must be fully independent. Each test must be able to run alone, and also within the test suite, regardless of the order that they are called. The implication of this rule is that each test must be loaded with a fresh data-set and may have to do some cleanup afterwards.

Automation plays an important role here. What else is needed for stable product where you have all test cases covered and running at intervals automatically, giving you a report of the all functionalities. Also, whenever you are adding/modifying code, you make sure either you write new test cases or modify existing ones.

coding

Code Reviews:

This one thing save lives, trust me! Every team can benefit from code reviews regardless of development methodology. Initially it takes time if you do not have a procedure setup of doing code reviews, but eventually it becomes a habit. Code review should be one of the core development steps.

Code review generally is about:

  • Does the new code conform to existing style guidelines?
  • Does the written piece of code covers all the use-cases specified in the requirements and has relevant test cases written ?
  • Are the new automated tests sufficient for the new code? Do existing automated tests need to be rewritten to account for changes in the code?

There are several advantages of this process such as –

Code reviews make for better estimates: Estimation is a team exercise, and the team makes better estimates as product knowledge is spread across the team. As new features are added to the existing code, the original developer can provide good feedback and estimation. In addition, any code reviewer is also exposed to the complexity, known issues, and concerns of that area of the code base. The code reviewer, then, shares in the knowledge of the original developer of that part of the code base.

Code reviews mentor new joiners: Code reviews help facilitate conversations about the code base between team members. During these conversations, team members share their views and new alternatives of doing things.

Code reviews take time: It’s an incremental process, where it takes time initially but as your code-base grows, it ensures, you are always pushing verified and tested code.

Hidden truth about code reviews: When developers know their code will be reviewed by a teammate, they make an extra effort to ensure that all tests are passing and the code is as well-designed as they can make it so the review will go smoothly. That mindfulness also tends to make the coding process itself go smoother and, ultimately, faster.

As a fast growing company our self, these set of guidelines have helped us a lot in shipping stable features on time and helping to increase a healthy learning environment.

Source:- Capital Float’s Medium Blog

More Related Posts

Card image cap
Top Reasons Why Unsecured Business Loans Are Becoming Popular

During the lifecycle of a business, there are times when the inadequacy of working capital threatens the flow of operations and hinders growth. Traditional lending institutions in India such as banks rarely provide assistance in such situations, as they generally demand collateral, which small business and young entrepreneurs may not possess. An unsecured business loan can take care of routine business expenditure such as maintenance of machinery, making payments to suppliers and purchasing raw material. It can also be useful for business expansion activities such as purchasing new machinery or expanding premises.

Moreover, all small and medium enterprises need funds to seize new opportunities for growth, and the window for such opportunities is usually small. In such a scenario, there is a need for quick access to funds. The loan repayment schedule also needs to be synchronous with the expected revenue flow from a business venture. Hence, an unsecured business loan taken from a FinTech company works best for them, as it is disbursed much faster than a loan from a bank. Further, these FinTech companies ensure that an SME is always at ease while paying the loan instalments.

Unsecured loans are turning extremely popular amongst small businesses communities. These are a few reasons why.

They help strengthen the business finances

A suitable business growth opportunity can present itself at any time, and therefore a small business needs to have access to adequate resources at all times. In case the cash flow situation is imperfect or there is a working capital requirement to meet routine business expenses, it helps to take an unsecured loan for a short period until the situation improves. This ensures that a small business will never find itself at a disadvantage when a new opportunity presents itself. Such loans from FinTech companies do not come with any prepayment penalty, and their tenure can vary from a few months to a couple of years.

Faster approval and quick access to funds

The digital revolution and the subsequent development of IT systems and processes have led to the rise of new age FinTech companies over the past five years. FinTech companies in India follow a completely different approach to the unsecured business loan market, as they use innovative technologies to profile, design and disburse loan products for small businesses. Even the application for an unsecured loan can be made online or through the mobile app, and all supporting documents such as bank statements, tax statements, previous loan statements, KYC documents, business receivables and other relevant documents can be uploaded in digital format. The use of advanced analytic techniques allows these companies to process a loan application within minutes. Upon approval, the loan amount is transferred to the borrower’s bank account within a few working days.

An unsecured loan product for every business

Extensive use of technology enables FinTech companies such as Capital Float to design new loan products that are meant to fulfil varying business needs. The loan product, Term Finance, is meant for small businesses that have been in operation for more than two years and have been doing good during that period. Such businesses can take business loans from ₹1 lakh to ₹1 crore for a duration of a few months to three years.

Supply chain finance is meant for small businesses that have blue-chip companies as customers. Such businesses can take up to 80% of the pending invoice value as an unsecured loan. The loan can be repaid either as monthly instalments or at one go upon receiving payments from the customer.

Unsecured loan products designed to support digital economy

Online Seller Finance is another loan product from Capital Float that is designed for businesses that generate revenue through e-commerce marketplaces. It provides up to 200% of the monthly sales volume as advance to such businesses. This money can be used to accelerate business growth online.

Similarly, merchants that receive the bulk of their payments through PoS terminals can avail up to 200% of their monthly card settlement value as advance through a customized finance product called Merchant Cash Advance. The loan amount can be repaid through the deduction of a fixed percentage from card settlements in the subsequent months.

Get loans on the most favourable terms

Capital Float offers loans at the most competitive rates. These unsecured loan costs can be brought further down by choosing the right loan product. Capital Float charges a flat 2% processing fee for all their loan products, and there are no other hidden charges. Another great benefit is the flexibility offered in loan repayment, which is linked to the business receivables.

Indeed, new age technology driven FinTech companies have eased the pain in procuring funds from the unsecured loans market in India, and small businesses can look up to them as a partner in their business growth.

At Capital Float, we fully understand the business challenges faced by small businesses and have therefore designed the unsecured loan products in such a way that businesses can focus more on business growth rather than on worrying about getting business finance. Our customised plans ascertain that you get just the right product that suits your unique need.

To find out the product that best suits your business, click here.

Oct 24, 2018

Card image cap
Here is How Unsecured Loans are Different from Secured Loans

Adequate funding is a pre-requisite for any business. Whether a project is at its initial stage or in the development phase, it needs ample financial backing to keep up its growth momentum. However, finding adequate funding can be a challenging process despite the market now offering a wide range of alternatives to traditional sources of finance.

In their search for funding options, start-ups and small businesses often stand at crossroads where they must choose between secured and unsecured loans. On the surface, both look “equally attractive” with their respective advantages. Borrowers are frequently perplexed as to which should be their final choice.

It is therefore important to delve more deeply into these two broad categories of loans and compare their costs with the benefits they bring. Businesses must also be aware of their own financial situation to understand clearly which loan option they will be eligible for.

Let us first understand the basic concepts of secured and unsecured business loans in India.

Secured Loan

A secured loan is always backed by assets. While applying for such a loan, the business must own something of measurable financial value, which can be offered as collateral to the lending institution. This could be an immovable property (a plot of land with or without construction), gold, a valuable investment portfolio, or any other asset that can be liquidated. Businesses can also extend their machinery, raw material or inventory stock as collateral.

The collateral has to be pledged to the lending institution. This implies that the lender will hold the title/deed to the collateral until the loan is fully paid off. However, the borrower retains the ownership of the asset and will continue to enjoy benefits accruing from it.

If the borrower fails to pay off the loan in the stipulated time, the lending institution has the right to take over the possession of the collateral and sell it to recover the outstanding debt amount. Typically, with secured loans, the end use of funds borrowed is pre-determined.

Advantages of secured loans

Borrowers are often lured to secured loans in the hope that they will be able to procure a larger loan amount than what unsecured loans can offer. The longer period available to pay back the borrowed sum is also a perceived advantage.

Another apparent benefit of these loans is the lower interest rate charged on them. This is based on the rationale of lesser risk involved, thanks to the collateral that can be sold off by the lender in case of payment defaults.

THE CAUTION – What must also be remembered is that some secured loans can have very high interest rates. There are financial agencies that charge the highest legal interest rate for business loans despite taking collateral from the borrower. Reading the fine print carefully is always recommended. In some cases, a low interest rate can also be a promotional or limited period offer that may be withdrawn after a few months.

In addition to non-banking financial companies (NBFCs), nationalised and private banks also offer secured loans to businesses, but the banking penetration in India is still low. This prevents several small and medium enterprises (SMEs) from obtaining a secured loan at a reasonable interest rate.

Another common disadvantage of secured loans is that the process of getting approval is longer and calls for more paperwork than an unsecured loan.

This brings us to the second business loan category.

Unsecured Loans

An unsecured loan is not backed by any collateral. It allows the borrower to get funds without having to offer any asset as guarantee to the lending institution. Generally, unsecured business loans come with a fixed term and fixed rate of interest.

Unsecured loans are offered based on the credit worthiness of the borrower. For an enterprise, the eligibility can be gauged in terms of years in business, its annual turnover and the primary location (city) from which it operates.

The tenure of these loans is often shorter than the long-term loans granted by banks. Most nationalised and private banks approve loans for SMEs with a payback tenure of not less than one year. NBFCs can offer immediate loans for shorter periods. At Capital Float, unsecured small business loans are offered for a tenure of one to 12 months. This gives the borrower the advantage of securing quick funds for sudden needs. Once the project begins to reap returns, the business can pay off the loan and thus avoid paying interest for prolonged terms.

Advantages of unsecured loans

When a business requires only a small amount, an unsecured loan is a better alternative than a secured one, especially if the business does not want to expose its financial assets to the risk of repossession. Also, those companies that do not possess sufficiently valued assets for the amount they require can find easy access to working capital finance with unsecured business loans.

Such loans also act as a good source of funds for companies that are already trading. Since the loan is unsecured, the lenders decide upon its amount by simply assessing the trading position of the business. Background checks are performed on credit history, cash flow position, cash reserves and balance sheet.

Unsecured business loans are quicker to obtain than secured loans. We provide funds to our clients within 3 days once they submit the necessary documents and clear the eligibility criteria. As against this, private banks take more than two weeks in forwarding the grant, while public sector unit banks can take 4-6 weeks for the same.

If your business needs immediate financial support and you are hesitant to offer any collateral to the lender, unsecured business credit will work for your best interests. By choosing Capital Float as your trusted finance partner, you are assured of a quick digital process to submit your application. The entire loan disbursal process is completed in three simple steps, given below:

  • Upload the minimum required documents on our website
  • Receive approval in minutes if your paperwork makes the business eligible for loan
  • Get the funds within next 72 hours

Do not let the long-drawn processes of conventional funding delay the pace of your venture’s development. In the digital age, unsecured corporate loans can conveniently help you accelerate your business growth.

Oct 24, 2018

Card image cap
3 Things To Do When Applying For Business Loans

The growth of the SME (small and medium enterprises) segment, which contributed nearly 40% of India’s exports, has been restricted by the lack of access to timely finance. Only 4% of 57.7 million small business units in the country have access to formalized finance, leaving many to rely on informal lenders, who charge exorbitant interest rates. Requirements like collateral and detailed documentation as well as the long processing and disbursement time of loans deter SMEs from approaching traditional financial institutions. Thus continues the huge gap between the need for funds by SMEs and the amount of funds actually approved as loans.

This severe shortfall needed to be addressed, especially given the importance of SMEs to India’s economy. This is where FinTech companies like Capital Float have risen to the occasion, offering new business loans that are aligned to address specific needs of the SME sector. While cutting-edge technology is being deployed to make innovative financial products available to smaller businesses, SMEs must be aware of the available finance options to take make an informed decision.

SMEs make some common mistakes when applying for secured and unsecured loans. As a result of these mistakes, their loan applications may get rejected. Here are some tips for small businesses to avoid rejection of their business loan applications.

Be organized

Banks and other lending institutions would require certain documents to verify the claims made by a business. The decision to sanction a loan is taken by the lender after evaluating the prospects of a business, its ability to repay the loan amount and its previous credit record. This is done by checking various documents certifying the presence and existence of a business, its financial statements, taxes paid by it and other documents that indicate the financial standing of the business and the business owner(s). To ensure speedy approval of its loan application, a business must organize its documents and submit these in an orderly manner to the lending firm.

Any kind of delay in submitting the desired documents may be viewed negatively by the lender and could even derail the whole process. So, every business seeking a short term loan needs to be organized about its documentation. All the papers should be ready for submission when applying online for a loan. Your swiftness in providing the necessary information along with requisite documents can speed up the approval process.

Be Mindful of Your Credit Profile

The credit profile of the business owner or owners plays a key role in the ability of the SME to secure a business loan. Ensuring a good credit profile is not difficult. This is possible by ensuring that all your credit card and bill payments are made on time. The timely repayment of all due amounts including the ones relating to any existing loans helps improve the credit score.

Often business owners ignore their credit score thinking that it would not impact their ability to secure a loan for their business. They fail to understand the significant negative impact this can have on their business. It is important for business owners to regularly check their credit scores and take the necessary steps to improve them. Such efforts can ease the process of securing finance for the business in the future. In some cases, the credit scores do not even reflect the true situation. Regular monitoring can help business owners rectify the errors in the scores and boost their chances of getting loans on time.

Have A Firm Business Plan

Seeking loans without any kind of business plan may result in the loan application being rejected. A business plan is a reflection of the goals, the purpose of a business and ways to achieve them. It shows how a business intends to operate and how much funds are needed and at what time. A clear business plan not only helps a small business to ease the process of loan application, but also to determine the specific amount of funds required. This in turn enables the business to apply for a business loan well in advance besides providing the lender clarity into the purpose for which the loan is sought.

Thus, a well laid out business plan helps a business provide answers to questions like:

  • How much loan is required and for what purpose?
  • How quickly are the funds required and for what duration?
  • What is the current financial standing of the business and when will the business be able to repay the borrowed amount?
  • Does the business need secured or unsecured loans?

With FinTech lenders like Capital Float offering an array of innovative products, small businesses also need clarity to enable them to choose the loan that is most appropriate for them. A business plan would also help with this. In the absence of a business plan, the screening process may take longer and the chances of rejection of the loan application are also higher.

A business seeking a loan should not borrow from the first lender it comes across. Instead, it’s advisable to do thorough research and compare the loan terms offered.

Capital Float helps small businesses seeking loans to identify the right type of loan for their working capital needs, besides offering multiple repayment options. The use of advanced algorithms helps to underwrite businesses uniquely, check the repayment ability in absence of credit scores and develop customized lending solutions to suit the individual requirements of potential borrowers.

Oct 24, 2018