Day 3 – Coding & World Leaders at Davos

by Todd Fabacher on January 25, 2016 No comments

Today was all about coding and world leaders. Almost every conversation I had eventually focused on how coding is the future and a key to success. My conversation with Will.i.am, who was incredibly knowledgeable, focused on utilizing the power of objects to shield the complexity of development from students when they first start. I explained that this is the power of LiveCode and why a simple syntax English like language is far better than Scratch from MIT. Kevin and Steven, he suggested you double down on Code Day and contact him directly when LC8 with widgets is all out because he was amazed that one language could do all the platforms including HTML5…mark it on your calendar: http://will.i.am/.

Will.i.am at Davos

I met loads of incredible people, from Jimmy Wales of Wikipedia to Topher White of Rainforest connection, and had productive conversations with a number of heads of state – I’ll tell you more about some of these conversations in later blog posts.

The World Economic Forum is much like the Oscars. They take over the town and all the companies set up HQs everywhere, like large expensive booths in the shops and hotels around town. The real elbows rub in all of the after parties with free flowing drinks, incredible food and big business deals. A good time is had by all!

In between having fascinating conversations and attending sessions, I managed to progress with coding and designing GoPlan.

LiveCode Design Points
Not everyone is going to agree with these points, but after using LiveCode for about a year now, here are a couple of design issues that came up and here are my decisions. We have also decided that each section needs a Learn section. I wanted to get more of the UI completed today, but some LiveCode design issues came to the front and needed to be dealt with.

DataGrid
The datagrid in LiveCode is both powerful and flexible. The simplicity of setting up the form makes its selection for the list controls a natural one. The only problem is the datagrid was designed for a desktop UI and is not mobile friendly. The first issue is scrolling.

Currently, the datagrid does not have native scrolling, which in an essence makes it useless for my app. But Monte Goulding came to the rescue. He has a simple solution that takes care of that issue: mergDatagridScroller. If you don’t have it, get it, plus many of his other externals! They are fantastic and I would have had to use a different language than LiveCode on a few projects without them. I will add that I have used Monte also to create custom extensions for me in the past and he was professional, responsive and always answered support questions. Additionally, at a very reasonable price. So this is my chance to say thanks and I hope to have even more business for you soon!

Top Header Bar
I get asked what is the best way to do header bars for LiveCode. I am not sure of the official spec, but we do a 55px graphic control. With button or text that is 38px and start at 16px top. I don’t set a font name, but I set the font size to 20. Not sure if this is best, but this leaves room for the phone’s time, which I think is important to keep.

Lock screen for visual effect in rect
Another area where I have issues with apps done in LiveCode is navigation. So if you have a tab on a card, you should be using “lock screen for visual effect in rect ([rect area])”. This way you get the swipe effect of mobile, even when you are staying on the same card. I see lots of people just showing and hiding, but I think you can make your app seem more professional with a little effort.

It can also be used effectively when going between cards where you don’t want the header to be swiped with the rest of the card. When you select an item to edit, I use this effect to go to the other card:

lock screen for visual effect in rect ("0, 60, 375, 667" )
go to card [card to go to]
--other code goes here to populate the new card
unlock screen with visual effect "push left" fast

Photos
One of the features the team really wants to put in the app is the ability to include photos. They would like to allow the user to either take a picture from the app or select from the phone’s Image Library. Luckily we have already created the code for this on another app, and thanks to William Jamieson, we coded the photo to resize properly. I cheated a little and copied the code. You can see it in the Photo Card. I also coded so that you can test on the desktop by selecting an image.

In the past we have saved the photos as BLOBs, but since it looks like our direction is HTML output, we will save the images to the DB as Base64. I can insert the images directly into the HTML file and don’t have to be bothered with putting them on a web server. If you have ever wanted a simple, and I think elegant way, of adding photo/image functionality here it is…

Native Scrolling
This is a pain in the ass in LiveCode. Not only for the grid, but for grouped objects. So today Gurgen, Armenhui and myself put an end to the madness. We decided to create a substack that lets us easily switch between desktop and native mobile scrolling. We called it libScroll. Please feel free to test, update, criticize, comment…just help us to create the best solution!! I hope this provides a framework for a universal solution to what seems like a big problem in LiveCode.

