Sunday, July 19, 2015

Internet of things....

Internet of things... what are these things.. we know the internet... It's mostly like people connect to a one net..
this internet is not exactly same as the internet we know today... it is broader than that.

Things.. hmm things can be anything, it's not only humans, 

1. You
2. Me
3. My House
4. My Dog
5. My Car or any Car
6. Main light bulb in our house living room
7. Ultimately anything can sort of imagine.

Internet means they are connected to a one net where they can work together, collaborate, observe, control and etc from anywhere. Simply things can talk to other things connected in the net.

It's like devices in your home collaborate in sharing the electricity power. When washing machine is running, may be other devices will go on to a idle state if it is possible, to allocate more power for washing machine.

Internet of things is a concept that becoming real rapidly fast.

Here John Barrett talks about internet things.. interesting video to start learning the concept... 


Another interesting video about IoT,



Lakmal

Monday, November 18, 2013

Optical Character Recognition in .NET....

Interesting post about the optical character recognition in .NET

http://digit.lk/optical-character-recognitionocr-in-c/

Lakmal

Sunday, May 19, 2013

Simple Made Easy

Very very useful talk by "Rich Hickey" about how we can make things simple in Software development, which will leads to make things easy.
Simple Made Easy....

Cheers

Lakmal

Wednesday, April 24, 2013

Analysis Paralysis

Over thinking or over defending things can prevent lots of winning moments, profits or new inventions than preventing failures. Detail analysis should come to play at the right time and in right phase of anything. This is not only about software developments, it is applicable to any industry.

Found a nice article about Analysis Paralysis, an idea which is applicable to any domain.

http://www.reliableplant.com/Read/18128/analysis-paralysis

Cheers

Lakmal

Sunday, March 31, 2013

HTTP for Developers

HTTP, sometimes it is not quite noticeable that that HTTP is the paying a major role in allowing us to,

  1. Learn the latest cricket news and Updates from CricInfo.com
  2. Watch funny videos from YouTube.com
  3. Search the we and find the stiff using google.com
  4. and almost all whatever you do with the internet 
As Programmers, we got major responsibility of making opportunities to use Internet for people to achieve different different things in their life. Even though HTTP has been hidden from the Web Developers by the tools they use to develop web applications, still we need to know the basics, which will help to make things comfortable in,
  1. Come up with new solutions
  2. Troubleshooting the issues
  3. And etc.
Here I found a series of Articles, which are explaining the HTTP for developers from odetocode.com. 

Lakmal
 

Tuesday, March 26, 2013

Software Inventory

We know that different kind of inventories that we need to deal with in day today life. Inventory is not something that can make money. But what can make money is Products and Services which are in production.

The story is same for Software industry too. Having the ideas,code or software in inventory stage, is not making satisfaction for any one. While it is growing the size of the them, we know that no one feels comfortable about it. So what we need is we need our software in production, without been exist them as ideas,codes or software inventories. Joel Spolosky talks about Software inventory, content is very clear and useful.

Performance, Workload, scalability and etc, once systems are in Production


Udi Dahan, I found his writings not so long ago, but kind of addicted to his blog because of the way he writes the stuff and their content. He is a Software Simplist, which is not a familiar designation in our environment.

Recently I read his article on an experience they had with one of their System in Production. It was about handling the Workload, Performance and Scalability of the system, once it was exposed to the real production scenarios. We know that we are not that good in these type of system attribute testing in our software development and testing environments, but when it’s come to the production, things can go horribly wrong sometimes, if you had not thought about the them at the design phase of the system.

It is true that we can’t predict all possible scenario at the development stage of the systems, but we have to make sure that we have room for the extensions, whenever they need to be in place.
Here is the article. It is been written few years ago, but content is almost valid for more years to come too. 

Saturday, March 16, 2013

System Architecture And Design Talk...


Few days back we had a discussion about the System Architecture and System design within the Organization. Discussion had an agenda itself and first point was about stories that all of us wanted to share with each other. We had around 14 members participated for the discussion and it was very active discussion too. Sometimes it is bit nervous to hear about the things that we did wrong; but still its great know how people felt about them. Truly I experienced the power of making opportunities to talk about the things that they asked to work is the past.

