Monday, July 28, 2008

Basics of Computers - The elements of decision

Computers, at their very essential, are machines that have to make a decision. A choice between one logical path, item or object and another. Or none. If you have invented ways to store values and even letters of the alphabet, there has to be a way to access it, a system of repeatable addresses. Addresses must be based on a number system and when you start to see addresses at the machine level you will see things like this d50e:1b45 - now is that a number of something quite unpronouncible?

It is neither, and both. It is representative of a number, but using a number system that may seem unfamiliar, at first.

We think in Base 10, or Decimal. Why? When you consider the relative advantages of number systems, the old folk had it better with dozens, pence to the shilling, and most things came in dozens, e.g. eggs.

Base 12 has stronger mathematical advantages as it has more factors. 3 times 4, 2 times 6 and 1 times 12 all make 12. In other words: (1,2,3,4,6,12) is a list of the factors of 12. (1,2,5,10) is the same thing for 10. What about 16? (1,2,4,8,16] are the factors. What can you see with the factors of 16? They keep doubling. It is the only regular progression of factors until we hit, you guessed it, a multiple of 16, that all too familiar computer number 256. What about 256 ^ 2? Or 256 ^ 16?

All are rich with factors, but 16 is high enough for addressing memory. And that is what this number set is - hexadecimal: 0 1 2 3 4 5 6 7 8 9 A B C D E F representing the base 16 values equivalent to Base 10: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15, respectively.

A number like ab5e is: (10 x 16^3) + (11 x 16^2) + (5 x 16^1) + (15 * 16^0)

It's decimal equivalent is derived in the same way that eleven millions, two hundred thousand is derived from: 11,200,000, or: (1 x 10^7) + (1 x 10^6) + (2 x 10^5)

The decimal equivalent of 0b5e is: ( 11 x 256 ) + ( 5 x 16 ) + ( 15 )
or, 40960 + 2816 + 80 + 15 = 43,870

As you may gather a memory address like d600e500 is a very large number. Hexadecimal is useful for expressing very large numbers in a compact form.

Consider the hex word like 0xffff. It's a nice and compact way of saying what 65535 says in decimal. The 0x means what follows is hexadecimal, usually called "hex".

0xffff = (15 * 16^3) + (15 * 16^2) + (15 * 16) + (15) = 65535.

So what is ffffffff?

And what is "binary"? What possible use is base two, consider the hex: 0xfefd - in binary it looks like this - (each 4 bit group is called a nibble) looks like this:

1111 1110 1111 1100

Put that into a binary stream, and you can see how hard it is to work with it.

1111 1110 1111 1100 1111 1110 1111 1100 1111 1110 1111 1100 1111 1110 1111 1100 1111 1110 1111 1100 1111 1100 1111 1110 1111 1100 1111 1100 1111 1110 1111 1100

If you lose sync in this stream, you have no idea what the value is. Remember - the space between the bit groups do not exist.

If we however condense the binary bits into bytes (8 bit chunks) we can shorten this down to:

0xfefd 0xfefd 0xfefd 0xfefd 0xfefd

0x followed by 4 hex characters is representative of two bytes, it may represent a value or simple address simply by loading it with its binary value.

Binary is simple - on or off. The only two states that electricity knows. Represents zero or one. 0 or 1.

What a computer's bare bones has to work with, a choice. The decision is going to be based on values (switches) in the programme. The programme will swap values (bytes) in memory via the CPU's registers, it will know what location in memory these bytes are to be written into by the values in its address bus.

Some devices on the address bus are PCI devices and some are IDE. Memory is made available to these devices via the address bus. The CPU sees them as objects in the computer's memory.

Saturday, July 26, 2008

The Dr Horrible effect



