Chris Jean
Linux, WordPress, programming, anime, and other stuff
  • Home
  • Linux
  • Development
  • Random Ramblings

Archive for Development – Page 2

Git Submodules: Adding, Using, Removing, Updating

by Chris Jean
April 20th, 2009

I’ve spent a little more than a month working with Git now. I can honestly say that while there are many things that I like about Git, there are just as many things that I personally find to be a pain in the butt.

Submodules specifically have managed to be a thorn in my side on many occasions. While the concept of submodules is simple, figuring out how to actually work with them can be a chore. I say “figuring out” because not everything about working with submodules is well documented. I’ll cover two of the more difficult things to figure out: removing and updating submodules from your repository.

Read More→

Categories Development, Tips 'n Tricks
Comments (44)

MySQL Natural Sort Order By on Non-Numeric Field Type

by Chris Jean
April 19th, 2009

I recently worked on a project where I had to sort a set of rows returned from a MySQL query. The problem is that most of the data in the field being sorted is numeric yet the field type is varchar since some of the entries contained characters.

The reason that this is a problem is that MySQL sorts character fields using a method that will produce undesirable results with numeric data. For example, sorting 4, 10, and 50 as character data produces 10, 4, and 50. In most applications, this is highly undesirable.

The solution to this is to force a sorting order that is commonly referred to as a natural sort. Natural sort is just a term that refers to how humans would commonly sort a set of information (numbers as numbers and non-numeric characters alphabetically). Fortunately, this isn’t difficult to achieve in MySQL.

Read More→

Categories Development, Tips 'n Tricks
Comments (4)

Goodbye Subversion, Hello Git

by Chris Jean
March 17th, 2009

As I mentioned before, I want to switch from using Subversion for project code collaboration and versioning to Git.

I’m switching not because I have some idealogical dread of Subversion or its methods. In fact, I quite like how much easier Subversion has made handling code collaboration. The problem I ran into is that Subversion has become doggedly slow and bloated.

For example, a simple project with a current working size of 2.9MB has a Subversion repository that is a massive 98MB in size. Furthermore, it takes a full four minutes to commit a change, even a simple one-line change to a text file. During this commit process, my server’s dual quad-core processors are essentially maxed. Why the repository has become so amazingly large and why the commits take so long, I’ll never know. The maxing out of my server for four minutes per commit is also unacceptable since there are times where minor changes will need to be made to more than a dozen repositories at a time. Multiply the number of commits by 4 minutes a piece, and not only is a terminal on my system tied up for more than an hour, but my server’s CPU is maxed for just as long.

Beginning last week, I dug into Git and learned what I needed to know. The initial impressions are great; however, Git is not without its problems either. The primary problem with Git is that its syntax is extremely-obscure, IMHO.

Read More→

Categories Development, Linux, Random Ramblings
Comments (0)

Run Virtual Machines Without the Host OS

by Chris Jean
March 14th, 2009

These days, I really want to dabble around more with virtual machines. They have a lot to offer for benchmarking and failover protection. However, I always thought that you needed a host OS to run the virtual machines in. In my experience, this was clunky at best and riddled with problems such as automatted startup of virtual machines, stability of the host OS, and degraded performance.

I’ve used virtual machines lately with Sun’s VirtualBox, a free virtualization platform that can run virtual machines. This has been valuable for testing different distros, but wouldn’t suffice for running virtual servers. At least, it wouldn’t based on my experiences.

I have a friend that has worked professionally with virtualization technology for a few years, and he pointed me to a VMware product called ESXi. Not only is ESXi free, it runs as the native OS in which other OSes can run virtually.

I have yet to test it out, but it shows great potential. If you have any experience with ESXi, I’d love to hear it.

Categories Development, Linux, Tips 'n Tricks
Comments (2)

Convert DOS-Formatted Files to Unix-Format in Ubuntu and CentOS

by Chris Jean
March 8th, 2009

Have you ever seen a bunch of ^M characters in a text file? This odd character at the end of a line can also be represented as a Ctrl+M or <CTRL>M. You don’t know what it is, and you want it to go away.

Today, I’ll help you understand what that odd ^M character is, why it is in some of your documents, and how to get rid of them.

Read More→

