31 March, 2008

10 reasons why PCs crash

Fatal error: the system has become unstable or is busy," it says. "Enter to return to Windows or press Control-Alt-Delete to restart your computer. If you do this you will lose any unsaved information in all open applications."

You have just been struck by the Blue Screen of Death. Anyone who uses Mcft Windows will be familiar with this. What can you do? More importantly, how can you prevent it happening?

1 Hardware conflict

The number one reason why Windows crashes is hardware conflict. Each hardware device communicates to other devices through an interrupt request channel (IRQ). These are supposed to be unique for each device.

For example, a printer usually connects internally on IRQ 7. The keyboard usually uses IRQ 1 and the floppy disk drive IRQ 6. Each device will try to hog a single IRQ for itself.

If there are a lot of devices, or if they are not installed properly, two of them may end up sharing the same IRQ number. When the user tries to use both devices at the same time, a crash can happen. The way to check if your computer has a hardware conflict is through the following route:

* Start-Settings-Control Panel-System-Device Manager.

Often if a device has a problem a yellow '!' appears next to its description in the Device Manager. Highlight Computer (in the Device Manager) and press Properties to see the IRQ numbers used by your computer. If the IRQ number appears twice, two devices may be using it.

Sometimes a device might share an IRQ with something described as 'IRQ holder for PCI steering'. This can be ignored. The best way to fix this problem is to remove the problem device and reinstall it.

Sometimes you may have to find more recent drivers on the internet to make the device function properly. A good resource is www.driverguide.com. If the device is a soundcard, or a modem, it can often be fixed by moving it to a different slot on the motherboard (be careful about opening your computer, as you may void the warranty).

When working inside a computer you should switch it off, unplug the mains lead and touch an unpainted metal surface to discharge any static electricity.

To be fair to Mcft, the problem with IRQ numbers is not of its making. It is a legacy problem going back to the first PC designs using the IBM 8086 chip. Initially there were only eight IRQs. Today there are 16 IRQs in a PC. It is easy to run out of them. There are plans to increase the number of IRQs in future designs.

2 Bad Ram

Ram (random-access memory) problems might bring on the blue screen of death with a message saying Fatal Exception Error. A fatal error indicates a serious hardware problem. Sometimes it may mean a part is damaged and will need replacing.

But a fatal error caused by Ram might be caused by a mismatch of chips. For example, mixing 70-nanosecond (70ns) Ram with 60ns Ram will usually force the computer to run all the Ram at the slower speed. This will often crash the machine if the Ram is overworked.

One way around this problem is to enter the BIOS settings and increase the wait state of the Ram. This can make it more stable. Another way to troubleshoot a suspected Ram problem is to rearrange the Ram chips on the motherboard, or take some of them out. Then try to repeat the circumstances that caused the crash. When handling Ram try not to touch the gold connections, as they can be easily damaged.

Parity error messages also refer to Ram. Modern Ram chips are either parity (ECC) or non parity (non-ECC). It is best not to mix the two types, as this can be a cause of trouble.

EMM386 error messages refer to memory problems but may not be connected to bad Ram. This may be due to free memory problems often linked to old Dos-based programmes.

3 BIOS settings

Every motherboard is supplied with a range of chipset settings that are decided in the factory. A common way to access these settings is to press the F2 or delete button during the first few seconds of a boot-up.

Once inside the BIOS, great care should be taken. It is a good idea to write down on a piece of paper all the settings that appear on the screen. That way, if you change something and the computer becomes more unstable, you will know what settings to revert to.

A common BIOS error concerns the CAS latency. This refers to the Ram. Older EDO (extended data out) Ram has a CAS latency of 3. Newer SDRam has a CAS latency of 2. Setting the wrong figure can cause the Ram to lock up and freeze the computer's display.

Mcft Windows is better at allocating IRQ numbers than any BIOS. If possible set the IRQ numbers to Auto in the BIOS. This will allow Windows to allocate the IRQ numbers (make sure the BIOS setting for Plug and Play OS is switched to 'yes' to allow Windows to do this.).

4 Hard disk drives

After a few weeks, the information on a hard disk drive starts to become piecemeal or fragmented. It is a good idea to defragment the hard disk every week or so, to prevent the disk from causing a screen freeze. Go to

* Start-Programs-Accessories-System Tools-Disk Defragmenter

This will start the procedure. You will be unable to write data to the hard drive (to save it) while the disk is defragmenting, so it is a good idea to schedule the procedure for a period of inactivity using the Task Scheduler.

The Task Scheduler should be one of the small icons on the bottom right of the Windows opening page (the desktop).

Some lockups and screen freezes caused by hard disk problems can be solved by reducing the read-ahead optimisation. This can be adjusted by going to

* Start-Settings-Control Panel-System Icon-Performance-File System-Hard Disk.

Hard disks will slow down and crash if they are too full. Do some housekeeping on your hard drive every few months and free some space on it. Open the Windows folder on the C drive and find the Temporary Internet Files folder. Deleting the contents (not the folder) can free a lot of space.

Empty the Recycle Bin every week to free more space. Hard disk drives should be scanned every week for errors or bad sectors. Go to

* Start-Programs-Accessories-System Tools-ScanDisk

Otherwise assign the Task Scheduler to perform this operation at night when the computer is not in use.

5 Fatal OE exceptions and VXD errors

Fatal OE exception errors and VXD errors are often caused by video card problems.

These can often be resolved easily by reducing the resolution of the video display. Go to

* Start-Settings-Control Panel-Display-Settings

Here you should slide the screen area bar to the left. Take a look at the colour settings on the left of that window. For most desktops, high colour 16-bit depth is adequate.

If the screen freezes or you experience system lockups it might be due to the video card. Make sure it does not have a hardware conflict. Go to

* Start-Settings-Control Panel-System-Device Manager

Here, select the + beside Display Adapter. A line of text describing your video card should appear. Select it (make it blue) and press properties. Then select Resources and select each line in the window. Look for a message that says No Conflicts.

If you have video card hardware conflict, you will see it here. Be careful at this point and make a note of everything you do in case you make things worse.

The way to resolve a hardware conflict is to uncheck the Use Automatic Settings box and hit the Change Settings button. You are searching for a setting that will display a No Conflicts message.

Another useful way to resolve video problems is to go to

* Start-Settings-Control Panel-System-Performance-Graphics

Here you should move the Hardware Acceleration slider to the left. As ever, the most common cause of problems relating to graphics cards is old or faulty drivers (a driver is a small piece of software used by a computer to communicate with a device).

Look up your video card's manufacturer on the internet and search for the most recent drivers for it.

6 Viruses

Often the first sign of a virus infection is instability. Some viruses erase the boot sector of a hard drive, making it impossible to start. This is why it is a good idea to create a Windows start-up disk. Go to

* Start-Settings-Control Panel-Add/Remove Programs

Here, look for the Start Up Disk tab. Virus protection requires constant vigilance.

A virus scanner requires a list of virus signatures in order to be able to identify viruses. These signatures are stored in a DAT file. DAT files should be updated weekly from the website of your antivirus software manufacturer.

An excellent antivirus programme is McAfee VirusScan by Network Associates ( www.nai.com). Another is Norton AntiVirus 2000, made by Symantec ( www.symantec.com).

7 Printers

The action of sending a document to print creates a bigger file, often called a postscript file.

Printers have only a small amount of memory, called a buffer. This can be easily overloaded. Printing a document also uses a considerable amount of CPU power. This will also slow down the computer's performance.

If the printer is trying to print unusual characters, these might not be recognised, and can crash the computer. Sometimes printers will not recover from a crash because of confusion in the buffer. A good way to clear the buffer is to unplug the printer for ten seconds. Booting up from a powerless state, also called a cold boot, will restore the printer's default settings and you may be able to carry on.

8 Software

A common cause of computer crash is faulty or badly-installed software. Often the problem can be cured by uninstalling the software and then reinstalling it. Use Norton Uninstall or Uninstall Shield to remove an application from your system properly. This will also remove references to the programme in the System Registry and leaves the way clear for a completely fresh copy.

The System Registry can be corrupted by old references to obsolete software that you thought was uninstalled. Use Reg Cleaner by Jouni Vuorio to clean up the System Registry and remove obsolete entries. It works on Windows 95, Windows 98, Windows 98 SE (Second Edition), Windows Millennium Edition (ME), NT4 and Windows 2000.

Read the instructions and use it carefully so you don't do permanent damage to the Registry. If the Registry is damaged you will have to reinstall your operating system. Reg Cleaner can be obtained from www.jv16.org

Often a Windows problem can be resolved by entering Safe Mode. This can be done during start-up. When you see the message "Starting Windows" press F4. This should take you into Safe Mode.

Safe Mode loads a minimum of drivers. It allows you to find and fix problems that prevent Windows from loading properly.

Sometimes installing Windows is difficult because of unsuitable BIOS settings. If you keep getting SUWIN error messages (Windows setup) during the Windows installation, then try entering the BIOS and disabling the CPU internal cache. Try to disable the Level 2 (L2) cache if that doesn't work.

Remember to restore all the BIOS settings back to their former settings following installation.

9 Overheating

Central processing units (CPUs) are usually equipped with fans to keep them cool. If the fan fails or if the CPU gets old it may start to overheat and generate a particular kind of error called a kernel error. This is a common problem in chips that have been overclocked to operate at higher speeds than they are supposed to.

One remedy is to get a bigger better fan and install it on top of the CPU. Specialist cooling fans/heatsinks are available from www.computernerd.com or www.coolit.com

CPU problems can often be fixed by disabling the CPU internal cache in the BIOS. This will make the machine run more slowly, but it should also be more stable.

10 Power supply problems

With all the new construction going on around the country the steady supply of electricity has become disrupted. A power surge or spike can crash a computer as easily as a power cut.

If this has become a nuisance for you then consider buying a uninterrupted power supply (UPS). This will give you a clean power supply when there is electricity, and it will give you a few minutes to perform a controlled shutdown in case of a power cut.

