Showing posts with label book. Show all posts
Showing posts with label book. Show all posts

Wednesday, February 24, 2016

"The Art of Unit Testing", second edition - Book Review

In this post I will share my thoughts on a book I read recently. It is called "The Art of Unit Testing with examples in C#", second edition written by Roy Osherove.
Relatively old, written in December, 2013 in aroung 300 pages, Roy manages to cover all aspects of Unit Testing. How to start, how to structure your tests, utilize testing frameworks like NSubstitute, use test runners like NUnit to automate the process of running the tests.
How to refactor your code to handle better with tests, a short introduction to Test Driven Development, what types of testing frameworks exist(constrained/unconstrained), techniques how to create fake objects (stubs/mocks) in order to simulate testing environment.
Of course he uses .NET/C# related tools but roughly all principles apply in the same way to other programming languages and testing frameworks.

Unit testing is part of Test Driven Development and it a very useful technique to make sure your code works as expected. You first write the test and make sure it fails when it should fail. Then write the code that does the application functionality and make sure the test passes when it should pass. Run all the available unit tests and if all pass continue with writing test for the next application feature. If some of them fail refactor or debug the application code you just wrote. The good thing about test driven development is that it enables you to understand what are you trying to do, twice. That means, you think of the new feature that the application has to have, write a test about a certain functionality and make sure the test fails when it should fail. And then again think of the application feature and write the code that makes the test pass when it should pass.

Test Driven Development lifecycle
Test Driven Development lifecycle
So what is a Unit Test? Some people think a unit test must test a single function/method inside a system. Well according to Roy Unit test is a test that tests a single unit of work. That means if you have a rather complex function that calculates just "return of investment" you would create a test that tests that unit of work i.e return of investment, though you could separate the function in several different functions.

The book is separated in 4 parts plus an appendix with short explanation of the tools mentioned in the book.
What is new in the book? The author says that RhinoMocks is dead and that you should avoid it. It uses old testing technique and you should use frameworks that use Arrange-Act-Assert rule. Those would be NSubstitute, Typemock, FakeItEasy and many more.
The book is written for people who code and it teaches best practices for unit testing. If you have never written a unit test you should read it from start to finish.

Properties of a good unit test
Properties of a good unit test
Unit test definition
Unit test definition

