NetNewsWire

Like most everyone else in the modern world I subscribe to RSS Feeds and use an RSS Aggregator to gather all of those feeds and present them in a nice manner. Unlike most people I use a desktop application to read my subscriptions instead of an online application like Bloglines or Google Reader. I tried both of those services, but in the end I always enjoyed using a desktop application. For a while now, on the Mac, I have been using NewsFire. I received it with one of those bundles of software I've purchased. It works nice, but I'm always on the outlook for new software to try out. Recently another RSS Reader was brought to my attention through some blogs I read. It's called NetNewsWire. This software used to cost money, but a few weeks ago the developers released it as a free download. I downloaded it and gave it a try, and now it's my new RSS Reader. Here's what sold me on it

1. It has a built in web browser interface, so if you click on a link in a post you aren't taken out of your feed reader into your web browser.

2. It has an online counterpart, NewsGator, which is also free, and it keeps in sync with your desktop application. That way you can view postings on your local machine or from another machine on the web, and everything keeps in sync. I don't read blog postings at work because they tend to take up my time, but this would allow me to hop on at lunch and check out what's going on.

3. It has a nice interface for saving posts or clippings from posts.

The company has a Windows application called FeedDemon. I can't speak for how nice it works, but if it's anything like NetNewsWire it's worth checking out.
|

Mac Software

I did a post a little over a year ago detailing some of the software I enjoy using on my Mac. Since the time I wrote that posting I have started using other software on my Mac too, so that's what I'm writing about in this post. I recently purchased a bundle from Macheist in their second annual bundle offering. It's pretty nice, they offer a bundle of software, usually valued at a couple hundred dollars, for around $49, and part of the proceeds go to charity. I purchased a bundle last year, and purchased another this year. Even if there is one or two applications in the bundle you like, it's usually cheaper to purchase the bundle than to purchase those applications separately. You also get the benefit of trying out new software you may have never thought of trying before. There were a couple applications in this years bundle that I already owned, Pixelmator and AppZapper, but I have a friend that has a Mac that I will gladly pass those along to. Some of the applications I got this year that I have started using are

Vector Designer - this is a vector graphic program, similar to Adobe Illustrator. I currently use an application called Intaglio which I received with last years bundle. I'm always up for trying another application to see if I like it better, so I went ahead and installed it and will be trying it out.

1Password - in todays world you probably have a lot of web sites you visit that require you to register to be a user. Most of us probably get to the point where we use the same username/password at each site, that way we have a lot less chance of forgetting it. 1Password is an application that not only keeps track of your username/password and can automatically fill it in for you, but you can also use it to generate a strong password for you. This is a great feature, as long as you plan on visiting that site from a computer that has 1Password installed on it, since you don't know the password it creates for you. You can also use 1Password to help fill out forms for you. You can create a profile, and within that profile enter your name, address, e-mail, etc. Then, once you are on a form asking for that information you can have 1Password fill the form out for you. All of your data is stored encrypted on your computer, which uses a master password to unlock.

Speed Download - this is a download manager on steroids. You can have Speed Download integrate itself into all the browsers on your computer, plus it's supported in some other software, such as iTunes and Growl. A download manager is a nice tool to have. It sets itself up to communicate with the site you are downloading from, which allows you to resume a download which may have been interrupted earlier. Speed Download can also be used for basic FTP tasks, allowing you to download/upload to your FTP server.

CSSEdit - if you do any sort of web development these days I certainly hope you have hopped on the CSS bandwagon, so you are now separating your styling from your presentation. CSSEdit is an application that helps you with real-time CSS styling. You can make a CSS change and see it automatically without having to save and upload the changes.

Cha-Ching - I currently use money management software called iBank. I've been pretty happy with it, I use it to track my Checking, Savings, Roth IRA, Sharebuilder and Credit Card accounts; but, like with the vector graphics software above, I am always up for trying another application to see if it provides a nicer way to accomplish what I currently do in the current software.

Taskpaper - this is what is commonly referred to as GTD (Get Things Done) software. It has a simple task and it does it well. You create projects, and for those projects you create tasks. Once you complete a task you can cross it off your list. This is very similar to the web application I am creating with RoR, which I have been detailing in a couple blog posts. I am a big fan of working in the GTD fashion. I like breaking a project down into manageable, trackable tasks. I like being able to look at a list and see what I have left to accomplish. I also like being able to cross off a task when I'm done. It adds a finality to the task, makes you feel like you accomplished something throughout the day when you can look at your list and see stuff crossed out.