Turn Off Auto Suspending of Apps in iOS
Since I am on the topic of design. One of the challenges that I have with LiveCode is that it doesn’t give you the option NOT to suspend your app if the user switches to another app. In ObjectiveC this is easy, but there is no option in the LiveCode IDE. Well, I found a hack in the settings.plist file of the LiveCode system.

I think this should be an option in the IDE. Imagine if you are in the middle of entering information and the phone rings. You lose EVERYTHING!! Not an acceptable user experience and a reason I almost lost a client until I found the solution. Here are the steps you need to take:

Locate the LiveCode application you’re using, and open its bundle.
Navigate to Contents/Tools/Runtime/iOS.
Locate the folders that start with “Device-” that correspond to the minimum iOS version you want to support (or you can change them all). (For example, at the time of this writing I have “Device-5_0”, “Device-5_1”, and “Device-6_1” folders.)
Inside the “Device-” folder, locate the settings.plist file and open it in a text editor.
Search for the key UIApplicationExitsOnSuspend. Underneath the key it should read ${APPLICATION_EXITS_ON_SUSPEND}.
Change this to .
Save the settings.plist file. Now relaunch LC and rebuild your app.

List Value Selector
For many situations, the native mobile scroll picker is a good choice. I have used it a few times in Apps myself. But I find myself preferring a list selector over the scroll wheel. Apple start using this more after iOS7 and my users seem to prefer it also. I have created a list selector in the code to give you a sample of this type of list value selector in “Who Are You?”, Info, Biz Type.

On to GoPlan
Yes, somehow I actually got several hours of coding time during the session which can be a bit formal and boring sometimes. I have started the basic wireframe of the app and will start filling out the code and the UI. Another area that developers frequently fail to do is research on the specifics of their app. Luckily I have done similar apps and have feedback, both negative and positive which helps me design GoPlan. But I still need to research the specific parts of a business that we will need to include. We will NOT ask our users to create a P&L, so we are going to have to do it for them with our limited questions.

Finding Experts and Partners
I have asked Lillit Broyan, a small business financial and economist that just started working for Digital Pomegranate on other projects to focus on GoPlan for a few days. She has reached out to a local non-profit business development center named Compass Center. Their focus is on SME in the former Soviet Union and the Middle East, and they have incredible knowledge and insight. Another important lesson here for LiveCoders is to find industry partners when developing apps. Too many coders I speak to almost always go it alone which I don’t understand.

Partners are great to validate concepts with, have in depth industry knowledge and can connect you with potential clients. It does not mean that you have to give equity, you can find a different incentive. Remember your job is to take what the experts know about how your app should function and what customers are looking for. When talking with Lilit and the Compass center, we started to discuss yesterday about how to provide advice and a possibly a score for the plan to give some kind of indicator on it’s success. For consumers in the US, that would be a FICO score.

How cool would it be for us to do the same for our users and highlight where there are opportunities and areas of weakness to focus on. NOW, we are talking about an app that is helpful and will have an impact on the world. Like the VP of China said today: China’s great success is based on innovative daily steps toward a more productive and informed society. Tomorrow I need to figure out how to convert the following functionality which we have agreed needs to be in the biz planning app, into a database and code.

1. Profit and Loss Forecast (usually referred to as P&L)

Profit and Loss forecast is usually performed periodically, either annually, quarterly or monthly. It pulls together all income and costs that you have predicted in your small business planning process. The difference between the two is the profit. After all, if you can’t turn a profit in this business then there’s no point having one.

  • Revenues. If you only sell one product or service, this is simply price x quantity. If you want to boost revenues, there are two levers: increase prices and/or sell more. Usually, if you raise your prices, you sell less. Additionally, price is THE MOST important driver of profits. For the average company, for every 1% increase in prices, if all else is equal, operating profit can increase by 8%. Of course, the inverse is true. This is an impact nearly 50 percent greater than that of a 1% fall in variable costs such as materials and direct labor and more than three times greater than the impact of a 1% increase in volume.
  • Cost of goods/services sold (COGS). This item includes all the direct and indirect costs related to producing the good or service you are selling. Always manage the largest costs, constantly trying to reduce them. For example, by finding cheaper, but equivalent substitutes, developing other suppliers or simply calling your supplier and asking for a discount. You will only know the response if you ask!

