Tuesday, August 29, 2006

Google Analytics

I have signed up Google Analytics it's now free for anyone who owns a website. See also the blog post here at Analytics' own blog.

What books are good for the start?

I got few books to begin with. The dummies series is always a good choice, it's easy reading and will never discourage you with too hard to understand contents. I got PHP 5 for dummies.

To start developing and practicing your skills you need to run your scripts on a local machine. This book from Sams Teach Yourself PHP, MySQL and Apache is a good one with a CD included. The step by step guide makes life easy for you in setting up your server or local PC as a developing and testing environment. The CD saves you lots of time locating and downloading the opensource software. Just follow the steps you'll be ready to test run your first script in no time.

I have to say these 2 books are easy for beginners but I found them pretty used up within couple of weeks. I looked to Wrox's books which I normally find them very useful in the 2nd round. Their books are always heavy weight (thick to carry) by their page numbers and contain much more information than you would normally need as a begineer. I always find them handy as a desk reference. I just brought this one few days ago.

To my slight disappointment the Wrox book was dated 2004 and have used PHP5 RC1 which is pretty outdated by now. I would have expected a revised edition on the shelf.

Saturday, August 26, 2006

Moving on slowly but enjoying it

interfaceI am giving up the example of AJAX form submit I mentioned here. There is no rush to learn something that I couldn't manage, is it? Instead I think a clean and pretty interface is required so I picked a tabbed header as you can see here. There are few good ones here at CSS Library.

I now have an interface that users can select which database table they want to search on. Results are displayed and they could pick any of them to look into details (or update it if signed in) in a popup window. This will enable the main result page to stay because you can go back without running the search again.

Paging control is done, i.e. like Google search result page you could navigate back and forth or any particular page number.

I have almost finished the codes for generation of checkboxes for selection of fields to search on by user "on-the-fly". On one table I have 13 and another 22 fields. I don't have to hard code the name/key of the fields and the users can pick what fields should be included in their search.

Thursday, August 24, 2006

Don't type too fast!

I type pretty fast. I tease those female (there aren't professional typists as the profession has been displaced by PC IBM invented some 25 years ago) who claim they type that I haven't met one yet who types faster than me on computer. You could do online typing speed check here. I could do 70wpm with only a few error.

But don't just type fast. I got lots of error message just because I typed too fast. One day by artificial intelligence I hope scripting editors or IDE can read below like us. I'm sure you read below without problem.
Olny srmat poelpe can raed tihs.

i cdnuolt blveiee taht I cluod aulaclty uesdnatnrd waht I was rdanieg. The phaonmneal pweor of the hmuan mnid, aoccdrnig to a rscheearch at Cmabrigde Uinervtisy, it deosn't mttaer in waht oredr the ltteers in a wrod are, the olny iprmoatnt tihng is taht the frist and lsat ltteer be in the rghit pclae. The rset can be a taotl mses and you can sitll raed it wouthit a porbelm.

Tihs is bcuseae the huamn mnid deos not raed ervey lteter by istlef, but the wrod as a wlohe. Amzanig huh? Yaeh and I awlyas tghuhot slpeling was ipmorantt!

if you can raed tihs psas it on!!

links for 2006-08-23

Wednesday, August 23, 2006

How a language is spoken

We communicate with language. Unless you know lip reading or hand sign we rely on spoken language to communicate with others.

You of course is comfortable with your so called mother tone and it would be even better and easier if you could use that with your family members or friends. Normally they understand without picking on your words, grammar or the way it's spoken.

You can't do all that in programming when it comes to language. It's very strict. Although the logic is similar and straight forward but when you speak a different language you'll be puzzled why you are not understood by the machine that you thought you can communicate with.

I have been scratching my head for hours for silly synatx error (like grammatical mistakes and punctuation erros etc in your English essay writing) and keywords etc. When you learn to speak a new language you really have to use it everyday otherwise you will keep forgetting trivial things like that.

Machines are not like human their tolerance level is very low.

Saturday, August 19, 2006

I'm flattered

I was clicking one of the Google ads in my blog here. This one titled Paperless office Info attracted my eyes. I have been posting a few about paperless office hence these links by Google.

I'm indeed flattered and surprised that my article, which was written and submitted to asp101 few years ago, is listed on 1st page.

My first taste of AJAX

Found a very good example/tutorial here. It mixes AJAX form submit and passes the data via $_POST to another page.

The form submit is a plain HTML with the AJAX Javascript codes in it. I have used it in my intranet project such that the search text entered by the user are used in the next page for search in the MySQL database. The results are displayed in the same page without refreshing and the user wouldn't even know that the next page is called. The 2nd page which is in php receives the text entered by $_POST for processing.

Because of the small database that I'm using for development on a local machine the speed is very fast.

links for 2006-08-18

Friday, August 18, 2006

I'm php-ing.

I did try ASP.NET as I said here and here. Too bad database connection was the part that discouraged me as I said here.

I don't particularly like IDE, except those that come free with the software such as Word and Excel, because most IDEs are built for commercial productions and costs a lot. These IDEs have productivity in mind and employers buying these expect a lot from them and from their employees using them.

For dummies and beginners text editor is best.

When I was doing ASP 3.0/vbscript I used CodeGenie developed by DolfySoft. It was a freeware few years back. It's now a shareware at $24 from softpedia.

I have recently looked at few others and picked PSPad as my tool for php scripting. Others I looked at are far more complicated for me. There is a good listing of php editors here.

My progress of learning is here for record sake

  • making connection to MySQL, obtaining dataset and displaying them;

  • simple paging control, i.e. number of rows per page, idea from Matt in a forum post but I made lots to changes to make it work;

  • fancy things like include files for CSS, functions, class and passing variables between pages etc;

I'll move onto text search soon.

links for 2006-08-17

Monday, August 14, 2006

It's almost impossible to quantify

We lunched with the Employer's site representative today. This would probably be our last lunch together on official status. We talked about old times as usual, it has been 8 years!

Without doubt we touched on the 5-6 tons of paper we disposed of when clearing offices. We prepared about 3,000 files for the discovery process for the arbitration. Employer's rep has around 1,500 files. The Employer was also copied many documents during the course of the contract. Then it was the main contractor (wasn't at the lunch table today) who has more than 200 subcontractors (we were the biggest among them). We are pretty sure they have at least 5,000 files. I'm talking about reminding quantity. I have ignored those papers we dumped every single day during the last 8 years.

