To anyone who actually reads this blog, if you're a coder get this book. It will make you question how you code and make you more critical of your own code; this is a good thing. It has brought new creativity and stability to my code.
Saturday, October 23, 2010
Clean Code: A Handbook of Agile Software Craftsmanship
Bravo to the authors of Clean Code! You have written an amazing and stimulating book; at least for this coder. I've passed it on to a colleague who, after only a day, is in love with not just Clean Code, but reading itself.
Friday, October 15, 2010
Git-SVN Bliss
So my dev team likes and knows Subversion. I like and know Git. Can they exist together? Sure!
Using git-svn, I can use git locally while they use the bloated bastard that SVN is. I can make smaller commits, push and pull between my home and work machines, and send all my commits at once to the SVN repo on our server. All while using the merging awesomeness that git has.
How easy is it to use git-svn? Extremely simple.
git svn clone http://your-svn-repo-url reponame
That sets up the repo. How to do 'svn up' and merge? git svn rebase. How to push your commits to SVN? git svn dcommit. How to change branches/tags? git reset --hard remotes/branchname. Before you reset --hard, either commit and push or stash your changes, they will get overwritten as normal.
So I get the bliss that is git, my team gets to use what they're familiar with; win-win!
Labels:
git,
git-svn,
subversion,
svn
Sunday, October 10, 2010
Django and Templating, is it Zen?
So Django uses a template language I don't like and I don't feel like modifying Django to make it use one I like. What do I do?
First of all, why am I using Django? Because it organizes and handles my data the way I want it to. Because it is extensible and I can turn off features I don't need to use.
So what do I do?
Why not have Django output standard XML instead of HTML? I can use XML with just about anything. I can test it, validate it, parse it, hell I can do anything with XML. So here's my solution, have Django output XML using my custom namespaces and write WSGI middleware to transform the XML into HTML.
The templating language I want to use is Genshi. Its templates can be validated and tested independently of the data, big pluses for me and my team. I can write wrappers for its API and Django's internals so there is good separation there. If we decided to move to CherryPy instead of Django, all we would need to do is connect our wrapper to the API; all our custom code would be unchanged.
So here I am, on the ragged edge, Django in one hand, Genshi in the other, tying them together without tying them together... How Zen of me...
Saturday, July 17, 2010
First of Life's Most Important Questions Answered
I have found the answer to one of life's greatest questions, does God exist? I believe he does.
I've always had a problem with organized religion because I believe man is fallible. If man tries to interpret God's message to the masses, he will invariably get it wrong. No meat on fridays, being kosher, praying 5 times a day at a specific time, do you really think God would require such things? I say no. Also, how can an elected man be "closest to God?" Of course I mean the Roman Catholic pope. If man is fallible and you increase the influence of man on a godly position, wouldn't that corrupt the position? Of course it would.
Then you have "social justice" preachers telling us our salvation is bound to the person next to us, that we are our brothers' keepers, and it is up to us to make sure everyone gets saved or else no one will. This really turned me off to religion and I began to believe if there was a God, he wouldn't allow this to happen, therefore there was no God.
A decade after I started to believe there was no God, my own actions reflected my belief. I had become someone I would now distance myself from. Then a few miracles happened in my life.
A close friend of mine gave me some perspective on one of my own failings by allowing me to witness how the actions of someone else affected her. Even then I was no where near the man I am today but I credit her with giving me a little sight into who I could become and who I wanted to be.
After working in a low paying, yet fun job for a while I had another glimpse into what kind of person I shouldn't be. A coworker that had become a friend of mine got arrested for domestic abuse. His actions were very regrettable and I'm not sure how things turned out, but that situation gave me some further perspective.
A few years later I started to study string theory as a hobby; so I'm a little strange, it was an interesting theory. Everything in the universe could be explained by vibrations of higher dimensions. As you know, sound is a vibration. I started to think about it and a fantastic and beautiful image popped in to my mind.
If the universe were a theater and you used string theory to explain how the theater came to be, the singer is the one creating the theater. Then I thought, if the one singing is God, with his song, he is creating the walls, floor, ceiling, seats, spectators, lights, everything. And every change in pitch, every emotional overture shapes and changes not only the walls and floor and ceiling, but also those who are listening and even those who aren't. This means God has a role in our lives and our lives have a role in him.
So this mental exercise may be a little unorthodox, it may be a little crazy, but it got me the answer I was looking to find. God does exist and he does play a role in everyday life. Not only that, but what we do has an impact on God as well.
Thursday, May 7, 2009
When $17 billion is a drop in the bucket
$17 billion in budget cuts, sounds like a lot, but is insignificant. The proposed budget (including the recovery act spending) is $13.9 trillion dollars, that's $13,900,000,000,000. Federal revenue is $2.4 trillion. Anyone else see a MASSIVE problem here?
Wednesday, May 6, 2009
More Obama spending
President Obama is now asking congress to spend money for Pakistani infrastructure. This feel good spending is not going to defeat the Taliban in Pakistan. Its only going to increase our debt while making Democrats feel all warm and fuzzy about giving charity. I have nothing against charity when it is given responsibly, but when it costs more than what we have it becomes irresponsible. What Obama needs to do is get India and Pakistan to help each other to defeat the Taliban. This is the perfect opportunity for Pakistani/Indian relationships to improve and stabilize the region.
The fear of an Indian invasion is crippling Pakistan's ability to fight the Taliban, if Pakistan really wants to defeat the Taliban insurgency. India needs to quell Pakistani fears and offer assistance in defending Islamabad.
Throwing US treasure at a non-issue will not solve the real issue; using diplomacy in bringing India and Pakistan together to defeat a mutual enemy is the best viable course of action.
Here is a link to the story. http://seattletimes.nwsource.com/html/opinion/2009186001_opinb07ali.html
The fear of an Indian invasion is crippling Pakistan's ability to fight the Taliban, if Pakistan really wants to defeat the Taliban insurgency. India needs to quell Pakistani fears and offer assistance in defending Islamabad.
Throwing US treasure at a non-issue will not solve the real issue; using diplomacy in bringing India and Pakistan together to defeat a mutual enemy is the best viable course of action.
Here is a link to the story. http://seattletimes.nwsource.com/html/opinion/2009186001_opinb07ali.html
Sunday, May 3, 2009
It's Time
Its time for a strong third party to push forward in American politics. Not only are Democrats out of their mind with spending, but Republicans are out of touch with conservatives. Republicans are now left of center on spending, taxes, and having a large government. Republicans are even dropping their pro-life position.
With the Republican party in such disarray and the Democrats' policies becoming more and more unpopular, a strong truly conservative party has room to grow exponentially. My bet is on the Libertarian party. Though their stand on drugs is anti-prohibitionist and their stand on abortion is anti-government, their platform agrees with most conservative and liberal values.
Trust in government is lost, at least from my position. We need a strong third party to speak up and regain the trust of the American people.
With the Republican party in such disarray and the Democrats' policies becoming more and more unpopular, a strong truly conservative party has room to grow exponentially. My bet is on the Libertarian party. Though their stand on drugs is anti-prohibitionist and their stand on abortion is anti-government, their platform agrees with most conservative and liberal values.
Trust in government is lost, at least from my position. We need a strong third party to speak up and regain the trust of the American people.
Subscribe to:
Posts (Atom)