Important note: if you have many assets (e.g. machinery, factory, equipment) they depreciate and you have to replace them over time. This depreciation is a NON-CASH item (the money doesn’t come out of your pocket every month). Depreciation of these assets is usually embedded into the COGS. You can separate it and add it back to your operating income to have a more realistic number for profit.

  • Gross margin. See our financial ratios section below.
  • Operating expenses. Here you will find expenses such as salaries, marketing, rent, insurance, etc. Guess what: these items grow like weeds! Always keep them in check. One nice way to monitor them is by dividing it by revenues to see if these expenses are increasing faster than your revenues.
  • Operating income. This is (Revenue – Cost of goods sold – operating expenses). It is the profit you make through your operations
  • Interest income/expenses. If you borrowed money, this is where the interest you paid shows up. Also, if you have money in the bank earning interest, this is where that interest received shows up.
  • Income taxes. Long story short: this is the amount of tax you paid on your profits. If you don’t have profits, you don’t pay corporate tax. Depending on your country, you might even use past losses to deduct taxes from future profits!
  • Net income or net profit. After all your sweat, this is how much money you made (or lost)! It’s just revenues minus all the cost items above.

2. Cash Flow Forecast

The Cash Flow forecast will tells you if the business will have enough cash to run the business or pay to expand it. It will also show you when more cash is going out of the business than in. It can help in tax preparation, planning new equipment purchases or identifying if you need to secure a small business loan.

There are three very important components of the cash flow statement

  • Cash flow from operations. Simply put, this is the cash that comes in from selling your goods and services after paying for all the costs. If you are making money, then this line will be positive. If not, it will be negative.
  • Cash flow from investing activities. This is where you spend money on things that will help you make more money: new offices, new machinery, equipment, etc. This line is usually negative.
  • Cash flow from financing activities. Here you can have many things that add or reduce the resulting amount. Items that add to the cash flow: inflows of cash from new debt and new equity. Items that detract from the cash flow: debt repayments and dividends.

Very important note: why aren’t interest payments in the cash flow from financing activities? Because they are already included in the cash flow from operations, which includes your profit after payment of interest!

3. Break-Even Analysis

Break-even analysis is one of the important tools to determine how your business is operating. It shows the amount of sales needed to pay for all costs in a period. That’s the point where you don’t make a profit but don’t have a loss either. Below break-even, you generate a loss; above it, you turn a profit. So it simply helps to determine how much volume of product you must sell in order to make a profit.

4. Financial Ratios

Financial ratios are the most common and widespread tools used to analyze your business’ financial standing. Financial ratios don’t take into consideration the size of a business. Ratios are just a raw computation of financial position and performance.They help to understand how well your business is performing and areas needing improvement. We have selected a few, very important ratios. Others are important too, but we suggest you start with what we call the basic 3:

  • Gross margin ratio. It tells you if your business is profitable or not. It indicates how much profit you make after paying off your cost of goods sold. It is calculated through the following formula

(Sales of Goods and Services – Costs of sales * 100 / Sales of Goods and Services)

  • Interest coverage ratio. This is important for banks and others who have lent you money on interest. It measures your ability to meet your interest obligations. It measures how many times over you could pay your current interest payment with your available earnings. It is calculated through the following formula

(net profit + interest and bank charges) / (interest and bank charges)

  • Debt ratio. It measures your business’ ability to handle your obligations. If the ratio is too high, it means you have too much debt, therefore it may be difficult for you to maintain solvency or acquire new debt. It is a solvency ratio indicating a firm’s ability to pay its debts. The lower the ratio, the more solvent the business is. The formula below calculates the amount of debt outstanding in relation to the amount of capital

(total liabilities) / (total assets)

So after about an hour conversation and finding lots of resources on the internet, we have settled on three top ratios that we will gauge first.