Tiki Magic Mini Golf - yes, this is a game, something I don't have many of on my computer. I installed it and gave it a try. It's actually pretty fun. Think of it as putt-putt golf on your computer. My laptop handles the 3D graphics pretty well, I have it run at 1280x1024 and a high graphic setting and I don't receive any sort of frame delay or flickering. It's something I will fire up every once in a while.

There are a couple other applications that were included with the MacHeist bundle: SnapzProX, Coversutra, iStopMotion, Awaken, and Wingnuts 2, but I haven't installed them at this time, so I can't speak for how I like them, but will definitely review them if I install them in the future.

There are a couple other pieces of software I have been using that I got separate from this bundle.

iSquint - once NBC decided to take their shows off iTunes I started downloading the shows from the web. These shows are generally in DivX AVI format, which doesn't natively play on my Apple TV or Video iPod. iSquint takes care of this. Drop the video on iSquint and it will convert it into the format needed to work with Apple TV / iPod, and can also import the video into iTunes once it's done with the conversion. This way I still get to enjoy the shows out on my big screen TV.

Yummy Soup - strange name, but a great program. I like to cook. I don't do it often enough, but I do enjoy it when I get around to doing it. Yummy Soup is a recipe manager. It comes preloaded with a lot of recipes and can import recipes from a couple different web sites.

Calorie King - I purchased this software to help me keep track of what I put into my body every day, so I can see what I need to cut out to lose weight. It has a huge database of food and you can add your own custom food to the database too. When I first started using this it let me see that even though I was never going above my daily allotment of calories, I was going way above my fat and carb allotment.
|

Budget

Since I left Kimberly I have been working to get myself out of debt. When her and I split I had over 20k in debt. Now I am down to a couple thousand on one credit card, which I will be paying off over the next couple months. Once all of that is done I plan on getting my finances in order and concentrating on saving, investing and retirement. I figure the best way to go about this is to come up with a budget. I subscribe to a couple financial blogs, and recently saw a link to an article about a budget called the 60% Budget. I looked it over and thought this might be a good way to start going about coming up with a budget for myself. The 60% Budget breaks down like this

60% of your gross income should be dedicated to "Committed Expenses". These are

- Basic food and clothing needs
- Essential household expenses
- Insurance premiums
- Charitable contributions
- All bills
- All taxes

10% for "Retirement" expenses
- 401(k)
- IRA or Roth IRA

10% for "Longterm Savings"
- Investments, like stock, bonds, etc.

10% for "Short Term Savings or Irregular Expenses"
- Savings account
- Vacations
- Repairs
- New Applicances

10% for "Fun Money"
- Spend on anything you like.

I use a software program called iBank to track my Checking, Savings, Credit Cards, Investments, and it has a budget feature, so I am going to use this to start tracking all my expenditures to see if I can stick to this budget. It will be nice to have everything working well, so that my savings, investments and retirement funds have a consistent inflow. I may open a couple ING savings accounts, that way I can have one set up for Vacations, one for Emergencies and one for my regular savings, but I haven't decided.
|

Giving Facebook Another Shot

I read that not too long after I quit Facebook, due to the Beacon privacy concern, there was enough backlash in the Facebook community to convince Facebook to offer the option to not have Beacon enabled. Since I quit Facebook, or better yet disabled my account, since you can't really ever leave Facebook, I received a couple invites from friends, so I decided to re-enable my account. Don't know how often I will use it, but figure it will be like my Linked-In account, something I log into every once in a while.
|

Classic Punk

I was going through my iTunes library making a 'Classic Punk' playlist and thought I'd share what I consider to be some of my favorite songs. A lot of the punk I listen to is from the 70s and 80s, so a lot of these will be from around that time period.

1. If The Kids Are United - Sham 69 : I love the video I found on YouTube for this, looks like it's from some kids variety show.

2. Your Generation - Generation X : Great song from Billy Idol's old band, Generation X.

3. BloodStains - Agent Orange : I love the riff in this song, a great skate tune.

4. Jilted John - Jilted John : Great old punk.

5. Amoeba - Adolescents : Another classic skate tune.

6. First Time - Boys

7. Brickfield Nights - Boys : Love this song

8. The End of the World - The Avengers : awful video, but a great song.

9. Homicide - 999 : This is a great old punk band.

