Scott Hanselman

MSBuild Structured Log: record and visualize your builds

June 4, '16 Comments [7] Posted in MSBuild | Open Source
Sponsored By

MSBuild has been open source for a while (over a year now!) and is used to build .NET and .NET Core projects. In fact, MSBuild is used to build the .NET Core Runtime itself.

MSBuild Structured Log

Recently Kirill Osenkov published a new tool called MSBuild Structured Log that makes it easy to visualize your builds and the build process. Install and run MSBuild Structured Log from here.

It is an MSBuild logger that can be passed to MSBuild during a build and it records information about everything that happens in the build. But instead of just dumping everything into a huge text file it preserves the structure and relationships between elements, and lets you save and open the structured log in .xml format. This has significant advantages to help you understand and navigate large build logs.

It's easy to install and auto-updates itself. You can open a log file directory or it will build your project and show you the results in a friendly and searchable tree format:

MSBuild Log visualized as a tree view

Here's a more complex multi-project example. You can see what ran, what didn't, dependencies, and the logs themselves.

A complex MSBuild example visualized

Tools

There is a great list of MSBuild-related resources and tips and tricks including these tools:


Sponsor: Many thanks to Stackify for sponsoring the feed this week! Stackify knows developers are the center of the universe. That’s why Stackify built Prefix and will give it out free forever. No .NET profiler is easier, prettier, or more powerful. Build better—now!

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook twitter subscribe
About   Newsletter
Sponsored By
Hosting By
Dedicated Windows Server Hosting by SherWeb

Is technology killing curiosity?

June 1, '16 Comments [70] Posted in Musings
Sponsored By
Photo via WoCinTechChat used under Creative Commons

I was talking with Kishau Rogers this week at a Hackathon we were helping with at The White House for ThinkOfUs. (See how I dropped The White House in there like it was nothing? It was everything. More on that later.)

You'll remember Kishau from her excellent podcast where she proposed that we should NOT teach kids how to code...but rather we need to teach kids (and people) how to think about systems. Folks just don't know how stuff works. Maybe we're old(er) but we found ourselves asking, is tech killing curiosity? This post has more questions than answers, so I hope you sound off in the comments!

I have this glorious pocket super computer with me now. It connects to all the world's collected knowledge, has an advanced battery, radio transmitter, and so much more. But most people have no idea how it works? Yes, technically you don't have to know how it works, but aren't you curious?

We can make lists about how "there's two kinds of people in the world" and split them up into techie and non-techie, or computer literate or non-computer literate...but I'm thinking it's simpler. There's the curious and the not-curious.

I took apart my toaster, my remote control, and a clock-radio telephone before I was 10. Didn't you? What's the difference between the people that take toasters apart and the folks that just want toast? At what point do kids or young adults stop asking "how does it work?"

As each new layer of abstraction becomes indistinguishable from magic we may be quietly killing curiosity. Or shifting its focus. Is the stack so deep now that we can't know everything?

There's a great interview question I love to give. "When you type foo.com into a browser, what happens? Then what happens? Then what happens?" I ask this question not because I care how deep you can go; I ask because I care how deep you care to go. Where does your interest stop? How do you THINK it works? Where does technology end and where does the magic (for you) begin? HTTP? TCP? DNS? Voltage on a wire? Registers in chips? Quantum effects?

I do an Exploring Engineering class at local colleges each year. I love to open up a text file, type the alphabet, then open that text file in a hex editor and go "hey, the letter 'a' is 61 in ASCII, why?" Then I add a carriage return/line feed (13/10) and ask a room of confused 18 year olds "what's a carriage and why does it need to return?" I take a record player in and talk about the similarities between how it works versus how a hard drive or blu ray works. I see where the conversation takes the class. Inevitably the most engaged kids (regardless of their actual knowlegde) will end up being great engineering candidates. But where did their curiosity come from?

Perhaps curiosity is an innate thing, perhaps it's taught and encouraged, but more likely it's a little of both. I hope that you're stretching yourself and others to ask more questions and explore the how and why of the world around you.

What do you think? Is 21st century technology making it too easy? Are iPhones so magical sitting atop the last millennium of technology that it's not worth teaching - or even wondering - how it all fits together?


