TypeScript declarations for Player Framework

- Are you programming in JavaScript?
– Yes.
– Are you using TypeScript?
– No.
– Please stop! Do yourself a favour and go learn TypeScript to use it in your project.

I’ve been programming JavaScript for Xbox One projects and since I saw a TypeScript session at Build 2014 that I was completely sold to it.

TypeScript is a language that is a superset of JavaScript compiling the result to plain JavaScript. It makes JavaScript development easier to manage by adding types, classes, modules and interfaces. And because it compiles to JavaScript, you don’t really need to have any TypeScript compiler to run a project.

What if you already have a big JavaScript project?
No problem, you just start slowly converting the code to TypeScript or you can create declarations (similar to a .h file for C/C++ projects) for your utility libraries that work just as well.

My TypeScript contribution to the world is a Player Framework (MMPPF) declaration file available at the DefinitelyTyped GitHub repository.

Enjoy and start using TypeScript!

Raspberry Pi Wifi dropping connection

Started playing with my Raspberry Pi this weekend and noticed that the wifi connection would not stay up for long when connected through SSH. After some digging online I found that the wifi was getting put in sleep mode. Here’s how to fix it:

  • Create a new file named 8192cu.conf at the following location /etc/modprobe.d/8192cu.conf
    sudo nano /etc/modprobe.d/8192cu.conf
  • Write the following command
    options 8192cu rtw_power_mgnt=0 rtw_enusbss=0

    (This makes sure that the power management is turned off thus preventing the dongle from going to sleep mode.)

  • You can go further and ensure that the connection remains up and stable by sending a ping request from your Pi to the router using crontab:
    crontab -e

    (Adds a new entry to crontab.)

  • Enter the following at the end of the file:
    */1 * * * * ping -c 1

    (Change the to the IP of your router. The IP of the router can be found by opening a command prompt in Windows and running the ipconfig command and checking the number besides “default gateway“.)

If you don’t have a Edimax wifi dongle you may have to find how to disable the power management for your device.

Source: http://www.xbmchub.com/forums/raspberry-pi-discussion/8037-your-wifi-dongle-dropping-connection-mainly-edimax-ew-7811un.html


CLIArgsMadeEasy is back with a long overdue update. This is the third major release of this extension although the second one didn’t receive a major version number.

This is still an alpha version. Please report back any bugs you may find.

New features

  • Dropped toolbar support in favour of toolbox which makes it more easy to manage and edit your command line. Open it inside View -> Other Windows -> CliArgsMadeEasy
  • Remove or change between command line arguments with a click of a button.
  • No more clogging the windows registry, data gets saved in .suo file.
  • Detect startup project inside solution folders.
  • Compatible with VS2012 and VS2013.


  • v1.0.6:
    • Added support for Visual Studio theme layouts.
    • Fixed bug where pressing the delete key while editing an item would delete the item and not the next character.
  • v1.0.5:
    • Added ability to duplicate and edit (buttons were added for each CLI arguments.)
    • Changed the way CLI args get added and changed.
  • v1.0.4:
    • Fixed VSIX problem for VS2012 installation.
    • Fixed bug where deleting command line arguments wouldn’t set them in Visual Studio.
    • Fixed bug where we could add the “Type some arguments”.
    • Changed default shortcuts:
      • ctrl+alt+0 – open CLIArgsMadeEasy window.
      • ctrl+alt+9 – focus on command line arguments.
      • ctrl+alt+8 – focus on project filter.
      • ctrl+alt+7 – focus on command line history.
  • v1.0.3:
    • Fixed VSIX installation for VS2013. Common installer for both VS2012 and VS2013.
    • Fixed bug where changing CLI Args through project properties didn’t update the extension.
    • Added empty CLI args when pressing enter with no arguments in the box.
  • v1.0.2:
    • Added key shortcuts:
      • ctrl+alt+0 – focus on command line arguments.
      • ctrl+alt+9 – focus on project filter.
      • ctrl+alt+8 – focus on command line history.
      • tab – focus next command line.
      • enter or space – select current command line.
      • delete – removes current command line.
      • escape – set focus on command line arguments.
    • Fixed bug detecting when startup project was deleted.
  • v1.0.1:
    • Removed erroneous menu entry from Visual Studio under Tools – You can find the tool window in: View -> Other Windows -> CliArgsMadeEasy
    • Command line arguments text box expands to show full text.
    • Added new icon.


