Yes, my blog audiences! You read it right!

Just visit the starting repo in codeplex: http://visualfsharp.codeplex.com/

Capture_official_fsharp_codeplex

And don’t worry, this F# repo in codeplex is legit, it’s maintained by F# developers at Microsoft.

So now we can involve directly in the future direction of F# language (including F# compiler), library, tooling in Visual Studio!

Note: in this repo, it’s advised to use Visual Studio at least Visual Studio 2012 to compile F# language repo, tooling and libraries.

Can’t wait to contribute to F# codeplex! Yayyy!

Posted by Eriawan Kusumawardhono | with no comments
Filed under: ,

How I miss a good software dev... Really I miss him/her.
But I do have a list traits of a good one! Basically comes into two things: lazy and wise.
Lazy in a sense that he/she is so lazy to code from beginning without planning and reuse.
So, he/she should have these traits when being asked for questions or to do a task:

 
Ask the wise candidate about the solution of any recurring problems in code reuse, he shall answer with design pattern without too many theoretical mumbo jumbo.
Ask the wise candidate about how to differentiate and choose the best approach to solve a problem in a pressing business process, he shall answer with the best hammer for specific nail.
Ask the wise candidate about how to choose between platform to solve pressing enterprise needs instead of choosing programming language, he shall answer the reason with impeccable reasoning instead of burying our heads with fanatic programming language choice.
Ask the wise candidate about how to solve his past problems in his past works, he shall answer with impeccable reasoning and his answer will show that he can learn from the past, not simply having only one solution for all, and also this show that he can grow and willingness to grow and improve.
Ask the wise candidate about how to solve big problem or develop big application in pressing matter and time without no reason, and he will not have enough time to think the best solution, and you'll lose this wise candidate. Because the question will deny his laziness and his proper planning, thinking, and problem solving.

 

Mind you, this developer has thought beyond any programming languages, so the hell with C++,C#, Java, VB, or even my main language, F#.
He shall continue focusing on platform choice, instead of minding and burying with language programming choice.Time comes to choose whether Java or .NET, and there's no time to choose whether Java, Ruby, C#, C++, VB.

He shall continue to be lazy by reusing existing components, diminishing any adhoc tasks while continue to preach planning and problem solving in elegant manner... Gone are the religions of programming languages.

As I said, this is my personal rant. The quote above is from myself. I really miss him/her, and I won't tell you who he/she is.
I have no intention to insult or harm anyone else. I welcome suggestions, though.

Good news again!

Not just previous WPF template I’ve already described, now the F# templates are available for others such as ASP.NET, Nancy, Web API, MSTest as well!

For ASP.NET MVC, it supports ASP.NET MVC 4 and the latest ASP.NET MVC (at the time of this writing), ASP.NET MVC 5 as well.

The MSTest template means that we can use MSTest to have unit test for F# projects!

This is the original link of F# team blog that has this announcement: http://blogs.msdn.com/b/fsharpteam/archive/2013/12/12/new-visual-f-templates-for-asp-net-web-api-mstest-and-nancy-now-available.aspx

This truly shows that F# community doesn’t stop sharing and providing support for all of us!

Begin with this blog entry, I will dedicate a specific blog entry to list all of the F# community templates for Visual Studio 2012 and Visual Studio 2013. Can’t wait to see what happen next!

In the meantime, I hope I can join Dan Mohl, the original creator of those templates, to contribute more templates for Visual Studio especially Visual Studio 2013!

Hi my blog audiences!

I’m happy to share that Visual F# 3.1.1 is available to download! This is the link: http://www.microsoft.com/en-us/download/details.aspx?id=41654

 

visualfs_3.1.1

Keep in mind, this update is only for Visual Studio 2013 and its updates.

The nice features about these updates are:

  1. released as out-of-band, this means not always have to wait for the update of Visual Studio 2013
  2. bug fixes
  3. standalone F# compiler is now available for machine without Visual Studio installed