Chapters:
  1. The basics of Unit Testing. This chapter covers what is a unit test, difference between unit and integration testing, a simple unit test example with NUnit and C# and a short introduction to Test Driven Development. SUT(System Under Test) or CUT(Class Under Test). Manual tests are stupid and not reliable, therefore automate the process of testing with unit tests.
  2. A first unit test. Exploring unit test frameworks, writing your first test with NUnit, NUnit attributes. This chapter cover several useful testing attributes like TestFixture, Test, TestCase, Ignore, ExpectedException, SetUp, TeadDown, Category etc... Roy says that he does not use SetUp and TearDown anymore because they just impair readablity of the test file and probably always you can develop helper functions that initialize object instead of doing that before and after each test.  
  3. Using stubs to break dependencies. This chapter defines what is stub, how to refactor code to make it testable with a stub, overcomming encapsulation problems and best practices to use stubs with your code. So what is a stub? A stub is a piece of code that fakes a certain behavior and enables you to test your code against that fake object. If you were to use real objects to test certain functionality that would be an integration test. 
  4. Interaction testing using mock objects. Defining interaction testing, what are mock objects, difference between fakes, mocks and stubs, using mocks best practices. So what is a mock object? A mock object is a fake object that is used to simulate certain behavior and all the communication between this fake object and the class under test is recorded in the mock. The test passes if the communication went well.
  5. Isolation (mocking) frameworks. Understanding isolation frameworks, using NSubstitute to create stubs and mocks, avoiding common missuses of isolation frameworks. This chapter also covers Arrange-Act-Assert rule and advanced ways to to handle stubs and mock in unison
  6. Digging deeper into isolation frameworks. Constrained vs Unconstrained frameworks, how unconstrained profiler-based frameworks work, defining values of a good isolation frameworks. Roy divides testing frameworks into constrained and unconstrained. Constrained frameworks are those that can test only the code written in the same programming language as the frameworks i.e only the public space. Constrained frameworks cannot test private, sealed, static methods. You are bound to the same rules as the compiler of your application. Unconstratined methods can test everything including, static, private, sealed members of a class. They can do this because they run before the compilation of your program using lower level APIs. In .NET all unconstrained frameworks are all profiler based which means, they use unmanaged profiling APIs wrapped around the running instance of CLR(Common Language Runtime). Some famous frameworks are, Java: PowerMock, JMocikt, C#: Typemock Isolator, JustMock, C++: Isolator++, Hippo Mocks.
  7. Test hierachies and organisation. Running unit tests during automated nightly builds, using continuous integration for automated builds, organising tests in a solution, test class inheritance patterns. This chapter cover some important asspects of software development. A development team should always have CI script that starts build automation script and runs all the tests available before building the software. I would recommend Jenkins for CI and Ant/Maven for build automation. As with any other things in your project unit tests should also be part of your source code repository. Make sure you maintain them along developing the software. Each class should have one test class and all tests should be related to the class under test. You can also use class inheritance in your tests if you think you repeat yourself.  Also interfaces or abstract classes to confirm certain functionalty is in the test class. 
  8. The pillars of good unit tests. Writing trustworthy, maintainable and readable tests. So unit tests should test only one single unit of work. Avoid using logic inside tests. Tests should be isolated from each other i.e don't run test inside other test. Unit tests are not integration tests and should not be treated as such. If you want to know the most important properties of a unit test this is the chapter to read.
  9. Integrating unit testing into organization. Becomming an agent of change, implementing a change using bottom-up or top-down approcah. If you are an agent of change expect to get tough questions and prepare to answer them. In each company you will find followers and blockers of the change. Top down is from the boss down to employees and bottom-up is vice versa. People always accept changes hardly so instead of pushing your idea forcefully try to implement some new working process that will lead to this change i.e implementing unit testing in the company. Also always use code coverage tools to make sure your tests cover all the necessary functionality in the software.
  10. Working with legacy code. Common problems with legacy code, where to begin writing tests, helpful tool for working with legacy code. Roy recommends this book on working with legacy code. So legacy code is not a joke and implementing unit tests in old code is a serious bussines. You should begin writing tests according to some priority, which features of the system have biggest priority. Of course you can also subdivide this very important software feature into code parts divided by complexity and dependency level. There are two strategies, easy-first and hard-first. Easy-first strategy is good if you have a team of unskilled unit testers which will enable them to become more skilled in time. With easy-first you expect new features to get tested harder until the hardest features are covered with tests. Hard-first is more suitable if you have a team of skilled unit testers, and at first it takes lot of time to test new features but after the hardest parts are being tested the time to test new  feature drastically reduces. Some known tools are: JustMock, Typemock Isolator, JMockit, Vise, FitNesse, NDepend, Resharper, Simian and TeamCity
  11. Design and testabiltiy. Benefits from testability design goals, pros and cons on design for testablity, tackling hard-to-test design. Make methods virtual, use interfaces as superclasses, make classes non-sealed, avoid instantiating concrete classes inside methods with logic, avoid direct calls to static methods, prefer calls to instance methods that later call statics, avoid constructors and static constructors that do logic, separate singleton logic from singleton holders. How do you test sensitive IP or pieces of software you are not allowed to reverse engineer? Sometimes programming languages or application frameworks are designed for testabiltiy so no additional testing is required apart from the application logic. 
  12. Appendix, Tools and frameworks. All tools and frameworks mentioned in the book are covered here with a short explanation. There are isolation frameworks, test frameworks, test APIs, IoC containers, database testing, web testing, UI testing(desktop), thread-related testing, acceptance testing, BDD-style API frameworks.
Well since this book is very comprehensive and cover anything you might think of when writing your tests I give it 4.8/5. I would give 5/5 but first I want to put my new knowledge into use and see if it is useful.

I upload some useful screenshots on my tumblr blog: http://tunephp.tumblr.com/

Thanks for reading my review. Best regards, Vlado.

Friday, November 13, 2015

"Jenkins: The Definitive Guide" - Book Review

In this post I will express my thoughts on a book written for a specific but very useful tool called Jenkins CI. The book is called "Jenkins: The Definitive Guide"  written by John Ferguson Smart.
So what is Jenkins CI (Continuous Integration)? Jenkins is a tool created by Kohsuke Kawaguchi
and its main purpose is as stated to create environment for continuous integration of your software.

