HackerRank

HackerRank is a company that focuses on competitive programming challenges for both consumers and business. The challenges can be solved in a variety of programming languages including, but not limited to:

  • Java
  • C
  • C++
  • C#
  • PHP
  • SQL

and spans multiple computer science domains.

On the consumer side, once you have created an account on their website (which is free!) you then have the ability to submit solutions to a challenge; your submissions are then scored based on the accuracy of the output and the execution time of the proposed solution. Below is an example of a challenge:

HackerRank example challenge

Where, as the hint suggests in the above example, the way to solve this challenge is:

static int solveMeFirst(int a, int b)
{
return a + b;
}

Programmers are ranked globally on the HackerRank leaderboards and earn badges based on their accomplishments to further drive the competition among their online community, which has over 1 million computer programmers.

In addition to the programming challenges, HackerRank also hosts contests, known as "CodeSprints" to the online community; where users compete on the same programming challenges over a set period of time and are then ranked at the conclusion of the CodeSprint. 

Canon Play

Canon Play is a nice little tool that you can use to learn about camera's exposure. The tool has a few settings, each explaining how to use the setting. Below is an image of what the camera looks like:

Canon Play Camera

Your given an image to play with, a child's room with several items scattered across the room. The main item in the picture is the toy aeroplane which is animated - the propeller spins.

To the left on the picture, top right, your given the options of:

  • Manual - Gives you the ability to control the aperture, shutter speed & ISO.
  • Shutter Priority - Gives you the ability to only change the shutter speed. Aperture & ISO changes depending on the shutter speed to give you an image that will always have good exposure.
  • Aperture Priority - Gives you the ability to only change the aperture. The ISO setting defaults to 400 and doesn't change dependent on the aperture value. Shutter speed however does change dependent on the aperture value, to always produce an image with good exposure.

While changing a setting, to the right of the camera, gives you a brief explanation of what it does, and how it effects the exposure.

Canon Play Example Explaination

Each time taking a "photo" with the camera, you're able to see the outcome of the photo, and are able to see your previous attempts at producing a photo with good exposure, below are my attempts:

Canon Play Example Photos

Umbraco Context Mock

Umbraco Context Mock (UCM) is an Umbraco package (as the name suggest) that allows you to write unit tests easier for Umbraco 7.3 upwards; beforehand, it required you to build the Umbraco source from github and reference the Umbraco.Test.dll assembly. Now with the ability in 7.3, we're able to now create mock implementations of the UmbracoContext and ApplicationContext which Umbraco requires to construct certain objects that are common place in our controllers. Using the package helps with the programming patterns that we are going to use to write testable Umbraco controllers, without deviating too far from our standard programming habits (yay).

You can install the package into your Web and Tests project using nuget: PM> Install-Package GDev.Umbraco.Testing and is also available from github if you wish to download and build yourself.

Typically, pre-installing UCM, our controllers would look something similar to:

public class HomeController : RenderMvcController
{
public ActionResult Home()
{
var model = this.Umbraco.TypedContent(ID);

return View(model);
} }

After installing UCM, we'll need to convert our controllers to be testable through the UCM helper. This is easily done by doing the following:

public class HomeController : BaseRenderMvcController
{
public HomeController() { }
public HomeController(UmbracoContext context) : base(context) { }
public HomeController(UmbracoContext context, UmbracoHelper umbHelper) : base (context, umbHelper) { }

public ActionResult Home()
{
var model = this.Umbraco.TypedContent(ID);

return View(model);
}
}

The notable change here is that we're now inheriting from BaseRenderMvcController instead of RenderMvcController. BaseRenderMvcController is a partial class which is part of the UCM helper. This partial class inherits from RenderMvcController itself, so you still have access to all the core benefits and future-proofing of the RenderMvcControllerBaseRenderMvcController is just a thin layer of functionality to allow you the ability to inject the UmbracoContext and UmbracoHelper using constructor injection.

The same principles goes for the SurfaceController & UmbracoApiController, respectively to BaseSurfaceController & BaseUmbracoApiController.

