Navigate / search

dynamic – Code review

With each new version of .net framework Microsoft tries to add some new elements to the language, which in theory should improve the possibilities of language and comfort of the software developer. In .net 4.0 new keyword – dynamic – has been introduced. This type enables the operations that will be resolved at run time. It means that we can use any name with dynamic object and compiler will not show any error during compilation – even if there is no method with used signature. The error will occur when the running application will not find used method. Read more

Useful value converters

Value converters – small pieces of code that are very useful in case of binding some values in XAML. Without them some types of bindings in XALM would not be so easy. We use them in Windows Phone, Silverlight or WPF projects. In most cases for each new project I copy the most important converters to solution. For me the most important are:

  • string / Uri to BitmapImage
  • bool to Visibility
  • Color to SolidColorBrush
  • String + StringFormat

Please click more to see implementation of the following converters. Read more

Oh that recursion…

Some time ago I lost two days for finding trivial bug. It was done completely unconsciously. Anyway, as most of other bugs. Application started to behave quite strange – after launching, it crashed immediately. Probably you will ask yourself what it is unusual. I have started standard procedure – run application with connected a debugger. But debugger was useless. Application crashed without any notification disconnecting the debugger. I have not got any single clue that will help me to solve this riddle. Read more

Static – devil in sheep’s clothing

The static keyword is used to declare static members. This modifier can be used with classes, fields, methods, operators, etc. Without this operator we wouldn’t be able to do many things. But on the other hand I think it is sometimes overused. What’s more, sometimes people who use it do not realize the risk that is associated with it.

My friend, with whom I had pleasure to work, used to say each time that static is used it causes death of one software developer. In many situations he was totally right. Many times we have remove static elements during refactoring. Read more

Free Microsoft certification exams

Few days ago Microsoft has published promotional codes for Visual Studio 2012 exams. By using those codes you are able to take an exam for free. Of course these are beta exams. But it does not change the fact, that when you pass it you will get normal certificate. You can chose from following exams:

  • 481: Essentials of Developing Windows Metro style Apps using HTML5 and JavaScript,
  • 482: Advanced Metro style App Development using HTML5 and JavaScript,
  • 483: Programming in C#,
  • 484: Essentials of Developing Windows Metro style Apps using C#,
  • 485: Advanced Metro style App Development using C#,
  • 486: Developing ASP.NET 4.5 MVC Web Applications,
  • 487: Developing Windows Azure and Web Services.

Please note that the number of sites as well as time of promotion is limited. Promotional codes can be found at Born To Learn.

Good luck!!!

Measuring memory usage in Windows Phone

One of the biggest gaps in performance counters is the lack of information about current memory usage. One of the requirements for the certification of applications on Windows Phone 7 is limitation to 90 MB memory usage by an application for phones with less memory than 256 MB. At the moment there is no phone on the market that meet this condition. Theoretically, we should not worry. However, according to the information from Microsoft the next generation operating system Windows Phone Tango should already allow for the production of low-budget phones with less memory. Read more

Windows Phone performance counters

When you are creating application you should always remember about its performance. Application should run smoothly, information about the change progress, response to user actions, etc. In the case of mobile platforms, this problem is even more serious. We are used now, that computers have more powerful multi-core processors, large amount of memory, or fast disk. What was once important in the software development process – the effectiveness of proposed solutions – are often not taken into account. Now, shortcomings in the code are being compensated for by efficient equipment. Read more