Categories Development, Linux, Tips 'n Tricks
Comments (0)

Multitasking from the Linux Command Line + Process Prioritization

by Chris Jean
March 6th, 2009

Did you know that you aren’t limited to working on one thing at a time while on a Linux command line? You can actually “minimize” a program that you are in, get back to the command line, and then return to the program whenever you’d like.

When you run a program or script on the Linux command line (from now on referred to as the shell), you are creating a new job. For those that are used to GUI environments, each of these jobs is somewhat like a window on the desktop. Just as you can have multiple windows and switch between them, the shell is capable of managing multiple jobs and allows you to switch between them.

There is a lot to cover, so let’s start simple by describing what states a shell job can be in.

Read More→

Categories Development, Linux, Tips 'n Tricks
Comments (18)

Using Vi/Vim as a Command Line Editor

by Chris Jean
February 27th, 2009

In many of my Tips ‘n Tricks or tutorial posts, I have commands that involve editing/creating files in Vi. For those that have never used Vi, it can be a daunting experience trying Vi for the first time.

There are many holy wars fought over the best editor to use from the *nix command line. I won’t claim that Vi is the best; rather, Vi is simply what I’m used to, it’s powerful, and it is always available on servers that I work on.

In order to best help those that don’t know how to use Vi but are interested in learning, this will serve as a very brief tutorial on how to get started.

Read More→

Categories Development, Linux, Tips 'n Tricks
Comments (2)

git: “Project description file hasn’t been set”

by Chris Jean
February 21st, 2009

I’m playing around with git as a possible replacement for Subversion (svn). I’ll probably blog about my reasons for wanting to switch and also have some tutorials. For now, I wanted to quickly share the fix for a problem I encountered that wasn’t really handled by the documentation.

I set up a bare remote repository to test git out. Everything looked good as I got this going, but then I hit a big snag.

When I tried to push the local repository back to the remote repository, I received the following error:

Read More→

Categories Development, Linux, Tips 'n Tricks
Comments (5)

Proper Adobe Flash Support on Ubuntu 64-bit

by Chris Jean
February 20th, 2009

In one of my earlier posts, I talked about setting up Ubuntu 64-bit on my Dell Studio 17 laptop. I provided some information on how I set up Flash on my system. This solution used the 32-bit release version of Adobe’s Flash plugin and nspluginwrapper to allow the 32-bit plugin to be used with the 64-bit version of Firefox. I had just a few problems with this solution:

  • Google Analytics would crash the entire browser if I tried to change the date range.
  • Hulu would always take at least a minute to load any video. Full length videos would sometimes take as long as five minutes to load.
  • Youtube would often times not work correctly.
  • Random parts of certain Flash applications would not work at all.
  • The new Hearts of Space Flash player didn’t work.
  • All too often, all Flash apps would fail. This resulted in every instance of Flash being replaced with a light-gray background.

Fortunately, I found a great solution to this problem: an actual 64-bit Adobe Flash Plugin.

Read More→

Categories Development, Linux, Tips 'n Tricks
Comments (9)

SSH Tutorial for Ubuntu Linux

by Chris Jean
February 19th, 2009

I touched on this topic in my First Day with Ubuntu at the Office post under Accessing Remove File Systems; however, I thought that this deserved its own topic.

For those that don’t know SSH stands for Secure SHell. In very non-technical terms, SSH allows you to access a system running a SSH server over a network. This other system can be another computer in your home or a remote system on the other side of the planet. SSH will allow you to connect to that other system and communicate with it securely. All the data passed back and forth is encrypted, so you don’t have to worry about people sniffing your passwords or valuable data.

You may be asking what all of that means to you. What it means is that you can connect to and control a computer that is somewhere else with the computer that is sitting right in front of you. If you have a remote webserver running Linux, SSH will let you install software, edit files, change the server configuration, access the database, and more. Did you forget a file on your computer at home? No problem, just SSH into your home computer and send the file to your email account or copy it directly to your office computer.

Hopefully those quick examples of what you can do is enough to whet your appetite.

Read More→

Categories Development, Linux, Tips 'n Tricks
Comments (0)
« Previous Page
Next Page »
Chris Jean
Copyright © 2012 All Rights Reserved
iThemes Builder by iThemes
Powered by WordPress