Quantcast
Channel: MSDN Blogs
Viewing all 35736 articles
Browse latest View live

Is SQL Job Required to Maintain Indexes for TFS databases

$
0
0

The recommendation from the Product Group is to not run a separate index maintenance job as the Optimize Databases TFS job will handle updating of indexes for TFS related databases (Config/Collection DBs). The stored procedure prc_OptimizeDatabase goes through all the indices (including clustered indices) and rebuilds them online if they are more than 20% fragmented. Some of the indices are blacklisted (i.e. not rebuilt) – you can find these in tbl_ReindexExclusions.

From the comments in the prc_OptimizeDatabase stored procedure, it appears the tbl_content table is skipped in this job and it is the only entry in the tbl_ReindexExclusions table.

-- First we defragment all existing indices

-- Iterate through all tables and call ALTER INDEX

-- Exclude tbl_Content as it gets to be really large and does not need re-organization

This article explains some basic SQL admin tasks there is nothing different for TFS databases compared to other transactional databases.


Webinář : DevOps in the Cloud

$
0
0

Nenechte si ujít technický webinář "DevOps in the Cloud" který je určen nejen pro vývojářské partnerské firmy a startupy.
(Nejste ještě partneři - připojte se do MPN!, ... jinak se ale na webinář můžete v pohodě registrovat jako host:)

Webinář bude probíhat v angličtině.

Kdy: 30.8.2018 mezi 11:00 - 14:00 hod.

Po koho:  Architekti a profesionální vývojáři, technický level ~300.

Obsah:  

  • Introduction to DevOps and ALM for Cloud apps​
  • Visual Studio Team Services Capabilities​
  • Build management​
  • Application testing​
  • Deployment and release management​
  • Maintaining and monitoring cloud apps

Registrace a podrobnosti:  Registrace, popis a další instrukce zde

 

Azure Maps Simplified

$
0
0

App Dev Manager Jason Giordano explores Azure Maps-- an Azure One API compliant set of REST APIs, accompanied with a web-based JavaScript control that provides developers from all industries, powerful geospatial capabilities for web, mobile, and IoT solutions.


Azure Maps are fascinating to me and also very useful in an ever increasing IoT world to track/transport goods, monitor traffic patterns for delivery routes and many other applications. The Azure Maps Documentation can be found here: https://docs.microsoft.com/en-us/azure/azure-maps/. I do not want to duplicate what is already available. What I want to display is the absolute minimum one would need to create their very first Azure Map and provide additional information not found in the documentation. When you are ready to create your incredibly useful Azure Maps, you can use the documentation to navigate the advanced features and functionality available. Just be aware that Azure Maps moved into general availability (GA) in May 2018, and during the six-month public preview, it was Azure Location Based Services.

To get started, you will need to create an Azure Maps Account in your Azure Portal (note the path I used at the top):

azmaps1

Once the MapsAccount is created, you will need to copy the Primary Key to use in code (Azure Maps Account/Settings/Keys/Primary Key):

azmaps2

Open Notepad on your PC and copy the following code (be sure to add your Primary Key in correct spot):

<html lang="en">

<head>

<meta charset="utf-8"><meta name="viewport" content="width=device-width, user-scalable=no">

<title>Map</title>

<link href="https://atlas.microsoft.com/sdk/css/atlas.min.css?api-version=1.0" rel="stylesheet" type="text/css">

<script src="https://atlas.microsoft.com/sdk/js/atlas.min.js?api-version=1.0"></script>

<style>

html,body {width: 100%; height: 100%;padding: 0;margin: 0;}

#map {width: 100%;height: 100%;}

</style>

</head>

<body>

<div id="map">

<script>

var map = new atlas.Map("map", {'subscription-key': 'INSERT YOUR PRIMARY KEY (and keep the single quotes)'});

</script>

</div>

</body>

</html>

Save the file to your Desktop (be sure to change the Save as type to ‘All Files’):

azmaps3

Finally, navigate to your Desktop folder and double-click Maps.html to open the map in your default browser.

Mouse

  • Wheel controls zoom.
  • Left Button double-click to zoom in.
  • Left Button controls panning.
  • Right Button controls rotation and pitch.

Keyboard

  • Zoom out: hyphen
  • Zoom in: plus
  • Pan right 100 pixels: right arrow
  • Pan left 100 pixels: left arrow
  • Pan up 100 pixels: up arrow
  • Pan down 100 pixels: down arrow
  • Rotate 15 degrees clockwise: shift + right arrow
  • Rotate 15 degrees counter clockwise: shift + left arrow
  • Increase pitch 10 degrees: shift + up arrow
  • Decrease pitch 10 degrees: shift + down arrow

Get started and learn more about Azure Maps.


Premier Support for Developers provides strategic technology guidance, critical support coverage, and a range of essential services to help teams optimize development lifecycles and improve software quality. Contact your Application Development Manager (ADM) or email us to learn more about what we can do for you.

Top Stories from the Microsoft DevOps Community – 2018.08.24

$
0
0

I don't know about y'all, but it's been a long week here on the VSTS team. I'm beat! And when I'm tired, it gets hard to focus on those little letters on my LCD. So this week I'm linking you to a bunch of great content that you don't have to read!

We've got a couple of good articles, of course, but we're heavy on the podcasts and the webinars this week so that you don't have to strain your eyes too much with the reading. Enjoy!

Using Structured Logging for Production Insight
In this new DevOps Lab video on Channel 9, Damian Brady is joined by Nick Blumhardt to discuss structured logging and discovery. Structured logging is important for understanding your code in production, and Nick talks about how to structure your logging to make discovery much easier.

VSTS & Compiled Azure Functions - How to Set Up Your Basic CI/CD Pipeline
When you're building compiled Azure Functions - for example, developing them in C# - you need a proper CI/CD pipeline. Karim Vaes shows you how to set up your build and release pipeline to compile your C# and deploy the results to Azure.

Creating Cloud Connected Mobile Apps with Azure Functions and Visual Studio for Mac
Speaking of Azure Functions: James Montemagno just released a new episode of the Xamarin Show where he builds back-end logic for a mobile app in Visual Studio for Mac, without having to manage infrastructure, using Azure Functions.

.NET Rocks: The Nine Knights of Azure with Adam Cogan
The incredible .NET Rocks podcast hosts the incredible Adam Cogan to explain his "Nine Knights of Azure". These are a set of services in Azure that developers should start with - starting simple with Azure Web Apps and building up to - of course - continuous integration and deployment.

Deploy ARM template to Azure from VSTS
Azure Resource Manager (ARM) templates are the foundation of Infrastructure as Code in Azure. And of course you can right-click deploy your ARM template, but that's not proper DevOps. So Houssem Dellai shows you how to build a CI/CD pipeline for your ARM template, deploying a new template into Azure.

Using custom SonarQube rules to validate ARM templates
Once you're set up deploying your ARM template, you can take that to the next level. Since ARM templates are code, we can treat them like code, including doing some nice analysis to catch problems early. Wouter de Kort shows you how to shift left and integrate SonarQube rules for your ARM templates.

Private preview: Now access the Managed Access to Microsoft Graph Data

$
0
0

Now you can access the Managed Access to Microsoft Graph Data – Yes, you heard it correct. So you can use,

  • Managed Access to Microsoft Graph Data is designed to give administrators new controls over the Office 365 data they provide to application developers who forge insights with that data.
  • It include scenarios for Enterprises as well as ISVs
  • Managed Access to Graph in Microsoft Azure provides new management and control tools for developing applications that connect to the Microsoft Graph within the Microsoft Azure environment.

So you’re interested, but how to get it? Developers interested in creating applications with managed access to Microsoft Graph data can apply to participate in our limited public preview as described in Private Preview Smile

Hope this helps.

Azure na fakturu místo kreditky

$
0
0

V průběhu prázdnin jsem zjistil, jak málo se ví o možnosti průběžných, PAYG (Pay As You Go) plateb za Azure služby formou běžné faktury místo standardně používané kreditní karty.

Na úvod jen malý přehled hlavních modelů platby za Azure služby:

  • PAYG :  platba zpětně většinou formou kreditní karty. Nejrychlejší, transparentní a standardní způsob jak platit menší a střední útratu v Aure. Nic neplatím dopředu, vždy zpětně s přesně podle spotřeby. Lze také ale na fakturu, o tom je tento článek.
  • OPEN License : 100 USD "předplacenky" ... k zakoupení v běžné distribuci  Microsoft softwaru. Nakoupím si v normální distribučním kanálu Microsoft od svého tradičního dodavatele, (od kterého deset let beru SW Microsoft) dopředu vhodný počet papírků-klíčů a ty pak používám jako platidlo. Musím hlídat, kdy mi dojde kredit a včas dokoupit. Prodejci z toho mají malou marži. Nejdou takto kupovat cizí Marketplace aplikace.
  • Enterprise Agreement : Pro větší společnosti, musím být připraven podepsat dlouhodobý tříletý závazek a zaplatit dopředu) min. 12 000 EUR ročně, které propadnou pokud je nevyčerpám. Vše ostatní nad tento závazek se platí dle spotřeby. Lze udělat smlouvu jen na Azure, žádné stovky a tisíce desktop PC již není třeba. Žádné speciální cenové slevy, garance ceny že nepůjdou nahoru. Hlavně však možnost v rámci EA portálu tvořit více subskripcí pro pobočky, dceřiné firmy, projekty atd., včetně výrazně lepší granularity přístupových práv a fakturace.
  • CSP : (Cloud Solution Provider) model pro všechny společnosti, které poskytují jakékoli cloudové služby zákazníkům případně přeprodávají svoje služby včetně Azure. Platba zpětně za spotřebu. Nejdou kupovat cizí Marketplace aplikace. (brzy asi půjdou) Na tomto modelu se dosti pracuje, je však logisticky i administračně nejsložitější. Funguje i pro Office 365 a další cloudové produkty Microsoft.

 

Důvodů proč kreditní karta nevyhovuje může být několik, většinou to je práce navíc pro majitele karty i účtárnu, exspirace karet, poslední dobou se také objevují již větší Azure objemy, tudíž problémy s limity daných kredtních karet apod.

Návod jak změnit PAYG na fakturu

Přehodit PAYG Subscripci nově založenou nebo i dlouhodobě placenou kreditní kartou na fakturu je snadné. Musí se to ale  udělat pomocí supportního ticketu.
V Azure portálu vyberete v pravo nahoře velký otazník, Help + support  –>

image

Dále vyberte Billing a danou subskripci pokud jste adminem více subskripcí

image

Na následující stránce již v combo boxu Problem type můžete vybrat “Pay by Invoice
Budete muset samozřejmě napsat adresu a také Accout owner email. ( Pozor, Accout admin může být jiná osoba, než technik pracující v Azure portálu a tvořící supportní ticket.)

image

Na závěr tradiční výběr jak vás má technický support kontaktovat a finální vytvoření incidentu …

image

Zprocesování požadavku trvá většinou tak 3-5 dní.

Faktury zůstávají  podobné těm, co již chodily, nachází v sekci Subscriptions –> Invoice
(Nedivte se obrázku níže, pokud máte MSDN s uzavřeným spending limitem jako já tak fakturováno je nula, přesto je zajímavé se kouknout jaké služby by se započítávaly.)

image

Pozor na omezení:

  1. Pokud přejdete z karty na fakturu nejde to zatím vrátit zpět
  2. Na fakturu nejde platit software třetích stran z Marketplace. Zaplatíte MS Software, třeba i Visual Studio Cloud Subscription z VS Marketplace,  cizí aplikace jako Sengrid nikoli nikoli. Pokud tam takové již aplikace máte, je třeba přejít na BYOL model nebo je dát do jiné subskripce placené kreditkou.

Další informace zde: https://docs.microsoft.com/en-us/azure/billing/billing-how-to-pay-by-invoice

Online Safety and Security in a post

$
0
0



Mark Anderson is a former teacher and school leader and now award-winning author, blogger, speaker, thought-leader and trainer around all things to do with teaching, learning and effective use of technology in the classroom.

Mark firmly believes that education is a force for good and under his moniker of the ICT Evangelist he strives to demonstrate how technology is something that can help to make the big difference to the lives of learners and teachers alike.

