Sunday, September 27, 2015

Some Thoughts on code tunings


  • Performance is loosely related to code speed
  • Efficient code is not necessarily "better" code
  • Reducing the lines of code is not necessarily related to performance
  • Sometimes, performance depends on environment
  • Sometimes, a hardware upgrade is a way to increase performance
  • Avoid pre-optimization of code
  • Readable,clean code and a correct program is more important than faster programs
Steps to improve performance of a program
1. Develop the software using well-designed code that’s easy to understand and modify.
2. If performance is poor,
        a. Save a working version of the code so that you can get back to the “last known good state.”
        b. Measure the system to find hot spots.
        c. Determine whether the weak performance comes from inadequate design, data types, or          algorithms and whether code tuning is appropriate. If code tuning isn’t appropriate, go back to
 step 1.
        d. Tune the bottleneck identified in step (c).
        e. Measure each improvement one at a time.
        f. If an improvement doesn’t improve the code, revert to the code saved in step (a). (Typically, more than half the attempted tunings will produce only a negligible improvement in performance or degrade performance.)
 3. Repeat from step 2.

Courtesy : steve 

Monday, September 14, 2015

Learning Ways for Programmers

The way how you learn a topic/subject//anything in IT is largely impacted by internet, I`ll list out a new ways of learning for programmers in specific as below


  1. Books (Joy of reading books can not be replaced)
  2. Blogs
  3. PDFs
  4. Audio books
  5. Online courses(Microsoft Virtual Academy , EDX. ... etc)
  6. Smart phone(not recommended ways )
  7. E Readers such kindle, kobo
  8.  Of course, doing real practices of programs 

Monday, September 7, 2015

Testing Terminologies For Programmers

          Unit testing is the execution of a complete class, routine, or small program that has been written by a single programmer or team of programmers, which is tested in isolation from the more complete system.
          Component testing is the execution of a class, package, small program, or other program element that involves the work of multiple programmers or programming teams, which is tested in isolation from the more complete system.
          Integration testing is the combined execution of two or more classes, packages,components, subsystems that have been created by multiple programmers programming teams. This kind of testing typically starts as soon as there are two classes to test and continues until the entire system is complete.
          Regression testing is the repetition of previously executed test cases for the purpose of finding defects in software that previously passed the same set of tests.
          System testing is the execution of the software in its final configuration,including integration with other software and hardware systems. It tests for  security, performance, resource loss, timing problems, and other issues that can not be tested at lower levels of integration