Whatever you do will be insignificant, but it is very important that you do it.
- Mahatma Gandhi

Tuesday, November 03, 2009

Software Bugs Abound

I just reloaded my work laptop with Ubuntu 9.10.  For the most part, I love it.  It's done well on most everything I've thrown at it.  However, this afternoon I ran into a few issues.  As usual, the problems came fast and furious while I was trying to get some important things done.  The first issue I had was with the vpnc Network Manager integration.  After installing and inputting my information, it began giving me an error about missing some keys.  After a little bit of research on the web, (more than I wanted to do when I was trying to hit a deadline), I discovered that a few people had their problems resolved after a reboot.  I gave it a shot, and it works great.  Then, I needed to check my email on a vmware server 2 installation at work, so I put the address into the bar and....Nothing.  After several tries, I noticed a ton of errors in the error console.  Some more unwanted searching resulted in finding out the VMWare Server 2 doesn't support Firefox 3.5, or at least didn't in the version of VMWare Server that I was running.  More updates.  When it rains, it pours.  Hopefully I can get things figured out so that I can get down to business.

Monday, August 31, 2009

Internet Explorer Javascript Bug using Subscripts

While working on a project for somebody at work, we found a situation in which some script was working perfectly in all browsers, but was crashing in Internet Explorer 6.0. It turned out that if you use subscripts to access characters from a string, it gives an error. You have to do string.charAt(0) instead of string[0]. Just thought it would be something nice to note, if you ever have problems with that.

Thursday, August 06, 2009

Configuring Subversion with Apache

For work, I've been tasked with creating a subversion server that uses apache for an access layer and for authentication. To get this working, I decided to compile both subversion and apache from source. This allowed me to get the latest versions of both tools, and to be able to specify portions that I wanted either included or excluded.
The first thing that I did is to compile apache. I used the configure line:
./configure --prefix=/opt/httpd --enable-mods-shared="all"
The make; make install;
Then I configured subversion with the following options:
./configure --prefix=/opt/svn --with-ssl --with-apxs=/opt/httpd/bin/apxs --with-apr=/opt/httpd --with-apr-util=/opt/httpd
Then make; make install;
One problem I ran into was that initially I didn't have the apr-util portion added, and it didn't seem to work. I'm not 100% sure that it ended up being the problem, but it shouldn't hurt.
After that, I created a repository using svnadmin create and then added the location to the httpd.conf. Then I tried to access it over the http using a browser. It seemed to not work. I found on the web that many people had apr mismatches and things like that, but I ruled that out after some searching. Then I realized that the problem was possibly a permissions issue, so I changed the permissions on the repository. I tried again and things were still not working. Finally, I found a resource on the web that indicated that you might need to check permissions on directories above the repository. In this case, I had created the repository as root on /root, and I had to change the permissions of /root to allow apache to access it. Everything seems to be working now. Hopefully anybody else who is trying to make a setup like this will benefit from this information.

Thursday, July 23, 2009

Interesting Advice on Money Management

Found an interesting article today, which was linked off of lifehacker.
http://www.fivecentnickel.com/2009/07/22/save-money-by-questioning-your-purchases/
Sounds like a great idea that lots of us could benefit from. I know that I've certainly made purchases that within a few days I was wishing that I could have back. Anyway, I think this is a great idea that I'm going to try to implement in my life, and I hope it helps others as well.

Thursday, July 09, 2009

Renaming a Tool Suite

At work, we're generating a "next generation" set of tools. We wanted to create a new name to help differentiate the new tools from the old tools, but we also wanted to start with the same code base as the old tools. To accomplish this, we needed to change all references to the old name into the new name. To do this, I used the following commands:
This one finds the actual files and directories with the "Old" names and changes them:
for f in `find | grep Old`; do export A=`echo $f | sed 's:Old:New:g'`; mv $f $A; done;

The short explanation of this command is that it finds all files with Old in the filename, then determines what the filename would be replacing Old with New, and then moves the file. This may have to be run several times, since the parent directories may be renamed before the child directories are reached.

Then we had to replace all references to the Old tool name in the actual files:
find -exec sed -i "s:Old:New:g" {} \;

This just finds all files in your directory, and uses sed to do an "in place" substitution of Old with New.
Hope this is helpful to somebody!

