tech

Unofficial, machine-generated summaries, as of 2026-11-09.

Technology and FriendsEpisode 551: Jeremy Miller on Automated Testing in .NET Core
  • ASP.NET Core makes automated testing faster by running in process. Miller says the biggest win over ASP.NET Classic is spinning up the full application in memory from an ordinary xUnit test, with Kestrel or Core's TestServer, and running real HTTP requests through it, with no deploy to IIS or IIS Express. When a test fails he changes the code and reruns it, so the feedback cycle is much quicker. He explains that Kestrel is Core's primary web server; in production IIS still sits in front of it, handling permissions and some caching.
  • His Alba library strips the plumbing out of HTTP tests. TestServer is "very low level", he says, so Alba (version 3 released the morning of the interview) wraps it and sits on top of xUnit, NUnit or MSTest. A test posts a C# object serialized to JSON, asserts the status code (200), content-type header or a cookie, and reads the response back as a .NET type, so the test stays readable. Alba now supports only ASP.NET Core 2.1 and above, because every Core release has broken it and he could not keep backwards compatibility. He is the primary maintainer, with help from former colleague Joe McBride and others.
  • Core's modular middleware keeps cross-cutting concerns out of controllers. Miller contrasts Core, which he calls Hanselman's "right-sized Legos" and likens to open-source alternatives of five to ten years earlier, with tightly coupled Web Forms. Security or logging can be wrapped around the work as middleware or action filters, so tests can target exactly what they test and a change to security does not touch every controller method. Citing extreme programming's idea of reversibility, he argues that concerns which can be retrofitted later need not be designed up front, leaving the team free to build core business functionality first.
  • Miller has a long record of .NET open-source tools. He wrote StructureMap, which he calls the first production-ready IoC container for .NET, first live in 2004 and still in use. He has worked for about 10–12 years on Storyteller, a Cucumber-like tool for business-facing acceptance tests. He also wrote Marten, which uses PostgreSQL's JSON support as a document database with a LINQ provider.
Technology and FriendsEpisode 550: Cassandra Faris on Personal Branding
  • Faris's jobs have come through community relationships, not resumes. After losing her most recent job she posted on social media and many people from the developer community sent leads. She says the only resume she sent in this search was to a large company that required one, and she is interviewing for developer relations and product evangelism roles. Earlier, after leaving a staffing company that did not support her community work, she was invited to a consulting company's CodeMash party by its president, a friend from organizing the Cloud Develop conference. She learned later that it was a secret interview: five candidates were let loose among developers to see how they interacted, which suited a job that meant working events.
  • Her personal brand began by accident and then became deliberate. About eight years ago, newer to tech, she set up a Twitter search for CodeMash, followed the people posting about it, read for a while, then started chatting and meeting them in person. She then unfollowed food bloggers and local businesses so her feed was mostly technology, and began answering people's questions and posting tips, which later became her talks. As a recruiter she says she hired about 10 people through Twitter, one of them a man from Toledo she had tweeted with for years and first met in the CodeMash hot tub.
  • Build a brand from your professional and personal interests. Her process is to list what you are interested in and good at professionally, plus personal hobbies, because a personal brand needs a personal element. Then find people who share them through LinkedIn groups or Twitter hashtags, lurk until you see a place to join in, and open conversations. She argues people let careers happen by chance while chasing the latest tech. Her advice boils down to "learn stuff, meet people, and help them".
  • She moved from learning in the community to giving back. Faris joined the community about 10 years ago to learn about technology such as cloud computing, then began speaking on "the human side of tech": personal branding, career paths, mental health, building a network, interviewing team members, and more communication talks. She is president of Dog Food Con, which she says grew from a free one-day event in a Microsoft office into a two-day, 450-person conference with about 90 talks. She added a human-skills track and more open-source talks as Microsoft has moved toward open source.
  • To join the developer community, start by showing up at user groups. Drawing on a lightning talk by a fellow organizer named Michael, she says user groups are small and everyone there shares your interest. At the end, thank the organizer, introduce yourself and offer to help, even just by sharing on social media or getting your employer to buy the pizza. Her first pointer for finding events is Meetup.com, which she says lists many in Columbus.
Technology and FriendsEpisode 549: Jennifer Wadella on Gatsby
  • Gatsby is a static React site generator tuned for speed. Wadella, a JavaScript developer at a consulting company, compares it to Jekyll but says Gatsby has done a lot of work on performance and SEO, so a blog can come out "all green" on Lighthouse. "Static" here means not pulling from a database: her blog is a set of Markdown files. Gatsby can do more, she says, but that is where it excels, and Giard sets it against his own slow, XML-backed DasBlog site.
  • A site is built from a starter template and deployed by command. She describes running npm install, choosing one of Gatsby's templates (filterable by tech stack, which she likens to Yeoman), cloning that repo and editing it. To publish a post she writes a new Markdown file, runs the build command and a Lighthouse check, and deploys. The default deploy goes to GitHub Pages, which she explains as a special branch that acts as hosting. She stayed on Firebase hosting because her previous site already used it, and says CI such as Travis can be wired in.
  • Gatsby handles the front-end chores Lighthouse audits for. Lighthouse is Google's audit tool in Chrome's developer tools, scoring performance, accessibility, best practices and SEO and showing the reasons for each shortfall; she finds it gamified enough to run for fun. She says Gatsby's build is optimized to score green out of the box and its plugins handle image optimization and blur-up loading. It will not catch a missing alt tag, though.
  • She is weighing Gatsby for her nonprofit's teaching docs. Her nonprofit runs Coding and Cocktails, a class teaching adult women to code, and has used GitBook, which she says allows code samples and collapsible sections but is "not great". She expects a Gatsby doc site would be easier to maintain. She heard of Gatsby from someone on its team at a conference, moved her personal site to it while between jobs, and writes up her mistakes on her blog.
Crosstalk SolutionsCloud Key Gen2 Plus
  • The onboard battery is reason enough to choose Gen 2 Cloud Keys. The host says power loss often corrupted and wiped the Gen 1 Cloud Key's database. On power loss the Gen 2 shows a seven-second countdown and shuts down cleanly. He pulled the plug about a dozen times without corrupting it, and says he will now recommend only Gen 2 units to customers who want a Cloud Key.
  • Pay the extra $20 for the Plus model. On the Ubiquiti store the Cloud Key Gen 2 is $179 and the Gen 2 Plus is $199. The Plus adds UniFi Protect and a 1 TB Toshiba 2.5-inch drive that the host priced at $46.50 on Amazon, where the Plus was listed at $299 at recording. He found a 5 TB Seagate Barracuda 2.5-inch upgrade for about $143.40; the drive cage has room for a thicker drive.
  • USB-C backup power needs a Quick Charge charger, plugged in before PoE. The unit runs on 802.3af PoE or 9 V/3 A USB-C (marked QC 2.0). An iPhone adapter and a Nintendo Switch supply both gave "bad USB-C power"; a $13.99 Anker Quick Charge 3.0 charger worked. When PoE went in first and USB-C second, pulling PoE still shut the unit down. In the other order it stayed up and only reported Ethernet disconnected.
  • Firmware and controller upgrades took workarounds. The 0.8.10 Cloud Key firmware would not install through the GUI, either automatically or from a URL. Only the SSH method from Ubiquiti's blog (ubnt-systool fwupdate plus the firmware URL) worked. Separately, a site export from a 5.7 controller would not import into 5.9.29, so the host first upgraded his production controller. That upgrade broke one customer's access points and its cloud-access link.
  • Protect used 14% of the drive in four days, but was unreliable. That was two cameras on the 1 TB drive, which the host calls anecdotal because it depends on motion. In his test CPU load was 6% and temperature 39 °C with three cameras and about six network devices. Protect's live view failed to load on camera, and he suspects Protect itself is "not quite up to snuff" rather than the hardware.
Technology and FriendsEpisode 548: Jon Skeet on Versioning
  • Versioning shapes how we ship code, yet developers rarely think about it. Skeet, speaking at CodeMash on "Versioning 1.0.1", says what matters depends on what is versioned: a Git hash identifies the whole tree at a point in time, a book edition (the fourth edition of his C# in Depth) is part of its identifier, and NuGet packages follow semantic versioning. Network APIs differ: at Google Cloud Platform, a "v1" such as the Speech API's can still evolve through backward-compatible changes like a new enum value for an audio format, while a NuGet version or Git hash should always mean the same thing. He says he poses more questions than answers.
  • Semantic versioning exists to tell users what an upgrade implies. Within a minor version, Skeet says, you should be able to move between patches in either direction without recompiling. Within a major version you can move forward through minor versions, but not back, because they usually add features. A new major version means "all bets are off". Releasing a new major version every time would be technically safe but would throw away the communication, and for Noda Time 2 he deliberately broke things and wrote a migration guide.
  • "Compatible" is not well-defined; almost any public API change can break someone. His .NET examples: adding a string overload beside an int one makes a call passing C# 7's default literal ambiguous. An implicit conversion to both types does the same. Adding an instance method can silently take over a call that used to reach a client's extension method, and an overload taking string beside one taking object changes which one string arguments call. Authors must decide which of these unlikely cases they treat as out of scope.
  • The diamond dependency problem is real and .NET's highest-version rule is unsafe. In his example, ASP.NET Core depends indirectly on Json.NET 12 while NodaTime.Serialization.JsonNet depends on Json.NET 11, and .NET simply loads the highest. He says that works only because Json.NET's James Newton-King has been careful; with Noda Time 1 and 2 it would not. He suggests the .NET team could load separate copies only when major versions differ, and let a project mark a dependency as a private implementation detail the compiler stops it exposing. He concedes this is complex and has performance costs.
  • Skeet wants tooling that recommends the next version number. A library would declare a checklist of what it counts as breaking, and tools would flag changes and suggest a major, minor or patch bump, which other tools could also read. He ties this to Noda Time's philosophy: don't pretend a hard choice doesn't exist, put it in front of the developer with documentation and make it easy to express. Common sense differs between people, he says, so judgment calls remain.
Technology and FriendsEpisode 547: Geisa Faustino on Teaching
  • Faustino taught complete beginners by learning concepts as challenges required. A former university math professor who joined Microsoft in March of the year of recording, she mentored a table at an OpenHack in Dubai whose members knew no Python, no machine learning and no coding. She offered them a choice: drop the challenges and learn the basics, or work both in parallel. They started on the challenges and stopped to learn a concept whenever they got stuck, such as how a computer represents an image, which the first image-processing challenge needed. She says they finished three or four challenges in three days and emailed afterwards asking about free courses.
  • People learn when they come wanting to, not to confirm a preconception. She says some people ask questions while already holding a fixed view they do not want to change; Giard glosses this as wanting validation, and she agrees. OpenHack attendees are usually there to learn, she says, whereas some university students attend because their parents force them. The university also has a set program and far more time, four to six months against three days.
  • Brazilian universities teach math too theoretically, and should teach it applied. She taught calculus, analytical geometry and differential equations, and says she was frustrated as an undergraduate at computing integrals and derivatives without knowing what they were for. The point clicked in her master's, when she learned that the second derivative can detect edges in an image. She calls this a problem in Brazil specifically, where degrees of three or four years offer only theoretical classes. Giard raised the general difficulty of teaching math without a practical application.
GCastGCast 34: Exposing Local Web Apps with ngrok
  • ngrok exposes a locally running web app to the public internet. Giard's case is an app that other applications depend on and that must be reachable publicly to be tested; ngrok lets him test his local copy instead of redeploying after every change.
  • There is nothing to install beyond a single executable. The Windows download from ngrok.com contains only the ngrok executable; Giard says to copy it anywhere you can reach it, such as your path or a tools folder, and he puts it in the app's own folder.
  • One command forwards a public URL to a local port. With a simple Node/Express app running on localhost port 3000, ngrok http 3000 returned an HTTP and an HTTPS address under ngrok.io that both redirect to it. The address changes every time the command runs, and an edit saved locally showed up on the public URL on refresh.
  • It is free but temporary, meant for development rather than hosting. Giard says the session expires after about eight hours, so it is not a permanent way to turn a local server into a public one; he describes it as designed for testing and developing without deploying every small change.
GCastGCast 33: An Introduction to Power BI
  • Power BI is Microsoft's point-and-click tool for visualizing data. It is at powerbi.com, with a "Start Free" sign-up, and comes as a rich desktop client, a browser version, and a report server an enterprise can host itself. Giard notes that people whose organization has an Office 365 subscription may already have an account.
  • Data can come from shared content, third-party services, databases or files. The Get Data options are content your organization publishes, third-party services (three pages of them), a database, or a file in OneDrive, SharePoint or on the local machine. Giard calls a file the simplest and loads a forest-fires CSV he says came from the University of California at Irvine, to which he had added a month-number column using an Excel formula that converts the three-letter month abbreviation.
  • Values default to a sum, which usually needs changing to an average. Charting temperature by month first gave the sum; switched to the average, it showed temperatures in the 20s (Giard guesses Celsius) in months 8 and 9 against about 5 in December and January. A second visual of average wind speed showed December much windier than the rest of the year.
  • Dragging a field onto a chart again adds another series. Giard dragged temperature onto the chart twice more and changed the new series from sum to minimum and maximum, giving average, minimum and maximum lines. He reads the result as very little variance in November and a lot between minimum and maximum in summer.
  • Chart type is a single click, and Giard prefers line graphs. He switches the same data among line, bar and other types; he says he is not a fan of bar or donut graphs and likes line graphs for their high data-to-ink ratio.
GCastGCast 32: Handwriting OCR with Cognitive Services
  • Handwriting uses the Computer Vision RecognizeText call with mode set to handwritten. It is an HTTP POST to a URL of the form https://westus.api.cognitive.microsoft.com/vision/v2.0/recognizeText?mode=Handwritten, where the region part changes with where the service is deployed; Giard suggests deploying close to your users. He says handwriting is less consistent than printed fonts, so Azure takes longer to process it.
  • Two headers set the key and how the image is sent. The Ocp-Apim-Subscription-Key header carries the key; a Content-Type of application/json means the body is {"url": ...} pointing to an image Cognitive Services can reach on the public web, while application/octet-stream means the body is the image itself, as for a photo taken in a phone app. The key and endpoint come from an Azure Computer Vision resource, created under AI + Machine Learning with a region and a free or paid tier.
  • The call is asynchronous: a 202, then a second request for the text. The POST returns 202 with no text, only an Operation-Location response header holding a text-operations URL ending in a GUID. A GET to that URL with the subscription key returns, once finished, a status of succeeded and an array of lines, each with a bounding box and an array of words that each have their own bounding box.
  • The demo read real handwriting well but not perfectly. On a handwritten love letter, tested through the region's test console and then Postman, "Sweetheart" lost its T, which Giard puts down to an odd-looking letter, while the following lines read correctly. On a 1990 letter from George H.W. Bush the salutation came out garbled.
  • A JavaScript app uses the word bounding boxes to highlight a search term. Giard's page makes the POST, finds the operation-location header by lowercasing the response headers, then GETs the result and loops through lines and words to build the text. When a word matches the one the user typed ("it", "you"), it keeps that word's bounding box and positions a rectangle image over those coordinates.
GCastGCast 31: OCR with Cognitive Services
  • OCR returns text as nested lines and words, each boxed. The Computer Vision OCR service returns JSON holding an array of lines. Each line has its text and a bounding box (the XY coordinates of its four corners), plus an array of words, each with its own bounding box, which code can use to highlight or block out text. Giard says the better the image quality, the better the recognition.
  • Handwriting has its own endpoint but the same output format. The demo's handwritten quote was read accurately, Giard says. The response uses the same structure: lines with bounding boxes and text, then each word with its box.
  • OCR is a single POST with language and orientation options. The endpoint is https://<region>.api.cognitive.microsoft.com/vision/v2.0/ocr; the region (West US in the demo) depends on where the resource is created. The query string takes language ("unknown" auto-detects) and detectOrientation (true straightens tilted text; Giard sets it false for horizontal text because it will be "a little bit faster"). The headers are the same as for image analysis: application/octet-stream or multipart/form-data with the image in the body, or application/json with a url pointing to the image, plus a subscription key from an Azure Computer Vision resource. The free tier allows 20 calls per minute, which Giard says is probably not good enough for something like an iPhone app. In the online test console a love-letter image returned a 200; the first line came back garbled, but the rest was read well.
  • His jQuery sample posts the image URL and loops lines and words. The page sends the key in the header and url plus the image link in a JSON body. On the asynchronous callback it loops through every line and every word, appending each line as its own div with the words separated by spaces. Giard notes that the key and URL must match the resource created in Azure, and says the code is in his GitHub repository.
  • Accuracy tracks print quality, and non-Latin scripts work. On a Robert Frost poem, a word with heavy kerning was misread ("imperfect, but it's pretty good"); a Longfellow poem in larger type came out better. A Shakespeare sonnet on a dark background with text bleeding through and a large initial letter gave some trouble, but old-style S's that look like F's were read correctly. Spanish and French poems worked, and a Japanese one was returned in its own character set, which Giard says is surprisingly accurate.
GCastGCast 30: Creating Applications with the Analyze Image Cognitive Services API
  • A C# app calls Analyze Image through HttpClient using Microsoft's sample code. Giard's WPF app builds a URL asking for categories, description, adult, color, faces and other visual features with language set to English, leaving out the celebrity and landmark details. He stresses that the region in the URL (here West US) must match the resource the key comes from, calling the mismatch a common mistake.
  • The JSON response is cast into a strongly typed C# model. The body {"url": ...} is turned into a byte array and sent with PostAsync under await, which keeps the rest of the app responsive. On a success code, Giard deserializes the string into an image-analysis-result model he built from the documentation, with categories (name and confidence score) and adult data (is-adult and is-racy booleans plus scores).
  • The app shows the caption and tags and flags racy images. It displays the first caption and loops through the tags, and if the racy score is above 0.3 it shows a warning image. A kitten picture was captioned "a bird sitting on top of a cat", and a photo of a shirtless man scored about 0.31 and tripped the warning.
  • The Node version needs no casting but punishes misspelled property names. It requests only the description feature and reads the first caption and its confidence straight from the parsed JSON. Giard says JavaScript's dynamic objects make this simpler, but a capital C in "captions" would make it fail.
  • The Node script prints the caption and also serves it as a page. Run with node analyzeimage.js against a hard-coded image, it printed "a small boat in a body of water" at 97% confidence and also served the result as a page on localhost port 8124, where Giard noticed a rounding issue he leaves as an exercise. The code is on his GitHub; users must add their own key function.
GCastGCast 29: Introducing Cognitive Services and Computer Vision
  • Cognitive Services offers machine learning as simple web APIs. Giard describes them as APIs that let you use machine learning "without having to do the heavy lifting", with free and inexpensive versions, reached from microsoft.com/cognitive. The categories are vision, knowledge, language, speech and search; under vision alone are Computer Vision, Video Indexer, Custom Vision, Content Moderator and Face.
  • Image analysis returns tagged JSON with confidence scores for each judgement. For a train-station photo the service returned tags such as platform (99.5%) and station (97.98%) and the caption "people waiting at a train station" at 83.3%. It also returned image format and size, clip-art, line-drawing and black-and-white flags, colour information, and adult and racy scores. Giard suggests using those scores to hold user-uploaded images for human vetting. Faces come back with estimated age, gender and a bounding rectangle, and celebrity detection identified Satya Nadella at 99.9999%. A line drawing of a lion was guessed as a face at under 50% confidence, which Giard uses to show why code should act on the confidence level.
  • The analyze call is a POST shaped by query-string parameters. The endpoint is https://<region>.api.cognitive.microsoft.com/vision/v2.0/analyze. visualFeatures takes a comma-delimited list (categories, tags, description, faces, image type, color, adult); leaving a feature out returns a smaller JSON response. details takes celebrities and/or landmarks, and language was then limited to English, Japanese, Portuguese and Chinese. The headers are the content type and the Ocp-Apim-Subscription-Key. You can send a JSON body with a url to a publicly reachable image, or send the image itself as application/octet-stream or multipart/form-data; images must be under 4 MB.
  • An Azure Computer Vision resource supplies the endpoint and keys. He creates it under Create a resource → AI + Machine Learning → Computer Vision. The region sets the URL, and the key and URL must both match the resource. You get only one free-tier resource, and it is limited in calls per minute and per month, so Giard says it suits learning but not a tight loop or an app deployed to the world. There are two interchangeable keys so you can switch to one while the other is regenerated after a compromise.
  • Any HTTP-capable language works, and errors come back as status codes. Because the API is REST, HTTP and JSON, Microsoft provides sample code in cURL, C#, Java, JavaScript, Objective-C and PHP, plus a .NET SDK. A 200 is success. 400-range errors carry a code and a description, covering an unreachable URL (for example one internal to your organization), a bad format, an image over 4 MB, or a misspelled parameter. 415 means unsupported media, an authentication failure is what Giard thinks is a 401, and 500s are server-side; the service refuses to analyze child pornography. In the online test console a boat photo came back as "a small boat and a body of water" at 97%. Giard says the next video shows the call in JavaScript and C#.
Technology and FriendsEpisode 546: Jackie Becker on Mixed Reality in the Real World
  • Overlaying MRI models on the patient targets missed cancerous tissue. Becker says her team built a project with the Stanford School of Medicine aimed at a 40% rate of second lumpectomies: markers placed at MRI time let the surgeon, wearing a mixed reality headset, pin a 3D model of the scan onto the patient. She reports a follow-up research study found it "enormously successful" and that Stanford is considering wider rollout; the paper is on the school's virtual reality research site.
  • Augmented reality cut a carmaker's paint inspection from days to hours. Becker says Toyota's old method for measuring paint and clear-coat thickness took two people two full days, holding a sheet with about 500 holes against the car and laser scanning it; her team's HoloLens app projects the points and runs the analysis, so one person does it in four hours.
  • Seeing instructions in place beats recalling them from a diagram. Becker gives the same reasoning for surgery and for a project her team did wiring circuitry for Boeing, where it must be 100% correct. She also cites Ford prototyping cars as holograms instead of costly physical models, and another car company training mechanics on 3D brake parts.
  • Her favourite project became a shipping product for the partner. At a hackathon Becker worked with Upskill on a warehouse app that recognizes an object and pulls up its schematics, assembly instructions and other workers' notes, using object and text recognition; she says it launched a few months later and is now used by other companies.
  • Free online tutorials are enough to start building mixed reality. Becker points to Microsoft's Mixed Reality Academy, whose tutorials on the mixed reality toolkit, with integration into cognitive services, walk a newcomer through Unity even with no prior experience. Unity and Visual Studio are both free, so there is no upfront cost, and some development experience helps but is not required.
Technology and FriendsEpisode 545: Isaac Bayoh on How Technology Impacts Developing Countries
  • Developing countries' data sits on undigitized paper. Bayoh, a Microsoft cloud solution architect from Côte d'Ivoire, says OCR now lets those records be studied for trends and past mistakes. He advises an NGO with World Bank funding to build a data center there, and says it had to be designed for voice, text and OCR data rather than structured tables.
  • Pay-per-use cloud makes technology a great equalizer. Bayoh says $100 buys an Azure subscription and a cheap machine can rent a server by the minute or hour. He contrasts his engineering college, where about 2,000 students shared roughly five library computers; Giard adds that home PCs began the shift away from needing a mainframe employer.
  • Financial inclusion there means mobile money, not banking. For West Africa, Bayoh says only 14% of Africa's population has a bank relationship against the "60s, 70s" percent in the US, while nearly everyone has a phone. Money is held against a phone number, moves between carriers, and the operator takes a commission with no bank involved.
  • Technology cuts corruption but will destroy jobs in Africa. Bayoh says visibility hurts those in power, citing a proposed WhatsApp and Facebook Messenger tax pushed back after public outcry online. He argues lost jobs will go to Asia rather than shift, because the education system cannot retrain people fast enough; education, then health, are "the next battle".
  • A technology dollar does more in Africa than in the US. Bayoh cites an unnamed study putting the return at 12 times, and says existing technology can simply be lifted and shifted there. His example is remote doctors reviewing scans such as MRIs, given the shortage of specialists.
GCastGCast 28: Natural Language Processing with LUIS
  • LUIS lets an app understand phrasing nobody listed in advance. Giard presents it as Microsoft's natural language processing tool at luis.ai, part of Microsoft Cognitive Services, which he describes as machine learning without having to do the heavy lifting of machine learning.
  • An app is built from intents, utterances and entities. Intents are the statements, questions or commands the app should understand; utterances are the many ways a user might say each one; entities are the variable parameters inside them. Pre-built domains (calendar, camera, communication, entertainment, fitness and others) fill all three in at once: the fitness domain adds intents such as log weight, log activity and add note, with entities like activity type, meal type, measurement, number and stat type.
  • The app must be trained before it understands anything. Training builds a machine learning model, and queries run against that smaller model rather than the original data. Testing "record that I ran 1,000 steps" in the portal returned log activity at 90% confidence and picked up stat type = steps, but missed the number, which Giard ties to the less-than-certain score.
  • Publishing exposes the model as a simple GET web service. Publishing to production creates an endpoint whose URL ends in q=, where the utterance goes. Querying "can you record weight, please?" from a browser returned JSON with log weight as the top-scoring intent at 99%, the runner-up at only 2%, and the weight entity tagged as a measurement, for the calling application to parse.
GCastGCast 27: QnAMaker
  • QnA Maker builds a bot that only answers questions. Giard contrasts it with building bots on the Microsoft Bot Framework. A knowledge base is started at qnamaker.ai, but step one is creating a QnA Maker service in an Azure account; in the portal it sits under Cognitive Services rather than being listed by default under AI and machine learning.
  • The service's app name becomes a public URL, so it must be unique. The hosted web service is addressed as https://<name>.azurewebsites.net. Pricing offers a free tier and a $10-a-month tier; Giard takes the free one, and West US after East US was not allowed for that resource.
  • A knowledge base can be loaded from URLs, files and chit-chat. Sources are one or more URLs containing questions and answers, tab-delimited files, and a chit-chat set of stock answers in a professional, friendly or funny personality. Giard points it at Microsoft's own QnA Maker FAQ page plus the professional chit-chat; the resulting pairs can be edited, deleted or added to, and a test of "how old are you?" returned "Age doesn't really apply to me".
  • Train, then publish, and any HTTP POST client can query it. Training builds a machine learning model from the questions; settings also allow export as a tab-separated file. Once published, the endpoint is /qnamaker/knowledgebases/<id>/generateAnswer, called with an Authorization: EndpointKey <key> header, Content-Type: application/json and the question in the body. Giard runs it from curl and from Postman, getting a 200 with the answer and a match score.
GCastGCast 26: Creating a Chatbot in the Azure Portal
  • A Web App Bot resource creates a Bot Framework bot without an IDE. It sits under AI and Machine Learning in the Azure portal. The pricing tier sets how many messages the bot accepts (the free tier accepts fewer; Giard picks premium), the app name must be unique because it is exposed as https://<name>.azurewebsites.net, and the app service plan sets the machine's size and location.
  • Templates include an Echo Bot and a basic bot. The Echo Bot sends the user's message back; the basic bot adds a little natural language processing. Each comes in Node.js or C# and in a choice of Bot Framework version. Tested in the portal's Test in Web Chat, the Echo Bot answered "hello" with "you sent hello" plus a turn number.
  • The online code editor suits quick changes; Giard recommends Visual Studio. Open Online Code Editor on the Build tab loads the .NET project into the browser and saves edits automatically; the reply logic sits in OnTurnAsync in the echo-with-counter bot's .cs file. Giard calls this limiting but fine for "quick and dirty" changes; for real work, Download Bot Source Code produces a zip to open in Visual Studio or Visual Studio Code.
  • Downloaded code needs two keys copied from the portal. The bot file path and bot file secret, found under the App Service's Application Settings, replace placeholder strings in appsettings.json. Giard advises keeping those keys out of source control, for example via gitignore. Run locally, the bot shows only a dummy landing page, since it is just a web service.
  • The Bot Framework Emulator tests the bot against its endpoints. The open-source desktop app, installed from its GitHub releases page, opens the project's .bot file, a JSON file holding development and production endpoints. Against the locally running bot it showed Giard's edit ("you typed hello"); he says deployment then goes by right-click deploy or continuous integration.
GCastGCast 25: Azure Durable Functions
  • Durable functions add state to normally stateless Azure Functions. Giard pitches them for long-running workflows, such as waiting on a user to click a link in an email, which could take hours, days or weeks. Since Azure Functions charge only while running, he says you don't want such a workflow running the whole time.
  • Activity functions are triggered only by an orchestration function. Their input parameter carries the ActivityTrigger attribute, unlike functions triggered by HTTP, a queue message, a database change or a timer. The orchestration function is marked by OrchestrationTrigger on its DurableOrchestrationContext parameter and calls each activity through the context's async call method.
  • A conventional starter function has to start the orchestration. The orchestration trigger does not fire on its own. In the demo, an HTTP-triggered starter accepting GET or POST on the default route (api/ plus the function name) uses a DurableOrchestrationClient to start the orchestrator asynchronously; Giard notes a timer, queue or database trigger would also work.
  • Awaiting each call makes the activities run in sequence. Although called asynchronously, await holds each line until the previous call returns, so one function's output can be the next one's input. In the demo, three activities that each wait 10 seconds ran in order from a browser GET, and the final log showed the message with "function 1 done", "function 2 done" and "function 3 done" appended.
Technology and FriendsEpisode 544: Elizabeth Graham on Azure Logic Apps
  • Logic Apps' main advantage over custom code is maintained connectors. Graham, a Microsoft global black belt whose background is integration, describes Logic Apps as hosted system integration between on-premises, Azure and external systems such as Salesforce or Dynamics 365. With a connector a Cosmos DB link takes a few keystrokes and no connection-string setup, and if the Cosmos DB interface changes the Logic Apps team updates the connector rather than you rewriting your code.
  • A logic app is one trigger followed by a series of actions. Triggers she lists are an HTTP request, a schedule (every three minutes, 15 seconds, configurable), polling a Service Bus queue, storage or an on-premises SQL Server query or stored procedure, with Event Grid able to notify the app instead of waiting on the poll. Actions cover message transformation, schema validation, conditions and loops; a for-each runs up to 20 tasks in parallel by default, which can be set to one at a time where order matters.
  • Long-running workflows cost nothing while they wait. Graham says a workflow can send out a request such as an approval email and resume when the response arrives up to 90 days later. Billing is only for the triggers and actions that run, so whether the waiting instance stays in memory does not matter to cost.
  • Per-action pricing makes loops the thing to watch. Each trigger and action costs a small fraction of a cent, so every loop iteration is a billed action; for 200 items she first says it could be $2, then "probably more like 20 cents". The SAP and MSMQ enterprise connectors cost more, and EDI needs an integration account, holding trading partners and their maps, at an additional charge.
  • Portal-built logic apps can still go into source control. Besides the portal there is a Visual Studio designer extension and a newly released VS Code extension that edits only the JSON definition. For portal work, a template tool used with ARMClient exports the logic app as an ARM template and strips out connection keys as parameters, so secrets stay out of the repo and the template deploys to test or production; she points beginners to the Azure docs, the Integrate conference videos hosted by partner BizTalk360, and her team's "serverless ninjas" workshop under the Coding with Sasquatch GitHub.
Technology and FriendsEpisode 543: Alex Mang on Azure Durable Functions
  • Durable Functions answers the complaint that Functions is only for small tasks. Mang, speaking at Ignite on serverless in production, says plain Azure Functions can split a large data set into chunks and process them in parallel, but struggles to put the results back together. Durable Functions handles that fan-out/fan-in pattern, along with complex microservice scenarios.
  • Waiting on a human breaks plain Functions financially. Because a function is billed by execution and its duration, waiting days for someone to click an approval link would waste money. A durable orchestrator can wait for a reply to an email or a button on an admin site before continuing, which Mang wants for disaster and recovery cases where automation usually works but an approval step is still needed.
  • His team used Logic Apps to give every build a brand-new agent. For one customer that wanted Azure DevOps (formerly VSTS) agents available 24/7 but never reused, each build queues an agentless phase that sends a Service Bus message; a logic app picks it up and runs an ARM template deployment that creates a new Azure VM, which registers itself as an agent in the queue. Mang ties this to treating servers "like cattle rather than pets": if staff must be sent home for Patch Tuesday reboots, the servers are being treated as pets.
  • The difference between Durable Functions and Functions is state. Mang says Functions are stateless, event-driven pieces of execution; in Durable Functions the activities remain stateless functions while the context across multiple executions lives in the durable function. Giard's gloss, which Mang calls "a fabulous definition", is that durable functions can sleep, wake and remember what they were waiting for.
Crosstalk SolutionsGetting Started With Synology
  • The DS218+ suits home users and small businesses with basic backup needs. Synology sent the host the unit with two 8 TB Seagate IronWolf drives; he also recommends Western Digital Red NAS drives. Synology's figures he reads out: a dual-core 2.5 GHz CPU, one Gigabit port, encrypted transfers at 113 MB/s read and 112 MB/s write, and 4K transcoding.
  • Size drives by doubling your current data, then rounding up. The host's rule of thumb: 1.5 TB of data doubles to 3 TB, so buy 4 TB drives. He calls 8 TB likely overkill for most homes, but says it is always better to overestimate than underestimate.
  • Initial setup runs from a browser on the same LAN, and wipes the drives. Browse to http://diskstation:5000; installing DSM erases both drives and takes about 10 minutes. The host sets updates to install automatically, uses QuickConnect for remote access, and then moves the NAS from DHCP to a static address outside the DHCP pool so he always knows where it is.
  • Turn off the recycle bin on a backup-only share, but keep it on working shares. On a folder people work from, the recycle bin guards against accidental deletion; on a backup share it is not needed. He also says to leave the data-checksum option unchecked if a database runs off the NAS, and gives the backup user read/write and guests no access.
  • Windows File History to a mapped drive gives set-and-forget backup. The host maps the share as a drive letter using the NAS account's credentials, adds folders such as a video-editing SSD, and sets automatic backup on. He saw about 120 Mbps on the LAN during his roughly 1.8 TB first backup, and says small files copy slower than large ones.
Technology and FriendsEpisode 542: Jim Wooley on Static Analyzers and Roslyn
  • Static analysis catches runtime problems while the developer is typing. Wooley says it works even on code that will not compile, finding code smells, unused variables and likely leaks, such as an IDisposable never disposed through a using clause. Domain-specific analyzers can check, say, that a string passed to a URI constructor is valid before it throws at runtime, moving fixes earlier.
  • Roslyn made the compiler fast enough and open enough for analyzers. The rewrite of the C# and VB compilers began around 2010 and took about five years, the hard parts being performance while developers type and extensibility, so analyzers can be added as a NuGet package without rebuilding the compiler. Roslyn parses the code into a syntax tree that is immutable for performance; an analyzer flags a possible problem and a code fix also offers the repair, behind Visual Studio's light bulbs.
  • Most developers should consume analyzers rather than write them. Writing one takes a lot of work over a large surface area; Wooley joined analyzer projects to force himself to learn, and says it taught him the language far better. He recalls FxCop around 2005 showing at most 2,000 errors, with teams clearing them only to get 2,000 more and uninstalling; StyleCop has since been rewritten on Roslyn by Sam Harwell, who was hired on the strength of it.
  • Put style rules in .editorconfig so the whole team gets them. Analyzers such as StyleCop, the .NET analyzers and Code Cracker can disagree with each other or with you (var against explicit types). Visual Studio's own code-style settings roam with your install but not to teammates, while an .editorconfig checked into the repo applies to everyone and also covers JavaScript, XML and JSON, for example two-space indents in XML and four in C#.
  • Code Cracker is an open-source set of about 100 analyzers. Wooley works on it; examples are detecting empty catch blocks with up to three suggested fixes and reordering a class's members in one click. It does not honor regions, which he offers as a contribution for someone learning, since a small change teaches more than reading code, and analyzers themselves teach by explaining the preferred pattern, such as proper dispose implementation.
GCastGCast 24: Azure Function CosmosDB Binding
  • A binding attribute does the database insert with no data-access code. Giard decorates a to-do item parameter of an HTTP-triggered (POST) function with a Cosmos DB attribute giving the database name, collection name and a connection-string setting, which maps to the connection string pasted into local.settings.json; the function body only deserializes the request, logs and returns HTTP 201, yet the posted documents appear in the collection. He uses a typed class with JSON property attributes (lowercase in JSON, mixed case in .NET) because Cosmos DB is schemaless and he wants the application to validate documents before they are stored.
  • Reads come back by declaring an enumerable parameter with a query. The get-all function binds an IEnumerable of the to-do type with the SQL query select * from items and returns the list with HTTP 200. A second function changes only the query, adding a where clause on the is-complete field, and returns just the completed items.
  • A single document is fetched by binding the ID to a route variable. The binding has a special Id parameter; rather than hard-code it, Giard sets the function's route to getitem/{id}, where the curly braces mark a variable, and passes that variable to the binding. A null result returns 404, a found document returns 200 with the item.
  • Giard's case for bindings: less code means fewer bugs. He calls them "a really powerful tool" because less code generally means fewer bugs and less to test. The project was built as a Visual Studio C# Azure Functions version 2.0 project against a SQL API Cosmos DB account, and he publishes it in an "Azure Function Demos" repository on his GitHub, with a blog article, "Cosmos DB binding in Azure Functions", walking through each of the four functions.
Crosstalk SolutionsUbiquiti nanoHD
  • The nanoHD and UAP-AC-Pro are near-perfect substitutes for each other. The host says a home user will never max out an AC Pro or notice the nanoHD's 4x4 MU-MIMO, though a crowded office might. Even so, he expects Crosstalk to start deploying the nanoHD in place of the AC Pro for its MU-MIMO, smaller size and skins. He did no performance testing here and promises a comparison video later.
  • The nanoHD costs about $30 more than the AC Pro. MSRPs are $179 for the nanoHD, $149 for the AC Pro and $349 for the UAP-AC-HD. On Amazon as of November 8 he found $160.99 for the nanoHD, $136.18 for the AC Pro with PoE injector or $125.90 without, and $286.09 for the AC HD.
  • Headline throughput is an aggregate across many clients, not per-client speed. Ubiquiti rates the nanoHD at about 1,733 Mbps on 5 GHz, against 1,300 Mbps (3x3 MIMO) for the AC Pro, but the nanoHD has a single Gigabit port where the others have two. On 2.4 GHz the ratings are 300, 450 and 800 Mbps for nanoHD, AC Pro and AC HD; concurrent users are 200+, 200+ and 500+.
  • The nanoHD needs 802.3af PoE and is indoor-only. It ships with a 48 V, 0.5 A Gigabit PoE injector, unlike the 24 V passive power of models such as the UAP-Lite. The AC Pro takes 802.3af or 802.3at, the AC HD only 802.3at, and both are rated indoor and outdoor.
  • The nanoHD's accessories are its main draw over the AC Pro. They include an adapter bracket fitting existing AC Pro mounts, a recessed low-profile ceiling mount (on the website, possibly not yet shipping), and colour, woodgrain, marble and camouflage skins for places like theatres and restaurants. For high-density areas such as auditoriums the host still adds AC HDs alongside AC Pros.
GCastGCast 23: Azure Logic Apps
  • Logic Apps are cloud workflows built from drag-and-drop shapes. Giard gives three advantages: they run in Azure and inherit its reliability and scalability, they have a graphical designer, and they ship connectors that replace code you would otherwise write, including SQL Server, Oracle, MySQL, Cosmos DB, Mongo, Azure Table Storage, queues, SAP, email, Event Grid, HTTP requests and functions. A logic app is created under Integration in the portal, and its welcome page offers quick-start triggers (Service Bus queue message, timer, HTTP request) and fuller templates.
  • Pasting a sample payload generates the HTTP trigger's schema. For a "when an HTTP request is received" trigger, Giard skips typing a schema definition and pastes sample JSON instead; the designer infers ID, first and last name as strings and quantity as an integer, and the types can be edited. The trigger's URL is generated only once the app is saved; if it is unwanted, he says an Azure Functions proxy can front it.
  • Table Storage entities need a unique partition-and-row-key combination. The first step is an Azure Table Storage "insert or replace entity" action, so a repeated ID replaces the existing row. Giard hard-codes the partition key ("all") and uses the posted ID as the row key, storing the whole request body as the entity.
  • A Condition control acts as an if statement with true and false branches. Giard tests whether quantity is greater than or equal to 100 and, on the true branch only, inserts the same body into a second "big customers" table with the partition key hard-coded to "big". A test post with quantity 100 landed in both tables; one with quantity 90 landed only in the all-customers table.
  • Testing needs real posted data and a JSON content-type header. Running the app from the portal with no payload fires the trigger and then errors because the ID cannot be found. Giard posts from Postman with Content-Type: application/json set explicitly, "otherwise it might just think it's just a string of text", and gets back HTTP 202.
GCastGCast 22: Creating an Azure Function Proxy
  • A proxy puts a friendlier URL in front of a back-end service. Giard gives two reasons: to replace an ugly, hard-to-remember URL with a shorter one whose arguments have meaningful names, and to make a service conform to an organization's URL standards. His back end is the default HTTP-triggered function (built in GCast episode 19), whose URL carries /api/ plus the function name and a long code= key in the query string.
  • The route template maps the public path onto the back-end URL. Under Proxies in the function app, Giard adds a proxy with the route template greet/name and a back-end URL that appends name=David, which returns the hard-coded name whatever is passed. Changing the template to take a variable in curly braces and passing it into the back-end query string makes greet/name/Jonathan return "Hello, Jonathan".
  • Several route variables can be combined into one back-end parameter. With a template of first name slash last name, he builds the back-end name value as first name, a space, then last name, so a two-segment path returns the full name. He calls the result a URL that "probably would be a good standard for my company to use".
GCastGCast 21: Azure Functions Continuous Deployment
  • Deployment Center wires a function app to a source repository. It sits under Platform features in the function app and lists the supported sources, including Visual Studio Team Services (which Giard notes is now Azure DevOps but still shows the old name), GitHub, Bitbucket and local Git. He picks GitHub; the Azure account may need authorizing to read the repository.
  • Finishing the wizard adds a webhook and runs a first deployment. Giard selects the GitHub account, the repository and, if there are several, the branch (his has only master), then confirms a summary page. Azure adds a webhook to the repository and, after a couple of minutes, pulls the code and deploys it, so the previously empty function app shows the project's one function.
  • Every push to the repository then redeploys automatically. Giard adds a second HTTP-triggered function in Visual Studio, commits it locally and pushes to the master branch, and it appears in the function app without further action; he had planned to wait about two minutes but did not need to. He skips testing the new function, saying he ideally should run automated tests first but that this is "a demo for deployment not for functions".
Crosstalk SolutionsAlgo 8180 SIP Audio Alerter
  • The Algo 8180 is both a SIP loud ringer and a paging speaker. It needs two FreePBX extensions, one for ringing and one for paging, and has an external-speaker output, an amplifier output and a dry-contact relay. A button on the back reads out its DHCP address, and the default login is algo. VoIP Supply sent the unit, and the host says Crosstalk has sold "a ton" of them.
  • Under chan_sip, the ringer needs its own extension plus Find Me/Follow Me. The host enables Follow Me with ring-all, initial ring time zero and both the phone and ringer extensions listed. He dislikes this because it ties up Follow Me, which you might want for ringing a cell phone.
  • PJSIP lets the ringer register as a second endpoint on the phone's extension. Raise the extension's max contacts from the default 1 to 2 and give the Algo the phone's credentials. The Algo supports only one SIP server, so the pager extension must move to PJSIP too, and the server's PJSIP port (5160 on his system, against the default 5060) goes on the SIP domain.
  • It is very loud. On the host's meter, a 44 dB room reached 107.6 dB at ring volume 4 of 10 and 123.6 dB at 10. For paging, Algo notes that most tones end in silence, so only the page-notify tone should be used; it also accepts multicast paging, and custom ringtones can be uploaded.
  • One unit can ring for up to five extensions, each with its own tone. In a warehouse, that lets staff tell whose phone is ringing from far away. The relay can trip on ring, on page only, or be disabled, and the host believes it is what drives Algo's strobe and colour-light visual alerters.
Technology and FriendsEpisode 541: JD Marymee on Blockchain
  • A blockchain builds trust among parties who don't trust each other. Marymee defines it as a replicated, distributed ledger running on untrusted hardware: where you trust a bank for its name and federal oversight, partners on a blockchain each hold a stake in the shared database, so if one forges an entry the others see it.
  • Trading partners can use a shared ledger to speed up reconciliation. His public case is Webjet, which he likens to an Expedia for Australasia: an online agency, the hotel and other partners normally reconcile across separate databases, which "take forever", and a ledger they all trust replaces that.
  • A private chain can attest licensed 3D-printed parts. For an unnamed customer, a vehicle part broken in the field could be printed on site, with the chain recording that the design was paid for, that it was printed, and the print conditions (temperature, tolerances) in case the part fails. In his hypothetical Department of Defense case, four branches plus the licensors make five actors, who would run their own nodes as a private chain.
  • A blockchain one party controls, or keeps secret, is a database. Marymee says customers who ask for blockchain because it is fashionable, then want to run it alone or encrypt it, want "the antithesis of a blockchain": its values are value transfer, attestation and transparency. Where details must stay private, his teams put only metadata on the chain and keep the details off chain with a reference.
  • Consensus is moving from proof of work to proof of stake. In proof of work, Bitcoin miners race on GPUs or ASICs to produce a hash and win Bitcoin, and public chains depend on no one holding a majority of nodes; Bitcoin is capped at about 21 million coins, after which, he says, "we'll see what happens". Proof of stake is like posting a bond, say $1 million, that a partner forfeits for forging, and Ethereum instead pays nodes "gas" in ether for executing transactions.
Technology and FriendsEpisode 540: Bill Wagner on Nullable Reference Types
  • C# 8 will treat reference types as non-nullable by default. Wagner, who writes the C# documentation for docs.microsoft.com, says the compiler will statically analyse the code and assume any reference type (string, List of T, any class) is never meant to be null, so null reference exceptions are caught at compile time; a nullable one is declared with a question mark, as in string?. C# was then at 7.3.
  • Turning it on produces warnings, not errors, because it breaks code. It is switched on per project or per file. Warnings mark a non-nullable variable the compiler cannot verify is never null, or a nullable one used without a null check, so Microsoft avoids "here's a thousand errors" after a compiler upgrade.
  • The team reused the question-mark syntax so adoption would be easy. The alternative, Wagner says, was three kinds of reference type (today's, never-null and maybe-null), which would have slowed adoption because nobody would sweep their code to change them. Code that already null-checks properly should compile mostly clean. In Mads's person example, first and last name are non-nullable and middle name is string?, which moves the warnings to where middle name is used.
  • The feature can be tried before C# 8 ships, which has no date. A CTP adds the nullable feature now, and Wagner expects public previews of Visual Studio 16 to carry a C# 8 preview, also undated; he advises trying it early to see what needs fixing before it is released.
Technology and FriendsEpisode 539: Brady Gaster on Marketing Azure
  • Gaster left engineering for Azure marketing to get back to the community. He moved from the ASP.NET and .NET team, then documentation, to the Azure marketing demo team, which builds the demos for Microsoft's keynotes and general sessions, including Scott Guthrie's keynotes and parts of the Ignite keynote.
  • Marketing shows how products work together, closer to customers' reality. Engineering goes deep on one topic, he says; on the demo team he looks across products (Functions with storage, adding AI) in the way he thinks customers actually have to.
  • Each demo is a storyline built around the new announcements. Months ahead, the team asks the lead speaker (for Scott Hanselman's Ignite general session, Hanselman plus five speakers) what to show and how it should feel, then works as a trio of the demo team, product marketing and the product group, prioritising what is new. For Connect 2017 they invented a hotel chain, Smart Hotel 360, with a Xamarin app that unlocks a door and Functions handling data.
  • Long-running steps are pre-baked, in what the team calls the "cookie show". Creating a VM takes five to ten minutes, so the presenter starts the process, then switches to one already made: "a few minutes later, here it is". Machines and web servers are also warmed up in advance so the first request is not slow.
  • Every demo machine has a live backup behind a KVM switch. Hanselman's session needed at least 12 computers, a primary and a backup for each of six presenters; Gaster saw three or four 40-foot tables double-stacked with machines, and stages use switches of up to 24 ports, so a presenter whose machine fails presses a button and carries on. He says his past job putting on concerts prepared him for Microsoft more than anything else.
Technology and FriendsEpisode 538 Jeff Fritz on Live Streaming Coding
  • Live coding replaces slow feedback with instant questions from viewers. Fritz codes live on Twitch in a "Bob Ross or Julia Child" style, but where TV cooks offered a recipe by stamped envelope weeks later, his viewers act as "pair programmers", flagging a missing parenthesis or asking why he did something. He aims it at learners who lack the money for books, training or conferences: C# and its tools are free, "so let's make learning it free, too".
  • One ongoing open-source project works better than a new build each week. Building something different each week was hard to sustain and lost viewers, so since March 2018 he has built Core Wiki, a wiki/CMS in ASP.NET Core that runs on Windows, Mac and Linux, on GitHub under csharpfritz. Viewers send pull requests he reviews on air; at one viewer's request he added a deploy-to-Azure button and an Azure DevOps build and release pipeline.
  • The setup is cheap; the main cost is a good video card. He streams through Twitch, whose transcoding is free, and names YouTube live and Microsoft's Mixer as alternatives; Azure Media Services would let you build your own service, but you pay for the networking. He composes scenes in the open-source OBS, switches them and plays sounds with a Stream Deck of 15 programmable LED keys, and has moved from a Logitech C920 webcam to a Razer Kiyo.
  • He moderates chat with Twitch's tools plus a bot of his own. The bot follows posted links and sends posted images to Cognitive Services to detect adult content, and it can ban an offender for five minutes; he invites Giard to help add Cognitive Services features to it.
  • He streams four mornings a week and archives each show to YouTube. At recording he had been streaming since November and had reached show 137, on Tuesday, Thursday, Friday and Saturday at 10 a.m. Eastern. He ran a month of .NET on a Mac in May and planned October 2018 as a month of .NET on Linux ("Ubuntu-ber"), with more F# to come.
Technology and FriendsEpisode 537: Robert Green on DevOps
  • DevOps is the ability to ship faster, at a pace you choose. Green, a senior program manager in Microsoft's commercial software engineering group, says it is not about shipping five times a day or weekly: it is about delivering value to users more quickly than one- to three-year release cycles do. Enterprise desktop users might want updates every two or three weeks, weekly in a busy season and monthly otherwise; he gets about four updates a week to the internal build of Outlook.
  • What changed was recognising the practices, plus tools that make them easy. The idea always existed, he says, but now there is tooling: TFS and its online version, renamed from Visual Studio Online to Visual Studio Team Services to Azure DevOps Services, or third-party and open-source tools such as Jenkins, mixed and matched as needed.
  • Continuous integration catches code that works alone but breaks together. A server builds the whole codebase on check-in and runs everyone's unit tests, not just your own, so a broken integration shows up right away and source control shows who made the change. He says CI can be set up in Azure DevOps or VSTS in 10 minutes.
  • Continuous deployment automates releases, with gates between environments. The build goes to testing and on to production once the test team signs off, and the developer can check in and leave without staying for build or deployment. More advanced practice rolls a release out to 5% or 10% of users first, for web, services and mobile apps.
  • Start with source control, then CI, then CD, then smaller releases. Any one step makes a team better, Green says, and from there practices can be adopted incrementally: release one bug fix, then a feature plus a fix, until the cycle drops from three months to three weeks or a week. Too many updates, he argues, is a better problem than too few and too slow; the Azure DevOps docs have walkthroughs for setting up CI/CD.
Technology and FriendsEpisode 536: Hao Luo on Rust
  • Rust is meant to replace C and C++ without their memory headaches. Luo, a senior software engineer in Microsoft's commercial software engineering org who is still learning the language, says Rust was created by Mozilla about three or four years earlier and targets pointer and memory management; he cites the newest Firefox, built on Rust, as proof it works at the scale of millions of users.
  • Rust is designed for developers, not just for the system. Package management was planned in before the first release, unlike NPM, which came after Node, and C and C++ have no standard package manager. Errors in the terminal point to the exact character, and a VS Code extension gives syntax highlighting and errors as you go.
  • Ownership is Rust's novel idea and its steepest learning curve. You specify which scope owns a variable, and its memory is freed immediately when that scope ends, which sits between garbage collection and manual memory management; lifetimes can be set per function parameter. It is statically typed, has traits rather than classes, encourages a functional style, and makes immutability the easier path. Luo says it is "really not similar" to JavaScript or PHP, so come to it without preconceptions.
  • Rust can be imported into JavaScript, through WebAssembly, for speed. With the Parcel bundler you can import a function straight from a .rs file, and Parcel compiles it to WebAssembly; the reason to do so, as he understands it, is performance, such as matrix multiplication in a tight loop. He learned from the official documentation, "The Book", and the podcast New Rustacean.
  • His bot library Wolf replaces chains of if statements with declarations. He and a teammate, Kevin, built Bot Builder Wolf: you declare the "slots" to collect, such as name, age and workplace, and when a user gives three of five in one sentence, Wolf asks only for what is missing, rather than the developer coding every branch.
Technology and FriendsEpisode 535: Rajasa Savant on Serverless Azure
  • Serverless means the servers are hidden from you, not absent. Savant, a Microsoft developer in Commercial Software Engineering who works mostly on serverless and sometimes IoT, says Azure handles where code is deployed, the maintenance and updates, and moving it between VMs, so the developer manages only their own code.
  • Azure Functions bindings remove the integration code, including authentication. A function is invoked by a trigger (a timer, an event hub, an HTTP request, a queue message, blob storage) and its output goes through a binding. For a blob storage output binding you supply only the container, the path and a connection string, and the binding handles authentication; she compares Functions with AWS Lambda.
  • Logic Apps is an executable flowchart of drag-and-drop connectors. A ticket workflow that sends emails is built by dropping in an Outlook connector and filling in its address and subject, with no code. She says there are more than 200 connectors, including third-party ones such as Twitter and Facebook, as well as Databricks and Azure Storage.
  • Event Grid routes notifications between services when something happens. She calls it a fairly new offering: a queuing system for events, used to notify one microservice when an event occurs on another.
  • The three combine into one end-to-end messaging pipeline. In her example a message goes into Event Grid, which triggers a function that preprocesses it and sends it through Event Hubs to a second function for sentiment analysis with Cognitive Services; bindings then store the result in Cosmos DB or Azure SQL. Logic Apps can orchestrate the whole flow and send an email when a conversation starts.
GCastGCast 20: Creating an Azure Function in Visual Studio
  • Visual Studio offers Azure Functions as a project type. Giard creates one in Visual Studio 2017 under File, New Project, and says a missing template means the latest Azure SDK and tooling are not installed. The trigger choices listed are blob insert, Cosmos DB, event hub, HTTP request, queue, service bus and timer. He picks the HTTP trigger, which needs a storage account; for local testing he uses the storage emulator installed with the SDK rather than one in Azure.
  • The template's code greets a name or returns a bad request. The boilerplate looks for a name parameter in the query string, then in the request body. It returns HTTP 200 with "Hello, <name>" if it finds one, and HTTP 400 with "Please pass a name on the query string or in the request body" if not. Giard says the code can be changed to do anything, such as write to a database or call another function or web service. The FunctionName decoration sets the function's name, which he changes from "Function1" to his own.
  • The function runs and is tested locally before any deployment. Running it compiles and hosts the function locally, and the console window ends with a local URL. In a browser, that URL with no parameter returned the 400; adding ?name=David returned 200 and "Hello David".
  • Right-click publishing is quick but not for real use. Giard publishes by right-clicking the function app and choosing Publish, but warns "don't do this in the real world": code should go into source control and continuous integration. The Publish dialog creates a new App Service, or uses an existing one. He gives it a function app name that must be unique, a new resource group, Central US, and a new storage account on default settings.
  • A Visual Studio–deployed function cannot be edited in the portal. In the portal it shows only metadata, not code; changing it means editing in Visual Studio and redeploying. Giard thinks that is probably the better model, because it is easier to get the code into source control from Visual Studio. It can still be tested there with Run (a POST, with the name in the body or as a parameter). It can also be called at its Azure URL, which carries a long code Azure appends for security, and it accepts both GET and POST.
GCastGCast 19: Creating an Azure Function in the Azure Portal
  • A function app must be created first to hold the functions. Giard calls Azure Functions "serverless" because the server is abstracted away, not absent: apart from choosing Windows or Linux, he never deals with it. In portal.azure.com the function app is under Create a resource, Compute. Its name becomes a <name>.azurewebsites.net URL, so it must be unique. He picks the consumption plan because it charges only when the function runs, which suits code that runs infrequently. Other choices are Central US, a .NET runtime (JavaScript or Java are also offered), a storage account, and optional Application Insights; creation took about 60 seconds.
  • The trigger decides when the function's code runs. New functions can be built in Visual Studio, VS Code, another editor, or in the portal; Giard uses the in-portal option here and leaves the others for a later episode. The quick choices are "Webhook + API", which runs on an HTTP GET or POST and makes the function a web service, and a timer that runs every X seconds. Other templates fire on a message dropped on a queue, event hub or service bus, or on a change in a database. He picks the HTTP trigger and keeps the default name, though he says a meaningful name is better.
  • The sample C# code returns a greeting or a bad request. It logs information, which Giard notes is one way of debugging. It reads name from the query string or the request body, which it deserializes with Newtonsoft.Json. With a name, it returns HTTP 200 and "Hello, <name>"; without one, HTTP 400 and a message asking for a name.
  • The function can be tested in the portal, browser or HTTP tools. The portal's Run button sends a POST with the body pre-filled as name "Azure", and it accepts a query parameter instead. The function URL is the app's azurewebsites.net address plus /api and a long key, which Giard says can be given to users to protect the function. Pasted into a browser, it needs &name= appended because the key is already a query parameter. He says Postman, Fiddler or one's own code work too.
GCastGCast 18: Azure Data Factory
  • Azure Data Factory is SSIS-style ETL that runs in the cloud. Giard describes it as a cloud integration tool for extract, transform and load. He compares it to SQL Server Integration Services, which came free with SQL Server but runs on-premises. His demo moves a comma-delimited file from an Azure Blob Storage container named "Imports" into an empty Customers table in Azure SQL Database. The file has four rows of first name, last name, city and state, and he built the table to the same schema, though he says a transform would let them differ.
  • Copy Data is a wizard reached from Author & Monitor. Giard creates the factory with the latest version, in the same resource group as the database and storage account to make them easier to manage. He says the location should be close to the data to minimize latency; he uses East US, and creation took about 30 seconds. Author & Monitor opens a new browser tab, where he chooses Copy Data. He picks "run once" over a regular schedule, because he likes to test before scheduling, and says he would later schedule it to pick up a file of each day's new customers.
  • The source connector auto-detects the file format. Giard makes a new Azure Blob Storage connection, filtering the long connector list by "Azure", and browses to the container, which he says is analogous to a folder. The wizard guessed the format from the file itself: comma column delimiter and carriage-return/line-feed row delimiter, either of which can be changed. With no header row, it named the columns Prop 0 to Prop 3, and he renames them in the schema.
  • The destination needs a connection, a table and a column mapping. Giard connects to the Azure SQL Database with SQL authentication as the server's admin user, and tests the connection before saving. He then picks the target table, which he notes matters once a database has several. The wizard mapped the renamed columns to the table columns in order, which can be changed, and it offers optional pre-copy scripts.
  • By default, the first bad row aborts the whole copy. For bad rows, such as a string going into a number column or a value too long for its column, the alternative is to skip them and optionally log them. Giard keeps abort because he wants to know about a problem. In the Monitor tab, the run showed in progress after about six seconds and then succeeded, and the four rows appeared in the table.
Technology and FriendsEpisode 534: Raymond Comvalius on Transitioning to the Modern Workplace with Windows 10
  • Large companies could not finish each Windows 10 upgrade within its support window. Comvalius, an independent consultant and trainer for 20 years, says each version had 18 months of support, and testing, building and deploying across thousands of seats can take 18 months, so the next version is out before rollout ends. Microsoft announced a change to the enterprise and education support period the month before; the transcript's new figure, "13 months", contradicts his point and is unreliable. The version with 10 years of support, the long-term servicing channel, is not meant to run Office, so most companies cannot use it.
  • Desktop Analytics predicts which applications will break before an upgrade. An agent on each client sends data to the company's Azure tenant, and Microsoft's analysis, which in the new version also covers custom in-house apps by the APIs they use, leaves at most about 10% of applications to test by hand. The product is Windows Analytics renamed as Desktop Analytics.
  • Applications that run on the older Windows are now guaranteed to run. Microsoft guarantees that an application running on Windows 7 will run on Windows 10; if one does not, it can be submitted to Microsoft, which will create the fix; Windows 10 keeps a large database of compatibility shims, such as those from the Vista era, that trick old apps into working.
  • Microsoft says to stop building images and deploy with Autopilot. A device is registered in the cloud and, the first time it boots online, it finds its profile, enrolls in Intune and pulls down the company's apps and settings. New devices can then ship straight to users, even at home, freeing IT staff, though cloud licences are required.
  • Intune can finally deploy ordinary Win32 applications. Comvalius calls this the main restriction of Microsoft's cloud device management until now; it is "not perfect, but it's moving in the right direction".
GCastGCast 17: Azure CosmosDB with Other APIs
  • Cosmos DB's other APIs let existing apps move without major rewrites. Giard's case is an application already on MongoDB. Choosing MongoDB as the API at creation lets it move to Cosmos DB for its global distribution, scalability and speed without modifying a lot of its code. The API is chosen per account, and each account gets its own <name>.documents.azure.com REST endpoint.
  • Each API needs a separate Cosmos DB account. Giard creates four in one resource group, all in Central US because he is in Chicago: MongoDB, Cassandra, Azure Table, and Gremlin, which he describes as the graph API. He says to place an account near the applications or users. He names each one after its API so he can tell them apart, and all four finished deploying in about five minutes.
  • The non-SQL Quick Starts give code samples, not a full app. Unlike the SQL API's downloadable .NET to-do application from the previous episode, the MongoDB Quick Start gives a connection string and snippets. Its fuller samples cover CRUD (create, read, update, delete) in .NET, Node.js, the MongoDB shell, Java and Python, with links on migrating to Cosmos DB. The Table and Cassandra Quick Starts offer .NET, Node.js, Java and Python, plus shell for Cassandra. Gremlin offers .NET and the Gremlin console, and a downloadable Visual Studio application once a container is created.
  • Per-API libraries hide the REST calls underneath. Giard says every API is REST under the hood, abstracted away by the libraries for each API. He presents the Quick Start code as something to copy into an application and modify.
GCastGCast 16: Azure CosmosDB with SQL API
  • Cosmos DB is fast because it enforces no schema. Giard describes it as a globally distributed, highly scalable NoSQL database that evolved from Azure DocumentDB. "NoSQL" here means the database enforces no schema, relationships or referential integrity. He says that is why it can be very scalable and very fast.
  • One database service offers several APIs to ease migration. The API is chosen at creation: SQL, MongoDB, Cassandra, Azure Table or Graph. Giard says code already using one of these can be moved to Cosmos DB more simply for its scalability, global distribution and fault tolerance. The account name becomes a <name>.documents.azure.com endpoint, so it must be unique. He picks the SQL API and Central US, leaves the other defaults, and says creation takes a couple of minutes.
  • Quick Start builds a collection and a runnable sample app. Quick Start offers SQL API samples in .NET, .NET Core, Xamarin, Java, Node.js and Python. Choosing .NET Core and "Create Items collection" creates the collection and downloads a zip holding a Visual Studio 2017 solution. It relies on the NuGet package Microsoft.Azure.DocumentDB.Core, which Giard says keeps Cosmos DB's original name. He describes it as an abstraction layer over the REST API that uses syntax very similar to SQL.
  • The sample code covers CRUD but hard-codes its credentials. Giard calls the key and URL in the repository code "a very bad practice"; they belong in a config file. The constructor creates the "ToDoList" database and the "Items" collection if they do not exist. Every method is async because each one is a web-service call across the internet. They include GetItemAsync by ID, GetItemsAsync filtered by a boolean expression, and create, update and delete. He suggests using it as a starting point rather than as is, because it is specific to a to-do list.
  • Items added in the sample app appear as JSON documents. The sample is an ASP.NET Core web application for a to-do list. Giard adds three items, and they show up in the portal's Data Explorer stored as JSON documents.
Technology and FriendsEpisode 533: Jeffrey Palermo on DevOps for Mid-Market Companies
  • Enterprise DevOps messaging misses mid-market teams, which have no dev/ops divide. Palermo is CEO and chief architect of Clear Measure in Austin, which sells DevOps architecture and automation to Microsoft-platform teams. He says the interpersonal dev-and-ops changes fit Fortune 500 firms, but at mid-market companies (about $500 million to $1 billion in revenue, often in warehousing, logistics or insurance, with developers reporting to a CFO) the developers already get the phone call when something goes down in the middle of the night.
  • Mid-market companies can adopt a simpler pipeline faster than enterprises. The template is the same, but with less legacy technology and inertia they can be more nimble, while in an enterprise each step can take a month or more to configure.
  • One build script runs locally and in CI; deployment uses packages. Move source control to Git, write a private build script developers run locally, and have the continuous integration build in Azure Repos run the same script plus extra tests. It packages the components into NuGet (Azure Artifacts), and the Azure Pipelines release hub deploys them across environments. For virtual machines or complex deployments he adds Octopus Deploy, and for significant databases Redgate's SQL change tools.
  • Stream all application logs to one place and query them. Beyond exception alerts, this lets a team know what the application is actually doing, so it can approach a user about a problem before the user reports it.
  • Microsoft-built systems belong in Azure. Palermo argues a system built on Microsoft technologies "fits like a glove" there; it can run on AWS, but with much more work yourself.
Technology and FriendsEpisode 532: Christos Matskas on Visual Studio for Mac
  • Visual Studio for Mac is Xamarin Studio, extended to cross-platform workloads. Matskas, its new product marketing manager, says it grew from the tooling Microsoft acquired with Xamarin two years earlier. It now adds .NET Core, ASP.NET Core and Azure Functions (develop, debug and deploy to Azure), with ASP.NET Core/.NET Core and Xamarin the biggest workloads. Windows-only workloads such as WPF, which rely on native Windows APIs, are not available.
  • Every .NET developer should also be a mobile developer. Matskas argues that existing .NET skills carry over to mobile apps through Xamarin, for enterprises or pet projects. Xamarin Forms gives WinForms and WebForms veterans a familiar experience: one control that renders as the native control on each platform.
  • One solution can be worked on from Windows and Mac. A UWP project in the solution cannot be edited on the Mac, but the shared code can, and pushing views into shared components can bring code reuse up to 90%, leaving a thin layer of UI tweaks. VS for Mac also does watchOS and Apple TV apps and .NET Standard libraries.
  • It matches Visual Studio for Windows on most tooling, except extensions. It is a full IDE using Roslyn for IntelliSense, unlike the text-editor-plus-extensions VS Code, and supports deployment to Azure, Git, TFVC through an extension, and the same Community (free), Pro and Enterprise licences under the same login. It has far fewer extensions, which Matskas concedes is a limitation for some users.
  • It is the default IDE for Unity game developers. Scenes are built in Unity's graphical editor, and when C# scripts need editing or debugging the work moves to Visual Studio for Mac, which is integrated with Unity's editor.
Crosstalk SolutionsSolar Powered WiFi Part 3
  • Unprotected outdoor components fail within a year. The host's $50 Bluetooth dongle for the Victron BlueSolar 75/15 MPPT charge controller died after a year in a non-weatherproof box, so this rebuild moves everything into a locking 14 x 11 x 5 inch NEMA-rated polycarbonate/ABS pole-mount enclosure on an 8-foot cemented pole. He sized the box with room for a future switch.
  • Brandon Yarborough would oversize panels after the Indonesia build. Crosstalk's wireless ISP expert powered each UniFi mesh access point from a 50 W panel for the Castaways TV project, but foliage cut direct sun to 3–4 hours of an expected 12, and the system had outages during the monsoons. In hindsight he would use 75 W or 100 W panels.
  • A 100 W monocrystalline panel easily powers one NanoStation. Replacing a 45 W Harbor Freight panel with a Renogy 100 W 12 V panel raised yield from 10–20 Wh to 60–70 Wh a day. With only the NanoStation attached, the controller spent over 50% of each day in float (about 75% on sunny days), and the link never dropped in UNMS over a month of summer.
  • The design stays DC throughout to avoid conversion losses. Power runs from the controller's load output through a 12 V-to-24 V boost converter into a gigabit PoE injector, then through a Ubiquiti ETH-SP surge protector grounded to a 4-foot copper rod. A camera can draw 24 V passive PoE from the NanoStation's passthrough port. Brandon says an inverter to 110 V would waste efficiency. Everything is fused, with a 35 Ah 12 V deep-cycle battery. The mount was made for 3-inch pipe, so the thinner pole wobbles.
  • Adding a G3 camera exceeds this setup on the Oregon coast. At roughly 150 Wh a day of consumption the panel was maxed out. The NanoStation and UVC G3 ran around the clock for about eight days, then the controller's low-voltage cutoff left them up only 14–16 hours a day (off from about 5–6 a.m. to 4–6 p.m.). The host expects winter to cut that to about a third of the day. He guesses doubling to 200 W plus a second parallel battery might keep it up 24 hours but did not test it, so he removed the camera.
GCastGCast 15: Creating an Azure Web App
  • A web app's name must be globally unique because it becomes its URL. Giard creates it from "Create a resource" > Web > Web App; the name becomes the public address http://<name>.azurewebsites.net (his demo is dgtestweb). The app can run on Windows, Linux or a Docker container. Creation took about a minute and produced a sample page at that URL.
  • The App Service plan sets both the hosting location and the machine size. Giard says to place it near your users, near any back-end resources the app calls, and near yourself while building; being in Chicago, he picks Central US. The pricing tier buys more or faster processors, more memory and solid state drives; he takes the standard tier.
  • Web apps support ASP.NET, PHP, Python, Java and Node. The settings choose which languages are on and their versions, for example Python 2.x or 3.x, along with the default page and authentication or authorization.
  • Code can be deployed by FTP, through staging slots, or continuous deployment. Deployment credentials set an FTP username and password. Deployment slots give a staging copy to test in Azure and then swap into production, and several slots can serve different test stages. Continuous integration and deployment can pull from Visual Studio Team Services, OneDrive, a local Git repository or GitHub.
  • Giard values that all App Services share one feature set. Web apps, mobile apps, logic apps and web services get the same settings, so, as he puts it, a feature added to one is added to all. Hosting them on the same platform also makes it easier for one to call another and pass identities between them.
Technology and FriendsEpisode 531: Walt Ritscher on LinkedIn Learning
  • LinkedIn's job data steers which courses get made and recommended. Ritscher, a LinkedIn Learning staff instructor and former Lynda.com contract author, says LinkedIn bought Lynda.com for its training quality and feeds its "economic graph" of jobs and skills into planning courses six to 12 months out and into spotting skills a member is missing against thousands of people in the same job. With over 14,000 courses across tech, creative and business, he frames the problem as filtering down to what is relevant, including skills a learner does not know they need.
  • Visual Studio was too big for one essential-training course. Ritscher says even an eight-hour course could not cover it, so he proposed a series, one area per course (debugging, the code editors, 90 minutes on IntelliSense), totalling about 15 courses and almost 40 hours. He has also run a weekly five-minute Visual Studio tips series for about a year; his favourite feature is Ctrl-Q, which searches every menu command and dialog.
  • Authors build the whole course; production handles the rest. Instructors write the curriculum, demos and slides; as staff, Ritscher records in his home office while the production department does editing and art, with English courses made at Carpinteria, California and foreign-language ones in Graz, Austria. He puts output at about 150 courses a month in around seven languages, Chinese and Portuguese newly added, and says Azure instructors are wanted, though established instructors have already picked their courses for the next two or three quarters.
  • The company is steering customers from Lynda.com to LinkedIn Learning. Ritscher says the same content publishes to both sites and millions still use lynda.com, but LinkedIn suits enterprise sales to Fortune 100 and 500 companies better. LinkedIn Learning can be bought alone and is bundled with most premium LinkedIn accounts.
  • His planned Azure course is a developer overview, not a deep dive. Ritscher says Azure is too large to cover whole, so he intends to show what is essential for developers (web apps, databases and storage, Azure Functions, Logic Apps) a little at a time, decided only the week before and possibly becoming a series. He also plans a VS Code course for Q1 of the following year.
Technology and FriendsEpisode 530: Chris Woodruff on HTTP and REST
  • Developers use HTTP constantly without understanding its language. Woodruff argues that most people do not know what HTTP can give them and so underuse it in REST APIs. He describes REST, from Roy Fielding's PhD dissertation (which he places at the University of Texas), as building on HTTP's own constraints rather than inventing everything from scratch.
  • Every request is a sentence: a verb acting on a resource. Woodruff says each request needs a verb and a resource identified by a URI, and developers should know what each verb means: GET retrieves, POST creates or sends new information, PUT updates, DELETE deletes. He points to lesser-used ones: HEAD returns everything but the response body, so it can check whether a large resource exists, and OPTIONS is the call seen before cross-origin (CORS) requests to validate that the verb is allowed.
  • APIs should return the status code that says precisely what happened. Woodruff says the response code tells the caller whether it succeeded, whether the client or the server failed, and what to do next: 2xx is success, 4xx a client error such as a bad URI or missing authentication, 5xx a server error. A successful DELETE should return 204, success with no body, while a GET should return 200 with the resource in the body.
  • Design caching in from the start. Woodruff says he has been burned by trying to wedge caching into a finished system. He urges caching on the server side (ASP.NET Core 2.1 Web API or Node) and using HTTP response headers that mark resources cacheable and for how long; because HTTP is only a protocol, a client calling an API from JavaScript or .NET must implement that caching itself or through a library, though some browsers do it built in.