It is a good investment if your data are critical, because a power cut will cause any unsaved data to be lost.

A Guide to Internet Security: Becoming an Uebercracker

This is a paper will be broken into two parts, one showing 15 easy steps
to becoming a uebercracker and the next part showing how to become a
ueberadmin and how to stop a uebercracker. A uebercracker is a term phrased
by Dan Farmer to refer to some elite (cr/h)acker that is practically
impossible to keep out of the networks.

Here's the steps to becoming a uebercracker.

Step 1. Relax and remain calm. Remember YOU are a Uebercracker.

Step 2. If you know a little Unix, you are way ahead of the crowd and skip
past step 3.

Step 3. You may want to buy Unix manual or book to let you know what
ls,cd,cat does.

Step 4. Read Usenet for the following groups: alt.irc, alt.security,
comp.security.unix. Subscribe to Phrack@well.sf.ca.us to get a background
in uebercracker culture.

Step 5. Ask on alt.irc how to get and compile the latest IRC client and
connect to IRC.

Step 6. Once on IRC, join the #hack channel. (Whew, you are half-way
there!)

Step 7. Now, sit on #hack and send messages to everyone in the channel
saying "Hi, Whats up?". Be obnoxious to anyone else that joins and asks
questions like "Why cant I join #warez?"

Step 8. (Important Step) Send private messages to everyone asking for new
bugs or holes. Here's a good pointer, look around your system for binary
programs suid root (look in Unix manual from step 3 if confused). After
finding a suid root binary, (ie. su, chfn, syslog), tell people you have a
new bug in that program and you wrote a script for it. If they ask how it
works, tell them they are "layme". Remember, YOU are a UeberCracker. Ask
them to trade for their get-root scripts.

Step 9. Make them send you some scripts before you send some garbage file
(ie. a big core file). Tell them it is encrypted or it was messed up and
you need to upload your script again.

Step 10. Spend a week grabbing all the scripts you can. (Dont forget to be
obnoxious on #hack otherwise people will look down on you and not give you
anything.)

Step 11. Hopefully you will now have atleast one or two scripts that get
you root on most Unixes. Grab root on your local machines, read your
admin's mail, or even other user's mail, even rm log files and whatever
temps you. (look in Unix manual from step 3 if confused).

Step 12. A good test for true uebercrackerness is to be able to fake mail.
Ask other uebercrackers how to fake mail (because they have had to pass the
same test). Email your admin how "layme" he is and how you got root and how
you erased his files, and have it appear coming from satan@evil.com.

Step 13. Now, to pass into supreme eliteness of uebercrackerness, you brag
about your exploits on #hack to everyone. (Make up stuff, Remember, YOU are
a uebercracker.)

Step 14. Wait a few months and have all your notes, etc ready in your room
for when the FBI, Secret Service, and other law enforcement agencies
confinscate your equipment. Call eff.org to complain how you were innocent
and how you accidently gotten someone else's account and only looked
because you were curious. (Whatever else that may help, throw at them.)

Step 15. Now for the true final supreme eliteness of all uebercrackers, you
go back to #hack and brag about how you were busted. YOU are finally a
true Uebercracker.


Now the next part of the paper is top secret. Please only pass to trusted
administrators and friends and even some trusted mailing lists, Usenet
groups, etc. (Make sure no one who is NOT in the inner circle of security
gets this.)

This is broken down on How to Become an UeberAdmin (otherwise know as a
security expert) and How to stop Uebercrackers.

Step 1. Read Unix manual ( a good idea for admins ).

Step 2. Very Important. chmod 700 rdist; chmod 644 /etc/utmp. Install
sendmail 8.6.4. You have probably stopped 60 percent of all Uebercrackers
now. Rdist scripts is among the favorites for getting root by
uebercrackers.

Step 3. Okay, maybe you want to actually secure your machine from the
elite Uebercrackers who can break into any site on Internet.

Step 4. Set up your firewall to block rpc/nfs/ip-forwarding/src routing
packets. (This only applies to advanced admins who have control of the
router, but this will stop 90% of all uebercrackers from attempting your
site.)

Step 5. Apply all CERT and vendor patches to all of your machines. You have
just now killed 95% of all uebercrackers.

Step 6. Run a good password cracker to find open accounts and close them.
Run tripwire after making sure your binaries are untouched. Run tcp_wrapper
to find if a uebercracker is knocking on your machines. Run ISS to make
sure that all your machines are reasonably secure as far as remote
configuration (ie. your NFS exports and anon FTP site.)

Step 7. If you have done all of the following, you will have stopped 99%
of all uebercrackers. Congrads! (Remember, You are the admin.)

Step 8. Now there is one percent of uebercrackers that have gained
knowledge from reading some security expert's mail (probably gained access
to his mail via NFS exports or the guest account. You know how it is, like
the mechanic that always has a broken car, or the plumber that has the
broken sink, the security expert usually has an open machine.)

Step 9. Here is the hard part is to try to convince these security experts
that they are not so above the average citizen and that by now giving out
their unknown (except for the uebercrackers) security bugs, it would be a
service to Internet. They do not have to post it on Usenet, but share
among many other trusted people and hopefully fixes will come about and
new pressure will be applied to vendors to come out with patches.

Step 10. If you have gained the confidence of enough security experts,
you will know be a looked upto as an elite security administrator that is
able to stop most uebercrackers. The final true test for being a ueberadmin
is to compile a IRC client, go onto #hack and log all the bragging and
help catch the uebercrackers. If a uebercracker does get into your system,
and he has used a new method you have never seen, you can probably tell
your other security admins and get half of the replies like - "That bug
been known for years, there just isn't any patches for it yet. Here's my
fix." and the other half of the replies will be like - "Wow. That is very
impressive. You have just moved up a big notch in my security circle."
VERY IMPORTANT HERE: If you see anyone in Usenet's security newsgroups
mention anything about that security hole, Flame him for discussing it
since it could bring down Internet and all Uebercrackers will now have it
and the million other reasons to keep everything secret about security.


Well, this paper has shown the finer details of security on Internet. It has
shown both sides of the coin. Three points I would like to make that would
probably clean up most of the security problems on Internet are as the
following:

1. Vendors need to make security a little higher than zero in priority.
If most vendors shipped their Unixes already secure with most known bugs
that have been floating around since the Internet Worm (6 years ago) fixed
and patched, then most uebercrackers would be stuck as new machines get
added to Internet. (I believe Uebercracker is german for "lame copy-cat
that can get root with 3 year old bugs.") An interesting note is that
if you probably check the mail alias for "security@vendor.com", you will
find it points to /dev/null. Maybe with enough mail, it will overfill
/dev/null. (Look in manual if confused.)

2. Security experts giving up the attitude that they are above the normal
Internet user and try to give out information that could lead to pressure
by other admins to vendors to come out with fixes and patches. Most
security experts probably don't realize how far their information has
already spread.

3. And probably one of the more important points is just following the
steps I have outlined for Stopping a Uebercracker.


Resources for Security:
Many security advisories are available from anonymous ftp cert.org.
Ask archie to find tcp_wrapper, security programs. For more information
about ISS (Internet Security Scanner), email cklaus@shadow.net.

30 March, 2008

How to build your very own PC !!

Introduction

In this tutorial I will try an
teach you how to successfully build your own computer! There are many benefits
to building your own computer.


  1. You get hand's on experience learning how a computer works
  2. Its a hell of alot less expensive then buying one from a retailer
  3. Its a hell of alot more reliable than buying one from a retailer being that
    you hand select QUALITY parts and put it togethor yourself.
  4. You can do your own tech support no more relying on stupid Best Buy Tech's
    that don't know the difference between their ass and a hard disk jumper (don't
    worry I'll tell you what those are later)

Section #1 (What Your Going To Need)


Here we will discuss a list of the parts you need and the best place to
purchase them. If you want the best
prices on computer hardware you will
definitly want to look online. Unfortunatly (and for some of you very
fortunatly
if you know what I mean) this requires the use of a credit card.
Below is a general list of the devices you will
need...


  1. A Computer Case (Something To Put All The Computer Parts Togethor In)

    • Should only run you about 50 dollars
    • Beware the cheap ones with cheap power supplies they will die in a year

  2. A Mother Board (Everything Will Be Plugged Into The Mother Board)
  3. A Floppy Drive and a CDROM (Should Be Obvious)
  4. A Hard Disk (Come In Many Different Flavors and Quality Levels, Stores All
    The Information In Your Computer)
  5. A Video Card (Cheap Stuff, Its What Your Monitor Plugs Into)
  6. IDE Controller Ribbon
  7. Miscellaneous Accessories

Next we'll take a look at many of the different options you have when buying
these pieces of equipment. Your choice
may vary depending on which Operating
Systems you plan on running.


Section #2 (Which Brand And Model Should I
Buy?)


We'll lets start with your computer case and move all the way down to
Miscellaneous Accessories..


1. Computer Case


You will most certainly need an ATX style case with a quality power supply.
How do you tell? Well if the case
is only 15-20 bucks theres a pretty good
chance its a crappy power supply.


2. A Mother Board


I suggest a quality ASUS (ATX style to match your computer case) mother board
its up to you ask your friends.
I've had bad experiences personally with
FIC
mother boards.


3. A Floppy Drive and CDROM


Pretty inexpensive stuff, i'd suggest a Sony Floppy drive and a generic
CDROM. Doesn't make too much a difference if your
concerned about getting the
best price.


4. Hard Disks

Gets alittle tricky. If you want reliability,
high speed transfers, and are willing to run Windows I suggest a Western
Digital
or a Seagate ULTRA DMA-66. If your not to concerned with speed and
want to run a server with Unix i'd go with a Fujitsu or
a Western Digital.
Their farely inexpensive but only transfer in 33 megabit bursts as apposed to
the DMA-66 which transfer
in 33 megabit bursts. I don't believe Unix
currently supports ULTRA DMA-66, but don't quote me on that. Now there's an even
faster
transfer rate available via SCSI Hard Disk Controllers, but i'm not
about to go into setting up SCSI controllers in this tutorial.
For now we
will stick with IDE Hard Disk controllers.


