More Related Posts

Card image cap
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

Oct 24, 2018

Card image cap
Implications of GST on Manufacturing

GST — the unified tax system that is set to revolutionize indirect taxation in India— is finally here. Some of its key proposed advantages are streamlining of tax payments, reduction in tax frauds, and ease of doing business. Here is a look at how these will play out in the manufacturing domain.

Make In India & Manufacturing

The manufacturing sector in India contributes a mere 16% to the overall GDP. However, the potential to make this a high-growth and high-GDP sector is huge. The “Make in India” campaign by Prime Minister Narendra Modi makes this possibility real, by giving impetus to the sector. Furthermore, PwC estimates that India will become the fifth largest manufacturing country in the world by the end of 2020. It would be interesting to know how the Goods and Services Tax or GST impacts this roadmap.

Impact of GST on Manufacturing

GST is one of the key policy changes that will have a direct impact on manufacturing establishments. So far, the existing complex tax structure has been a dampener, resulting in the slow growth of the sector. GST is expected to liberate the sector by unifying tax regimes across states.

Overall, GST is expected to have a positive impact and boost manufacturing.  Here is why:

  • Removal of multiple valuations will create simplification: The old tax regime subjects manufactured goods to excise duty, which is calculated differently in different states. While some states calculate excise duty based on transaction value, others calculate it based on quantity. Most manufactured goods’ excise duty is currently considered on MRP valuation. This creates great confusion in valuation methods. GST will usher in an era of transaction-based valuation, making calculation of tax much simpler for the manufacturer.
  • Entry tax subsummation will reduce cost of production: The subsuming of the entry tax for inter-state transfers is a key reason for reducing cost of goods and services. For example, a supplier of cement from Maharashtra to Karnataka was earlier required to pay entry tax when the supply crossed the interstate border. For Karnataka, the entry tax rate was 5% of the value of the goods. The supplier would pass on this additional cost to the customer, resulting in increase in selling price. With entry tax being subsumed, the supplier need not pay the entry tax rate amount and consequently, not charge the customer this amount either.
  • Improved cash flows: Under the new tax laws, manufacturers can claim input tax credit on input goods, which seems to be a positive sign for cash flow. SMEs are keenly observing the time difference between input tax credit and the credit being available.
  • Single registration process will provide ease of registration: The old regime required manufacturers to register each manufacturing facility separately, even those in the same state. GST will simplify the plant registration process by allowing single registration for all manufacturing entities within the same state. Previously, if a brick manufacturer had factories in Bangalore, Hubli and Dharwad, each unit had to be registered separately. Under GST, all of these factories would be jointly registered under the state of Karnataka. Of course, different state-entities will require separate registrations under GST too.
  • Removal of cascading will lead to lower cost-to-consumer: The old tax regime does not allow manufacturers to claim tax credit on inter-state transaction taxes such as octroi, central sales tax, entry tax etc. This results in cascading of taxes—an extra cost to the manufacturing company. Manufacturers end up passing on these extra costs to the consumer. The unified GST regime will eliminate multiple taxes and thus lower cost of production; this, in turn, will mean lower pricing for the consumer. For example, prior to 1 July 2017, SMEs in manufacturing used to pay Excise Duty, Central State Tax and sometimes VAT too at 12.5%, 2% and 5.5% respectively. With GST in effect, they are required to pay 18% in taxes.
  • Restructuring of supply chain: To align with the GST law, businesses will be required to realign their supply chains. However, this is a blessing in disguise. Till date, most supply chain structuring has been designed around how to manage tax regimes. With a single tax regime, this will change, and supply chain structures will focus on driving business efficiencies. An example is that of warehousing. The old regime demands that warehouse management be based on arbitrage between varying VAT rates across states. This is expected to change to bring in economic efficiencies and more customer-centricity going ahead.