He’s taking over as our guest editor over the summer with a series of blog posts highlighting the great things you can do with technology so that it can have the impact it so rightly should!

 



 

Never before have citizens in the UK had more rights. The introduction of the new General Data Protection Regulations (GDPR) in May this year brought about a number of changes that have had significant impact in schools. The best bit for me with it all has been the conversations around protecting children and their data that have had to happen because of it. The requirement for everyone to take more responsibility for the safeguarding of the sensitive data they hold in schools has been a positive one. I will always remember the difficulty of ensuring all colleagues in one school I worked in moving away from USB sticks and ensuring complex passcodes for devices rather than just simple 4-digit codes; some even refused to have those because of the "inconvenience" having a secure password entailed. Just like it is our professional obligation as teachers to safeguard our learners IRL (in real life!) so it is our responsibility to ensure that we take care with their data in their digital lives too, when it relates to our professional work with them in 'loco parentis'.

 

 

The deadline for GDPR may have passed but schools are still coming to terms with the changes. Just last night I read on Facebook about a school facing a Subject Access Request (SAR) from a parent. The ensuring conversation talked about the difficulty and time such a thing will take. There are lots of changes and it's difficult to know exactly what to do and how to do it.

It is recognised that when organising trips out into the world outside of school risk assessments are important and so how do you ensure you mitigate against risk for your learners around online safety, security and data protection? Fortunately, there is lots of great advice and software around to help you as an educator not only find out about your obligations and what you can do but also how you can safeguard your learners too.

Microsoft have a great blog titled 'GDPR: The five things teachers should do first' which is a great read with some fantastic advice. Added to that their brilliant free eBook packed with great advice, the 'GDPR for Education' book is worthy of a good read. Another great resource to check out for all schools is the DfE's Data Protection Toolkit: For Schools.

One of the key ways that schools can help to safeguard learners is through the careful management of the devices that they use. Microsoft's Intune is a device management solution that is competitively priced and gives some great features to help manage the devices in your school. Through their admin console it is possible for everyone to get groups of devices up and running very quickly. The admin portal you have access to gives options to help anyone, from a teacher in the classroom to network administrators to accomplish everyday things that you need to do with devices in classrooms.

As I know from personal experience, students can often forget their login passwords for devices and lots of time can be wasted with learners having to travel to a technician's office to get their password reset. One of my favourite features in the console is SSPR (Self-Service Password Reset) which is something that can be done by a teacher in the classroom. This one little efficiency can help keep students from getting off-track while using their devices and lets you as a teacher concentrate on the important part of the job; your teaching and their learning.

Other features such as SSO (Single Sign On) for apps also means that learners will be more efficient in their logins to the crucial software you will want them to use. It has the additional benefit of ensuring that once authentication has taken place through logging in, through the SSO you can rest assured that their use of the software will be safe and secure.

 You can learn more about Microsoft Intune by visiting the site for it here.

 


Follow Mark Anderson on social now! 

Twitter > @ICTEvangelist

Instagram > @ICTEvangelist

Facebook > /theictevangelist

LinkedIn > /themarkanderson

Blog > ictevangelist.com



Smart Solutions 7: Predictive analysis with Time Series, and intro to R for C/AL developers

$
0
0

Predicting the future

Time Series is a topic on its own in machine learning, as it is one of the cleanest examples of predicting the future. All you need is a dataset that contains a date and a number. Time Series then uses this to predicting values for future periods.

In Dynamics NAV, we already use it in Inventory Forecasting as described in the blog post Smart Solutions 4.

Take a Date and a Decimal

The default version of Dynamics has more than 300 tables that contain date and decimal fields, including all the history tables. So there is a good potential that we can turn some of this data into Time Series to use for a machine learning algorithm for things like these:

  • Risk Assessment
  • Forecasting
  • Budgetting
  • Predictive analysis
  • and so on

Apply R

In this post we will pull some data out of Dynamics NAV, then run R script on it to see what we get. The idea is to get a look at your Dynamics NAV data in a new tool that is designed for data analysis. So in this post we will spend most of our time in R.

Environments

In this example we use RStudio, downloaded from here: https://www.rstudio.com/. There are many other environments you can use to run R, so pick your own favourite. And, if you prefer, use Python instead of R (but the code sample below is all R).

Get some data

Attached is a codeunit which will generate a bit of data. It will insert a new item, LVASE "Lyngby Vase", and some entries for it. This data will not be business valid as it has not been posted, so don't try to use it for any other purposes, and only run this codeunit in a demo company!

Once the codeunit has been run to insert data, use the same codeunit to dump the data to c:TempRData.csv. Or skip the Dynamics NAV steps and just use the dataset in the RData.csv file in the attached ZIP: SmartSolutions7

  1. Start R Studio or your preferred R Editor.
  2. Load the data:
    dataset1 <- read.csv2("C:\Temp\RData.csv",header=FALSE,sep=";")

    read.csv is designed for US formats. To get data in the European formats, create the relevant CSV file, and adjust the parameters to match your data format. Check that it looks structured by returning just the top rows:

    head(dataset1)

  3. Change column names to be have meaningful titles:
    colnames(dataset1) <- c("Item","Date","Quantity")
  4. format "Date" so that R recognises it as a date field (adjust as needed to match your format):
    dataset1$Date <- as.Date(dataset1$Date, format='%d-%m-%y')
  5. Sort the dataset by Date:
    dataset1 <- dataset1[order(dataset1$Date),]

Predict the future

Now with the data cleaned and prepared, run a model to predict future periods. Here, we will use "Autoregressive Integrated Moving Average models", abbreviated to ARIMA. Online there will be lots of documentation and courses just in this model. This is how to run it:

  1. Load it into R:
    library(forecast)

    If you use RStudio then you may need to also go to "Tools" -> "Install packages" and type in "forecast" and install it here first.

  2. Run an ARIMA forecast model on your data and copy your forecast into a new dataset:
    ar <- modelArima(dataset1[,3],12,35)

    The parameters here are, apart from your dataset (selecting just column 3), the number of periods you want to forecast, confidence level.

  3. Look at your new forecast:
    ar
  4. Visualize it:
    plot(ar$mean)

Or why not use TBATS method (Exponential smoothing state space model with Box-Cox transformation, ARMA errors, Trend and Seasonal components). That's a model which takes seasonality better into consideration. Read more about it here:
https://www.rdocumentation.org/packages/forecast/versions/8.4/topics/tbats
https://appsource.microsoft.com/en-us/product/power-bi-visuals/WA104381326

The good thing is that a lot of the hard work has been done for us already, and made available with a simple R command or two. So continue your R project with a few more lines:

TBatResult = tbats(dataset1[,3])
TBatResult
forecast(TBatResult)
plot(TBatResult)
plot(forecast(TBatResult))

If you enable "Inventory and Sales Forecasting" in Dynamics NAV as described in the link above, then hopefully you will see similar predictions in Dynamics NAV. But (also following the link above) looking at the R code that Dynamics NAV runs, by now you may get some ideas of what the R script does. Of course it does much more than shown here, including some further data-cleaning (assign missing values) and trying out different prediction models to find the best results.

Next steps

Hopefully this post shows a simple way to get your Dynamics NAV data into another world: The world of Data Science. By bringing it over here you open up for an enormous pool of resources, prediction models, chart capabilities, and much more. And by following the "Smart Solutions" series here on this blog, you will see how to integrate R models back into your NAV as part of a business solution.

 


残暑お見舞い申し上げます! マイクロソフトの夏もアツかった! – DevWire (2018/8/27)

