Friday, February 11, 2011

Last Day

Today is my last day at Pukoa Scientific.
I'm not sure what is next for me. It's been a bit tough finding a new job. I'm hopeful that something good will come along soon.
In the mean time, I'm going to be working on an iPhone app and setting up a web site for myself. I've decided to use the web site for mostly static information, things like my resume and continue the blogs for updates and news.

Today is my last day....tomorrow will be my first day.

Thursday, April 29, 2010

The Mongoose and the CGI

Yeah yeah....didn't post in a long time. Don't blame me, blame my TiVo. I upgraded the hard drive and now my TV viewing is backing up and taking up a huge portion of my free time.

Anyway, a quick post on some things I found while working on a project. I needed a small light weight web server that was written in C. A quick google and I found mongoose. Small, lightweight, written in C, and open source to boot. Love that Internet.
I haven't played with mongoose too much yet. I'm planning to do a bit of coding with it to create and setup a custom web server. But that will start later on. For the same project, I also needed to run a bunch of CGI scripts. So I thought that maybe mongoose would be able to do it and after fiddling around a bit, it worked perfectly. If you are in a need of a quick web server...do check out mongoose. It's worked perfectly so far. I'll post more about it once I get into the programming for it.

So about the CGI...I've always thought of CGI scripts as some sort of ghetto code that people used before Java. CGIs were everywhere when I started out as a programmer and I remember reading a lot of articles saying how CGIs were bad and J2EE was the new and better way to go. So in the back of my head I always thought of CGIs a some lame thing.

The CGI script I needed to run was written in C and did a simple database lookup, read in a graphic image file, extracted a portion of the image, did some scaling and positioning of the image, and sent it all back with additional meta data. Sure, you can do the same thing with Java or probably a ton of other languages, but who would have thought a CGI could do that. I guess I should have but I underestimated what a CGI could do and in this case, it was a simple, elegant solution to address what this project needed.

So the moral of the story is, look for the cool new thing to help you accomplish what you need to do, but don't forget the tried and true methods, and especially do not disregard something without fully understanding what it is and what it can do.

Friday, February 20, 2009

Gas Cubby Procrastination Part II

Ok, so I didn't realize that the $0.99 thing was a limited time offer....procrastinated again and missed it.
I finally bought it at the original $4.99 price after getting a little scared when I read a post that the price might go up to $9.99
The app works pretty nicely so far. Need to use it a bit more to get a good idea if it does everything that I want it to do....which isn't much. Basically track my mileage and record any maintenance that I do on my cars and be able to report it back to me in a way that is easy to view.

By the way, check out the blog over at App Cubby. A couple of interesting posts regarding the iPhone App store, pricing, and application development. I agree with and sympathize with the guys over there at App Cubby. I'm glad they chose the path that they are embarking on now. Here's a short quote from one of their posts:

"I've realized that I would rather have small community of delighted customers than a gaggle of customers who don’t value what I’m doing"

That's pretty cool.

I feel a little bad about getting hung up on the price, but as a consumer, I don't want to pay for something that doesn't do what I want it to do. I don't mind paying for something that does what I need and does it in a good way. But for me, I need to be 100% sure it will before I shell out some money...that's just the way I am. I'll post a short review once I get more data entered.


And thanks Steve for all the links and updates

Sunday, January 25, 2009

Gas Cubby

Update on the Gas Cubby application.
I procrastinated and didn't get it yet. And look. The price dropped from $5 to $0.99
Now I don't really have to think about it. I'm getting it now. I'll be glad to donate $5 later if it does everything I want. I'll post a review later.

Thursday, January 8, 2009

iPod Touch

I got myself an iPod Touch. I would have rather have an iPhone, but I couldn't justify the monthly fee. So anyway, now that I have one, I need to figure out what I'm going to do with it.

I came up with a short list of apps I want. For now, I'm focusing on apps that you can use without a WiFi connection. I haven't done any tests around town to see how easy it is to find free WiFi, but I'm guessing it's not that available.

So anyway, here's my short list that I have right now.

1. I'd like an app to record my gas mileage and record car maintenance stuff.

2. A Note application that can sync with my laptop

3. A map application where I map out directions and it'll store it on the iPod so I can view it off line.

4. An application that will cache web pages so I can read them offline.