Sponsor: Many thanks to Stackify for sponsoring the feed this week! Stackify knows developers are the center of the universe. That’s why Stackify built Prefix and will give it out free forever. No .NET profiler is easier, prettier, or more powerful. Build better—now!

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook twitter subscribe
About   Newsletter
Sponsored By
Hosting By
Dedicated Windows Server Hosting by SherWeb

White House Visit - Foster Care and Technology Hackathon

May 24, '16 Comments [20] Posted in
Sponsored By

Going to the White HouseHey friends! I am so proud to be a technology advisor for the the White House Foster Care and Technology Hackathon this week!

While I'm participating in this event and advising as a private citizen, there is a Microsoft team. Here is a brief statement about the Microsoft team's involvement in this cause:

The Microsoft team is honored and excited to participate in this year’s White House Foster Care and Technology Hackathon on May 26th-May 27th. It is a wonderful opportunity for top technical talent across different industries to work together in collaboration with the White House, the Dept of Health and Human Services, Annie E. Casey Foundation, and Think of Us, with the goal of improving the US foster care system and outcomes for children and families who experience care.

The hackathon participants are tackling the biggest problems in the foster care system including topics such as empowering foster youth and alum with decision-making abilities, getting more innovative technology into child welfare agencies, and preventing homelessness and unplanned pregnancy for youth.

Another huge area of concern in the foster care system is that of substance exposed infants and children. Each year, nearly 440,000 infants are affected by prenatal alcohol or illicit drug exposure. Oftentimes, the mothers of these children who are battling substance abuse struggle with seeking care and treatment for themselves and the children. Many of these mothers are young and do not have the support system that they need to get advice and help to both overcome their additions, and take care for their children. Even if they have the inclination to get help, where do they start? And how can they do this without being stigmatized?
The Microsoft hacking team is looking to create a streamlined process by which mothers can access the resources they need, and easily ask for help.

Mothers with addiction problems often struggle to keep their addiction and pregnancy secret, and are therefore hesitant to seek the help they and their children so desperately need. The solution must take this sensitivity into account. Locating relevant information about available resources is another problem. It must aggregate resources into a single place that is simple and easy to use but also non-judgmental.

The team seeks to create a marketplace for social services that will be useful to the mothers in need. Rather than solely aggregate data, the marketplace will include a recommendation system based on the anonymous inputs of the users’ needs, backed by a rating system that is commonly seen online. Influenced by the ratings systems of websites like Yelp, the team seeks to create an atmosphere that younger generations are used to by allowing them to anonymously rate the services they used, and benefit from the feedback of others.

The team is made up of Program Manager, Yossi Banai, along with technologists Paul DeCarlo, Mostafa Elzoghbi, Stacey Mulcahy, Heather Shapiro and tech advisor Scott Hanselman. Several members of the team have been personally touched or affected by the problem of pregnant and parenting mothers dealing with substance abuse and are passionate about improving the current situation for struggling mothers and their children. They will continue their efforts after the hackathon by maintaining the resources and programs created.

I'll take as many photos and instagrams as I'm allowed. Many thanks to Sixto Cancel from Think of Us, Kishau Rogers, and Vida Williams for including me on this project. I'll be speaking on Thursday along with a room full of amazing folks across the Child Welfare System and the Administration.

I'm excited to meet all the teams including the folks from StackOverflow, Slack, Clef, Uber, Twillio, Prek12Plaza, and more!


Sponsor: Build servers are great at compiling code and running tests, but not so great at deployment. When you find yourself knee-deep in custom scripts trying to make your build server do something it wasn't meant to, give Octopus Deploy a try.

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook twitter subscribe
About   Newsletter
Sponsored By
Hosting By
Dedicated Windows Server Hosting by SherWeb

.NET Core 1.0 RC2 - Upgrading from previous versions

May 19, '16 Comments [24] Posted in ASP.NET
Sponsored By

.NET Core at http://dot.net.NET Core RC2 is out, it's open source, and it's on multiple platforms. I'm particularly proud of the cool vanity domain we got for it. http://dot.net. ;) It makes me smile.

Here's the important blog posts to check out:

