Tool for Marine Biologist

Sunday, January 15th, 2012

My brother-in-law is a marine biologist and he often will do ocean surveys as a contractor. Recently, he did a survey to measure the amount of eel grass in a certain area. The way that he does this is via scuba and a GPS unit. He essentially gathers data, in a methodical way (I’ll spare you the details), and then uses the data to generate a black & white pixel map. Black areas indicate that eel grass is present. He then usually brings this map into a really expensive software to calculate the total area of eel grass.

I recently happened to be tooling around in Processing and decided to make a very quick and dirty tool to do this calculation. You run this program, pick the image, set the pixel measurement for your area unit, and the software will tell you how many area units you image contains. The interface is not pretty…just functional.

Moving Time Machine backups to a bigger drive

Thursday, January 5th, 2012

I have a drive with 3 partitions (The Big One, Rachel Time Machine, James Time Machine). I had quite an ordeal trying to moving each TM backup to a new/bigger drive. Initially I tried doing a straight copy from the File Manager…i.e. just dragging the Backups.backupdb directory to the new drive. It worked for Rachel Time Machine (took probably 3 or 4 hours). (I also found out that doing a straight file copy essentially is not efficient because doesn’t preserve the links (logical pointers to files) but essentially duplicates the file that the links are pointing to (see patrix’s comments in the link above). After copying the files over, I pointed Rachel’s laptop to use the her new Time Machine drive and I can see all of the older backups. Great!

Migrating James Time Machine to a new drive was not so smooth. Doing a straight file copy took forever (something like 5 to 6 hours)…I basically let it run over night. In the morning I woke up to find that it didn’t work. Here’s the ordeal described for a Stack Exchange post. As you can see from the post, trying to copy using OSX’s Disk Utility didn’t really work the way I wanted to. It basically cloned my drive so that my NEW drive was just as small as my original (I think it basically created a small partition…but the weird thing is that if you look at the disk in Disk Utility, there is only one partition and it should be 1TB, the size of the new drive…hmmm). Carbon Clone Copy didn’t work either. Finally SuperDuper! did the trick!!!

I have to thank this Neil’s Apple Blog post for mitigating some of the frustration along the way…it was comforting to see someone else with the same issue and that a solution was possible!

Stanford AI Class

Thursday, November 17th, 2011

I’m taking the Stanford AI Class, which started about 6 weeks ago. It’s been eye opening and it’s also a welcomed challenge. This is essentially an online version of the AI class that they teach at Stanford. This is the first time that they are trying an online version that is open to all. They have over 85,000 students enrolled. I’m a bit behind on the lectures because of the arrival of baby Maya. So, I should stop blogging and get back to the class!

‘Making’ again

Monday, November 14th, 2011

Just started playing around with Cinder. It’s along the lines of Processing and openFrameworks. These platforms, if you will, really helps with the creation of graphic and event-based applications. I’ve worked with Processing (taught a class), dabbled in openFrameworks (created a music exploration/visualization environment) and am now trying Cinder.

For Spring 2003, I created a class called Dynamic Bodies at ITP. The class helped students to create algorithmically controlled/animated objects using vector math and physics. It was a class I created out of a labor of love and inspired by folks coming out of the, then John Maeda led, Aesthetic Computing Group. Some of the things that I’ve taught in that class have now been made easier with the introduction of libraries for vector math, physics engine and algorithmic behaviors (such as for boids). Many of these libraries are available for the three platforms above; one of the more notable is the feature rich toxilibs by Karsten “toxi” Schmidt for the Processing platform.

I missed those days of making things so I’m taking this opportunity to get back on it! One other reason for this step towards ‘making’ is that both openFrameworks and Cinder can be used to build iOS apps. I have an iOS project ‘in the works’ with a friend.

Trying to write my first iOS app

Friday, October 7th, 2011

MY friend Jenna and I have been brainstorming about a kids’ iOS app and I’m finally excited about making what we’ve schemed up happen. It’s going to be an iOS app that needs a physics engine.

It turns out that cocos2D for iphone is a sprite based game engine. It now includes integration with the Box2D physics engine. Both cocos2d and Box2d are free to use and distribute with your app.

This should be really helpful for our idea…stay tuned.

e-commerce project

Friday, September 23rd, 2011

We’re finally moving ahead with an e-commerce project. It’ll be very exciting with lots of new things to deal with…like Merchant Accounts and Payment Gateways. There are so many out there. We’re using BigCommerce, a cloud ecommerce offering, which integrates with many payment gateways so I won’t have to code anything…but it’s not making it any easier to select one.

This is a good “how it works” diagram of payment gateways and merchant accounts.

Our client is a brick and mortar store that current swipes physical cards at credit card terminals and they also take phone orders. So I’m trying to figure out what merchant account(s) they need and what payment gateways(s) they need…and decide which providers would allow for the most flexible configuration. Another thing that I needed to consider is that they’re currently shopping around for a new merchant account but our ecommerce store won’t be launching for at least a few months. So, the providers should allow us to grow the business and add the ecommerce store later.

 

Merchant Accounts

Depending on the merchant account provider, you’ll have to sign up for at least one, if not many, merchant account based on how you will be receiving payment. The company that our client is looking at, Elavon, requires a merchant account for retail (physical card swipes), MOTO (mail order/telephone order), and ecommerce. Needless to say, each account costs money…for setup, per transaction, has monthly fees, etc.

Payment Gateway

In order for you to process and connect to your merchant account(s), you will need at least one payment gateway, if not more, to connect to each of your merchant accounts. So you may need a retail payment gateway to process and connect to your retail merchant account, or you may need an ecommerce payment gateway to process and connect to your ecommerce merchant account.

 

One of the gateways on the BigCommerce list of partners they integrate with is PayLeap. They actually have a plan called “Brick and Click” which essentially allows you to process transactions originating from retail, MOTO, and ecocmmerce, under ONE merchant account and ONE payment gateway. Also their fee structure seems really reasonable. So, as of now, I’m recommending this to our client.

Learning Python

Friday, December 17th, 2010

Just had drinks with Justin and Scott last night at the Brooklyn Inn. We geeked out and now I’m going to try to learn python again. Found this article, by Red Sweater, about learning python using the mac. They made a little app that contains a web browser in one pane and a terminal in the other. The web browser points to the python tutorial page written by Guido van Rossum (the author of Python).
The article mentions Nodebox…a Processing like environment which uses Python as the language. Cool!

Things on the iPhone

Sunday, July 19th, 2009

I just started using the Things app on the iPhone. It supports GTD concepts. Let’s see how long I can keep this up. It seems like I’m more productive already. I’ve been adding items to Things as they come up, and I’ve been checking things off. I think it will take time to adjust to this way of doing things. I’m use to keeping things in my head, but now I will need to trust that I have this system to help me so I can use the extra brain bandwidth on other things.

WordPress theme hacked!

Wednesday, March 25th, 2009

I was just digging around my theme editor trying to insert a piece of HTML from my hosting service that says that my site is Green, because the hosting service Carbon Neutral. I decided to add the HTML to the footer of my theme. When I looked at the file there were tons of links embedded in a div that had a style of ‘display:none’ !!! I looked at the header and same thing, there were tons of hidden links. I of course deleted the divs from each file and all is well now.

It turns out that people’s WordPress themes are getting hacked for some reason. Here’s an article about it.

Drupal, Mulitsite, CVS

Sunday, March 1st, 2009

Drupal has a multisite feature that allows you to run multiple sites under the same code base.  I found a great tutorial here which uses CVS to install Drupal.  The advantage of using CVS is that if you want to update/upgrade your Drupal install, it’s as easy as issuing a single command in your shell.

First I setup my Dreamhost UNIX directory structure by following this wiki entry.   The wiki entry goes into a lot more detail but the important part is to keep your directory structure clean and put all of your websites under ~/www.

Then I followed the instructions from the above mentioned tutorial.

Here are some highlights…

Checkout Drupal verision 6.10 from the CVS repository, by using the tag DRUPAL-6-10, to your directory…here it’s ~/www (here is a list of valid tags):

$ cd ~/www
$ sudo cvs -d:pserver:anonymous:anonymous@cvs.drupal.org:/cvs/drupal checkout -r DRUPAL-6-10 -d drupal drupal

This will create a directory called ‘drupal’ and place all the checked out files in that directory.  Create all the other directories following the tutorial..including one for each domain you want to host.

Since, I don’t have access to my web server’s configuration files, I used Dreamhost’s control panel to point the two domains to the drupal install directory (if you’re on Dreamhost, you can find it under Manage Domains…click on the Edit button under Web Hosting for the domains you want to run on Drupal).

You can also checkout contrib modules using CVS. Here’s an example of how to grab the admin_menu module. To find the tag to use for the version(-r) parameter, here it’s DRUPAL-6--1-3, click on the Release Notes link that accompanies each release. At the top of the page you should see the tag in all caps.


$ cd ~/www/drupal/sites/all/modules/drupal-contrib
$ cvs -z6 -d:pserver:anonymous:anonymous@cvs.drupal.org:/cvs/drupal-contrib checkout -r DRUPAL-6--1-3 -d admin_menu contributions/modules/admin_menu

Later, to update your core and contrib modules, you just have to run this (of course, make sure you backup stuff, turn off modules, etc. before updating. Basically follow appropriate upgrade instructions):
$ cvs -nq update -dP