Tizag.com Webmaster Tutorials - A collection of webmaster tutorials from HTML to PHP.

Monday, September 12, 2022

Checklist for Mobile App Development

  1. What is the purpose of the App?


2. What services are provided to attract customers?


3. Is it an original idea or the concept is already there in the market?


4. Client is Technology Specific? or open to any technology stack


5. Market Research is already done or we need to do it in prior? Who are the competitors, what they are missing? What problem your app is solving? What mistakes of the competitors can you avoid?


6. Who are your target users? Age, gender, location


7. What are the monitizing strategies? inapp purchase, inapp advertisement, paid services


8. What is client's budget ?


9 What is your Launch date?


10. Post Launch 

Friday, January 29, 2016

Extensive Freelance

As our company SKI USA INC is a hub of huge talented resource in Mobile Application Development.  A company in the business of premier internet marketing since 2008. We have 3 prime office worldwide with a team of 40+ members. Our keen knowledge of internet marketing has helped us integrate all aspects of mobile application development and digital marketing for the promotion of your products & services. Our sole aim is to create awareness, sales, and increased profits for every dollar you spend. We describe our company as creative, energetic, ambitious, young & professional.

We follow Agile Project Management methodology via Basecamp which ensures client keep the track of the project progress.

Although we had proper planning for projects and our delivery we were limited to project orders via networking site like LinkedIn. We like the approach of TOPTAL where we get the opportunity to connect with the best players in the industry.

Our technical guys can explore themselves more with the new projects they get from Toptal. I think guys who are interested in freelancing can join Toptal  where they have more chances to get hired for technical projects

Friday, June 27, 2014

Responsive Website Design for your Business – A Must Have

Responsive Web Design is a design and development approach that responds to the user’s behavior/environment based on screen size, platform and orientation. So the website is compatible to a desktop computer, a Tablet as well as a mobile phone and allows the users of these devices to open the website with the same level of ease and user-friendliness. A site with Responsive Design adopts the layout to the viewing environment by using proportion-based grids, flexible images, and CSS3.

Why Responsive Design?

  • Every day nearly 700,000 Android devices are activated.
  • More than 20% of Google Search is conducted by mobile device and this figure is rising. In many developed countries, use of Internet on mobiles has already crossed desktop usage.
  • Nearly 46% of consumers connected to any business like to use smartphone to look for product information while they are on the go.
Therefore a responsive design is becoming a need for businesses that want to give the best online user experience to their clients.

Thursday, August 29, 2013

Linux Quick Commands




Directory ::
pwd           current directory

Directory Listing ::
ls               list all files in current directory
ls -a           list all files in current directory includes hidden files
ls -al          list all files in current directory includes hidden files with permission, ownership and size
ls -al a*      list all files in current directory includes hidden files with permission, ownership and size matching a [Case]
ls -S          list all files in current directory sorts files by their size
ls -r           list all files in current directory sorts files in reverse order
ls -R          list all files in current directory recursively below the sub-directory
ls -F          list all files in current directory with extension 


Copy ::
cp original_file new file                            inside same directory
cp original_file /dir/dir/                             to a different directory
cp original_file /dir/dir/new_file                 to a different directory with new name
cp /dir/dir/original_file .                            from a different directory to current location

Move ::
mv filename /dir/                   move a file from current location to different location        
mv /dir/filename .                  move a file from different location to current location
mv original_file new_file         rename a file in same location


    -i (interactive) — Prompts you if the file you have selected overwrites an existing file in the destination directory.

    -f (force) — Overrides the interactive mode and moves without prompting. Be very careful about using this option.

    -v (verbose) — Shows the progress of the files as they are being moved. 



Delete ::

rm filename          deletes the file
rmdir dirname/      deletes directory [If directory is empty]
rm -rf /dir/             deletes directory and all its contents
   -i (interactive) — Prompts you to confirm the deletion.
  •    -f (force) — Overrides interactive mode and removes the file(s) without prompting.
  •    -v (verbose) — Shows the progress of the files as they are being removed.
  •    -r (recursive) — Deletes a directory and all files and subdirectories it contains.    


    find . -name foo   Finds the file foo in the current directory
    locate tree        Finds all file(s)/directory(ies) with tree. Can be tree.txt or btree
    mdfind kind:folder "farm-animal-type"

