Tuesday, December 27, 2011

Mobile Web in 2012 -- Two quotes by Eric Shmidt

"In the next year, more searches and page views will come off of mobile phones than PCs or Macs."
"If you’re a young programmer today, you’re building for the mobile phone, that’s where the action is."

Eric Schmidt, Google’s executive chairman
December 26, 2011

Thursday, December 22, 2011

Facebook reveal page for Fans / Liked only - very simple!

Here is a very simple Facebook Fan page I just made:

There are several tutorials available, but many of them show steps for an older version of Facebook *) . Here is what works as of December 2011:
  • Facebook allows you to create a page (you can call it a "tab"), and place a link to it at the menu on the left.
  • That page is able to show an external content, "embedded" to it via <iframe>
  • The "page", in fact is a Facebook Application, with a very little capabilities. To make a simple page, nothing is required but making an application and specifying which external URL it will show. The rest is done externally, on your own webserver.
  • Your external URL should be available via https: (SSL). That's a new requirement of Facebook, probably because Facebook itself jumps to https automatically (if Account Settings > Account Security > Secure Browsing (https) is "on"), so all embedded content should be secure, too.
  • There is a weird way to link your new application to a page:
    The "next" parameter can be different, but for a simple page that you make for yourself, using the above "dialog" URL is enough.
  • You should setup your external page style using Facebook CSS, so it will look like a part of Facebook. I think that having the same font family and size is very important for a simple fan page.
  • There is a way to get information about your page visitor using Facebook API, but again, for a very simple Like/DoNotLike it is not required. In my version, I do not even validate the request, so hackers are welcome to reveal the coupon code by crafting a Facebook request (takes more time than pressing the [Like] button though :-)
*) Tim Ware's HyperArts Blog has the most up-to-date information

Wednesday, December 21, 2011

"To Use Squidoo for SEO?" : Dec.20 update

After my experimental lens was indexed by Google, I placed a special link in it, with an anchor text having two mistakes. Two days later, the search for that exact anchor text gives no results in Google. The link will stay there, and I am not going to place that text anywhere else, so if one day it appears in search, I will know that Google refreshed my lens' content in its index.

Monday, December 19, 2011

IE7 text-indent bug

I've been debugging an HTML/CSS combination that was supposed to show a button with a nice background while keeping the button text still available (for accessibility, SEO, etc. - have no idea, the code wasn't mine). Users with IE7 (sigh) could not see the button.

The bottom line: there is a situation when IE7 moves the parent element together with its text, having a text-indent CSS rule. Below is a code demonstrating this behavior:

