Archive | August, 2010

## Pascal: Armstrong numbers

Before going straight to programming we should analyze  some different types of numbers.

The first one which I am introducing to you here is the Armstrong number. An Armstrong number of three digits is an integer such that the sum of the cubes of its digits is equal to the number itself. For example, we could take 153 = 1^3 + 5^3 +3^3. There some other numbers which are written down at the bottom of post.

## Pratical skills are the most important

When I just started to read about programming and similar stuff, I usually thought that I will write the most fluent, easy-to-read, structurally right code. Moreover, I read as much various articles and tutorials how to do that properly, but the truth was different.

After a while I understood that the most important thing is practice, practice and one more time practice. You can easily learn syntax, best practices, but it is quite hard to adapt them on real life basis. For example, imagine  yourself as a beginner PHP programmer who has to create easy to expand CMS. If it is your first project, you will get deep into the thinking of files tree, classes and other similar things. However, you will still write a bad code and that’s just fact which you need to accept.

## Pascal: Working with fractures

I was really disappointed of the lack of information about Pascal. I know that it is not very popular language now and there are many better languages around us. However, I do believe that many people need information and examples of Pascal tasks. Moreover, there are still some schools where students learn this language as their first programming experience.

Today I will try to introduce you with some fractures and how to divide them properly in Pascal.So the main point is to add some fractures and then get integer part and a new adjusted fracture.

## Scripterous – editing PHP on the fly

There is no secret that on some tutorial sites you can put JavaScript, CSS or HTML code into a dialog box and immediately see the result. As I am surfing the Internet for a long time I have not imagined that there is similar PHP simulator.

Scripterous is a great way to try some examples in real life without having a web server or creating it locally on your computer. I think this service is very useful to people who are making their first steps into PHP. So if you have problems with buying some hosting plan or creating a local server on your computer and if you want just to try some simple PHP code, you should consider Scripterous as your primary simulator on the Internet.

Visit Scripterous.

## Pascal: Greatest common divider

I often used this function – a simple and clear to understand algorithm to find the greatest common divider of two numbers. Here is the whole code for that:

I bet there’s no better way to do this on Pascal.

## The importance of thinking ahead

I remember my first commercial project  a simple CMS (Content Management System) which helps accountants to communicate with their customers more easily. Main objective was to create simple inner platform in which registered users could upload their checks, indents, drafts, expenses and other stuff. In addition, accountant which registers his users can view the documents, change their category, status or he can create other necessary forms and documents for the client.

It seemed to be very simple especially when the design was ready for use -  I just needed to copy the styles file to another location. However, I made really big mistake by going straight to the job. I did not make any plans what I should make first, what I should do second and so on. The only notes were about database tables and their fields.