Tuesday, November 10, 2009

Badgers Schedule to Easy

For those who think the badgers schedule is to easy please see the quote from Coach B down below.
Brian (Lucas) pointed out, everybody wants to talk strength of schedule. Everybody wants, Coach B doesn’t play these teams … Well, we have the, we have by the NCAA, and I love that Web site, because it computes your strength of schedule as it’s real. It computes what teams have played, what their records are, and it moves forward, and I’ve been watching it all season. And now today we’re 14th in the country, and we have the toughest schedule in the Big Ten conference to date, and that, to me, says something about what we’ve been able to accomplish and hopefully move forward.

I think it is interesting that we are currently 14th. I realize as we play Michigan and Northwestern this number will probably go down, but still not to shabby.

Monday, September 28, 2009

Badgers and Packers

So the college and pro football seasons have been going on now for a few weeks. Here are my observations of the Badgers and Packers.

Badger Observations.
Going into their 5th game of the season they are 4 - 0. Their next game is at the new stadium in Minnesota. The two teams play each other for Paul Bunyan's Axe. The Badgers have won the last five meetings.

First the offense. The Badgers have found consistent play from the QB position. This is the biggest surprise for me. Tolzien has been able to deliver the ball to his tightends and receivers on time and in places where only they will catch the ball. John Clay seems to be coming around and rebounded nicely after the terrible game from two weeks ago. The O-line has been getting better every week but still has a lot of room for improvement.

On defense I think they have more depth at every position except safety than they did a year ago. The d-line is getting healthy and got good pressure against M. State. The linbackers are fast and seem to be making plays. The Badgers are currently rotating four guys at corner. I think eventually the staff will need to stick with the two best.

Special teams is where I think the Badgers have improved the most since last season. Already they have blocked a punt, scored a touchdown, and caused a fumble. There has only been a few break downs on coverage but nothing major. The return game still needs work but kickoff return has been better.

Now for the Packers
I think if Aaron Rodgers stays healthy all season he is one of the toughest guys in the league. As of now the O-Line has not been able to block on pass downs. Rodgers has been hit and hit hard. He has been forced to scramble. This has caused a disruption in timing and making the offense sputter. Still the packers are 2 - 1 and heading for a Monday night match up with the Minnesota Vikings.

On defense the Packers have been turning the ball over a lot. That is good. They are still soft against the run though. they have been able to generate pocket pressure and forced other qb's into bad throws. With B.J. Raji getting healthier he should help the depth at the D-Line.

I still think the Packers can be a 10 -6 team if they can tighten up on the offensive and defensive lines. If I was Ted Thompson I would be sending someone to Sun Prairie to work out Mark Tauscher. If he his knee is healthy he could add leadership and ability to the o-line.

Wednesday, September 23, 2009

phone blogging

a quick post today. I just learned how to post from my phone. now when I am out with buddies I will be able to post about our interesting nights.

Friday, August 21, 2009

Code Readability vs. Number Lines of Code

Last night I read a blog post by Phil Hack. In the post he talks about why do I have to write a commit inside an using statement when working with transaction. He then wrote some nice code to abstract the commit into a reusable function. It was a nice solution and reduced the total number of lines of code.

I was reading through the comments and someone said that by doing this he makes the code less readable. He also pointed out that debugging will also be more challenging since it is an abstraction, but I want to focus on readability. In Phil's example I did not think the readability really changed all that greatly but the person did have a valid point in general.

When writing code there are always trade offs that need to be made. less lines of code could be seen as cleaner and more optimal but at the same time it is harder for understanding what is really going on. Usually when I write code I try to make it readable, and then refactor in areas I feel are to verbose. The reason I like this is because someday someone else will be looking at the code to support it and I might not be around for them to ask me why it is as it is. Heck, I might be around and not remember why did what i did.

Don't get me wrong some abstractions I think are good, and I might use Phil's technique in future coding I do, but developers need to find a balance between abstraction and readability. I really am not a big fan of AOP for this reason. Sure it makes sense but from a practicality side of things it might not be the best solution.