10. Rich Kids - Rich Kids : punk boy band

11. All This And More - Dead Boys

My playlist is currently up to 76 songs. I'm not going to post them all today, will break it up into an occasional posting.
|

Ruby on Rails Project - To Do List #3

In step two of my PC Task project I created my models for Projects and Tasks. In step three I will move on to the Controllers and Views.

We'll start off with the Projects Controller. Just like we used a script to generate our Model, we can do the same thing with our Controller. The syntax for creating a Controller is

$ ruby script/generate controller controller_name

So, to create our Projects Controller type the following

$ ruby script/generate controller Projects index

You should receive something similar to the following

exists app/controllers/
exists app/helpers/
create app/views/projects
exists test/functional/
create app/controllers/projects_controller.rb
create test/functional/projects_controller_test.rb
create app/helpers/projects_helpers.rb
create app/views/projects/index.rhtml

So, you'll probably notice I added an extra argument on to the end of that command, 'index'. The default name for the file that is accessed when a user visits your site is the index page, so adding this extra argument just created the index.rhtml page for us. If you leave it off, you can always create it later yourself.

Before I move on, I never did define what Model, View, Controller really meant. Here's a couple quick definitions.

Model - handles data and business logic
Controller - handles user interface and application logic
View - handles GUI objects and presentation logic

In a web application the chain of events is

a. Web browser sends a request for a page to the controller.
b. Controller gets the data it needs from the model.
c. Controller renders the page then sends it to the view.
d. View displays the page in the browser.

OK, if you were to start the application, using the following command

$ ruby script/server

and you open a browser and navigate to http://localhost:3000/projects, you should see a page that has the following displayed

Capture2

Now, we need to decide what we want to display in the View, so we can code for this in the Controller. I think at the moment we can just display a list of all the Projects.

Now, before I go any further I want to do a quick introduction to a feature of Rails called Scaffolding. Scaffolding is a tool that can quickly create a view for you that you can use to interact with your model. The view that's created lists all the data in the table and creates an interface for performing your CRUD operations. Scaffolding used to be the selling point of Rails, back when it was the new kid on the block. It's a fun little feature, but I think most developers forgo it for creating their own Controller and View. Scaffolding is very easy. Open the projects controller ($ mate app/controller/projects_controller.rb) and modify the file to look like the following

class ProjectsController < ApplicationController
  scaffold :project
end

Now, save the file and refresh the page in your browser that points to http://localhost:3000/projects. Your web page should now look like this

Capture1

I had created a Test Project in step #2, so it is showing here. As you can see, it has all of the CRUD operations on the screen. This is a cool feature, something I would love sometimes at work in .NET WinForms (I think something similar to this is available in ASP.NET 2008, which is a pretty good clone of Rails, way to innovate again Microsoft), but it's not the route we will take. Instead we will go "our own route".

Modify the Controller file to look like the following

class ProjectsController < ApplicationController
  def index
    @projects = Project.find(:all)
  end
end

Here we define an index action and the find(:all) returns all records in the Projects table. If you refresh the page in your browser you are back to this page

Capture2

We haven't defined any code in our view (index.rhtml), so nothing is displayed yet. We now need to update the View to show a list of Projects. Open the index.rhtml file and update it like so

<h1>Projects</h1>
<ul>
  <% @projects.each do |project| %>
    <li><%= link_to project.name, :action => 'details', :id => project.id %></li>
  <% end %>
</ul>

What all is this doing? @project is an instance variable, he was defined in the Controller. The line with @projects.each do |project| is basically looping through the items stored in @projects, which is the result of the find(:all) command, and storing the current item in project, which is then used when writing out the list. The link_to command is an HTML helper that wraps the item in anchor tags. If you view the page in the browser now you should see the following

Capture3

Not as cool and exciting as what was created by Scaffolding, but it's a start. If you click on the link you will receive an error. This is because we defined an action called 'details' that we haven't defined yet. Let's do that now. Add the following to the Projects Controller.

def details
  @project = Project.find_by_id(params[:id])
  @tasks = @project.tasks
end

This uses the project.id that is passed as id in the parameters and gets the tasks related to that project. Now we need to create a details.rhtml page. Create one in the same directory as index.rhtml and add the following code

<h1><%= @project.name %></h1>
<ol>
<% @tasks.each do |task| %>
<li><%= task.name %> <%= task.due_date %> <%= task.is_complete %></li>
<% end %>
</ol>

