Posted by admin April - 27 - 2011 Comments Off

Many novice programmers start a program with a “big bang” approach, meaning they want to write the whole program in one step and then only they would try to compile and run. However as humans we make many mistakes when programming, especially given that we have to use a programming language to do the job and most programming languages differ drastically from natural languages. Because it is very likely that we would make mistakes, we have to ensure that we leave room so that we could easily identify the mistakes we have made.

Incremental Programming Helps

The solution to this situation is to adopt an incremental approach in programming. The idea is to keep building your code using several small working pieces. The pieces of code would not do a complete job. Rather they will lay out the skeleton for the final complete program. Once you are convinced the correct skeleton is in place, you could go on and add muscle to the program.

Incremental Programming Process

In incremental programming, the program is incrementally built using several iterations. In each iteration of the program, it is compiled and run to ensure that whatever we have in a given increment is correct. It is very important to always have a working version of the program, no matter how much logic we have implemented so far. Here is a simple algorithm depicting the incremental programming process

Identify the main parts of the program
Write the initial stub to include all the parts
Compile and run to verify the correctness
Fix bugs if any
While whole program is not complete
Change the code to implement more logic
Compile and run to verify the correctness
Fix bugs if any
End while
Program complete

As you could notice in the above process, we always compile and run the program whenever we add some logic. The idea is to ensure that we write a clean program all the time. One would think that this is going to waste time as we compile and run the incomplete program many times. However this process going to save time rather than waste time in the long run. The rationale is that, when you write the whole program at once and try to compile, you would introduce many bugs at once to the program and it takes more time to debug. The incremental approach on the other hand cut down time to debug by eliminating bugs along the way.

An Example

Let’s look at a very simple example on how to apply incremental programming. The sample problem is to write a simple billing program for a coffee dispenser utility. The input to the program from the user would be the number of coffee cups. Given the number of coffee cups to dispense, the program is required to calculate the amount and display to the user.

Tags : , , , , , , , , , , , , , , , , , Programming
Posted by admin April - 27 - 2011 Comments Off

To check if installation is okay, there are 2 execution interfaces, CLI Command Line Interface and CGI Common Gateway Interface. However, if you installed PHP in the \php directory, you can 1st try to check there.

Run “\php\php -v” command to check the Command Line Interface (CLI).

Run “\php\php-cgi -v” command to check the Common Gateway Interface (CGI).

If you see the PHP version on the screen with both commands, then the installation is okay.

With these, tips you can now try to install you PHP program and know how to check if it is installed properly.

Here are some tips on blocking Spams. It might not work 100%, but it definitely would help.

Make a spam list of common site in spam posts. Though some spammers have so many URL at least it would be lessen if you are able to block some of them. With PHP, it is much easier. You can look for a common denominator. You can use PHP to filter through all the posts.

Website cookies. A common denominator with SPAMMERS is that they do not have website set cookies. You can code a cookie check in PHP and it might work to lessen the Spam.

With PHP it is easy to figure out how to block spam although it is still not totally eliminated at least it has lessen and maybe someday it will block out all spams.

WampServer is a WEB DEVELOPMENT SOLUTION that is easy to manage. Because after installing the package, you don’t need to touch any of its major settings because it’s completely fix. And with its user friendly Graphical User Interface (GUI) you can immediately and easily understand it without seeking the help of the book or the tutorials around the net.

This web development package allows web developer to create web applications using APACHE(server), PHP(coding), and the MySQL(database). Plus it has PHPMyAdmin and SQLiteManager that make web developer managed their database easily.

This is the only program allows the user to reproduce their production server. That’s why there is the possibility that you can add as many apache, mysql or php releases you want.

PHP is originally known as Personal Homepage but now it’s already known as Hypertext Preprocessor. This general-purpose scripting language was created by Rasmus Lerdorf in 1995. And its main use is to produce Dynamic Web Pages.

PHP is one of the widely-used scripting languages over the web servers because it’s free of charge. PHP can also be used for command-line scripting and client-side GUI application. And in terms security, PHP is the popular target of hacker especially those application that is poorly built.

MySQL is a Database Management System (DBMS) that is released in May of 1995. It’s commonly use for web applications and acts as the database component of different Platforms such as Linux/BSD/Mac/W-A-M-P/Perl/Python and for open-source bug tracking tools like bugzilla. MySQL are essential components of content management systems such as Joomla, Word Press, Drupal and some Bit Torrent trackers that is written in PHP and uses a MySQL database. The latest MySQL product version is the MySQL 5.0 that is launched last August 2007. It has two different variants such as MySQL Community Server and MySQL Enterprise Server. And soon to release is the MySQL 5.1.

Tags : , , , , , , , , , , , , , , , , , , , , Programming
Posted by admin April - 27 - 2011 Comments Off

CNC stands for Computer numerical control. Just about every business that operates a manufacturing machine will usually have a cnc programming service operating it. The basic function of a cnc programming service has a cnc machine running it. The cnc machine is an automatic, precise, and consistent motion control mechanism. In the past, most automated machines needed someone to stand by the machine to make sure it was lined up properly and made sure that it repeated a certain function that is required from the machine. For a better explanation, I’m going to use the example the website I researched for this information used to make things a bit more clear. A drill press is used to machine holes, this is a repetitive motion, however, a person must stand over the machine to line up the drill with the holes and make sure the drill stays lined up. A person is required to do something every step of the way. However, a person can only do so much, and as production grows so will the amount of “holes” so to speak, and the operator will eventually find it hard to keep up. In order to create more production, a cnc programming service and set up can be added. The cnc machine can do everything that an operator would be required to do. Once the machine is setup and running, it can take the place of the operators, the cnc machine is so easy to run, the operators tend to get bored during lengthy productions.

The cnc machine or course can do much more complicated operations that require much higher skill levels. A cnc programming service can improve automation so much that most of the time operator intervention can be reduced or all together eliminated to do other things. The second benefit is that cnc programming services and technology is consistent and accurate and once the program is verified, the machine will run efficiently and consistent, no matter how many work pieces need to be produced. A third benefit offered by most forms of CNC machine tools is flexibility. Since these machines are run from programs, running a different work piece is almost as easy as loading a different program. Once a program has been verified and executed for one production run, it can be easily recalled the next time the work piece is to be run. This leads to yet another benefit, a fast change over. Since these machines are very easy to setup and run, and since programs can be easily loaded, they allow very short setup time. Rather than applying completely mechanical devices to cause motion as is required on most conventional machine tools, CNC machines allow motion control in a revolutionary manner. All forms of CNC equipment have two or more directions of motion, called axes. These axes can be precisely and automatically positioned along their lengths of travel. If you need more information about cnc programming services there is a lot of information about it online.

Tags : , , , , , , , , , , , , , , , , , , , , Programming