Well rambling on this topic is done for now. If you have comments or want to agree or disagree hit me up.

Tuesday, August 18, 2009

He's Back

So Brett Favre is out of retirement. Again. No for sure this time. I saw the pictures of him in the Viking helmet.

I really don't know what to say about this. I guess for me the Brett Favre ship passed a year ago when he left my beloved Pack. Do I care he is a Viking? Not really. Do I think he makes them better? Maybe marginally. Will I watch him play? Yes twice when he face the Packers. Will I burn my Favre jersey? No probably not I will keep all my collectables of his. Should the Packers or the city of Green Bay name anything after him or retire anything of his? No I dont think so.

so those are my thoughts on BF. Flame away!

Tuesday, August 11, 2009

Random Thoughts

My Dad was giving me a hard time about not updating my blog enough so I guess I need to do a better job of postig things.

The Brewers are in trouble. I know there are still a lot of games left, but I don't think they have enough pitching right now to make the playoffs. That said I dont thing the sky is falling in Milwaukee, just that some key injuries have hurt them this year. They will rebouond for the 2010 season.

The Badgers have started practice and this is a team I have no idea how they will do. They have talen at RB, WR and TE. The O Line will be breaking in some new guys but should not be a drop off from last year. The QB spot looks to be weak again and thisis a team that needs to get solid play from this position. The defense should have more depth on the D Line, but the LB's are young, and the secondary is again looking like trouble. They do get Henry back, but he is coming off a knee injury.

The packers should be better than there 6-10 record of last year. The offense will be as good or better than last year, and if the Defense can learn the 3-4 defense they should come up with stops late in the game that they couldnt get last year.

Well thats it for now....

Friday, August 07, 2009

New computer

My new computer was just delivered!!

I cant wait to put it through it's paces. It is a HP laptop, with an 18.4 inch screen. It apparently does full 1080p. I loaded it up with 6gb of ram and a 1gb graphics card. It came with 64 bit versio of vista home premium. I might upgrade that to ultimate though. I also get a free upgrade to windows 7 when released.

What do I need all that power for? Well I will tell everyone it is so I can develop faster using visual studio, SQL Server and all the other tools I use, but the truth be told, SecondLife and Eve Online will just run awesome on it, plus with BluRay and hdmi out it just became the center of my entertainment hub.

IOC Containers

I know I haven't blogged lately. I have been well busy with other things but now have some time.

I am at a new client and was brought on the project mid stream. I was talking with the "Boss" about unit testing and how some of the application is tightly coupled and how that makes testing a little tough. He mentioned to me that he as planning on introducing some decoupling in the back ends and somehow we got to talking about IOC Containers.

I started talking about StructureMap and he saw value of an IOC Container framework. He asked me to build a prototype, that was a little more advanced than the basic example you see on line using StructureMap, Unity, and CastleWindsor.

I know all the Spring.Net people are going crazy now because we decided not to use spring without even comparing it, but sorry, I have used spring and I already know I like StructureMap better. Since I havent used the other tools, they were included.

The prototype was an n-tier app that used mvc.net in the ui. It had a service and datalayer. the idea was using the same interfaces and services, set up the three containers, turn one on run the app, turn another one on run the app, and so on.

The only changes to the app were in the global.asa file, where we build the containers and setting the controller factory.

So lets talk container setup. I felt the setup was pretty easy with windsor and StructureMap. Unity was a little tougher because setting things like default constructers and life management was not as clear. Luckily there was a wealth of information on the internet for how to do these things. The one thing that I really like about StructureMap is on the container you can call a method to assert that the container is valid. If it fails, it gives you a very clear error message explaing why it was not valid. you can have this check and at runtime it will throw, but better practice is just to wrtie a unit test for this. Unity when set up wrong gave me an error at runtime that was hard to understand and I had to parse throught the error about 2/3 of the way through to find out what item was causing the trouble.

