Announcing TimesheetToaster.com

It’s currently in a pre-release state.  After a little more work and testing, we’ll be inviting a limited number of people to use and try it out as an Alpha product.  After that, there will be a public Beta.  Or so the plan goes. TimesheetToaster.com

 
January 22, 2010 23:07 by josh
E-mail | Permalink
blog comments powered by Disqus

Yep I’m going to do it

http://github.com/jcoffman/perforated-blog

more to come as time permits

 
January 13, 2010 15:32 by josh
E-mail | Permalink
blog comments powered by Disqus

The Pirate Way

Yes, that is George Washington crossing the Delaware. No, I am not suggesting that Washington was an actual, unlawful pirate. I condemn the immoral, brutal acts of real pirates; it’s the principles embodied that I admire. To me, a pirate represents freedom and the resolve to fight for it. In that regard, George Washington and the Founding Fathers represent my ideal of a pirate.

Current events in my country and professional life have prompted this post. There is much to admire and respect about my country, but which is being dismantled by the current administration. I see the same malaise set in within my professional world. The hard truth is that security is an illusion with a heavy price that buys you nothing but misery and failure in life. Liberty, morality, responsibility are the only way to succeed.

In the corporate world, as in daily life, making tough decisions and taking bold actions is something most people avoid. That is especially true when there are significant or dire consequences. When guided by common sense and good morality/ethics, those who take those risks are usually rewarded. When the safer road is followed, there is little or no success. What little success there is is mostly a second level benefit of those that took the risks. This is the path of fear, bureaucracy, and big government. And it’s usually laden with advertising for compassion, fairness, and community responsibility. There is nothing compassionate about losing freedom, encouraging failure, and lowering expectations.

Pirates take risks. Pirates rise up and rebel against oppression, and are rewarded for their resolve. Liberty and responsibility are the only way to succeed. AND it’s a reward we all share – a rising tide lifts all boats. There is no limit to growth and success that prevents others from sharing when some succeed. We all win if we choose to play.

This is so evident in business; it is often a complaint among those that work in large corporations, and yet so many chose to ignore it. So many projects fail because no one wants to make decisions and be responsible. Yet so many want to take credit in any success. That’s one big, hairy, headless ego monster that’s eats up everything around it, my friends.

I am not discouraged, because every wrong attempt discarded is another step forward. – Thomas A. Edison

Rebel for individuality, be resourceful, take a chance, make a decision, push for better, be open to improvement, and always take responsibility. That’s the pirate way. That’s why pirate ships worked against against a much better prepared, armed, and trained British Navy all those years ago. The captain took action, and was held responsible. The crew followed and took initiative. Those that didn’t were put off the ship. The bad captain was overthrown. The lesson is that each wrong attempt is an opportunity for improvement and success when you have freedom and responsibility.

As a man thinketh in his heart, so is he. – Proverbs 23:7

That which shackles you in your current life is almost assuredly in your own mind. It is the invisible cage we put ourselves in. Do you want to succeed in your personal or professional life? Do you want to make a difference in life? Be a pirate! Take action, learn, improve, and you will succeed. Everyone will benefit from it; your family, your community, and your country.

 
January 12, 2010 07:00 by josh
E-mail | Permalink
blog comments powered by Disqus

Why Pirates are better than Ninjas

Disclaimer

I have some personal admiration for the dedication and aesthetics of ninjas and samurai. I just find the pirate embodies more of the values I embrace. That’s not to say their history and brutal practices, but rather the liberty, individuality, and creativity are things to admire and even strive to. In the real world, this also means adhering to common sense and morality. Actual real pirates are generally horrible people lacking a moral compass. From here on out, I mean the idealism embodied by a pirate and not the scoundrel.

Liberty

A pirate is a free individual; unbridled by any man or government. Ninja’s are servants who exist to obey their master. Liberty is the first and most important value of a pirate.

Creativity

A pirate is resourceful and creative in solving problems. Always looks for new and better ways to attack a problem. A ninja is dependent on practice and aesthetics; his approach to any problem always comes from tradition.

Responsibility

All pirates take and are held responsible for their actions. If not on their own then by their crewmates; or possibly by their captures. Responsibility can be painful, but leads to greater success. A ninja is traditionally bound to hold themselves responsible or be shamed. The modern, westernized ninja does not adhere to this. Instead he shuns responsibility and simply moves on.