In general, senior technical people used to work in System Architecture and Design stuff and they are the people who take the decisions most of the time. But the people who are truly implementing them, what’s about them?. Very rarely we asked about the problems they faced, how they feel after they worked on the Architecture and the Design we proposed them to work. We start the projects; people do implement them anyhow and deliver them with lots of difficulties. Finally once we delivered the solutions we have parties and gatherings and etc. If you delivered something successfully, people forget about painful stories behind it and try enjoying the winning moment almost all the time.

But people who work hard on the things that we asked, also have lots of painful stories to tell and share with all. Sometimes even though things went ok, but still people have things to mention in front of the people, who forced them work on that.

I would like take four key points came up in the discussion and talk a bit about them in detail.
          1. Take all the Architectural Decisions at first stage is not possible, but let it evolve by the time
         2.  Re-factor the code after each major releases to the QA
         3. Simple Deployment and it should be decided from the first
         4.Think about data volume from the first, when designing the Databases

Let Architecture Evolve by the Time

Decide the total architecture of a System (large Scale or medium scale) is almost impossible at the first phase of the Project. It’s even not possible if you do the same thing again and again too. Because each times you find things to improve or enhance while develop the systems.

But any of Software Architecture based one or two very simple basic concepts (Styles). These concepts we used say as Architectural styles. Ex Layered Architecture, Service Oriented Architecture, Aspect Oriented Architecture and etc. System Architecture can be a combination of few of these basic Architectural Styles. Sometimes we may need to build sort of custom architectural styles for Our Purposes, and you will not find them in common. Those we can specify as Domain specific or Application Specific Architectural Styles.

My opinion here is that we need to get that basic concepts right at the first stage and let Architecture to evolve around them. Keeping the concepts simple as much as possible will allow us to extend the system Architecture and the Design in the latter part of the Project Life cycle. But you may have a question that to what extent that we have to finish the Architectural

Implementation at the initial stage.  That’s depends on the feeling that architect and the team has. If you feel that you architectural implementation is enough to cater the current system implementation to accomplish main architectural goals, and then stop there for a while.

Re-factor the Core after each Major Release

One of the best points that came out in the discussion, yes we do re-factor sometime implicitly or explicitly. But here point is about doing the re-factoring explicitly. Developers hate of doing re-factoring most of the time, because they loves the code they wrote. May bit lazy to do things or fear for changes. But still we have to convince this as much as possible.
But avoid re-factoring effort as much as possible; we have to avoid taking Architectural and Design decisions at the early stages. That’s why we were talking about letting the Architecture and the Design to evolve by the time as system implementation goes on.

Simple Deployment and it should be decided at first

Again having things decided too much at the initial stage might eat our lots of energy for later re-factoring and changes. Yes we need to have basic style for deployment decided at the first stage. But my point is that we have to let it also evolve by the time. Once we have system implementation done to some extents, we know 100% which artifacts we need to deploy at which places, which time and etc.

Think about Data Volume at the initial Stage

Database is the one of the major building block of the system for data oriented applications. If you are going to change it by time to time, system base will be shaken frequently and that can make system unstable. Yes think about data volume at the start of the project will benefit lot. But at the same time we should make room for changes too. Mean if we face a situation where we need to change our database structure, how we are going to make it with minimum effort, which we have to think at the initial stage.

There were around 40 points came in the discussion and almost all of them are valuable. Let’s see how it goes in the next meet up.

Lakmal

Saturday, March 2, 2013

Entity Framework 6 Alpha 3 with Code First Stored Procedures and Connection Resiliency

Even though I'm not a big fan of Entity Framework, this looks interesting, the latest Entity Framework 6 Alpha 3 release.
Here is the link..

http://www.infoq.com/news/2013/03/ef-6-alpha-3

Lakmal

Monday, February 18, 2013

Choosing the Right Web Programming Model with ASP.NET

Choosing the right Programming model in ASP.NET, sometimes we do it without knowing anything just blindly, sometimes it's depends on our technology(architecture, model) preferences.

But it is always better to choose the right programming model with the evidences. I found a small  video explaining this very briefly, from Microsoft web site..

And this is the video link..

Cheers

Lakmal





Saturday, February 16, 2013

Localized Mobile Note Pad with Google Translation API


