Finding Solace in Unity

Posted on: December 27th, 2011

Of all the places I expected to fix my issue with Gnome 3 and Linux window environments, Ubuntu and Unity was quite likely the very last one I would have expected. I hadn’t had any experience with Unity in the past as I jumped the ISS Ubuntu a little before Unity’s time. However, I had read about how many people despise Unity compared to the traditional Ubuntu desktop and to be honest I can’t disagree with them more. Unity seems to just work for me, the system is sophisticated and mature and allows me to work very freely and easily with developing. While I do find the Unity dashboard a bit bulky and annoying, I find that I almost never use it. That is a sign of the success of this environment, it can be used in multiple ways by different people and be useful for all of them.

So, currently, my Linux development system is a manually stripped down version of Ubuntu off of a default install of 11.10. It runs Unity and it runs beautifully. I am very pleased that I have ended up at this point and will be sticking with Unity for a while until either Canonical effs it up like Gnome did with Gnome 3 or until Gnome becomes more usable. Linux Mint Cinnamon is also around the corner and Elementary OS is maturing quickly, so only time will tell for them!

The title of this post sounds like something out a christian revival blog…

The Great Disaster of Gnome 3

Posted on: December 19th, 2011

You know, Gnome 3 is probably going to be just as good as Gnome 2 was. Gnome 2 wasn’t perfect at first either, many people disliked it. Right now however, Gnome 3 is far from perfect. To be honest, I find it unusable. The real problem is that Gnome 2 is already deprecated and losing support from software. The other day I updated and broke my Debian machine because tons of updates were being held back due to Gnome 3 dependencies. So now, I don’t know what to do. With the beautiful desktop environment I used to use bastardized into the idiotic Gnome 3, I’m running out of places to go. KDE is not an option, I can’t stand it. XFCE is alright, but altogether lacking compared to Gnome and what I’m used to and a pain to reconfigure, there aren’t GUIs for almost any settings it seems. I’m going to try Openbox but I can’t believe I’m having to go to that. Openbox is great if you need a lightweight GUI but this is my development machine we’re talking about. I want to use resources and have lots of useful features at my fingertips. I know, ultimately that I’ll just have to go back to Gnome once it gets more configurable but honestly I’m annoyed that I have to deal with this at all. I can understand bringing the codebase into this decade but its sort of expected that you’re not going to break everything and confound your users when doing so. If I was trying desktop linux for the first time right now instead of when I did 4 years ago, I probably would not stick with it. Gnome 3 is pretty and stable but when it comes to getting work done its useless and frustrating. I have almost no doubt I would have written it off not knowing that I could change my desktop environment and taken a long time to use it again.

Ultimately, I’m disappointed more than anything. Panels worked really well and was never complained about. Fixing something that isn’t broken always has backlash like this and I wish that the Gnome team had thought this out from a usability standpoint more before just deprecating Gnome 2. For now, I’m going to have to waste time migrating to another desktop environment and then, maybe one day, I can come back to Gnome and create a desktop environment that I can actually get work done on again.

The worst part is that everyone is thinking what I just typed, very few members of the Gnome community are satisfied with these changes and are having to find other desktop environments. The world of desktop Linux users has literally been sent into a chaotic mess with this blunder by the Gnome project and I truly believe its a big setback for the entire community of desktop Linux users.

What is With the Developer Hate for Linux?

Posted on: November 13th, 2011

This topic has crossed my mind before but after reading this Google Plus post I have decided I would like to pose this question in a public manner. Why are some developers so opposed to using Linux? Complaints are aimed at all different things about Ubuntu or simply Linux in general (that also brings up a secondary question, why are the developers that are using Linux using Ubuntu?) . Some complain about the UI not being simple enough, some even complain about editing a configuration file. You write code for pete’s sake! Why is it so hard to learn about the system you are using? If you can write a line of code, you are smart enough to edit a configuration file. If you are smart enough to write a line of code, you are smart enough to figure out how Gnome works. And then guess what, you actually understand how your system works and how to configure it the way you like, why would you not want a configurable system when you are a programmer? It makes no sense not to.

I know the main argument that you will here in response to this is “I’d rather spend time programming and making money than learning how to configure my system.” There is something called a capital cost people, spend a day or two (yes, it only takes a day or two to learn most things) and you will benefit from it forever. Then you don’t have to pay for your OS anymore, you will become a stronger programmer because you can use the terminal (IMO you’re not even a programmer if you can’t use the terminal, that’s just sad), and you can stop complaining and sounding ignorant on Google Plus posts ;) .