Tuesday, May 19, 2009

Skunked!

I finally got out fishing for the first time this year. For my destination, I chose McTucker Ponds, which is close to the northeast end of American Falls Reservoir. It was a surprisingly quick tritp and didn't take near as long to get there as I thought it would. When I first got there, I followed a sign that said Boat Ramp. This took me to several spots along the river, but nothing that I would classify as a pond. I threw some spinners and salmon eggs in but wasn't getting much action. I was planning on doing some shore fishing, so I didn't bring my waders or pontoon boat, and it made it very difficult to get to the spots on the river where I thought any fish would be. Finally, I decided that I had to have missed something, so I went back to the entrance ey wand went straight instead of turning at the Boat Ramp sign. This yielded a much friendlier looking location. There
were a series of small ponds. Each one had a dock or two and you could drive to about anywhere you wanted near them. I fished 3 or 4 of the ponds for a while. I tried spinners, some worms, more salmon eggs, and some lures that I got at Sportsman's Warehouse while they were closing, but I had no luck. It didn't help that the wind was blowing quite hard, which made it hard to make some of the casts that I wanted to make. I didn't stay for a very long time, but it was nice to get out again.
Today, I was feeling the urge to give it another shot, however, I didn't feel like heading out for another guarantted skunking, so I did what many books that I have read said to do and called Fish and Game. A very nice lady told me that there had been a fish kill and they had not stocked the ponds yet. I was very happy to learn that it wasn't strictly my fishing skills that left my cooler empty, but sad that my anticipated trip was cancelled. Oh well, I will just have to keep in contact with Fish and Game and see if I can get a head's up when there's actually a fish or two in the ponds.

Friday, April 24, 2009

openSuse 11.1 vs Ubuntu 9.04

Recently, there were a couple of new Linux distribution releases that have been causing quite a bit of buzz around my workplace. Many of us have become fans of Ubuntu, but have used Suse for quite a while, so we like to stay informed of where each of the distributions is currently at. I installed Ubuntu 9.04 on my laptop, and had the opportunity to install openSuse 11.1 on an identical laptop for a co-worker. This gives me a moment to briefly compare a few of the things I found in the very short time that I had with the Suse box.
The first thing that I didn't like with Suse is that the wireless card, which in this case was a broadcom card, didn't auto-install. I had to search the internet, and finally found some pages that referred to running the following scripts:
/usr/sbin/install_bcm43xx_firmware
/etc/init.d/network restart
After these scripts, the wireless worked as expected. I found it kind of sad that I needed to connect to the internet and do some searching when the scripts were already with the installation. I wish it would detect that I had that type of card, and offer to run them for me. I liked Ubuntu much better, as it seemed to handle this in a fashion that would be easier for a new user to get running.

Also, openSuse seemed to be trying too hard in the looks department. It had a lot of transparency and floating menus. Kind of weird. Just didn't have a really appealing look to me.

Friday, April 10, 2009

More LibJPEG Fun

As I was compiling the jpeg library, I kept getting errors about ./libtool not being found. It was an easy fix, all I had to do was to change ./libtool to libtool in the Makefile, but I didn't want to do that every time, especially because I was trying to automate and script the build. I found an article that showed passing variables to make, and that seemed to solve my problem.
make LIBTOOL=libtool
That way, I could put it into my build script and everything would be happy, still using
the latest tarball untouched off the internet.

Thursday, April 09, 2009

Apache2, PHP, and LibJPEG

I'm configuring new server software for our internal webserver at work. I went through the build several times, and it kept complaining about not finding libjpeg.so. I finally figured out that you need to pass the configure --enable-shared or --enable-static in order to make the libraries build. Just thought I'd pass along this information, and hopefully save somebody some headache.

Friday, April 03, 2009

Read Only File and Directory Permissions

Today I needed to lock down some data so that it could only be accessed by a particular user and his group. We wanted to make sure that this archive was not modified, so I needed to lock down the permissions. For a long time, I don't think I fully understood that directory permissions are much different than file permissions. To get around this, I did my chmod in 2 steps. First, I did a
find -type d -exec chmod 550 {} \;
This needs to be 550 because the execute bit on a directory is actually an "access" bit. If you don't set it, you can't access the directory.
Then I did:
find -type f -exec chmod 440 {} \;
This gets the regular files and sets them to read only with no world access. Fairly basic, but I thought somebody might find it useful if they're struggling.

