Subscribe: Scott Hanselman's Computer Zen
http://www.hanselman.com/blog/SyndicationService.asmx/GetAtom
Added By: Feedage Forager Feedage Grade A rated
Language: English
Tags:
code  core  iot  learn  led  net core  net  omega  onion omega  onion  particle  photon  scott hanselman  tessel  web  wyam 
Rate this Feed
Rate this feedRate this feedRate this feedRate this feedRate this feed
Rate this feed 1 starRate this feed 2 starRate this feed 3 starRate this feed 4 starRate this feed 5 star

Comments (0)

Feed Details and Statistics Feed Statistics
Preview: Scott Hanselman's Computer Zen

Scott Hanselman's Blog



Scott Hanselman on Programming, User Experience, The Zen of Computers and Life in General



 



Three FREE Training Courses on ASP.NET Core from Microsoft Virtual Academy

Tue, 17 Jan 2017 21:14:07 GMT

This time last year we did a Microsoft Virtual Academy class on what was then called "ASP.NET 5." It made sense to call it 5 since 5 > 4.6, right? But since then ASP.NET 5 has become .NET Core 1.0 and ASP.NET Core 1.0. It's 1.0 because it's smaller, newer, and different. As the .NET "full" framework marches on, on Windows, .NET Core is cross-platform and for the cloud. Command line concepts like dnx, dnu, and dnvm have been unified into a single "dotnet" driver. You can download .NET Core at http://dot.net and along with http://code.visualstudio.com you can get a web site up and running in 10 minutes on Windows, Mac, or many flavors of Linux. So, we've decided to update and refresh our Microsoft Virtual Academy. In fact, we've done three days of training. Introduction, Intermediate, and Cross-Platform and all three days are now available! We just released training for ASP.NET Core 1.0 Cross-Platform that shows Mac, Ubuntu, and Docker! Head over to Microsoft Virtual Academy and watch our new, free "Introduction to ASP.NET Core 1.0." It's a great relaxed pace if you've been out of the game for a bit, or you're a seasoned .NET "Full" developer who has avoided learning .NET Core thus far. If you don't know the C# language yet, check out our online C# tutorial first, then watch the video. Introduction to ASP.NET Core 1.0 Join experts Scott Hanselman and Maria Naggaga, and find out how to build .NET Core applications on any operating system. Bring your web development expertise and roll up your sleeves, for this first in a three-part series. Intermediate ASP.NET Core 1.0 Want a deeper dive into ASP.NET Core 1.0? Build on what you learned in Introduction to ASP.NET Core 1.0, and explore this new technology even further, as Scott Hanselman, Jeff Fritz, and Rowan Miller offer an in-depth, intermediate-level look at ASP.NET Core 1.0. ASP.NET Core 1.0 Cross-Platform Ready to build and deploy ASP.NET Core 1.0 apps? Join experts Scott Hanselman, Maria Naggaga, and Glenn Condron, and see how to do just that using Mac and Linux. Revisit content from the Introduction to ASP.NET Core 1.0 course, but using a Mac and Linux. Do us a favor when you watch these, rate them (5 stars!) and SHARE them on your social networks. NOTE: There's a LOT of quality free courseware for learning .NET Core and ASP.NET Core. We've put the best at http://asp.net/free-courses and I encourage you to check them out! Hope you have as much fun with these courses as we had creating them! Sponsor: Do you deploy the same application multiple times for each of your end customers? The team at Octopus have taken the pain out of multi-tenant deployments. Check out their latest 3.4 release© 2016 Scott Hanselman. All rights reserved.       [...]



Monday Vision, Daily Outcomes, Friday Reflection for Remote Team Management

Sun, 15 Jan 2017 08:21:14 GMT

