Archived entries for Computers

A Java Class For Rational Numbers

I thought I would post a Java Class I made for part of a project that deals with rational numbers. Pretty simple, yet sturdy implementation of rational numbers if needed. The code is pretty self explanatory. This implementation can create a Rational object given a string “a/b” where a, b are integers. It can also create a rational object given integers for the numerator and denominator directly. This class also supports methods to print, rationalize and compare Rational objects, as well as preform addition (add), subtraction (sub), multiplication (mul) and division of Rational objects.

You can take a look/download it here.

Never Force Update Pacman, Trust Me

Last night I melted my Arch Linux machine through my desk. The moral of this post is quite simple: never, ever, ever do a forced update on Pacman. After trying to update Pacman, the update files would download and the system would print out a million "file.foo not found in filesystem" error messages. So I came up with the (not so) brilliant idea of running pacman -Syu --force, and hammering y and Enter on my keyboard repeatedly. Turns out that was not such a good idea.

A quick Google search would have probably given me the necessary warnings:

As quoted from the Arch Linux Wiki:

Every installed package provides /var/lib/pacman/local/$package-$version/files file that contains metadata about this package. If this file gets corrupted – is empty or missing – it results in “file exists in filesystem” errors when trying to update the package. Such an error usually concerns only one package and instead of manually renaming and later removing all the files that belong to the package in question, you can run pacman -S --force $package to force pacman to overwrite these files.

Do not run pacman -Syu --force.

That simple command  totally destroyed my system. Any command I type now gives the error: FATAL: Kernel too old

Well, that’s too bad. I probably should have known anyway. Lesson learned.

 

Disabling Those Annoying Blue HP Hotkeys

I have never used a É character in my entire life. I doubt you have either. HP on the other hand, apparently sees things a little differently. In fact, it is quite likely they think you need this “bilingual caps lock” about once a day. I sure don’t.  Around once a day, I was running into an annoying little problem: I found my self typing these characters at the worst possible times. When there is 10 minutes left in a Computer Science lab, and your struggling to complete all the tasks, the last thing you need is this annoying problem.

Judging from a quick Google Search, hardly anyone knows how to fix this problem (besides from rebooting) and judging from my call to HP tech support last night, they don’t know how to solve it either. Fantastic! (Even though they had absolutely NO IDEA how to fix it, they DID want to sell me an extended warranty, but that’s another story!)

Either way, I did figure out how to disable these annoying hotkeys after accidentally pressing some mystery key combination in the bottom right corner of the keyboard. The solution is simple. Press:

Ctrl + Left Shift + Right Shift

Ubuntu “Checking Battery State” Fix

OK guys, I want to get in a quick blog before dinner. The “checking battery state” problem seems to affect a large amount of Ubuntu users, usually after an upgrade of some sort. Basically the computer boots fully but gets stuck on “checking battery state”. This happens on both desktops and laptops alike. There is many reports of this problem online (some dating back to around 2008) but few (if any) solutions.

The problem has to do with Xorg and not with some sort of “battery state” issue. I had this problem before and was forced to reformat my machine and was faced with it again last week. The fix is surprisingly simple. Press ctrl+alt+f1 to drop to a shell prompt, and type:

sudo apt-get install gdm

Problem solved.

Why I Hate Acer

I have always hated Acer Computers. Always. Every time I buy an Acer computer, they always end up screwing me over. I own a lot of budget computers. Acer, Compaq, eMachines, you name it. I have never had any problem with any other budget brand of computers, except for Acer, and they seem to be on a roll…

Lets flash way back to the first time I was unfortunate enough to purchase an Acer computer. I bought a new mid-end desktop last year, complete with Windows Vista. Since Windows 7 had already been released for Beta testing, and was scheduled for release in less than a month, Acer guaranteed a free copy of Windows 7 for anyone who purchased a new machine for a limited time. I met all the requirements necessary to be eligible for my free copy of 7. When I finally went to redeem it, it was not meant to be (no surprises here).

