Showing posts with label Programming Tips 'n Tricks. Show all posts
Showing posts with label Programming Tips 'n Tricks. Show all posts

Saturday, July 28, 2012

Learn C to be a Pro Programmer in Any Language

If you're a good programmer you've the world in your hand. You may make millions of dollars if you are a skilled programmer. But to be a skilled programmer you need to know how machine corresponds with human. Well machine corresponds with human through Machine Language. Since Machine Language is in binary and it is extremely hard to master it. So, there came C - middle level language to correspond with machine easily. There is no other middle level language as easy and as effective as C. So, once you learn it - C++, Java, PHP - all becomes piece of cake. Apert from this basic reason, you've lots of other benefits of starting your programming experiece with C. You need to learn these before you start and run out of your patience learning the best programming language in the world C/C++.

C programming language is the most used and useful machine language. C is a programming language developed at AT & T’s Bell Laboratories of USA in 1972. 

What to Look for In a Good Web Designer

There are a few misconceptions about what exactly a web designer does. I will try to clear your concept of small business website designers. I'll start with showing the differences between web designer and a web developer. A web designer is someone who creates the visual design and layout of a web page. A web developer is someone who does behind-the-scenes programming of a website. For example a web developer creates the code for database websites.

What does a Web designer do: Web designers are professionals who organize information, create page layouts, while communicating the business's information/opinions in a website. Web designers create another medium for the business to expand into. Creating a website enables the business to attract new customers, showcase its services products, and to do business across countries. A good web designer should be able to do both the design and the development.  

Visitor Friendly Website Design Tips

aving a certificate in web design doesn't mean that you can design a good website. If you offer freelance web site design or any kind of web site design services you need to be able to understand visitors' psychology. That's priority number 1. Normally, Website visitors habit over the net is just same as the costumer's habit in the stores. Visitors just glance at the new webpage; they normally scan some text and just get on to the first link that takes their attention or interest. A professional website designer should think from the point of view of end user of website, i.e., visitors. So, here are some web site design tips that don't fail to grab visitors attention and to keep them.

Avoid Confusion: Do not make visitors think - do not make them confused. The web page should be explanatory and obvious. 
 

Easiest Click Count PHP Code

Sometimes you need to count clicks on a particular link or image etc to know how much successful you're with that particular link or image, right? Or, if you get local ads on your site or you advertise your business on another site - you may want to know how many times those are being clicked, no? This code comes to help you there. This Simple Click Count PHP Code would be particularly helpful for self-maintained site advertising. If you provide independent advertising opportunities on your website, your sponsors (and you) may want to know just how effective these ads are. Knowing stats is useful. It will help determine if an advertisement or location is producing visitors.

To make a click counter you will create two files: A PHP script file and a text file for the output.  

Some Usefull PHP optimization Tips

Here are some pretty useful small tips for tweaking PHP code.

1: If a method can be static, declare it static. Speed improvement is by a factor of 4.

2: Avoid magic like __get, __set, __autoload

3: require_once() is expensive

4: Use full paths in includes and requires, less time spent on resolving the OS paths.  
 
5: If you need to find out the time when the script started executing, $_SERVER['REQUEST_TIME'] is preferred to time()

6: See if you can use strncasecmp, strpbrk and stripos instead of regex

7: str_replace is faster than preg_replace, but strtr is faster than str_replace by a factor of 4

8: If the function, such as string replacement function, accepts both arrays and single characters as arguments, and if your argument list is not too long, consider writing a few redundant replacement statements, passing one character at a time, instead of one line of code that accepts arrays as search and replace arguments.

9: Error suppression with @ is very slow.

10: $row['id'] is 7 times faster than $row[id]

11: Error messages are expensive

12: Do not use functions inside of for loop, such as for ($x=0; $x < count($array); $x) The count() function gets called each time.

For templating, are you using Smarty? This is probably the fastest way to ensure the frequently viewed pages of the site are cached.

Add Easy Blogger Navigation Menu on Top of Your Blog

Most of the new blogger often confused to put an eye catching menu bar on their own blog. I had received lots of email regarding this. I also have seen a huge number of articles on it, but problems is that some articles are creating confusion when the new blogger are going to do that.

Here is a very simple technique - so that you can create it easily on your blogger blog.

How?

First you have to change your blogger template

 

Basic HTML Codes to Create a Webpage

If you want to create a webpage you need to know the basic html to start with. In most cases the basic html code given below are enough to create a webpage. Use your notepad to create a text document containing the words that you want to appear on your Web page. Make sure the name of your text document end in .html (or .htm if you're working on a PC) and save the document as "Text Only." Type out your story or whatever it is you want to publish. Here are some tips for organizing your text:

You need to insert some formatting tags in your document that will tell an Internet browser (such as Safari, Firefox, or Internet Explorer) how to arrange your words and pictures on the screen. These tags make up a language called HyperText Markup Language, or HTML. 
 

Make Money by Developing iPhone Application

You can make money by developing iphone application. Apple Inc created iTunes App Store where programmers can sell their applications. In this virtual store many kinds of educational, funny or important software for iphone could be got for free or for a few bucks - the application developer gets his cut for each sell of his software/application.

iPhone Application Platform:
The operating system of iPhone OS is mainly a mobile version of MacOSX. This system is used in all iPod Tuch, iPhon and iPad. It gives the opportunity to developers to enjoy making their applications compatible for all three devices by just changing codes a little.

3 different ways to develope iPhone application:

Web Based Development: You can develop application in html, css and java script and make sure it is compatible with  mobile Safary Web Browser.  
 

Dangerous VB, Notepad Scripts to Freak Out Friends

Sometimes when you're feeling freaking good and in the mood to give your good friends (!! those, who usually make fool of you by showing off their coding skills) a few freaking surprises - then these disgusting notepad scripts will come into your freaking help. I hope you understand what I mean. Ha ha ha... So, go on do it now... do it good...

ALL OF THESE COMMANDS ARE TO BE TYPED IN NOTEPAD


1) Convey your friend a lil' message and shut down his / her computer:
Type :

@echo off
msg * I don't like you
shutdown -c "Error! You are too ******!" -s


Save it as "Anything.BAT" in All Files and send it.

2) Toggle your friend's Caps Lock button simultaneously:
Type :

Set wshShell =wscript.CreateObject("WScript.Shell")
do
wscript.
 
sleep 100
wshshell.sendkeys "{CAPSLOCK}"
loop


Save it as "Anything.VBS" and send it.