My friend J.D. Meier has an amazing blog called Sources of Insight and he's written a fantastic book called Getting Results the Agile Way. You can buy his book on Amazon (it's free on Kindle Unlimited!). I put J.D. up there with David Allen and Stephen Covey except J.D. is undiscovered. For real. If you've seen my own live talk on Personal Productivity and Information Overload you know I reference J.D.'s work a lot. I've been a people manager as well as an IC (individual contributor) for a while now, and while I don't yet have the confidence to tell you I'm a good manager, I can tell you that I'm trying and that I'm introspective about my efforts. My small team applies J.D.'s technique of "Monday Vision, Daily Outcomes, Friday Reflection" to our own work. As he says, this is the heart of his results system. The way it works is, on Mondays, you figure out the 3 outcomes you want for the week.  Each day you identify 3 outcomes you want to accomplish.  On Friday, you reflect on 3 things going well and 3 things to improve.  It’s that simple. - J.D. Meier We are a remote team and we are in three different time zones so the "morning standup" doesn't really work so well for us. We want a "scrum" style standup, but we're a team that lives in Email/Slack/Microsoft Teams/Skype. Here's how Monday Vision works for us as a team. We are transparent about what we're working on and we are honest about what works and when we stumble. On Monday morning each of us emails the team with: What we hope to accomplish this week. Usually 3-5 things. This isn't a complete list of everything on our minds. It's just enough to give context and a vector/direction. It's important that we are clear on what our goals are. What would it take for this week to be amazing? What kinds of things are standing in our way? As a manager I think my job is primarily as traffic cop and support. My job is to get stuff out of my team's way. That might be paperwork, other teams, technical stuff, whatever is keeping them out of their flow. These emails might be as simple as this (~real) example from a team member. Last Week: DevIntersection Conference Workshop and 2 sessions Got approval from Hunter for new JavaScript functionality This Week: Trip Report, Expenses, and general administrivia from the event last week Final planning for MVP Summit Spring Planning for ASP.NET Web Forms, IIS Express, EF4, WCF, and more  Modern ASP.NET Web Forms research paper Thursday evening – presenting over Skype to the London.NET user-group “Introduction to Microservices in ASP.NET Core” Again, the lengths and amount of detail vary. Here's the challenge part though - and my team hasn't nailed this yet and that's mostly my fault - Friday Reflection. I have an appointment on my calendar for Friday at 4:30pm to Reflect. This is literally blocked out time to look back and ask these questions.... On Friday evening on the way out, email the team with: What worked this week? Why didn't Project Foo get done? Was the problem technical? Logistical? Organizational? Did you feel amazing about this week? Why? Why not? How can we make next week feel better? What do you do to kick off and close down your week? Related J.D. Meier productivity reading The Rule of 3 Life Frame How To Use Timeboxes for Getting Results Rituals for Results Sponsor: Big thanks to Raygun! Join 40,000+ developers who monitor their apps with Raygun. Understand the root cause of errors, crashes and performance issues in your software applications. Installs in minutes, try it today! © 2016 Scott Hanselman. All rights reserved.       [...]



What .NET Developers ought to know to start in 2017

Wed, 11 Jan 2017 02:56:54 GMT