This idea is so much related to devices like Mobile phones, Tabs, Pads or may be for PCs and laptops. If you have used any of these devices mentioned, you may already have heard or even used the software application called “Note Pad”. There are different vendors; they provide these note pad applications with different features, Examples Note Pad comes with Windows Operating system, Note Pad++ and etc.
But for all of them, one thing is common that they all have to facilitate to manage (Create and Update) the notes. Even a basic note pad has many cool and advance features these days,
            1.  Line Numbers
            2.  Large Number of Encoding supports
              3. Word Wrapping
4            4. And more


Ok, I just took few minutes to give you a small introduction on Note Pads, but here my point is developing localized Note Pads, Especially for Mobile devices, Tabs, Pads and may be PCs and laptops . Most of our keyboards are English keyboards, but for some languages, they have these devices with localized keyboards, but for most, it’s not yet.
So use local language even with an English key board would be a great feature. But then we will face the problem of how you match English character or a word into the local language character or a word.
Google Translation API is the solution for this and Google is supporting this feature (translation) for large number of languages already and it’s being developing and improving day by day. Most importantly, if you use Google Translation API, then you will get latest translation facilities each time you use it. Means assume that you developed a note pad few months before, for Sinhala Language, and Google made number of updates few days back from today, I mean added few more words and etc, still you get these new words, since you call their Web API directly. If you know bit about Web Protocols; client applications should use the REST in calling this Web API.

To show you example for this, Google has this feature already implemented and hosted in their cloud. For Sinhala Version you can find from this URL - http://www.google.com/intl/si/inputtools/cloud/try/. (Just to make you update, Sinhala is the Language used by Majority of people in the country called Sri Lanka. To know about Sri Lanka, just Google it J. It’s a beautiful county, which you would love to see).



Just imagine, you can give this feature in Mobile, let your customers to send SMSs, Emails, or have notes, publish contents into Social Media in local language though a Mobile Note Pad, that would be great, isn’t it?. Not to wary about someone else has already implemented this or not, just try this with something unique, you will succeed surly. I bet you, most the languages, this has not been done yet. Just check Android Apps, IPhone App store, Windows mobile apps, or any other.

Little bit about Google Translation
Google Translation API is not a free Service, but it’s not very expensive service either. It’s just 20 dollars for 1 M characters. Just check the pricing here.


Cheers
Lakmal

Tuesday, February 5, 2013

Signing Assemblies..

Why we need to sign assemblies? hmm there are number of reasons that we need to sign assemblies, but it is not a compulsory task to do.

Signing assemblies make sure authenticity of it. Means once we have an assembly from the third party and assembly is signed, then it is assured we are getting the exactly same one that has been built by the the third party, which we are supposed to get it from. If assembly is not signed then it is not assured that no one has changed the assembly and built it again once it is delivered from the third that we are supposed to have it from.

Even though it is assured the authenticity of the the assemblies, still it is bit slow in loading singed   assemblies. And that force lots of the parties to not to sign assemblies in some scenarios. There are scenarios that we don't need to worry about singing assemblies.

Without singing assemblies we can notdeploy them in Windows GAC and GAC only accepts signed assemblies. So if you are going to deploy any of your assemblies in GAC, make sure you sign them with Strong names.

We know that we sign the assemblies with String Names, what is the meaning of this string named assemblies. Strongly named means that name is globally unique and there will not be one string name for two signed assemblies.

The next question is how .NET platform make sure these strong names for signed assemblies.

String Name = Name Text + Assembly Version + Culture Information + Public Key + Digital Signature

So this equation makes signed assembly's name strong. And these strong names ensure following feature of signed assemblies,


1. Strong names guarantee name uniqueness by relying on unique key pairs. No one can   generate the same assembly name that you can, because an assembly generated with one private key has a different name than an assembly generated with another private key.

2. Strong names protect the version lineage of an assembly. A strong name can ensure that no one can produce a subsequent version of your assembly. Users can be sure that a version of the assembly they are loading comes from the same publisher that created the version the application was built with.

3. Strong names provide a strong integrity check. Passing the .NET Framework security checks guarantees that the contents of the assembly have not been changed since it was built. Note, however, that strong names in and of themselves do not imply a level of trust like that provided, for example, by a digital signature and supporting certificate.