Jenkins is a Java based tool, a web aplication to be more specific. Runs on various operating systems and can be installed in various ways, from a system service to running it into Winstone , a servlet container tool. You can use Jenkins to automate building your software, generate documentation for it, run unit/integration/acceptance tests, publish test reports in HTML/PDF format and even upload files to remote server.
While building, errors can happen so good notification support in Jenkins is here to help you get notified when that happens. There is support for email/SMS/RSS/IRC/Instant Messaging notifications. Even special devices that blink red when build fails and green when succedes.
Jenkins has good support for build automation tools like Maven and Ant.
It has embeded support for SVN and support for Git/Mercurial and others trough plugins.
On the other hand, you can test network applications using distributed builds with JMeter and try various test environments using Multi-configuration builds.
You can run parametrized builds as well run code coverage and code quality tests.
There are ton of plugins built for specific cases and usage which you can easily download and use in your builds. You can also write your own Jenkins plugin.

Now something about the book.

 From the book preface:
"This book is aimed at relatively technical readers, though no prior experience with Continuous Integration is assumed. You may be new to Continuous Integration, and would like to learn about the benefits it can bring to your development team. Or, you might be using Jenkins or Hudson already, and want to discover how you can take your Continuous Integration infrastructure further.
Much of this book discusses Jenkins in the context of Java or JVM-related projects. Nevertheless, even if you are using another technology stack, this book should give you a good grounding in Continuous Integration with Jenkins. We discuss how to build projects using several non-Java technologies, including as Grails, Ruby on Rails and .NET. In addition, many topics, such as general configuration, notification, distributed builds and security are applicable no matter what language you are using."

Written in july/2011, in around 400 pages you will get hands on various parts of this powerful tool. My advice is to try and install Jenkins on your system and install or try things mentioned in the book. Various scenarious require various hardware and software so you will not have all the possibilites to try all of them. But at least you can download the plugins and check them shortly what they do. Some plugins are obsolete but I made a list of plugins I installed as test on my computer.
All in all the book gives a good grasp of all that might need you in your future project. Apart from some typos the book is a great read, and you should definitely spend some time with it. I give 4.5/5.It will be useful for year to come.

More about the chapters.
  1. Chapter 1: Introducing Jenkins. A short introduction what is and what it is used for. A short history how Jenkins came from Hudson. How to install and what is CI(Continuous Integration).
  2. Chapter 2:  Your first steps with Jenkins. Covers how to make working environment for Jenkins, installing JDK, Git, Github and Maven. Your first build job and running premade tests on it. Specificaly this project https://github.com/wakaleo/game-of-life. You will use some Jenkins plugins like Cobertura. I tried it and it is buggy. I recommend using Jacoco instead. Here are the plugins used in this chapter: Git plugin, GitHub plugin, Coberturra plugin,Jacoco plugin.
  3. Chapter 3: Installing Jenkins. Covers how to install, possible ways how to install o different OS systems. Jenkins home directory, memory considerations, java/maven/ant options etc... Upgrading, backing up jenkins etc...
  4. Chapter 4: Configurin your Jenkins server. Adding JDK/Maven/Ant installations. Configuring global properties, mail server, reverse proxy etc...
  5. Chapter 5: Setting up your build jobs. Covers types of builds, like free style job or mave build job. How to configure source code management tools like SVN and Git trough Git/GitHub plugins. Build triggers, polling the SCM, or calling a hook script to start the build process. Build steps, post build steps, and other useful plugins. Plugins mentioned:
    Gerrit Trigger plugin, Groovy, Gradle, Grails, Jython, MSBuild, Phing, Phyton, Rake, Ruby, Artifactory plugin, Nexus plugin, NUnit plugin, NAnt plugin
  6. Chapter 6: Automated Testing. Automatin Unit  and Acceptance tests. Configuring test reports, code coverage, automated preformance testing with JMeter. Plugins mentioned: Clover, NCover, Emma, HTML Publisher plugin, JMeter plugin, Performance plugin
  7. Chapter 7: Securing Jenkins. Activating security. Using simple security or security with LDAP server. Then using Active Directory or Unix users and groups. Atlassian Crowd commercial tool. Authorization, who can do what with matrix based security or with project based matrix security. There is even a tool for enabling Role based security with a plugin. Auditing, keeping track of user actions. Plugins mentioned: LDAP Plugin, Active Directory plugin, Crowd plugin, Role Strategy plugin, Audit Trail plugin, Job Configuration History plugin.
  8. Capter 8: Notification. Email notification, claiming builds, instant messaging or IRC messaging. Desktop notifiers like Notifo, mobile/SMS notification, making noise with extreme feedback devices. Plugins mentioned: Email Extension plugin, Instant Messaging plugin, Jabber notifier plugin.
  9. Chapter 9: Code Quality. Code quality in your build process. Code quality tools like  PMD/CPD, FindBugs, Checkstyle, CodeNarc. Reporting code quality problems with Violations plugin. Reporting with SonarQube. Plugins mentioned: Violations plugin, FindBugs, PMD/CPD, Checkstyle, JDepend, NCover, CodeNarc, Sonar Gerrit Plugin, SonarQube plugin
    Coverage Complexity Scatter plugin, Static Analysis Utilities plugin, Task Scanner plugin.
  10. Chapter 10: Advanced builds. Parametrized builds and parametrized triggers. Multi-configuration build jobs. Parallel builds and build pipelines. Plugins mentioned: Build Promotion plugin, Maven Release Plugin, Copy Artifact plugin, promoted builds plugin, ArtifactPromotion plugin, Build Pipeline plugin, Parametrized Trigger plugin, Maven Jenkins plugin, Dependency Graph Viewer plugin, Locks and Latches plugin.
  11. Chapter 11: Distributed builds. Master/Slave strategies. Associating builds to slaves. Node monitoring and cloud computing. Plugins mentioned: Amazon EC2 plugin, CloudBees Docker Build and Publish plugin.
  12. Chapter 12: Automated Deployment and Continous delivery. Deployment script, database updates, smoke tests. Deploying Java or PHP/Ruby application. Plugins mentioned: Capitomcat plugin.
  13. Chapter 13: Maintaining Jenkins. Monitoring disk space and server load. Backing up configuration and Jenkins builds. Archiving and migrating build jobs. Plugins mentioned: Disk Usage plugin, Backup plugin, ThinBackup plugin, Monitoring plugin, Deploy plugin, Deploy WebSphere
  14. Appendix: Automating your Unit and Integration Tests. Automating your tests with Maven and Ant. 