Enjoy and download this free update!

Hi all,

 

Little known to all, there’s a WPF project template that supports F#, with the help of F# type providers! Yes, we can now create WPF app using F# with visual IDE support of XAML!

This handy extension is created by Daniel Mohl, one of Visual F# MVP!

fsharp_wpftemplate

The project template is available as Visual Studio extension for VS 2012 and VS 2013: http://visualstudiogallery.msdn.microsoft.com/e0907c99-bb04-4eb8-9692-9333d5ff4399

Note: it’s also available for VS 2010 but I believe VS 2010 is now nearly at the end of lifecycle. So please VS 2012 at least.

The project template is available under Visual F#->WPF like below:

fsharp_wpfprojecttemplate_createproject

Create it, and now you’ll have WPF visual IDE for F#:

fsharp_wpf_visualide

Now F# is becoming more fun to use for WPF developers!

Yes! Previously available for Windows 8.1, now IE 11 is also available for Windows 7 SP1 and Windows Server 2008 R2 SP1.

I recommend you, my blog audience, to download the 64bit version as Microsoft is moving towards 64bit.

In fact, Windows Server 2012 R2 is only available in 64 bit!

This is the download page URI: http://windows.microsoft.com/en-us/internet-explorer/download-ie

Microsoft is also beginning to broadcast IE 11 downloads:

IE11_win7_win2008R2

Enjoy full speed browsing in IE 11!

Posted by Eriawan Kusumawardhono | with no comments
Filed under: ,

Hi my blog readers!

Another journal is born! now RX journal about web services!

I have just dived deep in .NET 4.0 technology stack, when this week I was assigned to create web services. As .NET mostly guy, I revisit my skill in creating WCF.

Outside world, many things happened. The need of having REST services with the correct model and incorporating HTTP verbs (not just GET and POST) is becoming crucial and more relevant.

Fortunately, Leonard Richardson has written the REST maturity model as the baseline for us. But Martin Fowler, the best known guy that one popularized DSL and PoEAA (Patterns of Enterprise Application Architecture) helped us to understand REST maturity model.

Martin Fowler described the levels into these:

  • Level 0 – RAW HTTP
  • Level 1 – Resources (with HTTP binding as endpoints)
  • Level 2 – HTTP verbs
  • Level 3 – Hypermedia

Level 0 means you’re using RAW HTTP with either GET or POST, but the resulting request and response is plain XML. This is why Martin describes this Level as swamp of POX (Plain Old XML). A good sample of this is .NET Remoting using RPC in .NET 2.0 and above and Java’s RMI. In Level 0, the talks only involves talking to only one endpoint.

Richardson Maturity Model_Level0

Level 1 means you’re considering the request and response as real HTTP object, but the main concern here is talking and requesting specific resources as part of HTTP conversation.

This picture was taken from Martin Fowler’s article:

Richardson Maturity Model_Level1

This means not just specifying endpoint, but we also specify which resources needs to be sent and to have.

Level 2 means incorporating HTTP verbs, meaning that now not only specific resources, but it’s also introducing HTTP verbs with response codes.

Richardson Maturity Model_Level2

This means that Level 2 add more concern on separation of which HTTP verbs are changing states and not changing states.

These HTTP verbs change states:

  • POST
  • PUT
  • DELETE

This HTTP verb does not change state:

  • GET

Fortunately, WCF in .NET 4.0 is confirmed to have full support of Level 1 and with more care, it also supports Level 2.

This is a small sample of Level 1: (an operation contract of testvalue)

WCF_REST_simplesample

And this is the explanation related to the REST levels:

WCF_REST_Maturity_Level1

It’s quite simple in WCF, isn’t it? But when you consider Level 2, you also have to pay attention to the verb and the HTTP returning status codes.

Supports for setting and getting HTTP status code is available in WCF using WebOperationContext.

I’ll dive into WCF supports for Level 2 in the next blog entry about this.