Now, if you click on the link on index.html you should see a page similar to the following

Capture4

Not the prettiest page in the world, but it will do for now.

We now have a Controller that will gather the information about the Projects and the associated Tasks, and will display that information in our index and details View.

In step 4 I will add more of the CRUD functionality.
|

MacWorld 2008 Follow Up

So, the rumors were true. The MacBook Air did turn out to be a thin, super-light, notebook. It looks like quite an engineering feat, like a lot of Apple products. It's not something I'm interested in, since my MacBook isn't exactly something I lug around with me everywhere; plus the MacBook is pretty small and light (I have the 13" one).

Other things announced today are a wireless storage device called Time Capsule, to work in tandem with Time Machine, the new backup framework built into Leopard. Looks nice, but I already have Time Machine working with an attached external 500GB drive.

Apple TV finally got an update. I've been very pleased with Apple TV, but hated the fact that it was introduced and never really had any major updates (aside from hooking up to YouTube). Well, that ends in 2 weeks. That's when the software update will be made available to update Apple TV with some new features. The main new feature is the fact that you no longer have to download to your computer first, then stream to the Apple TV. You will now be able to purchase Movies, TV Shows, Podcasts, etc from the comfort of your couch. Also, you can now rent movies. I canceled my Netflix account a month ago, just never had time to watch the movies, so they would sit around for a month or so. Now, with this feature, I can rent movies when I feel the need, and get it at that moment. Once downloaded, you have 30 days to watch the movie. If you start watching it, you have 24 hours to watch it, before it expires. The last feature is there is now HD content available. I can put my HD TV to use again.

There's also an update for the iPhone, will need to see what Paige thinks of it, since she owns one.
|

MacWorld 2008

Today starts MacWorld 2008. It's funny. For some reason I always get an image in my head of Steve Ballmer calling together all the project managers at Microsoft, getting them into a big room, and turning on Steve Job's Keynote Speech, saying, "Watch closely everybody, this is what we'll be working on this year."

Steve Job's Keynote has gotten pretty famous. This is where he introduces any new products and any new features coming down the pipes. It's also where lots of people have built up such high expectations, because of rumors, that they end up disappointed because some product featured in a rumor doesn't come to fruition.

Today's big rumored product is something called a MacBook Air. Some are thinking a super thin, lightweight laptop. Guess we'll see if this comes about later on today.
|

Ruby on Rails Project - To Do List # 2

It's been a month since I made the first post for this personal project. What can I say, it was the holidays, and I had other stuff on my mind. I'm still interested in learning Ruby and Rails, so I'm not abandoning the project. Here's part two.

My To-Do List web application is going to start off pretty simple. The first thing I need to do is consider the entities that are needed. To begin I will just have a Project entity and a Task entity. A Project can contain one or more Tasks. A Project will have one attribute, a Name. A Task will have a couple attributes: Name, Due Date, Project ID and an Is Complete flag.

Just like Rails provided us with scripts to generate our directory structure, it also provides us with a script to generate our Model. Remember, Rails is based on the MVC (Model, View, Controller) Design Pattern. The Model creation syntax is

$ ruby script/generate model model_name

Now we create our two Models

$ ruby script/generate model Project
$ ruby script/generate model Task

Here's an example of the output you should receive

exists app/models/
exists test/unit/
exists test/fixtures/
create app/models/project.rb
create test/unit/project_test.rb
create test/fixtures/projects.yml
create db/migrate
create db/migrate/001_create_projects.rb

As you can see, it not only generates our Model, but also the Test files for running our Unit Tests and files for migrating our database changes. This is one thing I enjoy about Rails, you don't have to use a tool to create your database tables and the columns in those tables, you can use the files that are generated. I recommend doing this, since Rails will automatically create Unique ID fields for you.

So, now that we have the Model created, we will add the code to the migrate file to create the columns we need.

If you look at the file 001_create_projects.rb in TextMate, you should see the following

class CreateProjects < ActiveRecord::Migration
  def self.up
    create_table :projects do |t|
    end
  end

  def self.down
    drop_table :projects
  end
end

If we performed a migration with this, it would create a projects table for us, and it would have a Unique ID field, but nothing else. We can modify it to add the fields we need, which is just a Name.

class CreateProjects < ActiveRecord::Migration
  def self.up
    create_table :projects do |t|
      t.column :name, :string
    end
  end

  def self.down
    drop_table :projects
  end
