You cheap, freeloading bastards (and how not to be one).

12 Comments

UPDATE: I want to address some things people have said about this post. First of all, let me just say, the title of this post is completely tongue-in-cheek. It is not meant to be serious. Well, except for the freeloading part. I'm a bit disturbed that I have to point that out, but nevertheless... that's what it is.

Secondly, this post is about giving back to the community. It is not about giving me money (or anyone else for that matter). I'm quite surprised that everyone is assuming I'm only talking about money. Read the bloody post before you respond to me! Money is only 1 of the 4 ideas I give below. Anymore comments about "compensation" or "money" will be deleted because you're missing the entire point if that's what you're complaining about. You're not providing any constructive feedback getting hung up on money.

I am also not saying this should be a law of any sort nor am I saying that people to be forced to give back. People should have the choice to. However, I feel that it is morally responsible to return good deeds with good deeds. Taking advantage of others good deeds for your personal gain has never been a trait of mine and I hope it's not one of yours.


I mostly use a Mac. However, I have used various Linux distributions since around 1998 and I continue to use Linux. Specifically, I use Ubuntu. I have a Linux server and I even dual boot Ubuntu on my Macbook Air. However, this isn't a post about Mac vs. Linux. I'm sick of that debate. Both are outstanding operating systems and who cares which one you use as long as you're getting stuff done. This post is specifically about the cheap freeloaders that use Linux or any Open Source software for that matter.

Freeloader - A person who takes advantage of others' generosity without giving anything in return.

Time and again, when I talk to people about using Linux, the number one reason they give for using it is "You can't beat the price!" I will sometimes respond with "Have you paid for anything when using Linux?" and 99% of the time, the answer will be "No, it's free." I then respond with "What Open Source projects do you have?" Again, most of the time the answer is "Nothing. I don't have time." I'm assuming anyone reading this blog has plenty of technical capability and if you would answer my questions in the same fashion, you're a cheap, freeloading bastard.

The vast majority of Open Source developers are just writing code to fulfill a need that they had. Some are doing it for fun, some are doing it for research, some are doing it for work. Regardless of what they did it for, they were generous enough to give their time and effort into creating a useable product and releasing it to the world not only for free, but with the source code included so that you can learn from it, change it or make it better! This is huge. If a commercial company were to do this, they would charge heaps of money to allow you access to the source code of their product. We have hundreds of thousands of developers that are doing it just simply because they love it.

This does not mean that we shouldn't thank them by giving back to the community or the specific developer. There are many ways to do this. I will list a few below. Everyone that is capable should be doing this. If you have any ability to do one of the things listed below, you should.

I personally find it to be a moral imperative. I learned a lot about computer programming due to Open Source and I have made a great career out of it. I owe a lot of gratitude to those that took the time to do the work and then release it for me to view. When someone gives me a gift, even if it was out of the kindness of their heart and they don't expect anything in return, I return the favor or I pay it forward and help somebody else.

The best part about it all is that it's fun! Here is a list of ways that you can give back:

  1. Money - This is by far the easiest way to give back. If you have the ability to give back monetarily, do so. A lot of people do have this ability. This doesn't require a lot of money. Pick a single open source project that you adore and give it $5 a year. $1 a year. Who cares. If everyone that used open source projects gave simply $1 a year to various projects, a lot of great open source developers that do this part time would be able to do it full time, provide more support for your favorite product, introduce new features that you've been hoping for and live a great life doing what they love doing, all for you.

  2. Write code, open source it - Is there a tool you've been writing? An app? Something you found that other people or companies haven't filled the need for but you have? Open source it! No project is too big or too small. I'm am not against closed source at all. I find it is essential for the software ecosystem. So if you have a product that is useful and you want to keep it closed in order to make money and protect your intellection property, I have no issues with that. However, is there a part of it that is less critical that you can open source? Preferably something that adds value to others, but won't necessarily harm your intellectual property and profits? If so, open source it.

  3. Test it, report it - Join the community's Quality Assurance team! If you're using a product that you love and want to give back but you're broke and don't have any coding skills, you can always give back by reporting issues to the developers. This does require some thoroughness on your part, but it isn't hard. Simply use your favorite product and when you find a problem with it, contact the developer(s) or report a bug on their bug tracking system. Simply describe the problem you had in detail, the steps you took to make the problem happen, how to reproduce it and any details from log files or error messages that may be of help to the developers. Watch for responses to your report and respond with any helpful information you can give. Don't just report the bug and then say your job is done. Stay with that bug until it's either fixed or closed for some other reason. Additionally, if you do happen to have some coding skills, write a patch and submit it with your bug report! Double points for you!

  4. Blog - Write about your experiences using any specific open source product. Help others to learn how to use that product through words, screencasts or film. Teach others how to work around or fix a specific bug. Show us about a nifty feature we may have not known about but will possibly increase our productivity using it! This is a huge help. When I'm starting out with a new product, I always google around about it and find some incredibly helpful tips from others. The more people that do this, the better the experience will be.

