9

How to get your side project launched

Posted by iphp on Aug 23, 2009 in IT, Project

There are many people who have a lot of interesting ideas in mind but never get around to starting on their side/pet project. Some people start on their side project but never get to completion. These are the three steps which if followed before you start actual work on your project will help you get your pet project launched.

1. Think things through
- This is the most important step. If you do this well, consider your side project well begun and half done!
- Visualize things after completion will it make you happy? Will it make you feel like you accomplished something? Will it make you feel successful?
- Humans operate with pain-pleasure principle.  Will the completion of the project alleviate your pain or others pain? Will it bring some pleasure to the work and lives of others or yourself?
- When the going gets tough with your pet project as it often does, these reasons will help you and give you the strength to complete the project.

2. Set a deadline with detailed plans
- Start by identifying all the steps you need to complete and each stage.
- When can you reasonably finish the project?
- When do you want to launch? When do you want to get your product or service out to the public?
- Make detailed and specific plans, not vague ones.
- Also the most important rule, remember nothing is perfect. You will have to refine after launch and constantly learn from it. Take a look at the first version of Google. Your first launch is the beginning get ready to quickly make changes depending on user feedback.

3. Make commitments
- Tell your friends and your family you are going to launch on the deadline.
- If you had prospective customers enquiring about product, let them know that you are launching the product or service on the launch date.
- Schedule banner ads, ppc ads, book presentations, print leaflets, etc as required to promote your project and get you to focus on the launch.
- Get a mailing list of all people who you know that will be interested in the project.
- The third point in my opinion is the one most often ignored and causes deadlines to slip. If  your family & friends know that we are busy working on something they might understand not to bother you until your launch date!

The first point on thinking things through will energize you or show you that this project should never be done. The third point will commit you to the deadline and hopefully clear out distractions as your family and friends are now aware of what you are working on. Only once all the three steps above are complete you should start working on your project and in accordance with your plan.

If you are working on your pet project please do share your experience!

 
9

Understanding FTP using raw FTP commands and telnet

Posted by iphp on May 5, 2009 in IT, Web

Both FTP and SMTP are simple text based protocols. A previous article showed how to check if an email address exists using SMTP commands from the terminal. Here I would like to show you how you can use raw FTP commands to connect to an FTP server, login, traverse directories and even download files. But before we do this we need to understand how FTP is different from the other protocols. 

Firstly FTP (File Transfer Protocol) uses two channels, the data channel and the control channel.  This is called out-of-band control. The control channel sends commands to the FTP server and the data channel is used for data (to retrieve files from the server, etc).

Secondly there are two major modes of FTP operation, the active mode and the passive modes. The difference lies in the way the data channels are opened. In Active FTP, the FTP server will connect to the client port and send data to it. In Passive FTP, the FTP server will tell the client which port to connect to for retrieving data. Firewalls can complicate the process on both sides. 

In our example, we will use Passive FTP (avoiding firewall issues on client) to download a file using anonymous FTP login to the IETF servers. There are a lot of files on this server by some estimates it is about 4GB. We will pick up a small file called ftpext-charter.txt located in the /ietf/ftpext/ folder on the server.

Open the terminal/command prompt (On windows, Go to Start > Run > type cmd). Once you are on the command prompt, type this command to connect to the FTP server and issue commands

C:\> telnet ftp.ietf.org 21


220 ProFTPD 1.3.1 Server (ProFTPD) [64.170.98.33]
USER anonymous
331 Anonymous login ok, send complete email address as your password
PASS blogger@webdigi.co.uk
230 Anonymous access granted, restrictions apply
CWD ietf/ftpext/
250 CWD command successful
PASV
227 Entering Passive Mode (64,170,98,33,151,31).
RETR ftpext-charter.txt
150 Opening ASCII mode data connection for ftpext-charter.txt (6060 bytes)
226 Transfer complete
QUIT
221 Goodbye. 

                                     Commands/Response on control channel

We issued these five commands in the following order at lines 2, 4, 6, 8, 10 and 13
USER – Send username to the FTP server
PASS  - Send the password (Anonymous servers need email address)
CWD  - Change the working directory on the server
PASV – To enter the passive mode (To let client connect to the server)
RETR – To retrieve a remote file from the server
QUIT – To terminate the connection to the server 