Many many years ago I wrote a blog post about what .NET Developers ought to know. Unfortunately what was just a list of questions was abused by recruiters and others who used it as a harsh litmus test. There's a lot going on in the .NET space so I thought it would be nice to update with a gentler list that could be used as a study guide and glossary. Jon Galloway and I sat down and put together this list of terms and resources. Your first reaction might be "wow that's a lot of stuff, .NET sucks!" Most platforms have similar glossaries or barriers to entry. There's TLAs (three letter acronyms) in every language and computer ecosystems. Don't get overwhelmed, start with Need To Know and move slowly forward. Also, remember YOU decide when you want to draw the line. You don't need to know everything. Just know that every layer and label has something underneath it and the whatever program you're dealing with may be in a level you have yet to dig into. Draw a line under the stuff you need to know. Know that, and know you can look the other stuff up.  Some of us want the details – the internals. Others don't. You may learn from the Metal Up or from the Glass Back. Know your style, and revel in it. First, you can start learning .NET and C# online at https://dot.net. You can learn F# online here http://www.tryfsharp.org. Both sites let you write code without downloading anything. You just work in your browser. When you're ready, get .NET Core and Visual Studio Code at https://dot.net and start reading!  Need To Know What's .NET? .NET has some number of key components. We'll start with runtimes and languages. Here are the three main runtimes: .NET Framework - The .NET framework helps you create mobile, desktop, and web applications that run on Windows PCs, devices and servers. .NET Core - .NET Core gives you a fast and modular platform for creating server applications that run on Windows, Linux and Mac. Mono for Xamarin - Xamarin brings .NET to iOS and Android, reusing skills and code while getting access to the native APIs and performance. Mono is an open source .NET that was created before Xamarin and Microsoft joined together. Mono will support the .NET Standard as another great .NET runtime that is open source and flexible. You'll also find Mono in the Unity game development environment. Here are the main languages: C# is simple, powerful, type-safe, and object-oriented while retaining the expressiveness and elegance of C-style languages. Anyone familiar with C and similar languages will find few problems in adapting to C#. Check out the C# Guide to learn more about C# or try it in your browser at https://dot.net F# is a cross-platform, functional-first programming language that also supports traditional object-oriented and imperative programming. Check out the F# Guide to learn more about F# or try it in your browser at http://www.tryfsharp.org  Visual Basic is an easy language to learn that you can use to build a variety of applications that run on .NET. I started with VB many years ago. Where do I start? https://dot.net is where to download .NET Core and Visual Studio Code https://docs.microsoft.com is where the documentation is https://github.com/dotnet is where the open source code starts After runtimes and languages, there's platforms and frameworks. Frameworks define the APIs you can use. There's the .NET 4.6 Framework, the .NET Standard, etc. Sometimes you'll refer to them by name, or in code and configuration files as a TFM (see below) Platform (in the context of .NET) - Windows, Linux, Mac, Android, iOS, etc. This also includes Bitness, so x86 Windows is not x64 Windows. Each Linux distro is its own platform today as well. TFMs (Target Framework Moniker) - A moniker (string) that lets you refer to target framework + version combinations. For example, net462 (.NET 4.6.2), net35 (.NET 3.5), uap (Universal Windows Platform). For more information, see this blog post. Choosing a TFM decides which APIs are available to you, and [...]



Teaching coding from the Metal Up or from the Glass Back?

Fri, 06 Jan 2017 01:43:49 GMT

Maria on my team and I have been pairing (working in code and stuff together) occasionally in order to improve our coding and tech skills. We all have gaps and it's a good idea to go over the "digital fundamentals" every once in a while to make sure you've got things straight. (Follow up post on this topic tomorrow.) As we were whiteboarding and learning and alternating teaching each other (the best way to make sure you know a topic is to teach it to another person) I was getting the impression that, well, we weren't feeling each other's style. Now, before we get started, yes, this is a "there's two kinds of people in this world" post. But this isn't age, background, or gender related from what I can tell. I just think folks are wired a certain way.  Yes, this a post about generalities. Here's the idea. Just like there are kinesthetic learners and auditory learners and people who learn by repetition, in the computer world I think that some folks learn from the metal up and some folks learn from the glass back. Learning from Metal Up Computer Science instruction starts from the metal, most often. The computer's silicon is the metal. You start there and move up. You learn about CPUs, registers, you may learn Assembly or C, then move your way up over the years to a higher level language like Python or Java. Only then will you think about Web APIs and JSON. You don't learn anything about user interaction or user empathy. You don't learn about shipping updates or test driven development. You learn about algorithms and Turing. You build compilers and abstract syntax trees and frankly, you don't build anything useful from a human perspective. I wrote a file system driver in Minix. I created new languages and built parsers and lexers. When you type cnn.com and press enter, you can pretty much tell what happens from the address bar all the way down to electrons. AND YOU LOVE IT. You feel like you own the whole stack and you understand computers like your mechanic friends understand internal combustion engines. You'll open the hood of a car and look around before you drive it. You'll open up a decompiler and start poking around to learn. When you learn something new, you want to open it up and see what makes it tick. You want to see how it relates to what you already know. If you need to understand the implementation details then an abstraction is leaking. You know you will be successful because you can have a FEEL for the whole system from the computer science perspective. Are you this person? Were you wired this way or did you learn it? If you teach this way AND it lines up with how your students learn, everyone will be successful. Learning from the Glass Back Learning to code instruction starts from the monitor, most often. Or even the user's eyeballs. What will they experience? Let's start with a web page and move deeper towards the backend from there. You draw user interfaces and talk about user stories and what it looks like on the screen. You know the CPU is there and how it works but CPU internals don't light you up. If you wanted to learn more you know it's out there on YouTube or Wikipedia. But right now you want to build an application for PEOPLE an the nuts and bolts are less important.  When this person types cnn.com and presses enter they know what to expect and the intermediate steps are an implementation detail. You feel like you own the whole experience and you understand people and what they want from the computer. You want to drive a car around a while and get a feel for it before you pop the hood. You'll open F12 tools and start poking around to learn. When you learn something new, you want to see examples of how it's used in the real world so you can build upon them. If you need to understand the implementation details then someone in another department didn't do their job. You know you will be successful because you can have a FEEL for the whole system from the user's perspective. Are you this pers[...]