5. Video Cards


Video cards are cheap and if your not a gamer a plain ole gener Cirrus Logic
or STB video card will do fine.


6. IDE Controller Ribbon


You'll need 2 different kinds of IDE Ribbon 2 40 pins for your CDROM and Hard
Disk and Another with less pins for your floppy.
You can buy these at any
local computer store or order them off the web.


7. Miscellaneous Stuff


You may be interested in adding a sound card, ethernet card, and/or 3DFX card
to your system. These are relatively easy to do and
I will explain how to add
card's to your mother board later.


Section #3 (Where do I buy all this crap!?)


Well if your looking for the best prices online for computer hardware (and
this is my unbiast opinion) i'd suggest going to
http://www.pricewatch.com
again ask your friends maybe they know a better place. Pricewatch.com researchs
the best prices
on computer hardware.


Section #4 (Lets Assemble!)


This next part is very important so read carefully...



  1. First things first get yourself a clean desk to work on.



  2. Place your ATX stlye computer case on the desk and slide/lift the top off.
    Inside should be a bunch of wires coming out
    of the power supply in the back
    and a bunch of wires coming out near the face of the box.



  3. The next thing your going to want to do is place your mother board inside the
    case and fasten it in. Their might be
    metal coverings covering the holes in
    the computer case were the parralel ports and serial ports on the mother
    board
    should poke through, go ahead and poke those out with a screw drive so
    you can fit the mother board in snuggly. Every
    Case fastens mother boards in
    different ways. Some use plastic pegs, some use metal screws. It will hopefully
    be obvious
    which you have to use.



  4. #4 Once the mother board is mounted properly you will need to fasten the
    floppy drive, and cdrom into the computer case.
    All computer cases store
    floppy drives differently there maybe a slide out container that you screw them
    into. You'll
    have to make sure that the the floppy drive is right side up
    (duh!) and that the pins are facing towards the back of the
    computer.
    Installing the CDROM is pretty much the same in all computer cases. Some
    mounting rails should have come
    with your mother board. You need to fasten
    those to the sides of the CDROM and you should be able to slide it right
    in
    to one of the top bays.



  5. Insert your Video Card. There are presently about 3 differnet forms of slots
    on your mother board. PCI, ISA, and AGP.
    Video Cards are presently made for
    all 3 of them. AGP stands for "Accelrated Graphics Port" Video Cards made for
    this
    slot are generally more high tech/performance. PCI's work and so do ISA
    (Althoug ISA is more Old School). Gee how
    do I tell the difference? Well AGP
    slots more than likely is the only small, brown, slot on your mother board.
    PCI
    you probably have the most of these their white and little longer than
    AGP. ISA, these are longggg and black, ugly.
    Insert your Video Card and snug
    it in there firmly. Don't force it (duh).



  6. Time for that evil Hard Disk installation. We'll Hit hooking up the power
    supplies and Installing the Hard Disk at the
    same time just for fun. Insert
    the Hard Disk In a very much similar way to the way you inserted the floppy
    disk. But
    Before you do make sure that the jumper settings are correct on the
    back of Har Disk. Most hard disks are shipped in
    single mode, but if you want
    to run multiple hard disks (which we won't discuss) you need to set the jumpers
    differently.
    Jumpers are little metal prongs connected with little jumpers
    that complete a connection. You figure it out. Anyway
    you got your hard disk
    in now its time to hook up the power supplies. The hard disk and the CDROM have
    similar power supp
    lies. 3 or 4 prong. Hook those funny looking cords coming
    out of the back of the power supply into your CDROM and Hard
    Disk. Theres a
    smaller one that hooks into your floppy it should be obvious. Theres a big power
    supply (the biggest one
    in the lot usually made of white plastic) It fits
    into a slot on your mother board, it is the main power supply to your
    mother
    board. Its kind of tricky to get in so be careful.



  7. Now that you have your Power Supplies hooked up you'll need to connect your
    Periphrials to your Mother Board. Use the IDE
    Controller Ribbon I know you
    all have. Hey one end goes to your CDROM (make sure the red line on the ribbon
    "pin 1" is
    matched up with the first pin on the back of your CDROM) and the
    other end goes to your mother board (same deal). The
    same goes for your hard
    disk and yoru floppy. Figure it out its not that difficult. You'll know you did
    something wrong
    when you get a floppy disk fail on boot.



  8. Finishing touches. Don't forget to connect those nasty wires coming out from
    behind the face of your computer case to
    your mother board. They control the
    on, off, reset, hard disk activity, and power switch. Every mother board is
    different
    so i hope you have a manual with your mother board. Most specify
    with 2 or 3 character paraphrases that make no sense.
    For Example "PWR SWT" =
    Power Switch "RST SWT" = Reset Switch. Or even more vague than that.


Section #5 (Testing 1, 2, 3)


Ok your ready to give it a whirl, you'll need to get in your system bios. The
"DEL" key should usually get you in.
Get it to autodetect your hard disk.
Accept the Setting and Save your Configurations. Install Your OS and your ready
to go.
That easy!! Ha! you'll prolly have lots of trouble theres a million
resources online to help you. Get to it.

CD-ROM/CD-Rewritable Installation Guide

Table of Contents:

Intro
I.Supplies needed and costs
II.Steps before installation and preparation
III.The Installation of the CD-ROM drive
Adding a CD-ROM drive(Burner,DVD, or any CD-ROM)
Upgrading a existing CD-ROM
IV.Conclusion
V.Tools and Utilities
Contact Info


Intro

So you want to upgrade your CD-ROM drive or put in a cd burner without having to pay $50 to install it? or just want to install it on a machine that does not have one? Well you came to the right place. In this tutorial I will provide you with information on installing a new CD-ROM drive. And for more hardware installation guides visit Blacksun Research Facility.

I.Supplies needed and costs

Supplies you need will be:

A CD-ROM drive ($40-$300 depending on if its a Burner or DVD)
Phillips Screwdriver (Should have)
Needlenose Pliers (Should have)
Anti-static wrist strap(optional)


II.Steps before installation and preparation

Before you start digging around in your computer...you are going to want to get everything you need at hand. Clear a space on a desk or table and unplug your computer and carry the case where it is well lighted. Remove the screws holding the out shell of your case, and remove out shell. Now you should be able to see the motherboard and all the insides. So you know, the box in the top left with red, yellow, and black cables coming out is the power supply. At the end of those wires is a connecter with 4 pin holes. Then the ribbons you see are what transfer the data from the drive to the motherboard. Look at your existing setup and look how they connect to the floppy drive etc.

III.The Installation of the CD-ROM drive (Section A, Section B)

Follow the following sections on what tasks you want to accomplish.

Section A: If you are adding a CD-ROM drive(Burner,DVD, or any CD-ROM)
Section B: If you are upgrading a existing CD-ROM
Section A:Adding a CD-ROM drive(Burner,DVD, or any CD-ROM)

Remove the face plate cover on your tower where your CD-ROM will be taking its place.
Set the jumper on the back of your new CD_ROM drive to slave if not already set. If there is no diagram refer to manufacturers website for settings.
Slide the drive in to the open slot in your case. But do not screw in the screws yet because you might need to slide it around.
Once your drive is in place look at the IDE ribbon connected to your hard drive and see if there are any free connectors to plug in to your CD-ROM. If there are not use the IDE ribbon that came with the drive and connect it to the CD-ROM (Note:That ribbon is how your CD-ROM drive communicates with your Motherboard.
Connect the audio cable(small cable almost like phone cord and jack) to your CD-ROM drive then connect the other to your Audio card. If you cantfind your audio card look for a small black jack which would fit the connector.(Note:This is only nessary if you want sound from your CD-ROM.
Now its time to connect your power supply connector to your CD-ROM drive. It is a cord that has yellow black and red wires with a connector on the end.
Once everything is connected, screw the drive into place and close up the case and reboot. If your running Windows 98 it should recognize it right away.
Test it out to make sure its working. Install Drivers for the CD-ROM if any came with it.


Section B:Upgrading a existing CD-ROM

Remove the existing hard drive by disconnecting all the cables and power supply.
Set the jumper on the back of your new CD_ROM drive to the same settings on your old CD-ROM drive.
Slide the drive in to the open slot in your case. But do not screw in the screws yet because you might need to slide it around.
Once your drive is in place look at the IDE ribbon connected to your hard drive and see if there are any free connectors to plug in to your CD-ROM. If there are not use the IDE ribbon that came with the drive and connect it to the CD-ROM (Note : That ribbon is how your CD-ROM drive communicates with your Motherboard.
Connect the audio cable(small cable almost like phone cord and jack) to your CD-ROM drive then connect the other to your Audio card. If you cant find your audio card look for a small black jack which would fit the connector.(Note:This is only nessary if you want sound from your CD-ROM.
Now its time to connect your power supply connector to your CD-ROM drive. It is a cord that has yellow black and red wires with a connector on the end.
Once everything is connected, screw the drive into place and close up the case and reboot. If your running Windows 98 it should recognize it right away.
Test it out to make sure its working. Install Drivers for the CD-ROM if any came with it.
IV.Conclusion

Now you will be saving money by installing hardware by yourself without having to pay $60 a hour labor cost at a computing store. As you learn more about computers you will soon realize that you will save lots of money on repairs if you can do them yourself. So I hope you enjoyed this and I hope it was helpful. Feel free to email me your questions/comments/anger. Visit Blacksun.box.sk for more of my hardware tutorials.

V.Tools and Utilities

CD Burning Utilities, Drivers, and more
--(http://www.download.com)

Installing a Hard Drive


Table of Contents:

Intro
I.Supplies needed and costs
II.Steps before installation and preparation
III.The Installation of the HD
IV.CMOS Check
V.Tools and Utilities
VI.Conclusion
VII.Contact Info

Intro

So your old hard drive is acting up? or just too small? Well you came to the right place. In this tutorial I will provide you with information on installing a new hard drive in addition to your old hard drive, and tell you how to upgrade and existing hard drive. Please follow the tutorial step by step and read it all carefully or you could end up loosing all your existing data. So enjoy this tutorial from Blacksun.box.sk. And for more hardware installation guides visit Blacksun Research Facility.

I.Supplies needed and costs

Supplies you need will be:

A Hard drive ($50-$250 depending on size)
Phillips Screwdriver (Should have)
Needlenose Pliers (Should have)
Anti-static wrist strap(optional)
II.Steps before installation and preparation

Before you start digging around in your computer...you are going to want to get everything you need at hand. If you are starting clean and reinstalling a new version of windows you will want to have a formatted drive and a DOS boot disk. You can create a boot disk by getting a blank floppy and open My Computer then right click on (A:) and select format. Then select option "Copy System files" which then will create a disk for booting up in DOS prompt once you have fomatted your hard drive for Windows installation. If you have a existing drive that you want transfer your data to your new hard drive, you will want to get a DiskCopy utility from (www.powerquest.com). Also note that DISKCOPY and XCOPY will not copy hidden and system files. Once you have all disk backed up and ready to move, clear a space on a desk or table and unplug your computer and carry the case where it is well lighted. Remove the screws holding the out shell of your case, and remove out shell. Now you should be able to see the motherboard and all the insides. So you know, the box in the top left with red, yellow, and black cables coming out is the power supply. At the end of those wires is a connecter with 4 pin holes. Then the ribbons you see are what transfer the data from the drive to the motherboard. Look at your existing setup and look how they connect to the floppy drive etc.

III.The Installation of the HD

Ok. Now your ready to install the hard drive. If your replacing a existing drive look at the jumper settings on the back of your hard drive. Jumpers are what tell your computer what its purpose is. They are pins in sets of 2. They look like this :::[:]:: with ( :=pins and []=the jumper which slids on the pins. ) Once you find out what your existing drive's jumper settings are you then can set your new hard drives jumper settings to the same as the existing. Most drives have listed what the settings are but if they are not listed on the actual hard drive you should refer to the manufacturers website. Your new hard drive should be set on Master and if your just adding an additional hard drive set your old one to slave and new one to master. Now when putting in your new drive you are going to want to slide it in ussually below floppy drive or anywhere you have room. Once you have it slid in connect the power connector to the drive and the wide EIDE ribbon with the pink line on the right near the power connector. Once installation is complete of your hard drive, re-connect the cables and moniter and turn on the power.

IV.CMOS Check

On boot enter your PC's setup program(On boot it ussually shows you what key to press for system setup) and check the BIOS for drives 1 and 2 if you added an additional hard drive. Make sure both drives are set on AUTO so it can detect and set up correctly. Save and reboot.

V.Conclusion

Once windows is booted up check out the new drive and make sure it is working properly. If you added a drive reformat the old one so now you can prepare it for more data. I hope this helped you in the steps of installing or upgrading a new hard drive. If you have any suggestions or questions feel free to email me. More tutorials to come and soon a HTML version with picture references.

VI.Tools and Utilities

Disk Copy Utility
--(http://www.powerquest.com)

Title: Installing a Hard Drive


Table of Contents:

Intro
I.Supplies needed and costs
II.Steps before installation and preparation
III.The Installation of the HD
IV.CMOS Check
V.Tools and Utilities
VI.Conclusion
VII.Contact Info

Intro

So your old hard drive is acting up? or just too small? Well you came to the right place. In this tutorial I will provide you with information on installing a new hard drive in addition to your old hard drive, and tell you how to upgrade and existing hard drive. Please follow the tutorial step by step and read it all carefully or you could end up loosing all your existing data. So enjoy this tutorial from Blacksun.box.sk. And for more hardware installation guides visit Blacksun Research Facility.

I.Supplies needed and costs

Supplies you need will be:

A Hard drive ($50-$250 depending on size)
Phillips Screwdriver (Should have)
Needlenose Pliers (Should have)
Anti-static wrist strap(optional)
II.Steps before installation and preparation

Before you start digging around in your computer...you are going to want to get everything you need at hand. If you are starting clean and reinstalling a new version of windows you will want to have a formatted drive and a DOS boot disk. You can create a boot disk by getting a blank floppy and open My Computer then right click on (A:) and select format. Then select option "Copy System files" which then will create a disk for booting up in DOS prompt once you have fomatted your hard drive for Windows installation. If you have a existing drive that you want transfer your data to your new hard drive, you will want to get a DiskCopy utility from (www.powerquest.com). Also note that DISKCOPY and XCOPY will not copy hidden and system files. Once you have all disk backed up and ready to move, clear a space on a desk or table and unplug your computer and carry the case where it is well lighted. Remove the screws holding the out shell of your case, and remove out shell. Now you should be able to see the motherboard and all the insides. So you know, the box in the top left with red, yellow, and black cables coming out is the power supply. At the end of those wires is a connecter with 4 pin holes. Then the ribbons you see are what transfer the data from the drive to the motherboard. Look at your existing setup and look how they connect to the floppy drive etc.

III.The Installation of the HD

Ok. Now your ready to install the hard drive. If your replacing a existing drive look at the jumper settings on the back of your hard drive. Jumpers are what tell your computer what its purpose is. They are pins in sets of 2. They look like this :::[:]:: with ( :=pins and []=the jumper which slids on the pins. ) Once you find out what your existing drive's jumper settings are you then can set your new hard drives jumper settings to the same as the existing. Most drives have listed what the settings are but if they are not listed on the actual hard drive you should refer to the manufacturers website. Your new hard drive should be set on Master and if your just adding an additional hard drive set your old one to slave and new one to master. Now when putting in your new drive you are going to want to slide it in ussually below floppy drive or anywhere you have room. Once you have it slid in connect the power connector to the drive and the wide EIDE ribbon with the pink line on the right near the power connector. Once installation is complete of your hard drive, re-connect the cables and moniter and turn on the power.

IV.CMOS Check

On boot enter your PC's setup program(On boot it ussually shows you what key to press for system setup) and check the BIOS for drives 1 and 2 if you added an additional hard drive. Make sure both drives are set on AUTO so it can detect and set up correctly. Save and reboot.

V.Conclusion

Once windows is booted up check out the new drive and make sure it is working properly. If you added a drive reformat the old one so now you can prepare it for more data. I hope this helped you in the steps of installing or upgrading a new hard drive. If you have any suggestions or questions feel free to email me. More tutorials to come and soon a HTML version with picture references.

VI.Tools and Utilities

Disk Copy Utility
--(http://www.powerquest.com)

Memory Upgrade Guide


Table of Contents:

Intro
I.Supplies needed and costs
II.Steps before installation and preparation
III.The Installation of the Memory
IV.CMOS Check
V.Conclusion
VI.Tools and Utilities
VII.Contact Info

Intro

Is your PC running slow? Well memory upgrades are about the cheapest upgrade that you can do to improve your computers performance drastically. This will be a easy tutorial to understand so you can pop in your memory and determine from now
on out what you have inside your computer. This will be a step by step guide to install Simms and Dimm memmory. Simms memory slots are small and a whiteish color. Dimm memory slots are longer in length and are black. So please when following this tutorial please do not skip read, read carefully or it could end up costing you money. So enjoy this tutorial from Blacksun.box.sk. And for more hardware installation guides visit Blacksun Research Facility.

I.Supplies needed and costs

Supplies you need will be:

Memory ($50(32MB)-$200(128MB)) - www.kingston.com - www.crucial.com
Phillips Screwdriver (Should have)
Anti-static wrist strap(optional)
II.Steps before installation and preparation

Before we start getting into the installation you should have already looked inside your computer for what type of memory your computer support. If you have 2 or more white slots open means you need 72 pin SIMMS memory. SIMMS must be put
in pairs. DIMM on the other hand can go in by itself, so it doesnt need a pair. Clear a space on a desk or table and unplug your computer and carry the case where it is well lighted. Remove the screws holding the out shell of your case, and remove out shell. Now you should be able to see the motherboard and all the insides. Now look for your memory slots on your mother board, If you can not see them then you might have to move or take some stuff out to be able to move around inside but you probly wont have to. So you know, the box in the top left with red, yellow, and black cables coming out is the power supply.

III.The Installation of the Memory

Ok. Now your ready to install the memory.

If you are installing SIMMs memory then...
Grab one of the sticks of memory and slide it into slot from the top at a 60 degree angle(Ex.\.). Once you have it slid all the way in,push it to a upright position until you hear it click. Now put in its pair. Then re-connect the cables and moniter and turn on the power. On the boot up screen look at the memory count will be like 32838k(32MB) of memory. Make sure its reading the memory. If that number varies significantly from what you were expecting contact manufacturer or dealer you bought your memory from.

If you are installing DIMM memory then...
Grab one of the sticks of DIMM memory and line it up to the DIMM Socket so the grooves in the memory stick are the same on the motherboard. Once lined up push the white arms on the top and bottom of the DIMM socket to a outward position so they are not in the way of the memory. Now press firmly on the top and bottom until the white arms come in locking the memory in place.Then re-connect the cables and moniter and turn on the power. On the boot up screen look at the memory count will be like 32838k(32MB) of memory. Make sure its reading the memory. If that number varies significantly from what you were expecting contact manufacturer or dealer you bought your memory from.

IV.CMOS Check

On boot enter your PC should recognize the memory. Not many systems require you but if its required you will get a error message. Then enter your systems setup.

V.Conclusion

Once windows is booted up check out the new memory and make sure it is working properly. I hope this helped you in the steps of installing or upgrading your new memory. If you have any suggestions or questions feel free to email me. More tutorials to come and soon a HTML version with picture references.

VI.Tools and Utilities

Disk Copy Utility
--(http://www.powerquest.com)

Hardware Tutorial


This isn't so much a tutorial, as it doesn't actually teach you much.. It's more a text on hardware for those of you sick of newbie tutorials, and looking for something interesting and non-dangerous. This is mainly about motherboard stuff, but I stuck something about HDs, mice and Gfx cards at the end. Hey, if people like it and tell me, I might even stretch and do al the other computer bits and bobs. ;)


Content
The Bios
(I) Functions
(II) Static + Passwords
Processors
(I) Fetch-Execute
(II) Clock Ticks
(III) Funky Athlon fridge chip.
The Clock
(I) What does it look like?
(II) Waves
(III) Some ASCII Art. ;)
(IV) What is Digital? (unrelated to Microns, but hey.)
(V) Howcome Digital can't be conceived in real life?
(VI) What does digital represent?
(VII) What is Binary?
(VIII) How do I translate between number systems?
(IX) sums?
(X) Use Wincalc.
Chipset
(I) A what?
(II) Assembler and Machine Code
(III) Intel ones.
Microns
(I) Moore's Law
(II) Predictions / Intel. V. AMD. (Go, AMD!)
Hard Drives
(I) Origin
(II) How they work
(III) FIrst computer
Mice
(I) Rollers
(II) Cleaning
(III) Keyboard crud
Gfx Cards
(I) Built in v. NOT
(II) Components
(III) Stay away from S3s! warning
(IV) 3D and 2D cards
The BIOS.
This contains instructions which are specific for that particular motherboard. Those programs and instructions will remain in the PC throughout its life; usually they are not altered. However, it is possible to get replacement / upgrade BIOS's. Primarily the ROM code holds start-up instructions. In fact there are several different programs inside the start-up instructions, but for most users, they are all woven together. You can differentiate between:
* POST (Power On Self Test)

* The Setup instructions, which connect with the CMOS instructions

* BIOS instructions, which connect with the various hardware peripherals

* The Boot instructions, which call the operating system (DOS, OS/2, or Windows)

Note: Only very old or different OS's are stored on ROM, such as OS/2. This is actually a much more efficient system.
BIOS's are static sensitive, so take care when handling them. They can also be PWord protected... if you ever get round to doing this, don't forget the password. As you don't use the BIOS PWord often, this is easy to do. Don't. it's bloody hard getting the PWord back.

Processors
Processors work on a fetch-execute cycle. each tick of the clock, in theory, they get a bit of data... and by tick of the clock here, we don't mean a second, we mean the tick of a computer clock. Depending on the speed of your processor, this is anywhere from 233 million ticks per second for a 233, to 800 for an overclocked 600MHz Athlon chip.
So, you can get, on your average computer, 400 - 500 bits of data per second. Well, wrong actually... because not every clock tick is taken up by getting the data. Every _fourth_ is. Well, what about every other 3? you ask.. they are taken up with _finding_ the data, _getting_ it, and putting it back. So, you say, your processor runs at a quarter of the speed that in theory it should be able to do? Well, yes. And there's no way around this, unfortunately. But, we can make the clock speed a little faster, and it is the clock speed that dictates the speed of the processor... (within reason).
Therefore, you can set the clock ticks on your 233 to 266, and it'll run at 166 MHz. Yes. Unfortunately, the more clock ticks there are in relation to what your chip is _supposed_ to run at, the hotter it Gets. Therefore, you need to install heatsyncs/fans. In fact, the AMD Athlon 600MHz overclocked to 800MHz, the fastest PC at the time of writing has a minature fridge that cools the chip, which is its own special metal box. The tower-sized case also has a box the size of a mini-tower underneath for the cooling system. ;)
For this increase in temperature of 200MHz, the chip is cooled to -37 degrees centigrade. that's cold. ;) (Note: AMD chips generally run a lot hotter than Intel ones). ((Not a problem unless u have no heatsync)) - see the micron section, below...


The Clock
Now, this fabled clock looks like, in most cases, a small black box on your motherboard. The clock ticks it emitts are in the form of a wave , but a different wave: one that is sqare, and it looks like a castle ramparts. the speed of this is dictated by the MHx setting you set with the Jumpers on your motherboard. The waves look like so: (except slightly more square)
__ _ ____ _ _ ___

_¦ ¦___¦ ¦__¦ ¦_¦ ¦_¦ ¦__¦ ¦__ and etc.





The wave, which never changes, and is always the same, is broadcast throughout your motherboard, and it synchronises all of the things that go on there. For example, when you press the left button in your game of quake, the processor assigns different bits of your computer to do whatever is neccacery to redraw what's on the screen, and tells it to have it done in 3 ticks' time. The same process occurs on the gfx card itself, where the main processor assigns a polygon to each other chip, or whatever. Infact, if you have an old enough computer, you can see it being redrawn on the screen... try it... run a gfx-intensive game on a 486... If the task isn't done in time, then it all falls apart, and the computer crashes. This is why you don't want to buy a dodgy CPU. :) (Get an AMD Athlon!).
The signals sent run around your motherboard, through all of those copper bits, and into the chips, ISA slots, or whatever, and the task gets accomplished.

This signal is sent around the motherboard in that most wonderful of things we all love, Binary. Now, Binary is what Computers communicate with, and it is a DIGITAL thing. Digital. A Much used term.
COmputers are electronic, and therefore, all the signals in them are tiny pulses of electricity. Now, electricity can be one of two things. On... or off. And this is what makes it digital. If it could be half on as well, it would be analogue... But no. It's digital. However, the representation of it in the form of signals down wires is analogue, as a sound in a modem wire can be any of a hundred million different pitches, can't it. Yes. This digital signal is, then, a series of 0's and 1's. Binary. The counting system that we use (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11... etc... ) is Denary. It's Base ten... Binary is Base 2 (and Hexadecimal, which is used, amongst other things, is base 16). Therefore it is perfect for being what these signals are coded in. so each charactor on your screen is represented in your computers RAM by a series of Binary digits. Probably 8. if you go into Windows Calculator, and switch to scientific mode (View>Scientific) you can decode this. For example, 1 in Binary is 00000001. 2 is 00000010. The way this can be decoded is thus:

Each digit in binary represents a quantity of a certain number, just as denary does. In denary, there is a column for 1's, a column for 10's, and a column for 100's. And in Binary, there is a column for 1's, 2's, 4's, 8's, etc. Let me show you:

Denary:
100s 10s 1s
1 0 0

Here, there is a one in the hundreds column, and therefore, 100 + 0 + 0 (0 and 0 are the other 2 columns) makes 100. SO 1 0 0 in Denary represents 100. (of course, translating 100 --> 100 doesn't work, as denary is used in both cases). In Binary, this works this:

Binary (8-bit -- 8 digits)
128 64 32 16 8 4 2 1
1 1 1 1 1 0 1 0

SO... 128 + 64 + 32 + 16 + 8 + 2 + 1 = 250.
So the Binary number 11111010 = 250. Simple, eh?

It is possible to do addition, subtraction, multiplication, in fact, EVEYTHING that is possible with denary (1--> 10)... I'm not going to explain it because it is simply too complicated. ;) Use Windows Calculator... the radio buttons at the top left switch between number systems.

Chipset
We all know what assembly language is, do we not? It is the programming language that is most native to a computer. The instructions go directly to the chip (more or less). (Assembly actually lays on top of Machine code, which is the real native: Assembler is a more human-friendly version)... Each chip has their own different version of assembler/machine code, called its _chipset_. Each new type of chip comes with an upgraded chipset: for example, the Intel MMX chip incorporated the...wait for it... MMX chipset! There are also chipsets such as 3D!Now. THe most basic of commands between, say, Intel and AMD are the same: they have to be in order for the two to be compatible, but more advanced things are different. This is why Alpha chips are incompatible with windows: The chipset is completely different.
Intel has hitherto been the leader in supplying chip sets to the Pentium motherboard. Therefore, let us just mention their chip sets, which have astronomical names. The Neptune chip set (82434NX) was introduced in June 1994. It replaced the Mercury set (82434LX). In both chip sets, there were problems with the PCI bus. In January 1995 Intel introduced the first Triton, where everything worked. This chip set supports some new features: it supports EDO RAM, and it offers bus master integrated EIDE control and NSP (Native Signal Processing - one of the many new creations, which was soon forgotten).
The sorts of things that new chipsets are used for are varied... for example, The Intel TX Chipset, for example, supports SDRam and UltraDMA (But the TX-set cannot cache above 64 MB RAM, and that is a problem.), while AMD chips have their own special Graphics chipset, which is better for that task.

Microns
The CPUs have doubled their calculating capacity every 18 months. This is called "Moore's Law" and was predicted in 1965 by Gordon Moore. He was right for more than 30 years. The latest CPUs use internal wiring only 0.25 microns wide (1/400 of a human hair). But if Moore's Law has to be valid into the next century, more transistors have to be squeezed onto silicon layers. And now there is a new hope. IBM has for the first time succeeded in making copper conductors instead of aluminum. Copper is cheaper and faster, but the problem was to isolate it from the silicon. The problem has been solved with a new type of coating, and now chips can be designed with 0.13 micron technology. The technology is expected later to work with just 0.05 micron wiring! Texas Instruments announced on August 27th 1998 that they expect 0.07 micron CMOS processing in the year 2001. At the time of writing, AMD chips run at .27 microns (?) and Intel at .33. This explains why AMD chips are hotter, as there is less wire, and therefore more probability of the electrons that the electricity is comprised of hitting the side of the wires, and creating heat.

Hard Drives
Hard drives work in much the same way as a floppy disk does. They can, however, store a much larger capacity of data, and therefore are much more fragile, and compact . For this reason, they are hermetically sealed. NEVER OPEN ONE IF YOU WANT TO USE IT AGAIN. There is, inside, 3 or 4 goldy-brown circular plates on which the data is stored. These are much the same as the ones inside a floppy disk, except that they are not 'floppy' but hard, or stiff. The data is stored on the platters magnetically, which explains why floppy disks have a "keep magnets away from me" warning on boxes u buy them in.
IBM introduced the first hard disk in 1957, when data usually was stored on tapes. The first 305 RAMAC (Random Access Method of Accounting and Control) consisted of 50 platters, 24 inch diameter, with a total capacity of 5 MB, a huge storage medium for its time. It cost $35,000 annually in leasing fees (IBM would not sell it outright) and was twice the size of a refrigerator.
In the early 80s, HD's became the preferred storage medium as opposed to floppy drives (these were previously used due to increased reliability). IBM's PS/2 (one of which I have - yay) was one of the first PCs to be equipped with a Hard drive. I think.

Mice
Mice are, as we all know, Input devices, and as we also know, they tell where you are on the mousemat by moving a ball in the bottom. Which you can see. But how does it read how the ball is moving? Well, inside the mouse are 2 rollers, at 90 degrees to each other. When you move the mouse, u move the ball, and thus the rollers. THe rollers have some little discs on the end of them with slits in, and either side of the disc are light-readers, so that when you move tha ball, the mouse can tell because light flasles on and off in its light reader. There is also a 3rd non-functional roller to keep the ball rolling smoothly. Note: It is perfectly safe to turn your mouse upside down ,. take the ball out and look inside, as long as you don't prod anything too hard (twiddle the rollers by all means, just don't stick bits of paper in there). It is also a good idea to get a blunt knife or screw driver and clean the crud off the rollers every few weeks... it solidifies into little rings around the rollers, and works to the detriment of the mouse. If it isn't cleaned off, it can also, fallinto the mouse, and reak havok with the insides. :) The same sort of crud builds up in keyboards, but is harder to remove. ;)

GFX Cards
A video card is typically an adapter, a removable expansion card in the PC. Thus, it can be replaced! The video card can also be an integral part of the system board...This is the case in certain brands of PCs and is always the case in lap tops. This is not nice, as it is hard to upgrade to a better card. On a OC with a non-removable gfx or sound card, the normal procedure if you _do_ want to replace it is to disable the built-in graphics card using jumpers or dip switches... consult your motherboard manual. ;) Regardless of whether it is replaceable or integrated, it consists of three components:

* A video chip of some brand (ATI, Matrox, S3, Cirrus Logic, or Tseng, to name some of the better known). The video chip creates the signals, which the screen must receive to form an image.
* Some kind of RAM (EDO, SGRAM, or VRAM, which are all variations of the regular RAM). Memory is necessary, since the video card must be able to remember a complete screen image at any time.
* A RAMDAC - a chip converting digital/analog signals.

NOTE: Never buy an S3. Never. Ever. I've had lots, they're all useless. Remember that.

All ordinary graphics cards can show 3D games. That is really no special trick. The problem is to present them smoothly and fast. If the PC’s video card is made for 2D execution only, the CPU must do the entire workload of geometric transformations etc.! And that task can cause even the fastest CPU to walk with a limp. In recent years there has been an enormous development in 3D graphics cards. Let me briefly describe those here.

There are two types of graphics cards, which can be used for 3D acceleration:

Combination 2D/3D cards. These are ordinary graphics cards, which have been equipped with extra 3D power.
The pure 3D cards, which only work as accelerators. These cards require that there also is an ordinary (2D) graphics card in the PC.
Of course the pure 3D card yields the best acceleration, but there are also good combination cards on the market.

OVERCLOCKING

Content



What is
Overclocking?

Overclocking is a cool way of making your CPU,
video card (monitor card), 3D accelerator and some other kinds of hardware run
faster and give better performance for free! (Intel's worst nightmare!
MWHAHAHAHAHA!!!)
During this tutorial I will teach you how to overclock your
CPU, but you can use this information to overclock other kinds of hardware on
your PC.
Now, your CPU speed is based on two factors - your BUS(2) speed and
your clock speed (mine is 1 second per second... just kidding. I don't mean a
standard clock, like one you can tell time out of. Read on and you'll
understand).
Example: The BUS speed on older computers (let's take a Pentium
I 166MHZ(3) as an example) is about 66MHZ. 166, the CPU speed, divided by 66,
the BUS speed, gives you about 2.5, meaning your clock speed is about
2.5.
Simple, huh? BUS speed X clock speed = CPU speed.

Now,
what exactly is overclocking and how do I do it?



Materials

  1. The little booklet you were supposed to received together with your CPU.

  2. A screwdriver (better be a Philips screwdriver).

  3. A metal plier with a rubber/plastic handle or a bunch of fingers (better be
    your fingers... oh, and when I said a bunch of fingers, I've meant at least 5,
    all of them attached to a living hand (better be yours). Undeads are also
    welcome).

  4. A calculator / a brain.
A) Open your computer using your trusty
screwdriver.
B) Look at the little booklet you have and find the part about
the jumpers(4) board and read.
C) Use the plier or the fingers to change the
jumpers array so you will receive the clock speed you are interested in. Oh
yeah, and try not to step on your CMOS chip(5) or on your Cache chip(6).


Note: newer CPUs are "Clock Locked", meaning you cannot change their
clock speed, but you can still change their BUS speed... ;)
Changing the BUS
speed is similar to changing the clock speed (read the part on your booklet
about the jumpers).

How Dangerous is This Whole
Thing?

Well, you CAN fry your modem, but it all depends on you.
If
you screw up and step on things, spill coffee over your computer or overclock
your CPU too much (see Advanced Tips), don't come back crying to me.


Possible Side Effects:

  1. Your computer won't start: this probably means you have overclocked your
    computer too much. Lower your CPU speed a bit and then try again.
  2. Your OS won't start (or crash very frequently) or your computer will reboot
    itself randomly etc': open your computer, find the jumper that changes the CPU
    Voltage (the CPU Voltage is usually something that fits into this pattern: 2.x,
    when x can be any number) and increase the voltage a bit on every
    time.
    Remember to increase your CPU Voltage as little as you can. The maximum
    is "VOLT 2.30". If your computer still gives you problems then do a little less
    overclocking and it should be fine.

  3. Overclocking your CPU might increase it's temperature and decrease it's life
    span. Don't worry about that, experts claim that during the year 2,000 we will
    replace our CPU once every 6 months and this will become more frequent during
    the years so you've got nothing to worry about.

How to Avoid
these Side Effects:

  1. Attach another fan or a "Heat Sink" to your CPU. It shouldn't cost much (a
    couple of bucks, maybe) and the outcomes would amaze you (For example: using a
    device that cools your CPU to -20 Celsius degrees you can turn a Celeron 300A
    into a 633MHZ CPU)

  2. Place your computer where you won't block it's air ways.

  3. There are programs like CPUIdle (URL(7) to download: http://www.geocities.com/SiliconValley/Monitor/6990/cpuidle.zip)
    that can shut down your CPU while it's not in use. These actions can decrease
    the temperature of your CPU, and it can even increase your CPU's life span.
    Note: CPUIdle only works on Windows, since it is "Built-In" on other OSs (see
    CPUIdle's documentations).

Statistically Speaking, How Safe
is this?

Very safe. Out of tens of thousands of overclockers in the
world, only a very few got some of their hardware fried up (and who says it's
because of the overclocking anyway?), and those guys didn't listen to the safety
warnings (they overclocked their CPU too much, increased the CPU Voltage too
much etc').

Is it Worth the Trouble?
DUH!!! Of course
it is! Do the math yourself.

More Info on Speeding Up Your
Computer

Try the "Modem Speedup" section at blacksun.box.sk

How do I Overclock My 3D
Accelerator?

Overclocking 3D accelerators is pretty much like
overclocking CPUs, only you have to take one factor into consideration... your
CPU speed.
You see, the speed your 3D accelerator works depends on your CPU.
The 3D accelerator cannot work faster than the CPU, since some vital 3D
calculations are done by it, hence the accelerator cannot continue without these
calculations.
If your CPU's speed is lower than 400MHZ, I advise you not to
overclock your 3D accelerator. Go overclock your CPU and then overclock your 3D
card!! HAHAHA!!

29 March, 2008

Googles BLACK homepage

Today is Earth Hour. For one hour today everyone is encouraged to turn off all non-essential power for one hour to try and help conserve energy. Mainly, it's supposed to be from 8pm-9pm EST, but it can be done at any time today. Google will probably have it like that all day long though to show their support for it and also because people are from different time zones.

The most ancient language?

The most ancient language is SANSKRIT. Every language ever spoken on earth has its roots in SANSKRIT. It is called the language of the gods. Learn Sanskrit and you can learn and understand ANY other language easily, because you'll come across many words which youve already used in sanskrit.

Example:

Mother in German : Mutter

In English: Mother

In Sanskrit : Mathrushree

Its been alleged that since people in western countries started eating meat, their toungues grew thick, and were unable to pronounce the words, and twisted them to give meaning.

28 March, 2008

Resume writing tips for your son!

1.Write a single page resume. As he doesnt have much experience to take him to the second page or the third one!

2. Write the resume convincingly. His job here is to convince the employer that he knows something that the employer might be interested in.

3. Mention why hes interested in working for the employer, and what makes him competant for the job. Give the employer reasons as to why hes the best choice.

4. Is it because of money that you want him to join the job? or cause he wants to make a career. Either way, let him mention it straight forward. Theres nothing like a lil dose of honesty

5.Has he organized any events in college? Was he a very social person, and a team player? Mention that! Employers consider such qualities when selecting candidates.

6.Mention all his contact information, correctly.

7. Mention about his positive traits, and negative ones. Make sure to highlight the positive traits.

8. Prepare a different resume for every potential employer. This gives you the chance to tailor your resumes to each employer, and probably impress them.

9. The first impression is the best impression. Make sure he carries multiple copies of the resume.

Hope that answered it!

My technology blog: http://pcriddler.blogspot.com

Windows XP USB drive/stick installation

I am also covering a few pitfalls that happened to me, in hope they will save you a bit of time.



1) Does your computer support booting from USB?

Usually, if its an option in your BIOS boot sequence menu, the answer to this is yes. If its not there, look for BIOS updates. If you are not sure, proceed and see what happens ;-)

2) Sorting out the "Bootability" of your USB-Drive

Connect your USB drive to your computer, directly, without a Hub. Then, shut down your computer, disconnect any other hard disk drives from it, and insert your original Windows XP CD into the drive. Start the installation, and proceed to the section where you are allowed to pick a hard drive. If it goes beyond the partition selection, your drive is already fine for booting Windows XP. If not (seems to be the cases with many of the Freecom USB HDDs for example), you will get an error like "Windows is unable to find your drive, partition, data etc bla". This is usually not a big problem. All you need to do is "properly" format the drive. Reboot into your normal Windows, and get this HP tool , and use it to format your HDD completely. I chose NTFS format, worked fine everytime i tried. After this, my drives are recognized as valid installation devices by the Windows XP installer.
(In fact, i did not manage to create a USB primary partition with FAT32 that was recognized as being installable)

3) Dumping the original Windows CD into an ISO File



