Monday, August 30, 2010

Notes from MS Communities Code Camp in Auckland

Security - 10 things YOU are doing wrong! - Kirk Jackson

- Rainbow table - used for reverse hash lookup
- RNGCryptoServiceProvider is the default implementation of a security standards compliant random number generator. If you need a random variable for security purposes, you must use this class, or an equivalent, but don't use System.Random because it is highly predictable.

- email as username - verify that they own the email address in question.
- autocomplete=off on inputs such as Credit card number to avoid storing the data locally. Also check PCI compliance.
- invalidate session on login.
- Presentation using

Windows Phone 7 Introduction

5 Languages in 50 minutes

- iolanguage
* prototype language similar to java script
* Uppercase indicates types. Lowercase instance.
* Zero index lists
* true is a singleton
* DSL Domain Specific Language
* Actors for concurrency

* Logic rules based language.

- Scala
* Runs on JVM
* Similar to F#
* values are immutable

- Erlang
* Ericsson Language
* Allows for crashing and resuming

- Clojure
* Lisp on the JVM

An introduction to artificial intelligence techniques

- Constraint satisfaction
Scheduling: time boxes and dependencies

Genetic algorithms
Fitness function
Shakespearean Monkeys

Deduction and reasoning
- Uncertain Reasoning
- Bayesian reasoning

Support vector machine - divide up the data space

Learning = feedback
supervised learning - training data
Neural Network connected up in layers - input nodes and output nodes

Reinforcement learning - rewarded or punished on the basis of the outcome.
Unsupervised learning

Natural language processing
F# Parser generator

Image analysis
Edge recognition

Motion detection


The Microsoft Application Server: What is it ...

Windows Server AppFabric - @ryancrawcour
What is the problem?
A: Who should build application infrastructure? plumbing
Microsofts application infrastructure - pipes etc...

Ships as part of Windows Server (soon) - switch on like IIS

Two distinct components
* Caching (codename Velocity)
* Hosting for WCF and WF (codename Dublin)

AppFabric Caching Services
What is the problem?
Distributed caching mechanism.
Improves speed, scalability and availiablity of applications that use data?
Large improvement to applications that primarily retrieve data.
* Cache in memory on single computer. Doesn't work well with load balancing.
* Could throw more hardware at the database.
* Distribute your cache on to shared computers. (AppFabric Caching Services provides this)

Cache Cluster - machines within the cluster hidden from the application using the cluster

AppFabric Hosting Service
What's is the problem?
* Build your own host
* Using IIS(http protocol only)/WAS (on top of IIS for extending bindings) hosting as is
 Difficult to monitor service state
* " with extended capabilities & management

WCF - foundation for building & consuming services
Client connects to endpoints over protocol

WF Windows workflow foundation
Model workflow activities of business process.

Workflow Services
Wrap Workflow in a WCF service. This is very similar to what BizTalk does.
Why implement the service as a workflow?
Not for database calls.
Business application - E.g. take on new staff. Setup PC, username, parking space, payroll.

AppFabric Hosting.
IIS Worker Process

Workflow is good for long running processes.

Persistence Store.

Monitoring Database. AppFabric and monitor events.

AppFabric Extensions to IIS Manager for monitoring status of Workflow and WCF.
- AppFabric DashBoard

AppFabric & Biztalk
* AppFabrix hosting services is for hosting applications
* Biztalk is for integrating systems.

Windows Azure AppFabric
* Service Bus
* Access Control

Think Async LINQ with the .NET Reactive Extensions

SuperCoder 2000

LINQ & RX (Orion Edwards - @borland)
Async - write a lot more code and tends to be harder to read intention that blocking code.
Reactive Framework - Rx
Google Reactive extensions
Add as reference once installed to project.

LINQ Fundamentals
- Any collection or stream is just a series of values
- Can be lazy loaded - values over time
- IEnumerable provides a unifeid interface to pull values.

Rx Fundamentals
- Async operations are also a sequence of values over time, but the values are pushed.
- Rx provides IObservable, a unified interface for any source to push over time.
- IObservable is the mathematical dual of IEnumberable
Use standard LINQ querying.

IObservable for PUSH based sequences
- Subscribe

Unified for
Push IEnumerable
Pull IObservable

IEnumberable on your thread.
IObservable will push on its thread. I.e. Mouse events are on the dispatcher thread.
Redirect to another thread. Dispatcher.BeginInvoke,

.ObserveOn to pass to scheduler.

Wrap up begin end pairs to make IObservable