Oct 31, 2008

Speed up your Internet access

From time to time my Internet provider has problems with the network. For this case I have a backup: a Vodafone modem. This modem gives me theoretical 256Kbps speed in my area (again: it is theoretical speed, actual is near 130Kbps). This is quite fast for emergency situations. The only bothering things is that every DNS lookup takes 3-10 seconds, which is obviously unacceptable.

When I got tired of these delays, I thought: "What can I do?" Firsts, I thought that I should probably have a local caching DNS server. I made a quick check and found that it is not necessary with Mac OS X because it already includes a lightweight caching daemon for DNS and many other queries. And it could not help me for new DNS queries anyway.

Next I remembered that I had similar problems with my main Internet provider. I solved those by using alternative DNS servers on my AirPort router. It worked well.

Oct 29, 2008

Patrick Gaumond reviews my TYPO3 extension programming book

Patrick Gaumond published detailed review of my TYPO3 extension programming book. Here is one quote from his review:

One of my first feelings once I started to read the book was that it will become the de-facto manual for Extension Development courses given by agencies all over the world. It’s really the kind of book you don’t want to skip a paragraph, fearing you’ll miss some good advice. Succinct is a quality.
All in all, it’s a very good book for starters; a very important book to hook some PHP newcomers into the TYPO3 world and a great step for better comprehension of this fabulous principle Kasper gave us 6 years ago when he presented the Extension Manager.

Thanks, Patrick!

Oct 28, 2008

"CMS most valuable people" – I am announced