We have roughly checked that each file on average contains typically 300-400 sheets of paper because we have estimated time required for pagination for discovery. Here again I have ignored those companies/vendors that worked under us. There must have been hundreds of companies who have used lots of paper in delivering a project of this scale.

Exactly how many tons of paper we have used, it's almost impossible to quantify.

Saturday, August 12, 2006

EchoSign is paperless solution

EchoSign is a neighbor to Meebo, this fact has nothing to do with this post.

Having paperless office has always been my dream. I have quickly checked out EchoSign's website and their online demo. The initial idea of helping people to organize agreement, signing and exchange of documents is great. It appears that this solution is moving up to enterprise level. The pricing isn't cheap; they are talking about $100/sender5 senders/month. There is no mention of storage I presume it's bottomless. EchoSign's logo is an infinity sign.

My mind goes one step further. Their solution is far bigger than just managing agreement and signing online. It could be a complete paperless solution. That was how I started to dream about paperless office some 4 years ago. Most companies or even home have fax machine, right?

In my last contract we have a hugh volume of documents. We write to our client our vendors/subcontractors write to us. As that was a big/high profile/fast track contract we, by default, fax our letters/transmittals/forms...anything basically and also post or hand deliver originals. People/companies that work for us do the same.

In my little project (article here), which was started in the middle of the run, we had to scan all the backlog and put them in one of our PC on the intranet. Due the size of the backlog we were only able to digitize important contractual documents, a small percentage of the whole lot....I'm talking about few full container load of pure papers. Incidentially we just cleared our site offices so we know the size of the forrest we have killed.

I'm talking about more than 100,000 records in our database, each record could be few pages of a letter or 50 pages of technical submissions full of calculations and drawings etc.

Going back in time we have duplicated our effort, i.e. we faxed the papers but had to scan them afterwards. If EchoSign was there 4 years ago we would have used their fax server as a node for the entire project, i.e. everyone faxes papers there and EchoSign manages the routing and distribution to the order of the sender.

Whether we like it or not we are still Microsoft-centric. We use outlook by default as email client. As I said in my note to the editor here I was thinking of writing add-in for outlook. This could be integrated with EchoSign's service. E.g. We fax it to EchoSign, an email is sent back to the responsible person of the team who will categorize the document, i.e. adding keywords, tags etc right inside the read email dialog, he/she then click a special reply button such that EchoSign gets those "filing information" automatically.

Last but not least the demo was a bit slow viewing from this part of the World. I guess local servers are needed when EchoSign gets enough customers for that region.

Friday, August 11, 2006

I have been meebomed!

As I said here this is bound to happen. Logged in meebo as usual this morning and got someone shouted from my blog just said "you have been meebomed!".

I'm sure this word will get its place in dictionary very soon meebo+me+"d".

Who are you by the way?

