Connecting Android apps with Java and #AzureML

During my mentoring session with Acorn Inspirations, we were building an app that needed to access AzureML via an Android phone app. Quickly, it became clear that we were integrating a lot of different moving parts: Android, Java, AzureML. How did we do it?

Without giving away too much about the solution they are building, I worked on the Azure Machine Learning part to produce a sample recommender model. The model was created by going through the TDSP process, and it was productionized and ready to go.

Meanwhile, the other team members worked on the Android app, and then we got to the point of knitting everything together.

Writing an Android app means that the code has to be in Java or Kotlin. Kotlin is more complex, and you can read this excellent book, Kotlin in Action, in order to understand it better.

There is also the matter of network calls on Android. One recommendation is that we could use Retrofit to sort out the network calls but this would take longer to implement since it is more complex, so it was decided to use the standard http packages that are available in the Android SDK instead.

Then came the question: how do we use the APIs? JavaScript with jquery is one option and it can be faster. Then we had a piece of luck.

Using this Azure sample here, it tuns out that the project, with the ability to connect to Azure, is built in. This is known as a QuickStart and this facility allows you to configure the client application, which is wrapped up as a complete Android project which you can open up in your IDE. Neat!

Once that’s done, it’s possible to think about configuring the Android app to connect to your AzureML model using Java. There is a good example here:  https://github.com/aribornstein/JavaAzureMLClient

For more information in making your model production-ready, see the Microsoft Azure ML documentation here. It’s also possible to retrain the Azure ML model and it’s worth considering, too.

So yes, there are a lot of moving parts but Azure does give you some help on the way.

Financial Storytelling and Data Storytelling with Profitability Ratios

Following on from my earlier blog post, discussing Accounting Ratios, let’s take a look at a specific set: Profitability Ratios.Profitability Ratios can be defined as understanding the effectiveness of the company in generating profit. In this blog post, we will concentrate on profitability ratios, working our way around the flow chart presented here:

Screenshot (1)

The formula are presented below, in terms of their meaning:

  • Return on Net Assets (RONA) (Return on Capital employed) – return on the fixed and current assets less current liability. It is also known as the primary ratio.
  • Return on Equity (Return on Shareholders’ Funds) – This also looks at return on the fixed and current assets less current liability, but it looks at it from the Shareholder’s perspective.
  • Gross Profit Margin – percentage of sales revenue remaining after the expense of making the product / solution / delivering the service is taken into account.
  • Net Profit Margin – This is the percentage of sales revenue that’s left, after all of the expenses of running the firm have been fully met.

Let’s have a look at how they are calculated, and what they mean.
money-2696229_1920

Calculating the Profitability Ratios

1.Return on Net Assets (RONA) (Return on Capital employed)

Net Profit before long-term interest and tax /

Total Assets less creditors falling due within one year

This figure is expressed as a percentage, so it is multiplied by 100%. That said, at root, it is fundamentally calculated as follows, expressed as a percentage:

Profit /

Capital

Profit can include one of the following metrics:

  • Operating Profit
  • Net Profit before Interest and Taxation
  • Net profit after taxation
  • Net Profit after taxation
  • Net Profit after taxation and preference dividend

Capital can be measured by one of the following options:

  • Total Assets
  • Total Assets less intangible assets
  • Total Assets less current liabilities
  • Shareholders Funds
  • Shareholders’ Funds less preference shares
  • Shareholders’ Funds plus long-term loans
  • Shareholders’ funds plus total liabilities

What combination do you choose? Basically, the MVP answer holds here: it depends. The definitions depend on what business question you are trying to answer. The RONA definition was chosen here in order to illustrate how it differs from Return on Equity, which is explained below.

2. Return on Equity (Return on Shareholders’ Funds)

Net Profit before long-term interest and tax /

Share Capital and Reserves

This figure is expressed as a percentage, so it is multiplied by 100%.

3. Gross Profit Margin

Gross Profit /

Sales

This figure is expressed as a percentage, so it is multiplied by 100%.

4. Net Profit Margin

Net Profit before long-term interest and tax /

