Posts

Showing posts from 2009

Calculating total interest accrued while paying down the simple interest loan periodically.

I was unable to find a web service or calculator on any websites that had a simple interest calculator in which the total of the loan was being payed down regularly. I was forced to make one in Excel. There are plenty of amortization calculators out there that generate the schedule for a loan with compound interest, like a mortgage, but none that show the schedule for a simple interest loan, like some HELOCs (in Canada). My Excel spreadsheet allows one to compare an amortization schedule on a compound interest loan to a schedule for a simple interest loan. This is useful if you want to see the affect of making payments on a simple interest loan, equal to the same amount at the same time of the month on the same frequency as you would on a mortgage. The spreadsheet assumes interest for the simple interest loan is calculated daily and that payments against the loan are applied to the interest accrued first, and then toward the principal. It can be tweaked if you wanted to calculate i...

New annoyances: Windows 7 and Bluetooth enabled devices.

Thorough testing on my part has proven that Windows 7 can not receive large files, approximately anything larger than 225 KB, from some Bluetooth devices. In this case, my Nokia 6301 can not send to the "fsquirt.exe" utility on Windows 7. I tested this with 3 different machines running Windows 7 (6.01.7600), two laptops with built-in bluetooth and a desktop using a bluetooth dongle. The error message offers no clue as to why or what happened. All it says is " Bluetooth file transfer not completed " " The transfer was cancelled by the Bluetooth device or Bluetooth enabled computer. " However, the Nokia 6301 has no problem receiving large multi-megabyte files from a PC running Windows 7. The Nokia 6301 is also able to send/receive large files to other devices (phones, PDA's), and computers running Windows XP, Vista, or Mac OS X. On the other hand, Windows 7 was able to receive files over bluetooth from other bluetooth-enabled devices, including: com...

Using Apache ProxyPass to redirect requests to mongrel server obscuring the mongrel port and loading a default Ruby on Rails model.

Must run mongrel_rails using sudo on Mac OS X Leopard Server rails_app $ sudo mongrel_rails start --prefix /field_management_system -d Apache setup: Create <Location> directive/"realm" in serveradmin, Add lines for ProxyPassReverse with BalancerMember http://127.0.0.1:3001/field_management_system Rails app configuration. In routes.rb add a regular route for events model. map.connect '', :controller => "events", :action => "list" Delete the file index.html in rails_app/public

Failed attempt to use Mac OS X Leopard stock installation of Ruby on Rails.

Stock installation of RoR, if updated to Rails 2.2.2 fails because it breaks MySQL functionality. Using gem install mysql fails because the stock Ruby interpreter packaged with Xcode 3.0 is only 32 bit and the stock version of MySQL and its libraries for building mysql clients are 64 bit. Link to Chris Cruft's blog about MySQL gem problems Faced the same error messages as in the blog above, and followed basically the same steps. Below is the initial error message when trying to install the mysql gem. /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby extconf.rb install mysql checking for mysql_query() in -lmysqlclient... no checking for main() in -lm... yes checking for mysql_query() in -lmysqlclient... no checking for main() in -lz... yes checking for mysql_query() in -lmysqlclient... no checking for main() in -lsocket... no checking for mysql_query() in -lmysqlclient... no checking for main() in -lnsl... no checking for mysql_query() in -lmysqlclient... no ***...

Playing with SOAP in Ruby on Rails using WSDL Driver Factory

-First, a little background on why I am using RoR and SOAP. When I helped design and build an inventory and booking system circa 2007, my role was basically systems/business analyst. I also provided the impetus that we build the system using tools beyond simple "procedural" PHP/javascript, and that we look for a web application technology platform which would allow us to rapidly build a system that stored everything in a relational database. Back in 2001, I wondered why I had to write SQL queries for web applications when I knew that if I was working with a well-designed database, there should be techniques to generate queries or even better... a developer could write objects that were basically entities from an ERD and actors from a UML and these objects knew which other objects were related to it and had methods to access all the information without having to write any SQL or be intimately aware of the relationships between tables. So for our inventory and booking system, ...

How to use Ruby on Rails to integrate with a legacy database while leveraging scaffolding.

I am trying to be as lazy as possible... rails_app $ rails independentreps -d mysql Edit config/database.yml with specific database name, host, username, password. Add additional environment records if required. For example: development: adapter: mysql encoding: utf8 database: indrep_development pool: 5 username: root password: pw host: localhost test: adapter: mysql encoding: utf8 database: indrep_test pool: 5 username: ... ... production: ... database: indrep_production ... ## Additional Environment Records legacy_production: adapter: mysql encoding: utf8 database: reps_db pool: 5 username: admin password: letmein host: 192.168.0.10 port: 13540 From within the application folder, use the generation features of the Ruby on Rails framework rails_app $ ruby script/generate model Client rails_app $ ruby script/generate scaffold Client So scaffolding is generated for the first time. Next, edit app/models/client.rb with set_table_name, set_primar...

A quick update on installing and running VMware Server on Vista 32-bit

I had only very minor experience with VMware, having only firsthand experience with it on an iMac with VMware Fusion beta installed. The iMac ran Mac OS X 10.4 and VMware Fusion was used to host a Windows XP guest OS. It ran very slowly, possibly due to the lack of Intel VT-x (Virtualization Technology) on the model of Intel Core 2 Duo. Also, the iMac only had 1 GB of RAM. In early February, 2009, I was compelled to install VMware on my laptop to run a Linux server environment. The laptop is an ASUS F8Sn-B1 with an Intel T8100 and 3GB of RAM. My hope was that performance on this machine would not be a problem. This is just a distillation of some of the issues I discovered while preparing to do the installation. There are several VMware Products, it used to be that the versions you wanted to download were the beta versions (Fusion for Mac, or Server beta). Those versions you could download, install, and run a VMware host for free indefinitely. Now, VMware Server 2.0 is out of be...