When I went to register online to have the CD sent directly to me, my model number was not included on the list of eligible computers, and “was not eligible to receive my copy”. It was stated that all computers shipped with Vista premium were eligible… yes, that means me. After a few calls to Acer I was flatly told “no, you do not qualify” (even though I met every single requirement). When I explained this to them, they did not really listen. Many emails later, I had came to the conclusion that no one at Acer had even the slightest clue. I only have a limited supply of time and energy and I prefer to not waste it chasing after Acer all day. I still have not gotten my copy of Windows 7

Flash forward one year. I just purchased a new Netbook. I made the mistake (against my better judgment) to purchase another Acer. Of course Acer couldn’t help themselves and had to screw up yet again. It came preloaded with Windows 7 (how ironic) and I decided to dual boot it with Arch Linux. After partially completing the setup, the time came to partition my hard drive. The partition manager, cfdisk would not even look at it: Overlapping Partitions. You have got to be kidding me. So I searched this issue. After reading a few threads, this problem started to smell slightly fishy. The more I searched, the more strange this got. I have a feeling (just a feeling) that some clever developer overlapped the partitions slightly (probably a few kilobytes) in order to prevent me from installing Linux on it. That’s what I like to call TERRIBLE. I purchased this computer, I can put whatever OS I like on it. Apparently not. I eventually ended up settling for Ubuntu, whose GUI partition manager did not complain about the strange partitions. That’s the end of my rant, how does it feel that I did succeed in installing Linux on my Netbook Acer? By the way, I am still waiting for my copy of Windows 7.

IronKey Personal 1 Gigabyte Flash Drive Review

Today, I just received my new IronKey USB flash drive. I have been looking at this flash drive for a while and I finally decided to purchase one. For those of you who have not heard of the IronKey before, it is a super rugged, super secure USB drive. I won’t go into detail about all the features here, as they are all available on the IronKey website. I have also included some pictures with this review, as there are not too many good pictures of this device on the web. After unboxing the IronKey and trying it out for a couple of days, I have nothing but good things to say about it. It feels excellent, not like your typical USB drive. Very, very solid. The inside of the cap is rubber coated which allows it to slide on and off very nicely. It definitely does not feel like your normal Chinatown flash drive.

The performance is also excellent. The read/write speed of this drive is a blazing fast 27mbp/s read and 24 mbp/s write. WOW. The drive is also waterproof to military standards. It will most likely never get it wet, but it’s always good to know you have that protection. The interface is also very nice and the drive set up quickly and without a hitch (it has to generate the encryption keys the first time you use it). My favourite feature of this drive has to be the portable, secure FireFox. While a little slow, it encrypts your connections and allows you to browse anonymously. It also includes a virtual keyboard, a great tool against keyloggers. This will become very useful on public computers (school, library, etc).

The IornKey is supported on Windows, Mac and of course Linux – how can you go wrong with that! I think the IronKey software beats truecrypt, as you do not have to have administrator privileges on the computer you are using it with. My only concern, is that since the decrypting program is a .exe file, it will not be able to run on computers controlled by an over zealous IT department (Example: my school). I will have to test that. The same issue also applies to the on board FireFox. Apart from that, I love this flash drive, it is secure, rugged and looks great. What more can I ask for?

On another unrelated side note, What the hell happened to Google Docs!? C’mon Google, what are you doing? It seems every time I sign in to type something up, Docs has somehow changed. Mostly for the best, but today for the worse. This is the most unintuitive interface I have ever seen (except for iTunes maybe, but that’s another story). I like Google Docs because it is simple, but now I might as well be using Word.

Ubuntu 10.04 LTS Review