Manufacturers, however, are concerned about the following aspects:

  • Increase in immediate working capital requirements: Branch transfers and depo transfers will be treated as taxable under GST; IGST will be applicable on these transfers. This increases the requirement for immediate working capital. Another reason for increased working capital requirements is that the receipt of advance is taxable as per GST rules. Also, stock transfers are treated as “supply” and hence are taxable under the GST regime.
  • More stringent and elaborate transaction management: GST aims to achieve better tax compliance. To make this possible, manufacturers must work towards streamlining existing transactions; this means additional resources and costs. For example, under GST, credit in respect to an invoice can be taken only up to one year of the invoice date. Also, the provision of reverse charge means that the liability to pay tax falls on the recipient of goods/services instead of the supplier. The payment of reverse charge is dependent on the time of supply (30 days from the date of issue of invoice by the supplier in case of goods and 60 days for services).These changes will require manufacturers to carefully assess and track their supply processes, especially the timelines. This may mean hiring a better skilled compliance workforce, and better systems and software. More legal considerations will also mean more costs.
  • Lack of clarity on local exemptions: Despite GST being proposed as a unifying platform for indirect tax, all the components for manufacturing are not yet clear. One such area is localized area-based exemptions. The old structure provides certain exemptions for certain goods in specific states (for example the North East or hilly states). Under GST, most of these exemptions are likely to be removed, resulting in a negative cost-impact on these manufacturers. Such companies must reassess their financial position in view of such likely changes.

Overall, one can say that the impact of GST on the manufacturing sector is positive. It provides a unique opportunity to streamline business operations to become more compliance and profitability-oriented, rather than tax-oriented. It puts power in the hands of business leaders to bring about positive change and steer their enterprises on a growth path, powered by GST-compliance.

Read more of our content on GST by clicking here.

[maxbutton id=”4″ url=”https://safe.capitalfloat.com/cf/default/register?utm_source=blog&utm_medium=button&utm_campaign=blog-content-button&utm_content=implications-gst-manufacturing” text=”I want Business Loan” ]

Oct 24, 2018

Card image cap
HOW RESTAURANTS CAN RESPOND TO THE CHALLENGES POSED BY COVID-19?

Coronavirus pandemic has impacted millions of people around the world. The virus has also affected lakhs of people in India, leading to several lockdowns to curtail the transmission of the virus.

These lockdowns have severely affected various sectors throughout India, chief among these being the restaurant industry. If the coronavirus pandemic lasts for a long period, people may get habituated with the idea of not dining out, which will inevitably take the industry longer to recover.

In India, the restaurant industry has faced numerous challenges because of the COVID-19 outbreak: the end of group dining at restaurants, protecting the health of both the employees and the customers, following the safety regulations laid down by the Government, working with a limited number of workers, running expenditure without revenues to match, etc.

Restaurants can address these challenges by actioning the following:

  • Focus on takeaways: Group dining has become a thing of the past due to the coronavirus pandemic. In this situation, focusing on building the business via takeaways would be a wise decision. This would promote social distancing and would prevent the virus from spreading while ensuring operations are sustained.
  • Collaboration: Restaurants can collaborate to benefit from each other’s strengths. This would not only reduce cost but also increase the number of customers (combining the customers of both the restaurants). The merged restaurant can prepare their best dishes (for which they are famous) and focus their efforts on selling these (which would also result in zero wastage). Collaboration would also help in merging the workforce and have more people available for extensive cleaning and door-to-door delivery.
  • Social media marketing: With the onset of COVID-19, traditional marketing wouldn’t prove to be fruitful. On the contrary, it will be expensive. Owing to the lockdowns, people are getting time to surf on social media. Thus, social media marketing would catch their attention. Restaurants will also be able to connect directly with their customers to build effective customer relationships.
  • Opt for online food ordering: Since people cannot go to restaurants, the only way for these businesses to operate would be through food delivery. They can list themselves on Swiggy, Zomato or other food delivery aggregators to increase sales. They can even opt for food orders placed directly through phone calls. This would reduce costs and create a revenue stream.
  • Create a social awareness program: The restaurants can create a social awareness program around frontline healthcare workers of COVID-19 by supplying them food. Apart from the element of social service, this can also be marketed or advertised on social media and other digital platforms to create goodwill amongst customers.
  • Follow the norms laid down by WHO on hygiene: There are operational challenges in the wake of the pandemic. To overcome those, restaurants should maintain hygiene by extensively using hand sanitizers. They should bear in mind that food safety should be their priority. The working stations should be wiped down at regular intervals using a bleach solution. The executives and valets should be cautious during food delivery and opt for contactless payments.

Oct 24, 2018