Sales

This figure is expressed as a percentage, so it is multiplied by 100%.

It’s possible to see that these ratios are made of five different things. I’m a visual person so I’m marking these in colour since I will need to remember them for my exam!

  • Gross Profit
  • Net Profit before long-term interest and tax 
  • Sales
  • Share Capital and Reserves
  • Total Assets less creditors falling due within one year

Interpreting the Profitability Ratios

With the Return on Net Assets figure, we are looking at the effectiveness of the assets that are financed by long-term creditors as well as the shareholders, and we are looking at the profit generated as a result of these combined assets. Higher RONA can mean that the company using its assets efficiently. Also an increasing RONA may indicate an emphasis on executing efficiently, as evidenced in improved profitability and overall performance.

The Return on Equity ratio looks at the same issue, but from the perspective of the shareholder only. The long-term creditors are partialled out. Understandably, shareholders want to see a high return on equity ratio, since this would show that the organisation is being effective in its deployment of investors’ funds. Shareholders can also track progress by calculating the return on equity at the beginning of a period and then check it again at the end of a period to see if there is a change in return.

Net Profit Margin shows the sales revenue after all of the expenses have been removed. It should be as large as it can possibly be, as long as it is sustainable. However, this should not be taking place at the expense of another aspect of the business. Be wary of short-term attitude to profit. This is sometimes evidenced in the net profit margin.

Limitations on the Productivity Financial Ratios

Accounting Ratios give us useful insights in the management of a company, but it is not the whole story. The business context, and the company itself, should also be considered. RONA does not calculate a company’s future ability to create value. Additionally, the values on the balance sheet might not represent the replacement cost, therefore masking the reality of asset utilisation.

In the next post, we will look at Activity Ratios and how they are calculated, along with some advantages and limitations. We are leading up towards visualizing these ratios in Power BI, and it’s important to understand the ‘why’ as well as the ‘how’ of visualizing these ratios.

Getting the Swagger.JSON file from #AzureML

I’m conducting some mentoring for #TeensInAI at the BBC Studios in London today with Acorn Aspirations. I’m working with a group, and we are creating an app that uses various technologies, such as Android mobile studio, Java, AzureML and Swagger.

It wasn’t immediately obvious where to find the Swagger JSON file for deploying as part of the Android app, so here are the instructions.

You need to download the JSON file from the AzureML web portal. To do this,

  1. Sign in to the AzureML portal.
  2. Click Web Services on the left hand side
  3. Select your web service
  4. Select the option New Web Service Experience, which is in Preview.
  5. Click Consume, which you will see towards the right hand side of the page.
  6. On the Consume page, copy the Request-Response URL.
  7. In the URL, replace execute?api-version=2.0&format=swagger with swagger.json
  8. Paste the URL into your browser.
  9. Save the returned file.

And that’s it! You can find out more about consuming a web service in AzureML here.

Introverted and fancy some quiet no-pressure chatting over a bite to eat? Join me for breakfast or lunch at #MSIgnite

Diversity, for me, also includes types of people. Some people can win through noise and sheer stamina for arguing a point, but that can really switch off introverts. It’s important to try and look through other people’s lenses. Just because they don’t respond like you, doesn’t mean that they are wrong. It just means that they are different.

I’m an introvert and I have an INTJ personality type. INTJs are personality unicorns! For others, it means that I prefer networking in quieter groups. So, I thought other people are probably like me, and would probably fancy introverted networking – or quiet downtime – on their terms. Extroverted people don’t always get how introverts work, so I’ve added a handy guide here courtesy of Blessing Manifesting:

selfcareintroverts2

 

So I thought I’d offer up the chance for a quiet chat, in among all of the noise. We could call it networking…. or just downtime. Ignite is going to be super busy and we all need to do some self-care. And that means food!

So if you fancy meeting with me in the food halls for breakfast or lunch during the Microsoft Ignite week, I’ll post up a note on my blog and on Twitter to say where we are meeting.