So that's it for now. And with the Internet being the Internet. Two of them are already available on the iTunes app store. The gas mileage application is called Gas Cubby. I believe it cost $10 and it has way more features than I need. But it does do everything I want, so I'm probably going to get it. The second is the web page caching application. It's called Instapaper. I haven't tested it out too much yet, but so far it seems to work pretty well. The only drawback is that it only caches the text. So no images and any fancy html stuff won't be there. But at least this app is free....and free is good.

Right now, the app that I use the most is the Notes app. I have a problem remembering things when I'm out and about, so I use the Notes application to keep lists of things. Books I want to get, restaurants I'd like to try, video games that have a high rating....stuff like that so far.

If anyone has a great iPhone/Touch application that they really like, I'd like to know about it.

Tuesday, December 23, 2008

87Percent Defined

It's been a while since I posted. I really hate that. The longer the gaps are, the easier it is to ignore it. I think it's because I have an idea to post and it doesn't really pan out and I get stuck on it and can't seem to move past it. At least that is my current excuse.
Anyway, as it it getting towards the end of the year, I've decided, as my New Years resolution, to just start posting whatever it is that I'm thinking about (yeah, I know, I've said this before). Some posts will be long and some may be short, some may be off topic (Not sure what on-topic is...I guess programming, technology, and learning). I'm also not going to worry too much about it making absolute sense.

So with that, let me start by defining 87 Percent. Basically 87% is just a little reminder to myself to finish things that I've started. Over the years, I've set a lot of little projects/tasks for myself. Anything from creating some cool application, reading a technical book, learning something new, networking my house, etc. I've notice that I have a hard time finishing projects. I usually get very near the end and get stuck getting over that last hump. 87% is just about the point where I get into a rut. Not quite 90% where you can see the end, but close enough where you know that with a little bit of hard work, you will be on the home stretch. Not quite enough where things are working and the task/project is usable or there is some satisfaction from getting close to your goal. But also far enough along where I've already put in a lot of effort.

87 Percent. I guess it really just means Perseverance.

Tuesday, November 11, 2008

It's on my radar


I'm sure you all are aware of Stack Overflow, the question and answer collaboration site for programmers. Joel Spolsky is one of the people involved with the site. Anyway, I think the site has just hit a critical mass state because it's been appearing more and more on my programming research Google queries. I noticed it a couple of weeks ago and have had several more hits this week. Maybe it's just a coincidence or maybe its a good time to check it out again.

Has anyone else been seeing it more in their query results?

Wednesday, November 5, 2008

Pearl


By some weird coincidence, we were at Pearl last night. We had no idea that Pearl was the headquarters for the Democratic Party of Hawaii. Luckily there were some portions open to the general public and we were there early enough to actually get some seats.

It was pretty awesome. We were on the fringes of the celebration and not really part of the party...but it felt like we were. I actually had goosebumps when they announced that Obama had won.

Oh, and happy hour beers are only $3.

Monday, October 13, 2008

Tenkaizen rebuttal

I've been thinking about a post that a friend wrote last month regarding Kaizen and Tenkaizen. There was something about it that bothered me and I guess I'm one of those types of people that always thinks up a snappy comeback 10-minutes after the person you were talking to has left.
So anyway, here is my response....a month later.

I think that Kaizen (continuous improvement) and Tenkaizen (revolutionary thinking) are different aspects of a similar concept. Kaizen, to me, is a big part of how you should live your life, both personally and professionally. You should always strive to better yourself. The key with Kaizen is not necessarily the size of the improvement so much as the fact that at you are doing things to improve yourself or your abilities and that this is a constant goal. This does not mean that you just improve upon only what you already know, for me, it means making yourself better, or more efficient, or more knowledgeable by whatever means that presents itself. This improvement could and probably should involve radical new ways of doing things, which to me is the Tenkaizen concept.

So perhaps, my new mantra should be:

Live Kaizen...Think Tenkaizen

Wednesday, September 24, 2008

Atlassian Backup chore

I was tasked with backing up Confluence and Jira. Sounds easy enough. They both have an XML backup that can be run automatically. The only problem, for me at least, is that the XML backup can take up a lot of space especially if you backup the attachments. On the last server we had, we actually ran out of drive space because the backups were just piling up.
So I decided to go a different route. The Atlassian folks actually recommend not using the XML backup anyway since it will eventually take too long or take too much space or could even become unstable. According to the documentation, all I needed to do was take a dump of the database and backup the Attachments directory.
I also wanted the backups to be run on a daily basis and wanted some way to monitor the backups. We use Hudson for our daily builds, so I wanted to use that for the backups. I also wanted to use Ruby (actually JRuby) to write the scripts. I really only wanted to use Ruby because it seemed cooler than writing a batch file.

I don't want this post to be too long so let me just go over the major issues and realizations from doing this little chore.

First of all, it took me a while to figure out how to get Hudson to run stuff on a remote machine. Basically you just need to create a free style project and then have the Job execute a Windows Batch file. Of course, nothing is that easy: If you run Ruby or a Batch file from Hudson, it assumes you are executing on the Hudson server and not on the remote machine.
I ended up using PSEXEC to enable Hudson to execute the program remotely. PSEXEC is an awesome tool that I've never heard about before. It just worked. How cool is that?
Anyway, after that find, it was just working out little kinks in the system. For example, PSEXEC did not like output streams when you run it from Hudson. It would give you an ERROR Code 1. To fix this, all you do is make sure your batch file has ECHO OFF at the top. PSEXEC would also hang when run from Hudson and I ended up putting an /accepteula switch to prevent it from hanging.

Secondly, I've come to the conclusion that Ruby ain't all that. I'm sure it is good for certain things, but just doing simple file manipulation (copying and zipping files) is just a pain. I had a hard time finding examples of copying directories and zipping files. And the ones that I did find didn't work. I ended up spending half my time trying to figure out how to do things in Ruby. Granted I don't know Ruby at all, but still, I would have thought examples for these simple tasks would be everywhere. So maybe Ruby is just not meant for those tasks. I ended up doing the script in a Batch file. Kind of ghetto, but it worked really well. Batch files may be a bit under rated.

So anyway, the chore is over. Everything works just the way I wanted it to work, with the exceptions of the tools that I ended up using. I think that's just the way things go sometimes. You need to roll with the punches and use the tools that fit the problem.

One final note. I obviously did not figure this out all by myself. It took a lot of Googling of the discussion boards, blogs, and all that good Internet stuff that is out there to find what I needed. Thanks to everyone that posted solutions to their problems because it sure helped me. I just wish I saved all those links so that I could give them proper credit for their work. I was working on an app that would help do just that...Shoebox v 0.1...maybe I should dust that one off and start working on it again.

Friday, September 19, 2008

Flex Graphics Library

I wanted to include custom graphic into my Flex application. I wanted to have something that I would be able to manipulate in code and also look the way I want it to look.
After some searching I found Degrafa. Degrafa is a graphics framework for Flex. It allows you to create custom, sophisticated graphics using the Flex markup language.

I haven't done too much with it yet, other than verifying that it works. I got it to display a simple circle in about 4 lines of Flex XML code. The only real problem, or inconvenience so far is that the graphics do not render in the Flex Builder designer. You need to compile the code and view it in the run-time application. I'm not sure if I'm doing something wrong or not, but at least it works.

This sample application that was done by Thomas Gonzalez for the 360 Flex conference in San Jose was done using Degrafa.



You can check out the working application here.

Saturday, August 30, 2008

Flex Unit

Tried out Flex Unit today. Setup was really easy. I followed the instructions that I found here and was up and running in 20 minutes.
Writing the tests were similar to the older version of JUnit. You basically create your tests, then you need to create a test suite to run them. Creating the test suite is kind of a drag, but on the plus side, you get a pretty nice UI from FlexUnit.





This is a snippet of the UI, but right out of the box, it just looks nice.

Thursday, August 7, 2008

The Zoo

This post is a little off topic but I just thought it was worth mentioning.
Last weekend we visited the Honolulu Zoo. In the past I've been really disappointed with the zoo. It used to look run down and the few animals that they do have are usually hiding out somewhere and you really never get to see them. Anyway, I think they did some major renovations because the zoo looks great now. We got to see a lot of the animals and the exhibits looked really nice. We were about a foot away from a pair of Cheetahs, a Siberian Tiger, and ... Fancy Chickens (?).
Kama'aina rates are just $4 for adults. It's totally worth checking out.


Thursday, July 31, 2008

Inspiring

I've been going through a rough couple of months with my work. Mainly it's been a bit boring and not too much fun. I was recently forwarded a link to The Last Lecture by Randy Pausch from Carnegie Mellon. I saw this when it was first posted sometime last year but I decided to watched it again.
Without even going into the fact that my problems are minuscule in comparison, his lecture was inspiring to me on many levels. He talks about having dreams and working hard and living right as ways to achieve your goals. He also talked about mentoring, something that I really enjoy doing but have not been able to do too much recently.
So I've decided to get out of my funk and focus on building upon my skill set, working hard to achieve my goals, and try to help others as best as I can.
I have also decided to spend the rest of the Summer teaching my son to use Alice. Alice is a tool to help students learn to program using a 3D interactive programming environment. It makes learning the basics of programming fun and interesting. Randy Pausch was one of the people who helped to put Alice together.
Thanks Randy...

Thursday, July 17, 2008

You Get What You Pay For

Maybe I'm just a bit naive and maybe a bit lucky. But so far almost every tool that I've downloaded and tried from the Internet has been pretty reliable. I mean as long as it comes from a reputable site or recommended by someone who seems trustworthy or knowledgeable, they just seem to work.

So anyway, I just tried this Ant code to create a task for Doxygen. (I didn't make the call to use Doxygen, but it's pretty good, if you really care a lot about documentation). But back to the Doxygen task for Ant. I got the link from the Ant web site in the External Tools and Tasks section. So you would assume all the tools and tasks are tested and they all work (and yes, I read the disclaimer at the top, but still). I tried the Doxygen task and for some reason it just didn't work. I spent the majority of a day trying to figure it out. What it eventually turned out to be was a configuration property that was being defaulted into the config file from the Doxygen task Java code. Who would have thought that a bug that would make it not run would be in distribution binaries? For the longest time I thought it was some sort of setup issue on my end. Anyway, I also ended up fixing another error in the code that someone else found and had posted in the bugs section and put in a few custom things that I thought might be a good idea. I also posted my bug find and solution into the bug list as well.

Don't get me wrong, I really appreciate the code that Karthik A Kumar wrote. It was really well done and gets the job done in a very cool way. The Doxygen Task really helped me out a lot and saved me a lot of time. I also learned a lot about Ant Tasks and Doxygen along the way. I think it was time well spent.

But just remember, things aren't always perfect...especially when they are free.

Gamer Bus

We were invited to a birthday party for one of my son's friends. The party was at a park and they rented out a bus with video games. It was pretty cool. They had 8 XBox 360s in the bus. One side had a long leather couch and the other wall had 8 LCD panel mounted to the side. Pretty cool.
Outside the bus, they setup a Wii to keep people occupied as they waited to get into the bus.

They basically rotated the kids (and me) into the bus to play 5 minute Halo3 tournaments. I managed to not get motion sickness as I played, which was good. The kids had fun sneaking up on me and bashing me with their guns, which was not good. They didn't even want to waste bullets on me......punks.


Friday, June 27, 2008

R&D Coding and Changing Requirements

I work on a lot of R&D type projects. Basically I'm building proof of concept applications or applications that support a larger goal. These applications, for the most part are throw-aways or will not be used beyond the life of the project and also will probably not be used by real users. And, as you can expect, requirements for these types of projects change a lot and new requirements are constantly discovered as you go.

The handling of changing requirements is really not too much of an issue and it's usually easy enough to handle those. Short development cycles and refactoring help to minimize the impact of changing requirements. But how much refactoring do you do when the project is just a demo? Should you really spend the time and effort to re-architect some new requirement that has popped up that throws a wrench into your design? Or do you just do a quick hack and patch up your code to handle this new "feature"?

What do you think? Where do you draw the line between maintaining great code and getting the job done when working on a demo/throw-away application?

Thursday, June 26, 2008

Baseball Mid Season Checkup

It's getting close to mid season and I thought it might be a good time to do a quick checkup on my team and analyze some of my picks.

I'm in 3 leagues this year. A MLB Rotisserie league, an AL Rotisserie league, and an NL head-to-head league. Right now, I'm in second place in all three leagues. Not too bad considering some of the players I had high hopes for have not come through yet.

MLB Rotisserie league


The strategy in this league was to go after a high batting average and strike out pitchers. I'm in first place in both those categories, so mission accomplished there. I also tried to pick a bunch of hitters that would have break out seasons, Markakis, Rios, Pence were all high on my list and all of them have fallen short of my expectations. My only real gem was Josh Hamilton. And while I'm at it, here is the biggest blunder of my draft. In round 4 I took Derek Jeter instead of Lance Berkman. I figured the shortage of good middle infielders would start a run and allow me to grab some better guys down the line. This didn't happen and I ended up 1. without Berkman, 2. with Jeter who is doing ok, but far from a round 4 pick, 3. no good corners, 4. I failed to pickup Dan Uggla when someone dropped him because I couldn't get myself to drop Jeter or Placido Polanco. In my mind, if I did grab Berkman, I would have probably picked up Uggla as well, since I had the first waiver wire pick.

AL Rotisserie league


Sort of the same strategy here as with the MLB league. High batting average and strike out pitchers. I'm in the lead in both those categories. I also have Markakis and Rios in this league, so again, sort of disappointed there. But I also have Hamilton and I also have Milton Bradley who has been a great surprise. I ended up punting on saves but luckily so did another team and so now I'm second to the last (instead of last) with 2 saves. I thought my pitching would be really weak, but I'm getting good production out of Zack Greike, Data Eveland, and Kevin Slowey. I'm going to wait until after the All-Star break and try to pick up low ERA/WHIP relievers and start moving up in those categories

NL Head-To-Head


This one is a bit more challenging since it is head to head each week. The key in this league is consistent hitting and finding two start pitchers. My main hitters are Jose Reyes and Lance Berkman. I'm getting huge production out of those two. I also have Shane Victorino, who people laughed at when I drafted him, but in this league stolen bases are 3 point...that's a lot. My pitchers suck but it's all about getting two starts so I'm hanging in there. I really like Tim Lincecum. He's turning out to be the ace of my staff...that sort of says it all right there.

Anyway, we'll see how the second half goes.

Wednesday, June 18, 2008

World Record Holder

Well..sort of....

..maybe not. But I did download and install Firefox 3 (download count). So far I like the improvements. The Mac OS look is really nice and the browser seems to be eating up a lot less memory than version 2. There would be times that I had to restart the browser to clear the memory. I haven't had to do that yet.
I must admit that I haven't tried out too many of the new features yet. One of the features I am going to look at soon is the new bookmark manager. I stopped using the old bookmark manager because it didn't allow me to organize stuff in an easy way. Instead, I would just dump my bookmarks into delicious. Which, just so happens, has a new Firefox 3 add-on. I upgraded that too and it looks like it has a lot more features as well. I haven't really checked that out too much yet either so we'll see which one wins out....or if they both serve a purpose, I may end up using them both.
The new location bar has been working really well so far. Seems to be much more smarter than the old one. So far the location that i really want has popped up at the top more often than not. But then again, I'm a creature of habit and tend to visit the same sites throughout the day.
One thing that doesn't work in Firefox 3 is the Google Browser Sync add-on. I'm thinking of trying out Foxmarks instead. It seems to be just as good, if not better. Google Sync didn't allow me to get to my saved stuff and at times it would lose my tabs.
So anyway, if you haven't already, give Firefox 3 a try. Tell em a world record holder sent you.

Flex Woes

I've been experiencing a lot of strange behavior with Flex recently. I would add a new variable definition or an empty method to a class and all of a sudden, my application does not display. I was baffled by this for days.
I finally got the Flex Builder debugger to work and it gave me Error #1065: Variable is not defined error.
So I made sure all of my variables were defined....no luck. I even commented out every other piece of code, sometimes it would work, sometimes not. I then found out that this error message could also mean that your class is not public, or that you did not use an object, therefore it will not be included in the SWF file. All of which made no sense because all I did was add a variable declaration.
To make a long story short, the problem turned out to be with an XML object definition. I moved it to the end of my variable definition list and things started to work again. But this was a temporary solution. I have a feeling that putting the XML definition at the end of the list just ensured that the other variables would be defined before Flex errored out.
Eventually I removed the XML and put it in an object. I also made sure that all my XML was valid and all error cases were handled. Things have been working fine since then. I have a feeling that since I was breaking off pieces of the XML to be used in Flex containers that somewhere along the line something got corrupted. I still use pieces of the main XML and allow the Flex components to modify the pieces to modify the main XML document, I'm just a bit more careful about it. Using XML as a data storage mechanism for Flex has turned out to be a good thing and I'll be using it from now on.