I hope this post is useful. Best regards. Vlado

Thursday, February 26, 2015

"JavaScript Patterns" - book review

Hello. In this post I will share my thoughts on a book called "JavaScript Patterns" written by Stoyan Stefanov. Published in 2010 this book in about 210 pages covers the most important patterns that you can use in JavaScript to ease you work with this language. My guess is that this book is not for beginner JavaScript programmer, but you can always read this great book by Douglas Crockford, "JavaScript: The Good Parts" as an intro to JavaScript. These two books go hand in hand. Check my other book review here: http://tunephp.blogspot.com/2014/11/javascript-good-parts-book-review.html
If you really want to learn proper JS programming read both of them, first "JS the good parts" and then "JS Patterns" and try some programming practices in Firefox/Firebug.

The book has 8 chapters and has lot of useful code snippets you can use in building your brand new JavaScript application.

  1. Intruduction. Explains basic concepts of JS, like there are no classes in JS, everything is a object including, functions, arrays, objects etc... It also notes that you can use strict ("use strict", ECMAScript 5) mode, a modification of JS that removes some of the bad parts in JS. This chapter also introduces JSLint and the Console as debugging tools. You should always check your code with JSLint.
  2. Essentials. This chapter covers one of the main drawbacks in JS, and those are global variables. It also gives some tips how to avoid using too many globals, how to use "for", "for in" loops, avoiding implied typecasting with "==" sign, number conversions with parseInt() and parseFloat(), writing proper code, indentation, writing comments and using Yuidoc and JSLint.
  3. Literals and Contructors. It covers Object literal ({}) notation, JS constructors and naming convention for them and how to avoid problems using constructors. Array literals, check for "Arrayness" (arrays are objects in JS), working with JSON, regular expressions, primitive wrappers and throwing Errors/Exceptions.
  4. Functions. Covers function decalrations vs function expressions. Variable hoisting, function scope, function callbacks, returning functions, self defining functions, immediate functions and couple of useful tricks like memoization, curry, init-time branching etc... Probably the most important chapter in the book, you must not miss it as functions are the hearth of JavaScript.
  5. Object Creaing Patterns. Some object creating patterns like namespace patters(there is a very useful function for creating a tree of subobject, you can use it in your project.), private members, how to achieve real privacy in JS, Module pattern, Sandbox patterns, static members, JS "Constants", Chaining pattern etc... This chapter gives you better idea how to structure your code so that your project doesn't have trouble in the end.
  6. Code Reuse Patterns. Classical vs Prototypal inheritance patterns. You should avoid Class inheritance in JS since it is just a "syntaxic sugar", and always use Prototypal inheritance. This chapter also mentions some useful code reuse techniques, like borrowing methods, copying properties, some Class patterns etc...
  7. Design Patterns. This chapter covers how to code basic software engineering patterns in JavaScript, probably a chapter you don't want to miss. Singleton, Factory, Iterator, Decorator, Strategy, Facade, Proxy, Mediator and Observer. 
  8. DOM and Browser Patters. Covers some tools/concepts/patterns that can be used in a browser, like how to manipulate DOM tree, event handling, long running scripts, Ajax alikes, JSNOP, combining JS scripts, minifying, Loading techniques and preloading.
 So yes, this book cover very useful features of JavaScript and how to use them in browser. If you really want to become a web dev. this is the right book for you.

