Nazly's BLOG

Nation mourns

Posted by Nazly on Monday, 26th December 2005 09:01:20 (GMT +0530)

The nation today mourns in remembrance of the people who lost their lives in last year's Tsunami which hit the coasts of Sri Lanka. Thousands lost their lives while more people were left homeless.
Comments (0)

Gettogether

Posted by Nazly on Sunday, 25th December 2005 11:25:25 (GMT +0530)

Had a great time with my good old school buddies as we all met at one of my friend's place for dinner on the Christmas eve. It was fun to meet all of them as we had lot of fun talking about all the past things and the stuff we did during school days. If there is an option to goto School again I would really love to. Its a sweet part of life :)[Smile]
Comments (3)

Web Development with Mozilla Firefox

Posted by Nazly on Saturday, 17th December 2005 11:24:12 (GMT +0530)

Lately I have been playing around with the Web Development tools for Firefox and I was really excited with all the functionalities as designing and debugging Web pages has never been better. The Built in tools such as the JavaScript debugging tool and the real-time DOM inspector are couple of standard tools that are availabe in Firefox. The Web Development Extensions are the ones I was really excited about. I found the Web Developer Extension and Aardvark quite useful when it comes to handling page elements and information related to CSS and forms. MeasureIt and Colorzilla are couple of very basic tools that can save a lot of time when it comes to designing web pages.

Read through Rapid Web Development and Testing with Mozilla Firefox to learn more about the Web Developement tools for Firefox.
Comments (0)

DNS Chaos

Posted by Nazly on Friday, 9th December 2005 15:13:51 (GMT +0530)

Finally the issue I had to face with switching hosts came to an end after finding where it would have gone wrong. Our client who was using the services of a leading ISP in Sri Lanka wanted to move their hosting and mail services to a different Service Provider. The client purchased the hosting A/C and requested our company to do the necessity to get things running as they didn't have that much of an experience with the setup. And I was assigned to sort things out and as usual I did the setup of the hosting and the email. I told the client to change the nameservers of the domain and they did that as well. And then to the waiting stage. It took more than two days and still the services were not up. I then tried accessing it via an anonymous proxy and it worked. I told couple of my friends to check who were living in different parts of the world and it was working for them as well. So I realized that it has to do something with the ISP's DNS records. Since this ISP covers 75% or more of Sri Lanka I should say it doesn't work for Sri Lanka.

It all got to the messy stage coz I didn't get a good response from guy I spoke to at the ISP, though I explained him that they haven't removed the DNS records. I was under pressure by the client as they were pissed off thinking that the new hosting company is screwing things up. Atlast I found a guy who is known to my friend who helped me out in solving things out. Earlier they thought that the domain was blacklisted. But to see our client hasn't informed the ISP to disconnect the DNS services. So atlast after submitting all the paperwork the ISP took the necessary steps and all the services are now working fine to all users. It was one hell of a job..
Comments (1)

Template handling function

Posted by Nazly on Thursday, 8th December 2005 17:53:52 (GMT +0530)

I just wrote a very basic function to handle templates which can be used in PHP to seperate PHP code and HTML code. Embedding PHP into HTML or embedding HTML into PHP is a neccessity when it comes to developing Web Applications. The common problem faced by using either of this methods is that maintaing the code becomes very painful. Web Designers who design the Webpages prefer editing only HTML code rather than messing with PHP code in it. The solution for that will be using a Template Engine. Template Engines can be used to seperate the Application Logic and the Presentation Logic which makes the code more readable. I have been using Smarty as a Template Engine for a quite a long time in my Applications. Even in this Blog Application I used Smarty. I found it a bit difficult to use Smarty for quick solutions and small websites. I wanted to write a function that will do the templating part with a very basic setup. Its more a put this here, put this there kinda template.

Here is the function I wrote to get the job done. The real deal is that it supports caching as well. The place holders on the template file will be the label enclosed with [__ and __].

This is how the template file will look like

<html>

<body>

<table width="100%" align="center">

<tr>

<td><table width="100%" align="center">

<tr>

<td><h1>[__pageHeading__]</h1></td>

</tr>

<tr>

  <td>&nbsp;</td>

</tr>

<tr>

<td><strong>[__welcomeMsg__]</strong></td>

</tr>

<tr>

<td><table width="100%" align="center">

<tr>

<td width="200" align="left" valign="top" class="leftColumn">[__leftNav__]

</td>

<td valign="top"><table width="100%" align="center">

<tr>

<td>[__bodyContent__]</td>

</tr>

</table>

</td>

</tr>

</table>

</td>

</tr>

</table>

</td>

</tr>

</table>

</body>

</html>

Comments (0)

How come??

Posted by Nazly on Wednesday, 7th December 2005 22:44:49 (GMT +0530)

Just got this via email from a friend of mine. I seriously don't understand the reason and really wonder whether its a bug.. It will be great if any of the Windows or IE freaks could explain me why..


One more bug in Microsoft Windows!

This is quiet interesting....
1) Create a folder on the desktop and name it as "Notepad"
2) Open any webpage in IE and see its view source.

It's Just SILLY!!!




It has something to do with the Notepad.exe as same thing happens when I hit 'Notepad' on the Run dialog box. What I don't understand is what the hell it has to do with the folder on the desktop???
Comments (1)

Few updates

Posted by Nazly on Tuesday, 6th December 2005 22:50:46 (GMT +0530)

Just added few updates to my blog. Added an archive section which lists up all my previous posts as most of you were finding it difficult to read my old posts. Still the posts are categorized on monthly basis on the Monthly Archive. Trying to give a facelift to my blog. Let me come up with something really cool..
Comments (0)

Caught at eCarnival

Posted by Nazly on Tuesday, 6th December 2005 14:15:07 (GMT +0530)

The eCarnival organized by the Computer Society of Sri Lanka was held over this weekend at the BMICH Exhibition Centre, Colombo. It didn't turn out at all from what I expected from an eCarnival. It was not informative as I expected it to be. I had a short visit on a couple of days just to check things out and was caught snooping around the Microsoft stall and was named an INTRUDER by Fiqri in his picture gallery. My buddy Charith and my Guru Fiqri were amongst the .NET User Group members who were running the show at the Microsft stall. Than the tech stuff what attracted the visitors more was the Fashion Shows and the Karaoke Competion which in my opinion have nothing to do with an eCarnival.

http://www.nazly.net/ecarnival.jpg
Myself, Charith and Fiqri at the eCarnival
Comments (0)

England sink in Pakistan

Posted by Nazly on Saturday, 3rd December 2005 17:14:35 (GMT +0530)

Though England had good starts they failed in wrapping things up as Pakistan won the 3rd Test beating England by an innings and 100 runs. With this win Pakistan have won the series 2-0. England managed to score 288 in their first innings as Paul Collingwood, the replacement for Strauss held on and scored a valuable 96. In reply Pakistan got a massive 636 on the board despite the early wobble. Mohamed Yousuf scored a valuable 223 while Kamran Akmal offered great support with 154. The pair put up a 269 run partnership for the 6th wicket. England were looking good till Lunch on the 5th day with Ian Bell and Paul Collingwood occupying the crease as England didn't lose a wicket in the morning session. The collapse started when Collingwood fell soon after lunch. Englad were totally outdone by spin of Danish Kaneria and the pace of Shoib Akthar. England never looked comfortble in their batting throughout the series.

England will now have to move towards the Oneday matches which starts on the 10 of Decemeber. Vaughan will miss the tournament coz of his knee injury. It will be interesting to see how they perform in the Onedayers.
Comments (0)