As far as using the containers Unity and Windsor dont give you a static object to get your items like StructureMap does with it's ObjectFactory class. You have to manage the access to Unity and Windsor yourself. That said some will argue that if you use Unity or Windsor you would use it with the CommonServiceLocator library. This library will actually handle the container for you.

After showing the "Boss" the protorype and differences he decided to go with StructureMap. Like I told him any of the three would have worked for us, but StrucutreMap's use of Lamdas, and the added auto mocking features won him over.

Wednesday, April 08, 2009

MVC.Net, Structure Map, and TDD

So I started to watch some webcasts on mvc.net.   One of the series really interested me because the guy was going to create an entire app from the ground up following TDD, using Linq to SQL, Structure Map for Dependency Injection, and MVC.Net for his UI.

Why did this interest me?   Well I have been using NHibernate and Spring.Net and I was curious what these other technologies could do.  I really was not interested in the TDD part but surprisingly something said in the webcasts, or maybe a comment on the blog really got me thinking about it, and I think I have seen the light.

First TDD
Like I said I never really bought into Test Driven Development.  I always thought as long as you have unit tests it did not matter when you wrote just have them.  However I noticed that as he wrote code to make tests past, that is all he did.  I started thinking about all the time I wrote code based on a gut feel for what I would need, only to have wasted code.  This method kinda stops that from happening cause if it wont help the test pass you don't need it.

Another interesting point discusses was that TDD will not guarantee code correctness.  All it does for each test given some input an expected result occurs.  Yet you can still rely on those tests to tell you if things go bad.

That brings me to my next topic.... Dependency Injection with StructureMap

To do really good unit testing it helps to separate your concerns.  Using a Injection tool really makes this a simple task to perform.  I have been using Spring.Net.  I really wanted to look at Unity 1.1, but after reading some blog post, I was turned on to StructureMap.  Let me say after working with it for two days, and reading about it for a few more, I really love working with it. 

I like the fact StructureMap has a fluent interface, and that all the mappings can be tested.  StructureMap provides some testing interfaces.  For example you can call a method on the container and it will validate you mapping setup and if it fails it will output why in readable human text what object it has and what it was missing from the container.  StructureMap also provides a method on the ObjectFactory called WhatDoIHave.  This method will display in readable language everything in the Factory.

Another feature I like is the fact you can pull objects from the factory even if you haven't mapped them.   The factory will still return the object to you injected with anything it can from the mappings.

I have to say I am really digging MVC.Net.  I have worked with ASP.NET for a long time.  I have learned the page stages, along with enjoying the dragging and dropping of controls.  Even though there are no controls I love how mvc really separates things out.  I like how easy it is to test ui controller logic.Even though I haven't tried this yet, I like that I can change the T4 Templates or even add my own.  MVC.Net is very robust in the features.  The one thing I do have trouble with is routing.  I seem to have a million routes in my application.  Part of it is the fact that I use complex keys for things and am passing multiple values around.  However, I still find it hard to write nice generic routes.  I think a cool tool would be one that would parse a site and generate some routes for you once it was done.

Wednesday, April 01, 2009

Chris Trainning Days 3 and 4 (Guidance Package Framework)

So After finally getting a feel for the guidance package framework I really understand all the great things that can be accomplished. I started thinking of having it create my solution and projects, adding the needed reference (both MS and third party) to the projects, having the proper directory structers under projects. Creating SVN repository on our svn server. Creating the build directories and setting up our project on the build server. And that can all be done by the initial setup.

Then you can customize the package to have development time recipies. These would be recipies that automate tedious tasks. One of those tasks for me is nhibernate mapping. Imagine a recipe where it gives you a wizzard, you pick the table and the columns you want mapped and then it goes off and creates, your hbm mapping file along with I[table]DAL, and you [table]DAL. How much time would that save over a life of a project, or two projects or well you get the idea. So after reading this you have to say man but there has to be a catch. Well there is. See actually you would have to write all this functionality yourself. None of these types of things are available as a plugin. The framework does allow you to easilly plug in your own actions and recipes, but they all need to be developbed by your team.