Pretty easy one. Simply open WinISO, and select Actions -> Make ISO from CDROM, and save your CD image.



4) Extracting the files we need to work on



After the CD dump is done, close and reopen WinISO. Then, open the ISO file you just created using File -> Open.
Now, click the I386 folder, and select the following files (Ctrl key to multi-select)

* TXTSETUP.SIF
* DOSNET.INF
* USB.IN_
* USBPORT.IN_
* USBSTOR.IN_

Select Actions -> Extract and put the resulting files into some folder to work on them.

5) Unpacking IN_ files





Use the Cab SDK (from the command line) for extracting the contents of the .IN_ files. Each of them contains exactly one .inf file. If you are unsure how to use the Cab SDK, here is an example command line: "cabarc x USBSTOR.IN_" . You should end up with three new files in the folder, called:

* usb.inf
* usbport.inf
* usbstor.inf

You can now delete the .IN_ files.

6) Editing the files

This is the main job. i ll also try to explain a bit whats happening. Use a simple Texteditor like Notepad.

6-A) TXTSETUP.SIF

This file is loaded on the initial install step by the Windows XP CD installer. In this file, we will change the way Windows treats USB devices during system setup -- the default is to only treat them as input devices during installation -- we will change this to include mass storage driver support (which needs to be loaded into the installer much earlier in order to work).