The idea is that it’s a casual invite for people who would like to learn, connect and share with others. Sometimes people like to chat and meet with speakers, and meeting casually for lunch or breakfast is a great way to do that, plus meet other attendees too. It’s the chance for a quiet chat about Microsoft Ignite, business intelligence, data science and the topics that get we introverts fired up inside – even if we are not shouting about it outside.

So I’ll post up on Twitter and on my blog, where I will be, and we can head off, join the queues, grab a table and a bite and a quiet chat before the sessions start.

Microsoft Ignite is going to be busy and it’s easy to feel ‘peopled out’ or ‘conferenced out’ if you are introverted. I get it and I thought it might be nice for some quiet chatting before the day starts.

 

 

 

Decency Charter for Technical Communities

I want to try and attract, recruit and retain people from diverse and different backgrounds, into technology careers and technical community.

I believe that Diversity and Inclusion is a positive asset. However, it can be cast in terms of the negative ‘Code of Conduct’. I see a CoC as leading on from a Decency Charter. The Decency Charter is a positive step that will help to recruit and retain people fro different backgrounds. A CoC is a negative step that has to react when there is a problem. I’m hoping that a Decency Charter will attract individuals who are, by nature, appreciative of Diversity and Inclusion, and it can form some thinking material for people who are not as inclusive in their approach, perhaps through a lack of opportunity to have exposure to, and knowledge about, people from other backgrounds.

I have read a lot of things which focus on technology sphere and the problems that it can bring to people who are in the minority. I know, because I am one of them. I was inspired by the Decency Pledge suggested by Reid Hoffman of LinkedIn, and I can see how it can help the technical community. Rather than a Pledge, I felt that the word Charter was more universal but I’m more than happy to take feedback and please do leave comments.

It has also been my experience that some of the best and most rich friendships have come from the technology industry and community. In this group, I am fortunate to count men as well as women and there are so many men out there who are allies, possibly without even seeing themselves as such. Their kindness is valued. I have had problems, but I believe that people are mainly good at heart.

I believe that most people are great and well-intentioned, and I do not want their voices to be drowned out by people who do not have the same good intentions, goodwill, or good behaviour of the vast majority of people.

I’d like to propose a Decency Charter, which incorporates the Diversity Charter that I raised recently. I hope that you will please leave comments and perspectives. I am not arrogant and I do not assume that I never make mistakes, and I am stating this here so that it forms part of the story.

I don’t want this to be a Jen thing. I’d like to open source this, so that tech groups can show themselves for what they are: nice, smart people who want to learn, connect and share. So here goes:

light bulb Brainstorm: Decency Charter

Goal of the Decency Charter
We want  to improve, promote and maintain a healthy ethical climate of real inclusion across our community. We embrace a healthy mix of skills, views, experience and background to ensure that technical community is available equally to everyone. 
By upholding the Decency Charter, we confirm our commitment to creating a more diverse technical community, and this is a key expression of who we are.
Status:
Draft for review by interested parties
Related
Based on earlier Diversity Charter, and incorporates it

Inspiration

The Diversity Charter is part of a wider Decency Charter. It sets out more detail about positive things that the technical community can do in order to attract, recruit and  retain people from different backgrounds.

Ideas

The main objective here is to create a visible commitment to embed inclusivity and diversity throughout the community organisation. 

What we believe

We believe that all members of the technical community are equally important.
We are part a tech community where we value a diverse network, and learn and share from one another:
regardless of age,
regardless of colour,
regardless of their ethnicity,
regardless of their religion or beliefs,
regardless of disability,
regardless of gender,
regardless of sexual orientation,
regardless of their race,
regardless of their ability or lack of ability,
regardless of nationality or accent.
We are a diverse tech community where we are all individuals with differences, but we are all members and we can all learn from each other.

What we stand for

We always seek to treat those around us with warmth, understanding, and respect. We aim to act in a responsible, professional, respectful and healthy manner. We aim to treat everyone equally, fairly and with all respect. We will work tirelessly to build a more fair and safe technical community for all. 
In particular, we won’t tolerate sexual harassment or gender discrimination. We have a Zero Tolerance approach to harassment in any form. We do not ignore the power relationships that exist, and we do not favour one group over another. We will hold the same position for all  our members, and we work towards ensuring that the technical community is a welcoming, diverse and inclusive place to connect, learn and share.
We will stand with you.

