Managing culture issues in .NET programming, a headache for programmer – DateTime object

Programming is fun and gives the sense of accomplishments to programmers and developers. First it is

Software outsourcing companies India


Programming is fun and gives the sense of accomplishments to programmers and developers. First it is due to sheer joy of creation and solving business problems. As the child takes pride in mud pie, so the programmers and software companies do enjoy building things and solving the business problems.  Programming sounds easy however it requires a hell lot of thinking, thinking and thinking. Common areas programmer fall prey for are handling different culture issues in programming. There are various scenarios that one needs to address while developing application for multiple or different cultures. Some of the areas are:

  • Handling Date-Time values
  • Ideal solution for handling time zone.
  • String operations
  • Handling numeric values

What is DateTime Object?

DateTime object is used to express a date and time of the day in programming. This is used to perform calculation and comparisons of DateTime instance of same time zone.

There are different ways to instantiate a DateTime object.

  • DateTime {Name of class} = new DateTime(2016, 10, 10, 5, 05, 05) ;

    This is a DateTime constructor that is called to create a date with specific year, month, day, hour, minute and second.

  • DateTime {Name 1} = DateTime.Now;

    DateTime {Name 2} = DateTime.Utc;

    DateTime {Name 3} = DateTime.Today;

    Assigns the current date and time, the current (Coordinated Universal Time) UTC date and time and current date to the three new variables.

  • string {string name} = “10/10/2016 5:30:53 AM”

    DateTime {date name} = DateTime.Parse(dateString,


    This parses a date string and converts it to a DateTime value. The Parse, ParseExact, TryParse, and TryParseExact methods are used to convert string to its equivalent date and time values.

Why is it difficult to manage?

It is difficult to manage DateTime when we are performing calculation or comparison on DateTime object which are from different time zones.  Managing DateTime object of two different time zones is one of the challenging job c# software companies consider.  Common difficulties for software programmers in managing DateTime are below.

  • Comparison or calculation of DateTime object of two different time zones

    If one DateTime object contains machine local date/time and another object contains server date/time and suppose server is dealing with French time zone.

    Comparison on DateTime object may not yield a correct value in this case. Calculations like add date/time/days/ year also do not return accurate values and throws unexpected calculation errors.

    Solution is to have a date representation in Universal format (GMT) always – this may not be practical though in all cases. When date representation is in universal format, every day has fixed length and there are no time-zone offsets to deal with that makes it easy to perform any calculations or comparison.

    While performing any calculation between dates, it is recommended by software companies to convert the local time value to universal time first and then perform the calculations and convert back to achieve desired accuracy. Following is an illustration of conversin.

    DateTime {name} = DateTime.Parse("Oct 03, 2016 12:00:00 PM").ToUniversalTime();

    date = date.AddHours(3.0).ToLocalTime();

  • Converting DateTime value of machine time zone or date in string format to DateTime value of other time zone is difficult to handle for developers.

    Here, solution is to call the ‘Parse’ and ‘ToString()’ only after setting CultureInfo to CultureInfo.InvariantCulture. The invariant culture is culture-insensitive; it is associated with the English language but not with any country/region.

    string {DateInString} = "5/1/2008 8:30:52 AM";
    DateTime {date} = DateTime.Parse(dateString, System.Globalization.CultureInfo.InvariantCulture);

    This technique ensures that the underlying time and date values do not change when the date is read or written by developers from different cultures.

Common mistakes by programmers

Following are common mistakes while dealing with DateTime objects.

  • Dealing with ‘Now’

    ‘Now’ method is commonly used to get the current time. The value returned by the ‘Now’ method is in the current machine time-zone context and cannot be treated as an immutable value.

    Converting times to be stored or sent between machines into UTC (Universal Time) is common practice using following method.

    DateTime {date} = DateTime.Now.ToUniversalTime();

    Resulted value would be off by an hour if called during extra hour occurring during the daylight saving.

    Solution is to use ‘UTCNow’

    Instead, call the DateTime.UtcNow function directly. This code will always have the proper 24-hour-day perspective, and then be safely converted to local time.

    DateTime {timeval} = DateTime.UtcNow;

  • Not using ‘InvariantCulture’ with DateTime

    While dealing with parses method to convert it string date value to DateTime value, it considers machine culture. Issue arises when a developer has an application that runs in any of the culture and have date time conversion in the app.

    For example, application has a DateTime picker to show a date with the specific format. In code behind parses a string date to DateTime value using following code snippet.

    string {dateString} = "10/1/2016 8:30:52 AM";

    DateTime {date} = DateTime.Parse(dateString);

    This scenario will generate an unexpected error while dealing with different culture.

    Solution is to use ‘InvariantCulture’ method. The following example uses the invariant culture to persist a DateTime value as a string.

    //Parse the stored string.

    DateTime {dt} = DateTime.Parse("Thur, 1 October 2016 20:34:16 GMT", CultureInfo.InvariantCulture);

    It is also easy to parse the string and display its value by using the formatting conventions of the French (France) culture.

    // create a French (France) CultureInfo object.

    CultureInfo {frFr} = new CultureInfo("fr-FR");

    // Displays the date formatted for the "fr-FR" culture.

    MessageBox.Show("Date formatted for the " + frFr.Name + " culture: " + dt.ToString("f", frFr));

    // Output: Date formatted for the fr-FR culture: mardi 1 octobre 2016 20:34:16

    The Parse, ParseExact, TryParse, and TryParseExact methods are used to convert string to its equivalent date and time value.

    You can also use DateTime.TryParse Method (String, DateTime) that converts the specified string representation of a date and time to its DateTime equivalent and returns a value that indicates whether the conversion succeeded and does not throw an exception if the conversion fails.


  • Developer should understand that DateTIme comparison and calculation are correct and meaningful if they are representation of points of time of same time zone perspective.
  • In general, it is recommended to use a Universal (GMT) time value if possible so that one gets the required accuracy.
  • Always parses string date to DateTime value with using ‘InvariantCulture’ when dealing with different culture for DateTime format.

Top 10 Notable software bugs re-enforces the Software Quality

  Many software outsourcing companies ignore the most important stage of software development l

10 notable software bugs - software outsourcing companies India


Many software outsourcing companies ignore the most important stage of software development life cycle that is Software Quality (Testing). Software Quality Assurance is predominant and unrivalled step in providing quality and successful product to the customer. It is a known myth that the QA process is performed as a last step of software development process however QA starts from the beginning of the project. Quality of a product is backbone to its success. Following case studies provides important insight on how less quality product can create havoc and ultimately impacts the business performance and its brand image.


1. Apple Maps – A vision to replace Google Map

According to (NYtimes, 2016) company decided to replace Google Map with its own mapping system back in the year 2012 with Apple iOS 6 update. Unfortunately, it did not work the way it was planned resulting in one of the most epic failure of the mobile computing. The software was missing entire towns and some locations were entirely misplaced. Company invested a lot of money in building the same and then replacing the software.


2. Windows : the Blue Screen of Death

Per (Geek, 2016),  most of software professionals might have witnessed this bug. This bug was due to issues with hardware driver software. This causes the Windows to crash and stop working. The only solution it was believed to have was to start the computer. This can potentially lead to data loss.

                                 blue screen bug, custom software development companies India


3. Software Security flaw in OLA’s Mobile App

Mobile computing and usage is increasing at very high pace. Users have started using Mobile apps for various reasons like online shopping, booking and online banking. Security is paramount for safe and secure user experience.

Ola cabs app allows easy and fast cab or a taxi booking.  Per (Times, 2016),the two programming flaws allowed unethical individuals with basic computer and programming knowledge to enjoy unlimited free cab rides at the expenses of Ola company. This was due to lack of implementation of security protocols or token validation issues.


4. HSBC business banking glitch

Financial transactions are highly prone to hacking and security breaches for financial gain and misuse. Security is an unrivalled important factor for online banking and transactions. As mentioned by (BBC, 2016), HSBC customers could not access their internet banking for several hours due to cyber-attack. The company website and portal was hit by a denial of service attack, which is caused by overload of network traffic by cyber attackers.


5. Nissan’s Airbag Software Flaw / Malfunction

(Bidnessetc, 2016) takes a note of Nissan’s Airbag software flaw that resulted in 4 million Nissan cars being recalled. The software had safety issues where passenger air bags or seat belts could fail in a crash that can lead to serious fatalities or injuries. As per The Telegraph news, Nissan recalled approx.. 3.5 million cars due to airbag issues and it caused heavy loss to the company.


6. US and Canada : Blackout for 50 Million due to Race Condition Bug

As per the sources of PC Authority, (PCAuthority, 2016), on August 14, 2003, a blackout across eight US states and Canada affected 50 million people. “A race condition bug”, a situation when two separate threads of a single operation uses the same code element, was culprit behind this software flaw. This crashed a system without proper synchronization and resulted 256 power plants offline. This failed primary server within 30 minutes due to unprocessed events queue. Backup system also failed within few minutes.

FirstEnergy’s computerized Energy Management System is known as the direct cause for the blackout that cut off electricity to 50 million people in 8 states and Canada.



7. Computer virus due to World Of Warcraft game

World Of Warcraft (Wow) is a popular game of adventure in the fantasy world. (BBC, BBC NEWS | Technology | Deadly plague hits Warcraft world, 2016) reported a security breach in the game where new Hacker, the god of Blood, hit the game and took the “computer virus” thing literally. The virus, “Corrupted-blood” had the ability to kill off weaker characters thus interrupting the game. This infected many workstations as well.



8. Loss of $440 million in 45 minutes - Knight Capital Group

The Knight Capital Group was an American global financial services firm with great reputation in the market, engaging in electronic execution, market making, and institutional sales and trading. Per (Fortune, 2016), It took only 45 minutes to blow off the company reputation and capital due to a computer software bug. Between 9:30 am to 10 am EST, 1 August 2012, the company’ software bought high and sold low on 150 different stocks. By the time software stopped further bleeding, company had already lost $440 million on trades. Company’s market capital was just $296 million then and loss was about four times its 2011 net income. In addition to this, company’s stock price dropped 62% in just one day according to Bloomberg Businessweek.


9. Starbucks Breakdown caused by Software Bug

Starbucks Corporation is an American coffee company and coffee house chain founded in Seattle, Washington in 1971.

As noted by (Yahoo, 2016), In April 2015, Starbucks had to close roughly 60% of their stores located worldwide due to software failure. Thousands of stores in North America were unable to proceed with their business due to software bug. Software flaw did not allow cash registers to process orders and take payments. The software malfunction was very high and it affected roughly 13,500 locations in US and Canada.


10. Swiss Bank : Software Glitch Sent Bank Statements to the Wrong People

According to (AbcNews, 2016), a Swiss bank found themselves in critical situation in 2014 when they discovered that their software system has sent bank statements addressed to wrong people. Many customers reported receiving along with their statement, other statements comprising of details for other bank patrons.



These case studies are examples of what havoc a software bug can create. Software can be helpful in automating your business processes however they are potentially dangerous if it goes buggy. It can impact your business big time. Software outsourcing companies in India should emphasize software quality and should include this from the beginning of software development.



AbcNews. (2016, 10 1). Swiss Bank Giant UBS Hit by LoveBug Strain - ABC News. Retrieved from AbcNews:

BBC. (2016, 10 1). BBC NEWS | Technology | Deadly plague hits Warcraft world. Retrieved from BBC:

BBC. (2016, 10 1). HSBC online banking is 'attacked' - BBC News. Retrieved from BBC:

Bidnessetc. (2016, 10 1). Nissan Under Investigation By U.S As Two Of Its Vehicles Are Called Back. Retrieved from Bidnessetc:

Fortune. (2016, 10 1). Why Knight lost $440 million in 45 minutes. Retrieved from Fortune:

Geek, H.-t. (2016, 10 1). Everything You Need To Know About the Blue Screen of Death. Retrieved from howtogeek:

MIS-ASIA. (2016, 10 1). MIS-Asia - Top software failures of 2015/2016. Retrieved from mis-asia:

NYtimes. (2016, 10 1). Apple’s New Maps App Is Upgraded, but Full of Snags - Review - The New York Times. Retrieved from nytimes:

PCAuthority. (2016, 10 1). Ten of the world's most disastrous IT mistakes - PC & Tech Authority. Retrieved from PC Authority:,ten-of-the-worlds-most-disastrous-it-mistakes.aspx

Times, T. E. (2016, 10 1). Taxi aggregator Ola hit by tech glitches that allow free rides - The Economic Times. Retrieved from economictimes.indiatimes:

Yahoo. (2016, 10 1). Starbucks breakdown shows how registers have evolved. Retrieved from Yahoo:


Hybrid Mobile app development - Xamarin or Telerik AppBuilder

What is Hybrid App development? Do you ever realize the difference between hybrid app and native app

Software outsourcing companies India


What is Hybrid App development?

Do you ever realize the difference between hybrid app and native app when you download, install and use any app from app store? Visually and aesthetically, it is difficult to separate mobile apps in two baskets – Hybrid and Native.

Native apps are developed considering specific platform like iOS, Android etc. Web apps are primarily apps that run on browsers. Hybrid app is combination of web app and native app. Hybrid apps are developed using web technologies like JavaScripts, HTML and CSS by mobile application development companies. In addition to web technologies, it also contains some native code to make it portable and compatible with all mobile devices.

Hybrid app is a good choice for mobile application development companies as it requires developing one application that is portable and compatible with all mobile device platforms like iOS, Android and Windows. This reduces overall time and cost of mobile app development making it more lucrative option over Native app development.

Ionic, Xamarin, Telerik AppBuilder, React Native are some of the platforms to use for Hybrid app development. Xamarin has been taken over by Microsoft recently. Telerik AppBuilder is in market since long.  

Xamarin Hybrid App development

Xamarin is a .NET based mobile app development platform recently acquired by Microsoft.  It is claimed that no other platform enables businesses to all device platforms like iOS, Android, Mac and Windows with greater reusability, scalability and compatibility than Xamarin.

Mobile application development companies use same data structures, language and APIs for different platforms. Complete app is written using C# and code is shared between platforms. C# is the language covering features of Java, Swift and Objective C making it suitable programming language to create native apps with cross-platform compatibility.

Reasons to use Xamarin

  • There are 20,000+ NuGet .Net libraries and Xamarin components available
  • User friendly IDE, Xamarin Studio for Visual Studio, Windows, or Mac
  • Multi-platform testing on 1000+ real devices online
  • Efficient error handling and reporting
  • Add data synchronization with external devices through integration

Telerik AppBuilder

Telerik AppBuilder is another popular hybrid mobile app development platform that allows developing, testing, debugging, building and publishing cross-platform mobile applications with Apache Cordova or NativeScript. Mobile application companies can enjoy developing mobile apps using Telerik AppBuilder extension for Microsoft Visual Studio.

Reasons to use Telerik AppBuilder

  • Using HTML5, CSS and JavaScript, mobile developers can write once and build native-running hybrid mobile apps.
  • jQuery Mobile and Kendo UI Mobile for AppBuilder mobile projects
  • Realistic simulation, powerful debugging and real-time device updates
  • Easy app publishing using “publish to app store” wizards
  • Integrated cloud backend services for managing and storing app data
  • Enjoy your favorite Visual Studio features, such as:
    • Advanced code editing features such as built-in code snippets and IntelliSense.
    • JavaScript and CSS minifying and obfuscation.
    • Work offline mode capability
    • TFS, SVN and other source control system integration

Comparative analysis of Xamarin and Telerik AppBuilder        

  Xamarin Telerik AppBuilder
Platform requirements Visual Studio , Xamarin Studio Telerik AppBuilder extension for Visual Studio
Development cost Low High
Deployment cost Low Moderate
Development time Less More
Portability Yes No
Development speed High (still depend on the native browser) Slow
Maintenance cost Low High
Skills needed to reach Android and iOS HTML, CSS, JavaScript, Mobile Development Framework Objective-C, iOS SDK, Java, Android SDK
Performance High Low
Graphical performance High Moderate
Cross-Platform Yes No
Distribution App Store/Market App Store/Market
Universal Windows Platform Supported Not Supported
Source Open Source Paid
App performance Moderate Fast
Better Previews Better UI Moderate UI
Example Instragram  


Device Access and features
  Xamarin Telerik AppBuilder
Camera Yes Yes
Push Notifications Yes Yes
Contacts Yes Yes
Offline access Yes Yes
File upload Yes Yes
Geolocation Yes Yes


Hybrid and Native app have its own distinct advantages and disadvantages. Mobile application development companies should consider customer’s requirement and decide the approach. Telerik AppBuilder and Xamarin also offer unique advantages and disadvantages and we discussed based on various parameters. Consider customer requirements and map them both platforms and decide the best platform.

Office add-in development: VSTO Add-ins vs JavaScript API

Microsoft office is one of the most successful and pioneer softwares that enabled and accelerated di

VSTO addin development companies India


Microsoft office is one of the most successful and pioneer softwares that enabled and accelerated digital revolution. Office Add-ins are used for functionality extension and alteration of office clients like Outlook, Word, Excel, PowerPoint and Office 365. Microsoft supports creation of new features and modification of existing features using available APIs and Tools to VSTO software development companies in India.

Office Add-ins types

  • Functionality extension in Excel, PowerPoint and Word
  • New object creation in PowerPoint and Excel
  • Functionality extension in Outlook add-ins

Office add-in development technologies

  • Develop add-in using Visual Studio Tools for Office (VSTO)
  • Develop add-in using Office JavaScript API

Office JavaScript API Add-in

Office JavaScript API Add-in is used to develop office add-in for functionality extension in office clients like Excel, Word, PowerPoint and Outlook using traditional web technologies like JavaScript, HTML and CSS. Following architecture depicts how JavaScript API Add-in works.

                                             Software outsourcing companies India


Benefits of Office JavaScript Add-in technology

  • Add-in created using this technology is highly portable across different platforms like Windows, iOS, Mobile Phones and Tablets.
  • Hosting and distribution of Add-ins developed using JavaScript API is easy using office store. Office store manages complete licensing process and cycle.
  • Online service hosting is easy in JavaScript Add-in.
  • Easy support to bring data from external sources or third party apps.
  • Supports highly interactive UI using CSS and JavaScript
  • Interactive visualization using Charts, Maps and ClipArt to its own excel spreadsheets and PowerPoint presentations.

Challenges of Office JavaScript Add-in technology

  • This technology is new and introduced with office 2016 and thus has very limited support available.
  • It offers very limited APIs and functions and thus not suitable to every requirements.
  • All APIs are not supported by all platforms currently. One needs consider the platform while using few APIs in add-in development.
  • This technology is still in development. You may find some issue during development should Microsoft changes any API or support.

Visual Studio Tools for Office (VSTO) Add-in

VSTO is a set of development tools that is available in the form of add-in or extension (project templates) and it allows Office 2013 and later versions of Office applications to host the add-in and to expose their functionality via .NET framework.




This allows extensions to the Office applications to be written in programming languages as well as to use functionality and user interface constructs from Office applications in .NET applications.

Benefits of Visual Studio Tools for Office (VSTO) Add-in

  • It provides access to complete office object model. So one can nearly perform any operation on office client.
  • Any feature of office client is feasible to improvised or modified.
  • Local machine integration like file systems and other applications are comparatively easy.
  • Good support from Microsoft and other sources available
  • C# or any other CLI programming language can be used to create new office add-in.

Challenges of Visual Studio Tools for Office (VSTO) Add-in

  • VSTO add-ins are not portable as JavaScript Add-ins. These require installation files that can only be used in Windows.
  • Distribution and licensing process need to be handled separately.
  • Integration with third party services using data from different sources is confined to its Microsoft support and compatibility.


We discussed how add-in allows extending office applications per our requirements. Some of the factors that determine the use of technology VSTO vs JavaScript API are following.

  • Purpose and objective of Add-in
  • Data and data source for add-in
  • Host support for add-in
  • Functionalities of add-in

If the requirement for host support is wide, like Windows, OS X, iOS, iPad then it is recommended to use JavaScript API as underlining technology. It is very easy to use and integrate. It also provides easy integration with online services. It can be hosted in office store and also can be distributed very easily. JavaScript API add-in is portable on multiple devices like Tablets, Mobile phones etc.

If the add-in requirement is to use native office functionalities or working with file system, then it is recommend to use Visual Studio Tools for Office (VSTO) as underlining technology for add-in implementation. Timely and useful support is available to VSTO development companies in India from Microsoft and other sources compared to Office JavaScript API. Complete office object model can be accessible using VSTO. Local machine integrations can be done very easily. It is available on Windows since office 2003 so support is also easily available.       


Top ten questions to ask to eCommerce service providers

Better prices, convenience and variety are some of the factors to stimulate online shopping revoluti


Better prices, convenience and variety are some of the factors to stimulate online shopping revolution. Owning an online store is not only a brand requirement but also an essential element to reach to customers directly. Security, frauds, return policy and personal feel were some of the reasons that were hindering customer behavior to shop online. Technological advancements have curtailed these risks and other benefits are outweighing the drawbacks making it lucrative to shop online.

It is imperative that an online store should be user friendly, safe, secure and mobile responsive to offer unforgettable user experience. Right choice of eCommerce platform is the stepping stone and foundation for great eCommerce portal. Consider below questions to discuss with eCommerce service providers to help you choose the right eCommerce platform for your online store.


1. What would be the cost comparison of various eCommerce platforms?

There are three types of eCommerce platforms available namely Licensed Shopping Cart, Hosted Shopping Cart and Custom Shopping Cart.  Each offers varying cost structure. Licensed shopping cart requires one time license fees. Hosted shopping cart offers monthly or yearly recurring charges and some have transaction charges as well. It is good to study the cost comparison of each platform in question.


2. What is the development timeline?

Development time is directly proportional to development cost and opportunity loss. Custom eCommerce solution sounds appealing compared to licensed shopping website and hosted shopping websites however it requires longer development time and thus requires higher investment.  This indirectly mean opportunity loss for the period when website is under development. One needs to carefully analyze to strike a balance between investment, opportunity loss and other business parameters.


3. Is my website secure?

Security and online fraud were biggest setback for online shopping. Technological advancements has subdued these risks however it has not been completely eliminated. It is apparent that your online store should be safe and secure for online transactions. One should discuss security measures of specific platform in question to build the website to ensure zero tolerance to security breaches.


4. Who would host my eCommerce website and what would it cost?

Server response time, uptime, security measures, service level agreement and support are some of the factors to determine best website hosting server. Cost is also an important factor to consider. Website performance is heavily depending on right choice of server. Server choice depends on eCommerce model choice and underpinning technology.


5. What would be the recurring cost to maintain the eCommerce platform?

Timely support and maintenance are very important to maintain smoothly running eCommerce platform to manage technical glitches, bugs and other usability issues. This requires continuous and timely support from eCommerce service provider. Other back office operations like inventory management, order management, customer data management and restore would also require technical assistance.  It is imperative to discuss support and maintenance arrangement and its cost.


6. Which payment gateway is suitable for the said eCommerce platform?

Every eCommerce platform has compatibility issues with certain payment gateways. It is good to discuss payment gateway of your choice with service provider to ensure safe and secure online payment processing.


7. Is my website user friendly and mobile responsive?

Usage of mobile is advancing at very high pace. It is predicted that mobile usage for online shopping would outweigh the normal website usage from computers very soon.  This requires that your website is mobile responsive and users can have uninterrupted shopping experience through mobile.


8. What would be the speed of my website?

User experience highly depends on website speed and performance. Many studies and articles have been published emphasizing the importance of website speed for better user experience and its impact on sales. The average online shopper is highly impatient and does not like to wait for information to load.  It is believed that every millisecond can have an impact on purchasing behavior and decision making process of an online shopper.


9. Is back office administration of website user friendly?

If you are an end-user, it is very important to understand how back office administration works for your online store. One needs to learn this so that inventory and orders can be managed smoothly without requiring any assistance from vendor every now and then. User friendly back office administration would subdue your headache to manage back office operations.


10. Does website / platform offers inline support for marketing/SEO?

Merely online store does not help you to boost product sales. One requires dedicated efforts to market the same to persuade online shoppers to buy your products or services. Online marketing is becoming prominent these days as people search products and services through google and other search engines online. It is evident that it would be a good strategy to discuss your marketing plans with  eCommerce service provider to make sure the website has prerequisites required for your online marketing campaigns.


eCommerce website is your lifeline to remain in business. Questions discussed will you help you to choose the right eCommerce service provider and platform though this list is an indicative and unordered list and not an exhaustive one.


Very best luck with your online shop!