Since I have begun working in banking industry, I will start a new learning project. I will rewrite my previous currency collector to use the OpenExchangeRate API for real-time data for a given set of currencies like Bitcoin, ethereum, USD, NOK and EUR. The OER API supports the following currencies. At the current time, the developer plan only cost 12$/month with 10K calls to the API – a good deal, if you as me.
My new employer komplettbank.no offers consumer loans and credit cards at the moment. But in my learning project, I will expand this to involve currency loans and maybe blockchain with bitcoins and ethereum.
I will create entities for customer, account, loan and currency, in addition to supporting entities for calculating risk and corralation. My goal will also include to add some machine learning into this for a starter. In addition, i will create a BOT for asking for currency rates and currency conversions.
My goals will be to use Azure SQL, Web Apps and Azure Functions and/or Azure App Fabric for a Microservice application architecture.
Happy coding and designing…
There have been a lot of blog articles about chat bots and robots that will invade our daily life. Don’t worry, they are already here. Microsoft Azure
has a lot of services that can be used to create Bots of different kinds.
Azure has some powerful cognitive services
that enable chat bot to accept user input categorized as utterance – either as voice or written text. Azure has Speech APIs
and Translation APIs
to convert back and forward between speech to text, in addition to translate between different languages.
The past years, Microsoft Azure has released a lot of services around analytics and data management. Many of them is centered around what is called Cortana Intelligence Suite
(CIS) shown in the picture below:
This suite connect many services together and shows the way how Microsoft is defining Analytics for the future. On the right bottom side the chat bots are resides with mobile and web applications. In short, CIS collect on-premise and cloud data from a different of sources like IoT devices, external apps, APIs and similar. These data can be stored in Data Lake Store
or SQL DW that is the basis for analytical services as Azure Machine Learning
, Data Lake Analytics
and Stream Analytics
. The data from the storage or result of analytics tools can be visualized with PowerBI, and queried with web/web/bot applications.
But this will be the topic of future blog posts – over and out!
In mid-February, I was discussing with some colleagues in EVRY to hold a hackathon soon. Immediately, I started to think of what I wanted to create independently of the Hackathon discussions. After a while I was fascinated by the idea of creating a coffee machine bot using Microsoft technologies to its full extent. The plan is to use this project to learn new things, and put everything together around the “Coffee Machine Bot” idea.
I have multiple inspirational sources for this Project
- The fact that software developers consume huge amount of coffee all day (and nights)
- The great GitHub project “hacker-scripts” (separate commands in the bot)
- Homer’s fantastic kitchen machines
- Using cognitive APIs for voice and face recognition to identify persons
- Bot should understand multiple languages, such as English, Norwegian and Swedish
- Using advanced machine learning, analytics and cognitive services to suggest the drink based on drinking habits, time of day, weather, humour and emotion.
- Rate drink
- As usual
- Add to favourites
- Recommend New
- Automatically order new ingredients based on consumption, number of forthcoming workdays.
- Schedule planned and predictive maintenance
- Using HR, IFS, SM9 systems to look scheduled overtime and evening/night/weekend. Make sure participating employees had their drinks covered
This weekend I will do some research for the Face API and Emotion API available in Microsoft Azure.
The past few months I had a few reinstalls of my local development environment due to hardware failure and a new work laptop. And I have installed a local SQL Server instance at least 4-5 times. Luckily, I created a silent install for SQL Server 2016 earlier this year, but I didn’t create a script for pre-install tasks, like creating SQL Server service accounts. Today, I took the time to create the script for creating these quickly.
In my local development environment, I normally install database engine, SSIS and agent. It is not completely necessary with these accounts locally, but it is a good practice. Change the password “XXX” to your own, and run the script from command-line.
NET USER svc-sql-db "XXX" /ADD /passwordchg:no /fullname:"SQL Engine service account"
NET LOCALGROUP "Administrators" "svc-sql-db" /add
NET USER svc-sql-ag "XXX" /ADD /passwordchg:no /fullname:"SQL Agent service account"
NET LOCALGROUP "Administrators" "svc-sql-ag" /add
NET USER svc-sql-is "XXX" /ADD /passwordchg:no /fullname:"SQL Integration service account"
NET LOCALGROUP "Administrators" "svc-sql-is" /add
The only thing I need to improve is to fix the “Password never expires” check box. NET USER have a “/expires:never» switch, but doesn’t seem to work. This could be written in Powershell, but found these command very easy.
In most cases where you have developed a on-premise applikasjon (console, service) these generates logfiles. Either for debugging purpose, or for validating the day-to-day execution wether there are errors or warning.
I tend to use text files, where I keep them for at least 14 days. The following command will delete all files older than 14 days from the c:\temp\logging folder. I have this at the top of my startup.cmd script.
rem delete files older than 14 days
forfiles /p "C:\temp\Logging" /m "*.*" /c "cmd /c del @path" /D -14
During my CRM Solution import debugging yesterday, I also wanted to see which user had been logged in to CRM the last few days. After some googling og trying I came up with this SQL statement for listing all users and last time they accessed CRM during the last 3 days.
NB! You have to change the “OrgName” to get this working on you CRM database server. It is tested for CRM 2011 and CRM 2016.
SELECT O.FriendlyName, SU.FullName as Name, SUO.LastAccessTime
FROM SystemUserOrganizations SUO
LEFT JOIN SystemUserAuthentication SUA ON SUO.UserId = SUA.UserId
AND LEFT(AuthInfo, 1)='C'
LEFT JOIN Organization O ON SUO.OrganizationId=O.Id
INNER JOIN OrgName_MSCRM.dbo.SystemUser SU ON SUO.CrmUserId = SU.systemuserid
WHERE LastAccessTime IS NOT NULL
AND O.FriendlyName = 'OrgName'
AND datediff(DAY,Lastaccesstime, getutcdate()) < 3
ORDER BY lastaccesstime
If you have some problems with Dynamics CRM On-premise you are able to enable tracing with PowerShell. In my case, I needed to get debug information on why my solution import is failing when I’m going to move it to a new organization.
Open the powershell prompt and use the Add-PSSnapin command shown in 1). Thereby, You can list the trace setting with the command shown in 2). Before you start the tracing, you show determine the timeline for when the error occurs and just enble it as close as the error as possible. Run the command in 3) to start the tracing. You should stop the tracing immediately after the error has occured. Use command in 4) to stop the tracing.
# 1) add
# 2) get crm trace settings
# 3) enable tracing
$Setting = Get-CrmSetting TraceSettings
$Setting.Enabled = $True
# 4) disbale tracing
$Setting = Get-CrmSetting TraceSettings
$setting.Enabled = $False
When you have tons of log file, the trace tool CRM Trace reader is nice to use for searing and filtering.