Showing posts with label computer science. Show all posts
Showing posts with label computer science. Show all posts

Sunday, April 3, 2011

255 - one of the most important numbers in computing technology

Apart from 1 and 0, 255 is probably one of the most important numbers in computing technology. Here are some trivia about the decimal number 255.

1) It is 8-bits in binary notation - 11111111
2) It is FF in hexadecimal.
3) It is also called an octet.
4) It is the maximum number of IP per block in IPV4
5) It is often referred to nowadays as a byte. But byte is ambiguous which means a single character in computing but can have different number of bits (i.e 4-bit, 7-bit) depending on the systems used.
6) It is the maximum number of filename characters in many operating systems.
7) It is the maximum number of characters on a varchar data-type in MySQL.
8) It usually represents 1 character.

Monday, March 14, 2011

System Performance Optimization Basics on the Resource Level

Before moving on to optimizing your application, take a look first at infrastructure or resource level whether the problem lies in there. There are four areas that directly attribute to your system performance at the resource level. You should derived your optimizations based on them.

CPU (Central Processing Unit)

Processor speed dictates how many instructions per second can you execute per second which is measured as cycles/second or hertz (i.e 2.3 Ghz). The bigger the number the better the performance. But 1 processor can be used 1 at a time only. There is no such this as percent usage. The CPU utilization percentage you usually see only indicate how long a process was seen at a given time period. Now, parallel processing is common and multi-core CPUs are available. The number of processor cores gives you the number of processes that can be run at the same time. This can be fully utilized if your system uses multi-processing and multi-threading paradigms.

Saturday, April 24, 2010

Using PHP for Multi-Processing and Pseudo Threading

I have seen people say that PHP cannot DO everything that other programming languages like C, Perl, Python etc can do. Yes, it is correct that it does not have FEATURES that like data persistence, shared-memory and most especially, multi-threading. But those features that it lacks comes with a benefit like prevention of memory leaks etc. So, what I do believe is that you can achieve in other languages can be achieved by PHP as well. I am a strong believer of the saying "It's not the language but how you write it".