Signing assemblies can be done through Visual Studio or through the command line. But in any case at end of the day we use .NET SDK utilities. If you have already signed assemblies, there you can generate and give or give existing key file while you signing assemblies.

This singing is been done through a Certificate Authority and if you are using the built in Key Generation facility in the Visual Studio then you are using the Windows built in Certificate Authority. But instead of that you can use third party Certificate Authorities like Verizon for sign you assemblies.

Please following links for more information about signing assemblies,

http://msdn.microsoft.com/en-us/magazine/cc163583.aspx
http://msdn.microsoft.com/en-us/library/ms247123(v=vs.80).aspx
http://blog.codingoutloud.com/2010/03/13/three-ways-to-tell-whether-an-assembly-dl-is-strong-named/
http://msdn.microsoft.com/en-us/library/xc31ft41.aspx
http://msdn.microsoft.com/en-us/library/bb385180.aspx
http://stackoverflow.com/questions/3975723/c-why-sign-an-assembly
http://stackoverflow.com/questions/1197133/anything-wrong-with-not-signing-a-net-assembly
http://stackoverflow.com/questions/4725246/signing-net-assemblies?lq=1


Wednesday, December 26, 2012

Microsoft WebMetrix

This is what Wikipedea says about Microsoft WebMetrix,

“Microsoft WebMatrix is a free, all-in-one, extensible web development application for Windows, developed by Microsoft. WebMatrix lets web developers build websites using built-in templates or popular open source applications, with full support for ASP.NET, PHP, Node.js and HTML 5.”
Here you can find more information about WebMetrix,


With WebMetrix we can develop web sites or applications from the scratch or Templates or by using the famous Open Source Applications like Wordpress, Joomla, DotNetNuke,mojoPortal, BlogEngine.NET and etc. It supports almost all the .NET and PHP Application platforms.

Most importantly it has removed the burden of configuring and setting up these Web Development Platforms and it’s just a few clicks to have everything ready. 

Saturday, May 26, 2012

Roslyn – C#, VB Compilers as APIs


I started developing software in  C language for the first time in my life and then did use Java language especially in university times.  Java, I used to write in notepad earlier days and then compile and run the Program using the command line (“javac” for compile and “java” for run the compiled program code).

But Java also has IDEs like NetBeens, Eclipse, JBuilder and etc, but I quite used to write the Programs in Notepad and that made me so competent in Java those daysJ. After moving to Microsoft Technologies, life was so easy of using the Programming Languages and Visual Studio is been providing numerous support for the developers for past few years. And that’s a great thing and that will give lots of time think about Program logics instead wasting lots of time learning the Program languages.

Just think about, how Microsoft does this, these huge set of features in Visual Studio?

They have been investing lots of money for this and it’s matured a lot too. With Roslyn what Microsoft does is expose those implementations for outside developers as APIs and so then they can use themselves those features in their system implementations.

That’s a huge benefit, because we were struggling lot in making things so dynamic in some business scenarios and wanted generate, compile and run the code on the fly. Earlier we did this with Code Dom library which is also delivered by Microsoft, but this time it has more features than earlier. And the Project name is “Roslyn”. Enjoy it.
Roslyn Project White Paper
Roslyn Project Home
If you google on this subject, “Microsoft Roslyn Project”, you will find more resources.
Lakmal

Friday, May 25, 2012

GUIDs


Uniqueness, hmm, how we can achieve the uniqueness?, that something depends on the environment you work on. We can have various algorithms to achieve uniqueness in different environments, but if you think of achieving uniqueness in globally, it’s a bit complex story. But Eric Lippert explains the things in simple way…

GUID Part one
GUID part 2
GUID Part 3

Lakmal

Sunday, April 22, 2012

.NET Attributes


.NET attributes can be used in different perspectives in .NET Programming.
  1.     Manage object meta data
  2.   Handle Help information
  3.   And more
When it’s come to the implantation of the .NET attributes, we have to know three key things,
  1. How we can declare attributes
  2. How we can use declared attributes in our implementation
  3. How we can access them at run time