Am I way off here in assuming these are the reasons why some developers hate on Linux? I can understand certain situations such as developing on a mac so you can make iPhone apps (even if it is evil). The issues that I was addressing are clearly different from that however.

Synchronizing a MySQL Database with Git and Git Hooks

Posted on: October 29th, 2011

When I develop web based projects I often use a MySQL database to hold the data for my project. I also use git for source control and since I tend to work on my projects from several different computers I push and pull from a VPS of mine. This system works great for keeping all my source code in check and is easily accessible. However, I have had one issue. I was having to create a testing instance of my MySQL database on every computer that I pulled onto and worked from. This was a waste of time and also resulted in inconsistencies in my testing data which became confusing at times. I decided that I had had enough of this and set out to find a solution.

I found an article by David Eisinger entitled “Backup your Database in Git” in which he suggested using mysqldump and simply adding the dump to the database. While I had hoped for a more elegant solution than simply dumping your database every time, it would certainly work. He also suggested using cron to schedule dumps. David wrote this article describing a way to backup a production site, which cron would work fine for, but for me it would have to be a little more complicated as I wanted an updated database on every commit.

To automate the process of dumping and restoring my database dumps I decided that git hooks would be able to do the job. I had recently worked with git hooks as a way to deploy website updates directly from a git database. Using the pre-commit hook and the post-merge hook, we can create a system  that will automatically dump and add your database to each commit and update your local database from each pull.

Let’s start with pre-commit. The pre-commit hook will run a script directly before a commit is executed. To edit your pre-commit hook:

[your editor] /path/to/your/repo/.git/hooks/pre-commit

Now, lets write the pre-commit script. We are going to tell the system to dump our MySQL database to our git repository and add it to be committed.

1
2
3
4
#!/bin/sh
mysqldump -u [mysql user] -p[mysql password] --skip-extended-insert [database] > /path/to/your/repo/[database].sql
cd /path/to/your/repo
git add [database].sql

Now, lets write the post-merge script. We are going to tell the system to restore the MySQL dump to the local database for the latest changes. Edit the post-merge hook with:

[your editor] /path/to/your/repo/.git/hooks/post-merge

And write:

1
2
#!/bin/sh
mysql -u [mysql user] -p[mysql password] [database] < /path/to/your/repo/[database].sql

Note that in both in the mysqldump and mysql commands, there is no space between the -p and the password.

That is it! Now your MySQL database will be pushed and pulled with the rest of the commit and the pre-commit and post-merge hooks will handle the importing and exporting of the dumps.

Need for a Portable Web Development Environment

Posted on: October 26th, 2011

As a high school student, I spend about half of the time that I am awake at school. Therefore, if I want to really work on a project, I have to do at least a little coding at school in one of my classes that makes use of computers. Unfortunately, setting up a portable development environment that can run off of my flash drive has been a bit of a trick, and thus far not completely successful. The system administrators don’t take very kindly to students who have knowledge of computers, they seem to believe that we are just smart enough to be a danger and therefore love to set up obnoxious settings that make my life that much more difficult. Despite their arrogance, I manage but it involves a lot of work just to get an environment running each time I want to work. Often the most tedious task is simply copying over my environment to my personal network drive from my flashdrive (as the running of programs directly from flash drives has been disabled). Transferring XAMPP over is a huge hassle, with over 4,000 files it takes at least 10 minutes.  Therefore, I think that a little love for the portable web developers is needed.

I propose something like an Eclipse style IDE. The IDE runs a  portable web server on the local computer and will test for you at the click of a button. Built in git support is also a must. That alone would save me the copying of Notepad++ Portable, Git Portable, and XAMPP portable. Instead it would be an easy to use and quick to get running. Another issue that would need to be addressed is the unnecessary networking restrictions often put in place by administrators. Currently XAMPP Portable has an issue running on it’s own and requires extensive modification to run. With a little bit of checking the IDE could figure out the required settings for the host computer and run without complaint.

I may attempt to develop this in the future because unfortunately I am far too busy with my senior year to be able to take the time out to do a project of this caliber any time soon. I am certain it would end up unfinished. Also, as I will be graduating and moving on to college next year, my need for this sort of thing will be gone soon. I am sure that I am not the only student out there with this problem however, so I decided it would be a good idea to outline the idea for someone else in the future or if I get really bored in college. No idea if that will happen or not, lots of things are set to change for me in the next 12 months.