Decisive

A pirate makes decisions and takes actions. Even serving on a ship under a captain is the explicit choice of the pirate. No pirate would ever willingly live in compulsory servitude, and would fervently rebel against any loss of liberty by compulsion. The ninja lives to obey and lacks or has limited free will of his own. A ninja without orders has no direction. A pirate would take the lead if no one else does, or he is no longer satisfied with the current leadership.

Conclusion

Life, Liberty, and the pursuit of happiness are the way of the pirate; to which I add a moral & ethical compass. These are the American ideals, and the values I embrace. These ideals lead to personal and professional success, and is beneficial for both the individual and the community. It would greatly benefit many people and humanity as a whole if more people embraced the pirate way. The ninja way is content with dictators, fascists, and socialism; things that oppress people and limit both freedom and happiness. Therefore, pirates > ninjas!

 
January 11, 2010 12:00 by josh
E-mail | Permalink
blog comments powered by Disqus

CloudDB update

The ComputeristSolutions site has been running with CloudDb for several weeks now and its going well. I don’t even think about it mostly, unless I want to change some content using the CloudDB web interface. Our implementation checks for content from clouddb for each page, and falls back to local content if its not available. The exception is the purely dynamic pages, which are based on pages in a certain path like this one.

The csinc site is built on Castle Monorail, an MVC framework.  The base controller defines a method to look up whether dynamic content is available and then loads it. Otherwise the method processes normally and the local file is shown. To handle the dynamic pages, I added a route that translates anything looking like /pages/{pagename}.ashx to /content/page.ashx?name={pagename}. Then either the dynamic content is show or a 404 page if no content available.

I previous covered how we access clouddb data. Here is some sample code for handling the dynamic pages:

Routing:

<monorail smtpHost="xxx" useWindsorIntegration="false">
		<controllers>
			<assembly>xxx</assembly>
		</controllers>
		<viewEngines viewPathRoot="Views">
			<add xhtml="false" type="Castle.MonoRail.Framework.Views.
                        NVelocity.NVelocityViewEngine, Castle.MonoRail.Framework.Views.NVelocity"/>
		</viewEngines>
		<routing>
			<rule>
				<pattern>^(/pages/)(\w+)(.ashx)*$</pattern>
				<!--pattern>^(/pages/sample.ashx)(.)*$</pattern-->
				<replace><![CDATA[ /content/page.ashx?name=$2 ]]></replace>
			</rule>
		</routing>
	</monorail>

 

Content controller

public class ContentController : BaseController
	{
		public void Page()
		{
			string contentName = Request.QueryString["name"];
			if (contentName == null || contentName.Trim().Length == 0)
			{
				Show404();
				return;
			}

			//show content or render blank; will have to change this to throw a 404
			if (!ShowDynamicContent(contentName))
				Show404();
		}
	}

That’s it; pretty easy. I’d recommend clouddb although I’m still feeling out what situations it’s best for. It’s certainly working out great as a lite CMS for our site.

 
January 7, 2010 10:35 by josh
E-mail | Permalink
blog comments powered by Disqus

Ruby-Rails: vendor and client companies on a single model

I’m posting this mostly for my self to remember. It’s really not hard, but worth remembering. I have a model that has two foreign key fields to the company model. I wanted to expose this using nice ActiveRecord has_one .. :as => ‘xxx’ or something but doesn’t seem to be provide what I was looking for.  I wanted model.vendor to get the company marked as the vendor; and same thing for model.client.  Ultimately I went with the obvious manual way, but I’m happy with it.

class MySecretModel < ActiveRecord::Base
  belongs_to :user
  has_many :entries, :order => :on_date
  has_many :approval_requests
  # has_one :company, :foreign_key => :vendor_company_id, :as => :vendor
  # has_one :company, :foreign_key => :client_company_id, :as => :client

  def vendor
    Company.find_by_id vendor_company_id
  end
  
  def client
    Company.find_by_id client_company_id
  end

end
 
January 4, 2010 13:04 by josh
E-mail | Permalink
blog comments powered by Disqus


about josh

another programmer blogging about his misadventures in writing code.

Contact

contact us for website & software consulting

Decide

decide on pragmatic solutions

Develop

develop your product together

Succeed

achieve your goals with our services