Head over to http://dot.net and check it out. A great aspect of .NET Core is that everything it does is side-by-side. You can work with it without affecting your existing systems. Be sure also explore the complete .NET Downloads Page for all the manual downloads as well as SHA hashes.

The best way to develop with .NET Core on Windows is to download the Visual Studio official MSI Installer and the latest NuGet Manager extension for Visual Studio. If you don't have Visual Studio already, you can download Visual Studio Community 2015 for free.

We'll have documentation and insights on how to moving from ASP.NET 4.x over to ASP.NET Core 1.0 soon, but for now I've collected these resources for folks who are upgrading from previous versions of .NET Core and ASP.NET Core (the framework formerly new as ASP.NET 5).

Enjoy!


Sponsor: Build servers are great at compiling code and running tests, but not so great at deployment. When you find yourself knee-deep in custom scripts trying to make your build server do something it wasn't meant to, give Octopus Deploy a try.

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook twitter subscribe
About   Newsletter
Sponsored By
Hosting By
Dedicated Windows Server Hosting by SherWeb

Playing with TensorFlow on Windows

May 15, '16 Comments [25] Posted in Open Source
Sponsored By

TensorFlow is a machine learning library from Google. There are no Windows builds but I wanted to run it on Windows. There are some other blog posts that show people trying to get TensorFlow running on Windows with VMs or Docker (using a VM) but they are a little complex. This seems like a great chance to see of I can just run Bash on Windows 10, build TensorFlow and run it.

TensorFlow on Ubuntu on Windows 10

I'm running Windows 10 Insiders Build 14422 as of the time of this writing. I launched Bash on Windows and followed these pip (Python) instructions, just as if I was running Linux. Note that the GPU support won't work so I followed the CPU only instructions from my Surface Pro 3.

$ sudo apt-get install python-pip python-dev
$ sudo pip install --upgrade https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-0.8.0-cp27-none-linux_x86_64.whl

It built, then I tested it like this:

$ python
...
>>> import tensorflow as tf
>>> hello = tf.constant('Hello, TensorFlow!')
>>> sess = tf.Session()
>>> print(sess.run(hello))
Hello, TensorFlow!
>>> a = tf.constant(10)
>>> b = tf.constant(32)
>>> print(sess.run(a + b))
42
>>>

Cool, but this is Hello World. Let's try the more complex example against the MINST Handwriting Models. The simple demo model for classifying handwritten digits from the MNIST dataset is in the sub-directorymodels/image/mnist/convolutional.py. You'll need to check when your mnist folder is.

$ cd tensorflow/models/image/mnist
$ python convolutional.py
Successfully downloaded train-images-idx3-ubyte.gz 9912422 bytes.
Successfully downloaded train-labels-idx1-ubyte.gz 28881 bytes.
Successfully downloaded t10k-images-idx3-ubyte.gz 1648877 bytes.
Successfully downloaded t10k-labels-idx1-ubyte.gz 4542 bytes.
Extracting data/train-images-idx3-ubyte.gz
Extracting data/train-labels-idx1-ubyte.gz
Extracting data/t10k-images-idx3-ubyte.gz
Extracting data/t10k-labels-idx1-ubyte.gz
Initialized!
Step 0 (epoch 0.00), 9.3 ms
Minibatch loss: 12.054, learning rate: 0.010000
Minibatch error: 90.6%
Validation error: 84.6%
Step 100 (epoch 0.12), 826.7 ms
Minibatch loss: 3.289, learning rate: 0.010000
Minibatch error: 6.2%
Validation error: 7.0%
...

This set appears to be working great and is currently on Step 1500

There's bugs in the Bash on Windows 10, of course. It's in Beta. But it's not a toy, and it's gonna be a great addition to my developer toolbox. I like that I was able to follow the Linux instructions exactly and they just worked. I'm looking forward to seeing how hard I can push Ubuntu and Bash on Windows 10.


Sponsor: Big thanks to SQL Prompt for sponsoring the feed this week! Have you got SQL fingers? TrySQL Prompt and you’ll be able to write, refactor, and reformat SQL effortlessly in SSMS and Visual Studio.Find out more.

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook twitter subscribe
About   Newsletter
Sponsored By
Hosting By
Dedicated Windows Server Hosting by SherWeb

Disclaimer: The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.