So if you are willing to invest the time, you can create yourself one heck of an automation package that can lead your development efforts.

Tuesday, March 24, 2009

Chris Trainning Days 1 and 2 (Guidance Package Framework)

So one of the tasks of software development I hate is setting up new projects.  This task is tedious and repetative.  When setting up a multi-tiered application, that includes, an AOP Framework, an ORM framework, a ioc framwework, and then some type of web or forms package, not to mention build scripts and maybe a data migrations package, you could kill a whole day or more.  

Throw on top of this that a lot of times there are tasks throughout a project that you do over and over.  For example, creating a data access class, you need to create the class, an interface for the class, an NHibernate mapping hbm file, a unit test class to unit test the data access class, and probably some model class to transfer the data around.  

So there is a lot of time wasted doing trivial things when with this time we should be spending it on the real business problems we are trying to solve.  If only some of the trival tasks could be automated.

So the first thing I did was look at a few offerings.  The first one was S#arp Architecture.  Well I really did not look at it but Dan Miser did and he then held a Spider Thursdy on it.  It seemed really cool.  Thought for sure this was the answer but like all tools, it had some failures.  

The next project I looked at was Sculptured.Net.  This is an MDD tool.  What is interesting it has an idea of molds that you can use to create different applications using different frameworks. For example you could create a silverlight mold, with a Nhibernate mold, and a service library mold, then using the same model, you could import it to a project using a mvc mold, a LINQ mold and a WCF mold and they the apps would work the same.  You could also create your own molds.  Well like other tools it looks great on the basic examples but as you start making more complex models the tool starts to break down.  I do want to look into making my own molds though and see if this process is easier.

That brings me to Guidance Package Framwework from Microsoft.  I was excited about this because I have seen what it could do from using some of the Pattern and Practices Team factories.  I just did not know how poorly the documentation was wrritten.  also the waas a lack of blog posts or other articles on how to use the framework.

Well after messing with it for a day I really did not get anything to work.  Yes I could get it to register my packages and when I used my package to create my solution it tried to but errored out. I was really frustrated, so I sat down and re-looked at the help that comes with the framework.  Then all of a sudden some things started clicking.  My day 2 with the framework was much better.

My next blog post will talk about the steps I took to create a basic guidance package.  It will contain code samples and hopefully give direction for those who are starting to look at using guidance packages.

Tuesday, March 03, 2009

Leona Walber

Leona Walber peacefully passed away last Saturday.

She was my grandma. Maybe not by blood but definitely by love.

Leona helped babysit my sister and I while my parents worked. She was only going to babysit us for a little while until my parents could find a full time daycare or sitter. Well that little while turned out to be 35+ years.

Over the years she became a friend and family member.

I remember playing paddy cake and her teaching me to tie my shoes. She would help me with homework, and even let me watch her cook. She told me once after I stuck my tongue out at a girl that it means I really wanted to kiss her. Believe me I never did that again while growing up. Later in life she taught my cousin and I how to make her yarn hangers.

I remember how cold her hands always were. They felt like she kept them in the freezer. Grandma always said "Cold hands mean a warm heart". That she did have too; always room in her heart for her family and mine.

As I got older I remember the conversations we had as I drove her to my parents house for the holidays she would spend with us. Catching me up with all the people from the neighborhood. Or, how she would ask me about my love life or joke about how I used to tell her I was going to be a priest. We used to count steps when we went up and down stairs so she knew when we got to the top or bottom. She used to tell me I shouldn't fuss so much with taking her places since her walking was slow and eyes bad. I never thought of it as a fuss. I wish I could have that fuss one more time.

Oh and how could I forget about all the food? The apple fritters, cookies, dot oyster crackers, and dumplings. Whenever she was cooking I knew it was going to be a filling meal. I never went hungry when I was visiting with Grandma.

The last couple years have been hard with her eye sight and hearing gone. I know she is now in a better place, where she can walk as fast as she wants and see far enough to watch over me. But i know one thing for sure... her hands are still cold and I am still in her warm heart.