All I can say is WOW. This is by far the best Ubuntu version ever, and possibly the best Linux distribution ever. After installing the OS a few weeks ago, I have been playing around with its slick new interface, features and software. This is my comprehensive review of this amazing OS. Before I go into the guts of it, lets get a few things out of the way. Firstly, this is a LTS (long term support) version of Ubuntu. Normally, Ubuntu versions are supported for 18 months only. That’s not that long if you think about it. After that, your on your own. I think that this is a major barrier, which is preventing people from installing Linux on their desktops, laptops, business computers ect. Since 10.04 is a LTS version, it is fully supported for 3 full years. That’s a BIG deal, and since LTS versions come out ever 2 years or so, this is an even bigger deal. Secondly, version 10.04 (Lucid Lynx) has made Ubuntu a serious contender to compete with the big boys, Windows and OSX. What’s better than that? Speed. Lucid Lynx is a speed demon. It boots in about 10 seconds for me, what more can I ask for? Well, I can safely say, that it is installed on a single core machine with 1GB of RAM, and it runs faster than my Dual Core with 4 Gigabytes of memory. That’s what I call fast. So I will jump into the review and share my thoughts (and some issues) with Lucid Lynx.

Installation
I waited a few weeks after the initial release, in order to allow time for the bugs to be worked out. I upgraded to 10.04 using the update feature included in version 9.1. Using the update manager, it took a total of about 2 hours to complete the update, and with no errors. I read a number of issues of people complaining of issues pertaining the automatic upgrade, but I appeared to have no problems. However when I turned off my computer, and went to turn it back on the next day, I noticed that my computer would not boot properly. It would get stuck and hang at the purple Ubuntu splash screen. How annoying. I read that many people had experienced this problem, but none had a specific answer. I guess waiting didn’t spare me any headaches. Oh well. I spent all day trying to fix the problem, but to no avail. While it was stuck, I could hear no movements coming from the hard drive, which is strange. I could press ctrl+alt+f1 to drop to a shell prompt, and that would work perfectly. It appeared that the system booted perfectly but Xorg was not starting correctly. I eventually narrowed the problem down to a graphics driver issue. Lucid uses a new graphics driver, nouveau which is the default for Nvidia based machines. Xorg did not like it for some reason. After an entire day of trouble shooting, I figured I might as well have a fresh install anyway. So I made a live CD, and successfully installed and booted from that. I have also read that others had issues with the installation as well, particularly with the update manager method, but with the live CD method as well. Thankfully the latter worked flawlessly for me. Unfortunately, my installation was less than satisfactory. Hopefully, those issues will be addressed in the next release.

Visuals
Holy Shit. Lucid Lynx looks amazing. Gone are the days of the horrible orange and brown color scheme. 10.04 has a new dark gray and purple color scheme, which really makes the OS look simple, refreshed and refined. The icons have been redesigned with the gray and purple scheme and it looks incredible. As always, the Gnome color scheme is easily customizable. The default wallpaper is also really slick. I personally like something a little more flashy, but many people could use the default one. As an aside, Cairo Dock has also been greatly improved. It includes a bunch of new themes and really blends in with the rest of the OS. In 9.1, I found Cairo Dock to stand out a bit. This is not the case anymore. You really have to see the new design to really appreciate it fully. I personally think this is what sets Ubuntu apart from any other Linux distro. This new look allows Lucid to compete with the look and feel of Windows 7 and OSX.

Features
There is so many new features included in this release. Ubuntu has included a new social menu, which is really neat. It pulls all of your Facebook, MSN, Twitter and many other social networking sites into one interface. No other mainstream OS has this and it is defiantly a defining feature. 10.04 also includes a number of media editing software as well. Firstly lets get this out of the way: Gimp had been removed, and is no longer installed on default. Canonical thought that Gimp is just too intense for the average user, and chose to remove it. This seems to have a number of people reeling, but it can be installed using Synaptic in a matter of seconds. As an alternative Lucid includes F-Spot for managing photos, and going along with the social network integration, integrates great with Flickr, ect. Ubuntu now includes a video editing program, PiTiVi (say that three times fast). The program looks capable, obviously a higher end program would blow PiTiVi out of the water, but I don’t see why it wouldn’t work perfectly for editing a family movie. Unfortunately, Bluetooth is no longer officially supported (not that it was ever really polished anyway) but is still shipped with Bluetooth tools installed. I think that is a big mistake. Bluetooth is a GREAT little system, and I think more people would user it if it was more refined with Ubuntu, as it never had great Bluetooth capabilities/support. I know I will be missing having support for Bluetooth.


