Sunday, 16 August 2015

Computer/PC Not Responding Problem

My home’s PC suffered from a weird problem which eventually became a headache for me and my brother. I was not sure about the root cause or even the symptoms of the problem for long, as simultaneously operating system on my computer failed as well and wasn’t booting up. Now that I am able to nail down every aspect of the problem I want to share with others too. I am glad that my PC is up and running back to normal.

PC Hardware Specifications:

Hardware specifications of the PC are as follows:
  • Intel(R) Core(TM)2 Quad CPU Q9400 @ 2.66GHz
  • ASUS Motherboard (P5Q Pro Turbo)
  • 4 GB RAM
  • ATI Radeon HD 5850 External Graphics Card

Background

I happened to have Microsoft Windows 7 64 bit running very stable with ATI Radeon 5850 external graphics card. There were no driver problems and hardware/software compatibility issues at all. I was able to run graphics and image processing software along with high-end graphics demanding games without any issues.  
In the mid of year 2014, I upgraded the OS (operating system) to Windows 8 (64 bit) and gradually to Windows 8.1. Graphics Card drivers for ATI Radeon HD 5850 were upgraded too. The upgraded OS and drivers didn’t work really well and PC suffered runtime exceptions. We tried a lot to debug the cause by analyzing the crash dump files but were unable to diagnose. 
Few months back I was told by my brother that now he is facing some screen resolution issue with the computer as well. After few days of his complaint, the operating system crashed.  Every time when the computer was turned on, windows 8 recovery screen appeared with troubleshooting options. We couple of times tried to recover the system but it was all in vain. 
Every troubleshooting options was tried that exists in the Windows 8 recovery menu.  



Figure 1: Window 8 Recovery Menu

Problem, Symptoms and Diagnosis