links for 2006-08-10

Thursday, August 10, 2006

Database connection

I'm still reluctant to join the VWD camp because Microsoft has made it too difficult for amateur. May be they don't want us to join.

To illustrate my point, e.g. to connect to MySql database

In php/MySql it would be like this

$var = mysql_connect("localhost","root","yourpwd","yourMySql")

Back in the old days when I used vbscript in ASP 3.0, it was

Set Connect = Server.CreateObject("ADODB.Connection")
Connect.open "Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source= " & yourExcelfile & ";" & _
"Extended Properties=""Excel 8.0; HDR=YES;"""

The above was for connection to a Excel file, I don't expect connecting MySql would be very much different if OLEDB driver was also used. OK I have to admit that there was a adovbs file in the server side include folder with a number of constants to make it work.

My point is I didn't have to use any IDE to do that?

Meebo me again!

I have Seth's email and I replied as follows:-

Thanks for writing back. I was wrong. Here is how I first tested it. I have meebo in a window of FF then watching also my own blog in another window (am using dual monitor). I was talking to myself and I saw all the conversation so I said Je... I'm talking in open air, is this the intention? The widget does say "type here and hit enter to send a private message"?

I later tested that again with my sister thousand miles away but I couldn't see our conversation in the widget window so I corrected my blog post here.

As I said in my post as I couldn't hide myself for individual account I had to turn myself invisible most of the time when I don't want to entertain stranger. Having said this my sister can still send me message via that widget which I can see. This is a potential message spam, i.e. if your blog is popular there could be hundred of people (or spammer) punching silly text even though my widget shows "I'm offline". OK as you said I could turn it off if I want to.

I have to say the widget is a good channel that actually attracts people to go to your blog to talk to you plus knowing how many people actually arrived at your blog. I have also tested this with my sis, i.e. I asked her to edit the guest number but shouldn't that be a way to identify a friend coming in from that door, e.g. if they are meebo friends use one of their account credential such that I know he/she is a friend?

PS: this could well be a good move to attract more meebo users, e.g. only meebo users are allowed to enter or only those on widget owner's buddy lists are allowed or else comment on a post and I'll be in touch.....something like that!

links for 2006-08-09

Wednesday, August 9, 2006

ASP.NET database connection

There are few ways to connect a database. It's easy if it's Microsoft's product of course, you bet! VWD offers data source connection for

  • Access
  • ODBC
  • MS's SQL server
  • MS's SQL server database file
  • Oracle

I was struggling to connect to MySql because I have that in my Intranet here already that I want to play with.

Obviously 3rd party provider and MySql can't ignore the community running IIS and asp.net. You have few choices available
  1. MyODBC
  2. ODBC .net data provider (Open Databse Connectivity)
  3. MDAC (Microsoft Data Access Components, 2.8 Service Pack 2 believed to be current version)

  4. OLDDB.net provider which is not currently supported by MySql

  5. Corelab mySQLDirect .net data provider (free for 30 days)

I tried all the above and conclude that the ODBC method appears to be the easiest. I got as far as making a connection to my MySql database which is remotely on another intranet location. I got below which is something else not to do with the connection.

[SocketException (0x2afc): The requested name is valid and was found in the database, but it does not have the correct associated data being resolved for]

Meebo me!

I'm a great fan of meebo. Their blog is one of the rare one that I read everyday because it pops up within the login tab of my firefox, I can't escape.

I have removed my mecommerce ads for this CR15-Newzen theme and inserted meebo me widget there as you can see. I have posted my comments here.

I have suggested that a feature is added (just tested this, the conversation is indeed private between your visitor and you, the owner of the blog/widget) such that private conversation, if desirable, can go on via that channel. I have also looked, but couldn't find, that in meebo it's not possible to turn myself invisible for a particular account, i.e. I have my widget in my blog but for some reasons I don't want to talk to just any visitor while I am conversing with someone else or busy with something. How can I do that?

PS: also if I am hidding (invisable for all account) visitors at my blog can still type something in which I can see so I can decide to response or not.

My experience with Microsoft IDE

I hope my experience will probably help some of you starting to think about self-learning programming just for fun or for whatever reasons.

As we always say destination isn't important what we have gone through is. By seeing what I have gone through you could select your path I hope.

excel vbaThis is Excel's IDE by pressing Alt-F11. The context menu I mentioned appears whenever you "dim" a class and use that in your code. It's indeed handy as you couldn't possibly remember everything when a piece of software gets complicated and feature full.

By the way Excel is very powerful and it could do things that you have not ever thought it could. VWD has similar feature which is far more important as asp.net is very powerful and the .net framework by Microsoft provides you with many built-in classes and objects that are handy to you.