Exploring the Tessel 2 IoT and robotics development board

Tue, 27 Dec 2016 21:48:30 GMT

I'm still on vacation and still on the mend from surgery. I'm continuing to play around with IoT devices on my staycation. Last week I looked at these devices: Connecting my Particle Photon Internet of Things device to the Azure IoT Hub Playing with an Onion Omega IoT device to show live Blood Sugar on an OLED screen Today I'm messing with the Tessel 2. You can buy it from SparkFun for the next few weeks for US$40. The  Tessel is pretty cool as a tiny device because it includes WiFi on the board as well as two USB ports AND on-board Ethernet. It includes a two custom "module" ports where you can pop in 10-pin modules like Accelerometers, Climate sensors, IR and more. There's also community-created Tessel modules for things like Color Sensing and Motion. Tessel is programmable in JavaScript and runs Node. Here's the tech specs: 580MHz Mediatek MT7620n Linux built on OpenWRT 802.11bgn WiFi WEP, WPA, WPA2-PSK, WPA2-Enterprise 64MB DDR2 RAM 32MB Flash 16 pins GPIO, 7 of which support analog in 2 USB 2.0 ports with per-port power switching Tessel isn't a company, it's a open source project! They are on Twitter at @tesselproject and on GitHub here https://github.com/tessel. NOTE: Some users - including me - have had issues with some Windows machines not recognizing the Tessel 2 over USB. I spent some time exploring this thread on their support site and had to update its firmware but I haven't had issues since. Once you've plugged your Tessel in, you talk to it with their node based "t2" command line:>t2 listINFO Searching for nearby Tessels... USB Tessel-02A3226BCFA3 LAN Tessel-02A3226BCFA3 It's built on OpenWRT and you can even SSH into it if you want. I haven't needed to though as I just want to write JavaScript and push  projects to it. It's nice to know that you CAN get to the low-level stuff I you need to, though. For example, here's a basic "blink an LED" bit of code:// Import the interface to Tessel hardware var tessel = require('tessel'); // Turn one of the LEDs on to start. tessel.led[2].on(); // Blink! setInterval(function () { tessel.led[2].toggle(); tessel.led[3].toggle(); }, 600); console.log("I'm blinking! (Press CTRL + C to stop)"); The programming model is very familiar, and they've abstracted away the complexities of most of the hardware. Here's a GPS example:var tessel = require('tessel');var gpsLib = require('gps-a2235h');var gps = gpsLib.use(tessel.port['A']);// Wait until the module is connectedgps.on('ready', function () { console.log('GPS module powered and ready. Waiting for satellites...'); // Emit coordinates when we get a coordinate fix gps.on('coordinates', function (coords) { console.log('Lat:', coords.lat, '\tLon:', coords.lon, '\tTimestamp:', coords.timestamp); }); // Emit altitude when we get an altitude fix gps.on('altitude', function (alt) { console.log('Got an altitude of', alt.alt, 'meters (timestamp: ' + alt.timestamp + ')'); }); // Emitted when we have information about a fix on satellites gps.on('fix', function (data) { console.log(data.numSat, 'fixed.'); }); gps.on('dropped', function(){ // we dropped the gps signal console.log("gps signal dropped"); });});gps.on('error', function(err){ console.log("got this error", err);}); Of course, since it's using node and it has great Wifi or wired, the Tessel can also be a web server! Here we return the image from a USB camera.var av = require('tessel-av');var os = require('os');var http = require('http');var port = 8000;var camera = new av.Camera();http.createServer((request, response) => { response.writeHead(200, { 'Content-Type': 'image/jpg' }); camera.capture().pipe(response);}).listen(port, () => console.log(`http://${os.hostname()}.local:${port}`)); I'll make a Hello World webserver:var tessel = require('tessel'); var http = require('http'); var server = http.createServer(function (request, response) { response.writeHead(200, [...]



