Ubuntu After a Weekend

So, I've played around with Ubuntu a bit this weekend. Here is my brief rundown:

1. I have access to a lot more of my computer with it installed without having to do anything really, which rocks. Touch pad (the horizontal scroll thing I mentioned before), wireless networking, and sound mainly. I had a problem in Eclipse where if I tapped the touch pad it would paste whatever I had in my clipboard to whatever file I was viewing at the time. A lot of errant clips got into Java files, and I'd get errors on compile and was like "PC LOAD LETTER?!?!" I'd find it and wonder what it was doing there... eventually I found out the touch pad caused it. I downloaded qsynaptics (since all touch pads really use the Synaptics touch pad), and disabled tapping. qsynaptics is a program that basically modifies the touch pad part of your Xorg.conf file in Linux. It solved the problem. I don't use tapping anyway.

2. I've noticed it's a lot slower than Gentoo was running on the same exact machine. I looked up some speed hacks and tried them out. Most of them were for program loadup times and boot times, speeding up internet access by disabling IPv6, etc. It seems my hard drive is a lot slower. I took pride in Linux against Windows because when I ran Gentoo, the ANT script that would take 20-25 seconds to run on Windows now only took 4-9 seconds. I forget what file system I had on Gentoo, but I know the latest Ubuntu (Feisty Fawn) which I have installed, uses ext3. There's a lot of extra data, apparently, that gets written with each file, and my ANT script is all about copying files.

3. I am helplessly devoted and accustomed to my MacBook Pro. After using Ubuntu for two days, which is also supposed to be the most user friendly Linux (from my experience it is way easier than Gentoo), the Mac just blows it away still. I should try getting my development environment moved over to the Mac, but Java on the Mac is weird. I haven't delved down that road yet, whereas I know exactly what I'm doing when I get a development environment set up on Linux.

4. I tried getting a Windows share (SMB) set up on Ubuntu so I could occasionally log in an copy files or whatever. I set it up to where the Mac and my Windows PC could see the computer on the network, but they couldn't connect to the shared folder on Ubuntu. That kind of matters, actually, because I want to get a server set up with loads of HDD space so I can have all of my gobs of data on there instead of on a computer where I only view those files. I don't need to store every file I have distributed over all the computers I have. I'd like to have my music, movies, and a backup of code, maybe a webserver also, running on a server with a free and good operating system.

5. You learn a lot about Linux when you don't run it in root all the time. I had to set up Gentoo, like I said it was like building a house, compared to Ubuntu which is like a fully furnished modern house that you can just move in to. And there's this one part where you have to modify the script that runs when a new user is created, to copy files into their home directory for default settings and whatnot. I could just never get it right. So, I always ran as root. On Ubuntu though, it sets you up to have an account that's not root. You still have root access with the "su" or "sudo" commands when you need it. But you find out more about how security works in Linux. What folders you wouldn't normally have access to (basically, everything except your Home folder), what those other two numbers mean in "chmod 777 filename". All I know is if the first number is 7, and the other two aren't, and root owns the file.. you can't do shit with it. Actually, it's simple. 1 is read, 2 is write, 4 is execute. Or something like that. So if you have all of them, it's 7, or just read is 1, etc. And you notice that it probably took a lot of time to either a) make as many programs not require root or b) catalog which ones need root. Windows hasn't done this until Vista, which it doesn't even do a good job of from what I hear. I'm holding off on Vista until it's absolutely necessary or I can do without it until the next version. Depends what games require Vista, basically.

Probably the answer to my speed-up prayers is a new laptop. But I'd get another desktop before a new laptop, since I can build a desktop, and I can put all those hard drives in it and store all my data. Relatively cheaply too. Time for bed.

Development Underway on Ubuntu!

I've added a new feature this weekend. It would have only taken me about a half hour, but I encountered some major problems on the way. In my ORM system which I call "Dumb", table aliases were previously generated a stupid way. If a table referenced another table, and the two tables were possibly at the long end of a list of joins, it would generate table aliases something like this:

User_UserId_Bio_BioId.BioId

which would be joined from a table with an alias something like this:

User_UserId