Command Line Arguments Made Easy (CLIArgsMadeEasy) is a Visual Studio extension that eases the access and change of the startup project’s command line arguments. Instead of having to go to project properties or instead of using the command window to run your program with different arguments, CLIArgsMadeEasy adds a toolbox for you to add and edit your custom arguments.

If you like this add-in and want to support it, donate by clicking in the button:


Download CLIArgsMadeEasy2 v1.0.6 alpha here. (for Visual Studio 2012 / 2013)

Many thanks to Diogo Teixeira (aka fozi) for the add-in idea and testing of the program. And I also have to thank Matt Phillips for showing interest in the add-in which inspired me to make a second release.
Thanks to everyone who’s been reporting bugs and helping me building a stable version of CLIArgsMadeEasy.

Realtime Bus

I’ve used TTC (Toronto Transit Commission) to get to work and move around in Toronto. They implemented a good service where each bus is equipped with a GPS device transmitting its location and through today’s technologies that information reaches the internet and the phone of each one of us accurately and in real-time.

The apps available for WP7 didn’t have all the features that I wanted so I decided to build my own app.

Some features I wanted in my app that didn’t find in others:

  • Fast access to favourites
  • Map with routes
  • Information for multiple cities
  • Alerts (TTC only)

RealtimeBus_3 RealtimeBus_1 RealtimeBus_4

You can find the application here: http://www.windowsphone.com/en-us/store/app/realtime-bus/69bd4a05-65b4-4633-b40d-7d18d9f46edc

How to debug a Windows 8 app upgrade in Visual Studio

Some times it’s useful to debug if your new update breaks anything to users who have the previous version of your app. The process to debug this is not very straightforward but here it is:

– Create a package with first version (right click on the project -> store -> create package)
– Install the package.
– Run app and make sure it saves some user data.
– Make a new package with second version.
– Install package.
– On the Start menu, search for Debuggable Package Manager and then start it.
– A PowerShell window properly configured for the AppxDebug cmdlet appears.
– To enable debugging of an app, you must specify the PackageFullName identifier of the app.
– Type Get-AppxPackage at the PowerShell prompt (to view a list all apps that includes the PackageFullName.)
– At the PowerShell prompt, enter Enable-AppxDebug PackageFullName where PackageFullName is the PackageFullName identifier of the app.
– Run app
– Launch Visual Studio
– Go to Debug -> Attach to process…
– In the list of available processes select the one called WWAHost.exe and with the name of your app in the Title column.

A Walk In The Dark

The game I’ve worked on for more than one year is finally available for download from Amazon or the game’s website.

We’re trying to get the game on Steam so if you like the game and you’d like to see it there, please vote for it here.

Check the gameplay and launch trailers below:



We hope you enjoy the game as much as we did making it! :)

UVideos Xbox Application

I moved to Canada last summer by the end of July to join Digiflare. As soon as I arrived I was assigned to work as a Lead Developer on my first Xbox project. The project had to be ready for Black Friday (Nov 23rd) so it had to be launched on November the 20th because new Xbox application roll out on Tuesdays.

It was a tough project but we we’re able to deliver successfully on time.


You can find more information on the project in this page: http://www.xbox.com/en-US/live/partners/univision

It has been very interesting to learn the insides of a Lakeview application and I’ll keep at it in the near future.

“New” technologies (Discovering the TI world)

Today’s post describes my adventure into the world of TI (Texas Instruments) programming. A little bit out of its time but nevertheless interesting to anyone who likes to learn new things and open their horizons.

