Friday, December 6, 2013

How to Work with Sensors for Windows Phone @ Sri Lanka .NET Forum, December 2013 Meetup

Windows Phone is made amazing with a set of sensors that work together in order to provide some great functionality as in the other smartphone platforms.

In this presentation I spoke about an overview of the sensors in Windows Phone and then did a demonstration  on few sensors including Acelerometer and Gyroscope.

It's really great the support Windows Phone Emulator provide when it comes to testing the sensors and everything. 

Monday, September 16, 2013

List View Threshold in SharePoint

It's been a few years I have started working with SharePoint and lists, libraries, user groups and etc.. are now seems like much interesting from the internal way they are handled. Never faced a situation where 5000+ list items are involved in the days of training and now it seems like the best times where I get to know the performance management is important and other considerations are much valuable when it comes to the development.

SharePoint has this interesting feature that actually saves the database servers being loaded with heavy queries on list items and it is called list view threshold. By default it is set to 5000 for normal users and 20000 for users with administrative privileges. This can be set to any value at anytime and also disable and allow any load to be put on the db server, which is equivalent to breaking the fence around the house and asking people to come in thousands.

Sunday, September 15, 2013

NDepend for Developers to Write Quality Code

Writing code is easy. But writing quality code is not that easy. Naming conventions, variables and constants defining, right use of the enums, class member visibility and many more things exists for the developer to be concerned with. In fact, you can save your customer as well as destroy him depending on the code you write sometimes. There are unit tests and load tests that Visual Studio provides inbuilt which you can asses the accuracy and speed of the code you write. Of course there are some best practices which should be followed but when you are a day before the code freeze, it is sometimes not likely to happen. 

I have tried out StyleCop which is a style analysis tool that works at the code level and FxCop which is a static analysis tool that works on the level of managed assembly. They give a lot of support for the developer to write some quality code. But what I am going to describe in the rest of article is a tool that do many times of work than any of these does. 

I got a message on LinkedIn from Patrick Smacchia, who is the CEO and Lead Developer of NDepend with an amazing gift. It's a free professional license for NDepend. I tried the tool for a few weeks and found some interesting features in it that could save my time and improve my code quality. So I used it to evaluate one of the projects I did about an year back. In a way I was really happy that I have recorded only 51 rules violations in a project with 232 classes when I was just 1 year experienced. 

Saturday, August 10, 2013

Introduction to Windows Phone 8 Development @ Sri Lanka .NET Forum, August 2013 Meetup

I got the opportunity to do my second Sri Lanka .NET Forum presentation on 8th August 2013. Even there were many presentations done by me on Windows Phone development at MS Champs Community and once for University of Kelaniya staff, this one looked bit different as the attendees are professional developers. So no free MSDN subscriptions or developer license for this crowd. 

As Windows Phone is an interesting topic for anybody who would love a smartphone, no need explain the interest of the crowd on the technology. The presentation took place after a fabulous presentation by MS Office MVP Dr. Nitin Sadashiv Paranjape which was scheduled at last minute. 

Thursday, August 8, 2013

Windows Phone App Studio: Easiest Way on The Earth To Create A Smartphone App

It was earlier the days where websites were built with huge efforts. Content Management Systems made things easier. Creating Smartphone apps is not that easy on any platform except on Windows. Now Microsoft has made that much easier. Can you imagine creating an app in a same span of time you create a simple blog by selecting a template and adding some content?

Monday, August 5, 2013

Visual Studio Shortcuts that Save My Time

Visual Studio is an amazing IDE that have lots of functionality built in to that so that could save the time of the developer. As I have heard, except for Apple Xcode, there is no other IDE that could compete with Visual Studio. First point of attraction for me was the set of short cuts that I can use to save my time. In-fact it is Ruwan (my boss) who pulled me into using them and I started loving them. 

I would mention here some of the most frequently used shortcuts by me in day to day coding. Of course you can change them to a way which you would like within visual studio and export as a file, so can import it and use it in another Visual Studio environment. The shortcuts I mention here are valid for C# selection as the Visual Studio environment.