There are similarities with "JavaScript: The Good Parts" in the beginning, I felt like I was reading Doug's book again, but that is ok. It has lot of code and it is well explained so my grade for it is 4.5/5. Defineitely a book you should read.

Monday, February 23, 2015

Introducing new project called ZadachiJS

In the past few weeks I have been working on a new project called ZadachiJS. It is adapted for Macedonian public and the docs are written in Macedonian using english letters. It is basically a web application that has no GUI and all output is sent to the console, ofcourse the output is in Macedonian. It contains programming practices which could be made in any programming language and it is based on a book called „Збирка Алгоритми и Програми“, од Ѓорги Јованчевски, Билјана Стојчевска и Невена Ацковска or in english, "Collection of Algorithms and Programs" written by Gyorgy Yovanchevsky, Bilyana Stoychevska and Nevena Atckovska. I couldn't find english version of it, but I could in Macedonian. Not sure if there is going to come an english version. So if you want to understand this project better learn Macedonian, because probably I won't find time to translate it in English, who knows.

Збирка Алгоритми и Програми
Збирка Алгоритми и Програми

The JavaScript part consists of one global object called Zadachi and all other stuff are inside of it.
You can browse the code here: https://github.com/bluePlayer/practices/tree/master/ZadachiJS
or check the demo here: http://jspractices-blueplayer.rhcloud.com/Zadachi and the docs here: http://jspractices-blueplayer.rhcloud.com/Zadachi/docs
Jasmine.js tests are here: http://jspractices-blueplayer.rhcloud.com/Zadachi/SpecRunner.html

Friday, November 14, 2014

"JavaScript: The Good Parts" - book review

In this post I'll explain my thoughts on "JavaScript: The Good Parts" written by Douglas Crockford. It is fairly old book written in 2008 but still does the good job of teaching you what to use and what not to use from JavaScript. As the author says, this book has lot of information packed in about 150 pages, which means you have to read at least twice each chapter. Yes I passed each chapter twice and also spent some time writing the code from the book in Firefox/Firebug just to see how it goes. I think more examples to practice would be much better for the book as it lacks them. But in the end you would certainly need to read another book to learn how to code proper JavaScript modules, patterns, etc... I am planning to read another book because this one is not enough to get you going with JS. My recomendation for next book would be this one: "JavaScript Patterns" - by Stoyan Stefanov, it has about 240 pages which is enough.