My cousin is a few months away of completing his Civil engineering degree and is really interested in TI programming, doing scripts that help him solve problems really fast instead of having to do them manually (most useful in exams). He does all the programming in TI-Basic, a language similar to Basic but specific to TI calculators and like most (if not all) of these interpreted languages, they don’t provide any security if you want to sell your programs. Thus he turned to C programming. Now, C is a whole new beast when compared with this TI-Basic language and it’s much harder to start doing some interesting things without your programs crashing all over the place.

He asked me for help but having no knowledge of this TI-Basic or C tools/libraries/APIs available for these calculators and without access to internet and limited documentation and samples I wasn’t able to get complete the program although I did manage to make half of it. This was a 4 hour marathon that started around 22h30 till 2h30 and I had to admit defeat at the time since I was very tired but I promised to help him to finish the program. I don’t have a TI calculator so I needed to find a way to test it in my PC and fortunately there is an IDE along with an emulator and ROM image available for free on the internet. I’ll list what’s needed to be able to run and the debug C programs for TI calculators because it took me a while to get everything up and running due to incompatible versions of software.

  1. Download and install TIGCC 0.96 beta 8 (Unofficial version)
  2. Download and install TiEmu 3.02a
  3. Download TI Voyage 200 ROM image (my cousin’s model)
  4. Create a project in TIGCC
  5. Run the project (Debug –> Run)
  6. When the TiEmu wizard appears select “You have downloaded a FLASH upgrade on the TI website”
  7. Then select the TI Voyage 200 ROM image you’ve downloaded before.

Voilà! If everything went well you should see the program running on the emulator.

If you want to debug your project, follow these steps:

  1. Project –> Options
  2. Select the “Compilation” tab and then the option “Generate debug information”
  3. Run the project (Debug –> Run)

You should see new windows open if you followed these steps. These are the debug windows that will help you find your bugs.

Here are a few snippets I had to discover here and there through samples / documentation:

/* Retrieves strings passed into the program */
ESI argptr;
int argtype;
char *str;
InitArgPtr (argptr);
while ((argtype = GetArgType (argptr)) != END_TAG)
  if (argtype == STR_TAG)
    str = GetStrnArg(argptr);
    printf("%s", str);
/* Get a variable from TI-Basic into C */
SYM_ENTRY *sym_entry = SymFindPtr (SYMSTR ("variableName"), 0);
if (!sym_entry)
  return FALSE;
ESI expr = HToESI(sym_entry->handle);
int argType = GetArgType(expr); /* Retrieves the type of the expression */
long num = GetIntArg(expr); /* Retrieves an integer if the expression holds an integer (positive or negative) */
/* Directly from TIGCC documentation: Run a TI-Basic program or statement from C */
char fname[25];
strcpy (fname, name);
strcat (fname, "()");
push_parse_text (fname);
h = HS_popEStack ();
  NG_execute (h, FALSE);
  HeapFree (h);

Including tigcclib.h will make sure that you have all the TI library functions available in C. For the last snippet you need to follow these steps if you have an error regarding push_parse_text function:

  1. go to Project->Options
  2. select the “Compilation” tab
  3. click on “Program Options…”
  4. select the “Operating System” tab
  5. and set the “Minimum AMS Version” as 1.01

Geo Reminders for WP7

I wanted to build this app since I bought my WP7 but unfortunately it wasn’t possible to have background tasks running on the phone. It was great to know that Mango would bring this functionality to the Windows Phone and I started working on the app right away.

Since I program these WP7 apps outside work it takes a while to get them done. Geo Reminders allows us to program alarms or reminders depending on our location. This is useful to set a reminder for the next time you visit a place for example. Or imagine that you left a book at work and you want to bring it home, you set the reminder that will only go off when you arrive at work so that way you can grab the book and put it near your stuff when you leave.

Here are some screen shots:




The application is available since early March in the marketplace. You can download it here.