How we can declare the custom .NET attributes
.NET attribute itself is a class that we have to implement. While implementing an Attribute, we have to make sure we do two things,
  1. Inheriting our attribute class from that Attribute class which is exists under the “System” namespace.
  2. Specify which types of elements can use the attribute that we are going to implement. This we have to do with AttributeUsage attribute, which is coming with the .NET framework. 


Please find an example of attribute implemented,
using System;
[AttributeUsage(AttributeTargets.All)]
public class HelpAttribute : System.Attribute
{
   public readonly string Url;

   public string Topic               // Topic is a named parameter
   {
      get
      {
         return topic;
      }
      set
      {

        topic = value;
      }
   }

   public HelpAttribute(string url)  // url is a positional parameter
   {
      this.Url = url;
   }

   private string topic;
}

I’m not going to explain things in details of these implementation of this .NET custom Attributes and we know the basics and lets jump into the next step.
How we can use the declared Attributes
If you are a .NET programmer, surely you have used .NET attributes already, because we have lots of .NET attributes coming with .NET framework that we have to deal with day today programming works. Since we have already implemented an attribute called “HelpAttribute”, unknowingly (maybe) we have used an attribute, which is coming with .NET framework, called “AttributeUsage”.
Using Attributes is simple; Let’s use the custom attribute we declared, called “HelpAttribute”,
[HelpAttribute("http://localhost/MyClassInfo")]
class MyClass 
{
}

So we used the attribute and provided a value for its parameter called “url”.
Now it’s time to access the attribute that used in MyClass class.
How we can access the attributes
Accessing the attributes at runtime has to be done with .NET Reflection. Here is a sample code that is used to access the values of attribute “HelpAttribute”.
class MainClass 
{
   public static void Main() 
   {
      System.Reflection.MemberInfo info = typeof(MyClass);
      object[] attributes = info.GetCustomAttributes(true);
      for (int i = 0; i < attributes.Length; i ++)
      {
         System.Console.WriteLine(attributes[i]);
      }
   } 
} 

I didn’t need to go in detail, but just wanted to give an idea about the .NET attributes, which is a powerful feature coming with .NET framework.
Please go through this MSDN tutorial for more information, if you are interested to learn more.
Lakmal

Wednesday, February 8, 2012

What is Software Architecture?


 “Perfect is enemy of good enough”, that is one of the phrase I always trying to remember when I got things to finished on time. Finishing things perfectly will take unimaginable time, but make it good enough will take the time that has to take truly. This I wanted to remind at the start of this article, because of , this is 100% true concept for the Software Architecting too.  
Knowing the basics will always put you on behind the safe margin always. Before going to look at what we can do with the “Software Architecture”, let’s see what the actual mean of it is,

“Software application architecture is the process of defining a structured solution that meets all of the technical and operational requirements, while optimizing common quality attributes such as performance, security, and manageability. It involves a series of decisions based on a wide range of factors, and each of these decisions can have considerable impact on the quality, performance, maintainability, and overall success of the application.”

This definition is not a one that I wrote myself, but I copied it from Microsoft web site, where you can find lots of resources on software architecture. There are lots of definitions that have been published by different peoples and organizations, for the Software Architecture. You can take time to Google and see more definitions.

Why is architecture important?
Like any other structure, Software also needs to have architecture itself to make sure few key requirements,

    ·         How will the users be using the application?
    ·         How will the application be deployed into production and managed?
    ·         What are the quality attribute requirements for the application, such as security, performance, concurrency, internationalization, and configuration?
    ·         How can the application be designed to be flexible and maintainable over time?
    ·         What are the architectural trends that might impact your application now or after it has been deployed?


The Goal of Architecture
What Architecture is trying do is, build a bridge between business requirements and technical requirements by understanding the Use Scenarios (Use Cases or User stories). In generally Architecture should,
·         Expose the structure of the system but hide the implementation details.
·         Realize all of the use cases and scenarios.
·         Try to address the requirements of various stakeholders.
·         Handle both functional and quality requirements.

The Architecture Landscape
It is always better to keep in touch with the architectural trends that shape the Software Architecture today.  There are key forces that demands to change this area of Software development,
 1.       Users and Business demands for faster results
 2.       Better support for varying work styles and workflows
 3.       Improved adaptability of software design


These are few of  key trends in Software Architecting,
 1.       User Empowerment
 2.       Market Maturity
 3.       Flexible design
       4.       Future Trends