Packt Publishing announced its annual CMSMVP ("CMS most valuable people" nominations. This year I became nominated as the TYPO3 most valuable person. I did not expect it really, so it is twice as pleasant and I am truly touched.

Here is what Packt Publishing says about the nomination:

The following list of names were put forward by members of the Content Management System's development team and community and represent the exceptional support, guidance, and sheer amount of time that the MVPs have given up to support the development and growth of the respective CMS.
CMSMVP is done by voting for the person. Anyone can propose anyone and people who get most votes in the end – win.

Thanks to everyone who voted for me. I am going to continue my extension development and support of the community in the mailing lists as before.

Thank you all again! I am glad to see that people like my work.

Oct 26, 2008

Mac OS X: PHP help in CHM format

When I used Windows, I really liked PHP manual in CHM format. It features table of contents, index and search. There are versions of the manual with comments that users leave on php.net. These comments are often very valuable because they provide additional pieces of information and users' experience.

When I migrated to Mac, I found that Mac does not have native support for viewing CHM files. I found a free xchm application that can open PHP files. The only problem was that this application does not open recent file on start up and does not have such option.

I missed this option very much. I use PHP manual often but I hate keeping programs open just because I may need them. So I open the program, look up something and close it if I do not use it for long. This behaviour is automatic for me.

But here comes the problem. If I open xchm, I have to go and choose my PHP manual. Loose of time. What do I do?

Oct 23, 2008

Oct 22, 2008

How do I use that extension?

From time to time I see a question: "How do I use this extension?"

The first thing to do if you have this question is to check doc/ folder inside the extension. If there is a manual.sxw file, you are in luck because you got the manual! You will need OpenOffice to read it.

If there no manual, push the developer hard and force him to write one!

Best TYPO3 blog of the year?

I accidentally found that there is a voting for the best TYPO3 blog of the year. I was even more surprised that my blog is on the second place. This is pleasant. Do people like my blog? I hope so. The information provided in this blog is usually unique. I do not copy news from other sites, I try to share things that I found useful myself. May be this is why people vote for my blog?

Missing cHash? Make plugin USER_INT!

Yesterday I encountered yet another unusual TYPO3 problem. An external web site had to link to pages on a TYPO3 site providing various parameters for an extension on one page. The extension is cacheable because it does certain network queries and it will be slow to do them for each request. So extension uses cHash for proper caching.

The problem was that the external site could not create cHash. cHash creation is not trivial and involves using site–specific encryption key. So the external site could not ptovide cHash and displayed content was wrong: it was like the page was called without any parameter.

What could I do?

Oct 21, 2008

Audio books at audible.com

I am a big fun of audiobooks. Everything has started from my wish to learn English (I learned English completely myself). I used to listen radio programs but they were usually boring. Then I accidentally found a collection of free audio books. This was it. I really enjoyed the books. In the beginning I could barely understand some words. But I picked up familiar books: about Sherlock Holmes, for example. Slowly my understanding skills improved. I started to listen non–adapted books.

One day I came across Jim Dale's performance of Harry Potter books. At that moment I fell in love with audio books. Probably you do not know but Jim Dale made a Guinness world record: he created 134 completely different voices for a single book! One hundred thirty four voices all pronounces by one man! It is simply amazing. And even more, Jim Dale speaks with different accents! For example, Professor McGonagall is speaking Scottish accent, Hagrid - Irish, Stan Shunpike - Cockney... I love everything perfect and Jim is perfect. He made me love audio books (listen to samples).

Audio books become one of my greatest interests in life. I enjoyed Jim Dale's reading so much that I started to hunt his recordings everywhere. This was not easy: autdio books on CDs cost a lot and delivery from UK, Germany or USA costs at least half the price of the book. But I still managed to get some recordings of Jim.

When I got my iPhone, I was very excited because iTunes store has lots of audio books and some of them are recorded by Jim Dale. Prices are not very cheap. And there are 4 or 5 of his books (excluding Harry Potter series, which I have all).

But accidentally I found audible.com. This resource offers one audio book a month for $14.95 (half–price for first three months). If you are willing to pay more, you can buy more books in a month. And prices are very good! Books are downloaded directly to iTunes and synced to iPhone.

I am really excited about audible.com. it is just great to have such possibility: get audio books in highest quality for a good price.

I am going to update my donation page to include a link to audible.com gift certificates. Now I prefer those to Amazon's.

Oct 18, 2008

Debugging JavaScript in the Internet Explorer

Most web developers know that it is extremely easy to debug JavaScript in FireFox—there are at least two great JavaScript debuggers (Venkman and FireBug). Developer can easily explore and change variables, set breakpoints, step in and out of any JavaScript function.

This is all good until the script works fine in FireFox but does not work in Microsoft Internet Explorer. Recently I hit an issue like that.

I passed array of objects to the function:

id: 1, title: 'title1', message: 'message 1'
}, {
id: 2, title: 'title2', message: 'message 2'

Inside the function I did a very simple thing:

function foo(config) {
for (var i = 0; i < config.length; i++) {
bar(config[i].id, config[i].title, config[i].message);

That worked fine in FireFox but in Microsoft Internet Explorer I always got a very weird error: "config[i] is not an object" (the text was not exactly that but very close).

This was a mistery to me. Why wouldn't it work? The code is dead simple.

I went through the code in FireBug, all was perfect. But I could not do the same using Internet Explorer. I remembered that a tool named Microsoft Script Debugger existed when I was a student in 1990's but even at that time it was complete rubbish. I spent several hours trying to figure out how to debug JavaScript effectively in the Internet Explorer.

It turned out that Microsoft had several other options: Microsoft Script Editor, which comes with Microsoft Office and Visual InterDev, which comes with Visual Studio. Script Editor was evaluated as "crap not far from script debugger" by some people, so I decided not to waste my time on it. Visual InterDev was not an option either because I am not willing to spend $500 for Visual Studio to get a JavaScript debugging tool.

Fortunately one of my refined searches finally gave me the answer. I found Microsoft Web Developer 2008 Express Edition. This product cannot do just–in–time debugging (i.e. open debugging when Internet Explorer encounters a error) but if web site debugging is started from the Web Developer, all errors are caught and debugging is perfect (Microsoft debugging tools were always the best in the world).

So I got as copy of the product, answered many unrelated questions to get a free key and installed the Web Developer. As usual with Microsoft software it installed almost 2GB of various junk, which I will try to remove one by one later. However the debugging was truly perfect! I made a new web site project and lanuched it. A new instance of the Internet Explorer opened and Web Developer attached to it. Since my project in Web Developer was blank, I was directed to port 5011 and saw directory structure on the disk. I simply typed the address of the problematic web site and debugger immediately prompted me to debug JavaScript error on this site. Simple, isn't it?

I could not figure out why length attribute in the config variable from the code about was 3 in the Internet Explorer. There was nothing wrong with the variable except for its length attribute. I simply made check for existence if config[i].id and site worked fine.

The experience is very interesting for me. Though I did not understand the cause of the problem and did not cure the cause, I got a very good tool to work with: a proper JavaScript debugger for Microsoft Internet Explorer.

I hope my experience will be useful to other TYPO3 developers too.

Oct 12, 2008

iPhone as productivity tool

On Friday I got my new shiny black 16GB iPhone 3G. I really like this device. I saw many different SmartPhones but none were truly good. They were "not a bad phone" but quite bad in the rest. Normally they tried to emulate computers but they all have a very small screen and extremely small fonts without any anti–alias. Using these SmartPhones is a pain.

iPhone is different, it features good fonts, large letters, screens free of clattering, etc. And what is even better, applications can be added to it easily.

I am using OmniFocus for task management on my Mac. It is very convenient for anyone, who employs Getting Things Done technique for effective workload management. I am very used to OmniFocus. When I am at my Mac and I have a task or an idea, I just press Ctrl+Mac+Space, type task or idea in the small popup window, dismiss it and continue working without a need to memorize this idea. Next, when I have time, I process all such items, sort them into projects and set due dates if necessary.

Oct 6, 2008

My TYPO3 extension programming book is out!

Some people already know that my book about TYPO3 extension programming is out. If you want, you can order it now and get a discount from the cover price. Packt ships books for free, so it will be cheaper than if you buy in any other place. You can also get PDF version of the book even cheaper or a bundle (PDF+printed book) for a good price.

And now, the bonus to those, who reads more than cover page of my blog. You can get larger discount on the book if you use a discount code. Please, do not post this code anywhere or point to the page with the code directly. Point to this post instead. This will help to spread news about the book. I apologize to those who already bought the book but the code was just sent to me by Packt. Anyway you get a very good information about extension development. Here is the what a reader wrote in the TYPO3 mailing list:

At last I get it!.. well I'm very, very glad :) I've just previewed
it, but I can see that's more then was available in one place until
this time...
much more, great :)
good job Dmitry, Ingo and other people from Packt