The book is structured in 10 chapters and with 5 appendices, A-E. My suggestion is to read all chapters includding the appendices. Appendix D is just the railway diagrams, so you may skip it.
Chapters:
  1. Good Parts. This chapter contains basic info about JS and how to set up testing ground for other code examples in the book. Don't skip it. 
  2. Grammar. Contains basic information about reserved keywords in JS, data types, expressions, functions etc...
  3. Objects. Explain how to work with Objects in JavaScript, how to create new object, how to retrieve infrormation from object, object prototype, reflection, enumeration, delete operator, etc...
  4. Functions. Dives into JavaScript function basics. How to create new function, how to invoke a function, this and arguments objects of a function, its connection with objects. Each function is an object so you can add a function to its prototype. Function scope, closure, function modules, cascade (builder pattern), curry and memoization.
  5. Ineritance. Inheritance types, implementing standard OOP in JS (pseudoclassical) inheritance, prototypal and functional inheritance. Very important chapter, don't skip it.
  6. Arrays. Array basics, length property, useful array methods, delete operator, enumeration, etc...
  7. Regular Expressions. Dives into JS regular expressions, what are they and how to use them. Couple of basic rules how do RE work. Very useful thing, especially when processing strings. 
  8. Methods. This chapter explains implemented methods that come with JavaScript itself. You may want to skip this chapter but it would be helpful if you read it. 
  9. Style. This chapter explains some techniques how to write error prone JavaScrtipt code. My suggestion is to not skip this chapter. 
  10. Beautiful features. Read this chapter to learn what are the best parts of JavaScript that you should use. Functions as a first class object, Dynamic objects with prototypal inheritance and Object litrals and array literals.
  11. Appendix A. Awful Parts. Explains all of the worse parts in JS and how to avoid them.Global variables, scope, semicolon insertion, reserved words, unicode, typeof operator, parseInt function, + operator, floating point, NaN, phony arrays, falsy values, hasOwnProperty function and Object.
  12. Appendix B. Bad parts. Things you can live with but still should avoid. == vs === operators, with statement, eval function, continue statement, switch fall trough, block-less statements, ++ and -- operators vs += and -= operators, bitwise operators, function statement vs function expression, typed wrappers, new operator, void keyword.
  13. Appendix C. JSLint. An online tool build by Douglas himself. Use it whenever possible to debug your JS code. You may find this tool also useful, http://jsbeautifier.org/
  14. Appendix D. Syntax Diagrams. If you are beginner at programming, these railway diagrams will help you get going. 
  15. Appendix E. JSON. Explains what is JSON, JSON syntax, how to use it securely and a complete script of JSON parser in JavaScript.
 I think this book is not recommended for beginner programmers, but it is good if you are learning JavaScript. Still it lacks more code examples and practices, so you have to read another JS book. My opinion of this book is 4.5/5. It does the job for what is meant to do, aka teaching you pros and cons of JavaScript and how to use or avoid them. You must read this book if plan to code JS programs in future.

Thursday, July 31, 2014

"Search Engine Optimization made easy" by Brad Callen - book review

In this post I will share my thoughts on a book called "Search Engine Optimization made easy" by Brad Callen. I don't know when it was published because it is not stated in it, nor I could find on the Internet. There are some PDFs circling around for free :)
This book is more like a beginner’s guide to SEO. It gives a glimpse into all necessary things that optimizing a web site may include. It gives general strategies how and where to start optimizing your web site and it is a good tool if you don't have time to read large books like 300 to 600 pages. But some aspects of SEO are not thoroughly covered with theory so some things may be still unclear even if you read the book twice without using information from Internet. For example there is explanation how to calculate Google's page rank and it mentions some iterations of the same formula with different values but I couldn't figure out how those different values are calculated.
Also some of the tools/links recommended in the book are obsolete and do not exist anymore, so you may have to search some things by yourself. For example the tool GoodKeywords mentioned for searching keywords related to a given keyword directly from Google doesn't exist anymore, or I simply couldn't figure out how today’s GoodKeywords software works. I used Google Trends instead.
The book however contains good exercises how to manually search info about specific websites and optimize yours better that those sites. There is a software called SEO Elite which does lot of work for you, and of course it is not free but may save you some time. However you can do all the job manually which is recommended as a practice. 
There are 10 chapters in about 90 pages and those include:
  1. searching good keywords for your site/brand. Installing Google toolbar. Analyzing competitor's website's html code. 
  2. Onpage optimiziation for your website, using <h1>, <h2>, alt image tag attribute, bolding, italicizing etc...
  3. Getting started with offpage optimization. Never use Google's page submit form, neither MSN, Yahoo, Altavista, Alltheweb submit forms. Buying text links that point to your website. 
  4. Offpage optimization criteria basics. Collecting useful information from Internet about competitor's SEO strategy. Using SEO Elite.
  5. Contacting link sites for link sharing, using SEO Elite to contact 1000 link directory websites at once. Create link page withing your website. 
  6. What things to consider so that you don't get banned by Google. Using hidden text, alt image tag spamming, meta tag stuffing, title tag stuffing.
  7. Is your website linking banned websites aka bad neighbours? Make sure you don't link to bad neighbours so that your site don't get banned too by Google. Use SEO Elite to check for sites with PR 0. Using submit forms to link directory websites. 
  8. Exercise chapter. Find out why Adobe's site is closely related to keyword: "click me" though you may think, isn't Adobe related to graphics design software, Photoshop etc...
  9. Using alt image tag attribute to maintain good website structure. 
  10. What Google's Page Rank is all about. Calculating formula for Page Rank. How do you calculate yours website page rank. Do not link websites that don't have reciprocal link to your website. Your page rank will suffer because of this.