File Permission ::
rw------- (600) Only the owner has read and write permissions.
-rw-r--r-- (644) Only the owner has read and write permissions; the group and others have read only.
-rwx------ (700) Only the owner has read, write, and execute permissions.
-rwxr-xr-x (755) The owner has read, write, and execute permissions; the group and others have only read and execute.
-rwx--x--x (711) The owner has read, write, and execute permissions; the group and others have only execute.
-rw-rw-rw- (666) Everyone can read and write to the file. (Be careful with these permissions.)
-rwxrwxrwx (777) Everyone can read, write, and execute. (Again, this permissions setting can be hazardous.) 
     r — file can be read
     w — file can be written to
     x — file can be executed (if it is a program)
    - (dash) — specific permission has not been assigned

Directory Permission ::
drwx------ (700) Only the user can read, write in this directory.
drwxr-xr-x (755) Everyone can read the directory; users and groups have read and execute permissions. 
    d — a directory
    - (dash) — a regular file (rather than directory or link)
    l — a symbolic link to another program or file elsewhere on the system 

Identities
   u — the user who owns the file (that is, the owner)
   g — the group to which the user belongs
   o — others (not the owner or the owner's group)
   a — everyone or all (ug, and o)
Permissions
   r — read access
   w — write access
   x — execute access
Actions
   + — adds the permission
   - — removes the permission
   = — makes it the only permission      

chmod o+w filename.txt      tells the system you want to give others write permission to the file filename.txt
chmod go-w filename.txt   tells the system you are removing group and others write permission to the file.

    g+w — adds write access for the group
    o-rwx — removes all permissions for others
    u+x — allows the file owner to execute the file
    a+rw — allows everyone to read and write to the file
    ug+r — allows the owner and group to read the file
    g=rx — allows only the group to read and execute (not write) 


chmod +x dir  # Set a directory to be listable
chmod +x file # Set a file to be executable
To change the owner of a file/directory recursively (affecting all descendants):
chown -R username           dir # Recursively set user
chown -R username:groupname dir # Recursively set user and group
To change permissions bits of all files in a directory, recursively:
find dir -type f -exec chmod 644 {} ';' # make all files       rw-r-r-
To change permissions bits of all directories:
find dir -type d -exec chmod 755 {} ';' # make all directories rwxr-xr-x

It would be nice if you could just do this:
chmod -R 755 dir


Grep ::
Finding relevant word and exclusion of  irrelevant word.

grep Exception logfile.txt                                     look for Exception 
grep Exception logfile.txt | grep -v ERROR             -v option to exclude 
grep -c "Error" logfile.txt                                     -c option to count the word
grep --context=6 myword logfile.txt                     show additional six lines after matching 
egrep 'Error|Exception' logfile.txt                         search for either Error or Exception by executing just one command
grep Lin file1 file2 file3                                      search the three files for any line that contains the string Lin: 
grep 'Linux is' file1 file2 file3                              search for the phrase Linux is: 
grep 'Linux is' *                                                  search for the phrase Linux is: in all files in the current directory 


Monday, August 26, 2013

Motivating People in your Team - Keep right people in your team to increase productivity.

The skilled manpower is regularly increasing in the country. If you are a team manager your motive should be always to hire better employees.
If your team member is leaving you for better prospect it is better to say him good bye.
Keep recruiting and training people regularly.If in a project/module you require 10 people to work, then train 12-14 people.
Also your team members should be multitasking.

As a manager my challenge is not only to hire good people but to train them as a leader.

Leadership is a mindset it is not a designation. Leadership mind is a great mind it never gets stuck. It is continuously learning from all situation which never gets stuck whenever  there is problem but seek an alternative to find a different method.


How does Sam Dana Danda Bhed works in the theory of Motivation

Sama [Consultation] :: Whenever you see an employee is not working initially listen to him.Listen to his side of the story. We can get a whole picture if we listen or communicate directly.


Dana [Reward] :: Rewarding employees sufficiently increases in order to get the work done. The reward can be monetary incentive or vacation or promotion. Or we can give as "Most Productive Person Award".

Danda [Punishment] :: Many employees may not perform in spite of rewards. Therefore a stronger step is punishment for those employees may be warning, pay-cut, demotion or even suspension. Even while punishing the wrong give an opportunity to learn and improve. Slapping a person is not only a physical injury but an emotional injury. Punishment within a right limit are always respected and honored.

Bheda [Split] :: This step is not encouraged at all. In smaller firms a  non-performing employee may ask to leave the organization.


Delegating Work

Right Person for Right Job - A mistake at this stage can create a real frustration at long run.

A well written CV can impress everyone but there is a big difference between promises and actual delivery of work. Give yourself time before passing any kind of judgement on anyone. Observe an employee at-least for 3 months before assigning him a responsible task.

Different situation and circumstance can change one's productivity.

Leaders quality to Motivate Employees ::

  1. Always listen to both parties together and separately
  2. Announce the verdict Unemotionally
  3. Difference between right and wrong.
  4. Encourage new Ideas
  5. Never misuse your power.
  6. Never be partial

Monday, February 4, 2013

Image Load Faster in Website

utilize browser caching

Browser caching stores cached versions of static resources. This speeds up page speed tremendously and reduces server lag. To enable caching, you will want to add the following code to your .htaccess file:
# BEGIN Expire headers
ExpiresActive On
ExpiresDefault "access plus 1 seconds"
ExpiresByType image/jpeg "access plus 2592000 seconds"
ExpiresByType image/png "access plus 2592000 seconds"
ExpiresByType image/gif "access plus 2592000 seconds"
ExpiresByType text/css "access plus 604800 seconds"
ExpiresByType text/javascript "access plus 604800 seconds"
ExpiresByType application/javascript "access plus 604800 seconds"
ExpiresByType text/html "access plus 2592000 seconds"
# END Expire headers

combine images into CSS sprites

Images can be combined into CSS sprites in order to cut down the number of images loaded on a given page. CSS sprites are basically one large image that is made up of a number of smaller images. Combining 5 images into one CSS sprite is a fast way to speed up a website by allowing a browser to load one image instead of 5 images.


source :: http://www.webdesignerdepot.com/

Saturday, March 3, 2012

PHP Basic Coding Standard for Web Application

Why coding guidelines are required?


Guidelines are only useful if they are followed. It is arguable that we can get away with different coding styles if every team member works on a different section which is encapsulated and therefore their
coding style doesn’t affect the other developers. Unfortunately, this only holds true until a developer leaves and someone else has to take over their role.

There are few guidelines which can be followed while coding in PHP

  1. Use ""

  2. Use four spaces for indentation. Don't use tab literal characters because different
    computers use different setting for tab.

  3. Quoting strings: Strings in PHP can either be quoted with single quotes ('') or double quotes ("").
    The difference between the two is that the parser will use variable-interpolation in double-quoted strings, but not with single-quoted strings. (figure 1)




  1. Put a space after control keywords like if and for. Put a space around operators like =, <
    etc. (refer fig 2)

  2. Strings must be concatenated using the "." operator. A space must always be added before and after the "." operator to improve readability:
$company = 'Electronic' . ' ' . 'Medical' . ' ' . 'Records';
$string = 'Foo' . $bar;

$string = "Foo $bar"; //
you can use double quotes and add the variable inside; else use single quote


  1. Make sure that Parentheses hug their contents with proper indentation. (refer fig 2)
  1. Case and Capitalization:


I.
Function names should be as verbose as is practical to fully describe their purpose and
behavior. Name the functions using lowerCamelCase. When a function name consists of more than one word, the first letter of each new word must be capitalized. E.g. when we are retrieving a patient’s average pulse rate through a function. The function name should be patientAveragePulseRate().


II.
Variable names may only contain alphanumeric characters. Numbers are permitted by but try avoiding it. Variables should have more descriptive names. Say when a variable is set for pulse rate so set the variable name as $pulseRate


III.
Name constants using UPPERCASE separated by underscore characters. Say ‘UPLOAD_FILE_LOCATION’


IV.
Name classes using UpperCamelCase.


V.
Write true, false and null in lowercase.


  1. For files containing only PHP code, omit the closing "?>"

a. The closing ‘?>;’ is not required in php files unless it is in a file being included and the
following code is not php. It becomes impossible to accidentally add white space to the end of the file. Therefore, output cannot be sent to the browser before HTTP page headers are modified.



b. If ‘?>’ used, any whitespace following the closing tag, whether introduced by the developer, user, or an FTP application, can cause unwanted output, PHP errors, or if the latter are suppressed, blank pages. For this reason, all PHP files should OMIT the closing PHP tag, and instead use a comment block to mark the end of file and its location relative to the application root. This allows you to still identify a file as being
complete and not truncated. (refer fig 2).





  1. Turn on all error reporting. If a code works with E_ALL set, then it will also work with any other error reporting configuration, including when all error reporting is turned off.







  2. Shortcut constructs: Replace if statements where you are assigning one of two values to a variable based on a conditional.

    if ( isset($_POST['city']) )

    {

    $city = $_POST['city'];

    }

    else

    {

    $city = '';

    }

The above code works perfectly but it is not a clearest way if we want to run through a list of different variables and do a similar operations. The best way to do it in a more compact way mentioned below.

$city = isset($_POST['city']) ? $_POST['city'] : '';



  1. Code Commenting: Code commenting is required that others (and developer after a time span) can quickly understand what is going on in the codes. Following DocBlox or phpDocumentor comments standards are again too time consuming. So lets follow a few commenting logic mentioned below.


I.
Page Level Commenting: On the top part of php file the use of the php file should be
clearly mentioned. (fig 3)



II. Comments related to a class or specific function: On the top each functions declaration
a small block of comments to be written. (fig 4)
III. Single Line Comment: It can be on a line of its own, or it can be appended to the end of a line of code. (fig 5)

IV. Multi Line Comment: Multi-line comments are useful when you have notes you want to make in the code that will take up more than one line. The ability to mark blocks of
lines as comments avoids the necessity of placing the single line comment marker at the start of each comment line. (fig 6)





  1. SQL Code Layout: When writing SQL queries, capitalize all SQL keywords (SELECT, FROM, VALUES, AS, etc.) and leave everything else in the relevant case. Lets keep a few points in mind where we
    can increase the performance of a query.


I.
Select only the fields you need. Never use "Select *" -- Specify only the fields
you need; it will be faster and will use less bandwidth.



II.
Filter as much as possible. The 'WHERE' Clause is the most important part for optimization




III.
Don't use DISTINCT when you have or could use GROUP BY. If all you need is to remove
duplicates then use DISTINCT.




IV.
Avoid using IN(...) when selecting on indexed fields, It kills the performance of SELECT
query.




V.
Try using a JOIN instead of a sub query. Joins are expensive in terms of time. Make sure
that you use all the keys that relate the two tables together and don't join to
unused tables -- always try to join on indexed fields.




VI.
SQL Injection Prevention: SQL injection refers to the act of someone inserting a MySQL
statement to be run on your database without your knowledge. Injection usually
occurs when we ask a user for input. Lets consider three things which will help
us to prevent SQL injection attempts.



a. Using PHP Data Objects: PDO is a PHP extension that work like class letting you access database more fast and secure. Say $db is a success PDO connection.

$sth = $db->prepare('SELECT field FROM table WHERE id = :id');

$sth ->execute(array(':id' => $_GET['id']));

$rows = $sth ->fetchAll();




b. mysql_real_escape_string(): A function that escape the unsafe character before sending the MySQL query.





VII.
Minimum header requirement of header should be followed as mentioned below points (fig 8).



a. The DOCTYPE should declare the appropriate version of the HTML used in the document.



b. The xmlns is required for validation.



c. Minimum file header comments should include description, author and date.



d. The meta element declare properties of the document.



e. content-type is essential for validation and for local computer use.



f. description is used by search engines keywords and author help document searches.




  1. Validation of file: The HTML code should be validated against the DOCTYPE, HTML validation service at http://validator.w3.org/ . A comment within the header should indicate if and when the code was validated.

  2. Don’t put phpinfo() in your Webroot. This is a really insecure practice, and if trying eyes gain access, it could potentially spell doom for your server. Make sure phpinfo() is in a secure spot, and as an extra measure.

  3. Use Output Buffering: Output buffering is a simple way to greatly improve the performance and speed of your PHP script. Without output buffering, your script will show the HTML on the page as it’s processed – in pieces. Adding output buffering allows the PHP to store the HTML as a variable and send it to the browser in one chunk. Refer url:
    http://dev-tips.com/featured/output-buffering-for-web-developers-a-beginners-guide
    for detailed explanation
    . (refer fig 9)







  1. Don’t Copy Extra Variables: This is redundant and could potentially double the memory of your script. Google Code has bad and good examples of variable usage. PHP implements “copy-on-write” memory management. This basically means that you can assign a value to as many variables as you like without having to worry about the data actually being copied. “Doubling the memory,” this actually is a common misconception.







  1. Make sure the page execution time is minimum. To measure each page rendering
    time we may consider a small script (fig 10). One can use any logic for
    similar functionality.









  1. After a module is done make sure that it is comparable with all versions of popular browsers like IE, MozilaFirefox, Chrome, Safari and Opera.





Note: Always validate the pages with a validation
service (http://validator.w3.org/). Validation keeps your documents up to the
standards, and free of errors. If non-standard elements have been used, and the
code does not validate, then the comment should indicate what non-standard
elements have been used and why.