I have been wanting for some time now to build my own desktop computer, as that is something I have never done before. Mainly the reasons are all those listed below under "Advantages of building your own desktop computer". The only problem for me is that I can't find any good reason to spend this kind of money on a new computer. Yes, my current desktop is getting old and I would like to use it as a server, but I have a perfectly good year-old laptop that satisfies any computing need I might have. I'm not much into PC gaming anymore, and that seems to be the only major reason to buy a powerhouse of a desktop.
I need not build a top-of-the-line desktop, but I would still like to make it fairly future-proof if I do spend the money on one. In any case, here are some advantages and disadvantages to buying a pre-built desktop versus building your own.
Advantages of a store-bought desktop computer:
-Pre-built, ready to use
-Recovery partition and recovery disk creation
-No installing drivers
-Extended service plans are available
-Cost of OS and labour included in price
-Free trials of antivirus and office usually included
Disadvantages of a store-bought desktop computer:
-Don't know exactly what's inside
-Lots of bloatware
-Requires time to set up software and get the right feel
-Manufacturer may cheap out on certain components to lower price
-Must do research on brand names to find best track records
Advantages of building your own desktop computer:
-You select each piece and know exactly what you're buying
-You need not purchase Windows if you so choose/no hassle to refund windows
-You gain experience and understanding about building and troubleshooting a computer
-You can lower costs as you don't have to pay for labour or re-sold components
-You install exactly the software you choose, no more, no less
-You squeeze performance out of your hardware by implementing specific and custom builds and settings
Disadvantages of building your own desktop computer:
-Must download and install all drivers
-Must create drive image if recovery option is wanted
-Requires time to build, install and troubleshoot (this can be an advantage as there are a select few who actually enjoy this process)
-Warranty only extends as far as each piece of hardware comes with
-Must pay for Windows if desired
-Must pay for and wait for shipping (usually)
EDIT: Just recently I priced out the components of a pre-built computer that you might buy at a store. Excluding the cost of the operating system, the prices were comparable. I haven't done extensive research into this, but as far as I can tell, if you buy direct from a hardware company and build a computer yourself, it's not a huge price difference.
Wednesday, December 24, 2008
Advantages and Disadvantages to Buying a Pre-Built Desktop Versus Building Your Own
Monday, December 22, 2008
Easy Portable Web Server
I tried and tried to get this to work in VirtualBox last summer, but I've just tried out the newest release (VirtualBox 2.1) with improved host network interface support. Before, manual bridging and network card manufacturer were issues that came into play. Now it's as easy as picking the interface you want to connect to, and it just works. Here is a small walkthrough on how to set up your very own portable web server (assuming you are using a laptop). For background, I am running the host OS Windows Vista Home Premium on an Intel Core 2 Duo, using an Intel Wireless 4965AGN wireless card.
Firstly, you will need to download the following:
Install VirtualBox, then create a new system and virtual hard disk file. I made my virtual disk dynamically expanding up to 10.0 GB and set available memory to 256 MB.
Before booting up the new guest OS, select it from the list, then click Settings. Select Network from the list, then change the Attached to: setting to Host Interface. Select the host interface connected to the internet from the list, then click OK.
Once the machine boots for the first time, it will ask for installation media. Choose to add and mount the Linux image you downloaded, and proceed through the installation process. When installing Debian, I told it to install all web server and database packages. Your portable web server can very easily be scaled to a LAMP server by installing extra packages.
Reboot to the guest OS once it is finished installing. The Apache service should start automatically (assuming you are using Apache). Place whatever HTML files or whatever else in the /var/www/apache2-default directory. If you are behind a router, make sure to set port 80 to forward to your guest IP (found by using ifconfig or /sbin/ifconfig).
Now open up a web browser, type in your real IP address, and you should see "It Works!" or some other default page (unless you already changed it).
Firstly, you will need to download the following:
- A Linux distribution CD image that includes web server software such as Apache (I chose Debian)
- Virtualbox 2.1
Install VirtualBox, then create a new system and virtual hard disk file. I made my virtual disk dynamically expanding up to 10.0 GB and set available memory to 256 MB.
Before booting up the new guest OS, select it from the list, then click Settings. Select Network from the list, then change the Attached to: setting to Host Interface. Select the host interface connected to the internet from the list, then click OK.
Once the machine boots for the first time, it will ask for installation media. Choose to add and mount the Linux image you downloaded, and proceed through the installation process. When installing Debian, I told it to install all web server and database packages. Your portable web server can very easily be scaled to a LAMP server by installing extra packages.
Reboot to the guest OS once it is finished installing. The Apache service should start automatically (assuming you are using Apache). Place whatever HTML files or whatever else in the /var/www/apache2-default directory. If you are behind a router, make sure to set port 80 to forward to your guest IP (found by using ifconfig or /sbin/ifconfig).
Now open up a web browser, type in your real IP address, and you should see "It Works!" or some other default page (unless you already changed it).
Tuesday, December 16, 2008
Java File Transfer Buffer Size
As I may have mentioned in a previous post, I've been working on a file transfer program written in Java. I was getting very sick of MSN file transfer and other stupid such mechanisms that are unreliable and do not allow transfer of executable files.
I was testing v1.0 of my program over the LAN with a hefty-sized file, and found that the transfer speed was only about 10 kB/s. Frustrated, I did a little research on Maximum Transmission Unit (MTU) size.
The byte buffer size I was using was 1024 bytes at a time. Apparently most LANs MTU value is 1500. I changed the byte buffer size to 1500 and some other small things, and the transfer speed jumped to around 1 MB/s. This was between two computers connected to the same router, and I have yet to test it over the internet.
I was testing v1.0 of my program over the LAN with a hefty-sized file, and found that the transfer speed was only about 10 kB/s. Frustrated, I did a little research on Maximum Transmission Unit (MTU) size.
The byte buffer size I was using was 1024 bytes at a time. Apparently most LANs MTU value is 1500. I changed the byte buffer size to 1500 and some other small things, and the transfer speed jumped to around 1 MB/s. This was between two computers connected to the same router, and I have yet to test it over the internet.
Tuesday, December 9, 2008
phpBB Attachment Storage
I've just recently set up a phpBB 3.0 forum for a local non-profit organization. Most registered users will want to frequently post pictures and so on with their forum posts, and originally I disabled attachments for fear that it would contribute to my small 100 MB database size limit set by my web hosting provider.
After asking on the phpBB support forums, apparently the files are actually stored in a folder on the web space storage, and only a reference to the attached file is stored in the database. This means that I will be able to store many pictures and attachments without having to worry about running out of space.
After asking on the phpBB support forums, apparently the files are actually stored in a folder on the web space storage, and only a reference to the attached file is stored in the database. This means that I will be able to store many pictures and attachments without having to worry about running out of space.
Friday, December 5, 2008
How To Get Rid Of Alternate Keyboards In Vista
I find that everyone I know who uses Vista complains at some point of the OS randomly deciding to switch input languages. Since I am in Canada, this is most commonly French to English or English to French. There are a few simple steps you can do to stop this problem. I actually change this setting on every computer I set up at my computer technician job.
Follow the steps:
Start > Control Panel > Clock, Language and Region (or) Regional and Language Settings
Then depending on your Control Panel view,
Change Keyboards or Other Input Methods (or) Keyboards and Languages tab > Change Keyboards...
Select each language/keyboard you don't intend on using from the list, and select remove. To use the standard English keyboard, use US.
Move to the Language Bar tab, then select Hidden. Then move to the Advanced Key Settings tab, and if any of the entries have a key sequence beside their name, press Change Key Sequence... then change both settings to Not Assigned.
Hit OK a bunch of times and you're set. No more worrying about random switches between French and English and whatever other language you have installed. Unless of course you want it that way.
Follow the steps:
Start > Control Panel > Clock, Language and Region (or) Regional and Language Settings
Then depending on your Control Panel view,
Change Keyboards or Other Input Methods (or) Keyboards and Languages tab > Change Keyboards...
Select each language/keyboard you don't intend on using from the list, and select remove. To use the standard English keyboard, use US.
Move to the Language Bar tab, then select Hidden. Then move to the Advanced Key Settings tab, and if any of the entries have a key sequence beside their name, press Change Key Sequence... then change both settings to Not Assigned.
Hit OK a bunch of times and you're set. No more worrying about random switches between French and English and whatever other language you have installed. Unless of course you want it that way.
Common Java Socket Programming Bugs
Last year I wrote an internet chat client in Java, and just now I've decided to write a file transfer program in Java. Both of these programs taught me how to use the Socket class from the Java API. I've ran into a few programming mistakes that cost me a lot of time, so here are some things to watch out for.
Remember that InetAddress.getHostAddress(); returns a string of the form "hostname/x.x.x.x" so to get just the IP address string you might want to do something like InetAddress.getHostAddress().split("/")[0];
When you are doing
Socket clientSocket = serverSocket.accept();
out = new PrintWriter(clientSocket.getOutputStream(), true);
out.print("Hello World!");
Be careful how you read on the other end with
in = new BufferedReader(new InputStreamReader(clientSocket.getInputStream()));
in.readLine();
The .readLine() method looks for a line break at the end of the string, but when you are using out.print() no "\n" is added to the end. Use out.println(); instead.
Lastly, if you are sending text such as out.println(); remember that it is not actually sent until you call out.flush();
Hopefully these tips will save you a bit of grief if you are new to network programming with Java. I know I would have been grateful if someone had told me about these simple things.
Remember that InetAddress.getHostAddress(); returns a string of the form "hostname/x.x.x.x" so to get just the IP address string you might want to do something like InetAddress.getHostAddress().split("/")[0];
When you are doing
Socket clientSocket = serverSocket.accept();
out = new PrintWriter(clientSocket.getOutputStream(), true);
out.print("Hello World!");
Be careful how you read on the other end with
in = new BufferedReader(new InputStreamReader(clientSocket.getInputStream()));
in.readLine();
The .readLine() method looks for a line break at the end of the string, but when you are using out.print() no "\n" is added to the end. Use out.println(); instead.
Lastly, if you are sending text such as out.println(); remember that it is not actually sent until you call out.flush();
Hopefully these tips will save you a bit of grief if you are new to network programming with Java. I know I would have been grateful if someone had told me about these simple things.
Subscribe to:
Posts (Atom)