Later On:
10.04 is probably going to be the last Ubuntu release to not have the new Gnome 3 desktop. I have seen videos of Gnome 3 and I don’t think I like it. Lucid has Gnome 2 installed, and I like it a lot better. 10.04 was originally intended to have Gnome 3 installed, but it was not ready, so they included Gnome 2 instead. I have not actually tried out Gnome 3, but after watching a few videos, I think I will want Gnome 2 back. I guess I will just have to enjoy Gnome 2 while it lasts.

The End
Obviously, I can’t cover everything in this review as there is so much. The bottom line is: this is the best Linux distro EVER. For all my installation problems, it was well worth the hassle. Like I mentioned earlier, this is the release that makes the Linux desktop really comparable to Windows and OSX. And that’s a pretty big deal if you ask me.

My Router, DNS Issues And Google

When you know the number codes to talk to a support technician on a company’s support hot line, you know you have a problem. Unfortunately I know that pressing 1,1,1,4 on your phone will get you talking with a real live person when dealing with D-Link’s customer hot line. It’s a shame I know that. Ever since I got my new router (DIR615) I have had nothing but problems with it. The router works well, but I have been having issues with my DNS. Randomly, with no rhyme or reason, my browser “could not find server at google.com”. Interestingly enough, no other sites experienced this problem. This intermittent problem happened about once a week. This issue happened on all computers, and went away when I plugged my computer directly into my modem, proving my router had issues. The only solution to this problem was to run downstairs, flip the power button on my router, and run back upstairs again. This running, flipping, and running again method worked. Extremely annoying however if you are in the middle of a MSN conversation, or SSHing into your iPhone. Extremely fed up with this problem, I have been desperate for a solution. I have called D-Link numerous times, in hope of getting the slightest hint to what was my problem. I did not expect to actually solve this problem, but to get a hint. As expected, I had to go through  the “level 1 support technician” ideas, before I got to actually solving the problem. After reformatting my router numerous times, updating the firmware, and resetting router’s network settings, as advised by the guy on the other end of the phone, my problem was still not solved. I prefer to not deal with tech support, but in the case of this problem, I did not know what else to do. On one particular phone call, the guy told me to reset my wireless settings. All of my computers are on a wired connection. After asking him numerous times, and in numerous ways “why will resetting my wireless settings, solve this issue on a wired computer?”, he was still pretty convinced it would. So I go through and reset my entire wireless network and settings. That did not work, obviously because all my computers are wired. This seemed to be news to him, although we had discussed that the network was wired no less than 5 minutes prior. When I politely reminded him the computers was connected to the network though a wired connection, silence ensued on the other end of the phone. I will also add that all the people I talked to were very polite and did they’re best to help. As an interesting side note, the server at google.com/ca, Docs, ect could not be found, while the servers at Maps could. Interesting. I suspected a DNS problem at the start, and yesterday my suspicions were finally confirmed. It turned out that the IP address that my ISP was providing was causing issues with my dynamic DNS. I simply had to set a static DNS. I changed my primary DNS to 4.2.2.2 and my secondary to 4.2.2.3. Finally, this actually worked. I changed these settings when the address at google.com could not be found. It fixed the problem without rebooting the router! Looking back, this makes total sense. I originally though I was doing something to trigger this problem. However, it seemed to happen at random. This “random trigger” must have been when my ISP was changing my dynamic IP, messing up Google in the process. I am really happy this is fixed for good, after all, I was getting really tired of running downstairs to flip the power on my router!

Why I Am Excited About Chrome OS

