Tag-Archive for » hello world «

Lets give it a try!!!

Yes this time dot net. microsoft visual studio 2008 DVD is only price of less then 70Tk. but according to it’s magical power its million times powerful then such price. so let’s give it a try. first install “visual studio 2008″. oh i forget to mention, to run this DVD you must need a DVD drive installed and fully functional with your computer ;) . Okay lets move forward. once installation is finished. click start menu and open Microsoft Visual Studio Dot Net 2008.

IDE (Integrated Development Environment) opened!! Cool!! Years back, so far i remember dot net have many complexities to run a simple progam for amateur programmers. Installing bla.. bla.. configure bla.. bla.. don’t think i am confident, i might be wrong :( anyway, 2008 version is really easy and simple to start quick. so lets start before load shading starts. :D well lets goto File->New-Project. Ah men a lot of things. which one shall i start with? hhmm to determine which one is your best choice you need to know what you like to do. about me: very simple i want to take two variable as input and calculate their summation and print them in output screen. after discuss with one of my friend i understand console mode is good choice for me. Yes console mode Black Screen. Black board is still used more then 90% school in our country because it’s less expensive then white board. :D

okay about me my requirement is very simple so i opened console mode project. now write the following lines of code.

static void Main(string[] args)
{
Console.WriteLine("Aminul");
int x,y,sum;
x = int.Parse(Console.ReadLine());
y = int.Parse(Console.ReadLine());
sum = Sum(x , y);
Console.WriteLine("Total:"+sum);
Console.ReadLine();

}
static int Sum(int a, int b)
{
return a + b;
}

run this program and i found my solution. now my program can calculate 400 and 20 makes 420 :D yes i am happy at this moment. do you know why? because i am an dot net expert among my villagers :D (most of them never seen a computer :D )

How to start PHP

Before start php you need some back understanding of web technology. How web sites are developed?

Web site consist of three parts. We need to understand clearly what these are and how it works. First of all you need a server called web server. Apache is a server of linux where you actually put your files. Secondly you need to choose a scripting language. Without any scripting language you site can’t be dynamic. We choose PHP as web language. Finally to handle operations of data you need a database. Mysql is best suited with PHP and Apache.

LAMP: Stands for Linux, Apache, Mysql and PHP. So we can easily understands that, PHP is best suited in Linux server and this is the reason why everybody chooce Linux server for hosting. In contrast, most of we are using windows. Moreover, configure LAMP is not so easy for everyone. So what’s the solution? There are a number of integrated tools which are simple to install and configure automatically. XAMP is a very good one. WAMP is another one. You can download both for free from the web. Download XAMP/WAMP anyone  you like and compatible with your OS. Once XAMP/WAMP download and installed you are ready for to code with PHP, MySql and Apache.

For instance lets download and install XAMP. Then goto c://xamp/htdocs/ this is called root/document root. Lets create our first project named practice

create a folder c://xamp/htdocs/practice named practice.
now create a file named hello_world.php inside practice folder. i.e c://xamp/htdocs/practice/hello_world.php
Web consist of HTML/XHTML , Scripting language(PHP, C# dot net, JSP, Cold Fusio etc), Javascript and Database.
PHP code must contain a beginning and ending tag.
Short tag: <? …… ?>
Full tag: <?php …… ?>
Paste following code into hello_world.php file
<?php
echo “hello world”;
?>
How to run your script/site? Open a new browser window(Mozilla firefox or Internet explorer or Google Chrome) and paste the following url into your address bar.
where practice = project name
hello_world.php = file name.