dockable properties pane

Having said this I assume that you want to build really complicated websites. For example when I learn the very basic HTML back in the old days I need to know how to format the outlook of controls, i.e. the look of things such as button, font and size of letters, text box and table etc. In VWD all these are taken care of by the dockable properties windows. You could even set the behaviours of some controls. IDE for Excel and VB has the same. In case of VB/Excel if you insist on hardcoding all these it's still possible, in Visual Studio for asp.net I wonder if anyone would like to do that. I must warn that codes that affect/require by the asp.net compiler in the server are stored in many places such as code-behind files, aspx, ascx, web.config ....etc I mean you have many places to go for in your bug hunting.

These days interactive dynamic websites could be complicated. Microsoft likes complicated things as they have financial muscles. asp.net offers you lots of built-in classes and you can see from the object browser that there are really a lot of them. The design environment helps you to overcome that by showing you hierarchically all classes/objects available, what has been properly declared and installed and quick reference as to the methods and properties.object browser

My conclusion is that if you stay with one of these IDE you'll be sticking to it for life, especially for those professionals. It's probably a 90 days training programme (and refreshment courses from time to time, paid by your employer I hope) required to get familiar with just the use of all the features of the IDE. OK it's for production commercial websites so productivity is most important, there is no time for kids play.

links for 2006-08-08

Tuesday, August 8, 2006


I did say I quite like Microsoft's IDE for software development. I'm not a trained programming professional and I don't code for a living. Below is the path I have walked passed over the years in self-learning like a dummies.

  1. Copying and learning from Microsoft.com by peeking into the HTML codes behind. Of course it's NOT the one you can see now, it was around year 2000.
  2. Read from a Microsoft publication on building Intranet site, got a silly idea of building Intranet site with hyperlink on Word and Excel.
  3. Built desktop application using VB6 connecting to Excel at remote PC on the Intranet, bad idea.
  4. Programmed Excel VBA to automate tedious operations
  5. My little project Intranet, a near paperless solution, in ASP3.0 to help co-workers in the office to quickly search/retrieve scanned file and query databases in excel files. More about this story here.

I used text editor when coding ASP 3.0 using vbscript. However it was real fun using the Excel VBA IDE. It's a great idea of having context menu whenever you press "dot", I have to say Excel VBA is pretty simple as it isn't strictly Object Oriented Programming.

Now I've been playing with ASP.NET VWD for a few days now. It's in fact quite tiring although I have a dummies book showing me the way. The VWD is quite a complicated software no wonder Visual Studio is so expensive and really it isn't kids' toy.

Although I have played with VB6 before ASP.NET is different because it uses "split class", i.e. declarations are in two places. VWD insists that your declarations are strictly correct in aspx file and also in the "code behind" files which is either in VB (VB.net or 7.0) or C#.

To be continued...

My R100 is fixed

I have collected it back today from technical support upstairs.

The motherboard has been replaced and BIOS updated. I got a brand new notebook now.

The Windows update too me many hours, although mostly unattended, which is still very tedious. Well as my notebook is only 2 years old the total time is a bit shorter than my last experience mentioned in this post. I have yet to install Office tomorrow and get some settings transferred before I could use it.

Monday, August 7, 2006

My first excercise in asp.net

I have done my first excercise in asp.net which is a very simple shopping cart. There are only 2 pages with a class file. I have used vb.net naturally. I didn't use the MasterPageFile method introduced by the book as that saved some typing.

The book says all code listings used are available for download at here which is not true. I couldn't find anything there? It doesn't really matter as typing in all codes helped. I have experienced a feature such as that VWD will tell me that a listbox ID "1stCart" is not a valid identifier for a control because "1" should be "l" due to my typo.

One little mistake actually caused lots of errors in the debugging mode.

Friday, August 4, 2006

Visual Web Developer

The free download which is only 2.82Mb is pretty fast. However that's only a download/installation manager. Once it's installed I have to maintain the internet connection for a much bigger download which is 300+ Mb.

The installation is even bigger which requires 1.6Gb on your primary disk. I tried selecting installation on d:\ but doesn't help much. I had to use Partition Magic 8 to extend my c:\ a bit before I could run the installation.

The installation took fairly long that was enough time for a shower.

ASP.NET for dummies

Found this book in the store today, it's a bargain because it's 8 books in 1.

Normally I will quickly browse the content of the book even if I don't know the subject. I found value of this book in chapter 2 where it says Microsoft's Visual Web Developer 2005 Express Edition's free download is valid until 7 November 2006, after that it'll be $49. I could have missed that if I didn't see this book today.