Sector Category
       Agriculture
1.1 Crop production
Gross margin 98.8 99.7 99.3 97.4
Interest coverage ratio -11.0 -4.2 3.1 19.1
Debt ratio 0.6 0.5 0.4 0.4
1.2 Animal production and aquaculture
Gross margin 96.5 99.0 93.1 92.7
Interest coverage ratio -16.5 -3.7 0.1 11.6
Debt ratio 0.7 0.6 0.6 0.4
     Manufacturing
2.1 Food manufacturing
Gross margin 32.9 34.2 42.6 64.5
Interest coverage ratio -9.7 2.3 11.8 28.8
Debt ratio 1.0 0.8 0.7 0.5
2.2 Clothing manufacturing
Gross margin 26.3 36.2 48.2 90.2
Interest coverage ratio -21.9 8.1 40.8 213.8
Debt ratio 1.0 0.7 0.6 0.5
2.3 Textile product Mills
Gross margin 30.0 37.7 41.8 61.9
Interest coverage ratio -11.3 4.2 9.8 60.5
Debt ratio 1.0 0.7 0.6 0.4
2.4 Furniture and related product manufacturing
Gross margin 25.0 33.5 41.8 73.1
Interest coverage ratio -12.7 4.6 22.9 102.6
Debt ratio 1.0 0.7 0.6 0.4
2.5 Miscellaneous manufacturing
Gross margin 38.9 43.1 55.3 83.2
Interest coverage ratio -11.8 7.3 30.8 113.6
Debt ratio 1.0 0.7 0.5 0.4
Retail
3.1 Food  and beverage stores
Gross margin 25.1 22.8 26.2 47.1
Interest coverage ratio -8.3 2.8 10.4 35.7
Debt ratio 1.2 0.9 0.7 0.5
3.2 Clothing stores
Gross margin 37.4 42.9 45.1 59.3
Interest coverage ratio -14.7 1.9 13.1 42.0
Debt ratio 1.3 0.8 0.7 0.5
3.3 Building material and garden equipment stores
Gross margin 32.0 31.3 36.7 62.1
Interest coverage ratio -6.8 3.9 15.6 43.7
Debt ratio 0.9 0.6 0.5 0.4
3.4  Health and personal care stores
Gross margin 38.9 37.9 43.6 83.0
Interest coverage ratio -7.2 6.9 30.3 160.3
Debt ratio 0.9 0.7 1.4 0.3
3.5 Florists
Gross margin 44.8 49.4 51.5 63.2
Interest coverage ratio -7.0 2.7 9.1 31.7
Debt ratio 1.4 0.9 0.9 0.6
3.6 Gift and Souvenir shops
Gross margin 42.0 46.4 49.3 69.6
Interest coverage ratio -10.4 3.5 11.9 57.5
Debt ratio 1.1 0.8 0.7 0.4
        Services
4.1 Taxi service
Gross margin 86.7 98.3 99.0 99.7
Interest coverage ratio 5.5 26.1 40.0 158.7
Debt ratio 0.9 0.8 0.6 0.5
4.2 Repair and maintenance
Gross margin 41.4 45.0 60.3 91.0
Interest coverage ratio -5.0 10.0 28.4 104.2
Debt ratio 0.9 0.7 0.5 0.4
4.3 Haircare and Beauty services
Gross margin 68.0 72.9 84.8 95.2
Interest coverage ratio -4.3 13.0 33.9 180.6
Debt ratio 1.5 1.0 0.9 0.6
4.4 Traveller Accommodation
Gross margin 67.3 66.5 71.8 88.8
Interest coverage ratio -1.7 1.1 3.0 8.4
Debt ratio 0.9 0.8 0.8 0.6
4.5 Food and Drinking places
Gross margin 50.8 53.5 54.3 61.9
Interest coverage ratio -12.7 0.6 9.1 32.7
Debt ratio 1.5 1.0 0.8 0.5

 

Download the code here.

Todd FabacherDay 3 – Coding & World Leaders at Davos

Related Posts

Take a look at these posts

Join the conversation

*