The day the Google OS comes out, I will be camping out in the Best Buy parking lot, waiting for a copy to get on my Netbook. I can’t even begin to count all the “revolutionary” ideas and products when it comes to computers. Everything claims to “revolutionize” the computer world. I am almost certain that the Netbook will accomplish this. Sure, mobile Internet and computer technologies already exist. I can take my laptop with me anywhere, with a mobile Internet stick and surf the net and accomplish day to day tasks on the bus or at Starbucks. I can even do that on an IPod touch. However this “solution” still leaves many things to be desired. The first reason a normal laptop is not the best for lunch in the park is the fact that its simply too big. The Netbook is easy enough to carry under your shoulder and take with you everywhere. The neat thing about that is a computer the size of a Netbook would have cost you over 2000 dollars a few years ago. You can now get a Netbook for less than 400. However, I personally think Netbooks will become MUCH cheaper than this. C’mon, you get a 120GB hard drive, 1GB of ram, a cheap screen and plastic case for 400 dollars. This is where the Netbook will revolutionize the computer world. Once these computers flood the market, I’ll take bets you can get one for 199 dollars or less. I personally think today’s laptops are cheaply made anyhow. You don’t have to spend too long in your local electronics store to find a laptop with a bunch of busted keys. You get a few scratches, whatever it only cost 199 dollars anyhow. At that rate you can get a new computer every other year or so.

I will admit, the keys of a Netbook are rather small. But I’m sure that when your neighbour gets a 200 dollar laptop, you’ll be impressed too. Its the Google Chrome OS however, that’s the most exciting to me. I first read about the new Chrome OS on the way home from the UK. I was mildly interested and made a mental note to research it later. Well a few clicks later there turns out to be a fair amount of information on the Internet about it. And the more I read, the better it sounds. How can you go wrong with a super fast, super light Linux based OS? While there has been much talk in the tech world about this new operating system, not too much is actually known. I have a feeling that this Linux based OS will not include a file structure. I honestly have no idea how they can have a quick booting, no additional drivers or updates system while including a file structure. It’s simply not possible. Microsoft spends millions of dollars maintaining their equipment and providing you with “service packs” and such. If this is true, then I think everything will become an “app”. You want Photoshop, you get the Photoshop app. You get the idea.

I also believe there will become a few “Google Haters’. There’s already die hard Microsoft haters and Apple ignorers like myself. But if this thing boots up in under 10 seconds and is lightning fast, I think other people will find it hard to resist too. I’m not sure how long it will take for this Netbook thing to takeoff, but if I was Microsoft, I would be getting worried. This battle is just starting to heat up, and you can find me first in line to buy a Google OS Netbook!

Windows Vista Review – Part 2

If you haven’t been following, scroll below to catch up. So I have been running Vista for a few weeks now. A have a few issues, but I do like some stuff. Lets go over the basics first. I was pleasantly surprised to find that it has not gotten any slower over the last few weeks. The Vista interface also looks much better than XP. My issues:

Vista to Win 98 networking is TERRIBLE!
SD card reader does not work (I blame that on Acer)
All the stupid crapware it came with
and last but certainly not least : my computer

One of my Mac obsessed friends once sent me a screen shot of his Mac file manager. It had 4 folders and he said “look at that amazing organization”. The Vista my computer reminds me of this. Just terrible. They changed it for the sake of change. Its the most pointless piece of crap ever. I hear the computer in windows 7 is even more changed.
My only question is “whats all that different about Vista?” Yeah, they put in a few questionable features. Like the cool window viewer and the sidebar thing. High cool factor, but totally pointless. Aside from that, its just a visually improved XP. I don’t understand why you would upgrade from XP just for a few pointless features. And XP networked with older versions of Windows FLAWLESSLY! I get a free upgrade to windows 7. I will try it out and see what happens. I am happy to see that I don’t have the problems that came with earlier versions of Vista, but i am still disappointed. But hey, I happy that I finally upgraded!



Copyright © 2013. All rights reserved.

RSS Feed. This blog is proudly powered by Wordpress and uses Modern Clix, a theme by Rodrigo Galindez.