Between line 10 and 12, you will notice that the file was downloaded. To start the download, I had to open up another telnet window to open the data channel. To figure out to which IP address and port I had to connect to, we have to look at line number 9. We received a set of numbers (64,170,98,33,151,31) from the server in response to the PASV command. The first four related to the IP address 64.170.98.33 and the last two 151 and 31 help us identify which port to connect to.  Multiply the first by 256 and add it to the second. So, 151 * 256 + 31 which is equal to 38687.  Now that we have the IP address and port number, all we have to do is to open a second terminal and telnet to IP:Port as shown below:

C:\> telnet 64.170.98.33 38687 

This will now show you all the contents of the file ftpext-charter.txt being thrown into your second terminal window. Once this is done, you can proceed to type further commands on the control channel (the first terminal window).

Notes:
-
The anonymous FTP server on IETF has a 60 second timeout on its control channel connection. Please connect to your own FTP servers they might be more forgiving to humans on terminals.
- FTP is not very secure as you can see the password and username are sent in plain text! Also, there is no encryption as you saw on file downloads or uploads.
- Type HELP once you send your password to see what commands you can issue the server.
- Here is a list of raw FTP commands and the parameters
- Here is a list of anonymous FTP servers
- This is the FTP sequence diagram which explains stuff at DNS and TCP level
- On windows there is a built in command line FTP tool (called ftp). It is useful but it does not show us how to use raw commands and communicate to an FTP server.
- SFTP (SSH File Transfer Protocol), FTPS (FTP over SSL) are more secure ways of using FTP.

ftp-commands2

The FTP HELP command via terminal

Hope this helps!

Tags: , ,

 
5

Reddit vs Digg – A collaborative test for users.

Posted by php-manual on Feb 18, 2009 in IT

I recently decided to run a test to see how well users can collaborate using social bookmarking sites like reddit & digg. This was assuming that users will collaborate and can accomplish something together!

How the test works

1) Each visitor to the site will be given any ONE random letter of a phrase (one per IP address).
2) They have to use the comments or any method to share with other users know the letter they got.
3) All users have only two attempts to guess the phrase. After they have used their attempts they can share their guesses in the comments section.

EG: If the phrase was “wild goose chase”. Visitors to the page might get any letter from ‘w’ through to ‘e’ and so on. Users use the comment section to share their letters and work together and find out the phrase. This is how a test looked on reddit.

Result of test on Reddit 

Phrase / Word          Section posted       Time to finish

Observatory              Programming        14.5 minutes
Starbucks Coffee       Entertainment     107.3 minutes 
Wild Goose Chase      WTF                   225.6 minutes 

Result of test on DIGG 

Phrase / Word          Time to finish

Spill the beans           580.5 minutes

Observations on the test results

1) Although more than 5000 visitors saw each page. There were around 105 comments and around 20 – 30 users who actively participate to guess the phrase.
2) Thanks to proxy servers used – Some users (esp in programming section) could get more letters from the system.
3) Reddit edit comments helps a lot as users can change their comments any number of times.
4) Another interesting observation was that some people lie that they got a letter which was not actually given to them. It was good to see users upvote the letters in the comments that they have also got to confirm a letter.
5) Reddit programming users managed to find the word in just under 15 minutes of starting the test. WOW!

Reddit users win the collaboration test!

I am looking for any other fun ideas of a collabortive test? Looking forward to hear your ideas!

Tags: , , , ,

 
8

Google store does not use google checkout instead uses Worldpay

Posted by php-manual on Feb 4, 2009 in IT

The Official Google Store which sells a range of Google labelled products doesn’t use Google Checkout for credit card processing but instead uses Worldpay.

Google Store uses Oscommerce (popular open source PHP ecommece store management program) and free open source plugins are available to integrate google checkout with oscommece in minutes (eg: http://code.google.com/p/google-checkout-oscommerce/). I wonder why they cant simply use Google checkout to deal with credit cards on their own site?

Screenshots
1) Google store without Google checkout option for payment.
2) Worldpay message when checkout starts.

Another question
OK, now we know that Google store doesnt have Google Checkout support at the moment. Then how does the store have the google checkout badge on their sponsored listing?

Google search result shows the Google Checkout badge

Google search result shows the Google Checkout badge

Try a Google search for “Google Store” and you can see the sponsored link has Google checkout badge on it.

NOTE: I love Google and use most of their products. Just don’t understand why they cant use their own checkout in their official store.

Tags: , , , ,

Copyright © 2010 PHP, Web and IT stuff All rights reserved. PHP Web development in London.