Author Archives: rabeb
“The illiterate of the 21st century will not be those who cannot read and write, but those who cannot learn, unlearn and relearn” Alvin Toffler.
My 2013’s motto is LEARNING, learn how to be a better human, learn about life, science, cultures and of course as a developer learn as much technical things as I can. And to be honest, learning for free is not that bad and that is why I keep an eye on my twitter feed to be among the first to get discounts or free goodies.
One of the cool FREE resources is the Syncfusion eBooks. Wait! You didn’t hear about them and you want to know how I did? But first you want to know what Syncfusion is, right? Okay, okay…
Syncfusion & the Succinctly eBooks
Syncfusion is a 12-year-old company providing a range of enterprise-class software components and tools for .Net platform.
Each one of these is about a different technology and programming language (Azure, TypeScript, WPF etc.).
Unit Testing Succinctly
The book I am reading right now is the Unit Testing Succinctly.
In a nutshell, this 128 pages book will help you understand and use unit tests in your projects.
The eBook covers exactly 12 chapters
- Why Unit Test?
- What is Unit Testing?
- Proving Correctness
- Strategies for Implementing Unit Tests
- Look before You Leap: The Cost of Unit Testing
- How Does Unit Testing Work?
- Common Unit Test Tools
- Testing Basics
- Unit Testing with Visual Studio
- Unit Testing with NUnit
- Advanced Unit Testing
- Unit Testing for Other Purposes
Why Unit Test?
If you are going to make the effort to learn and, spend time to implement unit tests, you should understand why you are doing it. It does make sense, right?
By reading the Unit Testing Succinctly eBook, you will understand that unit tests help measuring correctness, maintaining working code and covering all code execution paths.
What is Unit Testing?
You may have heard about unit tests (especially that one tweet “If you are not using Unit tests, you are doing it wrong”) but you have no idea what is it really or how to do it.
This chapter is the answer for you, it explains in details and precise words what is a Unit, a Test and what is unit testing?
As mentioned for Chapter one, one of the reasons of unit testing is to prove correctness.
This chapter covers in details the meaning of proving correctness from a developer point of view and how to do it exactly from verifying the contract to verifying data transformation results.
Strategies for Implementing Unit Tests
I bet you have many questions in your head right now especially if you are not used to unit testing. Is it possible to use it while I’m already done with the application and I’m in the maintenance phase? Should I write my tests before coding?
Well, all the answers you need are in this chapter.
Look before You Leap: The Cost of Unit Testing
This chapter is a formalized look at the cost and benefits of unit testing.
How Does Unit Testing Work?
If we are investing time to understand and implement Unit tests, it is because we want to use them. This Chapter explains how you can use Unit tests and how they work. It contains code samples to better explain how to load assemblies, find methods and invoke them.
Common Unit Test Tools
In this chapter, things get more technical. You can find some of the most used and known unit test tools like NUnit and Visual Studio Unit Test.
A brief chapter in which the author guides you on the unit testing process, how to deal with bugs, report and track them.
That is not everything
Syncfusion is being very generous, other than the free eBooks, 3 lucky readers will win WINDOWS PHONE essentials package. All you have to do is to comment on this post and leave an email address for Syncfusion to contact you.
Optionally, you can follow me on twitter
In one of my projects, I needed a borderless window in WPF.
At first I thought this was a piece of cake, a matter of setting the border brush to null or transparent and maybe, just to be sure, put the border thickness to zero.
Well…Things turned out to be a bit more complicated than that.
It all depends on the scenario and the user’s need.
Borderless & Non-Resizable Window
Probably the easiest scenario is when you just need a borderless window even if it is non-resizable.
In that case, set WindowStyle property to None and set the ResizeMode property to NoResize.
Borderless & Resizable Window
If you need a borderless and resizable window at the same time, you should set WindowStyle property to None, set AllowsTransparency to True, ResizeMode to CanResizeWithGrip and Background to Transparent.
So far, all this looks pretty simple and easy, right? But in real life applications, you will have children elements inside your window.
If you have a native window as a child, let’s say a WebBrowser, hosted in the window with AllowsTransparency set to True, the child window will not appear at all. This is due to the fundamental “airspace” issue. In particular, composition involving different rendering technologies supports transparency only with entire top-level windows, not child windows.
I took the same code used below and added a WebBrowser to the window, The WebBrowser is visible in the non-resizable window only.
Luckily there is a workaround to that
Borderless & Resizable Window Hosting native windows
As mentioned in the workaround above, we need to create an ‘overlay’ window containing the child and set the borderless resizable window as its owner.
Note that the Overlay window has to be moved/resized in response to the owner window moving.
The class Win32 to do all the calculations:
It’s possible I missed a scenario or two , so I would love to hear about them!
If you are working with Telerik RadListBox for Silverlight or WPF and if you upgraded your Telerik version to the Q1 2013 , you probably noticed that there is something wrong with it.
Basically the problem is when SelectedIndex is changed , the SelectedItem property is not updated and vice versa.
A classic scenario is when you try to set a by default selection:
_myListBox.SelectedIndex = 0;
If(_myListBox.SelectedItem != null)
This is not working anymore with Telerik Q1 2013 because SElectedItem is not updated.
What you can do is instead of _myListBox.SelectedIndex = 0;
put _myListBox.SetValue(RadListBox.SelectedItemProperty, _myListBox.Items);
Getting certified is always a good new year’s resolution for any developer. My goal for this year is to nail the exam 70-483 : Programming in C#.
Since the exam is quite new, the preparation kit is not out yet, you can pre-order it from Amazon and expect to get it later in April 2013.
The exam covers C# 5.0 and the .Net Framework 4.5, so the Pro C# 5.0 and the .Net 4.5 Framework book could be a very good prep material.
When searching for some study guides, I found this interesting post by Andreas Hammar where you can found MSDN study links that cover most of the exam parts.
And who said Twitter is useless ? Look what I found while writing my post :
The programming in C# Jump Start follows the criteria for the exam 70-483, it is tailored for intermediary to seasoned developers looking to bulk up on C# or for a refresher on core concepts and features.
Hopefully this post will help many others who, just like me, are surfing the Net to find some materials to prepare for the 70-483 exam.
As a windows phone user, I was looking forward to get my hands on one of the new windows phone 8 devices. And finally I did. Hurray! I treated myself with a gorgeous HTC 8X
Even though I am only using my phone since yesterday, I can notice the huge improvements in the new OS and new devices.
Some of these improvements are really simple but very useful. The kind of things that make you say “ WOW, now I can do this ! “.
With my ex-windows phones, I wasn’t able to take screenshots whenever I wanted to demo something but now, with windows phone 8, you can have your screenshot in a second.
All you have to do is to press the home button and the power button in the same time.
As a result, look to this beautiful lock screen I have:
I know, there is nothing complicated in here but think how useful it is
It will help me show you more tips and tricks , stay tuned
When trying to activate my Windows 8 , I received this error screen :
First thing to do was to ask Google for help
And I found that the problem is documented in this Microsoft Support Article.
To resolve the problem, follow these instructions :
- Open the command prompt and run it as an administrator.
- Type the following command: slmgr.vbs /ipk XXXXX-XXXXX-XXXXX-XXXXX-XXXXX ( 5*5 X is your product Key)
3. You should see this pop up window within a few seconds :
Now if you go back to the Control Panel and try to activate
You will receive this message
Now enjoy your Windows 8
The Windows phone summit just ended a few hours ago. As expected the summit was dedicated to present Microsoft’s new Windows Phone OS : the Windows Phone 8.
Like many of you out there, I was so excited about the summit and I wanted to know about the new features in Windows Phone8 , but I also wanted to know if the current windows phone devices would be upgraded to WP8 ? The answer is no .
Greg Sullivan explained that the reason behind this decision is the HARDWARE .He said: “ the nature of the investment [in Windows Phone 8] is primarily in areas that are not exploitable by existing hardware.”
But the current devices will get another update , it is the Windows Phone 7.8.
Basically, Windows Phone 7.8 is a Windows Phone 8 without the hardware part. It will have the new start screen with the customizable tiles. Tiles will have three sizes just like in Windows Phone 8 . It is up to the user to choose the size that suits him best. Tiles will also have new colors.
Although it is very realistic that the current devices will not be upgraded to Windows Phone 8 because of the hardware’s big changes , users ( at least those on my Twitter Timeline ) aren’t very happy with the fact that they will have to get new devices if they want to have the Windows Phone 8 , especially those who have Nokia Lumia 900 phones.
Cheer up Windows Phone users , you will have nearly the same experience as the Windows Phone 8
As mentioned in a previous post , I am reviewing UCertify prep Kit for the 70-515 .Net 4.0 Exam.
Sorry it took me so long to get you my final report probably because I am a lazy blogger ( shame!) .
Hopefully my review will help you preparing your exam.
Learn & Practice
You can notice that this section contains a group of tests that will help you before talking the real exam.
- Diagnostic test : This test aims to identify one condidate’s weaknessso he can focus his preparations accordingly. ~15 questions
- Practice test A : This test closely simulates the actual exam. ~55 questions
- Practice test B : This is the second predefined test simulating the actual exam. ~55 questions
- Practice test C : This is the third predefined test simulating the actual exam. ~55 questions
- Final test : This test aims to evaluate if the condidate is ready for the real exam. ~55 questions
- Interactive quiz : It contains six quizzes designed to test key concepts required to pass the actual exam. ~149 questions
- Adaptive test : Test questions depend on your level , if you answer correctly one question, the next one will have a higher level and vice-versa. ~25 questions
- Create a custom test : you can create your own test.
- Create a fixed time test : You can create a test based on the amout of time you have.
For every test, there is a menu to help the condidate moving throw the different questions(prior, next, last, first) . He can add notes or feedback.
This section contains study notes and some quizzes for six chapters:
- Developing Web Forms Pages.
- DEveloping and Using Web Forms Controls.
- Implementing Client-Side Scripting ans Ajax.
- Configuring and Extending a Web Application
- Displaying and Manipulating Data.
- Developing a Web Application by Using ASP.NET MVC2 .
As indicated by the title, this section contains all the study materials you need : articles, tips, notes etc.
Track Your Progress
This section gives the condidate an overview of his progress and readiness for the exam.
- Test history : shows the tests taken and the performance in each one of them.
- Test readiness report : indicates the performance in each test.
- Objective readiness report : indicates the performance in each chapter.
As you can see , I am not ready for the exam , I should study more
The preparation kit is easy to use, helps you study and focus on your weakness before taking the vendor exam.
I would definitly advise you to use it , if you are thinking of taking the 70-515 exam.
I choosed to review the Microsoft exams ( Surprise ! Surprise ! ) and will be starting with the 70-515 exam.
Before publishing my review about the prepKit , I wanted to introduce both the exam and UCertify.
UCertify is a leading provider of test preparation software for IT certification exams. It creates top quality test preparation software for over hundreds of IT certificationexams from all major vendors including Microsoft, IBM, Oracle, CompTIA, Cisco, Adobe.
You can find a prepKit for a almost all the exams :
The preparation kits contain trainings, tips study notes etc.
You can get a free trial before buying the kit :
TS: Web Applications Development with Microsoft .NET Framework 4
“ This exam is designed to test the candidate’s knowledge and skills for developing Web applications using ASP.NET and the .NET Framework 4.”
It is for professional Web developers who are familiar and experienced in ASP.NET, LINQ , ADO.NET , WCF etc and who are using Visual Studio and .Net Framework 4.0.
When passing the 70-515 exam you become a Microsoft Certified Technology Specialist ( MCTS) : .Net Framework 4, Web Applications.
The PrepKit :
This is a first look to the PrepKit , I’ll be reviewing.
Stay tuned for the review in my next post and meanwhile download the free trial and try it
One of the remarkable features is the “ Calendar & ToDos”.
On september 27th, 2011, pocketnow.com published a very detailed post about Mango’s new features.
Here is the video previewing what you can do with the calendar:
“ Tasks are back!! Not only do Exchange tasks now sync with the “To-Do’s” tab with-in the Calendar, but now Windows Live Hotmail To-Do’s sync there as well. Windows Live’s To-Do’s list never used to sync with anything. It seems strange to call them “Todos” since Outlook calls them tasks, but whatever… at least you can see, edit, and manage the things you have to do at work and in your personal life. Most other smartphones still don’t sync Exchange tasks, and it’s great to see this feature back in Windows Phone… and in full force with Windows Live Hotmail.”
However, not everything related to a consumer’s Live profile is available on the phone natively. So Microsoft released a new Windows Live SDK which allows access to Calendars, Contacts, Documents, and more.
In previous posts, we discussed how to use Skydrive in Windows Phone applications.
This time , we will see how to use the calendar.
As mentioned in MSDN, “ The Calendar object contains info about a user’s Hotmail calendar. The Live Connect REST API supports creating, reading, updating, and deleting calendars. Use the wl.calendars scope to read a user’s Calendar objects. Use the wl.calendars_update scope to create Calendar objects for a user. Use the wl.contacts_calendars scope to read a user’s friends’ Calendar objects.”
So before digging deeper in the code and in the case you did not install the necessary tools, here is what you need:
In the next post, we will learn how to read the calendar.