Tuesday, February 17, 2009

I'm Back

It's been a while since I've posted on my blog, so I figured I'd post a little update. We had a baby in December. She had some problems and so we had to have her flown to Salt Lake to Primary Children's Hospital. She was there for about 2 months. We recently got her home, but she had to be put back into the hospital after she contracted something, possibly RSV, that was causing her to have problems breathing. She's still currently in the hospital, and I'm at home taking care of our son.
It's been quite the experience. I've learned a lot in the last 3 months. Priorities change quite a bit when you go through something like this. I'm still not perfect, and I don't claim to have all my priorities perfectly in order, but I definitely appreciate things like a nice home, my health, family and friends, good food, and trying to help out others. It's amazing what being the recipient of some charity will do to your desire to serve.
I will probably not do any more book reviews. After reading some of them, it doesn't sound like I have anything really interesting to say about many of them. If I have opinions or original thoughts about some of them, I will try to abstract the thoughts and make some posts. I may try and keep a little update on what I'm reading, and things I'm planning on reading, but I will probably try to avoid boring "I liked this book" posts.

Friday, November 28, 2008

Tsar

Tsar by Ted Bell
This book had been in my "Wish List" for quite a while. I went to the local library and put it on their list of things to get, and they got it in. I had it for two weeks, and finally had time to finish it. There was a lot of interesting things in this book. One drawback that it had for me is that it had fairly graphic depictions of things that didn't need to be treated in such detail. That for me was a big detraction. It could've moved the story along with no need for it. It didn't seem to pick up for me until towards the end. For me, reading about the recent leadership of Russia was very interesting, as I'm fairly uninformed about that subject. The descriptions of places were quite fantastic, and the ending puts the hero in quite a moral dilemma. I didn't particularly like how the ending was written, as it seemed to gloss over some major details, but all in all it was a fairly enjoyable read.

Saturday, November 08, 2008

The Appeal

The Appeal by John Grisham
This book was very timely for me, as I read it just prior to the elections. Unfortunately, it shows a sad side of politics which I'm sure happens with all parties. It talks about purchasing elections, and in particular, Supreme Court seats.
This book brought to my attention the importance of Supreme Court justices, and indeed judges at every level of government. It's not something you think about every day, but it does have a large impact on how things work. The saddest thing about this book is that you could very well see it happening. The justice that is purchased in this book has many similar views with myself. I could have seen myself voting for him if given the information that voters would have seen. However, the premise of the book talks about a court case in which a company poisons a towns water with toxins and many in the town die or become very ill. While I have strong feelings that we need some tort reform in this country, I don't think that cases should simply be dismissed out of hand. We need some sort of middle ground.
Anyway, this was an interesting book that can open your eyes to some possibilities that you may not have thought about before.

2001: A Space Odyssey

2001: A Space Odyssey by Arthur C. Clarke
HAL, the spaceship controlling computer in this book, was my main reason for reading this book. I know it may confirm my nerdishness, but I read some excerpts from the book in an article about computer error messages, and thought it would be interesting. I found a copy at the local library and they were selling it for 50 cents. I purchased it and used it for some leisure reading on my plane ride to Phoenix. While interesting, this book ended up becoming quite strange towards the end. I'm not really 100% sure what they were going for. It was interesting, though, and had enough interesting sections to make it worth reading.

Saturday, October 18, 2008

Panic in Level 4 by Richard Preston

Panic in Level 4 by Richard Preston
During high school, we got an extra credit assignment to read Hot Zone, another book by Richard Preston. That book was about Ebola outbreaks. I don't remember many of the details, but I remember being fascinated by his vivid descriptions of the illness, and of the wonderful descriptions of how all of the agencies involved worked. Having these wonderful memories of a book from my youth, when I saw this book in my local library, I decided it would move to the head of my reading list. I was not disapointed.
It was much different than what I was anticipating, however. I had envisioned a high energy story that brought together all of the themes mentioned in the cover. What I found was a series of 4-5 shorter stories with small bits of interconnection.
One of the stories was very interesting to me as a computer programmer as it talked about two mathemeticians who build a supercomputer in their apartment that competes with some of the fastest machines in the world. They use this machine to calculate pi to many, many decimal places.
Much of the book talks about DNA and the mapping of the human genome. It was very interesting to read about the different projects and personalities working on this research. It also talked about some genetic disorders in great detail. Definitely something that makes you realize how lucky most of us are to be free of that type of problem when you're just one marker in your DNA away from having serious problems.
This was a very interesting book. It held my interest throughout, and was a fairly quick read.