$
0
0
TwitterTwitter でつぶやく  FacebookFacebook でシェアする  LinkedInLinkedIn でシェアする
Index
Hot Topics
やっぱり、IoT なんだな。と確信した Microsoft Inspire 2018
マイクロソフトは IoT をシンプルに
【早期申し込み割引受付中! 】 Microsoft Tech Summit 2018 < 11/5-7 開催 >
無限のビジネス チャンスを IoT で見つけてください! 今すぐ登録! IoT in Action ウェビナー シリーズ!
DevWire のバック ナンバーをご紹介
Windows Embedded/IoT 販売代理店 耳より情報
Column
オープンソースを活用した写真の三次元点群化 (第二回)
ほっとひと息
夏といえば
Hot Topics
やっぱり、IoT なんだな。と確信した Microsoft Inspire 2018
今年の夏は猛暑を超えて酷暑と言われていますが、皆様いかがお過ごしでしょうか。体調は崩されておりませんか? 新聞で読んだのですが、セミも熱中症にかかって寿命を迎える前に・・・というケースが多発しているようです。私の苦手な蚊は 35度を超えると飛ばなくなるのだとか。日本で一番暑いと言われている埼玉県熊谷市では 40度を超える日もあったようですが、マイクロソフトのパートナーカンファレンスが開催された 7 月のラスベガスは、40度はあたり前・・・。ホテルの温度計は 45度を表示していることもありました。でも、不思議。暑さは日本ほど感じないのですよね。湿度が圧倒的に低いからだとは思いますが、日本の暑さはスチームサウナ、ラスベガスはドライサウナという感じでしょうか。そんな中、マイクロソフト社員とパートナーの方々合わせて 18,000 人、132 ヶ国から参加者を迎えた Microsoft Inspire が、今年も盛大に開催されました。過去最高の参加者記録だそうです。
コアノートでは、世界中のパートナーが築きあげる無限のビジネスチャンスとして、クラウド、AI、複合現実、IoT で実現するデジタル変革とモダンワークプレースに触れました。毎年、Microsoft Inspire のコアノートは楽しみに聞いているのですが、年々 IoT に触れる時間が長くなっている気がします。今年の 4 月に「マイクロソフトは今後 4年間で IoT へ 50 億ドルを投資」というニュースもありましたし、当然と言えば当然なのかもしれません。昨年から変わったことと言えば IoT にエッジのソリューションが増えてきたことです。3 日目のマイクロソフト CEO Satya Nadella のセッションでも「ユビキタスコンピューティング」を語る際に多くのエッジソリューションを紹介しました。
パートナーを無くしてはマイクロソフトのビジネスは成り立たない。3 日間を通してマイクロソフトのエグゼクティブから繰り返し聞いた言葉ですが、IoT においては、パートナーどうしの協業も重要ですので、このイベントはさまざまな企業に出会える場としてたいへん有効であると言えるでしょう。今年、参加されなかった方はぜひ、来年、参加してみませんか?
鬼に笑われそうですが、来年の登録はすでに始まっています。今なら登録費用も割引価格でお得です!
Microsoft Inspire 2019 登録サイト:https://inspire.eventcore.com/auth/login
今年のセッションを聞きたかった。という方は、多くのセッションをオンデマンドでみることが可能です。以下の URL からどうぞ。
https://partner.microsoft.com/ja-jp/inspire/sessions-and-speakers
セッションがたくさんあって探せない・・・上記 URL からでもフィルター機能があるので簡単に探すことはできますが、IoT のセッションをリストしてみました。
Session Type Session Title Session Speakers
Panel
(IOT01p)
Lead the way in the IoT value chain
and build next generation IoT applications
Chafia Aouissi, Christian Morrin (Genetec),
Sam Vanhoutte (Codit), Emmauelle Camus (PTC) ,
Cyril Hommel (Energisme)
General
(IoT02)
Transform your business with Microsoft IoT Rodney Clark, Sam George and Kor Baydurcan (Crestron)
Breakout
(IoT03)
Microsoft Azure Sphere:
Securing the intelligent edge
Galen Hunt, Danielle Damasius, Josh Nash
Theater
(IoT04t)
Top tips for selling IoT into your customers Allison Saltzer
Breakout
(IoT05)
Thriving in an evolving IoT partner landscape Alvin Lim, Rodney Clark, Cameron Carr, Nicole Denil
Breakout
(IoT06)
Accelerate IoT growth through business model transformation Andrew Smith
Workshop
(IoT07w)
Microsoft Azure Sphere Ideation Workshop:br>Business Opportunities at the Intelligent Edge Galen Hunt, Cameron Carr, Peter Hoffmeister
Panel
(IoT08p)
IoT, Data, and AI sales success
in the new Microsoft partner ecosystem
Allison Saltzer, Diana Philips, Paul Ledbetter,
Chris Palmer (PCL), Philip Morris (Mariner) ,
Sandeep Sinha (Mobiliya)
Breakout
(IoT09)
Windows IoT powers the intelligent edge Jag Veerappan, Dan Harman, Shilpa Dabke
Breakout
(IoT10)
Bring intelligent edge to life in your IoT solutions Manash Goswami, Chris Segura, Emmanuel Bertrand
Breakout
(IoT11)
Make IoT more nimble for your customers
with a SaaS offering
Peter Provost, Sunil Tahilramani,
John Rouse and Uriel Kluk (Mesh Systems)
Panel
(IoT12p)
Bring your solution to market
with IoT solution aggregators
Nicole Denil
Workshop
(IoT13w)
IoT as a catalyst of digital transformation:
Will your business thrive or be left behind?
Andrew Smith, Bill O'Brian, Morgan Riley,
Noam King, Patrick Ward
Theater
(IoT14t)
IoT transforming the healthcare industry Sally Frank, Hameed Mohammed
Breakout
(IoT15)
Pilot to production with IoT solution accelerators Cory Newton-Smith, Francisco Javier Martinez Borreguero,
Hector Garcia Tellado, Javier Garcia Puga, (Telefónica)
Theater
(IoT16t)
IoT transforming the manufacturing industry Colin Masson, Hameed Mohammed
Breakout
(IoT17)
Increase your pipeline
and revenue with Microsoft IoT programs
Ranga Vadlamudi, Cameron Carr, Analisa Roberts
Theater
(IoT18t)
IoT transforming smart infrastructure Diana Phillips, Hameed Mohammed
Theater
(IoT19t)
IoT transforming the retail industry Shubham Kumar Chaudhary, Hameed Mohammed
Workshop
(IoT20w)
IOT20w - Matchmaking workshop: Connect
with new IoT partners
Session Type: Workshop
Tom O'Reilly
来年も Microsoft Inspire は、ラスベガスで開催されます。ぜひ、ライブでセッションをご覧いただき、IoT ビジネスを他社との協業で拡大すべく世界中のいろいろな企業の方々とお会いしてみてください!
マイクロソフトは IoT をシンプルに!
現在、マイクロソフトが会社として「インテリジェントクラウド、インテリジェントエッジ」というコンセプトを掲げていることからもわかるとおり、今 IoT の領域に非常に力を入れています。2018 年 4 月には、今後 4年間で IoT 領域に 50 億ドルの投資をしていくことも発表しました。
今や世界中で数多くの企業が Azure IoT を活用してビジネスを変革している事例が出てきていますが、そんな中で、より多くの企業が (大きな会社も小さな会社も、IT が得意な会社もそうでない会社も・・・) IoT を活用して頂けるよう、マイクロソフトは「IoT をシンプルに」することを目指しています。
そんなシンプルな IoT ソリューションの一部を図に並べてみました。
そのキーとなるものの一つが Azure IoT Solution Accelerators です。こちらは構成済みの PaaS ソリューションになっています。ご存知のとおり、IoT を活用したサービスを構築する場合、Azure の PaaS を組み合わせてひとつのサービスを構成することで、ゼロから開発するよりも迅速に高品質なサービスが簡単に作ることができます。さらに、この「PaaS を組み合わせる」という部分さえもマイクロソフト側で組み合わせたものをテンプレートとして提供しています。これが Azure IoT Solution Accelerators です。具体的には「リモート監視」「予測メンテナンス」「コネクテッドファクトリ」の 3 つのシナリオでテンプレートを用意しています。これをベースにしながら、カスタマイズして使うこともできます。
詳細:https://azure.microsoft.com/ja-jp/features/iot-accelerators/
もうひとつが Azure IoT Central です。こちらはマイクロソフトが SaaS 型で提供している IoT ソリューションですので、ユーザー様側での開発は一切不要。PaaS サービス一つ一つを勉強する必要もなく、デバイス登録などの設定を行うだけで簡単に IoT デバイスのリモート監視などが実現できます。
詳細:https://azure.microsoft.com/ja-jp/services/iot-central/
Azure Sphere や Azure IoT Edge は最近 DevWire でもご紹介しましたが、どちらも IoT (モノのインターネット) で言う「モノ」側のソリューションとして非常に重要であり、かつ Azure IoT ならではの強みですので、ぜひバックナンバーも御覧ください。
その他の PaaS ソリューションも含めて、IoT はどんな企業でもそれを活用して、ビジネストランスフォーメーションを実現する可能性を持っています。日本の中小企業でも IoT を活用した事例がたくさんでてきています。久野金属工業様も金属のプレス加工業務の中で IoT を活用し、生産性向上に役立てています。(こちらではマイクロリンク様が Azure IoT を活用して提供されている「IoT GO」が導入されています)
https://customers.microsoft.com/ja-jp/story/kunokin-manufacturing-azure-iot-edge-jp-japan
「シンプルな IoT」によって、日本中の企業が IoT を活用して業務改善、ビジネス変革が実現できるよう、今後もマイクロソフトは活動していきますので、ぜひご注目ください。
【早期申し込み割引受付中! 】 Microsoft Tech Summit 2018 < 11/5-7 開催>
企業や組織の IT 導入運用にかかわるエンジニアおよび意思決定を行う皆様を対象に開催する、有料のエンタープライズ技術カンファレンスです。クラウド活用をはじめとして、AI、Mixed Reality といった、今後ビジネスにおいて必要とされる注目のテクノロジまで。米国オーランドで開催される Microsoft Ignite (9/24-28) の内容を凝縮した 100 以上のセッションを通して、最新のテクノロジと IT ソリューションの動向をご紹介します。
今ならお得な早期申し込み割引価格で参加受付中です。お申し込みはどうぞお早目に。
https://www.microsoft.com/ja-jp/events/techsummit/2018/
無限のビジネス チャンスを IoT で見つけてください! 今すぐ登録! IoT in Action ウェビナー シリーズ!
今年の 1 月に開催したマイクロソフト主催の IoT イベント「IoT in Action」は、イベントだけではありません! 気軽に参加できるウェビナーを実施しています。詳しくは公式サイトまで→ Microsoft IoT in Action ウェビナー シリーズ
小売業、製造業、医療業界の専門家やインフルエンサーから IoT がもたらすデジタル変革の最新情報を紹介する 60 分のウェビナーを開催しています。1 月のイベントもそうでしたが、このウェビナー シリーズも日本だけではなく全世界に向けて実施しています。日本向けのセッションは日本語訳がありますので、お気軽にご参加を! IoT システムや IoT ソリューションを構想するうえでの "あなたの想像力をくすぐる" こと間違いなし?!来年の 6 月までの予定を一挙公開!! それぞれの詳細情報は随時公開していきます。
詳しくは公式サイトまで→ Microsoft IoT in Action ウェビナー シリーズ
2018 年 9 月 12 日 Azure Sphere Part 1
2018 年 9 月 19 日 Azure Sphere Part 2
2018 年 11 月 29 日 Smart Building
2018 年 12 月 11 日 (Technical) Bootcamp Day 1
2018 年 12 月 12 日 (Technical) Bootcamp Day 2
2019 年 1 月 8 日 Retail + Azure Sphere
2019 年 2 月 20 日 Health
2019 年 3 月 28 日 Manufacturing + Azure Sphere
2019 年 4 月 25 日 Security Surveillance
2019 年 5 月 23 日 Smart City
2019 年 6 月 12 日 (Technical) Bootcamp Day 1
2019 年 6 月 13 日 (Technical) Bootcamp Day 2
スケジュールは、News Letter 配信時のものになります。変さらになる場合がございます。ご了承ください。
DevWire のバックナンバーをご紹介
タイトルタイトルバック ナンバー とっても役に立つ、みんな大好き DevWire のバック ナンバーです。

DevWire バック ナンバー サイトはこちら

Windows Embedded/IoT 販売代理店 耳より情報
「東京エレクトロンデバイス主催イベント情報」
・セミナー: 今さら聞けない! Microsoft Azure ビジネスのポイントをイチから解説
9 月 5 日 (水) 日本マイクロソフト関西支店 https://omniattend.com/seminar/ted-iot/seminar180905 社外サイトへ
9 月 6 日 (木) 日本マイクロソフト九州支店 https://omniattend.com/seminar/ted-iot/seminar180906 社外サイトへ
・最新のセミナー、イベント情報はこちら
Windows 10 IoT 関連  https://esg.teldevice.co.jp/iot/windows10/event/ 社外サイトへ
Microsoft Azure 関連  https://esg.teldevice.co.jp/iot/azure/event/ 社外サイトへ「菱洋エレクトロ株式会社主催セミナー情報」
マイクロソフト Windows 10 IoT トレーニング/セミナーをご好評につき継続開催しております。
技術的な内容と Hands-On を含んだコースと、製品概要や最新情報を紹介する 2 コースをご用意しており、ニーズに応じてご選択いただけます。ぜひこの機会に、無償トレーニングにご参加ください。
https://www.ryoyo.co.jp/info/seminar/3411/ 社外サイトへ「開発ツール トレーニング (無償/半日コース) 」
概要から操作までの知識と技術が、無償で習得できるトレーニングです。
――――――――――――――――――――――――――――――――――
■ Windows 10 IoT Enterprise 概要と OS イメージ作成 【レクチャと Hands-on 】
・2018 年 9 月 14 日 (金) 14:00 ~ 17:00
・2018 年 9 月 21 日 (金) 14:00 ~ 17:00
・2018 年 10 月 12 日 (金) 14:00 ~ 17:00
・2018 年 10 月 26 日 (金) 14:00 ~ 17:00
・2018 年 11 月 22 日 (木) 14:00 ~ 17:00
・2018 年 11 月 30 日 (金) 14:00 ~ 17:00
――――――――――――――――――――――――――――――――――
■ Windows 10 IoT Update 説明会 【レクチャのみ】
・2018 年 9 月 7 日 (金) 15:00 ~ 17:00
・2018 年 10 月 5 日 (金) 15:00 ~ 17:00
・2018 年 11 月 9 日 (金) 15:00 ~ 17:00
――――――――――――――――――――――――――――――――――
各社とも多くのセミナー・トレーニングを開催しております。ぜひご活用ください。

●アヴネット株式会社 トレーニング 社外サイトへ

●岡谷エレクトロニクス株式会社 セミナー/トレーニング情報 社外サイトへ

●東京エレクトロン デバイス株式会社
Windows 10 IoT 関連 社外サイトへ
Microsoft Azure 関連 社外サイトへ

●菱洋エレクトロ株式会社 イベント・セミナー情報 社外サイトへ

Column
オープンソースを活用した写真の三次元点群化 (第二回)NEC ソリューションイノベータ 山下 喜宏
6 月号に引き続き、「オープンソースを活用した写真の三次元点群化」について説明します。今回は、前回ビルドしたモジュールを使って、実際に 3Dデータを生成してみます。実験に使用するフォルダー構成例は以下のとおりです。

● C: GitOpenMVGbuild
前回ビルドした OpenMVG のプロジェクトがあるフォルダー
● C: SfmTest
テスト用環境
● C: SfmTestimages
解析対象の写真をここに置きます。
● C: SfMTestmatches
特徴点およびマッチング結果を出力するためのフォルダーを作成します。
● C: SfmTestreconstruction_sequential
3Dデータ出力先フォルダーを作成します。

解析対象の写真は以下のように何か 3Dモデル化したいものをなるべく少しずつずらして同じ場所が複数枚の写真に写る (オーバーラップと言います) ように撮影します。このオーバーラップの目安は連続した 2 枚の写真の 80% 程度が同じ場所となるようにします。今回は、PhotoScan を販売している Agisoft 社がサンプルとして提供しているページにある写真を使ってみたいと思います。
http://www.agisoft.com/downloads/sample-data/ 社外サイトへ のページの Building をダウンロードして、JPEG ファイルだけを上記で作成した images フォルダーにコピーします。

以下ファイルを準備します。

● C: SfmTestsensor_width_camera_database.txt
OpenMVG の srcopenMVGexifsensor_width_databasesensor_width_camera_database.txt ファイルです。