The main problem popped out in front of us in a very strange way.  Each time “refresh or reset your PC” options were tried, it ended up in the middle like a power failure.  
Here is a list of steps/actions in a sequence that were performed to debug the problem:
  1. Refreshed BIOS to the default settings from options available when PC is just starting and by removing jumper on the motherboard as well.  [Note: As a side note I would like to mention that this step actually did not work for me as it was not the actual cause of the problem.]
  2. Used a different power input to the power supply for voltage stability.
  3. Luckily by shifting PC to another location where we have different power input I was able to proceed with the windows recovery setup.  It all happened as matter of luck that I connected following minimum devices and was able to refresh my PC:
    • Monitor
    • Hard Drive
    • Motherboard and processor of course
    • Bootable USB drive 
  4. PC was refreshed successfully, normal operations like browsing windows were performed for testing which worked pretty well.  I thought to shift back PC to its original location. It was all working very normal, when I connected DSL cable to the modem and ran internet to download the latest drivers for ATI Radeon HD series.  Suddenly, PC was halted like power failure as occurring earlier the problem popped out again. 
  5. I noticed some very important symptoms which led me to the root cause during this failure:
    • Processor fan was stopped
    • Monitor display was blank
    • NUMLOCK was still ON and was not responding
  6. PC worked without any issue in the safe mode, so I tried to locate crash dump or any other clue but was unsuccessful.
  7. PC was again disconnected from all extra devices (like headphones, DSL connection, DVD ROM etc.).
  8. I searched over the internet and read somewhere to check the temperature of the CPU.  Utility named RealTemp (http://www.techpowerup.com/realtemp/) was downloaded from the internet with the help of my cellphone and transferred it to the PC using USB disk.  Luckily, in this whole process the problem didn’t arise again and I was able to run the utility. The temperature of the CPU was really high, I took a screenshot which is shown below:

Figure 2: RealTemp Temperature Calculation

Root Cause

After performing the above mentioned steps, the root cause of the problem came out to be with the temperature of CPU.  There was nothing wrong with the operating system. 
Solution
In order to fix the temperature of the CPU, PC along with its power supply and all the devices were one by one cleaned using a brush.  Processor’s heat sink, RAM, Graphics card were unplugged from the motherboard and cleaned.  Processor heat sink and fan were full of dirt as shown in the figure below:

Figure 3: Dusty Processor Heat Sink and Fan

After cleaning, all the devices were assembled/connected together to perform temperature test again. With all the devices connected (DSL cable, DVD ROM etc.) the temperature was very normal.  Please see the screenshot of RealTemp reading below:


Figure 4: RealTemp Temperature Calculation after cleaning

All the device drivers including ATI Radeon HD series were downloaded and tested.  PC is now up and running without any issues.  
As an extension to this I would like you to read more about TJ Max on the internet.  I read somewhere that it is another word for core temperatures. 

“It is the maximum allowable temperature for a processor's internal cores, if you reach TJ Max the processor's THERMTRIP# signal will activate shutdown to prevent damage to the processor.”
I hope this post will be helpful and relevant for all the concerned who are troubleshooting their PC's.

Thanks for reading!

Thursday, 6 August 2015

Knockout - Assignment of Observable Property

If you are a beginner in Knockout JS, this post can be very useful for you.

Problem

Have you ever came across a scenario or wondered why your observable property is not working as expected? 
It is very frustrating that after spending hours while writing your client side code, HTML binding is not working properly. After debugging the code, it is revealed that the cause of the problem is with the assignment of the observable property.
I have seen it many times that programmers with novice Knockout skillset are making this mistake which can be avoided by following correct rule of assignment and will save a lot of precious timeJ.

Scenario

Consider a very basic view model for book bookModel and with one observable property as bookName.
var bookModel = function () {
var that = this;
        that.bookName = ko.observable();
};
Snippet 1: Book View Model Definition
The structure of HTML markup with which we are going to bind instance of bookModel is as follows:
<div id="bookPanel">
        <div id="bookForm">
               <h1>Book Form</h1>
               <input data-bind="value: bookName" />
        </div>
        <hr />
        <div id="bookReview">
               <h1>Book Preview</h1>
               <h2 data-bind="text: bookName"></h2>
        </div>
</div>
Snippet 2: HTML markup
In order to create instance of book view model bookModel and bind it with the DIV tag in the markup having ID bookPanel following code can be used:
var bookObj = new bookModel();
bookObj.bookName = "Lord of the rings.";
ko.applyBindings(bookObj, $("#bookPanel")[0]);
Snippet 3: Model Binding
We are all setup with the required changes in the code and ready to test it in the browser.  So let’s try.
The screenshot below shows the output of above mentioned code in Google Chrome.


Figure 1: Output in Google Chrome when page is loaded
It seems that everything is working correctly.  Book name “Lord of the rings” is shown as expected in the input control and as well as in heading (H2 tag).  Let us try to update the value using the input control. 
Wait a minute, changing the value from the input control is not updating the text for the heading tag at all.  As shown below, the updated value in the input “The Hobbit” is not reflected in the heading tag.


Figure 2: Output in Google Chrome when updating value of input is not impacting heading
Let’s examine snippet 3 again used in this post.

var bookObj = new bookModel();
bookObj.bookName = "Lord of the rings.";
ko.applyBindings(bookObj, $("#bookPanel")[0]);
Snippet 3: Model Binding
Assignment done for bookName in the 2nd line of this snippet is the culprit.  It is actually overwriting the observability provided by Knockout and assigning “Lord of the rings” string value to the property. 
So let’s correct our code. Corrected line is highlighted below in snippet 4:
var bookObj = new bookModel();
bookObj.bookName("Lord of the rings.");
ko.applyBindings(bookObj, $("#bookPanel")[0]);
Snippet 4: Correct Code for Model Binding

Solution

From the snippet 4, it can be seen that in order to assign a value to the observable, call the observable (with in parenthesis brackets just like calling a function or method) and pass the new value as a parameter.

Complete Code

<script type="text/javascript">
       var bookModel = function () {
var that = this;
             that.bookName = ko.observable();
       };

       $(document).ready(function () {
             var bookObj = new bookModel();
             bookObj.bookName("Lord of the rings.");
             ko.applyBindings(bookObj, $("#bookPanel")[0]);
       });
</script>

<div id="bookPanel">
       <div id="bookForm">
             <h1>Book Form</h1>
             <input data-bind="value: bookName" />
       </div>
       <hr />
       <div id="bookReview">
             <h1>Book Preview</h1>
             <h2 data-bind="text: bookName"></h2>
       </div>
</div>
Snippet 5: Complete Code
Thanks for reading!


Monday, 3 August 2015

Heavy Metal Rhythm Guitars with Standard Tuning

Well it's an old lesson written in 2006 for a friend.  Its for all the guitar players beginning to learn heavy metal:



Power chord Heavy Metal Style of playing guitar requires both left hand and right hand synchronization. Combination of lower E string open note with palm muting and power chords produce interesting sounds.

Heavy Metal Rhythm Guitars with standard tuning:

Standard guitar tuning is shown below:

E (Upper or Higher E String)
B
G
D
A
E (Lower E String, Thickest String)

Practice one:

Guitar Tab:

PM = Palm Mute

This riff has total 9 patterns. Number of patterns are written in red below the tablature.

E---------------------------------
B---------------------------------
G---------------------------------
D---------------------------------
A--------2-----------7-----------3
E--0--0--0-----0--0--0-----0--0--1
  PM PM       PM PM       PM PM
   1  2  3     4  5  6     7  8  9

Before playing anything place your left hand index finger on the second fret of the second string. Make sure your index finger tip is not touching lower E string. Now start playing this pattern slowly. Play two open patterns of your lower E string i.e. 1, 2 with down stroke and palm muting. After playing first two notes play third pattern i.e. a power chord. A power chord is a combination of different notes. For playing this pattern strike the lower E and A strings simultaneously with a down stroke. Remember don’t mute strings with your palm. Raise your palm when playing this 3rd pattern.

Before playing 4, 5 and 6 patterns move your index finger to the seventh fret of the 2nd string. Follow same procedure for playing 4, 5 and 6 patterns as described for 1, 2 and 3.

Pattern 6 is not exactly a power chord, but it produces a raw sound as power chord.


Before playing 7, 8 and 9 number patterns, shift your left hand to the first fret of the guitar. Play two open notes 7 and 8. For playing 9th pattern place your left hand index finger on the first fret of the lower E string and ring finger on third fret of the 2nd string as shown below.




Strike 9th pattern simultaneously. 

Some Random Quotes

Some of my random quotes:
  • Let your morale decide, the spirit of the enemy.
  • Calmness of the burnt does not speak in flames.  It’s the ash that prickle in the engorged eyes of cruelty. 
  • I am not as you think I was. I turned you around and never looked back. 
  • Here I stand before you all and saying it's not over!