What we will do

If there is an issue, we will act upon any issues that you tell us about. When complaints arise, we will take take action in a prompt, clearly defined, and consequential manner.
It’s ok not to feel totally comfortable with other people’s viewpoints. It’s what you do about it that counts. Diversity impacts everyone. 

Ways to Demonstrate Positivity

CoC
Separate document to follow but there should be clear guidelines on what people can do if something happens to them. There is a clear need for confidentiality and anonymity.
I am reviewing this section with community leaders who represent different backgrounds. religions and perspectives so I can provide a better, whole list that shows how we can demonstrate our commitment to Diversity and Inclusion. I will blog separately when this important piece of work is at a stage for public review.

Next steps for groups to show diversity

  •  Develop an inclusive website (Example: Azure WordPress implementation with WordPress add-ins for accessibility?)
  •  Develop inclusive PowerPoint materials to assist attendees with visual and hearing impairments to navigate the educational material (https://support.office.com/en-us/article/make-your-powerpoint-presentations-accessible-6f7772b2-2f33-4bd2-8ca7-dae3b2b3ef25) 
  •  Introduce local students and apprenticeships to the  technical community. This should introduce a diversity of membership.
  •  Social media advertising can include appropriate hashtags and keywords in advertising campaigns for events in order to show supporting and connecting with diverse communities. For example: #equality #empowerment #Diversity #DiversityAndInclusion 
  •  Have a clearly identified Code of Conduct / Anti Harassment Policy to show what will happen in the event of any issues (This is the next step)
  •  logo

Financial Storytelling and Data Storytelling in #PowerBI

money-1604921_1920

As a consultant, I think it’s important to understand the numbers that make up a business. It means I can provide better advice to my customers since I can read their balance sheets, understand their financial statements, and translate these numbers into effective data visualization in tools such as Tableau and Power BI.

There are a number of accounting ratios which can be used to help determine the success – or otherwise – of a business. There is no ‘magic silver bullet’ that can help to determine definitively, but it is possible to put the ratios together to make a story that will help us to understand the business better. We can tell the story better through data visualization. So we move from data storytelling to finance storytelling.

Once we have the ‘story’ behind the accounting ratios, we can start to use these as a basis for storytelling in Power BI. In this blog series, we will start to look at the accounting ratios and how they are calculated. Then, we will look at how we can visualize this information in Power BI.

Accounting Ratios

Click here to see a bigger version.

Since we are looking at accounting ratios and how we can visualize them, let’s use this flow chart as a starting point. In the next topics, we will look at what these accounting ratios mean in more detail. We will also look at some of the McKinsey modelling, such as ROIC and the calculation of value.

Accessing the Azure Wordpress Installation using FTP

Do you need to do some back-end work to secure your WordPress site on Azure? If so, you will need to do some back-end work using an FTP facility, such a FileZilla.

You will need:

  • ftp site
  • username
  • password

 

So let’s get to it!

Finding the FTP and FTPS site details for Azure WordPress

The FTP URL will look something like this:

ftp://waws-prod-aa10-000.ftp.azurewebsites.windows.net

You can find it by searching for the Diagnostics Logs section of the App service. Can you see the sections for FTP and FTPS? They are marked in red.

Find FTP and FTPS details

Finding the User Name and Password

Again, you can find these from the Azure portal. Go to the App service, and look for Deployment Credentials. You can reset them here, and use those details as the FTPS username and password.

Deployment Credentials

 

Using FileZilla

I use FileZilla Pro because it connects to Azure, Google Cloud, Amazon and other sources as well. It’s not expensive and I like having everything in one place.

Here is a sample of the Site Settings in FileZilla.  The FTP URL goes into the Host settings. You can leave out the Port number. The FTP User goes in the User Box, and the Password goes into the Password box.

FileZilla

After that, you should be good to go. I hope you manage to fly with WordPress in Azure!