So, no matter what your ability is, there is a way for you to contribute back to the community. Just don't freeload! It is far too easy to give back for any skill level. If you use open source and do not give back in some way, shape or form, if I see you in the future, you will get a big punch in the neck.

How to save VPN passwords with NetworkManger

1 Comment

I was having a lot of trouble with NetworkManager not saving my VPN group and user passwords. I'm guessing this is a bug and I did see some references to launchpad bugs while doing my googling to find a solution. However, it took me a while to figure it out. It requires a little editing of the system-connection files.

If you look in /etc/NetworkManager/system-connections/, you will see your connection files. Open one of them and change a few of the settings. The two settings I had to change/add were:

[vpn]
ipSec-secret-type=save    # This wasn't in the file
IPSec secret-flags=0      # This was set to 1 originally
xauth-password-type=save 
XAuth password-flags=0   

# This entire section didn't exist, I had to add it
[vpn-secrets]
XAuth password=some-password
IPSec secret=some-group-password

There are other things in the file, but I didn't have to change those. It's very Odd that nm-applet can't seem to figure this out. Quite a bug. Anyway, here is my entire file for reference:

[connection]
id=CiscoVPN
uuid=5513f555-ec88-4444-9818-6bee77785kska
type=vpn
autoconnect=false
timestamp=1331220616

[vpn]
service-type=org.freedesktop.NetworkManager.vpnc
NAT Traversal Mode=natt
ipsec-secret-type=save
IPSec secret-flags=0
xauth-password-type=save
IPSec ID=GroupId
IPSec gateway=10.0.0.1
Xauth password-flags=0
Xauth username=myname
IKE DH Group=dh2

[vpn-secrets]
Xauth password=mypassword
IPSec secret=mygrouppassword

[ipv4]
method=auto

My experience with Android coming from iOS... so far...

2 Comments

So, after a little over a month with my Android phone and tablet, I can confidently say that Android wins in the phone market... Unless you're a timid user, then the iPhone wins due to sheer usability. However, the Android is way more configurable and fun to use, but it lacks polish in a lot of areas and inconsistencies throughout the interface would make it a task for unsure users.

However, on the tablet market, iPad still owns, IMO. For one main reason... Media. Android and Android developers just can't seem to get it right. Browsing through movies, TV Shows and other Media on the iPad is awesome with cover art, complete ID3 tags and everything working as it should. On the Android device, it's a chore and an ugly one at that.

Open most Video players and you have a jumbled mess of videos in no specific order. Some of them don't even provide a thumbnail of the video. I want my TV shows and my movies separated into sections and my TV Shows separated by seasons and ordered. I also want my ID3 tags displayed and any cover art I added to them if it's an m4v file. I simply can not find any app on the Android market that does this.

MX Media Player comes very close by honoring your folder separation in its interface. For instance, I can put my Movies in a Movies folder and my TV Shows in a TV Shows folder and then those in their appropriate Season folders and such. Then MX Media Player will keep the videos organized as long as you've named the file starting with a number. It also provides a thumbnail of the video, but no cover art or ID3 tags are used.

I can't connect to an external share and stream movies from it in MX Media Player, which sucks too because I have a media server at home that has a few smb shares that I can stream from my iPad. I can open ES File Manager and connect to the share and then sort through those videos in an ugly interface with no thumbnails or cover art and then click on the movie and then be prompted on how I want to open it (as an image, really? It's a movie!) and then be prompted on what I want to open it with (Yeah, I know I can save a default, but still...) This is a lousy user experience.

On the iPad, all ID3 tags are displayed. Cover art is displayed. All movies are in a nice grid. All TV Shows are separated by Show, Season and Episodes along with info on which shows I have already watched. I can stream from my media server and browse it in the same way as if it were natively on the device. This is an awesome experience for media and what I would expect.

Maybe I'm missing the killer App on Android for media that makes it a much better user experience. If anyone knows of one, let me know and I"ll give it a shot. However, on the tablet, Media is huge for me. Watching Movies, TV Shows and Netflix is what I primarily do on there, other than using the Kindle software for reading.

If anyone knows of a better App on the android market for this, please let me know. I'm considering getting into writing Android apps just for this specific case. I'm sure writing Android Apps has to be better than writing iOS apps. I just can't stand Obj-C... I hate it more than Java.

Hide gnome-terminal menubar in gnome3 on Ubuntu 11.10

3 Comments

So, lately I have been using Ubuntu 11.10 inside of Parallels on my Mac. I have really enjoyed using Gnome 3. It is a vast improvement over the Gnome 2. The reason I left Linux and started using a Mac was specifically the desktop experience. I loved Linux up until around the year 2007 and I started using a Mac then because I realized the desktop wasn't going anywhere. Gnome was stuck in the 1990's and KDE is just simply an odd experience, not very intuitive and kind of reminds me of a bubble gum pop star, but without the sex appeal.