Below is an example unit tests to ensure that an instance of our controller and be instantiated whilst injecting our UmbracoContext and UmbracoHelper to our newly created constructors, without any exceptions being thrown.

public class HomeControllerTest
{
private ContextMocker _mocker;

[SetUp]
public void SetUp()
{
this._mocker = new ContextMocker();
}

[Test]
public void CanIntitializeRenderMvcController()
{
Assert.DoesNotThrow(() => new HomeController(this._mocker.UmbracoContextMock));
}
}

From the example above, the controller is returning IPublishedContent, we can assume that the view is expecting IPublishedContent as it's model. We can then write a test to prevent an object that's not an implementation of IPublishedContent from being parse to our view and causing a YSOD:

[Test]
public void HomeDoesReturnIPublishedContent()
{
UmbracoHelper helper = new UmbracoHelper(
this._mocker.UmbracoContextMock, Mock.Of<IPublishedContent>(), Mock.Of<ITypedPublishedContentQuery>(query => query.TypedContent(It.IsAny<int>()) == Mock.Of<IPublishedContent>(content => content.Id == 7)), Mock.Of<IDynamicPublishedContentQuery>(), Mock.Of<ITagQuery>(), Mock.Of<IDataTypeService>(), new UrlProvider(this._mocker.UmbracoContextMock, Enumerable.Empty<IUrlProvider>()), Mock.Of<ICultureDictionary>(), Mock.Of<IUmbracoComponentRenderer>(), new MembershipHelper(this._mocker.UmbracoContextMock, Mock.Of<MembershipProvider>(), Mock.Of<RoleProvider>())); var controller = new HomeController(this._mocker.UmbracoContextMock, helper); ViewResult result = (ViewResult)controller.Home(); Assert.IsInstanceOf<IPublishedContent>(result.ViewData.Model);
}

This test will create a fake implementation of UmbracoHelper and pass that for our controller to use. The reason you should do this is that we are testing a single unit of work and not the Umbraco core implementation of UmbracoHelper. After our fake UmbracoHelper is injected to our controller, the only thing we should now expect is that when "Home()" action is called; the model that is return should be of type IPublishedContent.

SmartSheet

SmartSheet is a project management software that can be extensively expanded upon. For example, although SmartSheet doesn't come with tools for time tracking, you can build these features yourself using the tools at your disposal. The thing to remember is that if you can do something in spreadsheet, you can with SmartSheet.

When you start of with the software you have the option to start of from a blank sheet, or select one of the numerous included templates. Whichever you pick, there are overlays that will explain all of the salient features. The good thing is that, there's always a handy tool-tip or link to documentation, even videos within arms reach.

Viewing a spreadsheet within SmartSheet occupies the middle of your screen. A palette of buttons down the LHS gives you quick access to tools, different view options such as:

  • Calendar
  • Gantt chart

as well as essential formatting tools. At the bottom of the screen is a ribbon which shows the breakdown of every document attached to the sheet, all the discussion threads, among other items.

Along the top, you'll find the "Home" tab, you're current tab and the ability to create new tabs. The Home tab appears to be the tab for the LHS tool palette; this in fact is where you go to access work spaces, resource management tools and other stuff.

Framerjs

Framerjs is a tool to create animated or interactive prototypes. The tool was developed by (and for) product designers. It allows the designer to have a very fine control on what kind of behavior they want to see in their products without actually writing production code. Framerjs is one of the quickest tools to transcribe an elaborate design intention into something that people can play/test with.

Framerjs isn't device specific, it can be used to prototype a large variety of devices and OS including:

  • Web/Desktop apps
  • Android
  • iPhones
  • Tablets
  • watches

It also integrates nicely with other designer tools such as sketch or Photoshop to quickly export assets and setup a project.

Whodunit

Whodunit is an Umbraco package that gives you a new dashboard for the Content Section, giving you the ability to set a date range for you to then export the change log as an CSV.

The dashboard is slick and easy to use. Once selected the date range and clicked the "Generate Report" button, a "Download Report" link will become available.

whodunit Dashboard

Once downloaded the CSV, opening the file will produce something like the following:

Whodunit Example Report