I have had an Android phone for a while now, and one of the reasons that I picked that particular phone was so that I could create my own applications without going through a central marketplace. Until now, I have never actually done it. The Android marketplace has had all the utilities and apps that I have wanted. But I’ve decided that I want to learn how to write software for Android and there is an app that I have always vaguely wanted and haven’t found.
The app is a duration based alarm. This is a common way to set an alarm for a nap, but I would like to use the same system for an over-night alarm. Since I don’t have a day job, I don’t have to get up at any particular time, but I’d like to limit my sleep to the amount of time I need.
The application is simple enough to be a good problem to learn Android development with.
I have had bad experiences with Java and eclipse in the past, so I’ve decided to do all my Android development in a virtual machine. I used Oracle’s Virtual Box and an old copy of windows XP. While the Virtual Box software is nice (especially since it is free), this took a lot longer than I had expected. I had forgotten how old windows XP is and I spent hours installing updates. Installing eclipse and the android SDK went fairly smoothly and once installed, I was able to hook up my phone and run a sample app through the VM.
The Android SDK documentation is good, and the sample apps provide a lot of examples to follow and I was able to make quick progress on my program. The GUI builder is not bad, but I spent half the time editing the XML directly anyway. The hardest part was the lifecycle. It takes a while to get used to the idea that your program can be killed and re-started with very little notification.
The app took about three days of me working on and off. I was impressed by the Intent system which allowed me to easily use the built in alarm software to handle the alarm part while my app just does alarm scheduling. I was least impressed with the resource ID system and java in general. I have always disliked java and this project reminded me of all the ways that java makes my code ugly and my coding sloppy. There may be a better way to do this, but the default mode for the resource ID system makes all the GUI elements into global variables.
I used the local database to save off the user’s last alarm duration. Once I got used to it, that is a very convenient system. Much like what is built into C#.
I have no plans to put the completed app on the Android Market. It works fine, but I have no desire to test it on other phone models.
I have added a new feature to my personal PriceTracker application. I can now add computer games to the wishlist and get price updates from Steam. Since Steam doesn’t have an API like Amazon, I am simply scraping their web page. This makes the application even less likely to be released, since Steam could change their page layout at any time.
William and I went to San Carlos. It was a very good trip. Very relaxing and peaceful there. There was a neighbor cat that was super friendly, we found a couple new good restaruants, and we lived without running water for a couple of days.
The PriceTracker application is mostly complete. It keeps track of products and has become a handy tool, if mostly for keeping my wishlist. I have just added a new “Item Alert” feature to the program. You give the program the name of an author or artist that you like and it will watch for new releases by that creator. Here is what the screen looks like:
I inherited a pressure cooker (among other things) from my Grandmother. I have been wanting a pressure cooker, but have always been a little scared of them. When I was considering buying one, there were a couple features that really appealed to me. The first was the cooking speed and the second was the higher pressure cooking things more completely. Living in Denver, I have had a lot of trouble cooking beans till they are soft like a canned bean.
The pressure cooker that I inherited is an older model “Magic Seal” that has a rocking 15 PSI weight and a safety gasket. I was pleasantly surprised to find that the rubber seal (not pictured) was still in good shape and that you can still get parts for this model online.
I have tried a lot of different foods and have had mostly good results. Beans come out soft and creamy. Tough cuts of meat can be cooked quickly. Chicken becomes shreadable in 20 minutes. If you haven’t used a pressure cooker before, it is similar to making something in a crockpot except that hours worth of slow cooking are replaced with 30 minutes of pressure cooking.
My favorite foods to pressure cook are pinto beans, steel cut oats and Dutch vegetable whip. The last is a recipe that was included in the instruction manual:
3 c. diced potatoes
1 c. diced carrots
1 tart apple, peeled and sliced
1/2 onion, sliced
1 c. water
1 tsp. salt
1/8 tsp. pepper
2 tbsp. butter
1 tsp. chopped parsley
Place all vegetables in a pan (except parsley) with water and cook until vegetables are done. Mash, add butter and whip until fluffy. Garnish with parsley. If you have a pressure cooker, cook 3 minutes at 15 pounds of pressure. Cool cooker at once.
I was a little disappointed with cooking brown rice. I had hoped to save time, but by the time the cooker comes up to pressure and then slowly comes back down to normal pressure, the time savings isn’t much at all. Same with steel-cut oats. It takes longer (about 45 minutes total) in the pressure cooker instead of ~15 minutes on the stove top. Of course the oats are so much softer and creamier after pressure cooking, so it is worth the extra time. Anything that can be cooked with the “fast release” method (running the cooker under cold water to quickly drop the pressure) is significantly faster. But all the grains and beans are “slow release” (meaning you just wait for the pressure to drop on its own).
Something that I hadn’t really considered is how much less energy it takes to cook some foods. Once the pressure cooker comes up to pressure it takes a very low setting to keep it going. And since the cooking time is already much shorter you use quite a bit less power. I don’t really have a good feel for how much gas it takes to cook compared to a water heater or furnace, so I don’t know how much this really matters.
I am starting development of a tool that will track the price of items at Amazon.com. I will build a wishlist of items and the program will check the price of each item daily. It will let me know if the item is on sale and what the current discount is.
There are tools online for doing the same thing, but I’d rather not enter my wishlist into a website and I’d rather not get more email.
Since the program is for my own use, I’ll add items to the tracker by going to Amazon.com, finding the item, and then entering the ASIN into the program.
The program will use Amazon’s Product API to get a bit of product information and the current price.
I am going to write this program in C#. I will be able to re-use quite a bit of code from my MediaDB application which also uses the Amazon Product API.
I made some “tomato conserva” today. I started with 3 lb of tomatoes and ended up with 6 oz of a thick tomato paste. The flavor is incredible though. It is like tomato essence. I got the idea from here:
I’ve also been processing the basil harvest. So far I have spent two hours picking basil leaves off the plants and I probably have another hour to go. I am drying most of it, but I have frozen one batch.
Today was our last day at Raytheon/Solidyn. After about 15 years as a software developer in the aerospace industry, I am retiring to pursue my own interests. I plan to do more reading, play the violin, and write the software that I want to write.
I’ve had some good experiences, made some friends, and learned some skills at work. But it has been a long time since I have enjoyed the job or found it fulfilling.
I will mostly miss the non-work parts of work. The opportunity to meet interesting people, the daily walks by the golf course, and the geese.
We took a trip to Las Vegas with a friend to see the Star Trek convention. It was the 45th Anniversary and Leonard Nimoy’s last appearance. We also rented a car and went to the Hoover Dam and took the tour. We also went to an “Ice Bar” called Minus 5. The room was mostly made of ice and kept at -5 degrees C. They gave us coats and gloves when we went in. And the drink glasses were made of ice. The full set of pictures is here.
The SimFinance application is mostly done.
As is always the case, the software was more complex than I thought it would be. The main complications were due to the fact that my partner and I aren’t married. So the application had to try to optimize who paid the bills to manage the size of each of our accounts and how much taxes we each had to pay. The other big complication was trying to manage our traditional and Roth IRAs to minimize taxes each year.
There are some big things yet to do:
- Come up with a model for stock dividends. Right now, dividends are simply included in the return of the S&P. However, that is not really accurate, as the yield of dividends lags behind changes in stock prices. Also, taxes are due on dividends the year they are paid instead of the year the stock is sold. Those two differences may end up balancing each other out in the overall results.
- Investment strategy comparison. Would dividing our money between bonds, i-bonds, and stocks be better overall than having everything in stocks? Does the reduction in volatility pay off? Or is it better to just accept the volatility and maximize returns?
- More optimization post 60. The order of IRA withdraws should change after 60. Need to model medicare.
The model is giving us an 85% chance of success right now. I don’t really think that the things that are left to do will change this number significantly. It is surprising how much money we have to have to get a 95% chance of success and how much variation there is in the possible outcomes.
It is possible that treating the S&P 500 as a random distribution is wrong. While the historic data looks random, there probably are some underlying “fundamentals” that keep the stock prices within a range. I am not sure how to add that to the model besides trying to put an overall cap on the market returns.