end

The code for 002_create_tasks.rb is

class CreateTasks < ActiveRecord::Migration
  def self.up
    create_table :tasks do |t|
      t.column :name, :string
      t.column :due_date, :datetime
      t.column :project_id, :integer, :null => false
      t.column :is_complete, :boolean
    end
  end

  def self.down
    drop_table :tasks
  end
end

We can now use Rake to apply these changes to the database. You should receive output similar to this

$ rake db:migrate
(in /Users/punkcoder/Development/Ruby/pctask)
== CreateProjects: migrating ==================================
-- create_table(:projects)
  -> 0.0257s
== CreateProjects: migrated (0.0259s) ===========================

== CreateTasks: migrating ==================================
-- create_table(:tasks)
  -> 0.0034s
== CreateTasks: migrated (0.0036s) ===========================

If you go look at the database you should see the tables with the columns. Now we can define the relationships between the tables. Ours is actually pretty simple: a Project has_many Tasks. So, how do we define the relationship? We do it in the Model. Go to app/models/project.rb, it should look like this

class Project < ActiveRecord::Base
end

(Oh yeah, really quick, you notice the < in the syntax above, well, Ruby is an Object Oriented language, and this syntax means Project inherits from ActiveRecord.)

So, to say that Project has many Tasks you pretty much state it

class Project < ActiveRecord::Base
  
has_many :tasks
end

This is a two way relationship, so we also edit app/models/task.rb to say that a Task belongs to a Project

class Task < ActiveRecord::Base
  belongs_to :project
end

Cool, now that we have that set up we can actually test this. Rails has an interactive development environment in the console which we can use. Type the following

script/console

You should see

Loading development environment.
>>

So, the first thing we will do is create a new Project. Rails has created the method we need to do this, it's the 'new' method. To create a new Project type the following

>> project = Project.new(:name => 'Test Project')

You should get the response

=> #<Project:0x24b614c @new_record=true, @attributes={"name"=>"Test Project"}>

We have created a Project named "Test Project". If you go look in the database you won't see anything, because we haven't called Save, instead it's just in memory at the moment. It has been created though, so you can inspect it

>> project.name
=> "Test Project"
>> project.new_record?
=> true
>> project.id
=> nil

Since it hasn't been saved in the database a Unique ID hasn't been assigned. Now, here's the cool part. Remember how we defined that a Project has many Tasks in our Model? Well, if you type the following, you get a nice surprise

>> project.tasks
=> [ ]

That's right, we never added a tasks field to the database, but we set up a relationship, and here it shows an empty array waiting for some tasks.

Now we can save it. Again, just like the 'new' there's also a 'save' method we can call.

>> project.save
=> true
>> project.id
=> 1

Now we have a Unique ID.

Now we can create a task, much like we created a project

>> task = Task.new(:name => 'Test Task 1', :due_date => Time.now, :is_complete => false)

We can't save the task yet, if you call Save you get an error

>> task.save
ActiveRecord::StatementInvalid: MySql::Error: #23000Column 'project_id' cannot be null.

We set the constraint on the project_id field that said it couldn't be null. To save the Task it needs to belong to the Project we created. We can add it using the << operand

>> project.tasks << task

Now you can call task.save and project.save

If you call project.tasks it will list all the tasks. You can access the attributes on the task like this

>> project.tasks[0].name
=> "Test Task 1"

Rails creates methods to allow you to find items in the database for creating an instance of an object. An example of this is

>> test_project = Project.find_by_name('Test Project')

now you can perform the same inspection as before

>> test_project.tasks[0].due_date
==> Sun Jan 13 22:34:17 -0500 2008

Rails actually creates a find for every column, so you can do something like the following

>> test_task = Task.find_by_project_id(1)
>> test_task.name
=> "Test Task 1"

Well, that's enough for now. I'll try not to take another month before writing up Part 3.
|

Ruby on Rails Project - To Do List # 1 (Reprint)

When I lost the files on my backup drive I lost my original blog files, which also meant the history of posts on my site. This is a reprint of part 1 of my Ruby To Do List project, since I am about to post part 2.

Originally posted on Dec 11, 2007...Good thing I'm not this slow at doing development at work Happy

>>

I am finally getting around to starting the personal Ruby on Rails project I wanted to work on, as a way to learn Rails development better. You can only learn so much from a book, real world experience helps a lot.