Friday, October 10, 2008

Living within your means

Today as I was listening to some talk radio and Rush Limbaugh was talking about what caused this financial mess. He said that many people are blaming people not living within their means, but he went on to say something to the effect that living beyond your means is the American Dream. He said that living beyond your means and the desire to always have something more, something better was what drives the free market.
I think he has a point about the desire for something better being one of the things that drives the free market. My desire to have nice things for my family, and the desire to take care of them in the best way that I can and to give them nice things is what drives me to give my best effort at work and in everything else I do. I totally agree that this is a very healthy motivation to always want to do better.
However, I strongly disagree that living beyond your means is part of the American Dream. The American Dream, to me, has nothing to do with going into debt. The American Dream can be achieved without spending more than you make. This is a basic truth that applies across the board. Each individual needs to evaluate their situation and budget their money to be able to sustain their lifestyle. The drive to have better, nicer things is great. However, it should be achieved by saving, investing and hard work, not by taking out loans that you will never be able to pay back.
Likewise, the government should never be allowed to pass a budget that is not balanced, or to spend more than is coming in. We may need to cut some programs. We have been living in a way that is costing much more than we are earning. If this continues, we are headed for disaster. Soon, our debt will own us. We will all be working only to pay interest on our national debt. Other countries will stop loaning money to us, and we will find ourselves unable to compete in the global market.
I know I'm not perfect, but I strongly encourage each of you to think about this. If each of us can start with our own families, it can spread.

Thursday, October 09, 2008

Creating a list of machines on your NIS domain

If you're on a Linux machine that authenticates via NIS, you can very easily generate a list of all the Linux/Unix machines that are using that NIS server to authenticate. The command is:
ypcat hosts
You can also list the users that are authenticating against this server:
ypcat passwd
One situation in which this becomes very useful is if you have a heterogeneous network and people are running different shells. Part of the output of this second command is to tell you what shell people have as their default login shell. If these are set differently, you could be getting different environment settings and behavior.

kwin --replace

Many users at work have been reporting problems with our new Red Hat Enterprise Linux 4 (RHEL4) installation when running KDE. The problem manifests itself when they cannot move or resize their windows in their current session. This makes the system very unusable. Luckily, the fix is very easy. Simply type "kwin --replace" into a terminal window in the session that's not responding. This has been effective in resolving this problem in most instances. If I understand correctly, what it does is replace the current window manager with a new instance of the kwin window manager that KDE uses. Hope this is helpful if you run into the same problems that we've had.

Monday, September 22, 2008

Freakonomics

Freakonomics
by Steven D. Levitt and Stephen J. Dubner
I was looking forward to reading this book for quite a while. Several of my co-workers read it and were all very impressed. Then, it was on the front page of Amazon for what seemed like forever. When the Kindle came out, many of the images displayed the cover of Freakonomics.
This was a fairly easy read. It had nice chapter divisions and moved very nicely. I loved learning about how things happened and seeing how the causes might have been much different than we thought. I don't want to spoil the book by discussing too much detail of each of the scenarios which are dealt with in this book.
These two writers have a very interesting understanding of the world. It combines economic principles without all the math. I would encourage anyone who would like to expand their understanding of how the world works to read this book.

A Case of Need by Michael Crichton

A Case of Need
by Michael Crichton writing as Jeffery Hudson
It's been a few weeks since I read this book, but I wanted to just right a quick post about it. It's very strange, but several of the books that I've read recently have dealt with issues surrounding abortion. Definitely a very important issue. This book is very quick moving, while taking time to probe issues surrounding abortion. I don't have much to say other than that, but if you're a fan of Michael Crichton, this is definitely a good read. Another one by Michael Crichton that I read too long ago to post about right now is "State of Fear". Excellent reading!