Connecting my Particle Photon Internet of Things device to the Azure IoT Hub

Tue, 20 Dec 2016 04:46:32 GMT

My vacation continues. Yesterday I had shoulder surgery (adhesive capsulitis release) so today I'm messing around with Azure IoT Hub. I had some devices on my desk - some of which I had never really gotten around to exploring - and I thought I'd see if I could accomplish something. I've got a Particle Photon here, as well as a Tessel 2, a LattePanda, Funduino, and Onion Omega. A few days ago I was able to get the Onion Omega to show my blood sugar on a small OLED screen, which was cool. Tonight I'm going to try to hook the Particle Photon up to the Azure IoT hub for monitoring. The Photon is a tiny little device with Wi-Fi built-in. It's super easy to setup and it has a cloud-based IDE with tons of examples written in C and Node for you to use. Particle Photon also has a node based command line. From there you can list out your Photons, see their available functions, and even call functions over the internet! A hacker's delight, to be sure. Here's a standard "blink an LED" Hello world on a Photon. This one creates a cloud function called "led" and binds it to the "ledToggle" method. Those cloud methods take a string, so there's no enum for the on/off command.int led1 = D0;int led2 = D7;void setup() { pinMode(led1, OUTPUT); pinMode(led2, OUTPUT); Spark.function("led",ledToggle); digitalWrite(led1, LOW); digitalWrite(led2, LOW);}void loop() {}int ledToggle(String command) { if (command=="on") { digitalWrite(led1,HIGH); digitalWrite(led2,HIGH); return 1; } else if (command=="off") { digitalWrite(led1,LOW); digitalWrite(led2,LOW); return 0; } else { return -1; }} From the command line I can use the Particle command line interface (CLI) to enumerate my devices:C:\Users\scott>particle listhansel_photon [390039000647xxxxxxxxxxx] (Photon) is online Functions: int led(String args) See how it doesn't just enumerate devices, but also cloud methods that hang off devices? LOVE THIS. I can get a secret API Key from the Particle Photon's cloud based Console. Then using my Device ID and auth token I can call the method...with an HTTP request! How much easier could this be?C:\Users\scott\>curl https://api.particle.io/v1/devices/390039000647xxxxxxxxx/led -d access_token=31fa2e6f --insecure -d arg="on"{ "id": "390039000647xxxxxxxxx", "last_app": "", "connected": true, "return_value": 1} At this moment the LED on the Particle Photon turns on. I'm going to change the code a little and add some telemetry using the Particle's online code editor. They've got a great online code editor, but I could also edit and compile the code locally:C:\Users\scott\Desktop>particle compile photon webconnected.inoCompiling code for photonIncluding: webconnected.inoattempting to compile firmwaredownloading binary from: /v1/binaries/5858b74667ddf87fb2a2df8fsaving to: photon_firmware_1482209089877.binMemory use: text data bss dec hex filename 6156 12 1488 7656 1de8Compile succeeded.Saved firmware to: C:\Users\scott\Desktop\photon_firmware_1482209089877.bin I'll change the code to announce an "Event" when I turn on the LED.if (command=="on") { digitalWrite(led1,HIGH); digitalWrite(led2,HIGH); String data = "Amazing! Some Data would be here! The light is on."; Particle.publish("ledBlinked", data); return 1;} I can head back over to the http://console.particle.io and see these events live on the web: Particle also supports integration with Google Cloud and Azure IoT Hub. Azure IoT Hub allows you to manage billions of devices and all their many billions of events. I just have a few, but we all have to start somewhere. ;) I created a free Azure IoT Hub in my Azure Account... And made a shared access policy for my Particle Devices. Then I told Particle about Azure in their Integrations system. The Azure IoT SDKS on GitHub at https://github.com/Azure/azure-iot-[...]



Free Intermediate ASP.NET Core 1.0 Training on Microsoft Virtual Academy

Tue, 20 Dec 2016 01:00:57 GMT

At the end of October I announced that Maria from my team and I published a Microsoft Virtual Academy on ASP.NET Core. This Free ASP.NET Core 1.0 Training is up on Microsoft Virtual Academy now for you to watch and enjoy! I hope you like it, we worked very hard to bring it to you.

Again, start with Introduction to ASP.NET Core 1.0, and explore this new technology even further in Intermediate ASP.NET Core 1.0.