準備はこれで完了です。それでは実際に解析を実行します。DOS プロンプトを開いて、C: SfmTest フォルダーに移動します。

まず最初に openMVG_main_SfMInit_ImageListing を実行します。私の環境では VisualStudio 2017 の 64 ビット環境でビルドしたので、実行モジュールは C: GitOpenMVGbuildWindows-AMD64-Release に配置されているので、下記のようなパスになっています。それぞれの環境に応じて適切な実行モジュールへのパスを設定してください。

C:
GitOpenMVGbuildWindows-AMD64-ReleaseopenMVG_main_SfMInit_ImageListing.exe -c 4 -i C: SfmTestimages -d C: SfmTestsensor_width_camera_database.txt -o C: SfmTestmatches

以下のようなメッセージが表示されます。カメラ情報と画像ファイルのリストアップが実施されます。
You called:
テキスト
C:
GitopenMVGbuildWindows-AMD64-ReleaseReleaseopenMVG_main_SfMInit_ImageListing
--imageDirectory C: SfMTestimages
--sensorWidthDatabase C: SfMTestsensor_width_camera_database.txt
--outputDirectory C: SfMTestmatches
--focal -1
--intrinsics
--camera_model 4
--group_camera_model 1- Image listing -
0% 10 20 30 40 50 60 70 80 90 100%
|----|----|----|----|----|----|----|----|----|----|
***************************************************SfMInit_ImageListing report:
listed #File (s) : 50
usable #File (s) listed in sfm_data: 50
usable #Intrinsic (s) listed in sfm_data: 1

ここで、自分のカメラで撮影した写真を使った際、以下のようなエラーが出た場合、sensor_width_camera_database.txt ファイルに解析対象の写真を撮影したカメラのセンササイズを追記する必要があります。
Please consider add your camera model and sensor width in the database.
DSC05138 "model" DSC-RX100M2 "doesn't exist in the database

その場合、撮影したカメラ の CCD センサーの横幅 (mm) を調べておく必要があります。
sensor_width_camera_database.txt に対しては、以下のように表示されたエラーにカメラ名が書かれているので、その名称とセンササイズをセミコロン区切りで定義します。たとえば、SONY の DSC-RX100M2 が撮影したカメラだと、エラーには "DSC-RX100M2" と表示されています。SONY ホームページにセンサータイプ: 1.0 型 (13.2 mm x 8.8mm) ExmorR CMOS センサーと書かれていますので、センサー横幅が 13.2 mm とわかります。そこで、sensor_width_camera_database.txt には以下のように定義を追記します。
sensor_width_camera_database.txt を変更後、openMVG_main_SfMInit_ImageListing を再実行します。
DSC-RX100M2; 13.2

openMVG_main_SfMInit_ImageListing が無事完了すると、次に openMVG_main_ComputeFeatures を実行します。
C:
GitOpenMVGbuildWindows-AMD64-ReleaseopenMVG_main_ComputeFeatures.exe -i C: SfmTestmatchessfm_data.json -o C: SfmTestmatches

特徴点の抽出がされ、以下のようなメッセージが表示されます。
You called:
C:
GitopenMVGbuildWindows-AMD64-ReleaseReleaseopenMVG_main_ComputeFeatures
--input_file C: SfMTestmatches/sfm_data.json
--outdir C: SfMTestmatches
--describerMethod SIFT
--upright 0
--describerPreset NORMAL
--force 0
--numThreads 0- EXTRACT FEATURES -
0% 10 20 30 40 50 60 70 80 90 100%
|----|----|----|----|----|----|----|----|----|----|
***************************************************Task done in (s) : 235

そして次が openMVG_main_computeMatches です。
C:
GitOpenMVGbuildWindows-AMD64-ReleaseopenMVG_main_computeMatches.exe -i C: SfmTestmatchessfm_data.json -o C: SfmTestmatches

一致する特徴点の探索が実行されます。
You called:
C:
GitopenMVGbuildWindows-AMD64-ReleaseReleaseopenMVG_main_ComputeMatches
--input_file C: SfMTestmatches/sfm_data.json
--out_dir C: SfMTestmatches
Optional parameters:
--force 0
--ratio 0.8
--geometric_model f
--video_mode_matching -1
--pair_list
--nearest_matching_method AUTO
--guided_matching 0
--cache_size unlimited- Regions Loading -
0% 10 20 30 40 50 60 70 80 90 100%
|----|----|----|----|----|----|----|----|----|----|
***************************************************- PUTATIVE MATCHES -
Use: exhaustive pairwise matching
Using FAST_CASCADE_HASHING_L2 matcher
Using the OPENMP thread interface- Matching -
0% 10 20 30 40 50 60 70 80 90 100%
|----|----|----|----|----|----|----|----|----|----|
***************************************************
Task (Regions Matching) done in (s) : 65- Geometric filtering -
0% 10 20 30 40 50 60 70 80 90 100%
|----|----|----|----|----|----|----|----|----|----|
***************************************************
Task done in (s) : 17Export Adjacency Matrix of the pairwise's geometric matches

最後が openMVG_main_IncrementalSfM です。
C:
GitOpenMVGbuildWindows-AMD64-ReleaseopenMVG_main_IncrementalSfM.exe -c 4 -i C: SfmTestmatchessfm_data.json -m C: SfmTestmatches -o C: SfmTestreconstruction_sequential

3Dモデル化とバンドル調整です。
Sequential/Incremental reconstruction
Perform incremental SfM (Initial Pair Essential + Resection) .- Features Loading -
0% 10 20 30 40 50 60 70 80 90 100%
|----|----|----|----|----|----|----|----|----|----|
***************************************************
. . . . .

以下のように画像1枚づつ解析して点群データに追加する処理が延々と繰り返されます。
-- Robust Resection of view: 1
nfa=-378.283 inliers=217/323 precisionNormalized=0.0017019 precision=120.132 (iter=0, sample=156,169,76,188,19,252, )
nfa=-516.009 inliers=244/323 precisionNormalized=0.000898744 precision=87.299 (iter=2, sample=98,266,292,42,67,48, )
nfa=-636.143 inliers=263/323 precisionNormalized=0.00051917 precision=66.3508 (iter=2, sample=98,266,292,42,67,48, )
nfa=-703.542 inliers=254/323 precisionNormalized=0.000209317 precision=42.1303 (iter=24, sample=109,163,27,309,202,257, )
nfa=-709.799 inliers=243/323 precisionNormalized=0.0001327 precision=33.5449 (iter=25, sample=198,312,229,262,14,119, )
nfa=-845.223 inliers=254/323 precisionNormalized=5.60833e-05 precision=21.8076 (iter=50, sample=61,162,316,315,231,85, )-------------------------------
-- Robust Resection
-- Resection status: 1
-- #Points used for Resection: 323
-- #Points validated by robust Resection: 254
-- Threshold: 21.8076
-------------------------------Bundle Adjustment statistics (approximated RMSE) :
#views: 1
#poses: 1
#intrinsics: 1
#tracks: 254
#residuals: 508
Initial RMSE: 4.14587
Final RMSE: 1.88605
Time (s) : 0.00118359

最後に以下のようなメッセージが表示されれば解析は無事終了です。
Histogram of residuals:
0 | 42203
0.396 | 12307
0.792 | 5168
1.19 | 2474
1.58 | 1189
1.98 | 634
2.38 | 333
2.77 | 177
3.17 | 85
3.56 | 33
3.96
Total Ac-Sfm took (s) : 18.0752
. . . Generating SfM_Report.html
. . . Export SfM_Data to disk.

最後に点群に色を付けて完了です。
C:
GitOpenMVGbuildWindows-AMD64-ReleaseopenMVG_main_ComputeSfM_DataColor.exe -i C: SfmTestreconstruction_sequentialsfm_data.bin -o C: SfmTestreconstruction_sequentialcolorized.ply

C: SfmTestreconstruction_sequentialcolorized.ply ファイルを MeshLab などのツールで開くと出来上がった 3D点群データを確認できます。
ほっとひと息
「夏といえば」DevWire 編集部 竹内建人
8 月といえば、そう! 高校野球の季節ですね!
私は元高校球児だったので、高校野球は特に好きで、よく地方大会から観戦しています。
高校野球は普段、野球を観ない学生さんが、応援のために球場に足を運ぶ貴重な機会だと思います。
そこで、もっと『一体感』を楽しめるしくみなんてものはいかがでしょうか。
歓声や声援を数値化して応援合戦をしてみたり、いすにセンサーをつけて思わず立ち上がった人の数を計測してみたりと自分の動きと球場全体の動きの関係性が見えたらおもしろいかもしれませんね。
高校球児と数年前の自分を重ね合わせつつ、高校野球がさらに盛り上がること願う今日この頃です。
ページのトップに戻る
Windows Embedded DevWire に関するお問い合わせはこちら:
kkoedadmin@microsoft.com

How do I force the Task Manager window closed whenever it opens?

$
0
0


A customer wanted to close (or at least hide) the Task Manager
window whenever it opens.
They did so by setting a timer and periodically running this code:



void FindAndCloseTaskManager()
{
HWND taskManagerWindow = FindWindow(nullptr, "Windows Task Manager");
if (taskManagerWindow) {
PostMessage(taskManagerWindow, WM_CLOSE, 0, 0);
}
}


This code worked on Windows 7,
but stopped working on Windows 8.



Well, yeah, because you're searching for a window by name.
The name of the Task Manager window in Windows 7 was
Windows Task Manager:


SRC="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/BlogFileStorage/blogs_technet/virtualization/WindowsLiveWriter/DynamicMemoryComingtoHyperVPart3_A923/Win%207%20Task%20Manager%20_2_thumb_bcd1746d-4a8f-4e5b-b83d-19d89dfbff6f.png">


On the other hand, in Windows 8, the window was named
simply
Task Manager.


SRC="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/54/33/metablogapi/1488.clip_image004_thumb_6633EC51.jpg">


And of course, those names apply only to English.
If the user's UI language is German, the name will be
Task-Manager with a hyphen.



Whether a user can or cannot run Task Manager
is an administrative decision,
not an application decision.
Use the "Remove Task Manager" group policy.



Bonus chatter:
Note that if this customer had their way,
the name of Task Manager would be a compatibility
constraint.



Bonus bonus chatter:
Don't think you can rely on the window class name either.

That is also subject to change
.

EWS Subscription Error: One or more subscriptions in the request reside on another Client Access server. GetStreamingEvents won’t proxy in the event of a batch request.

$
0
0

So, you got this error: One or more subscriptions in the request reside on another Client Access server. GetStreamingEvents won't proxy in the event of a batch request. Don't panic, its fixable with some needed code changes.

Part of the process of subscribing for EWS Streaming Notifications against Exchange 2013 and later involves gathering the GroupingInformation and EWS URL for each mailbox then subscribing in batches of up to 200 mailboxes per subscription where the URL and GroupingInformation match. Do AutoDiscvoer against each mailbox in order to get the GroupingInformation setting. This is the AD site of the mailbox. Batch subscriptions will cause the servers involved for the batch at the site rally their calls through the server of the anchor mailbox at the same site – this increases performance but does require that all the servers be at the same site. All mailboxes in a batch need to be the same site.

GroupingInformation can and does change. Through the course of a day that Exchange Online may failover a mailbox to a different site and this would cause an error an you will need to unsubscribe, rebatch and then resubscribe for the new batches. The same issue can happen with on-premise severs due to fail overs. A mailbox move to another site can also cause this error, however a mailbox move is not as common as a fail over for Exchange Online. GroupingInformation is in the Discover Service for Exchange 2013 and later and not in prior versions. To know which sites the mailboxes are in for prior versions you will need to wither use Exchange PowerShell or keep a table of their locations.

Old versions of the EWS Managed API did not support pulling GroupingInformation from the Discovery Service. The data for this setting is needed in order to resolve this issue. So, download and build the EWS Managed API from GitHub – it will have current fixes. At this time the downloadable version from GitHub and NuGet are old builds.

EWS Managed API... open source?  YES!  It's now Open Source!!!
http://blogs.msdn.com/b/webdav_101/archive/2014/09/29/ews-managed-api-open-source-yes-it-s-now-open-source.aspx

