Showing posts with label DEBUGGING. Show all posts
Showing posts with label DEBUGGING. Show all posts

Wednesday, October 1, 2014

Why is printing “B” dramatically slower than printing “#”?

Pure speculation is that you're using a terminal that attempts to do word-wrapping rather than character-wrapping, and treats B as a word character but # as a non-word character. So when it reaches the end of a line and searches for a place to break the line, it sees a # almost immediately and happily breaks there; whereas with the B, it has to keep searching for longer, and may have more text to wrap (which may be expensive on some terminals, e.g., outputting backspaces, then outputting spaces to overwrite the letters being wrapped).

But that's pure speculation.










Source:
http://stackoverflow.com/questions/21947452/why-is-printing-b-dramatically-slower-than-printing

Thursday, July 10, 2014

HTML Debugging Hack !

I have just read an article for this guy (Gajus Kuizinas) ... He presented a very awesome way/hack to debug the html of any page ... All what he did is adding this block of css code into his website

* { background-color: rgba(255,0,0,.2); }
* * { background-color: rgba(0,255,0,.2); }
* * * { background-color: rgba(0,0,255,.2); }
* * * * { background-color: rgba(255,0,255,.2); }
* * * * * { background-color: rgba(0,255,255,.2); }
* * * * * * { background-color: rgba(255,255,0,.2); }

I will quote from his article:
"The problem is that unless the element on the page has a solid background or it is a picture, you do not see how does it fit into the layout, e.g. most of the text nodes, pictures with transparency, etc.
With the above CSS, you will see something along the lines of: "



"Different depth of nodes will use different colour allowing you to see the size of each element on the page, their margin and their padding. Now you can easily identify inconsistencies."