As I mentioned earlier, it a very well made book and it works good if you are a SEO beginner. But because of not enough theory coverage some things may stay unclear. Therefore I give 3.7/5

Useful links:

http://www.keywordlocator.com/kwl/specials.html
http://www.wordtracker.com/
http://www.textlinkbrokers.com/
http://www.linkadage.com/
http://www.matomyseo.com/
http://www.webrankinfo.com/english/
http://www.mikes-marketing-tools.com/
http://www.linkhub.info/submit.php
http://www.google.com/analytics/
http://www.seobook.com/

Next good read: http://www.amazon.com/SEO-Books-2013-2014-Optimization/lm/R2ZJ80G4COWMSZ


Friday, July 11, 2014

"Ext JS 4 First Look" and "Mastering Ext JS" - book review

Hello. In this post I shall explain my thoughts on two books, Ext JS 4 First Look and Mastering Ext JS written by loiane Groner.

Ext JS 4 First Look

It is an intruductory book for Ext JS 4 framework, specifically version 4.2. You can find lot of comments and posts across the Internet about previous version of Ext JS 4, 4.0 and 4.1, it is said that were buggy. So my advice is use Ext JS 4.2 for your future projects. Not sure about Ext JS 5, it is a new release.

In about 300 pages Loiane managed to cover all aspects of Ext JS 4 framework. It has lot of useful information and you can get a general understanding about the framework's capabilities. However is a bit techincal, so I recommend reading each chapter at least twice. It also a good practice to try and write the code from the book on the a real machine and see how it works. From this point of view I think it needs more code examples. So if you want to learn Ext JS 4 framework, I think this book is a good start. 4/5

Mastering Ext JS

In this second book about Ext JS 4 you get to develop real world Ext JS 4 based application (using sakila sample database). It has lot of code and reading it is a bit dificult task since you need to understand what the code does. While reading it I set up my working environment and started coding from the book. It begins ok, all things that were necessary were covered in the book. However when you get deep into it like 150 pages which is middle of the book, you can clearly see that some application modules are not finished, or a code is missing. I managed to find code base here. It easens up things a little, if you copy code form github. But I also found that some php files had commented code and weren't working. It has a bit of inconsistency with the book. You get the feeling it is not made for beginner web developer :) I managed to find solutions to most of the problems while developing my practice app here: http://masteringextjs-practices.rhcloud.com/ but that was the case because I already knew PHP 5, firebug, MVC architecture, Aptana, JavaScript basics, html etc...

- still in development. Use vlado as user and 123456 as password to log in. You can change to different language, now English US and MK(Macedonian) available. If you get loading errors or it doesn't want to show up, refresh the tab. Still things to be done. 

Notes: 
  • Some php file had commented code out in the github package. Why should I bother understanding what the php code does when I learn Ext JS?
  • It happened to build a production version of the app and when uploaded to server it doesn't work as it works locally. Charts aren't drawn, login window stays after loging in, loading notification stays forever.  Not sure why it does that, a testing is neccesarry. Ok I set up Siesta as mentioned in chapter 12 - Debugging and Testing, I run the test from the book and get error Application.js not found in Firebug. :) Ok I deployed (prebuild app) masteringextjs4 zip package from github to my server and try the tests, some strange error appears, "j is undefined" :D So now I cannot test even the prebuilt application. Maybe I have missed to read some guide or whatever, but overall I am a bit lost as Ext JS beginner.
I give points for ingenuity. Really good use of available learning resources like Sakila sample database. You will get to work with MySQL db, MySQL Workbench, exporting/importing data. Also PhpMyAdmin which is a really good admin tool.

All in all it is a good book, but you will not learn much if you don't code the code yourself and try to debug yourself. It is very techincal and as I said cover each chapter twice. Once reading, once, coding. It contains lot of general information about Ext JS 4 and lot of advices about tools to develop. According to my experience reading it I give it 3.75/5