First, move the following entries from [InputDevicesSupport.Load] to the [BootBusExtenders.Load] section , as shown here



[BootBusExtenders.Load]
pci = pci.sys
acpi = acpi.sys
isapnp = isapnp.sys
acpiec = acpiec.sys
ohci1394 = ohci1394.sys
usbehci = usbehci.sys
usbohci = usbohci.sys
usbuhci = usbuhci.sys
usbhub = usbhub.sys
usbstor = usbstor.sys


[InputDevicesSupport.Load]
usbehci = usbehci.sys
usbohci = usbohci.sys
usbuhci = usbuhci.sys
usbhub = usbhub.sys
usbccgp = usbccgp.sys
hidusb = hidusb.sys
serial = serial.sys
serenum = serenum.sys
usbstor = usbstor.sys



... now the same for [BootBusExtenders] and [InputDevicesSupport]



[BootBusExtenders]
pci = "PCI-Bustreiber",files.pci,pci
acpi = "ACPI Plug & Play-Bustreiber",files.acpi,acpi
isapnp = "ISA Plug & Play-Bustreiber",files.isapnp,isapnp
acpiec = "Integrierter ACPI-Controllertreiber",files.none,acpiec
ohci1394 = "IEEE-1394-Bus-OHCI-konformer Anschlusstreiber",files.ohci1394,ohci1394
usbehci = "Erweiterter Hostcontroller",files.usbehci,usbehci
usbohci = "Open Hostcontroller",files.usbohci,usbohci
usbuhci = "Universeller Hostcontroller",files.usbuhci,usbuhci
usbhub = "Standard-USB-Hubtreiber",files.usbhub,usbhub
usbstor = "USB-Speicherklassentreiber",files.usbstor,usbstor


