Tuesday, December 9, 2014

Improving Ourselves

When we decide to improve ourself in a particular field or particular skill, the best way to keep up is testing ourselves in that field/skill.

Basically, a little bit of test driven development.(absolutely not applicable for extremes).

Fail at first step in the ladder of your skill.
Do what is necessary to pass the first step.

Fail at second step.
Do what is necessary to pass the second step.

and so on.

Thursday, October 2, 2014

Coverity Issues - JAVA

First of all, I am curious of how coverity finds a fault in code, by doing static analysis.
But in this article, I wish to cover
1) The variety of issues found by Coverity,
2) How to address each of them,
3) What is the rationale behind each of the issue?

1. Relating to Static Inner Classes:

SIC: Should be a static inner class (SIC_INNER_SHOULD_BE_STATIC)

For example, it flags that inner class should be made static.
package com.question.inner.stat;

public class ExperimentStatic {

  * @param args
 public static void main(String[] args) {
  // TODO Auto-generated method stub  
  ExperimentStatic.NestedClass expVar = new ExperimentStatic.NestedClass(3, "dfdpstr");
 static class NestedClass{  
  private int i;
  private String str;  
  NestedClass(int id, String pstr)
   i = id;
   str = pstr;

Wednesday, March 12, 2014

Windows Address bar

Just yesterday, my friend was sharing a tweak which my junior had found.
Basically go to Windows Address bar in some folder and type cmd.
It will open command prompt pointing to that folder.

1. Press Windows + E. This will open My Computer.
2. In Address bar on top, now type cmd.
3. It will open command prompt pointing to C:\Windows\system32.

4. Go to d: drive or f: drive, Now again type cmd. It will point to d: drive or f: drive.

Why all this? You can avoid typing cd in command prompt. This is for those who are lazy typing folder names in command prompt and trying to go to navigate to that folder.

But windows address bar is not some basic address bar.
I think it is parallel of run utility.

Just type any thing which you are used to doing in run.
For example: msconfig.

Now type msconfig in windows address bar. It opens up Configuration Utility.