browse by category or date

Last night match was brilliant. United is continuing its winning ways. After deposing Tottenham and Liverpool, they beat Aston Villa courtesy of goals from Ander Herrera and Wayne Rooney.

United started the game immediately in high gear. They pressed forward searching for opening goal. Five minutes after kick-off, Wayne Rooney was brought down inside the box when he was clear. Unfortunately, referee Roger East was not impressed. It was really unfair because Rooney was clear, ready to pull the trigger and there was a touch from Ciaran Clark. It should have been penalty and straight red card.

United came close at minute 25. Marcus Rojo unleashed a 35-yard powerful shot. But Brad Guzan brilliantly tipped the ball for corner.

Finally United break the duck 2 minutes before the break. Ander Herrera put an accurate low strike past Brad Guzan, Old Trafford erupted with joy. Daley Blind is credited with the assist.

Three minutes after the break, Aston Villa almost equalised. Christian Benteke was clear inside the box, but he got his footwork all wrong. He scooped the ball over the bar.

Angel Di Maria entered the pitch on minute 70, replacing the ever-dangerous Ashley Young. Eight minutes later, his cross found Rooney, which brilliantly control the ball on the air, before unleashed a powerful shot to top left corner. Goalll!!! United 2, Aston Villa 0. What a magnificent skill shown by Wayne Rooney.

With the whole Old Trafford still in awe after Rooney’s magnificent goal, Aston Villa managed to pull one back. The corner-kick found Christian Benteke, which then slowly slotted it in between David De Gea’s legs. De Gea must be cursing himself for allowing such sloppy mistake.

It’s game over for Aston Villa. At minute 91, Ander Herrera strikes again. A low, straight shot, within a blink of eye left Brad Guzan stunned.

About Hardono

Howdy! I'm Hardono. I am working as a Software Developer. I am working mostly in Windows, dealing with .NET, conversing in C#. But I know a bit of Linux, mainly because I need to keep this blog operational. I've been working in Logistics/Transport industry for more than 11 years.

Possibly relevant:

I was looking for F# book Bedok National Library, but couldn’t find it. So I borrowed this book instead.

After finishing it, I can’t say I like it. Maybe because the book is aimed towards Java programmers (the functional part is done in Groovy/Scala). But at least I was not totally wasted my time. I picked up few things, mostly on the concept of functional programming. Here’s what I learned from this book.

Why Functional Programming?

Should we learn Functional Programming (FP)? Apparently yes. Here’s why:

  1. We can closely model the solution exactly like how we would solve it in our brain
  2. FP allows us to closely mirrors the mathematical function which in turn allows us to design stronger algorithm

Feature of Functional Programming

  1. First class function: function which takes function as parameter, or returns a function.
  2. Pure function: function that has no side effects
  3. Recursion: function which calls itself
  4. Immutable variables: variables which once set, the value can’t be changed
  5. Non-strict (lazy-loading) evaluation: only produce the result when the the result is consummated
  6. Pattern matching: match the variable’s value to a pattern.
  7. Anonymous function: function which don’t need to give name. E.g. Lambda function.
  8. Closures: a type of anonymous function which is used as a function factory. Using closure, we can easily build functions then pass them to other functions while referring to local variables

The book was quite thin for a programming book standard 😀 I found the book quite easy to follow. Maybe because I have accidentally familiar with functional concepts used in jQuery.

About Hardono

Howdy! I'm Hardono. I am working as a Software Developer. I am working mostly in Windows, dealing with .NET, conversing in C#. But I know a bit of Linux, mainly because I need to keep this blog operational. I've been working in Logistics/Transport industry for more than 11 years.

Possibly relevant:

bridge.net.2Today, the team behind Ext.NET opens the veil on their new project, Bridge.NET. The premise of this project is simple, “Write C#, Run Javascript”.

So instead of writing directly in Javascript, we wrote the project in C#. Later, we cross-compile it to Javascript. I kind of wonder whether this is necessary 😀 Afterall, the C# and Javascript is having a lot in common.

Anyway, let’s not judge it too early. Let’s try it out and hopefully it will lead to something.

Installation

First, we need to download the Visual Studio Extension. Cool, only 85 people downloaded so far.

Run the .vsix file after download.

Create Project

Once we installed the extension, we can now create the project.

By default the project will only contains one .cs file

using Bridge;
using Bridge.Html5;

namespace HelloWorld
{
    public class App
    {
        [Ready]
        public static void Main()
        {
            // Simple alert() to confirm it's working
            Window.Alert("Success");
        }
    }
}

When we build the project, it will generate a .dll file. But the actual Javascript outputs are located in Bridge\output folder. We need to “Show All Files” in order for them to appear in Visual Studio.

Here’s the generated Javascript:

Bridge.Class.define('HelloWorld.App', {
    statics: {
        $config:  {
            init: function () {
                Bridge.ready(this.main);
            }
        },
        main: function () {
            // Simple alert() to confirm it's working
            window.alert("Success");
        }
    }
});

So how are going to use the generated Javascript? We need to include it in a simple HTML file:

<!DOCTYPE html>

<html>
<head>
    <title>My Demo App</title>
    <script src="bridge.js"></script>
    <script src="demo.js"></script>
</head>
<body>

</body>
</html> 

My Thoughts

At first I was quite skeptical with this projects. But as I tried more examples, it became clear to me. Bridge.NET is essentially the same as Ext.NET! The difference is in the output. The output of Ext.NET is forever will be a Ext.JS / Sencha framework, but in Bridge.NET we have the flexibility to choose the framework. Right now it is only supporting Bootstrap and jQuery. Soon, PhoneGap and AngularJS will be added.

With the project is being open-sourced at GitHub, many will be able to contribute adding other Javascript frameworks into the list of supported framework. Bravo!

Come to think of it, definitely there is a niche for Bridge.NET. I personally ever delivered a project in Ext.JS 2.0 with much pain and suffering. But once I found Ext.NET, I never look back to Ext.JS. I do hope that Bridge.NET will able to alleviate most pains associated in any Javascript frameworks it supports.

About Hardono

Howdy! I'm Hardono. I am working as a Software Developer. I am working mostly in Windows, dealing with .NET, conversing in C#. But I know a bit of Linux, mainly because I need to keep this blog operational. I've been working in Logistics/Transport industry for more than 11 years.

Possibly relevant: