Phillip Trelford's blog articles

0
comment
on 3/9/2015 12:30 PM
Fun Basic is an extended clone of Microsoft’s Small Basic programming language that runs as an app in the Windows Store. The app provides a range of sample programs from simple turtle graphics through to video games and physics simulations. The samples have been selected from programs in the public domain created by the Small Basic community. Each sample is presented with it’s corresponding source code allowing you to edit the code and run the program. The concept is that you can learn elements of prog[...]
>> Read the full article
.
0
comment
on 1/21/2015 12:29 AM
Microsoft’s Small Basic is a simple programming language and environment aimed at beginners. It ships with an IDE for Windows, a commands line compiler and a small .Net library. Small Basic programs can also be run in the browser on Windows & Mac via SIlverlight. The shipped .Net library for Small Basic targets WPF for graphics which is unfortunately not supported on Mono, which means Small Basic apps will not run directly on Mac or Linux. To get Small Basic apps running from the command prompt on Mac a[...]
>> Read the full article
.
0
comment
on 1/20/2015 12:17 AM
Microsoft Small Basic ships with a custom IDE with syntax colouring and code completion but no debugger: There’s a good article by Nonki Takahashi on Microsoft Technet on How to debug Small Basic programs manually which boils down to: trace with TextWindow.WriteLine add conditional debug code with If debug Then … promote your app to full VB.Net Small Basic in Visual Studio Last year, for fun, I wrote a custom Small Basic compiler with some extensions like functions with parameters and tu[...]
>> Read the full article
.
0
comment
on 12/10/2014 9:22 AM
Yesterday I noticed a tweet recommending an “Uncle” Bob Martin video that is intended to “demystify compilers”. I haven’t seen the video (Episode 29, SMC Parser) as it’s behind a pay wall, but I did find a link on the page to a github repository with a hand rolled parser written in vanilla Java, plus a transformation step that compiles it out to either Java or C code. The parser implementation is quite involved with a number of files covering both lexing and parsing: Parser.java (168 loc) FSMSyn[...]
>> Read the full article
.
0
comment
on 12/8/2014 11:20 PM
Rosetta Code has a number of programming tasks with example solutions in multiple languages. One of those tasks is find the last Sunday of each month. Here’s a sample in C#: DateTime date; for (int i = 1; i <= 12; i++) { date = new DateTime(year, i, DateTime.DaysInMonth(year, i), System.Globalization.CultureInfo.CurrentCulture.Calendar); while (date.DayOfWeek != DayOfWeek.Sunday) { date = date.AddDays(-1); } Console.WriteLine(date.ToString("yyyy-MM-dd")); } I thought it might be fun [...]
>> Read the full article
.
IntelliFactory Offices Copyright (c) 2011-2012 IntelliFactory. All rights reserved.
Home | Products | Consulting | Trainings | Blogs | Jobs | Contact Us
Built with WebSharper