The Principle of Architecture Design
Architecting and Designing the things upfront is almost impossible. Things are getting improved stage by stage as you learn more. These are the question that we have to consider while we create an Architecture Design,
·         What are the foundational parts of the architecture that represent the greatest risk if you get them wrong?
·         What are the parts of the architecture that are most likely to change, or whose design you can delay until later with little impact?
·         What are your key assumptions, and how will you test them?
·         What conditions may require you to refactor the design?
Always we have to keep options open for future changes.

Key Architecture Principles
These are the few of key architecture principles which I found,
·         Build to change instead of building to last. Consider how the application may need to change over time to address new requirements and challenges, and build in the flexibility to support this.
·         Model to analyze and reduce risk. Use design tools, modeling systems such as Unified Modeling Language (UML), and visualizations where appropriate to help you capture requirements and architectural and design decisions, and to analyze their impact. However, do not formalize the model to the extent that it suppresses the capability to iterate and adapt the design easily.
·         Use models and visualizations as a communication and collaboration tool. Efficient communication of the design, the decisions you make, and ongoing changes to the design, is critical to good architecture. Use models, views, and other visualizations of the architecture to communicate and share your design efficiently with all the stakeholders, and to enable rapid communication of changes to the design.
·         Identify key engineering decisions. Use the information in this guide to understand the key engineering decisions and the areas where mistakes are most often made. Invest in getting these key decisions right the first time so that the design is more flexible and less likely to be broken by changes.
It’s is always need to use incremental and iterative approach to refine the architecture.

Testing the Architecture
We can consider answering following questions while we are testing the architecture,
·         What assumptions have I made in this architecture?
·         What explicit or implied requirements is this architecture meeting?
·         What are the key risks with this architectural approach?
·         What countermeasures are in place to mitigate key risks?
·         In what ways is this architecture an improvement over the baseline or the last candidate architecture?

Conclusion
This is just an overview of what Software Architecture is. This is not complete coverage of the topic, but I wanted to remember and write things that I leaned from few sources. Most of time it’s Microsoft web site.  Hope to continue this discussion further with few key topics of Software Architecture.

Regards

Lakmal

Saturday, December 10, 2011

This week readings..


No SQL databases
Interesting point, as James Philip mentioning, high percentage of real word Software Application scenarios are document-centric by nature. This concept does not talks about the data normalization, tables, joining or data redundancy, but document oriented data model, concentrate on storing very large amount of information, then analyze the information to learn something.

WebOS 3.0 is based on Enyo, a new HTML framework
HP is targeting a Web base OS for mobile devices, which is based on HTML framework called “Enyo”. And they have release WebOS SDK and PDK and that’s a good new for developer..
And finally WebOS 3.0, announced open source.

Binding Enhancements in WPF 4.5
It’s cutting edge Binding features from WPF latest..
1.       Support Binding static properties via class name
2.       Delay Binding

I’m a big fan of Eric Lippert and he is Microsoft Employee and most importantly fantastic writer. This weekend I went through his blog and found few interesting posts,
Why IL
This is about Microsoft intermediate language - http://blogs.msdn.com/b/ericlippert/archive/2011/11/18/why-il.aspx

The Roslyn preview is now available – Compiler as a Service (CAAS)
When we needed to access the MS code compiling and code analysis capabilities, we used to use Microsoft CodeDom in our applications. But this Roslyn framework, MS is trying to provide these capabilities as a API, where anyone can use those capabilities easily. Microsoft Visual Studio development team will also follow the same and will use this as a base platform for code analysis and compiling.


 Lakmal

Sunday, December 4, 2011

This week readings..


Linked Data – Connect Distributed Data across the Web - http://linkeddata.org/home
It’s about how to use, publish,etc Linked Data across the web and more..
First time I got to know about this and look very interesting.
Handling Dates with Java – Date4J – A Minimalistic Library for handling dates - http://www.infoq.com/news/2011/12/date4j-vs-joda-time
First time I felt great while reading this because I had to change my gear to the .NET platform at the initial part of my carrier. With the amount of functionalities available in .NET languages to handle date and time, you will feel great as a .NET developer.  It’s almost painless..

Lakmal