Put it simply, Level 2 concerns about:

  • Resource specific (as in Level 1)
  • using HTTP verbs
  • specifying HTTP status codes (for each HTTP verb used) as a mean to define what is the nature of the resulting resource.

Level 3 add concerns about using HTTP as the transport for Hyper media, means that the data will have the additional information of what is the next destination.

It’s quite elegantly illustrated as below picture:

Richardson Maturity Model_Level3

As you can see, there’s additional information in the forms of links to the resource. This means that the hyperlinks in the data has to be specified.


Further references

Now, it’s week 4! We could not have the workshop within the next week of week 3 because of my busy schedule, sorry!

Also in the week 4, we decided to meet at QQ Kopitiam, at Pacific Place at 9:30 because I had something to do first in the morning. Not just my schedule, but the study club will need to adjust with the participants. Therefore this week 4 was commenced on 7th December, 2013.

To my surprise, the attendance were few: Wakhid and Aris weren’t present. But Wakhid was able to tell me that he’s still minding his final paper assignment.

Ok, the show must go! Sorry to leave you if you weren’t present, guys!

This week I reviewed the knowledge of basic generic and collection. To my surprise, not all of them understood and grabbed the full concept of last week.

WP_000182

The assignment was to create a simple implementation of LINQ’s WHERE and also implement ICollection<T>, so I decided to repeat the explanation on how generic works.

Basically we can consider generic type as parameterized type or type as parameter. So, if we declare ICollection<T>, we could use and implement derived ICollection with String as parameter (or any type).

The type T then can be replaced by String, so the use will be ICollection<String> (read as ICollection of String). In fact, arrays in .NET 2.0 and above are implemented as collections of parameterized type, so when we have array of bytes, it’s actually implemented as collections of strongly typed bytes, not just array of boxed objects.