The following articles cover this topic:

Maintain affinity between a group of subscriptions and the Mailbox server in Exchange
https://docs.microsoft.com/en-us/exchange/client-developer/exchange-web-services/how-to-maintain-affinity-between-group-of-subscriptions-and-mailbox-server

EWS Streaming Notifications with Exchange 2013
https://blogs.msdn.microsoft.com/webdav_101/2015/11/17/ews-streaming-notifications-with-exchange-2013/

Changes in Managing Affinity for EWS Subscriptions…
https://blogs.msdn.microsoft.com/mstehle/2013/04/17/changes-in-managing-affinity-for-ews-subscriptions/

Handling notification-related errors in EWS in Exchange
https://docs.microsoft.com/en-us/exchange/client-developer/exchange-web-services/handling-notification-related-errors-in-ews-in-exchange

 

How to configure TLS versions in App Service and Functions apps in Azure Government

$
0
0

TLS (Transport Layer Security) protocols provide privacy and data integrity for establishing secured connections between applications. Over the period of time TLS has evolved and new versions have continued to fix vulnerabilities in older versions and also add newer capabilities. As Azure Government customers continue to optimize security of their cloud based applications and solutions, a simple setting available for App Services and Functions apps make it easy to configure Minimum TLS Version supported by the app. Not supporting older versions of TLS may be needed for security reasons and this feature makes it easier to achieve that.

Follow these steps for App Services apps-

  1. From Azure Government Portal, select App Service and go to SSL Settings.
  2. Select desired Minimum TLS Version.

For Function apps-

  1. From Azure Government Portal, select Function app and go to Platform features, and then SSL Settings.
  2. Select desired Minimum TLS Version.

Learn more at-

Raw threads and async lambdas

$
0
0

Using async methods/lambdas where they are not expected causes unexpected problems. The typical example I discuss with people is TaskFactory.StartNew() because its an easy way to create Tasks and some people reach for that instead of Task.Run(), but I recently came across some code hitting the same problem while creating threads the traditional way.

In this scenario, the code was intended to create some child threads that poll a resource. That resource would sometimes be changed and the master thread would Abort() the child threads and create new ones polling the new resource. But there was a thread leak. Sometimes threads could continue to run after they should have been aborted.

A simplified example looks like this in a console application (I’m not creating the new threads after the abort because its not relevant to the bug in the logic).

capture20180827101340802

We are simply starting two threads, waiting 1 second, and then aborting them. We assume they will stop and not output anything after the “Press ENTER” line. But notice that the two thread functions are asynchronous. What does that mean? As I’ve discussed before you can’t really make any assumptions about the internals of the async code you are calling. You can only know what you are doing yourself around the async operation. What we are doing here is “Start this asynchronous operation on another thread.” We don't really know when this method will end, or even if it will end on our thread.

So when does our thread end? Can we even abort the operation this way? Not reliably, no.

If the code happens to look like this, we can abort it.

capture20180827102020875

But that's only because there is no asynchrony actually going on. This will run synchronously on the original thread that called it. But that's pretty uncommon. More likely there is some asynchrony going on inside it like this

capture20180827102720938

In this case there is an asynchronous delay. This means that all of the iterations of the loop after 0, will happen as asynchronous continuations. Where will they run? It depends on the context. In this example, a console application, they will run on a random thread pool thread.

That means that when I try to abort the thread I created, I’m just aborting the initial thread which is handling the first portion of the method. If the application gets to the await before it gets to the abort, the continuation will already scheduled and will go on oblivious to the fact that the original thread gets aborted. I can’t abort this method using Thread.Abort() because method isn’t just one thread.

Here is what the output looks like. You can see that until the abort happens (immediately before the “Press ENTER” text) the threads are pumping out even and odd numbers. After the abort, the PrintEvenNumbers method is happily continuing its way into infinity.

capture20180827103138495

How to avoid this?

  • Stick with Tasks and avoid raw Thread code if you can help it. The threading APIs predate the Task/Async APIs by a decade. Mixing the two can result in bugs like this one unless you are extra careful. Task.Run() is your friend for spawning/managing new Tasks, and it is async lambda friendly.
  • Avoid Thread.Abort() like the plague. There are some unusual cases where it makes sense, but the vast majority of the times I see it, I consider it to be a bug. .NET provides a very clean cooperative cancellation mechanism that is simple and thread safe (the CancellationToken) which should be used instead to signal a child task to tear itself down cleanly and predictably.
  • More on why async lambdas behave this way from the .NET Framework team

The sample code above is available here

ASP.NET Core 2.2.0-preview1: Endpoint Routing

$
0
0

Endpoint Routing in 2.2

What is it?

We're making a big investment in routing starting in 2.2 to make it interoperate more seamlessly with middleware. For 2.2 this will start with us making a few changes to the routing model, and adding some minor features. In 3.0 the plan is to introduce a model where routing and middleware operate together naturally. This post will focus on the 2.2 improvements, we'll discuss 3.0 a bit further in the future.

So, without further ado, here are some changes coming to routing in 2.2.

How to use it?

The new routing features will be on by default for 2.2 applications using MVC. UseMvc and related methods with the 2.2 compatibility version will enable the new 'Endpoint Routing' feature set. Existing conventional routes (using MapRoute) or attribute routes will be mapped into the new system.

public void ConfigureServices(IServiceProvider services)
{
    ...
    
    services.AddMvc().SetCompatibilityVersion(CompatibilityVersion.Version_2_2);
}

public void Configure(IApplicationBuilder app)
{
    ....
    
    app.UseMvc();
}

If you need to specifically revert the new routing features, this can be done by setting an option. We've tried to make the new endpoint routing system as backwards compatible as is feasible. Please log issues at https://github.com/aspnet/Routing if you encounter problems.

We don't plan to provide an experience in 2.2 for using the new features without MVC - our focus for right now is to make sure we can successfully shift MVC applications to the new infrastructure.

Link Generator Service

We're introducing a new singleton service that will support generating a URL. This new service can be used from middleware, and does not require an HttpContext. For right now the set of things you can link to is limited to MVC actions, but this will expand in 3.0.

public class MyMiddleware
{
    public MyMiddleware(RequestDelegate next, LinkGenerator linkGenerator) { ... }
    
    public async Task Invoke(HttpContext httpContext)
    {
        var url = _linkGenerator.GenerateLink(new { controller = "Store",
                                                    action = "ListProducts" });
    
        httpContext.Response.ContentType = "text/plain";
        return httpContext.Response.WriteAsync($"Go to {url} to see some cool stuff.");
    }
}

This looks a lot like MVC's link generation support (IUrlHelper) for now -- but it's usable anywhere in your application. We plan to expand the set of things that are possible during 2.2.

Performance Improvements

One of the biggest reasons for us to revisit routing in 2.2 is to improve the performance of routing and MVC's action selection.

We still have more work to, but the results so far are promising:
image

This chart shows the trend of Requests per Second (RPS) of our MVC implementation of the TechEmpower plaintext benchmark. We've improved the RPS of this benchmark about 10% from 445kRPS to 515kRPS.

To test more involved scenarios, we've used the Swagger/OpenAPI files published by Azure and Github to build code-generated routing benchmarks. The Azure API benchmark has 5160 distinct HTTP endpoints, and the Github benchmark has 243. The new routing system is significantly faster at processing the route table of these real world APIs than anything we've had before. In particular MVC's features that select actions such as matching on HTTP methods and [Consumes(...)] are significantly less costly.

Improvements to link generation behavior for attribute routing

We're also using this opportunity to revisit some of the behaviors that users find confusing when using attribute routing. Razor Pages is based on MVC's attribute routing infrastructure and so many new users have become familiar with these problems lately. Inside the team, we refer to this feature as 'route value invalidation'.

Without getting into too many details, conventional routing always invalidates extra route values when linking to another action. Attribute routing didn't have this behavior in the past. This can lead to mistakes when linking to another action that uses the same route parameter names. Now both forms of routing invalidate values when linking to another action.

A conceptual understanding

The new routing system is called 'Endpoint Routing' because it represents the route table as a set of Endpoints that can be selected by the the routing system. If you've ever thought about how attribute routing might work in MVC, the above description should not be surprising. The new part is that a bunch of concerns traditionally handled by MVC have been pushed down to a very low level of the routing system. Endpoint routing now processes HTTP methods, [Consumes(...)], versioning, and other policies that used to be part of MVC's action selection process.

In contrast to this, the existing routing system models the application is a list of 'Routes' that need to be processed in order. What each route does is a black-box to the routing system - you have to run the route to see if it will match.

To make MVC's conventional routing work, we flatten the list of actions multiplied by the number of routes into a list of endpoints. This flattening allows us to process all of MVC's requirements very efficiently inside the routing system.


The list of endpoints gets compiled into a tree that's easy for us to walk efficiently. This is similar to what attribute routing does today but using a different algorithm and much lower complexity. Since routing builds a graph based on the endpoints, this means that the complexity of the tree scales very directly with your usage of features. We're confident that we can scale up this design nicely while retaining the pay-for-play characteristics.

New round-tripping route parameter syntax

We are introducing a new catch-all parameter syntax {**myparametername}. During link generation, the routing system will encode all the content in the value captured by this parameter except the forward slashes.
Note that the old parameter syntax {*myparametername} will continue to work as it did before. Examples:

  • For a route defined using the old parameter syntax : /search/{*page},
    a call to Url.Action(new { category = "admin/products" }) would generate a link /search/admin%2Fproducts (notice that the forward slash is encoded)
  • For a route defined using the new parameter syntax : /search/{**page},
    a call to Url.Action(new { category = "admin/products" }) would generate a link /search/admin/products

What is coming next?

Expect more refinement and polish on the LinkGenerator API in the next preview. We want to make sure that this new API will support a variety of scenarios for the foreseeable future.

How can you help?

There are a few areas where you can provide useful feedback during this preview. We're interested in any thoughts you have of course, these are a few specific things we'd like opinions on. The best place to provide feedback is by opening issues at https://github.com/aspnet/Routing

What are you using IRouter for? The 'Endpoint Routing' system doesn't support IRouter-based extensibility, including inheriting from Route. We want what you're using IRouter for today so we can figure out how to accomplish those things in the future.

What are you using IActionConstraint for? 'Endpoint Routing' supports IActionConstraint-based extensibility from MVC, but we're trying to find better ways to accomplish these tasks.

What are your 'most wanted' issues from Routing? We've revisited a bunch of old closed bugs and brought back a few for reconsideration. If you feel like there are missing details or bugs in routing that we should consider please let us know.

Caveats and notes

We've worked to make the new routing system backwards compatible where possible. If you run into issues we'd love for you to report them at https://github.com/aspnet/Routing.

DataTokens are not supported in 2.2.0-preview1. We plan to address this for the next preview.

By nature the new routing system does not support IRouter based extensibility.

Generating links inside MVC to conventionally routed actions that don't yet exist will fail (resulting in the empty string). This is in contrast to the current MVC behavior where linking usually succeeds even if the action being linked hasn't been defined yet.

We know that the performance of link generation will be bad in 2.2.0-preview1. We worked hard to get the API definitions in so that you could try it out, and ignored performance. Expect the performance of URL generation to improve significantly for the next preview.

Endpoint routing does not support WebApiCompatShim. You must use the 2.1 compatibility switch to continue using the compat shim.

TypeScript and Babel 7

$
0
0
Today we're excited to announce something special for Babel users.

Over a year ago, we set out to find what the biggest difficulties users were running into with TypeScript, and we found that a common theme among Babel users was that trying to get TypeScript set up was just too hard. The reasons often varied, but for a lot of developers, rewiring a build that's already working can be a daunting task.

Babel is a fantastic tool with a vibrant ecosystem that serves millions of developers by transforming the latest JavaScript features to older runtimes and browsers; but it doesn't do type-checking, which our team believes can bring that experience to another level. While TypeScript itself can do both, we wanted to make it easier to get that experience without forcing users to switch from Babel.

That's why over the past year we've collaborated with the Babel team, and today we're happy to jointly announce that Babel 7 now ships with TypeScript support!