I quite like Microsoft's IDE such as that for Excel VBA which I had some experience years ago.

Thursday, August 3, 2006

links for 2006-08-02

Here I come - ASP.NET 2.0

I have some junior ASP 3.0 experience which is now completely rusted. Now I'm going back to start from kindergarten level of ASP.net 2.0

First of all I killed my XAMP. The .net framework in my notebook is only 1.1 therefore I have to download .NET Framework 2.0 Redistributable Package dotnetfx.exe from Microsoft download site here.

As I killed MySQL earlier I have to reinstall it. I downloaded the latest Community Edition 5.0 from here. I have done a tricky installation here which is that MySQL is installed in drive d: rather than c: because my primary partition is getting full.

Next I need something to manage my MySQL server. I have used phpMyAdmin before which is php driven. As I'm not playing php this time I used MySQL Administrator version 1.1.9 which is available from download from here. The tricky part is that the installation folder must be under MySQL's application folder.

I followed the well written article here in 15seconds to configurate my test database and created a new user for connection.

One last piece of application is MySQL Connector/Net 1.0.7 which has to be downloaded from here. Same as the tricky part earlier this must be installed under the MySQL application folder.mysql

To test it out I just copied the sample codes from the article. As warned it didn't work first time. I had to copy the MySql.Data.dll file from D:\mysql\bin\.NET 2.0 and place it in c:\Inetpub\wwwroot\bin. The bin folder in wwwroot has to be created for this. This is somewhat different from what the article described as I have used all latest version of applications.

It worked at last.

Wednesday, August 2, 2006

Exit Strategy - XAMP

It's good if the software you are trying has a well designed uninstaller, if not then you'll have to learn how.

I installed a few times Apache, MySql and PHP5 on Windows XP I would say that wasn't too difficult. This is commonly known as XAMP. I experienced a problem when I changed my mind from having MySql on d:\ rather than on c:\. That caused problem on registry and windows services unless you have properly uninstalled it.

This is how you remove MySql.

  1. Navigate to the folder mysql/bin/ in DOS command prompt then type in 'mysqladmin -uroot -p shutdown'
  2. You'll be prompted for password for the root user, enter what you know. If you don't remember, which is common, try 'test' or nothing (hit return).
  3. If you are lucky getting through last step type 'mysqld --remove'
  4. Check under control panal>administrative tools>services to see if MySql has disappeared
  5. Go to Add/Remove Programs in Control Panel, look for MySql servers and clients 4.0.21 and click remove
  6. When it's properly removed you can delete the MySql folder

You should save your databases stored in /mysql/data/ if you want to keep them for later uses

To uninstall Apache as a service, open a Command Prompt window.

  • Navigate to C:\Program Files\Apache Group\Apache2\bin (where you find apache.exe)
  • Type 'apache -k uninstall' then exit DOS window.
  • Check under control panal>administrative tools>services to see if Apache2 has disappeared.
  • Navigate to Add/Remove Programs in the Control Panel.
  • Uninstall 'Apache HTTP Server 2.0.42' by clicking Remove.
  • Now you can delete the Apache directory

I have almost forgotten PHP5. It's not installed as a service therefore just point to the folder and hit delete, Windows don't care!

links for 2006-08-01

Tuesday, August 1, 2006

My R100 being fixed

Brought a 1.8" external HDD box last night to save my Toshiba notebook. It's a 40Gb Toshiba MK4006GAH. It's for transplanting into the notebook such that I could try recovering files from the notebook HDD which I can't get into.

I was lucky, files in the HDD can all be read. Now with the new empty HDD in the notebook I tried to run recovery from external CD drives. It wasn't easy, in fact it can't be done. For record sake on this R100
  • F1 = BIOS setup
  • F2 = select boot device
  • F8 = Windows setup
  • F12 = recovery

It's not possible to boot from external CDROM drive unless it's connected via a PC card. Alternatively you can boot from a Floppy drive connected via a USB port. For that choice we asked for help from the support center just 2 stairs above us.

Now recovery of the OS is done but there is a defect found in the display module therefore my R100 is still upstair.

Firefox doesn't trust me - part 2

My last post here about file links on intranet. The comment I got from Pam was actually pointing me to the right direction. I did click the link given but there was no text.

My colleague now found it for me. You have to save below to a file named "user.js"
user_pref("capability.policy.policynames", "localfilelinks");
user_pref("capability.policy.localfilelinks.sites", "http://ip_of_your_intranet_site");
user_pref("capability.policy.localfilelinks.checkloaduri.enabled", "allAccess");

Save it in our firefox profile directory, restart firefox, it'll be done.