This seemed to have worked well for a while amazingly. However, when I tried to build my latest addition, I ran into problems because my User table was being referenced towards the tail end of two different branches in the so-called "join hierarchy". Through much trials and tribulations, I eventually ended up creating a class called "JoinHierarchy" so I could get consistent and unique table aliases. I created a thing called "NewsPicture" which basically links a News item (what you're reading) to a Picture. There's also a "NewsDownload" so I can list downloads as well. Here's what NewsPicture and its join hierarchy looks like:

NewsPicture [PictureId, NewsId, Sequence (for ordering)]
PictureId -> Picture -> PictureAlbum -> User -> Bio
NewsId -> News -> User -> Bio

So as you can see, User and Bio were being joined twice but under the same alias, so MySQL has a problem with that, as well as any database management system out there. Now, each object that can potentially be saved to the database has its own join hierarchy that you can just call up whenever you need a table alias or to get all the joined fields or join statements (including left joins if something could potentially allow null). Take a look at the images and downloads below!! I'll just throw in some random ones this time.

Development Environment Set up on Ubuntu


Wow, Ubuntu rules

It's funny to me, I've always downloaded the latest ISO of Ubuntu Linux, but have never installed it. Frankly because I don't have any blank CDs lying around. So, last night, I fired up Parallels and installed an ISO I had on my Mac, gave it a quick run through, and made the decision to install it on my other laptop which was currently running Gentoo Linux. Jared recently said he was digging Linux working alongside his Mac. He installed Ubuntu, so I figured I'd finally give it a shot. I was just afraid of losing work, but really I didn't get back into it, so it wasn't necessary that I switched operating systems.

Chances are you might not even have heard of Linux (a free open source operating system which competes with Windows, just in case you haven't heard of it), let alone Gentoo Linux, but if you were to install Gentoo Linux, it's like the super user's version of Linux. Say if you were buying a house, Gentoo would be a real fixer upper, and you could even use the analogy of it being all the raw materials and you have to put it together. Basically, I installed it on this laptop and the laptop was crippled for about 3 years (ever since I got the blasted Windows off of it). No sound, no wireless networking, my mouse pad wouldn't work right, and it took about a month to get a screen resolution that I was happy with. Ubuntu on the other hand is like a fully furnished, beautiful, modern house. You just move in and you can start living.

I installed it and fired up a game of Company of Heroes (against only 2 experts and a hard this time on Seine River). It was done before I finished the game in 41 minutes, which I would have hoped anyway. I whomped some ass in the game by the way.

When I backed up my Gentoo stuff, I have this script that I use that sets up a mount to my shared backup drive on my gaming PC with Windows XP SP 2. To do that, you have to use the smbmount command which, once you learn it, is very easy. Then you can browse to the folder that you mounted the Windows share on the gaming PC to, and just start copying files. The thing about Linux, though, is that it is easy once you learn it. But there is that learning curve, and lots of "man" pages that are pretty cryptic, and you have to figure out which options you need, how to format them, and all that other stuff. I don't mind it because I like a challenge.

Getting the files back after I installed Ubuntu, though, was as easy as going to "Places", selecting "Network", going through "Windows Network", opening up my work group, and opening up my Windows PC, "Voodoo2k7". I can then just copy files from there. If I want, which I probably will, I can use the smbmount command to set up a mount point, mount it to /mnt/voodoo, and go into the command line so I can copy stuff using "sudo" into protected directories, like "/usr/local/", since I haven't found a visual "sudo" program on it yet.

The other thing I noticed a short while ago... There's sort of a network button in the top right. I click on it, and it shows me all of the local wireless access points available! Wireless works with no setup on Ubuntu!! That's marvelous. I could have 5 wireless devices running now. In case you missed it, they are : MacBookPro, this Ubuntu laptop, PSP, PS3 (yup, I got one), and the Wii. It's a 802.11n router, so it can handle it. Ubuntu shows the signal strength of it as a sliver away from 100%, but definitely over 90%.

As soon as I restarted it from Gentoo with the Ubuntu disk in, I noticed that it instantly recognized the onboard sound and speakers. It played that nice little Ubuntu, African style introduction chime. I was like "F@#%@ YES!! UBUNTU ROCKS!!!" As soon as I got to a website that expanded beyond the visible bounds of the screen, I tried my mouse pad. It worked. I had spent MONTHS... maybe a couple of hours... trying to get this thing to work on Gentoo. I definitely spent a weekend, actually. Google "set up synaptics mouse pad on Gentoo Linux", and hit up any of the articles returned. You will see it's not easy. The "horizontal scroll" thing was what I couldn't get to work. The mouse pad worked fine otherwise.

I should have installed Ubuntu a long time ago. It wouldn't have ruled out getting a MacBook Pro, though (which is almost paid off, coincidentally), but I would have had a much better experience using Linux, and I might not have stopped using it hardcore in September. Gentoo was way beyond my capacity. I will miss "emerge" though :) Portage was nice, but Ubuntu has a whole graphical software update service. I say, if you're not using Windows for games, throw a Ubuntu disk in the drive and reboot. You won't be disappointed.

My favorite thing about having devices (weird side note... Firefox has a built in spell checker, and it underlined in dotted red, "favorite"... I switched it to "favourite" and it doesn't show any red line. I might have installed the wrong language! Although Ubuntu is maintained in South Africa or something).. oh yeah, so my favoUrite thing about having multiple devices is naming them. My PS3 is named "VoodooPS3", my PSP is similarly named "VoodooPSP", my Windows PC is named "Voodoo2k7" which was mentioned previously. My Mac doesn't have that naming appeal, and shows up on the network as "jasontconnell_s" or something. When I had Gentoo installed on this computer, I named it "gentoovoodoo". I bet you can probably guess what this computer is named... but I'll tell you anyway. "Voodoobuntu"!! Unfortunately, I've retired two computers, the original "Voodoo" computer, and my liquid cooled "LCVoodoo". Oh well.

I may never go back to the Windows Way

Parallels has pleasantly surprised me by not requiring me to use Windows keys in Windows to accomplish stuff. No longer do I have to press "CTRL+C" to copy something, or "CTRL-V" to paste it somewhere. Now it accepts that I am helplessly used to doing things the Mac way, with "Command+C" and "Command+V" accomplishing these two tasks in Windows. Marvelous.

Oh wait... I just tried to do a few things that seemed to be Windows only. "Command+Space" would be what is used for "IntelliSense" in "SharpDevelop" on Windows, but it opened up my Spotlight. Gotta use "CTRL+Space" for that. Oh well. There's a few others.

This sucks

Talk about a few horrible months. However, things are starting to look up. My connection between my MacBook Pro and my Windows PC used to be horrible after I updated my Mac to enable 802.11n, which I had to pay $2 for. My MacBook Pro has all my music on it since I run iTunes and stuff. But the Windows PC, having games and stuff to play on it, has the good speakers. I'd try to play music on the PC, and it would play about 2 seconds and then rebuffer for a longer time than it actually played. SO slow, and no way to listen to music. Today, I switched from WPA-PSK to WPA2-PSK on the router, and voila! Shit's fine.

Hmm, other bad stuff that's happened to me since the worst day of my family's life, June 2nd. Let's see. My car died partially, but thankfully for the quick aide of a neighbor senior master mechanic, it's back up and running. My DVD player won't turn on anymore. That totally sucks because the speakers are awesome and I go surround sound from my TV with it. I didn't get my paycheck from Friday until today. Meanwhile, I was broke. I'm supposed to be paying bills and stuff, and I have no money. Today the fire alarms, which Jeff had taken the care to install all connected, so if something is burning in the basement, the one right above your head in your bedroom goes off too. Today, I smelled what I was sure was urine in the one that was the culprit for all of them going off. I'm sure it was a mouse. They're taking over the world. I threw that alarm out, but I can get another one on Amazon.com, so I'll do that too. But they were going off for about an hour before I figured it out. It sucked, I was deaf for about 20 minutes. My amp died too.

After what I've been through, I'd love for something to be easy and not frustrating as f@#%@#$. F@#%@##. I hope everyone else is having a good time.