So, fast forward to today and now I find Gnome to be completely usable. I love the Activities pane. I love how it manages virtual desktops. I love the "dock" and how it only shows up in Activities mode. I love the quick search Gnome-Do like application finder. I love the notifications and how well some apps like Empathy uses it. I'm pretty happy so far... I'm going to run it in Parallels for a while at home and at work and if I find myself happy enough, I may switch back to Ubuntu full time... although, not on the MacBook Air. It's kind of a miserable experience installing it natively on one...

Anyway, I ran into an issue with gnome-terminal that I thought I could share. I don't like having the menubar show up with each new terminal that is open. So, I turned it off in the settings. However, for some reason this didn't work. Even though I unchecked "Show menubar by default in new terminals", it kept showing up.

Well, I ran across a bug on launchpad for it and a suggestion was made to remove the appmenu packages and this would fix the issue. Well, it did for me. All I did was

sudo apt-get --purge autoremove appmenu-gtk appmenu-gtk3

Then I logged out and back into Gnome and booya, no more menubar in gnome-terminal. I hope this helps someone... or possibly myself in the future.

Quick and easy git branch prompt for zsh (and a quick rant)

0 Comments

Update (2011/12/03): I have since changed my prompt and got a little crazy with it all and took concepts from Phil's zsh prompt and took the git stuff from Brian Carper's site. It's totally going against what I have stated below (wanting something simple), however, I really liked these concepts and here is what I came up with:

Imgur


So, I have recently moved back to using vim and I have been loving it. I have specifically been using MacVim for mostly everything. However, I have also been using vim on the command line for quick editing. Mainly, I start up MacVim for a project while I just browse the filesystem and edit files as needed from the command line at times.

What I have noticed with my increased use of the command line on OSX is that bash and BSD commands don't play nicely together. For example, the cp and mv commands in OSX (or, any BSD system by default unless you're using GNU Utils, I believe) will copy what is inside of a directory - not the actual directory - if you append a trailing slash. Example:

% cp -r /Users/someguy/whatever/ /Users/otherguy/

This doesn't do what you think it does if you're a long time Linux user. That trailing slash on the end of the from portion of that command tells cp to copy what is inside of the directory. So if /Users/someguy/whatever contains 52 files, those 52 files are going to be copied into /Users/otherguy, not the directory itself.

This is completely annoying if you're used to using tab completion to the path you want to copy or move. In bash, it always appends a / if it's a directory. Sure, you could remove that /, but that's annoying when you're typing fast and in a zone.

Enter zsh! Tab completion in zsh is much more intelligent. It will append that / if it's a directory, but if you stop there and hit enter or space, it will remove that / since it's not needed! Also, it does some fancy stuff when you tab, much like the way vim auto completes when you tab through directories. This is nice.

So, on to my point. I had a nice little color coded prompt in my bash profile that would detect if I was in a directory that was a git repo and tell me what branch I was on. This is super useful for me when I code. This was relatively simple to add thanks to this post about it. However, when I switched off to zsh, I had a little trouble getting this to work. Searching the web I found very many very involved ways of doing this that had very many lines of code in your .zshrc file. Being that I like things short and simple, I reconfigured it. While this may not be as robust as other examples on the net, it works for my purposes, which is to just tell me the branch I'm on if I'm in a git repository. I also added some custom coloring to match a (vim color scheme I use)[https://github.com/gigamo/sunburst.vim]. Here is my entire .zshrc file...

alias ls='ls -G'

# Stuff for git
parse_git_branch () {
    git branch 2> /dev/null | grep "*" | sed -e 's/* \(.*\)/ (\1)/g'
}

# sunburst.vim like colors for prompt
BLACK=$'\033[0m'
RED=$'\033[38;5;167m'
GREEN=$'\033[38;5;71m'
BLUE=$'\033[38;5;111m'
YELLOW=$'\033[38;5;228m'
ORANGE=$'\033[38;5;173m'

function precmd() {
    export PROMPT="%{$RED%}%n@%m%{$BLACK%}:%{$GREEN%}%~%{$YELLOW%}$(parse_git_branch)%{$BLACK%}%# "
}

# System dependent setup stuff goes in here
foreach f (~/.zshrc.d/*); do
    . "$f"
done

Focus mainly on the precmd function. That's pretty much all there is to it. That function gets run every time, after a command is executed. So I set my prompt in there. If the git branch command shows up, it grabs the current branch you're on and appends it to the prompt. If it isn't available, you just simply don't see it.

The last bit of code should be obvious, but I have two systems I work from. My home laptop and my work laptop. I sync things over Dropbox and Github. However, I don't want all of the same environment variables and such in my .zshrc file at home that I have at work and vice-versa. So, I store those things in a ~/.zshrc.d directory. Everything else that's shared across both systems is in .zshrc.

This works for me. I know there are other ways but this is simple. That's all I wanted. Simple but effective.

Your browser is unsupported and squishy.

Captains log; This site was designed for the future of science! If you can't update your browser, this site just won't function or look right. However, feel free to browse it anyway. Where's Kif?