My plan is to build a simple To Do List application, I'll call it "PC-Task", just to add my Punk Coder touch. I am going to document each step of the process.

The first step is going to be pretty simple, it's just getting everything set up, creating the directory structure and getting the database created.

I am using the install of Ruby and Rails that came pre-installed on Leopard, Mac OS X.

These are: ruby 1.8.6 and rails 1.2.3

I am also using MySQL for my database.

Ruby on Rails has a directory structure which will be created with the following command

$ rails project_name

So, the first thing I will do is create this directory structure

$ rails pctask --database=mysql

Adding the --database=mysql switch will configure the application to use MySQL, saving you a step in editing the file.

I'm not going to list all of the files that get created, but here's what the directory structure looks like

$ cd pctask
$ ls -p

README
app/
config/
doc/
log/
script/
tmp/
Rakefile
components/
db/
lib/
public/
test/
vendor/

The bulk of where we work is in the application directory (app/), which contains the controllers, helpers, models and view directories.

Another important directory is the script/ directory. You will use this a lot in your development. One important thing in there is the server which our application will run on. We will use Mongrel, which listens on port 3000. You start Mongrel with the following command.

$ script/server

Once it's started you can open a browser window and go to http://localhost:3000/. This will bring up a default Welcome to Rails page with some Rails info.

The next thing to do will be to set up the database. I know the geeky thing is to do all your MySQL administration from the command line, but I am going to use a graphical environment called 'CocoaMySQL', a free tool you can find on the web.

I create a couple new databases named 'pctask_development', 'pctask_test' and 'pctask_production', at localhost using the root user. Now that the databases are created, we need to configure the application to connect to it. This is done in the database.yml file located in the config directory. If you open this in TextMate (my editor of choice), you should see a section that looks like this:

$ mate config/database.yml

development:
adapter: mysql
database: pctask_development
username: root
password:
host: localhost