How do I use it?

If you're already using Babel and you've never tried TypeScript, now's your chance because it's easier than ever. At a minimum, you'll need to install the TypeScript plugin.

npm install --save-dev @babel/typescript

Though you'll also probably want to get the other ECMAScript features that TypeScript supports:

npm install --save-dev @babel/preset-typescript @babel/preset-env @babel/plugin-proposal-class-properties @babel/plugin-proposal-object-rest-spread

Make sure your .babelrc has the right presets and plugins:

{
    "presets": [
        "@babel/env",
        "@babel/typescript"
    ],
    "plugins": [
        "@babel/proposal-class-properties",
        "@babel/proposal-object-rest-spread"
    ]
}

For a simple build with @babel/cli, all you need to do is run

babel ./src --out-dir lib --extensions ".ts,.tsx"

Your files should now be built and generated in the lib directory.

To add type-checking with TypeScript, create a tsconfig.json file

{
  "compilerOptions": {
    // Target latest version of ECMAScript.
    "target": "esnext",
    // Search under node_modules for non-relative imports.
    "moduleResolution": "node",
    // Process & infer types from .js files.
    "allowJs": true,
    // Don't emit; allow Babel to transform files.
    "noEmit": true,
    // Enable strictest settings like strictNullChecks & noImplicitAny.
    "strict": true,
    // Disallow features that require cross-file information for emit.
    "isolatedModules": true,
    // Import non-ES modules as default imports.
    "esModuleInterop": true
  },
  "include": [
    "src"
  ]
}

and just run

tsc

and that's it! tsc will type-check your .ts and .tsx files.

Feel free to add the --watch flag to either tool to get immediate feedback when anything changes. You can see how to set up a more complex build on this sample repository which integrates with tools like Webpack. You can also just play around with the TypeScript preset on Babel's online REPL.

What does this mean for me?

Using the TypeScript compiler is still the preferred way to build TypeScript. While Babel can take over compiling/transpiling - doing things like erasing your types and rewriting the newest ECMAScript features to work in older runtimes - it doesn't have type-checking built in, and still requires using TypeScript to accomplish that. So even if Babel builds successfully, you might need to check in with TypeScript to catch type errors. For that reason, we feel tsc and the tools around the compiler pipeline will still give the most integrated and consistent experience for most projects.

So if you're already using TypeScript, maybe this doesn't change much for you. But if you're already using Babel, or interested in the Babel ecosystem, and you want to get the benefits of TypeScript like catching typos, error checking, and the editing experiences you might've seen in the likes of Visual Studio and Visual Studio Code, this is for you!

Caveats

As we mentioned above, the first thing users should be aware of is that Babel won't perform type-checking on TypeScript code; it will only be transforming your code, and it will compile regardless of whether type errors are present. While that means Babel is free from doing things like reading .d.ts files and ensuring your types are compatible, presumably you'll want some tool to do that, and so you'll still need TypeScript. This can be done as a separate tsc --watch task in the background, or it can be part of a lint/CI step in your build. Luckily, with the right editor support, you'll be able to spot most errors before you even save.