Sample from MSDN: (from http://msdn.microsoft.com/en-us/library/vstudio/b5bx6xee%28v=vs.110%29.aspx)

// The .NET Framework 1.1 way to create a list:
System.Collections.ArrayList list1 = new System.Collections.ArrayList();
list1.Add(3);
list1.Add(105);

System.Collections.ArrayList list2 = new System.Collections.ArrayList();
list2.Add("It is raining in Redmond.");
list2.Add("It is snowing in the mountains.");

Although it’s very subtle, the ArrayList will cast to objects, and this is called boxing.

As consequences, we also need to understand boxing and unboxing concept in C# and VB. For more info, visit boxing and unboxing in MSDN Library.

Now with .NET 2.0 and above, we can create list with strong typed:

// The .NET Framework 2.0 way to create a list
List<int> list1 = new List<int>();

// No boxing, no casting:
list1.Add(3);

// Compile-time error:  // list1.Add("It is raining in Redmond.");

Now every time we access each or any member of list1, we are confident that the type of the member is int.

This type parameter concept is very powerful, and it’s becoming a basic feature for all modern programming language nowadays. Not just languages on top of .NET platform, .NET itself has integrate generic deeply as part of CLI and CLR implementation.

Other platform such as Java had begun implementation of generic in Java 5 (JDK 1.5.0) although it came late. Luckily, there’s an official tutorial of generics in Java from Oracle.

By integrating generic deeply into the runtime, now it’s up to the programming language to leverage this! In .NET, we have C#, VB, F#, C++.

Hey, it’s time for the participants to try!

WP_000184 (2)

Finally, they could create the LINQ WHERE! …And now time to eat!

WP_000191

Next meetup: advanced LINQ concept.

 


Sidenote

Again, I encourage all of you to read TAPL book by Benjamin Pearce, to fully understand the type theory behind generic type.

Hi my blog audiences!

My favorite free Team Foundation Service is now called Visual Studio Online!

This is the original official announcement: http://www.visualstudio.com/en-us/news/2013-nov-13-vso

vs_online_IC697190

 

It’s also coincidence with the launch of Visual Studio 2013!

Also we can code using Visual Studio by online using “Monaco” (Microsoft codename):

vs_online_monaco_IC697203

Monaco will support ASP.NET, Javascript, Ruby, Python and PHP!

Now the pricing for Visual Studio Online is complete:

http://www.visualstudio.com/products/visual-studio-online-overview-vs

The good news is for 5 developer in a team (or less) the price is free. For more than 5 developers, Visual Studio Online is available in subscription levels.

The level is Basic, Professional and Advanced, and here’s the official comparison table:

vs_online_comparison_Capture

Now, what are you waiting for? Start code today in a team!

It’s week 3 now! Time for MUGI participation! Now MUGI Jadetabek has initiated study club. Initially we have two tracks: developer track and infrastructure track.

Initially started as an idea from Abdullah Muhammad (chairman of MUGI Jadetabek) and I when attending Microsoft Community Summit, now it becomes realization. The place is at Microsoft Indonesia’s main office, JSX on 18th floor.

The course will be in the form of 5 times informal meeting weekly.

For developer track, we have 5 attendees. We have decided to limit the number of attendees for now, as we want to spread and teach the knowledge effectively.

Initial developer track will be delivered by myself, Eriawan. As for now, I deliver introduction to C#.


Week 3 is on 8th November, still at the same Microsoft Indonesia’s HQ at BEJ Jakarta.

Now, the subject is about advanced OOP and collections in .NET (including generics).

This week we only have 2 attendances because Wakhid was taking care of his final paper assignment and Aris was sick.

I had demo on LINQ Select:

Sample_SELECT_LINQ

As always, the show must go on!

MUGI_studyclub_WEEK3

We moved to smaller rooms but I think it’s good, because it separated from the Infrastructure track that begins on developer’s week 3!

I gave home assignments to create implementations of ICollection<T> and also create WHERE method of LINQ.

As promised, the slide deck will be uploaded soon. I hope tomorrow I can download the slide gracefully as it’s quite large, more than 6MB!

The next week 4 will be scheduled on 23rd November. Stay tuned!

Hi all!

Time for MUGI participation! Now MUGI Jadetabek has initiated study club. Initially we have two tracks: developer track and infrastructure track.

Initially started as an idea from Abdullah Muhammad (chairman of MUGI Jadetabek) and I when attending Microsoft Community Summit, now it becomes realization. The place is at Microsoft Indonesia’s main office, JSX on 18th floor.

The course will be in the form of 5 times informal meeting weekly.

For developer track, we have 5 attendees. We have decided to limit the number of attendees for now, as we want to spread and teach the knowledge effectively.

Initial developer track will be delivered by myself, Eriawan. As for now, I deliver introduction to C#.


Hi there! This is Week 2 of Developer track study club, part of MUGI Jadetabek community program.

As usual, we held this on Microsoft Indonesia office, on 2nd November, 2013.

This week I bring OOP concept in C#.

Official link for OOP in C# and VB (for Visual Studio 2012) is at: http://msdn.microsoft.com/en-us/library/dd460654%28v=vs.110%29.aspx

Before that, we spent 1 hour to discuss last week homework task: creating butterfly.

These are the pictures from Week 2:

mugi_studyclub_week2_01 

mugi_studyclub_week2_02

Basically, OOP has these 3 pillars:

  1. Inheritance
  2. Polymorphism
  3. Encapsulation

Unfortunately, OOP was not described well in MSDN Library.

I suggest we look at the Oracle’s Java documentation of OOP at: http://docs.oracle.com/javase/tutorial/java/concepts/

They have nice illustration to describe encapsulation:

And the sample in real world:

The slide will be available on week 3, tomorrow! Smile

Hello there! I’m now writing about SDLC in the form of journal.

The journal will contain my quick insight and ideas taken from best practices, and it also contains my company’s (RX Communica) shared perspective and practices. RX Communica is my own hybrid of non-profit and profit company.

This journal doesn’t have to be in order of learning sequence, not like my F# adventure series. Enjoy!


Now I’ll discuss feature point!

Feature point is a weighted score, and it should be based on how much the feature is anticipated based on "MUST HAVE" of Moscow method. It can also have psychological cost, in a sense of the importance of the feature.

At first creation, a feature will have either zero or positive point, but as the feature is used, it can also have negative point.

User feedback, especially when it's focused on a feature will be counted as a weighted score point.

These are the sample use cases and reasonings:

  • If there's many negative point for this feature and if this feature is the base foundation for all other feature, then this feature needs to be prioritized to have attention, but it doesn't have to be integrated first. The attention is very critical, that it may lead to feature detach (abandon) or recreate the feature with different logic and refined functional spec and technical requirements. In my previous experience, the integration of this feature can be deferred for next minor or major release, depends on the criticalness.
  • The feature that has many negative points should be considered as technical debt that has to be paid soon, as a debt has to be paid in order to decrease critical back log of feature defect that wasn't good thought at the beginning.
  • If there's a new feature as the evolution consequence from this feature, then the new feature request based on this one should be rejected or we can investigate further and communicate to the stakeholder that this feature is based on current feature's negative points and it will add more negative points.
    This can lead to further democratization of how we provide the servicing of feedbacks from stakeholder, as if the positive feedbacks don't outweight the negative feedback, we can safely weighing more and leaning more on positive feedback as the source of prioritization consideration. This technique often called "crowdsourcing" but only in scope for software development.
  • If the feature has many positive points and also has positive feedback points, then this feature can accept future enhancements.
  • The feature (or can be features) that meets our coding and high reliability standard on extensibility (including the notion of Open-Closed principle from SOLID principle) has to be integrated first because it's easier to integrate with high confidence. This feature is therefore have high positive feature points.
  • By keeping these green field and feature point concept from start, we will not be trapped easily into brown field model and complexity (smile)

This is to illustrate the fate of a feature in feature points perspective:

FeaturePoint_timeline

If you read the Code Complete 2nd Edition book, the feature point can be used to prioritize integration between features. Feature dependencies should be taken into account first, provided that you have dependency documentation available clearly. If there’s no documentation, then there’s a large possibility that the the software project will fail in the middle of development, test, or even when used in live production.

There’s a video from Channel 9 MSDN website that quickly describe feature point in action. This video is about the introduction to C# 4 design team, but it’s very worthy to watch.

Here’s the link: http://channel9.msdn.com/Blogs/Charles/C-40-Meet-the-Design-Team

NOTE: the feature points not to be confused with feature point matrix of function points.


Further references

  1. Code Complete 2nd Edition for online reading (if you have Safari account): http://techbus.safaribooksonline.com/book/software-engineering-and-development/0735619670
  2. Code Complete 2nd Edition book to buy at Amazon: http://www.amazon.com/Code-Complete-Practical-Handbook-Construction/dp/0735619670/
  3. Function points for measuring algorithm, inputs, outputs complexities: http://www.spr.com/feature-points.html
  4. MosCow method: http://en.wikipedia.org/wiki/MoSCoW_Method
  5. Crowdsourcing: http://en.wikipedia.org/wiki/Crowdsourcing

Hi all!

Time for MUGI participation! Now MUGI Jadetabek has initiated study club. Initially we have two tracks: developer track and infrastructure track.

Initially started as an idea from Abdullah Muhammad (chairman of MUGI Jadetabek) and I when attending Microsoft Community Summit, now it becomes realization. The place is at Microsoft Indonesia’s main office, JSX on 18th floor.

The course will be in the form of 5 times informal meeting weekly.

For developer track, we have 5 attendees. We have decided to limit the number of attendees for now, as we want to spread and teach the knowledge effectively.

Initial developer track will be delivered by myself, Eriawan. As for now, I deliver introduction to C#.


This is the picture from Week 1 on 26th October, 2013:

mugi_studyclub_week1_01

Above, Abdullah was delivering welcome speech.

 

I start this week with this discussion:

  1. Quick intro to Visual Studio 2012
  2. Installing offline documentation of Visual Studio 2012
  3. Creating Visual Studio C# project
  4. Basic primitive type of C#
  5. Looping (for and foreach)

The topics above was adjusted with the current knowledge and current understanding of the audiences. This is why some of the topics are very basic.

In this week, I gave them homework task to display butterfly using “*” and spaces.

The slides will be ready after week 3, based on the evaluation for 2 weeks of participation, guys!

The next week: Fundamentals of OOP!

Interested? Ask Abdullah Muhammad, or visit MUGI Jadetabek on Facebook!

Hi my blog audiences!

Yes, you’re right! It’s not a typo! Visual Studio 2013 has been released and available to download!

Just go to: http://www.microsoft.com/visualstudio/eng/products/2013-editions

This is the original announcement by Somasegar in his blog: http://blogs.msdn.com/b/somasegar/archive/2013/10/17/visual-studio-2013-available-for-download.aspx

What’s new in Visual Studio 2013: http://www.microsoft.com/visualstudio/eng/visual-studio-2013

The editions of Visual Studio 2013 are the same as Visual Studio 2012:

  1. Express
  2. Test Professional
  3. Professional
  4. Premium
  5. Ultimate

For those new to Visual Studio, I suggest starts using Visual Studio 2013 Express Edition.

Here’s the link: http://www.microsoft.com/visualstudio/eng/downloads#d-2013-express

vs2013_express_download

Now, everything is getting more interesting in Visual Studio world! Visual Studio will have shorter cadence release! This is also a perfect sample of Application Lifecycle Management discipline clearly implemented!

VS2012_Cadence_Schedule

The picture was from a slide deck of Brian Harry, MS Technical Fellow, when delivering presentation on TechEd North America 2013.

This means, every 11 to 13 months a new Visual Studio version will always be available.

Hello my blog audiences!

Today let’s talk about memoization.

This is the definition of memoization in Wikipedia:

memoization is an optimization technique used primarily to speed up computer programs by having function calls avoid repeating the calculation of results for previously processed inputs.

To put it simple, memoization is a technique by remembering the previous result of the function results. This implies that memoization is best to use as recursive functions, because it needs to call itself again!

The need to store values means that it needs mechanism to store result value.

To implement this mechanism, of course we need another helper variable to store the result.

Don Syme, the original creator of F# has this simple sample of memoization.

Here’s his starting sample:

donsyme_memoization00

There’s no further explanation about how the code above works. We’ll try to dive it together.

In his first sample, type checking on x (as x in the “fun x –>”) will always be performed.

He uses System.Collections.Generic.Dictionary of <_,_> to map x as the key and fill the value with the result of computation of f x.

This is the power of type inference in action, so we can expressively map Dictionary<_,_> to have two kinds of generic type without naming it.

F# then will infer the first “_” as the key, and the second “_” as the type of the value.

The signature of “memoize f” is “('a -> 'b) -> ('a -> 'b)”.

The Dictionary used then will be used as a cache to store result value.

He further update the memoization sample.

This is the update using unchecked type:

   1: let memoize f =
   2:     let cache = Dictionary<_, _>()
   3:     fun x ->
   4:         let mutable ok = Unchecked.defaultof<_>
   5:         let res = cache.TryGetValue(x,&ok)
   6:         if ok then res
   7:         else let res = f x
   8:              cache.[x] <- res
   9:              res

And now using single mutable reference of Map:

   1: let memoize f =
   2:     let cache = ref Map.empty
   3:     fun x ->
   4:         match (!cache).TryFind(x) with
   5:         | Some res -> res
   6:         | None ->
   7:              let res = f x
   8:              cache := (!cache).Add(x,res)
   9:              res

This last sample is more functional, because it uses immutable Map instead of ordinary mutable Dictionary<Key,Value>.

More Posts Next page »