Souk's Notes - Unofficial Summaries
GCastGCast 49: Angular pt 8: HTTP
- An in-memory web API stands in for a real REST back end. In the tutorial's last lesson,
HttpClientModuleis imported inapp.module.ts, the in-memory web API is installed with npm, and a CLI-generated in-memory data service holds the hero array; its id generator takes the maximum existing id plus one, or 11 if the list is empty. Giard notes a real app would put a database behind it. - The hero service now fetches through HTTP with piped error handling.
HeroServiceinjectsHttpClientand callshttp.get<Hero[]>onapi/heroes, orapi/heroes/plus an id for one hero, with the web API doing the filtering. RxJStapandcatchErrorare piped in for logging and a generichandleErrorthat logs to the console and the on-screen messages; Giard likens this to aspect-oriented programming. - Fetching per view loses edits, so changes are saved with PUT. Once every view re-queries the web API, a name edited in the detail view no longer shows elsewhere. A save button calls
updateHero, anhttp.puttoapi/heroeswith a content-typeapplication/jsonheader, after which changes persist — until the app recycles, which any saved code change triggers, resetting the in-memory store. - Adding a hero POSTs it and pushes it onto the local list. A name box and add button call
add, which trims the name, stops if empty, and callsaddHero(anhttp.post). Giard says pushing the result onto the local array saves a round trip, at the cost of not seeing other users' changes until a full refresh. - Deleting removes the hero locally and on the server. An "X" button on each list item filters the hero out of the local array and calls
deleteHero, which accepts a hero or just its id and sendshttp.deletetoapi/heroes/plus the id. Giard defers the lesson's remaining search feature to a next video because this one ran long.
Crosstalk SolutionsBudget 10Gbps Networking
- Two servers can share 10 Gbps networking for under $250. The host's build totalled $322.80 shipped using fiber, but with two 1-meter DAC cables instead it comes to $242.24 (switch $141.28, two NICs $68.98, cables $31.98), or about $250 with 3-meter DACs; servers not included. In his iperf3 tests between two Ubuntu 16.04 servers he measured 9.4 Gbps one way and 9.41 Gbps the other.
- The MikroTik CRS305-1G-4S+IN is a cheap, capable switch but backordered. It is a five-port desktop switch with one Gigabit Ethernet port and four 10 Gbps SFP+ ports, plus redundant DC power inputs taking 12–57 V from two separate circuits. As of recording on April 10, Baltic Networks listed it for pre-order at $124.25 for the third week of May; the host waited about eight weeks for his, ordered in late 2018.
- Used Chelsio T320 dual-port cards work, but check the bracket. On Tom Lawrence of Lawrence Systems' recommendation he bought them on eBay at $29.99 each; listed as full-height, they arrived with low-profile brackets, so he removed the bracket and seated them loose. For production servers he would buy a current-generation card (about $166 on Amazon) for longer support.
- DAC cables are much cheaper than SFP+ modules plus fiber. A fiber link needs two SFP+ modules ($20.99 each) and an LC-to-LC multimode cable (about $14), around $56; a 3-meter DAC is $18.99, a 1-meter about $15.99, and 7-meter about $42. His 10Gtek SFP+ modules coded for Ubiquiti worked fine in the MikroTik.
- A factory-reset MikroTik has no gateway or DNS configured. It defaults to 192.168.88.1, user admin, no password, so you must put your own computer on 192.168.88.0/24 to reach it, then use Winbox's Quick Set (bridge mode, static) to set your LAN address, gateway, DNS, identity and an admin password. Ubuntu 16.04 had the Chelsio drivers built in; the card's second port appeared as "rename3".
GCastGCast 48: Angular pt 7: Routing
- Angular routing picks a view from the URL, on the client. Giard compares it to routing in ASP.NET MVC or Ruby on Rails, with the difference that those frameworks route on the server. The episode, which continues his walk through the angular.io tutorial, splits the single page into three routed views: a dashboard of top heroes, the full hero list, and a hero detail.
- A CLI-generated routing module holds the routes and initializes the router. The CLI command generates an app routing module and adds its import to
app.module.ts. Giard drops the component declarations from the module, exports it, and adds a route made of a path (heroes) and the component to load there. He then initializes the router in the module's imports with those routes. A<router-outlet>tag in the app component replaces the hard-coded heroes tag and marks where views load, so/heroesnow shows the heroes component. - A dashboard component becomes the default route. It is generated with
ng generate component dashboardand uses the hero service'sgetHeroes, withheroes.slice(1,5), which Giard says returns the first five heroes. An empty path redirects todashboardwith a full path match, so the barelocalhostaddress opens the dashboard. Router links to both the dashboard and the heroes list go on the main page. - The detail route takes the hero ID as a parameter. The path is
detail/:id, where the colon marksidas a value rather than a literal word. Both the dashboard and the heroes list now use anchor tags with a router link to the detail path plus the hero's ID, which replaces the earlier click-boundonSelectwith what Giard calls something more declarative. The detail component injects ActivatedRoute, the hero service and Location, reads the ID from the route, and subscribes to a newgetHero(id)service method, which logs a "fetched hero id" message and finds the hero in the still hard-coded list. Edits made in the detail view carry across views because of two-way data binding. - A back button returns to whichever view the user came from. A
goBackmethod in the detail component uses the browser's location, which Giard likens to hitting the browser's back button. In the demo it returns to the dashboard or the hero list, depending on where the detail was opened from.
GCastGCast 47: Angular pt 6: Services
- Moving data access into a service prepares it for swapping.
ng generate service herocreates aHeroServicewhosegetHeroesstill returns the hard-coded mock array; Giard says a real one would call a web service backed by a database. Its@Injectabledecorator supports dependency injection, which he says makes it easy to swap the mock for a web call and to supply different dependencies under test. - The component receives the service through its constructor. The heroes component declares
heroeswithout initializing it, injectsheroServicein the constructor, and calls its owngetHeroesfromngOnInit, which in turn calls the service; the app looks unchanged. - Returning an observable makes the call asynchronous. Giard argues web calls should be asynchronous because of latency, so
getHeroesreturns an RxJSObservable<Hero[]>and the component subscribes, settingthis.heroeswhen data arrives; a delayed response then would not lock the UI. - A message service gives the user visible feedback. A new messages component (added to the app component) and a
MessageServiceholding an array of strings with add and clear methods are generated; injecting it intoHeroService— one service using another — logs "fetched heroes". The messages template loops the array with*ngFor, offers a clear button, and sits inside*ngIfon the array's length, since zero is falsy.
GCastGCast 46: Angular pt 5: Master Detail Components
- The selected-hero markup moves into its own detail component. Giard generates it with
ng generate component hero-detail, which creates the folder with CSS, HTML and TS files. The selected-hero section of the heroes component's HTML template moves into the new component's template, for what he calls better separation of concerns. The heroes template now holds an<app-hero-detail>tag matching the new component's selector, with itsheroset to the selected hero. - An
@Inputdecorator lets a parent pass data into a component. The detail component importsInputand the hero class, then declares aheroproperty decorated with@Input, which marks it as settable from an outside component. Giard describes it as essentially a parameter. After the refactor the app behaves as before: highlighting, selection and data binding still work, which is the expected result.
GCastGCast 45: Angular pt 4: Displaying a List
- A repeat directive renders a list whose length is unknown. A hard-coded, exported array of 10 heroes in
mock-heroes.tsis imported into the heroes component as aheroesproperty;*ngFor="let hero of heroes"on anlioutputs one item per element. Giard explains the star as repeating the element itself, not just its contents, and frames it as needed because data from a database could hold ten or a hundred items. - Parentheses around an event name bind it to a component method.
(click)="onSelect(hero)"calls a newonSelectthat sets aselectedHeroproperty, replacing the hard-coded hero in the detail section; the bindings must be renamed toselectedHero.nameandselectedHero.id. - An uninitialized selection breaks the page until hidden with a conditional. The browser console (F12) showed "unable to get property name of undefined or null" because
selectedHerostarts empty. Giard notes one fix is to preselect a hero; the tutorial's is wrapping the section in*ngIf, which keeps a falsy value (false, zero, null or undefined) out of the DOM entirely rather than just hiding it. - A conditional class binding highlights the selected item.
[class.selected]="hero === selectedHero"applies the stylesheet'sselectedclass to whichever item was clicked; the styles, pasted into the empty generatedheroes.component.css, also give a hover effect.
GCastGCast 44: Angular pt 3: The Hero Editor
- The CLI generates a component as four files.
ng generate component heroescreates.html,.spec.ts,.tsand.cssfiles in aheroessubfolder ofsrc/app; the class is exported so other components can use it, and its@Componentdecorator maps theapp-heroesselector to the template and stylesheets. It also implementsOnInit, which Giard says will matter later for dependency injection. - Placing a component's tag nests it inside another. Adding
<app-heroes>toapp.component.htmlrenders the heroes template under the title, showing a hard-coded hero name through one-way{{hero}}binding. - Binding a whole object prints "[object Object]", not its fields. Once
herobecomes an instance of a newHeroclass (anidnumber and anamestring, inhero.ts, imported into the component), the template must bindhero.idandhero.name. A pipe such as| uppercasetransforms a bound value while keeping it bound. - Two-way binding silently does nothing until the forms module is imported.
[(ngModel)]="hero.name"— the syntax "people call a banana in a box" — on a text box updates the property and everything bound to it as the user types. On first save the page showed no output untilFormsModulefrom@angular/formswas imported and added to the imports inapp.module.ts, which Giard calls a kind of global settings file.
GCastGCast 43: Angular pt 2: The Application Shell
- The tutorial app starts as a fresh CLI project. Giard begins the angular.io Tour of Heroes tutorial with
ng new angular-tour-of-heroes, accepting defaults, opens the folder in Visual Studio Code withcode ., and serves it withng serve --openon port 4200. - The shell is the generated app stripped to a title. He sets the component's
titleto "Tour of Heroes", replaces the template's boilerplate links, image and "Welcome to" text with just the bound title in an h1, and adds styles; he also removesrouter-outlet, saying it returns in a later video. - Each lesson ends with the final code to compare against. Giard points to the tutorial's code listing for the changed files as the fallback when an app does not look right, and notes it mislabels the stylesheet as
styles.csswhere, he says, the file isapp.component.css.
Technology and FriendsEpisode 558: Melanie Adcock on TechMonthChicago
- Tech Month Chicago publicises existing events rather than curating new ones. Adcock modelled it on Chicago Artists Month, which ran for 20 years: one October calendar of events already happening, promoted to the general public. She counts 465 tech meetups in the Chicago area on meetup.com, over 100 co-working and innovation spaces, and over 100 STEM events a month in the Chicago Public Library system; the event is in its fourth year.
- Free donated venues let anyone host an event. She says about 14 or 15 venues a year offer their space at no charge for Tech Month events, so someone who cannot afford a room can still give a talk or throw a party; her role is connecting and promoting, not speaking or providing space.
- Community organisers get no coverage, so she broadcasts them herself. For three years she has volunteered a radio show on Lumpen Radio (105.5 FM WLPN, a non-commercial 501(c)(3) station, Fridays at 1 p.m., which she says she does twice a month), interviewing about 100 organisers of STEM, women in tech and other community events rather than CEOs. Outlets, she says, list the "top five" of some 400 monthly events; her examples are Carol Davids's Next Generation 911 conference at IIT and Marge Johnson's class at NEIU teaching senior citizens to write business plans, which Adcock is auditing.
- Her interview archive will become a printed newspaper this October. She plans to transcribe the archives, cut them down with an AI tool and repeated editing, and print them as Tech Voice Chicago with the Lumpen Times, a print publication of about 25 years. Her case is that Chicago, the third-largest city, is on "nobody's radar" as a tech community while coverage chases corruption and money.
- Self-funding has cost her money, so sponsorship starts this year. The radio work is volunteer and Tech Month is an LLC she hopes to turn at least partly into a non-profit foundation; she says she has lost money paying for it herself, and this year adds a sponsorship program with print, digital and experiential tracks and a revamped calendar website. Her day job is Tech Copy Authority, writing white papers and web copy for tech companies.
Technology and FriendsEpisode 557: Brent Stineman on the Evolution of Serverless
- Serverless means handing over code and letting the platform wire triggers. Stineman defines it as a managed sandbox: you publish code and the platform team creates the sandbox and fires it on triggers such as an HTTP request, a file landing in storage, a message on a queue or a schedule. Pricing runs from a dedicated 24x7 environment to paying per execution for the time it runs; Azure Functions is one such technology.
- Each step up the stack trades control for less responsibility. He traces the path from physical servers to virtual machines (you still own the OS and installation), to platform as a service (no OS access but control over your application files), to serverless, where the sandbox allows almost nothing but you no longer wire up the triggers; snippets can run from one to a thousand lines.
- Serverless is one more orchestrator, not an architecture. Stineman says people confuse orchestrators with architectural patterns: the old web server, Kubernetes for containers and Azure Service Fabric for processes all connect requests to code, and PaaS and serverless are further orchestrators offering different controls for building microservices.
- If you care about the OS image, it is not serverless. Asked whether Kubernetes-managed containers count, he calls it an "almost religious war" and gives his own line: serverless means you have stopped caring about the underlying operating system. An application that needs things installed on the server is therefore probably a poor fit.
- Start small instead of mandating serverless from hype. He warns against adopting it "because I read it in a magazine airplane" and suggests a first use such as hosting 20–30 lines of Python called from a data pipeline; Giard adds that it could then serve several pipelines and notes Azure Functions supports Python. Stineman says the platforms let this grow into a REST API composed of dozens of functions behind one interface.
GCastGCast 42: Angular pt 1: Getting Started
- Angular needs Node.js, an editor and the Angular CLI. The angular.io quick start asks for Node.js version 8.x or 10.x. Giard notes that 10.15.3 is current at nodejs.org as of April 2019, and that npm comes with Node rather than as a separate install. He prefers Visual Studio Code, which is free for Windows, Mac and Linux. The CLI is installed globally with
npm install -g @angular/cli. This is the first episode of a series that walks through the angular.io tutorial. ng newscaffolds a working app with default options. Giard runsng new my-app, the name the tutorial uses, and presses Enter to accept every default. The command pulls down the required Angular components and some optional ones, and creates amy-appfolder withsrc/appinside.- An Angular tag in index.html is resolved by a TypeScript component. The
<app-root>tag inindex.htmlmatches the selector inapp.component.ts, and that component loadsapp.component.htmlas its template. Giard explains that TypeScript is strongly typed and transpiles to JavaScript, which the browser needs, but that it is easier to work with because of the typing. - Double curly braces give one-way data binding. The template's
{{title}}displays the component'stitleproperty, which is set to "my app".ng serve --openbuilds the app, listens on localhost 4200 and opens a browser. When Giard changes the title to "My first Angular app" and saves, the page reloads by itself with the new heading. - Component styles come from an array of style sheets. The component's
styleUrlsis an array that holds one file,app.component.css. The CLI creates that file empty. Giard pastes in a rule that changes the H1 font, and the heading picks it up. He says the next video starts building the tutorial's app for maintaining a list of superheroes.
Technology and FriendsEpisode 557: Brent Stineman on the Evolution of Serverless
- Serverless means handing over code; the platform owns the plumbing. Stineman defines it as a managed sandbox that runs a chunk of code when a trigger fires (an HTTP request, a file landing in storage, a message on a queue, or a schedule), with the Azure team responsible for the sandbox and the trigger wiring. Because the platform manages the sandbox, he says pricing can range from a dedicated environment up 24x7 to paying per execution for the time the code runs, chosen up front.
- Each step down the stack trades control for less responsibility. He traces the path from physical servers to virtual machines (you keep the OS and the wiring), to platform as a service (no OS access, but control over your application's files), to serverless, where the sandbox allows almost nothing but you no longer wire up triggers; snippets can run from one to a thousand lines of code.
- Serverless and Kubernetes are just different kinds of orchestrator. Stineman compares the old web server such as IIS, which connected requests to applications, with Kubernetes for containers and Azure Service Fabric for processes; he argues all of these, PaaS and serverless included, are orchestrators enabling microservice architectures, and that people confuse orchestrators with architectural patterns.
- Code tied to its operating system is a poor serverless fit. Asked whether containers under Kubernetes count, he calls the question an "almost religious war" and gives his personal view: what makes serverless distinct is giving up caring about the underlying OS, so an application that needs things installed on the server is probably not right for it.
- Start serverless with small pieces, not a mandate. Stineman warns against going serverless "because I read it in a magazine" and suggests beginning with something like 20–30 lines of Python that is too much to manage inside a data pipeline but needs to run somewhere, or is called from several pipelines; the host suggests Azure Functions, which supports Python. He adds that platforms let you grow into, for example, a REST API composed of dozens of functions behind one interface.
GCastGCast 41: Using the PowerPoint Selection Pane
- The selection pane lists every object on a slide. It sits on the Home ribbon under Select, and selecting an object on the slide highlights its entry in the pane. Giard says it took him years of using PowerPoint to find it because it is "really hidden".
- The eye icon hides an object without removing it. Clicking the eye next to an entry makes that object disappear from view while it stays on the slide; clicking again brings it back. Giard's use is overlapping objects: hide the ones in front, edit the one behind, then unhide them.
- Renaming objects replaces PowerPoint's unhelpful default names. Two triangles he draws come out as "Isosceles Triangle 9" and "Isosceles Triangle 4"; double-clicking the entry or pressing F2 lets him give each a name that means something to him while designing.
- Names plus hiding make crowded animated slides editable. His example is a slide with dozens of objects and animations showing messages flowing from devices into an IoT hub. A naming convention (message 1A comes from device 1, then 1B, and so on) tells him which object is which, so he hides 5A and 5B to work on 5C's animation path alone, reroutes it to the top of the IoT hub, then unhides the rest.
GCastGCast 40: IoT Hubs
- Azure IoT Hub is the two-way gateway between devices and the cloud. Giard describes it as built to collect messages from sensor devices (temperature, location, soil moisture and the like) and to send messages back to them; it is scalable because the traffic is typically many small messages. Once data is in the hub it can be routed onward to databases, code, queues, analytics or a Power BI portal.
- Only registered devices can talk to the hub; others are rejected. Adding a device, which Giard thinks of as registering it, tells the hub in advance which devices to expect, and a rogue device sending a message is refused. Each device also gets a secure key, and the device authenticates with its name and that key.
- A hub is created in the portal like most Azure resources. From portal.azure.com, "Create a resource", under Internet of Things, he picks a subscription, a new resource group, a region and a unique hub name. The optional Size and Scale tab offers a free tier and a standard tier; he takes one instance of standard, which he gives as $25 a month, and notes the hub can be scaled up or out to multiple instances. Deployment took about three minutes in the 2019 recording.
- Devices are added under IoT devices, with keys supplied or generated. The IoT devices blade sits under Explorers; Add asks for a device ID (he uses sequential numbers) and an authentication type, since the hub supports only secure authentication. With a symmetric key you can clear a checkbox and supply your own keys, or let the hub generate them and then send them down to the device; he leaves the other defaults. With many devices, the list can be filtered by a clause such as a device ID match.
Crosstalk SolutionsRaspberry Pi Surveillance Monitor v2
synopsis
The host rebuilds his Raspberry Pi desk monitor so that it shows four cameras from RTSP streams, on two cables, and comes back to the same view by itself after a reboot; the video ends with all four feeds returning untouched after a restart, and with a verdict of a solid, inexpensive monitoring station let down only by the display's acrylic case.
Criteria and hardware. Version 1 showed one camera through UniFi Video in full-screen mode and kept timing out. Version 2 uses RTSP, so it works with UniFi Video, UniFi Protect or any RTSP system. A PoE HAT powers the Pi from the network cable, and the 8-inch 1280x800 IPS display ($75 on Amazon) carries the Pi on its back, though any HDMI screen will do. The monitor flickered on its micro USB cable, so he powers it from a brick. The vendor supplied the units, and one of the two was dead on arrival.
Preparing the Pi. He writes Raspbian Stretch Lite, which has no desktop, to an 8 GB class 10 card and adds an empty ssh file so he can log in without a keyboard. In raspi-config he changes the password and sets wait-for-network at boot, because the display service is useless before the streams can be reached. He also expands the filesystem and raises the GPU split from 64 MB to the 256 MB maximum.
Configuring displaycameras. He installs displaycameras 0.8.3.3, following a Self Hosted Home blog post. Its layout file needs pixel coordinates, and there is no 1280x800 example, so he works out quadrants such as 0,0–639,399. He enables Protect's medium 1024x576 RTSP streams, checks them in VLC and pastes them in. A rotate delay, five seconds by default, swaps between pages of cameras where there are more than four.
- Version 2 uses RTSP streams instead of a full-screen camera app. Version 1 showed a single camera through UniFi Video in full-screen mode and kept timing out; this build shows four cameras, works with UniFi Video, UniFi Protect or any RTSP-capable system, and boots straight to the camera view so nobody has to remember passwords or config months later.
- Two cables suffice when a PoE HAT powers the Pi. One cable powers the monitor and one Ethernet cable feeds the Raspberry Pi; a Pi 3 Model B+ on Wi-Fi would also need just two power cables. Whether the monitor's second micro USB port can pass power through to the Pi is speculation the host had not yet tested.
- The display's picture is good but its build quality is not. The $75 8-inch 1280x800 IPS screen from Amazon is cased in cut acrylic sheet, whose protective film must be peeled off while the screws are out; its micro USB cable made the 5 V 2 A monitor flicker, so the host used a power brick. The vendor offered him the monitors; of the two he asked for, one was dead on arrival, so there is no giveaway.
- Make the Pi wait for the network and maximise GPU memory. The setup is Raspbian Stretch Lite (the 13 November 2018 image) on an 8 GB class 10 card, with an empty
sshfile to enable SSH. In raspi-config, "wait for network at boot" stops the display service starting before the RTSP feeds can be reached, and the GPU split goes from the 64 MB default to the 256 MB maximum. - The displaycameras layout file needs pixel coordinates worked out per screen. Version 0.8.3.3, following a Self Hosted Home blog post, ships no 1280x800 example, so the quadrants run 0,0–639,399, 640,0–1279,399 and so on. The host used Protect's medium 1024x576 stream (high is 1920x1080), noted port 7447 for remote access, and tested URLs in VLC first.
Technology and FriendsEpisode 556: Bret Stateham on IoT Edge
- IoT is an old concept rebranded around cloud platforms. Stateham, a software development engineer in Microsoft's commercial software engineering division, says embedded devices and distributed messaging have existed for decades; what is new is cloud services and an ecosystem of devices, protocols and frameworks that replace "roll your own" with using a platform's services, which he says simplifies and accelerates development.
- IoT Edge is a gateway for devices that cannot reach IoT Hub. He says Azure IoT Hub, the core ingestion, device registry and two-way messaging service, requires TLS/SSL, which low-powered microcontrollers often lack the processing power for; other devices only speak Bluetooth, Zigbee or serial protocols such as CAN bus, Modbus, RS-485 or RS-232, are too remote, or lose connection temporarily, as in a tunnel. An Edge device is a Windows or Linux machine, as small as a Raspberry Pi, running Docker and the Edge runtime, that talks to devices in their own protocols and aggregates, filters or forwards their messages to IoT Hub.
- Processing on the Edge cuts round-trip latency and cloud traffic. Stateham says analytics that would otherwise run in Azure Functions, Stream Analytics or machine learning can run on the Edge device, which matters where a slow response could damage the device or a person; it can also summarize or filter what goes to the cloud. Light, low-latency work stays local and heavier work goes to the cloud, and the hardware need only be as powerful as that processing requires.
- The Edge runtime caches messages when connectivity breaks. Even for devices that could connect directly, he says routing through Edge means the runtime holds messages during an outage without any code being written, whereas a directly connected device leaves the developer to decide whether, how much and when to cache and resend.
- Edge modules are any Docker container, deployed centrally from the cloud. He describes a security daemon (Linux) or service (Windows) plus two system containers, the Edge agent for orchestration and the Edge hub as a local IoT Hub, downloaded on first run so they are current. Your own modules can be in any language, using SDKs for C#, Node.js, Java, Python or C to join Edge messaging, published to a registry such as Azure Container Registry or Docker Hub; a cloud "deployment" then configures every matching Edge device, though the OS, Docker (or Moby) and the device's IoT Hub identity must still be put on it initially.
Crosstalk SolutionsUniFi Protect
synopsis
The host likes UniFi Protect, especially its playback, but concludes that it is not a UniFi Video replacement: it suits homes and small offices with five or six cameras that are not mission-critical, while Ubiquiti's own wording suggests UniFi Video 3 will be the last version.
Hardware and limits. Protect runs only on the $199 Cloud Key Gen2 Plus and only with Ubiquiti cameras. Ubiquiti recommends at most 20 cameras, or 15 alongside the SDN controller. The host has tested four, and he doubts larger systems belong on a single drive with no redundancy.
The interface. Cameras record all the time at 15 fps and a 3,000 kbps variable bitrate, with no motion-only mode. Motion and privacy zones, live views, events and a time-lapse scrubber all work smoothly, including on the mobile app over LTE. He lists missing features: view-only roles, multi-select downloads, view cycling and alert scheduling.
Storage. Three cameras used about 650 GB in 15 days, roughly 600 MB per camera per hour. That matches Ubiquiti's claim of 1,600 hours per terabyte, or about 20 days for three cameras on the stock drive.
Protect versus UniFi Video. On his reading of the FAQ, UniFi Video gets maintenance but no development. Crosstalk stopped selling UniFi Video servers in early 2019. He speculates that the rename and the locked-down hardware point to a wider security platform.
- Keep Protect to about six non-mission-critical cameras. Protect runs only on the $199 Cloud Key Gen2 Plus and only with Ubiquiti cameras. Ubiquiti recommends at most 20 cameras, or 15 alongside the UniFi SDN controller. The host would stop at about half a dozen because the single drive (1 TB, upgradable to 5 TB) has no redundancy; he has tested only four.
- Protect records continuously, with no motion-only option. UniFi Video usually defaulted to motion-only recording to save disk. Protect's cameras default to 15 fps and a variable 3,000 kbps maximum bitrate, which drops when the scene is static. Privacy zones, which black out part of the frame, are new compared with UniFi Video; the host found RTSP output hit-and-miss.
- The host found Ubiquiti's 1,600-hour storage claim accurate. Three cameras at default settings used about 650 GB over 15 days, which works out to roughly 14.4 GB per camera per day, or about 600 MB an hour; 1,600 hours at that rate is about 960 GB. By his rough estimate, the stock 1 TB drive holds about 20 days for three cameras and 10–11 days for six.
- Playback and the mobile app are strong, but admin features are thin. Scrubbing through footage is fast, even over LTE on the app, which connects through Ubiquiti's cloud without open firewall ports. What is missing as of recording: view-only roles (every user is an administrator), multi-select event download, view cycling and alert scheduling. His outdoor camera sent alerts every five minutes in rain.
- The host reads Ubiquiti's FAQ as making UniFi Video 3 final. Ubiquiti promises security updates, bug fixes and new G3 camera support, which he takes to mean no new features and no version 4. Crosstalk stopped selling UniFi Video servers at the start of 2019, over thin margins and that uncertainty. He speculates Protect will reach the UniFi Application Server XG and gain doorbells and sensors.
GCastGCast 39: Azure Search REST API
- Azure Search is queried through a REST API.
Giard says the .NET SDK is just a wrapper for that API, and so is the
portal's Search Explorer, which sends a GET to
https://<service name>.search.windows.net, then the index name and/docs, with the API version andsearch=plus a term in the query string. He calls this GET route not very flexible. His demo index holds 497 documents, one per row of an Azure table listing his past presentations (built in the previous episode). - Give users the query key, not the admin keys. Giard says the primary and secondary admin keys are for using the REST API to make changes, such as creating a service or importing data, which he did through the portal instead. Query keys are what you hand to users: less powerful, so less of a security risk.
- A POST request is more flexible but needs a tool or code.
The portal cannot send it, so Giard uses Postman (free, from
getpostman.com); Fiddler or your own code also work. The URL is
/indexes/<index name>/docs/searchplus the api-version query string, with two headers:api-keyset to the query key, and a Content-Type of application/json. - The JSON body selects, filters and sorts the results.
In his demo, select
*returns every field; a filter on state equal to 'IL' (single-quoted because it is a string) returns only Illinois rows; and ordering by presentation date descending sorts them newest first. Giard says almost any language or platform can make the same HTTP request.
GCastGCast 38: Azure Search
- Azure Search indexes your own private content as a search engine. Giard compares it to how Google and Bing index the public internet: it exposes searchable content from behind your firewall. For the demo he first uses Azure Storage Explorer to import a CSV of about 500 of his past presentations into an Azure Table Storage table.
- The free pricing tier is for learning, not production. The service is created from the portal's green plus button by searching for "Azure search", then setting a name, resource group (he keeps it in the same group as the storage, though that is not required), location (West US) and pricing tier. Giard says the free tier cannot be scaled, while paid tiers scale further the more you pay, and you get only one free Azure Search per Azure account. He would not use the free tier in production.
- Importing data can create the index for you. Rather than using Add index and entering fields by hand, Giard uses Import data. The sources offered are Azure SQL, SQL Server on a VM, Cosmos DB, blob storage and table storage. The wizard infers the fields from the table's columns, and each field can be marked retrievable (returned in results), filterable or sortable, one at a time or all at once from the top checkbox.
- The index stays empty until its indexer runs. The indexer does the actual indexing. It can be scheduled hourly, daily or on a custom schedule ("every 17 minutes starting on a certain time"); Giard runs it once instead, so he doesn't have to wait for the first scheduled run. The index shows zero documents while the indexer runs, then 497, one per row of data.
GCastGCast 37: Managing Blobs with the Azure Storage Explorer
- Storage Explorer opens straight into the account from the portal. The free, lightweight Microsoft tool runs on Windows, Mac and Linux, and the storage account's overview tab carries a download link. With it installed, the open button launches the app if needed and goes directly to that storage account.
- Blob "folders" are really just part of the blob name. Giard creates and renames containers with a right-click, then uploads a folder of pictures into a folder inside one container. He says containers hold no real folders: the slashes in the name only make it look like one, though it is still a useful way to organize. The upload asks for block or page blob; single files can be uploaded too, and the uploads show up in the portal as well.
- Deleting can be hard or soft, and soft can be undone. Blobs open in the application associated with their file type, and can be renamed and multi-selected with Control or Shift, as in Windows Explorer. With soft delete turned on, as in his setup, a deleted blob can be undeleted within the next seven days. Selected blobs can also be downloaded to a local folder.
- A blob URL returns 404 until you allow public access. Giard copies a blob's URL to use, for example, as an image source on a web page. It fails for security reasons until the container's public access level is set to public read for containers and blobs, or for blobs only; either allows anonymous access. He suggests this for images, videos and other assets served to a public web application.
GCastGCast 36: Managing Tables with the Azure Storage Explorer
- Storage Explorer handles table data the portal makes awkward. Giard says some of what the portal does is powerful, but manipulating data in a table from the browser is hard. Storage Explorer is a free Microsoft client for Windows, Mac and Linux, launched from "Open in Explorer" on the storage account's overview page. A new account shows only the tables Azure creates internally to manage itself.
- Table rows need keys, not a shared schema. After creating a table, Giard adds a row by hand with a partition key, a row key and extra typed properties (a string and a double). Not every row has to have the same schema, but every row must have a partition key and a unique row key.
- CSV import reads the headers and guesses each column's type. It previews the first row and lets you change things before Insert. His file of 497 past presentations plus the one hand-added row gave 498 cached items. Rows can then be edited in place.
- Column Options reorders the display, but not by drag-and-drop. Columns can be removed or moved up and down; Giard says drag-and-drop would be nice. The table can also be exported back to a comma-separated file, and statistics generated for it.
- Select all and delete empties a table. Rows can be multi-selected with Control or Shift, and Select All covers either the current page or every item in the table. An activity log records each operation and can be cleared.
Technology and FriendsEpisode 555: Kevin Griffin on What's New in SignalR
- SignalR lagged behind .NET Core, and the stopgap only mostly worked. Griffin, who runs the consultancy SwiftKick, says the library was not ported when .NET Core arrived, so the team wrapped the old SignalR for ASP.NET Core; he deployed that in a client application and found it worked "well enough" but not as well as a native version. He says the full ASP.NET Core release came out "back in September last year" (the episode is recorded in January).
- Azure SignalR Service removes the sticky-session constraint of self-hosting. Griffin says self-hosted SignalR on Azure with WebSockets is supposed to use sticky sessions, so a client behind a load balancer across, say, three nodes always hits one node, which defeats load balancing if that node lags or fails. With the hosted service all WebSocket traffic goes through Azure and is redirected to the application; Giard adds that this also hands a hard load-balancing problem to other engineers.
- Streaming sends results in chunks and lets abandoned calls stop server-side. In Griffin's example of a call returning 100,000 rows, a traditional hub sends everything at once and keeps sending after the client disconnects, then throws; streaming lets the server start returning data before it is all loaded and cancel when the client does. He says SignalR also adapts the batch size to the connection, from one item at a time on a slow link to 10–20 on a fast one.
- SignalR's value is the server pushing state changes to every open client. Griffin says his client work uses it for individual features rather than whole applications: for one client, a background process checks every couple of minutes for new forum private messages and notifies every open instance of the site. He says clients need not be web pages — a .NET console app or a Xamarin mobile app works too — and the server treats each simply as a connection.
- The official documentation is the best place to start. Griffin calls Microsoft's docs the single best source; he has contributed to docs.microsoft.com and says the team reviews pull requests rigorously for accuracy, mostly checking that things are done "the Microsoft way". SignalR needs no separate SDK: he says it ships in the ASP.NET Core meta packages installed with Visual Studio's ASP.NET Core option.
Crosstalk SolutionsUS-24 & US-24-250W Setup w/Fan Replacement
- The two UniFi 24-port switches switch identically; PoE is the difference. Both the US-24 and US-24-250W do 24 Gbps non-blocking throughput and 52 Gbps switching capacity, with 24 gigabit ports and two 1 Gbps SFP (not SFP+) ports. The host says he cannot recall one failing across many installs, though some 48-port PoE models have. Only the US-24 has a 24 V DC input, and its rack ears are detachable.
- The PoE model costs nearly twice the non-PoE switch. On Amazon on the day of recording, the US-24 was about $199, the US-24-250W $379.98 and the 500 W version $528.49. The host notes the PoE model also supports 802.3af, 802.3at PoE+ and per-port 24 V passive, which he uses on one port to power a NanoStation.
- The host says the 500 W model is almost never needed. His arithmetic: a UAP-AC-HD, Ubiquiti's largest access point, draws about 5.5 W, so 24 of them total about 132 W. That leaves roughly 100 W of the 250 W budget, and phones and UVC G3 cameras draw 3–4 W each. His firm rarely sells the 500 W model.
- The US-24-250W proved too loud for a desk. The datasheet gives four fan levels at 9.1, 14.2, 16.8 and 21.2 dB. The host measured 64.9 dB beside its fans against about 42 dB ambient, 55 dB beside the US-24, and 51–52 dB at his desk. After several days it was distracting him and showing up in his video audio.
- Swapping in Noctua fans did not make it quieter. The case held only two 40 mm fans, not the four he expected. The Noctuas arrived as the 5 V version rather than 12 V (about $26 for two), needed their screw holes drilled out to 3/16 inch, and needed their 2-pin adapter. They read 69–71 dB against 65–70 dB for the stock fans; cutting out the side grates (which voids the warranty) brought them back to about stock level. He plans to move the switch under his desk.
Crosstalk SolutionsDomain Name Outlet SCAM!
- Domain Names Outlet offers a domain it does not own. The host received an email at the WhoisGuard address for crosstalkwireless.net offering crosstalkwireless.com for a one-time $99 (the sales page said $99.95), with a year of registration and transfer included. The link was flagged as untrusted, the only contact is a generic email address, and he judges the customer testimonials probably fake.
- The .com was simply available to register for $8.88. A search at Namecheap, his usual registrar, showed crosstalkwireless.com free, and he bought it there for $8.88; he says other registrars are cheaper still. His inference is that the company watches for .com names becoming available and emails owners of the matching .net, claiming to sell a name anyone can buy.
- The host says the real target is non-technical staff. In many organizations domain renewals go to accounting or another department that may not recognize the scam. He advises warning those people so they come to the technical staff before paying for a domain, and notes that a WHOIS search would show the name is free.
Technology and FriendsEpisode 554: Ondrej Balas on 2-Factor Authentication
- Phishing tools now defeat code-based two-factor authentication. Balas says a convincing email (his example: a fake $5 Amazon credit for a late delivery) leads the victim to a lookalike site that relays the real credentials to the real site in the background. The real site then sends a real text code, which the victim types into the fake site, and the attacker logs in as them. He names a recently released tool by a Polish researcher, Modlishka, that automates this against any site it is pointed at.
- Hardware security keys resist this, by Google's account. Balas presents Universal Two-Factor (U2F), a standard developed jointly by Google and Yubico, which makes USB keys, some of which also work over NFC with a phone. He reads a quote from an article saying Google has had "no reported or confirmed account takeovers" since adopting security keys, about a year and a half earlier. In his phone demo on Yubico's demo site, registering and logging in with a YubiKey Neo took a tap against the phone.
- FIDO is the standards body; FIDO2 adds passwordless login. Balas says FIDO (Fast Identity Online) maintains CTAP1 and CTAP2, the client-to-authenticator protocols; CTAP1 is also called U2F, and the keys are loosely called FIDO keys. FIDO2 is newer and not yet widely adopted, and allows a "passwordless single factor" login with the key alone. FIDO says this can be more secure than SMS, and he expects keys with fingerprint readers so a stolen key is useless.
- For a new app, he recommends authenticator-app one-time passwords. Balas says the common step up from SMS is a time-based one-time password from Google or Microsoft Authenticator, with device and server generating the same code every 30 seconds from a shared key. As of ASP.NET Core 2.1, this is built into the templates when you choose individual user accounts, so it runs almost out of the box.
- Supporting keys yourself is more work; identity providers mostly do it already. For U2F/FIDO1 he points to the U2F.core .NET library on NuGet; there is a separate FIDO2 library he has not yet used. Apps that rely on IdentityServer or cloud services such as Auth0 can leave it to them, and he thinks most have implemented it. He recommends Scott Brady's blog, which has a FIDO2 primer and a working proof of concept.
Technology and FriendsEpisode 553: Jennifer Marsman on AI for Earth
synopsis
Marsman presents AI for Earth as more than a grant program: Microsoft funds outside conservation work and also builds shared machine-learning tools, and the grantees' projects show what it pays for.
The program. Brad Smith announced $50 million over five years in December 2017, after a June start at $2 million, for agriculture, water, climate and biodiversity. Anyone may apply, and grants are reviewed quarterly. Marsman, the principal engineer, owns engineering, evangelism and education.
Engineering. With Microsoft Research, whose FarmBeats precision-agriculture work drew her in, the team builds models for needs common to many grantees, such as species classification and land cover mapping, that could become APIs.
Grantee projects. USC is piloting infrared drones that spot people at night and follow anyone who is not a known ranger. Wild Me's Wildbook tells individual animals apart by their markings, and an agent searches YouTube nightly, translates the posts and comments to ask where a sighting was. Marsman recalls a reply rate of at least about 50% and about 80% net-new data, and stresses that Microsoft only funds this work.
Where it is heading. Marsman calls the team "startup-y": two PMs and a PM lead, plus about four technical staff. Grants have moved from credit-card-backed Azure accounts to academic accounts, and now include cash and paid data labeling.
- AI for Earth puts Microsoft's cloud and ML expertise toward conservation. Marsman says Microsoft president Brad Smith announced in Paris in December 2017 a commitment of $50 million over five years for data science and machine learning work on agriculture, water, climate change and biodiversity. The team had started that June with $2 million. Anyone can apply, from nonprofits and academics to large companies and individuals, and grants are reviewed every quarter.
- The team builds generic APIs on top of funding grantees. Marsman, its principal engineer, owns engineering, evangelism and education. The engineering work, with Microsoft Research, spots needs common to many grantees and builds models that might become APIs, perhaps like a Cognitive Service: species classification from an image, and pixel-level land cover mapping from overhead imagery. Education meets grantees where they are, from nonprofits new to ML to ML postdocs who need help training at scale on Azure.
- A University of Southern California grantee uses drones to spot poachers. Drones over large African conservancies send back a real-time infrared feed, because most poaching happens at night and body heat shows up. Any person who is not a known ranger or patroller is treated as a poacher and the drone follows them. Marsman says this is being piloted, with plans to deploy.
- Wild Me identifies individual animals and mines YouTube for sightings. Its Wildbook platform tells individual animals apart by unique markings such as zebra stripes, whale shark spots and giraffe patterns. An agent searches YouTube every night at 10 p.m., translates posts into English with Microsoft Cognitive Services, extracts frames, and asks in a comment for the time and place of a sighting. From memory, Marsman puts the reply rate at "around 50% at least" and the share of net-new data at about 80%; Microsoft funds the work and does not do it.
- Grants have widened beyond Azure credits. Early grants were Azure compute credits on sponsor accounts that needed a credit card, which Marsman disliked for grad students who might leave a machine running, so they moved to academic accounts. There are now also cash grants and data-labeling grants that pay people, including specialists who can recognise leaf blight, to label training data. The team is small: two PMs and a PM lead who run the grant program, plus about four researchers, data scientists and engineers.
Technology and FriendsEpisode 552: Hilary Weaver-Robb on API and Front End Testing
- Testing starts with the requirements, before code exists. Weaver-Robb, a software quality architect at Quicken Loans, says testers often hold the team together by catching vague requirements the business analyst handed off on the assumption that people would ask. A vague requirement can be built one way, tested another and expected a third, so she calls a "Three Amigos" meeting of the developer, the BA and the tester to clear up the assumptions.
- Testers inform the release decision; they are not gatekeepers. She has been the test lead who held a release back, and says QA then gets blamed as the bottleneck while the CTO who releases anyway "gets to be the good guy". Her job is to give stakeholders the issues, concerns and her opinion on go or no-go, and let them decide.
- Test within the sprint, as soon as code exists. She calls testing at the end "water fragile". The team's definition of done should include testing, which can take days to a week, not just finishing the code. With stories sized at about six to eight hours, she expects to start testing a day or two after the engineers start writing.
- Write test automation in the production language and repository. That is her stated practice, and on her Node and React projects it has meant learning JavaScript after .NET. She uses Postman for manual API testing, and SuperTest with the Mocha framework for automated API tests. Knowing the application's overall architecture matters more to her than knowing every serverless implementation detail.
- Automate the stable API before the changing UI. UI automation is slower to write and run, and fragile while the interface keeps changing, so she made the API tests the priority and runs them in the CI/CD pipeline on every merge. Front-end testing is manual for now, in Chrome only because the site is internal, using DevTools to watch how the front end talks to the API.
GCastGCast 35: Customizing Microsoft Teams
- Teams comes with Office 365 licenses. Giard says an organization with Office 365 licenses probably has Teams deployed too, and if not, to ask the IT department "why the heck not". The Teams item on the left-hand menu lists the teams you have favorited.
- Private teams need an owner's approval to join. "Join or create a team" offers templates, building from scratch, or creating from an Office 365 group. Anyone can add themselves to a public team. For a private team, a request emails an owner, who must approve it. Only a name is required; the description is optional. Members can be found in the Active Directory, or added by email address if they are outside it.
- Every channel starts with Conversations, Files and Wiki tabs. A team gets one channel by default (General). More channels are added from the ellipsis next to the team, with an option to automatically favorite the channel for every member. Conversations are threaded and messages can be liked or saved. Files can hold new folders or new Word, Excel or PowerPoint files, which open online and save automatically, or uploads of any file type. The wiki holds shared notes with some formatting.
- Extra tabs can pin a document or embed a website. The plus button offers tab templates for Office documents and third-party tools; Giard gives an important Word file its own tab so people need not hunt for it among the files. A website tab works only if Teams can reach the site and it uses HTTPS. Posting about the new tab to the channel is checked by default, and the embedded site's client-side JavaScript runs.
- Giard sees website tabs' real value in custom team apps. His suggestion is to build a web application specific to the team, for capturing data, sharing information or showing reports, deploy it (to Azure, say) and point a tab at it.
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
defaultliteral 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 3000returned 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-Keyheader carries the key; a Content-Type ofapplication/jsonmeans the body is{"url": ...}pointing to an image Cognitive Services can reach on the public web, whileapplication/octet-streammeans 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-Locationresponse 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-locationheader 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 takeslanguage("unknown" auto-detects) anddetectOrientation(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-streamormultipart/form-datawith the image in the body, orapplication/jsonwith aurlpointing 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
urlplus 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 withPostAsyncunderawait, 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.jsagainst 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.visualFeaturestakes a comma-delimited list (categories, tags, description, faces, image type, color, adult); leaving a feature out returns a smaller JSON response.detailstakes celebrities and/or landmarks, andlanguagewas then limited to English, Japanese, Portuguese and Chinese. The headers are the content type and theOcp-Apim-Subscription-Key. You can send a JSON body with aurlto a publicly reachable image, or send the image itself asapplication/octet-streamormultipart/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 anAuthorization: EndpointKey <key>header,Content-Type: application/jsonand 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,
awaitholds 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.