<!DOCTYPE html>
.notxt {
width: 100px;
text-indent: -9000px;
<!-- This button will be shown with no text, AS EXPECTED -->
<button class="notxt">AAAAA</button>
<!-- This button will not be shown at all -->
<button class="notxt">AAAAA</button>


Note the &nbsp; between the form and button tags in the first form. This is the "cure" for the IE7 bug. Any text will work, including <br>.

See also a solution that did NOT work for me but might work in some other related cases:

"Using Squidoo for SEO" : Dec.19 update

Nothing happened in Google/Bing so far. The phrase search for the words in subject still does not return any pages the page I made from the Squidoo site.

Let's place a link to the "lens":

Using Squidoo for SEO

I am aware of the low level of that article's content and design. This is done intentionally and is a part of  the experiment.

A side note: my first impression about Squidoo is: a large well-done piece of junk, a huge MFA ("Made For Advertising") website, which should have been demoted to zero by infamous Panda, together with all "article" websites. This impression is based on reading of a few articles in the "Giant Squids" area. I seriously doubt anyone goes there to read. A "writers'-only" website.

Update: the link worked immediately. Google shows this blog entry and my Squidoo lens as crawled at the same time.

Saturday, December 17, 2011

Using SQUIDOO for SEO (experiment)

SEO experiment: Squidoo

2011-12-14: I registered on Squidoo

2011-12-15: Created a first posting there (they call it "lens"). The post was marked as "in progress", because not all of the items in their "checklist" were competed. The "lens" was "published", however.

2011-12-15: Checked in Google if my "lens" appears. Did a search on the exact title match and on some special "words" that I placed in the text. No results.

2011-12-16: Finished the "checklist", and re-published the "lens". Now it's marked as "featured", and not as "in progress"

2011-12-17: Checked Google again. No results

Conclusions so far:
  • Posting to Squidoo is complicated and time consuming. The resulting article looks ugly.
  • Google is not "pinged" with the new entry URL immediately after the "lens" is published.
Next steps: I will wait a few more days and if Google still does not know about my "lens", I will place a link to it from somewhere. Then will check the results again.

BY THE WAY: this post appeared in Google search immediately (as expected)

RSS Graffiti tests so far

Here are the results of my first tests:

  1. RSS Graffiti does what I expected it to do: my blog posts go automatically to my FaceBook
  2. The "Standard" format has many configuration options allowing to make your FB post quite nice
  3. The "Status Update" format does not show any link to the actual blog entry (or I did not find how to do it)
The next test I am planning is to post to one of my FB pages instead of my wall.

Friday, December 16, 2011

RSS Graffiti - Test No. 2

My first blog post appeared on Facebook in less than half an hour. However, it did not look nice, because I selected the "compact - status update" format, and (a bug?) there was no link to the full story. Only the blog title.
Let's see how this post will appear. I also added an image to see if it will appear in the FB post.

RSS Graffiti and Facebook


I just discovered this today and am writing this post only to check if it will be posted automatically to my Facebook page.

Friday, October 21, 2011

Netbeans 7.0.1, SVN (Subversion) 1.7, CYGWIN and TortoiseSVN

Environment: MS Windows

I upgraded the CYGWIN, and the version of SVN upgraded to 1.7

$ svn --versionsvn, version 1.7.0 (r1176462)   compiled Oct 11 2011, 10:36:16
Everything went smooth with "svn upgrade" of the folders.

$ svn help upgrade: Upgrade the metadata storage format for a working copy.usage: upgrade [WCPATH...]
NetBeans, however, gave me an hour of headache.

Here are my discoveries (things to do are marked in bold)

  1. By default, NetBeans uses internal SVN client and not the on specified in Options - SVN command line.
  2. To use the command line client, there is an option:
  3. Adding that option to NetBeans config file did not help. Had to add this as a parameter to the shortcut launching NetBeans
  4. CYGWIN does not like being called from NetBeans. First, it complains about MS-DOS paths (C:\blah-blah), and when it is fixed by setting CYGWIN=nodosfilewarning, still produces some weird error messages
  5. http://tortoisesvn.net/ worked perfectly, however. Do not forget to install the command-line client (which was unchecked in the default setup). You still have to run NetBeans with that -J switch.

Monday, August 15, 2011

Dropbox: Get Shareable Link to a folder

New Dropbox accounts do not have the "Shared Model" enabled by default. To be able to share a file or folder with anyone by providing a link, you need to enable sharing by clicking this link (once you logged in):


For more information, please read this page:


Monday, August 8, 2011

PHP on FreeBSD : Segmentation fault: 11 (core dumped)

PHP started dumping core after I upgraded MySQL to 5.5.
Everything worked fine, but a core was dumped every time, probably at the exit.

The solution was to rebuild PHP with the
"LINKTHR Link thread lib (for threaded extensions)"

Later, I found a confirmation in this post

Friday, July 8, 2011

Uncaught TypeError: Cannot read property 'form' of undefined

In my code, that JavaScript error was caused by missing "name" attribute of an "input" tag, having jQuery.validation class "required".

For example:

input class="required" id="agree" type="checkbox" value="yes"
produces the error

input class="required" id="agree" type="checkbox" value="yes" name="agree"
works fine

Friday, June 24, 2011

Installing SphinxSearch with libstemmer from FreeBSD ports

Environment: Sphinx 0.9, FreeBSD

Sphinx port has libstemmer options commented out in Makefile. With automatic upgrades, it loses stemming for anything except for default EN and RU.

Procedure of rebuilding the port with libstemmer

# (become root)
cd /usr/ports/textproc/sphinxsearch

Create file Makefile.local with this line:
CONFIGURE_ARGS+= --with-libstemmer

make clean
fetch http://snowball.tartarus.org/dist/libstemmer_c.tgz
cd work/sphinx-*/
tar zxvf ../../libstemmer_c.tgz
cd ../..
make deinstall
make reinstall
make clean

Do not forget to rebuild index if you did not use libstemmer before

Tuesday, June 21, 2011

__autoload and Zend

Environment: PHP 5.3.6, Zend Framework 1.11.6

This problem occurred when I needed to build a mixed environment where the existing code was "pure PHP" and new code was based on Zend Framework.

The "pure PHP" code's __autoload function stopped working as soon as Zend application ran.

Apparently, when there is a call to spl_autoload_register, __autoload is ignored.

The solution was to rename __autoload to OldAutoLoad and call:

Note: after that, the OldAutoload was called first and then Zend's autoload. In order to let OldAutoload ignore Zend classes, I replaced require_once calls with @include_once.