By linking to videos like this and it's website - and writing something about it in my blog, in this case sfsw-tips. Dr Horrible is an example of what I see becoming a new stream and an important platform for all sorts of well branded web art delivery. The DivX format has completely come of age. This tip sheet is saying the new format is a superior web delivery mechanism for video, though Flash is okay, DivX is capable of web movie delivery using DivX compression. And here it is - peaking in its first hours or release to be featured on google's rather revealing "trends" website. Want to know more about Trends - check the sfsw newsletter. Blogs all available from the Weblogs menu bar of sfsw.net.

Saturday, June 28, 2008

Achieving growth in site visits

There are several proven methods of increasing site visit growth. The most important of which is to get the branding clear and clean. To make the site work in a way that people expect it to work then natural feel of the interface does not interupt their own work flow.

The website must be clear and concise. It must say something well, not a whole lot of things unclearly. The English must be good which adds huge value to English graduates and artists in general.

These are hard times, the message can not be cluttered. My own home page is a case in point. Why have three columns to say what can be better expressed in one? If three columns are visually simpler to sort out your content (like classified advertising) then well and good. But if it is a random organisation then it is probably not the correct layout.

Well organised systems require well organised thinking. This means keeping stress levels inexcessive. The same goes for any serious thinking career. Constant stress may sharpen our resolve to succeed but it don't help with the needs of an effective brain.

Thursday, June 12, 2008

RHEL 5 links

Recently had an issue with Red Hat Enterprise Linux 5 - installing the php language modules. Got into a right old mess which ended up with a broken php on a webserver. It was only a development server, so did not stay up all night - but sometimes the light of day brings about more clarity.

In this case it did. These links helped find the solution and like most solutions it was the simple one that worked. Trying to recompile the PHP modules was not working as it was only filling in part of the picture.

Here are the references:

Forums

Cyberciti

The actual procedure that saved my server was to ensure that all libraries for php were removed. My new install was not working due to a non-removed out of synch php-gd

RPM erase php php-gd php-mysql

then to install the lot using yum

yum install php php-mysql php-gd

and it all came back to life.

Friday, May 30, 2008

503 valid RCPT command must precede DATA.

A router in between your mail client (Outlook, Thunderbird) can not see who is sending. This is usually as the mail client does not have your credentials loaded correctly, a connected router device propbably objects because it wants to say who the email is sending from.

One solution is to receive mail before you send it - this usually lets connected routers know who you are, so when you are sending mail the channel with the sendmail programme is established.

Mail authentication may also help.

See http://forums.westnic.net/archive/index.php?t-72.html

Saturday, March 08, 2008

List of Microsoft codenames - Wikipedia, the free encyclopedia

List of Microsoft codenames - Wikipedia, the free encyclopedia

Not really useful dept. unless you are a geek.

A list of all the codenames of Microsoft software projects. Some of their names are very funny, indeed. The never released .Net module "Hailstorm" sounds interesting. But unpublished code is not usually interesting, but damaged or incomplete.

Good code is generally written quite quickly as simple ideas are far more powerful than busy complex ones which eventually break. Simple ideas do not break.

Saturday, March 01, 2008

Online Privacy

There are more than one class of "privacy".

Software "privacy" - i.e. the ability of software to securely recognize where you normally login in from - denying this defeats much progress. It is not just marketing collection or accumulation, but workability that may be derived from IP addresses. In fact, as a "measure" of validation, software may prevent phishing, violation and ad brokers from illicitly targeting.

Over emphasize paranoia, and anonymize too much, and software starts to reveal far more about you.

Legal Privacy - now this one matters. If the Government can imprison you based on your IP address then you best anonymize it. Like anyone who wants to declare things against their taxes who morally should not, there are bits of law that protect you. If you rob a bank after showing your drivers license on their security video, you are asking for your privacy to be violated.

False accusations and invasion - Google is less likely to target individuals than Governments. If the USA accepts homeland security, why worry about who knows what you do on the internet?

Monday, November 05, 2007

Open Social

Google have released an API for Open Social. We are now integrating social functionality into applications using this API.

Tuesday, October 30, 2007

Net Writing | Writing and SEO tips for Bloggers