Sunday, August 4, 2013

Android vs Windows Phone from a Developer Perspective

First of all I must say both of them have really good innovations. Android for benefiting millions of people by giving at least a phone that could run a smart stopwatch app and call that device a smartphone and Windows Phone for providing something people can use easily and get to know quickly. What makes me surprise most is Windows Phone being able to facilitate a better user experience with a dual core processor which Android does with a quad core processor. The time I am writing this post, Windows Phone is no where with the number of devices when compare with Android and my ex-favorite iOS. 

Start making notes about the developer perspective, Windows Phone is way far better than Android and you will realize why eventually. 

Saturday, August 3, 2013

Declarative (CAML) vs Imperative (.NET Code) List Creation on SharePoint

This has been a problem for me since I got my hands on SharePoint development. I am a .NET developer and I am used to write C# code quite easily for everything. At first few projects as usual creating a list was just a matter of few code lines for me on a feature activation. I knew there is a way I could do this with CAML but I did not try. Finally when a requirement came in to customizing a list edit template, I got to know it is easy to do with CAML where as hours of my research time went in waste when I tried the same with C#. This drives me forward to look and see why did Microsoft came up with CAML approach. I spent few time and I found a bunch of Pros and Cons each have.

In SharePoint as you may know, there are 3 easy ways to add a list to a SharePoint site. 
  • Using Code (C#.NET or VB.NET), known as Imperative
  • Use CAML, known as Declarative
  • Using SharePoint user interface (Designer or Web Application)

I am forgetting the SharePoint user interface as a developer approach for the rest of this application and go bit deep in others. 

Friday, August 2, 2013

Imagine Cup 2013 - Just Missed Russia

Some would call we won. Including definitely 4 of us. But end of the day it comes to 4 or 5 people who we need to convince. Judges are known as CEOs, CIOs, CFOs but looking at the current status of country it is a truth fact that if they were much capable of handling the situations, making the right decisions, the country would not be in this state. That is why I do not give much about Sri Lankan business minds say unless he/ she is an entrepreneur. In a summary, does not matter whether you call I am illiterate or wrong for me its us who were the best. I think I am reasonable enough given that the so called business master minds would have never thought to this extend when they were students. As I mentioned earlier, unfortunately its 4 or 5 people who decides our journey. Cannot do much. That is the rule of this game.

Tuesday, April 30, 2013

Store Certification and Common Mistakes

As you all know, Windows 8 gives a lot of advantages for the developers, specially entrepreneurship a good platform to compete with grand scale products. It was Apple who introduced it and Google who ruined it with rubbish apps and now its Microsoft who comes with certain quality requirements and specifications that an app must fulfill to be featured in the Windows  store. As same as in all other platforms, there are few key areas that you need to concentrate on if you need a killer app to be put in.

Monday, April 29, 2013

Imagine Cup 2012 – Brought it back 2 earth

Some said, Imagine Cup Sri Lanka deserves to be in the IT Faculty. Some said this time it’s IIT going to win as they got 16 teams out of the 32 or 33 local finalists. Some gave “Pora talks” saying with a gadget on the arm, they can save the lives of blind. Some asked how a team of 3 with one being suspended can win over with such a morale. Things went upside down sometimes when felt the danger of being disqualified at a point. We had enough stuffs to laugh at with some advises by genius on showing impressions on Facebook. Missing a member who cared that time as a brother was another. But we had a cool captain who did not give a damn about odds against us and a designer who was hardworking. With a mentor who was not only a mentor at sometimes, we came to the local finals.

Thursday, April 4, 2013

Programming with HTML 5 Web Sockets @ Sri Lanka .NET Forum, April 2013 Meetup

This is the my first presentation for the .NET Forum Sri Lanka and thought of presenting something that has been new and exiting yet not well sung which is the web socket programming feature that comes with HTML 5. If you have visited Cricinfo website, you might have seen the scorecard getting updated every 15 seconds. This is done by refreshing the particular div every-time using Ajax. Practically, there is no way a ball being bowled every 15 seconds and the server bandwidth gets wasted in hundreds and thousands times.