How to build minimalistic REST server in .Net

Install “Microsoft ASP.NET Web API Self Host” and all of its dependencies via NuGet. using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading; using System.Threading.Tasks; using System.Web.Http; using System.Web.Http.SelfHost; namespace resttest { public class ExampleData { public int Id { get; set; } } public class ExampleController : ApiController { // /api/job public IEnumerable<ExampleData> Get() { return new List<ExampleData>() { new ExampleData(){ Id = 2 }, new ExampleData(){ Id = 4 } }; } // /api/job/3 public ExampleData Get(int id) { return new ExampleData() { Id = 3 }; } } class Program { static void Main(string[] args) { var configuration = new HttpSelfHostConfiguration("http://localhost:1337"); //Setup the routes configuration. [Read More]

Google AI Challenge

Update 2023: things fall off the face of the internet after a while; removed dead links It seems that being so much into other programming things I missed the Google AI Contest announcement. It’s supercool that they sponsor such challenges but also it’s really uncool [so like warm ?] that apparently I won’t have time to participate. About the challenge itself - it involves working with GalconFusion-like game. Easy to learn, difficult to master type. [Read More]