Net Writing | Writing and SEO tips for Bloggers

Great blog with some hot tips for you to burn your keyboard fingers on... but before you send another email and burn with embarrassment when you realise some of the classic mistakes we all make could affect - even your future. Read it here - click will open a fresh window .

Whereas the web has its own history site (the wayback engine at www.archive.org) some of the emails we used to write we believe are extinct when we delete them from our mailbox. Nothing is further from the truth. Everything that passes through the web is recorded somewhere. Probably forever. Every deleted email is part of digital history. And there is nothing anyone can do to stop that - it is the only direct personal->public medium that has ever been available. You do not have to produce a hit everyday to be a hit, but you do have to continue to produce content.

Content that really speaks about the subject matter of your site. Nothing else.

Thursday, October 04, 2007

StopBadware.org

StopBadware.org maintain a list of 230,000 (today's count) sites that contain or have been reported to distribute "badware" (spyware, phishing attempts, etc). If you really need to check a site to see if it is known to spread viruses, you can at the clearing house.

Thursday, September 27, 2007

Faster mail

If you want near instant mail delivery, host a domain with sfsw.net

We will give you a free POP mail box for the name info@ for you to use on your website, e.g. info@yourdoman.com - while the domain is kept renewed with us, we will host it for you. If you set it up correctly it can normally provide very fast email services in the UK and Europe, and of course the USA.

Sometimes your local ISP is so busy it may delay mail delivery so it is useful to have a spare channel, dedicated to a new web product. So, sfsw.net provides you with a low-cost entry to our services, buy a domain and try out our email for no extra. You can host your website with us or elsewhere, your choice.

Monday, September 24, 2007

SEO links

http://www.smithfam.com/ts.html

http://www.startranking.com/?PageId=10018

http://www.smithfam.com/news/may00f.html

Sunday, September 23, 2007

Web Marketing and Web Promotion

Web Marketing and Web Promotion: "# Does your website have text? Some sites are simply pretty pictures and snazzy graphics, but without text 'GoogleFood' you're SUNK. Put the right text in there so your customers will find you! # What is your Link Popularity? Do other websites point to you? How can you learn what your link popularity is? How can you improve it? Why is it important to Google? # Are you using Keywords and Metatags correctly? You probably know by now that 'keywords' and 'metadata' are important concepts to understand and use, but did you know you can get penalized, even DROPPED from search engines for using them incorrectly? Learn how to create metatags that drive TARGETED traffic to your website. # Do you have enough pages? A common problem with websites is that you don't have enough pages to promote. Learn how to easily discover content to build your page numbers. # Does your website have HELPFUL content? Search engines were designed to organize and categorize USEFUL CONTENT on the web. Educated visitors buy more. Learn how to educate your customers and they will buy, buy, buy! # Is your website designed correctly? Many websites built from scratch or from templates are brimming with CODING NO-NOs that could prevent your website from even being 'spidered' by search engines! Learn what to avoid and how to correct your mistakes! # Is your website laid "

Webpromotion - Search Engine Optimization, Pay For Performance, Top Listings

Check out the pricing for leading SEO campaigns

Webpromotion - Search Engine Optimization, Pay For Performance, Top Listings

Thursday, September 20, 2007

Google page rankings

Monday, October 16, 2006

Friday, December 30, 2005

http://www.milliondollarhomepage.com/

Wednesday, November 30, 2005

Adding more disk space to a Logical Volume set



Pros and cons

In Fedora Core 2 (and some other distributions) disks are split into partitions and spindles, so if you have two disks you will have (at least) two partitions with mount points - maybe one on /home, one on /. So installing onto two identical 40Gb disks gives me a /home filesystem of 40Gb, and a / (everything else) filesystem of 40Gb.

And if you run short of space on one of these filesystems, you will need to add another spindle and create a mount point - for example you might put in another 40Gb and mount on /home2. See the first post in this thread for instructions on how to do this.

However, if you run Fedora Core 3 or 4, the disk(s) used in the install will not be present on your system as individual spindles, but will have been merged into a volume group. So in the example above, you would see one mounted filesystem on / with a free space of 80Gb. This has advantages as follows:

1. You cannot run out of space on one filesystem, all free space is available across all the filesystem.
2. Physical disk sizes are hidden from the Linux OS and become irrelevant, even if more space is added.
3. There are possibilities for software raid/stripe/mirror etc. even if your IDE controller doesn't support it.

But the disadvantage is obvious. Like a striped raid system one disk failure will kill the whole thing, and ruin any data on it. The older method is not necessarily prone to this, if I put all my MP3 files on a disk mounted on /mp3, then if I lose the operating system disk, I can remove the MP3 disk with data integrity intact and put it into another machine for access to the data.

So think carefully before choosing how to add space to your machine, and use the method appropriate to your needs. FC3 and FC4 use volume groups as default, there is nothing stopping you from using an old-fashioned filesystem mount

In some circumstances, it IS appropriate to add space to a logical volume for convenience. If this is the case for you, follow these instructions.

Step 1: Hardware installation

Shutdown the machine.
Add the disk as normal (in hardware terms)
Update BIOS and make sure the machine sees the disk.
Reboot the machine.

The first thing you'll notice is that Fedora does not prompt you that a new disk has been added. Kudzu, the tool which checks for hardware changes, ignores HDDs. So we'll have to do it manually. Trust me, it doesn't take long.

Open a shell and su to root.

Step 2: Add the new disk to the existing volume group

In my example I have an existing volume group, and want to add a 60Gb disk to it. The disk has been installed as Primary IDE channel slave (or /dev/hdb in Linux terms).

Type in

lvm

You are now in the logical volume manager.
To see the status of your logical volumes, type in

vgs

You will get a display of current volume groups. The default volume group is called VolGroup00 - it is the first entry on the "vgs" output. I'm using the default for the rest of this example.

Sample:
Code:

lvm> vgs VG #PV #LV #SN Attr VSize VFree VolGroup00 1 2 0 wz--n 372.50G 32.00M



To add my new disk, I first need to add it as a physical volume, type in

pvcreate /dev/hdb

This adds the disk /dev/hdb to the list of the available volumes.

Now add the physical volume to the volume group, type in

vgextend VolGroup00 /dev/hdb

Check it is all OK so far, type in

vgs

Compare with the output from the first time you ran this command. The number of physical volumes (#PV) should have increased by one, and the volume group free space (VFree) should be about equivalent to the size of the disk you just added.

Sample:
Code:

lvm> vgs VG #PV #LV #SN Attr VSize VFree VolGroup00 2 2 0 wz--n 428.41G 55.94G



The last step within lvm is to resize the volume group to utilise the free space you just added - in my example 55.94 Gigabytes. I'm going to round down to 55Gb for convenience.

Type in

lvextend -L +55G /dev/VolGroup00/LogVol00 /dev/hdb

You will receive a message stating that the resize is successful, use the vgs command to check. The free space in the volume group (VFree) should have decreased.

OK so now the thing is resized, how do you get access to the space? df will show you the same free space as you had before.

Reboot the machine with the Fedora Install CD in the drive. When the CD boots type in

linux rescue

Choose your keyboard and language !!skip!! filesystem mounts. This will not mount anything, or boot your installation.

You are now at a root command prompt.
First mount the volume group, type in

lvm vgchange -a y VolGroup00

Now mount the volume in the group, type in

lvm lvchange -a y /dev/VolGroup00/LogVol00

Check the volume before resizing (mandatory!)

e2fsck -f /dev/VolGroup00/LogVol00

Now resize the volume to use all available space, type in

resize2fs /dev/VolGroup00/LogVol00

Reboot without the CD when the command exits and enjoy the extra bytes!

TESTED ON FEDORA CORE 4 UNDER AMD64. USE AT YOUR OWN RISK. E&OE