Intermediate ASP.NET Core 1.0

(image)

We've just launched Day 2, the Intermediate day. If the first is 100 level, this is 200 level. In this day, Jeff Fritz and I build on what we learned with Maria in Day 1. We're also joined by Rowan Miller and Maria later in the day as we explore topics like:

  • Tag Helpers
  • Authentication
  • Custom Middleware
  • Dependency Injection
  • Web APIs
  • Single Page Apps
  • Entity Framework Core and Database Access
  • Publishing and Deployment

In a few weeks (maybe sooner) we'll publish Day 3 which we'll do exclusively on Macs and Linux machines. We'll talk about Cross-Platform concerns and Containers.

NOTE: There's a LOT of quality free courseware for learning .NET Core and ASP.NET Core. We've put the best at http://asp.net/free-courses and I encourage you to check them out!

Also, please help me out by adding a few stars there under Ratings. We're new. ;)


Sponsor: Do you deploy the same application multiple times for each of your end customers? The team at Octopus have taken the pain out of multi-tenant deployments. Check out their latest 3.4 release


© 2016 Scott Hanselman. All rights reserved.



Playing with an Onion Omega IoT device to show live Blood Sugar on an OLED screen

Wed, 14 Dec 2016 22:20:47 GMT

I've been playing with IoT stuff on my vacation. Today I'm looking at an Onion Omega. This is a US$19 computer that you can program with Python, Node, or C/C++. There's a current IndieGogo happening for the Onion Omega2 for $5. That's a $5 Linux computer with Wi-Fi. Realistically you'd want to spend more and get expansion docks, chargers, batteries, etc, but you get the idea. I got the original Omega along with the bluetooth dongle, Arduino compatible base, tiny OLED screen. A ton of stuff to play with for less than $100. Note that I am not affiliated with Onion at all and I paid for it with my own money, to use for fun. One of the most striking things about the Onion Omega line is how polished it is. There's lots of tiny Linux Machines that basically drop you at the command line and say "OK, SSH in and here's root." The Onion Omega is far more polished. The Omega can do that for you, but if you have Bonjour installed (for zeroconf networking) and can SSH in once to setup Wi-Fi, you're able to access this lovely web-based interface. This clean, local web server and useful UI makes the Onion Omega extremely useful as a teaching tool. The Particle line of IoT products has a similarly polished web-interfaces, but while the Onion uses a local web server and app, the Particle Photon uses a cloud-based app that bounces down to a local administrative interface on the device. There's arguments for each, but I remain impressed with how easy it was for me to update the firmware on the Omega and get a new experience. Additionally, I made a few mistakes and "bricked" it and was able - just by following some basic instructions - to totally reflash and reset it to the defaults in just about 10 minutes. Impressive docs for an impressive product. Onion Omega based Glucose Display via NightScout So it's a cool product, but how quickly can I do something trivial, but useful? Well, I have a NightScout open source diabetes management server with an API that lets me see my blood sugar. The resulting JSON looks like this:[ { "_id":"5851b235b8d1fea108df8b", "sgv":135, "date":1481748935000, "dateString":"2016-12-14T20:55:35.000Z", "trend":4, "direction":"Flat", "device":"share2", "type":"sgv" }] That number under "sgv" (serum glucose value) is 135 mg/dl. That's my blood sugar right now. I could get n values back from the WebAPI and plot a chart, but baby steps. Note also the "direction" for my sugars is "flat." It's not rising nor falling in any major way. Let's add the OLED Display to the Onion Omega and show my sugars. Since it's an OpenWRT Linux machine, I can just add Python! opkg updateopkg install python Some may (and will) argue that for a small IoT system, Linux is totally overkill. Sure, it likely it. But it's also very productive, fun to prototype with, and functional. Were I to go to market for real, I'd likely use something more hardened. As I said, I could SSH into the machine but since the Web UI is so nice, it includes an HTML-based terminal! The Onion Omega includes not just libraries for expansions like the OLED Display, but also command-line utilities. This script clears the display, initializes it, and displays some text. The value of that text will come from my yet-to-be-written python script.#!/bin/sh oled-exp -c VAR=$(python ./sugar_script.py)oled-exp -i oled-exp write "$VAR" Then in my Python script I could print the value that would be returned into VAR and then printed with the oled-exp command line utility. OR, I can bypass the shell script entirely and use the Python Module for this OLED screen directly and do this. Grab the JSON, clean it up because apparently the json library sucks (?), then display it.#!/usr/bin/env python from OmegaExpansion import oledExp [...]