[InputDevicesSupport]
usbehci = "Erweiterter Hostcontroller",files.usbehci,usbehci
usbohci = "Open Hostcontroller",files.usbohci,usbohci
usbuhci = "Universeller Hostcontroller",files.usbuhci,usbuhci
usbhub = "Standard-USB-Hubtreiber",files.usbhub,usbhub
hidusb = "HID-Parser",files.hidusb,hidusb
serial = "Treiber fr seriellen Anschluss",files.none,serial
serenum = "Enumerator fr seriellen Anschluss",files.none,serenum
usbstor = "USB-Speicherklassentreiber",files.usbstor,usbstor
usbccgp = "USB Generic Parent Driver",files.usbccgp,usbccgp



Next, we also have to write several keys into the registry. Convieniently, the txtsetup.sif allows you to specify files that are parsed and instered into the registry at install time. Insert the following in the [HiveInfs.Fresh] section:

[HiveInfs.Fresh]
AddReg = hivedef.inf,AddReg
AddReg = hivesys.inf,AddReg
AddReg = hivesft.inf,AddReg
AddReg = hivecls.inf,AddReg
AddReg = hiveusd.inf,AddReg
AddReg = dmreg.inf,DM.AddReg
AddReg = usbboot.inf,usbservices



and also in [SourceDisksFiles]

