Coding For a Living

rss

A place to share and comment about coding for a living.


Introducing..Microsoft Visual Studio Online Mike McIntyre

Visual Studio Online, the next evolution of Microsoft Team Foundation server, is a cloud-hosted imageapplication lifecycle management (ALM).

Use Visual Studio Online to plan, create, construct, build, test, and monitor seriously demanding applications, from anywhere.  Use it to:

  • Create private, cloud-hosted source code repositories
    Choose between Git or TFVC for source control
    Discuss code changes with your team
    Create a backlog and work in sprints
    Track requirements, tasks, and bugs with work items
    Monitor progress using Kanban boards or agile task boards
    Offload your builds
    Automate your build process
    Track build health over time

No more servers, unlimited load testing, easy to use – I love it!

More…


Windows Store apps Dev Center 2013 Mike McIntyre

Have you checked out the Windows Store apps Dev Center lately?

It’s been filled with excellent resources for learning about and developing Windows Store apps. From code, to design guidelines, it’s chuck full of what you need to develop Windows Store Apps.

Windows 8.1

Windows 8.1

Feature guide

Product guide

Getting started

Support forums

Design

Design

Design downloads

Our design principles

Index UX guidelines

iPad to Windows Store app

Migrate

Migrate

iOS

Android

Windows 8

WPF/Silverlight

Develop

Develop

Samples

API reference

Downloads

Certification requirements


Visual Basic If Operator Mike McIntyre

It looks like a function but it is an operator.  The Visual Basic If operator provides the functionality of the IIF function and more - including short-circuiting. It can be use as a ternary operator which mimics the functionality of the IIF function while adding some more to it, and as a binary operator which provides a comparison/assignment feature. image

The operator uses short-circuit evaluation to conditionally return one of two values. The If operator can be called with three arguments or with two arguments.

When If is called by using three arguments, the first argument must evaluate to a value that can be cast as a Boolean. That Boolean value will determine which of the other two arguments is evaluated and returned.

' This statement prints TruePart, because the first argument is true. Console.WriteLine(If(True, "TruePart", "FalsePart")) ' This statement prints FalsePart, because the first argument is false. Console.WriteLine(If(False, "TruePart", "FalsePart")) Dim number = 3 ' With number set to 3, this statement prints Positive. Console.WriteLine(If(number >= 0, "Positive", "Negative")) number = -1 ' With number set to -1, this statement prints Negative. Console.WriteLine(If(number >= 0, "Positive", "Negative"))

Free Bing Code Snippets Mike McIntyre

The Bing Code Snippets package uses the Code Snippets technology of Visual Studio to provide blocks of code that you can insert into your C# or JavaScript Windows Store applications. image

These snippets support the following Bing technologies:

  • Translator control
  • Translator API
  • Optical Character Recognition (OCR) control
  • Speech Recognition control
  • Speech Synthesis (Text to Speech)

Download them here.


Gadgeteer Book–Learn to Program With VB & .Net Mike McIntyre

This book is a free resource from Microsoft Press which helps students learn to program with the .Net Gadgeteer, a device originated at the Microsoft Research in Cambridge, U.K.. image

The Gadgeteer book explains how to program with VB and .Net using the FEZ Cerberus Tinker Kit modules such as the mainboard, USPClientSP power module, the Joystick, the LED strip, and the Display N18 module.

Students plug together modules then use Visual Studio 2012 or Visual Studio 2010 to build a .Net Gadgeteer project.

The Visual Studio project includes lots of visual tools for connecting and configuring modules.

image 

I love this book and the FEZ Tinker Kit. 

Back in the day I remember buying electronic parts, wiring up boards and hooking up devices based on computer magazine articles.

This kit gives a similar ‘hands on experience’ with the power of VB and .NET added in. 

This book and the FEZ Cerberus Tinker Kit are highly recommended for the young nerds in your life.  The book is free and the kit costs around $100 U.S.


IE11 Real-world Performance Mike McIntyre

The W3C Web Performance working group has standardized the Navigation Timing, Resource Timing, User Timing, and Performance Timeline interfaces to help you understand the real-world performance of navigating, fetching resources, and running scripts in your Web application.

The interfaces are supported in IE11.

Read more here.


What can you do with Roslyn? Scripting Mike McIntyre

With Microsoft Roslyn you can write applications that evaluate code at runtime.

While it’s been possible to implement scripting since the release of .Net it’s not been easy. Check out Brian Rasmussen’s blog on scripting:

     Learn about the Roslyn scripting API


DB Schema Design–Rethinking ‘Type’ Tables Pt 1 Mike McIntyre

If you are a typical business application developer you probably work with a database which is cluttered with ‘type’ tables e.g. InvoiceType, CustomerType, PaymentType, CreditCartType, OrderType, ItemType, ProductType – which all have a schemas similar to these:

     image

There are the same number of columns in each type table above. 

The data type of the columns are the same in all the tables. 

Some column names are the same in all the tables. 

Columns names that are not the same in all tables do follow the same naming rule in each table e.g. ItemTypeId, OrderTypeId, ListTypeId which all end with ‘Id’.

Given how similar these tables are, why not use 2-3 tables for all standard ‘type’ data, maybe something like this?

 

     image

More to follow in part 2 of ‘DB Schema Design–Rethinking ‘Type’ Tables’


Return a string, and just a string, from HTTP Post Mike McIntyre

You want to return a string, just a string, from an HTTP POST call.

You code it like this:

Response.Write("Hello World")

The HTTP POST returns:

All you wanted was “Hello World”.

You should have coded it like this:

Response.Write("Hello World") ' The Response.End method causes the Web server to stop processing the script and return the current result. The remaining contents of the file are not processed. Response.End()

Free Book - Programming Windows Store Apps Mike McIntyre

10/29/2013 Microsoft Press has released the second edition of Kraig Brocksmidt’s in-depth book: Programming Windows Store Apps in HTML, CSS, and JavaScript, Second Edition.image

Ken says: “In celebration of the one-year anniversary of this book’s first edition, I’m delighted to offer you this second preview of Programming Windows Store Apps in HTML, CSS, and JavaScript, Second Edition. It’s been a huge year for both the book and the platform that it supports. With the general availability of Windows 8.1 earlier this month (October 2013), the capabilities of the Windows platform have grown dramatically, which is clearly in evidence by the expanded size of this second edition! Even in this preview (12 chapters and three appendices), the book is not far from the length of the first edition, and there are still eight chapters (and one appendix) to go. Nevertheless, it’s my pleasure to provide you with a comprehensive volume on Microsoft’s latest operating system.”

Download the free e-book here: Programming Windows Store Apps with HTML, CSS, and JavaScript, Second Edition