This style of markup is YAML (YAML Ain't Markup Language), which is why it has the .yml extension. It's easy to read and something you use often in Rails development.

Since we used the --database=mysql switch at the beginning the adapter parameter is already filled out for us. Actually, we shouldn't have to make any changes, unless you've changed the default blank password for root user on localhost. If so, fill it out.

Now we can test the database connection. To do this, we will perform a database migration using the rake command. Type the following:

$ rake db:migrate

You should get output similar to the following if all worked well:

(in /Users/punkcoder/Development/Ruby/pctask)

If you receive an error, check to make sure your database is running. You can do this from the command line with the following command:

$ ps -ax | grep mysql

You should receive a couple lines of output showing you the mysql processes that are running. If nothing is running start MySQL

$ sudo /usr/local/mysql/bin/safe_mysqld

If MySQL is running and you receive an error, check the info in database.yml again.

That's all for now. We have the foundation set up to start development.
|

The Adicts

The Adicts are the longest surviving punk band with all the original members. The formed back in 1975 in Ipswich, England. I listened to them back in the day and have gotten back into them recently. For Christmas I received an iTunes gift card, and I used it to purchase Made In England. This CD contains 25 of their greatest hits, and it's definitely something everyone who enjoys punk music should have in their collection. If you are interested in hearing them, here they are performing 'Viva La Revolution' and great song.
|

iWork

I haven't ever really been big on office productivity software. It's the one category of software I always find I spend more time battling the software than getting any particular use out of it. In my day-to-day job I open the occasional Word document or Excel spreadsheet, but it's very rare for me to create one myself, unless I am throwing together a design document, which I find Word an awful tool for, but it's what we're provided. At home it's pretty much the same, not much use for office software, but I do like to use a spreadsheet every once in a while, so I broke down the other day and purchased iWork. Now I know I could use the free OpenOffice.org, or the NeoOffice version for the Mac, but I find them to be rather bloated and providing the same hindrance that I find with Microsoft Office. There is a version of Microsoft Office for the Mac, a new version comes out next week, but it costs over $300, plus it's pretty much the same version as on Windows, which I'm not a fan of. Instead, I decided to try out Apple's office suite, and I actually find that I like it. It costs $79, and it contains a Word Processor called 'Pages', a Spreadsheet application called 'Numbers' and presentation software called 'Keynote'.

Pages has two different modes, 'Word Processor' or 'Page Layout'. I like the separation, so you have the tools available that you expect when you are doing each mode. It's fully compatible with .doc and .docx, being able to open and save in those formats, so you can still exist in a Microsoft world.

Numbers is pretty amazing. Never thought I'd be a fan of spreadsheet software, but I threw together a budget spreadsheet in no time; it even has a graph. To create a comparable paige in Excel I'd have to have the help file open or do web searches. It's just very straight forward in Numbers. Again, like Pages, it supports .xls and .xlsx formats, so it can be used at work.

Keynote is what Steve Jobs uses for his MacWorld presentations, and they always turn out great, so I know it's a great piece of software. I don't find myself doing many presentations, but if I get the chance to I will definitely use Keynote.

Overall, I am satisfied with my purchase. Office suites have been around for a while, and they've become behemoths, with little new innovation coming out, so it's nice to see Apple throw in some new features and new takes on how to do things.
|

WCF Message Size Limit

My first technology post of 2008!

We ran into an interesting problem at work that I thought I would detail, in case others run into this problem. A little background on our project. Our application is used for the entry and management of contracts. These are entertainment contracts, which can pertain to 1 or more titles. These titles can have multiple rights and restrictions. A lot of contracts are pretty simple, but some can get complex, containing a large amount of data. In our testing we ran into one of these kinds of contracts. It was for a long running show, so it contained all the episodes ever aired, which was around 460 episodes. Now, add to that a couple rights that pertain to each episode and a couple restrictions, plus we attached a copy of the real contract in PDF form, which was around 860k in size. When we tried to save the contract it bombed quickly not giving any indication of what occurred. When we looked at the Request Message in Fiddler we saw that it was a little over 4MB in size and it looked fine, so no red flags there. We checked the trace logs and it didn't provide us with any answers, just an error message saying the server connection closed unexpectedly. We also looked at the app.config and the web.config settings to check if all the maxMessageLengths and maxBuffers were set to their maximum, along with high timeouts. All of this looked fine. Searching the web provided us with no answers, so we did some testing. We created a new contract that contained no rights or restrictions and we attached one instance of the PDF. This saved fine. We then attached 2 PDFs, then 3PDFs, and it finally failed once we hit 4 PDFs. This caught our attention because the size of the message we saw in Fiddler before was around 4MB and now this contract with 4 PDFs was around that size too. Still, 4MB seemed small, since all of the maxLengths in the config files are Int32, meaning their maximum value is 2GB. Now that we had this info I did a search and found a couple interesting things. MSMQ has a maximum message size of 4MB. This was interesting, but we weren't using MSMQ, so I looked elsewhere. That's when I ran into ASP.NET having a limit of 4MB for files being transmitted. This is apparently a safety feature to prevent DOS attacks. While we aren't using ASP.NET we are using WCF services with wsHTTP, so I figured it was worth a shot. I went into the web.config and added the following line in the System.Web section

<httpRuntime maxRequestLength="32678"/>

This set the max length of a Request to 32MB.

Once this was added we ran the same test we had before and the contract saved with no issues. We researched this issue over the course of a couple days and were fearing the worst. We thought we may have to re-architect the entire way we passed around data. In the end we were glad to see it was 1 line that fixed everything.
|

Happy New Year

Happy New Year! Here's to a great 2008.

Paige and I had a great time this New Years. We took a break from our usual going out to a restaurant and toasting in the New Year. This year we rented a villa at Callaway Gardens. It turned out to be nicer than we thought. The villa was very big, the only issue we had was there was too much furniture in it. You couldn't walk around without almost knocking your knees into some dangerous piece of furniture.

As part of staying at the villa we got full access to the park. This time of year there aren't many people visiting Callaway Gardens, so we didn't have to fight the crowds. The fun thing to do is going to the butterfly exhibit. We both took a lot of photos. I will link to mine once I have them off the camera and processed.

We brought along food and cooked ourselves a great meal. We bought a bottle of wine and sparkling wine, which we used to toast in the New Year. It was a nice evening.

I'm not doing my usual New Years Resolution post. Not resolving to do too much this year. My debt is under control, so I plan on keeping it that way. I could stand to lose some weight, so I will work on that. About the only other thing I can think of is trying to get back into taking pride in my job and working at Turner. Lately I've looked at the job as an 8 hour chunk of the day that stands in the way of me doing stuff I enjoy, and it hasn't always been that way. Guess I need to sit back and look at what it is I'm not liking and see what I can do to change it for the better.

Have a great year!!
|