[SourceDisksFiles]
usbboot.inf = 1,,,,,,_x,3,,3
bootvid.dll = 1,,,,,,3_,2,0,0,,1,2
kdcom.dll = 1,,,,,,3_,2,0,0,,1,2

Finally, save and close TXTSETUP.SIF. We are done with it.

6-B) DOSNET.INF

Now, open DOSNET.INF , and change the second [Files] section to look like this:

[Files]
d1,usbboot.inf
d1,_default.pif
d1,12520437.cpx
d1,12520850.cpx

....

6-C) usb.inf

Change the bolded lines in the [StandardHub.AddService] and [CommonClassParent.AddService] sections:

[StandardHub.AddService]
DisplayName = %StandardHub.SvcDesc%
ServiceType = 1 ; SERVICE_KERNEL_DRIVER
StartType = 0 ; SERVICE_DEMAND_START
ErrorControl = 1 ; SERVICE_ERROR_NORMAL
ServiceBinary = %12%\usbhub.sys
LoadOrderGroup = Boot Bus Extender

[CommonClassParent.AddService]
DisplayName = %GenericParent.SvcDesc%
ServiceType = 1 ; SERVICE_KERNEL_DRIVER
StartType = 0 ; SERVICE_DEMAND_START
ErrorControl = 1 ; SERVICE_ERROR_NORMAL
ServiceBinary = %12%\usbccgp.sys
LoadOrderGroup = Boot Bus Extender

6-D) usbport.inf

Change the bolded lines in the [EHCI.AddService], [OHCI.AddService] , [UHCI.AddService] and [ROOTHUB.AddService] sections:

[EHCI.AddService]
DisplayName = %EHCIMP.SvcDesc%
ServiceType = 1 ; SERVICE_KERNEL_DRIVER
StartType = 0 ; SERVICE_DEMAND_START
ErrorControl = 1 ; SERVICE_ERROR_NORMAL
ServiceBinary = %12%\usbehci.sys
LoadOrderGroup = Boot Bus Extender

[OHCI.AddService]
DisplayName = %OHCIMP.SvcDesc%
ServiceType = 1 ; SERVICE_KERNEL_DRIVER
StartType = 0 ; SERVICE_DEMAND_START
ErrorControl = 1 ; SERVICE_ERROR_NORMAL
ServiceBinary = %12%\usbohci.sys
LoadOrderGroup = Boot Bus Extender

[UHCI.AddService]
DisplayName = %UHCIMP.SvcDesc%
ServiceType = 1 ; SERVICE_KERNEL_DRIVER
StartType = 0 ; SERVICE_DEMAND_START
ErrorControl = 1 ; SERVICE_ERROR_NORMAL
ServiceBinary = %12%\usbuhci.sys
LoadOrderGroup = Boot Bus Extender

[ROOTHUB.AddService]
DisplayName = %ROOTHUB.SvcDesc%
ServiceType = 1 ; SERVICE_KERNEL_DRIVER
StartType = 0 ; SERVICE_DEMAND_START
ErrorControl = 1 ; SERVICE_ERROR_NORMAL
ServiceBinary = %12%\usbhub.sys
LoadOrderGroup = Boot Bus Extender

6-E) usbstor.inf

Change / Add the bolded lines in the [USBSTOR.AddService] section

[USBSTOR.AddService]
DisplayName = %USBSTOR.SvcDesc%
ServiceType = 1
StartType = 0
Tag = 3
ErrorControl = 1
ServiceBinary = %12%\USBSTOR.SYS
LoadOrderGroup = Boot Bus Extender

6-F) new file: USBBOOT.INF

Create a new file called USBBOOT.INF in the same directory as your other changed files, and put the following content into it:

[usbservices]

HKLM,"SYSTEM\CurrentControlSet\Services\USBSTOR","DisplayName",0x00000000,"USB Mass Storage Driver"
HKLM,"SYSTEM\CurrentControlSet\Services\USBSTOR","ErrorControl",0x00010001,1
HKLM,"SYSTEM\CurrentControlSet\Services\USBSTOR","Group",0x00000000,"System Reserved"
HKLM,"SYSTEM\CurrentControlSet\Services\USBSTOR","ImagePath",0x00020000,"system32\DRIVERS\USBSTOR.SYS"
HKLM,"SYSTEM\CurrentControlSet\Services\USBSTOR","Start",0x00010001,0
HKLM,"SYSTEM\CurrentControlSet\Services\USBSTOR","Type",0x00010001,1