Exploring Wyam - a .NET Static Site Content Generator

Sun, 11 Dec 2016 00:41:13 GMT

It's a bit of a renaissance out there when it comes to Static Site Generators. There's Jekyll and GitBook, Hugo and Hexo. Middleman and Pelican, Brunch and Octopress. There's dozens, if not hundreds of static site content generators, and "long tail is long." Static Generators a nice for sites that DO get updated with dynamic content, but just not updated every few minutes. That means a Static Site Generator can be great for documentation, blogs, your brochure-ware home page, product catalogs, resumes, and lots more. Why install WordPress when you don't need to hit a database or generate HTML on every page view? Why not generate your site only when it changes? I recently heard about a .NET Core-based open source generator called Wyam and wanted to check it out. Wyam is a simple to use, highly modular, and extremely configurable static content generator that can be used to generate web sites, produce documentation, create ebooks, and much more. Wyam is a module system with a pipeline that you can configure and chain processes together however you like. You can generate HTML from Markdown, from Razor, even XSLT2 - anything you like, really. Wyam also integrates nicely into your continuous build systems like Cake and others, so you can also get the Nuget Tools package for Wyam. There's a few ways to get Wyam but I downloaded the setup.exe from GitHub Releases. You can also just get a ZIP and download it to any folder. When I ran the setup.exe it flashed (I didn't see a dialog, but it's beta so I'll chalk it up to that) and it installed to C:\Users\scott\AppData\Local\Wyam with what looked like the Squirrel installer from GitHub and Paul Betts. Wyam has a number of nice features that .NET Folks will find useful. Written in .NET and easily extensible Low ceremony - download a zip file, unzip, and run Flexible script-based configuration using the power of the .NET Compiler Platform (Roslyn) Lots of modules for things like reading and writing files, handling front matter, and manipulating metadata YAML parser, Less CSS compiler, Image manipulation Support for multiple templating languages including Markdown and Razor Integrated web server for previewing output Integrated file watching and regeneration Embeddable engine Let's see what I can do with http://wyam.io in just a few minutes! Scaffolding a Blog Wyam has a similar command line syntax as dotnet.exe and it uses "recipes" so I can say --recipe Blog and I'll get:C:\Users\scott\Desktop\wyamtest>wyam new --recipe BlogWyam version 0.14.1-beta ,@@@@@ /@\ @@@@@ @@@@@@ @@@@@| $@@@@@h $@@@@@ ,@@@@@@@ g@@@@@P ]@@@@@M g@@@@@@@ g@@@@@P $@@@@@ @@@@@@@@@ g@@@@@Pj@@@@@ g@@@@@@@@@p ,@@@@@@@$@@@@@g@@@@@@@@B@@@@@@@@@@@P`$@@@@@@@@@@@` ]@@@@@@@@@` $@@@@@@@P` ?$@@@@@P `^`` *P*`**NEW**Scaffold directory C:/Users/scott/Desktop/wyamtest/input does not exist and will be createdInstalling NuGet packages NuGet packages installed in 101813 msRecursively loading assemblies Assemblies loaded in 2349 msCataloging classes Classes cataloged in 277 ms One could imagine recipes for product catalogs, little league sites, etc. You can make your own custom recipes as well. I'll make a config.wyam file with this inside:Settings.Host = "test.hanselman.com";GlobalMetadata["Title"] = "Scott Hanselman";GlobalMetadata["Description"] = "The personal wyam-made blog of Scott Hanselman";GlobalMetadata["Intro"] = "Hi, welcome to my blog!"; Then I'll run wyam with:C:\Users\scott\Desktop\wyamtest>wyam -r BlogWyam version 0.14.1-beta**BUILD**Loading configuration from file:///C:/Users/scott/Desktop/wyamtest/config.wyamInstalling NuGet packages NuGet packages installed in 30059 msRecursively loading assemblies Assemblies loaded in 368 msCataloging classes Classes cataloged in 406 msEvaluating configuration[...]