Second, there are certain constructs that don't currently compile in Babel 7. Specifically,

  • namespaces
  • bracket style type-assertion/cast syntax regardless of when JSX is enabled (i.e. writing <Foo>x won't work even in .ts files if JSX support is turned on, but you can instead write x as Foo).
  • enums that span multiple declarations (i.e. enum merging)
  • legacy-style import/export syntax (i.e. import foo = require(...) and export = foo)

These omissions are largely based technical constraints in Babel's single-file emit architecture. We believe that most users will find this experience to be totally acceptable. To make sure that TypeScript can call out some of these omissions, you should ensure that TypeScript uses the --isolatedModules flag.

What next?

You can read up on the details from the Babel side on their release blog post. We're happy that we've had the chance to collaborate with folks on the Babel team like Henry Zhu, Andrew Levine, Logan Smyth, Daniel Tschinder, James Henry, Diogo Franco, Ivan Babak, Nicolò Ribaudo, Brian Ng, and Vladimir Kurchatkin. We even had the opportunity to speed up Babylon, Babel's parser, and helped align with James Henry's work on typescript-eslint-parser which now powers Prettier's TypeScript support. If we missed you, we're sorry but we're grateful and we appreciate all the help people collectively put in!

Our team will be contributing to future updates in the TypeScript plugin, and we look forward to bringing a great experience to all TypeScript users. Going forward, we'd love to hear your feedback about this new TypeScript support in Babel, and how we can make it even easier to use. Give us a shout on Twitter at @typescriptlang or in the comments below.

Happy hacking!


How to build a VSTS assistant – The Life and Times of a Kanban bot – Part 3

$
0
0

In the previous post (Part 2) we learned how to expand our bot functionality and be able to create work items using our voice.

Today, we will try to mark a work item as done or as "Closed" in VSTS.

This problem is split in two parts, which corresponds to the two APIs we will be using:

  1. Searching for a specific work item by title - Fetch Work Item Search Results - https://docs.microsoft.com/en-us/rest/api/vsts/search/work%20item%20search%20results/fetch%20work%20item%20search%20results?view=vsts-rest-4.1
  2. Marking it as done - Update Work Item and change the state - https://docs.microsoft.com/en-us/rest/api/vsts/wit/work%20items/update?view=vsts-rest-4.1

Taking a look at the ALM Search REST API documentation we will see that we'll have to build a request that looks like the one below:

POST https://{accountName}.almsearch.visualstudio.com/_apis/search/workitemsearchresults?api-version=4.1-preview.1

Notice that for the search functionality, we have to call the almsearch endpoint and not the usual project endpoint. (API versions may differ too, so make sure you check the link above for updates to the API documentation).

The body of the request looks like below:


{
  "searchText": "<text to search>",
  "$skip": 0,
  "$top": 1,
  "filters": {
     "System.AssignedTo": [
          "John Doe <john@contoso.com>"
    ]
  },
  "$orderBy": [
    {
      "field": "system.id",
      "sortOrder": "ASC"
    }
  ],
  "includeFacets": true
}

and you will get a JSON back with a count of the work items found - in our sample we will only going to take the first result (nobody really has identically titled work items active at the same time - Agile wizards, feel free to jump on and start a debate on this 😀 ), and just grab the system.id field. Then, after we have our work item ID returned, it means that we found it, and we will call the second API in order to update it.

The second API is the Update Work Item one, and it looks like below:

PATCH https://{accountName}.visualstudio.com/{project}/_apis/wit/workitems/{id}?api-version=4.1

with the following request body:


[
  {
    "op": "add",
    "path": "/fields/System.State",
    "value": "Closed"
  }
]

That's it. Check out the full code here: https://github.com/julianatanasoae/VSTSFunctionApp/blob/master/MyVSTSFunction/UpdateWorkItem.cs

Just like in part 2, we have to set up some training phrases in Dialogflow:

And the same as before, in the Action and parameters section:

That's pretty much it.

Let's take a look and see how it works.

This is how my work item board looks like right now:

In the Dialogflow test console, I will type "mark work item define user requirements as done" to close that work item. 

 

As you can see, it found my work item, and it marked it as done.

Let's refresh the VSTS dashboard and see what happened:

That particular work item doesn't show up anymore. If we change the view from Assigned to me to Recently completed we'll see the following:

It worked.

This is how you can mark work items as done by using the VSTS API. You can extend it and call more actions, assign tasks to someone else, assign tasks to a specific iteration (after finding a matching iteration), creating new iterations etc. Now, because this bot is configured to take an authorization header, I tailored it to only show work items that are assigned to the current user by using the System.AssignedTo parameter, as you don't want to screw up some other work items from your team members. 🙂

There are lots of improvements that can be done here, but it's shaping up as a nice prototype.

In the next post we will be talking about cross-platform stuff, as we'll shift our attention towards other assistants.

Happy Kanban-ing!

I'd love to hear your feedback on this.

Agile も DevOps も銀の弾丸なんかじゃない

$
0
0

……と、のっけから噛みつかれそうなタイトルを掲げてみたのですが;、ここ最近、立て続けて数件、「いやそれはアジャイルとか無理だろ;」的な話があって、ちょっとエントリを書いてみようかと思った次第。どんな話だったのかというと、

  • アジャイルとか DevOps やれば必ず開発生産性上がるんでしょ? → そんなわけないでしょ;。
  • これからの開発は当然アジャイルとか DevOps でしょ! → そんなわけないでしょ;。

みたいな話;。2 年ほど前に、「続・拝啓『変わらない開発現場』を嘆く皆様へ ~ ウォータフォール & アジャイル編~」というエントリを書いたのですが、その補足的な意味合いも兼ねて、少しまとめてみようと思います。正直、当たり前すぎる話なので、その道のプロな方は「ふ~ん」と読み流してください;。

[アジャイルや DevOps を活用することによる ROI 最大化の注意点]

のっけから結論を書いてしまうのですが、アジャイルや DevOps をエンプラ系プロジェクトに適用してメリットを得たい場合には、以下 2 つの点に特に注意する必要があります。

image

簡単に言えば、十把一絡げにアジャイルや DevOps を適用してもうまく行くわけがなく、これらの手法は決して銀の弾丸ではありません。しかし、なぜこれらが銀の弾丸ではないのか、またどんな条件があればアジャイルや DevOps のメリットが最大化されるのかは、意外に端的に語られていないため、軽く説明してみたいと思います。

[アジャイル開発 vs ウォータフォール型開発]

モノづくりの観点から考えると、ウォータフォールとアジャイルは、計画型/適応型のトレードオフの関係で捉えることができます。このため、それぞれ請負向き/内製向きという特性があることは、以前のエントリでも解説しました。日本の開発現場では、両者は二者択一の文面で語られることが多いのですが、日本のエンプラ系開発現場においてより良い開発を目指すためには、両者をミックスした開発プロセスのテーラリングが必要になります

image

しかし、このような説明だとなかなかしっくりこないと思いますので、ぶっちぎりの適応型アジャイル(ここでは仮に「フルアジャイル」と呼ぶことにしましょう)がどのようなものなのかを考えてみたいと思います。

[完璧(?)なアジャイル開発について]

ご存じのように、アジャイル開発の背後には、「アジャイルソフトウェア開発宣言」と「アジャイル宣言の背後にある原則」がベースラインの考え方として存在します。原典そのまま引用すると、こんな感じです。

image

しかし見ていただければわかる通り、これらは具体的に何かの(技術的)手法を定義しているわけではなく、ある意味、ソフトウェア開発の『理想像』や『思想』を語ったものに近いです。実際、アジャイルを実践する開発現場では、日々、自律的な模索と改善が続けられ、よりよい開発技法を目指して進化を続ける……これこそがアジャイルの真価ではないかと思います。

……が、ぶっちゃけこれだと煙に巻かれた気がするなんだかよくわからないのも実際のところです;。以下は完全に私の私見なのですが、実際にこれらを目指して優れたアジャイル開発を実現している現場では、特に以下の 4 つをきっちり実践しているように思います。(この辺は皆様のご意見をいただきたいところですが、私の感覚として。)

image

ちょっとだけ補足をすると、以下の通りです。(MVP アプローチは極めて重要なので後述)

  • 内製開発
    • 一般的に請負型ウォータフォール開発では、受発注関係による利害関係が生じるため、請負契約の後は、発注側は「いかに変更・修正を突っ込むか」、受注側は「いかにそれを突っぱねるか」という不毛な争いが生じます。
    • (特に大規模開発においては)請負契約は、確実に成果物責任を以て遂行させるという観点において極めて重要なものですが、一方で、関係者全員が同じ方向を向いてゴールを共有することが時として難しくなる元凶にもなり得ます。
    • 内製開発であれば関係者全員が同じ方向を向いてゴールを共有することが容易ですが、その一方で、全員がプロフェッショナルであり、オープンかつ自律的な活動・改善ができる(言い換えれば全員が大人である)ことが求められます。(大規模開発だとそれだけの数のプロフェッショナルの頭数を揃えることが困難なケースが多いです。)
  • データ駆動型開発(運用環境第一主義、Production First Mindset)
    • 例えば仕様案として A, B の 2 つがある場合、実際の開発現場では、どちらを採用すべきかは一番偉い人の鶴の一声で決まることが多いです。しかしこのような主観的な物事の決め方では不適切な決定が行われることも多く、「客観性を以て」、すなわち「データを元に」開発上の様々な判断を下すことが求められます。このような考え方を「データ駆動型開発」と呼びます。
    • データ駆動型開発を実現するために重要になるのが、「運用環境からユーザーの実際の使い方の情報を吸い上げる」ことです。このようなデータをテレメトリデータと呼び、運用環境での実際の情報を元に開発判断を下すことが望ましいです。このようなアプローチを「運用環境第一主義」と呼びます。
  • DevOps インフラ
    • データ駆動型開発や運用環境第一主義を実現するためには、A/B 両案を素早く作って素早く運用環境に配置し、運用環境からテレメトリデータを吸い上げ、それに基づいて決断を下して運用環境に反映させていく、という素早いサイクルが必要です。このために DevOps インフラが利用されます。

……とまあこの辺はよく語られるのですが、アジャイル開発の本質をよく言い当てているのが MVP アプローチです。これについて解説します。

[MVP アプローチ(Minimum Viable Product)について]

MVP アプローチとは、最終的な完成物を想定して段階的に作り上げていくのではなく、「価値」を検証できる成果物をまず小さく作り、それを元に F/B を集め、軌道修正しながら最終成果物を目指すものです。これに関しては、Henrik Kniberg 氏のこちらの blog の下図が、極めて的確に本質を言い当てているので引用します。

mvp

イラストを見れば一目瞭然だと思うのですが、アジャイルのアプローチは、上図ではなく下図のようなものです。つまり、「どこかに行くときに素早く行ける乗り物が欲しい」というお客さんに対して、

  • 上図のアプローチは、「きっと車が欲しいに違いない」と考え、最終成果物を先に想定してしまい、これを段階的(Incremental)に開発していく方法。
  • 下図のアプローチは、「本当にお客さんが欲しいものはわからない」と考えて、とりあえずキックボードを作ってみて反応を伺い、そのあと自転車を作ってみて反応を伺い、最後にはスーパーカーを作って満足させる、という方法。

です。このケースにおいては当然下図のアプローチの方がよいわけですが、その理由は、

  • 上図のアプローチは、価値検証が最後までできないため、開発のリスクが高い。(成果物の ROI が最大化されない
  • 下図のアプローチは、価値検証しながら進むため、成果物の ROI が最大化される。

というものですが、その一方で、下図のアプローチの場合は頻繁な作り直しが必要になるため、開発作業量は大きくなるという問題を抱えています(プログラミングの観点で言うのなら、無理な作り替えにより生じた技術的負債の適宜返済が必要になる)。最終成果物が最初からきっちり確定できているのであれば、上図のアプローチの方が最短経路でゴールにたどり着けます。

# 最終成果物が最初からきっちり確定できていることなんてない、と言われる方もいると思いますが、
# 例えば、サポートの切れた製品上で開発されたシステムをどうしても .NET などで再構築しなければ
# ならないような SoR 系のシステム場合には、最終成果物が概ね見えていることが多いです。
# このような案件では、上図のようなインクリメンタルなアプローチで開発した方がよいでしょう。

このことから、なぜアジャイル開発で ROI が最大化されるのか、そしてどのような開発にアジャイル開発が適しているのかに関して、以下のように整理できます。

image

現在の多くのエンプラ系のシステム開発案件は、既存資産まみれの中で開発することが多く、スクラッチでゼロから綺麗なシステムを構築するのではないケースがほとんどです。こうした条件下では、必ずしも MVP アプローチに代表されるようなアジャイル開発が最適とは限りません。そしてなにより、一定以上の規模の開発においては、頻繁な方針転換・作り直しをテキパキとこなせるだけの優れた高スキルなデベロッパーの頭数を揃えることが難しく、結果として、MVP アプローチをやろうとしてもできない場合が少なくありません。

# ぶっちゃけですが、優れた開発者を頭数揃えられれば、どんな方法だってまあまあうまくいくはず;。
# 大規模開発で戦わなければならないのは、メンバーのスキルセットの平準化と底上げなんですよ;。

もちろん、アジャイルが無理だからといってウォーターフォールでやる、というのは短絡的です。以前のエントリにも書いたように、重要なのは、ウォーターフォール型開発をベースラインに置きながらも、アジャイルの手法をうまく取り入れることによって開発生産性の改善を目指す、すなわち開発プロセスを適切にテーラリングすることです。具体的な様々なテクニックについては拙著「業務システム開発 モダナイゼーションガイド」にいろいろ書いたのですが、ここでは「ウォータフォールとアジャイルのいいとこどり」という観点で、3 つほど具体的な方法を取り上げてみたいと思います。

[アジャイル開発技法の適用対象・活用手法]

本来のアジャイル開発(Scrum 開発など)をそのまま適用できないプロジェクトでも、アジャイル開発のプラクティス(技法)を部分的に活用した生産性改善は可能です。現場でよく利用される代表的なテクニックは以下の 3 つです。

  • ① UX デザインフェーズにアジャイル開発技法を適用(アジャイルウォータフォール)
  • ② CI/CD による下流工程の作業生産性の改善(頻繁なリリース(≠ 早期のリリース))
  • ③ ボトムアップ型タスク管理を用いた予実管理と作業完了の推定(ミニアジャイル)

# 勝手に名前つけましたが、すでに業界的に標準名が決まっていたら教えてください;。

image

それぞれについて説明します。

① UX デザインフェーズにアジャイル開発技法を適用(アジャイルウォータフォール)

大規模開発を安定的に進めるためには、どこかのタイミングでいったん仕様を確定させる必要があります(=仕様のベースラインを決めて、そこからの修正については「仕様変更」として管理する)。UI/UX は試行錯誤による改善が求められるため、外部設計終了のタイミングで仕様を確定させる方法が一般的で、ここでアジャイル/ウォータフォールのアプローチを切り替える方法がよく取られます。すなわち、要件定義~外部設計までは(モックを高速に開発・提示して F/B を受けて修正する)アジャイル型で進め、外部仕様が確定した時点からはウォータフォール的に開発を進める、というものです。この方法はエンプラ系システム開発でも極めて取り組みやすく、実際の現場でも頻繁に使われていると思います。

② CI/CD による下流工程の作業生産性の改善(頻繁なリリース(≠ 早期のリリース))

下流工程での作業効率を高めるために、以下の CI/CD の仕組みを導入することは極めて有効です。ちなみに VSTS だとぜんぶ簡単にできるよ! と宣伝w。

  • ソースコード管理
  • 自動ビルド
  • (カナリアサーバやテストサーバへの)自動リリース
  • (部分的な)テストの自動化
  • 手動テストの効率化

# これらについては拙著「業務システム開発 モダナイゼーションガイド」にいろいろ書いたので、ここでは割愛。

③ ボトムアップ型タスク管理を用いた予実管理と作業完了の推定(ミニアジャイル)

下流工程の一連の作業がきちんと予定工期中に終わるかどうかを確認するために、ボトムアップ型タスク管理を用いた予実管理を行うのも非常に有効性があります。こちらも以前のエントリにおいて「Scrum のスプリントプラクティス」にて解説していますので、興味がある方はご確認ください。

これら 3 つの技法のポイントは、基本路線としてはウォータフォール型開発を維持しつつ、アジャイル開発のプラクティスをうまく取り込んでいくものだという点です。特にエンプラ系の大規模開発(数億円を超えるようなプロジェクト)では、ベースラインをウォータフォール型に置いた方がよいケースが多く、いきなりフルアジャイル型でやろうとすると、特にお客様が(慣れていないために)対応できないことがほとんどです。最終的にフルアジャイル型を目指すにしても、段階を追って切り替えていく・成長していくことは重要です。フルアジャイルを実践している開発現場だって、いきなり現在の開発スタイルになったわけではないのですから。

[実際の作業ワークフローの設計例]

以上のような考え方に基づき、実際の開発では、開発作業のワークフローを下図のようなコンセプト図として整理することをオススメしたいです。ちなみに下図は、モバイルアプリ開発にエンプラ系企業が手を出そうとする際に、割とスムーズに受け入れられやすそうな形でワークフローを整理したものです。

image

上図の場合、作業ワークフローの設計上、以下のような点がポイントになっています。

  • ユーザエクスペリエンスチームとサーバ/クライアント開発チームを分断している
    モバイルアプリ企業の場合、ユーザエクスペリエンスチームとクライアント開発チームとが合体している場合も多いと思います。しかし、エンプラ系企業が開発するモバイルアプリの場合、UI/UX の裏側に実装するロジックもそれなりのボリュームになる場合が多く、外部仕様を固めてからアプリの開発に進まないと、開発の制御がしにくくなることがよくあります。このため、外部設計段階で仕様をいったん fix できるように、開発チームを分断しています。
  • サーバ/クライアント開発チームを分断している
    エンプラ系企業がモバイルアプリ開発に取り組む場合、バックエンドのサーバロジックはすでに基幹系として存在しており、API のみ追加開発するような場合も多いでしょう。一方、クライアント側のモバイルアプリ開発に関しては、言語からして Swift など異なるモノを使う場合も多く、スキルセットが異なります。さらに、開発のサイクルも、サーバ/クライアントで速度感が異なると考えられるため、これらのチームを分断するようなワークフローとして設計しています。
  • 複数の開発・テスト環境を用意し、段階的リリース(リング配信)ができるようにする
    現在開発中のアプリがすぐにみられるカナリア環境、ある程度開発が進んだアプリについて構成テストを行えるようにするテスト環境、さらにβチャネルを介して先行ユーザ配信を可能とする運用環境など、目的に応じた多段階配信ができるようにリリースシステムを設計します。

再三の繰り返しになりますが、このような設計がよいかどうかはもちろんケースバイケースです。チームやプロジェクトの実態に合わせて、開発プロセスをテーラリングすることがなにより重要です。

[アジャイルと言いながら偽装請負にならないために]

ここまではウォータフォール型にアジャイルを組み込む流れで説明しましたが、本当のアジャイル型で開発をやりたい場合に関して、一点だけ書かせてください。実際の開発現場でよく見かける光景なのですが、アジャイル開発は請負型ではダメ、ということでベンダーさんと準委任契約を取り交わしているにもかかわらず、お客様がアジャイルのチームに入ってこない、というケースがあります。例えばスクラムのチーム体制に基づいてイラストを書くと、下図のようになっている場合があります。

image

アジャイル開発で新しいシステム開発スタイルに変えていきたい、という前向きなお客様は結構いらっしゃいますが、このパターンに陥ると失敗する確率がかなり上がります。理由は簡単で、本来、プロダクトオーナーは業務要件を整理し、それらに対して適切な優先順位付けとスコーピングを行うことがゴールなのですが、お客様がチームの外にいると、なんでもかんでも押し込もうとしてしまうためです。お客様からの要件詰め込みの圧力に対抗するためには、実際にお客様がプロダクトオーナーの立場としてプロジェクトに参画しなければならず、この体制を最初に作れるかどうかが極めて重要です。

多くの場合、お客様側はアジャイル開発やスクラムに十分な知見を持っていないため、お客様からアジャイルやりたい、と言われた場合には、このようなリスクについて十分に事前に説明すること、そしてプロジェクトの立ち上げ時点できっちり体制を組むことを、特に気を付けていただけるとよいかと思います。

[まとめ]

というわけでここまでいろいろ書いてきましたが、要点をまとめると以下の通りです。

  • アジャイルや DevOps のメリットを享受するためには、① 適用対象プロジェクトの見極めと、② プロセステーラリングの 2 つが重要。
  • フルアジャイルの特性は、① MVP アプローチ、② 内製開発、③ データ駆動型開発、④ DevOps インフラの 4 つに代表されるが、これらを完全に適用できることは、エンプラ系開発だと稀。
  • MVP アプローチが、アジャイルアプローチの本質を言い当てている。頻繁な軌道修正と作り直しが必要とされるため、万能な開発技法というわけではなく、プロジェクトに以下のような特性・要件が必要。
    • SoE 型アプリ
    • 初期段階で最終要件が確定できず、試行錯誤が必要になるもの
    • 進化させ続けることが必要な戦略領域のアプリ
    • スクラッチ型開発が必要そうなもの
  • エンプラ系の大規模開発で、ウォータフォール型開発にアジャイル型開発のプラクティスを取り込む場合、以下の 3 つが代表的なテクニック。
    • ① UX デザインフェーズにアジャイル開発技法を適用(アジャイルウォータフォール)
    • ② CI/CD による下流工程の作業生産性の改善(頻繁なリリース(≠ 早期のリリース))
    • ③ ボトムアップ型タスク管理を用いた予実管理と作業完了の推定(ミニアジャイル)
  • 実際にアジャイル開発を行いたい場合、お客様側から開発チーム側に PO (プロダクトオーナー)を出してもらうことが極めて重要。ここを外すと偽装請負的な開発になってしまう。

アジャイル開発に関しては様々な考え方があると思いますし、このエントリが必ずしも正しいというわけではないと思います。が、このエントリが、皆様が開発現場でより良い開発手法を模索するための一助になれば幸いです。

# ご意見やアドバイスは、コメントやはてブ、Twitter などでいただければ嬉しいです^^。
# 皆様の知見に基づくご意見やアドバイスをぜひ共有してください~。

Andrew Balzer unlocks the learning potential of classroom technology

$
0
0

When the students at Swansea High School wanted to put more benches around the school, Andrew Balzer suggested they conduct a digital experiment.

First the students built the benches using Minecraft Education Edition, then used the mixed reality app on the Microsoft Surface to locate the benches around the school - under trees, in hallways – in order to see where they would work best.

According to Balzer, who is a STEMShare Leader (SEO1) for the NSW Department of Education (DoE) and a Microsoft Innovation Educator (MIE) Expert; “Things like that bring reality in the digital world to a whole new level.

“We are in a neat spot where the two worlds are merging but we haven’t got enough people trained in the technology which is already being rolled out. The problem is that people don’t know it’s there or how to activate it and turn it on. But it’s all there - you don’t have to add any plug ins or pay extra - it’s all there in Office 365 and it’s awesome.”

Andrew Balzer is based at Hunter Sports High School and Glendale Technology High School and works with schools across the State to help teachers unlock the potential of the technology they already have and also is now responsible for assisting with the rollout of STEMshare kits across the State.

His ambition is to offer a mix of MIE: Expert and DoE training particularly for Microsoft Teams, Minecraft Education Edition and OneNote which he believes have huge potential in terms of learning impact.

What does the MIE: Expert program mean to you?

It’s fantastic, there’s an energized buzz when you connect with like-minded individuals. You can feel a bit like a one man show sometimes – but then you can come together and be part of a community making a difference.

Your job is to educate the educators?

About technology, yes. Office 365 has grown so much – with Sway for example and Teams. When you talk about Office people thinking Word and PowerPoint and maybe Excel. When you talk about Sway the majority of educators have not heard about it, or Teams - but these applications all talk to each other, and to MS Forms and the whiteboard app. That’s where we come in – to join up the dots for them.

Can you give me an example of how new features make a difference in the classroom?

Say you’re using PowerPoint. It now has 3D models – the kids start using that and building medieval structures and then using the transform function on PowerPoint to do 360-degree tours. No one is really utilising because they don’t know about it.

We need to see how an application can help, especially in education where kids are trying to solve problems in the real world. We have got devices and tools that make that happen.

And is Minecraft Education Edition being used to its full potential?

I’m a huge believer in its potential. I get frustrated when people say it’s a game because the Education Edition is solely linked to learning outcomes. Get away from stigma of it being a game – it’s a learning tool. We try and push the boundaries – the next thing we want to do is take Minecraft and integrate it with virtual reality and mixed reality.

You mentioned Microsoft Teams – how are you using that?

It’s been a game changer. Teams came along and I set up a digital faculty on Teams as a central point for conversations that are work related. I’ve got staff members collaborating when they’re doing their shopping and they share an idea. Or on holidays in Tasmania – they take a great snap and want to share something about geography.

Before Teams collaboration was a grey area – you could do it but you couldn’t do it well. Teams has unified us and builds on top of SharePoint which the department uses so it’s sensational for keeping us together.

And is it useful in teaching?

Our educational system is built on meeting outcomes. Teams has given us the ability to match outcomes on Teams as a marking guide. What we want to do is give students a mark and show which learning outcomes are met – it’s one of the only platforms that does that.

 

 

 

Connect with me on Twitter

Peninsula Grammar amplifies learning impact by applying technology to evidence-backed pedagogy

$
0
0

The window in Dean Pearman’s office looks out over the bay of Victoria’s Mornington Peninsula. It’s a glorious vista – but it’s not the water views that inspire him each day, instead it’s the opportunity to transform teaching and learning, harnessing technology to help students achieve their full potential. Pearman is the Director of Learning Technologies and Innovation at Peninsula Grammar and a member of the Microsoft Innovative Educator (MIE) Expert group. He has 19 years’ experience across primary and secondary schools in Victoria’s Catholic and Independent systems. In his current role he is steering Peninsula Grammar’s digital implementation strategy, leadership initiatives, staff professional learning and development, as well as pedagogy and curriculum innovation.

 

The 57-year old school has more than 1,400 students spread across years K-12 who it wants to learn, grow and flourish. United by the common core values of integrity, personal excellence, stewardship, community spirit, coeducational learning and Christian faith, teachers and students of Peninsula Grammar are active members of our community, embracing and engaging in 21st century education. With 20 years of laptop use behind it the school has solid technology foundations and a one-to-one device to student ratio across years 4-12 – mostly Microsoft Surface and other Windows devices. Pearman’s focus is to build a bridge at the intersection between good pedagogy and technology and to prove how technology is the amplifier of good pedagogy. This, he believes is what will help inspire students to develop an autonomous approach to learning that will sustain them throughout their lives. “Technology is inclusive. It promotes things like collaboration, communication, ideation and creativity. For us the whole point is that use of technology to inform teaching,” he says.

Tell me about the role of pedagogy in the modern classroom.

Good practice trumps everything else – the science and art of teaching is the starting point. The impact of me as a teacher is greater than the impact of technology – that was my lightbulb moment. I saw student growth and development in their learning from the way I was teaching them not the way I was using technology. But mix evidence-based pedagogy with technology then, wow – then it’s amplified.

 

Talk me through that – how does technology amplify learning?

Let me give you an example. We have used Minecraft Education Edition connected to the curriculum, making it real. Year 5 students have in the past gone to Sovereign Hill to learn about the Gold Rush. Now we can give them a problem to try and solve – their own interpretations of improving the city around Ballarat, building that in Minecraft to ideate ideas and show problems.

 

What other technologies are you leveraging?

Teachers use digital ink, and the senior maths department teaches out of OneNote. They use that as their springboard for learning, showing worked examples, giving feedback, pushing ideas out and students can connect to the notes in OneNote. A lot of our staff have Surface Book 2s and can provide quality, timely feedback. They use digital ink to give feedback to students on all their work, mark up examples and provide feedback with audio – that moves learning into the next level. We also use Microsoft Teams for staff to collaborate and work on big projects. That has been a beautiful seamless integration to share resources, share thinking, develop concepts. And because a lot of the operational things are handled in Teams it gives us time in meetings to be strategic. To discuss ideas on Teams and have everyone on the same page has been a fabulous innovation for us.

Have you been able to measure the impact of technology on learning?

That is the next thing for us. Our philosophy here at Peninsula is learn, grow and flourish. So when we are introducing something we want to know it’s making a difference to learning. Technology is a great leveler – it doesn’t discriminate, it empowers all learners to do things they couldn’t beforehand. It is really important to see the impact and personal growth. For us as teachers we need to know the impact, if we are using good pedagogy or technology we need to know it’s actually making a difference for that learner at that time. if we don’t know that how can we shift it to the next stage?

What about evidence based professional development?

I collect data about the usage of Office 365 and how staff are interacting with it and what they are doing with it. That informs the professional learning opportunities for staff. I use Power BI to collect and collate that data, and can see how a department is using 0365 ecosystems and can then come up with new ways to extend their learning.

My role is to talk to staff about proven, research-based pedagogy and how technology can amplify that. So for example I started a series of opt in professional development workshops called jam sessions – these are once a week, 30-minute snapshots of one great research-proven method of pedagogy coupled with a really excellent technology technique such as using OneNote for feedback. We talk about the research around what good feedback is – then use that understanding to apply it in OneNote. It’s had a huge influence on teachers’ ability to give quality feedback in OneNote and is a marked improvement over giving feedback to student on a piece of paper that they lose.

In your current role do you miss being in the classroom?

Absolutely, but I get into the classroom as much as I can. I’ve been working with staff and students on a STEM project in Year 6 creating 3D printed prosthetics for refugees. We’re a school that is about maker centred learning – we have two maker spaces in school and a philosophy of bringing STEM into the curriculum for interdisciplinary learning is really exciting.

We knew Year 6 was learning about refugees, we had a guest presenter come in from Interplast to talk about the work they do in Sri Lanka with people without limbs. The students learned about splinting and bracing and that was the catalyst for the project.

They worked through the design process, taking the idea about a bionic prosthetic hand, using paper, cardboard, modelling it, then 3D printing a working prototype of a prosthetic hand.

How important is being part of the MIE:Expert community to you and your work?

I am always a learner – so it’s important to be part of a program of like-minded people. And that also brought me to share the great things our staff are doing with technology. It’s for me to develop skills as a leader and professionally learn – but also to see how other schools are doing it – and for our staff to be recognised.

Connect with me on Twitter

For more information, visit https://www.peninsulagrammar.vic.edu.au/

Translator Text API の翻訳文字数の確認方法

$
0
0

Translator Text API の翻訳文字数の確認方法をご紹介します。

 

方法には、以下の2 種類があります。

    1. 直近 30 日以内の翻訳文字数を確認(ストレージ アカウントは不要)

    1. 直近 365 日以内の翻訳文字数を確認(別途ストレージ アカウントが必要)

 

以下、それぞれの手順をご案内します。

 

    1. 直近 30 日以内の翻訳文字数を確認(ストレージ アカウントは不要)

 

(1)         Azure Portal 上で、対象のTranslator Text API のリソースを選択します。

(2)         [監視中] ブレードの[メトリック] をクリックします。

(3)         表示された[利用可能なメトリック] から、[Characters Translated] を選択します。

(4)         表示された翻訳文字数のグラフ上部の、[時間の範囲] のコンボ ボックスにて期間を設定します。

(5)         グラフ上に指定した期間の翻訳文字数が表示されます。

 

clip_image002

 

 

    1. 直近 365 日以内の翻訳文字数を確認(別途ストレージ アカウントが必要)

 

(1)         Azure Portal の 対象の Translator Text API のリソースで、[メトリック] を開き、[診断設定] を選択します。

 

clip_image004

 

(2)         [ストレージ アカウントへのアーカイブ] をチェックします。

(3)         ストレージ アカウントの設定を行います。(事前にAzure ストレージ アカウントの作成が必要になります)

(4)         文字数や API の呼び出し回数などすべてのメトリック値を保存するため、[AllMetrics] にチェックします。

(5)         データの保存期間(リテンション期間)を設定します。最大で 365 日保存するように設定できます。

 

clip_image006

 

(6)         以上の設定後、翻訳処理が行われますと、設定したストレージに情報が記録されます。以下はストレージに保存された情報の例です。情報は、該当ストレージ アカウントの BLOB の、insights-metrics-pt1m というコンテナ内に格納されます。こちらのコンテナは自動的に作成されます。

 

clip_image008

 

clip_image010

 

データは JSON 形式で保存され、情報は以下のような形で保存されます。

このJSON ファイルを開き、”metricName” が “CharactersTranslated” の ”total” が翻訳文字数です。なお、”time” は日時(UTC) です。

clip_image012

こちらの記録を取っていただくことで、特定の期間の翻訳文字数を確認できます。

 

 

上記がお役に立てば幸いです。

 

Cognitive Services 開発サポートチーム 津田

 

Viewing all 35736 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>