Blog

  • How I use Google Wave (and what I wish it could do)

    Google Wave seems like a strange tool at first and has so many use cases it can seem overwhelming. One thing I use it for is as a wiki. To keep organized I first make a main wave that just has links other waves of the same topic. Google Wave makes it easy to just drag and drop links and files (though it’s a little buggy currently). Next I put whatever into the wave say a design specification. Under I can put blips (which are like reply’s in a forum) to discuss the document.

    That said there are some shortcomings I hope will be fixed before Google takes it out of beta. I’d love to be able to export the wave blips to other sites. Say I have an official documentation site for some project that I want nice looking information. This information could be the design spec I mentioned but only the first blip so comments and changes could be made in Wave will a nice finished product always exists elsewhere. Currently it does integrate with blogspot, hopefully more will come and it can be used almost as a content management system, this would be really awesome.

    Another problem I run into is knowing when a wave is updated. I solve this with firefox/chrome extensions but this isn’t ideal when trying to work with someone else who doesn’t have them and isn’t alerted to when the wave is updated.

  • Linux and Active Directory

    * See my newer post, it’s much better.

    Getting Linux to work well with LDAP is a pain. Here is how I set it up to match what one typically finds in a corporate environment, that is Logging in with a domain name and having access to various shares.

    Logging in
    First is just getting it to login. It’s actually not that hard, I went with using likewise-open which can be installed in Ubuntu via
    sudo apt-get install likewise-open
    Now to configure we run
    sudo domainjoin-cli join yourdomain.yourserver.com Administrator
    Now assuming you only use one domain you probably want to make it default.

    In 9.10 you need to edit /etc/likewise-open5/lsassd.conf and set “assume-default-domain” to yes

    In 10.04 there is a bug that keeps this from working. See https://bugs.launchpad.net/ubuntu/+source/likewise-open/+bug/534629 Basically you need to get a ppa version and then Change AssumeDefaultDomain to dword:00000001 in /etc/likewise-open/lsassd.reg

    Now if you reboot you should be able to log in via the domain user.

    Shares
    Now you need to mount all the shares, perhaps a company wide share and a personal one. Run this
    sudo apt-get install libpam_mount
    Sadly the Ubuntu packages don’t configure it right. Edit /etc/pam.d/common-session and rearrange to lines near the bottom so it looks like this
    session optional pam_mount.so
    session sufficient pam_lsass.so

    Now it will work. The problem is that pam ignores pam_mount when using the likewise open module by default.
    Next /etc/security/pam_mount.conf.xml
    You can use variables like %USER to have it mount the user’s personal share. Mine looks like this

    <pam_mount>
    <!-- Volume definitions -->
    <volume user="*" fstype="cifs" server="server" path="users/%(USER)" mountpoint="~/Documents" />

    * in 10.04 %(USER) gives you the domain/user.  If you just want the user use %(DOMAIN_USER)

    Don’t try mounting anything as Desktop because gnome won’t allow it. Too bad.

    Wifi
    Likewise open doesn’t work with wifi unless you login as a user first, which seems not to be a solution. It’s because network-manager sucks and doesn’t connect until some user logs in. So you need to not use network-manager. I uninstalled it and setup wifi by editing /etc/network/interfaces. It works well but now I can’t change the wifi myself. Useful if the computer never leaves the building. In my case this is acceptable. I hear wicd is a network-manager replacement that can do this. Didn’t try it myself.

    Mass deployment
    Next you might want to be deploying it on many computers and not one by one. If you want to mess with the default user setup you could install and run sabayon. It crashes a lot, but its actually really useful. Next you need to change the hostname of every machine. I made this script and put it on crontab @restart.
    #!/bin/bash
    # If hostname is netbook, assume this is a fresh image that needs setup
    hostCurrent=$(/bin/hostname)
    hostOld='freshimage'
    if [ "$hostCurrent" == "$hostOld" ]
    then
    # set hostname based on Serial Number
    host1=$(/usr/sbin/dmidecode | /bin/grep 'Serial Number: ' | /bin/sed 's/.*: (.*)/1/;q')
    host2='linux'
    host=$host1$host2
    host=$(echo $host | sed 's/ //g')
    echo $host
    /bin/hostname $host
    /bin/echo $host > /etc/hostname
    # wait for wifi
    sleep 10
    # join AD
    /usr/bin/domainjoin-cli join domain.server.org Administrator 'mypassword'
    fi

    It automatically makes up a unique hostname and joins my domain at first boot. I set the cloning image’s hostname to “freshinstall” which the script looks for. Clone the hard drive boot it. Wait for GDM to come up, reboot and your good.  This is actually way better than joining many Windows computers to a domain, which requires many reboots.

    Odds and Ends
    I still don’t know a great way to mount ~/Desktop
    If you must have MS Office you could try wine, but you may need to use Crossover Linux Pro which generally costs a lot. With CX Pro you can set up Office to multiple users.
    I’ll write a follow up post on how the deployments go.

  • Sunset Park Riders

    I’ve done a little web development for the Sunset Park Rider’s “Showdown at the BK Corral” album. It’s a rap album blending spaghetti western movie scores with classic hiphop break beats. Check it out at http://www.sunsetparkriders.com you can download the album for free or buy a CD.

  • Video game video

    Simple, but everything here is editable via XML. Rate of fire, type of weapon (straight, spread shot, etc), enemy’s, images.

  • Creating a video game

    I’m finally putting some real work into making a video game for the Android OS that combines aircraft shooter with some role playing elements. My plan is to have a game where the player goes between typical shooter action and storyline, gaining XP, going to shop for upgrades, ect. The player will have a computer controlled wingmate too that will level up as well. I’ll be building it with the open source sprite engine rokon.

    I’m making all the levels read in as xml so anyone can make a level. At some point I’ll release the core game as open source and sell Level packs on the Android Market. Here’s a screenshot

    Not much to look at yet. Hopefully my next post will feature a demo video. It actually works but a few bugs make it less than impressive. It really does read level data off an xml file though which is super cool. That means I can write in xml that a certain enemy appears on the level at a certain time.

    I’m using Google Wave for all the specifications. If you want to help out let me know, many more details are there.

  • Hacking the G1

    Last Friday I finally decided to root my G1 android phone, probably from envy of the new Droid phone. I must say I’m surprised by how much faster it is now. It’s far more responsive and loading times seems to be vastly improved. Aldiko ebook reader went from taking around 30 seconds to open a certain book to 5. One annoyance I used to have was the home screen freezing for 5 to 10 seconds making multi tasking very annoying. This is now completely gone. I was expecting a slightly faster phone, but this is really like a brand new phone. Wifi tether is always nice too. Here’s what I did.

    Rooted it with this guide. A tad many steps involved, but all very easy to follow.
    Installed an overclock app from the market.
    Partitioned my sd card with a 2GB ext4 and 32MB swap with gparted.
    Enabled compcache with the “spare parts” application.
    Installed the Cyanogenmod updater from the app market and updated to the latest Cyanogenmod. This neat program makes updates very easy, something I though might be annoying after rooting the phone.

    So that’s it. If you have an android phone and don’t mind the slight risk, it’s very much worth rooting your phone.

  • Django

    I mentioned the Django app I made in the previous post so I thought I would provide some info about what it is. Essentially the goal was to reduce duplicate work everywhere possible be moving data from spreadsheets and other database’s into one central database. Also to allow a non skilled worker to edit this data, then allow for reporting to remake all the excel sheets that were originally needed. Here’s my setup

    Ubuntu 9.04 server running Django, MySQL, and Apache (LAMD?) Data models are defined in Django which automatically makes an Admin interface with some customization options.

    data entry

    Django also makes short work of authentication with is done against Active Directory. Reporting is done with PyExcelerator and pyRTF to make downloadable excel and rtf documents.

    reporting

    It’s a pretty basic database but it really saves a lot of time compared to maintaining lots of xls documents and mail merges. Also it allows a technical worker to import exported data from other database into MySQL. Ideally this program could also be linked with other MySQL backend programs. So say I want to use SugarCRM I could symlink the contacts table so both Sugar and Django use the same one for perfect 2-way syncing. The real beauty of this is that it was so quick to develop. This is just been a side project for me. Doing it in PHP or .NET would have easily taken 3 times as long.

  • Working away

    Well I’ve been in nyc for a month now. The first few weeks have been hell with 60+ hour weeks at Cristo Rey but things are finally starting to calm down. At work I’m coordinating transportation for students to get to their work placements.

    I’ve completely redid the process in a short time I was there from a bunch of random Excel files and proprietary databases to something more maintainable, a MySQL database with Django. I’m impressed with Django’s ability allow me to make good data centric websites in only a few days. Django’s philosophy of defining data “models” once and having it create the database and administration page automatically is great. I’m then using pyRTF and pyExcelerator to generate reports from the data. We can now enter student, company, and contact data in at one place and have it reflect to all relevant reports such as daily attendance. The admin interface is easy enough to use that students can do data entry with it.

    Other new fronts include the possibility of moving from Act by Sage to SugarCRM should further streamline the process. The idea here would be that Sugar has more features and could integrate with my Django database, Outlook, and a smart phone. With some hacking around it looks like I can symlink(yay unix) a “contacts” table used in both Django and SugarCRM to keep them perfectly synced and keep Django happy in it’s data model land without manual SQL needed. I’m happy to be using my skills at the new placement, while also running the day to day activities at the school. Though it’s still a 10+ hour day with some Saturdays making it rather stressful.

    Other thing’s I’m looking into are Alfresco content management system, Zimba email server, and SchoolTool. SchoolTool is a decent school administration management tool. It’s written in Zope which is a python based framework. Python is quickly becoming my favorite language. It’s missing a few key features so I might hack on it to make it work. One unsolvable(?) problem with SchoolTool is that it uses ZODB, an object oriented database. This means it would be really hard to integrate it with the other databases I’m using. ln -s can’t save me this time..

  • Volunteering

    The following was written on 8/16/09 though I did not have Internet access at the time.

    I am at the Jesuit Volunteer Corps (JVC) retreat house; we are doing a personal time session and I have decided to write this entry for my blog. I am the only engineering and the only IT person here. The complete lack of relevance to my chosen profession makes me wonder what I am doing here, as do the strange bugs that roam the area at all times. I am also in the midst of like minded (go social justice!) individuals. Something unexpected are the type of people here. I am surprised by the number of frat people who have come here, which is maybe from my own ignorance. I will be placed into the only all male JV house, which to me seems strange since I have lived often with girls and was expecting it here. As always I am both in and out of my element.

    In a few weeks I will start working at the Cristo Rey High School in NYC. After being informed I would be taking care of filing there, I immediately determined in my own head I would independently digitize their records keeping system. We’ll see if that happens. I am already leaning the Django, a python based web development language. Django attempts to remove duplicate and inelegant work from web site construction. Data objects and classes are defined once in a model and used in a database, front end view, and automatically creates an admin view. This will extend a site’s ability to be maintainable by even less than technical people, as a web interface can let them add or change content. Since I’ll be working past full time and be kept busy with community nights, I’ll need to develop things very quickly. Also I always pick a different language for every project I do. I am excited to start, and probably their only volunteer anxiously waiting to know what servers they use.

  • Thinking about business

    I’ve been thinking about starting a business after I get a few more years of work experience. Some type of computer retail and software consulting thing. Here’s some random things that might be fun and profitable that could be thrown together under one roof.

    • Sell custom computers without bloatware. Linux, Windows, even Hackintoshes. Preload software that is actually useful. Instead of Microsoft Works, use OpenOffice. Instead of some trial for anti virus for Windows, ClamWin or AVG. Have different versions ie (Student, easy enough for grandma, hAx0R 1337 teenager),
    • Allow anyone to use the computers on display, as long as they want. Sell some coffee and pastries to them (think Barnes and Noble with Starbucks) When they see our $300 linux box outperforms their $700 spyware ridden and bloated Dell they will want one.
    • Lease option. Offer to manage computer remotely. Many people might just want a Internet or Word processing appliance. This lets them forget about all the computery things like updates.
    • Lauch computer donation project. Recruit volunteers to do most of the work. Could generate some buzz amongst the geeks in the community, a major target market.
    • Develop software for anything. Try phone apps, websites, consulting, email, web hosting. Just see what works.

    We’ll see where this goes.