HKLM,"SYSTEM\CurrentControlSet\Services\usbehci","DisplayName",0x00000000,"USB 2.0 Enhanced Host Controller Miniport Driver"
HKLM,"SYSTEM\CurrentControlSet\Services\usbehci","ErrorControl",0x00010001,1
HKLM,"SYSTEM\CurrentControlSet\Services\usbehci","Group",0x00000000,"System Reserved"
HKLM,"SYSTEM\CurrentControlSet\Services\usbehci","ImagePath",0x00020000,"system32\DRIVERS\usbehci.sys"
HKLM,"SYSTEM\CurrentControlSet\Services\usbehci","Start",0x00010001,0
HKLM,"SYSTEM\CurrentControlSet\Services\usbehci","Type",0x00010001,1

HKLM,"SYSTEM\CurrentControlSet\Services\usbhub","DisplayName",0x00000000,"USB2 Enabled Hub"
HKLM,"SYSTEM\CurrentControlSet\Services\usbhub","ErrorControl",0x00010001,1
HKLM,"SYSTEM\CurrentControlSet\Services\usbhub","Group",0x00000000,"System Reserved"
HKLM,"SYSTEM\CurrentControlSet\Services\usbhub","ImagePath",0x00020000,"system32\DRIVERS\usbhub.sys"
HKLM,"SYSTEM\CurrentControlSet\Services\usbhub","Start",0x00010001,0
HKLM,"SYSTEM\CurrentControlSet\Services\usbhub","Type",0x00010001,1

HKLM,"SYSTEM\CurrentControlSet\Services\usbuhci","DisplayName",0x00000000,"Microsoft USB Universal Host Controller Miniport Driver"
HKLM,"SYSTEM\CurrentControlSet\Services\usbuhci","ErrorControl",0x00010001,1
HKLM,"SYSTEM\CurrentControlSet\Services\usbuhci","Group",0x00000000,"System Reserved"
HKLM,"SYSTEM\CurrentControlSet\Services\usbuhci","ImagePath",0x00020000,"system32\DRIVERS\usbuhci.sys"
HKLM,"SYSTEM\CurrentControlSet\Services\usbuhci","Start",0x00010001,0
HKLM,"SYSTEM\CurrentControlSet\Services\usbuhci","Type",0x00010001,1

HKLM,"SYSTEM\CurrentControlSet\Services\usbohci","DisplayName",0x00000000,"Microsoft USB Open Host Controller Miniport Driver"
HKLM,"SYSTEM\CurrentControlSet\Services\usbohci","ErrorControl",0x00010001,1
HKLM,"SYSTEM\CurrentControlSet\Services\usbohci","Group",0x00000000,"System Reserved"
HKLM,"SYSTEM\CurrentControlSet\Services\usbohci","ImagePath",0x00020000,"system32\DRIVERS\usbohci.sys"
HKLM,"SYSTEM\CurrentControlSet\Services\usbohci","Start",0x00010001,0
HKLM,"SYSTEM\CurrentControlSet\Services\usbohci","Type",0x00010001,1



7) Repack the inf files into their original IN_ format

If you have not already deleted your extracted .IN_ files, do so now. They need to be replaced. Open a DOS shell again, and navigate to the folder with your changed files. Then exceute the following commands:

cabarc n USB.IN_ usb.inf
cabarc n USBPORT.IN_ usbport.inf
cabarc n USBSTOR.IN_ usbstor.inf

The three IN_ files should now exist again.

Congratulations. All out modifications are done.

8) Inject the changed files into the ISO

Open your Windows CD image again with WinISO. Navigate to the I386 folder, and delete the following files from the ISO, saving the changes to the ISO afterwards:

* DOSNET.INF
* TXTSETUP.SIF
* USB.IN_
* USBPORT.IN_
* USBSTOR.IN_

Just to be sure all is updated in the ISO, cloase and repoen the ISO in WinISO. Now, again go to the I386 folder and select "Add Files". Now add your changed files, in detail:

* USBBOOT.INF
* DOSNET.INF
* TXTSETUP.SIF
* USB.IN_
* USBPORT.IN_
* USBSTOR.IN_

Save the ISO. You are done.

9) Burn the ISO back to CD

Feel free to use any burning package you want. I used the free and simple Burnatonce

10) Install Windows XP from the CD



Shut down your computer. Disconnect ANY internal and external hard drives (so Windows cannot find them during installation and mess up their Master Boot Records hehe). Some computers will have trouble to boot without an internal HDD attached, check in your BIOS and, if possible, remove the HDD from the boot sequence and set the USB Harddisk as the first boot device, and the CDROM as second.

Also, now connect your USB Harddrive directly to the computer, without any Hubs in between.





Windows should install just fine, with the exceptions noted below.

Issues you will encounter during installation:

* During driver installation, the USB drivers will prompt you, as they are "not certified" - This is normal. Our changes invalidated the checksum, and therefore the driver is no longer signed. Just press "yes" a couple of times.
* Upon completion of the install, the system will complain once on the first bootup that the pagefile does not exist. You can ignore this for now, as Windows will work fine without it. People are looking at fixing this issue, but its not critical for now.



Once everything is up and running , shut down and reconnect all your drives.

27 March, 2008

IE 7 takes too much time to open ?

try the following :

1. Have you installed any toolbars like Yahoo! toolbar, or Google Toolbar? If so, uninstall or disable the toolbars

2. Do you have any addons such as IE7 pro? Uninstall that too. Look for something that runs out of the browser such as Free download manager.

3. Make sure you run with administrator privilages.

4. Update IE 7 with windows update

5. Make sure there isnt a trojan or a virus on your system.

6. Update your antivirus regularly!

Font change on social networking sites

BLAH BLAH BLAH text

add this in your profile, where HTML coding is enabled, and voila! you'll have your font change!
This seems to work with most social networking sites, which have html code enabled for user level profile editing

My technology blog:http://pcriddler.blogspot.com/

22 March, 2008

Random Numbers in Java

Java has a rich toolkit for generating random numbers, in a class named "Random".
This document is a quick guide to using Random. Random can generate many kinds
of random number, not all of which I discuss here.


The best way to think of class Random is that its instances are random number
generator objects -- objects that go around spitting out random numbers of various
sorts in response to messages from their clients.


Gaining Access to Random


Random is defined in the "java.util" library package, so any Java
source file that uses Random must begin with a line of the form


    import java.util.Random;

or


    import java.util.*;

Creating Random Number Generators


The easiest way to initialize a random number generator is to use the parameterless
constructor, for example


    Random generator = new Random();

However, beware of one thing when you use this constructor: Algorithmic random
number generators are not truly random, they are really algorithms that generate
a fixed but random-looking sequence of numbers. When you create a random number
generator, it initializes its sequence from a value called its "seed".
The parameterless constructor for Random uses the current time as a seed, which
is usually as good a seed as any other. However, the time is only measured to
a resolution of 1 millisecond, so if you create two random number generators
within one millisecond of each other, they will both generate exactly the same
sequence of numbers.


If you prefer, there is also a constructor for Random that allows you to provide
your own seed. You can use any long integer as a seed with this constructor.
Note that there is no magic way of picking "good" seeds. For example,
the following creates a random number generator with seed 19580427:


    Random generator2 = new Random( 19580427 );

Generating Random Integers


To generate a random integer from a Random object, send the object a "nextInt"
message. This message takes no parameters, and returns the next integer in the
generator's random sequence. Any Java integer, positive or negative, may be
returned. Integers returned by this message are uniformly distributed over the
range of Java integers. Here is an example, assuming that "generator"
is an instance of Random:


    int r = generator.nextInt();

Often, programmers want to generate random integers between 0 and some upper
bound. For example, perhaps you want to randomly pick an index into an array
of n elements. Indices to this array, in Java, range from 0 to n-1.
There is a variation on the "nextInt" message that makes it easy to
do this: If you provide an integer parameter to "nextInt", it will
return an integer from a uniform distribution between 0 and one less than the
parameter. For example, here is how you could use a random number generator
object to generate the random array index suggested a minute ago:


    int randomIndex = generator.nextInt( n );

Generating Random Real Numbers


Random number generators can also generate real numbers. There are several
ways to do so, depending on what probablity distribution you want the numbers
drawn from.


To generate a random real number uniformly distributed between 0 and 1, use
the "nextDouble" message. This message takes no parameters. For example...


    double r = generator.nextDouble();

To generate a random number from a normal distribution, use "nextGaussian".
This message takes no parameters and returns a random number from a normal distribution
with mean 0 and standard deviation 1. In layman's terms, this means that the
results may be either positive or negative, with both being equally likely;
the numbers will almost always have small absolute values (about 70% will lie
between -1 and 1, about 95% between -2 and 2). For example...


    double r = generator.nextGaussian();

Translating and Scaling Random Numbers


Random number generators often return numbers in some limited range, typically
0 to b for some upper bound b. Sometimes you need your
random numbers to lie in a different range. You can make random numbers lie
in a longer or shorter range by multiplying them by a scale factor (scaling).
You can make random numbers lie in a range that is shifted to higher or lower
numbers than the original by adding (or subtracting) an offset from the random
numbers (translating).


Here are some examples of these operations:


  • Suppose you are writing a game program that simulates throwing dice, and
    so need a random integer in the range 1 to 6. "nextInt" can give
    you one in the range 0 to 5, and you can translate this to the range you need:

    int throw = generator.nextInt(6) + 1;

  • In drawing a pattern made up of random lines, you want to pick a random
    angle between 0 and 360 degrees at which to draw a line. The angle can be
    any real number. The "nextDouble" message will give you a random
    real number, but between 0 and 1. You can use scaling to turn this into a
    real number between 0 and 360:

    double angle = generator.nextDouble() * 360.0;

  • Suppose the same pattern-drawing program also needs to pick random lengths
    for the lines, but that the lines should never be shorter than 10 units, nor
    longer than 50. Line lengths can be any real number between these limits.
    Thus you need random lengths from a 40-unit range starting at 10. You can
    use scaling and translation together to generate these numbers from "nextDouble":

    double length = generator.nextDouble() * 40.0 + 10.0;