Yesterday I attended Twin Cities Code Camp 4. This was my third code camp. It was probably one of my favorite ones. I went down to the cities with James, Manohar and Jordan. We also met Joel D a former developer where I work. It was kind of nice that they had some classes that were not strictly .NET. They actually had a RoR session, although it was pretty basic. The only thing that was mentioned that I hadn’t learned yet was the concept of using tasks to populate table in your database. It was nice to confirm that I was on the right track with rails. No pun intended! I am hoping that their might be a more advanced rails session for Code Camp 5. The second class I attended was regarding new features in SQL Server 2008, SSIS and SSAS. This was a pretty interesting class, however towards the end my mind was wondering. It was also kind of worrisome how he kept using words like “flaky”, “unstable” and others when describing features. He won’t be a salesman anytime soon for SQL Server. Anywho, some of the new features that I thought were cool that I am looking forward to are:
Intellisense in SQL Server Management Studio.
Regions - These are similar to what you see in C# code, however, there are some caveats according to the speaker. You can’t have comments in your regions. Pretty stupid if you ask me.
Insert multiple rows using one insert statement. This one i will use. I have actually attempted to do this before, so I am looking forward to this one.
Grouping Sets - Didn’t catch this one totally. If your dying to find out, google it.
Merge (Upsert) - This is a new keyword and functionality that I know I will use as well. This is where you have two tables and if a record is in one and is in the other it will run an update statement. If the record in one isn’t in the other one it will run an insert statement.
Star join query optimizations for joining facts to dimensions.
Change Data Capture - This is a feature that records DML changes for a table to another table, so you can track data changes. The current implementation does not allow you to record who is making the change. Also, if you want to add another column to a table you have to set this up all over and lose all your previous history. Just another anti-agile feature from microsoft. Come on, who has database tables that don’t ever change.
Sparse columns - This was demonstrated and was pretty cool. For two given tables, one with sparse specified on a column and one without, it made a huge difference in the size of the table with the same data inserted.
Filtered indexes.
Hierarchical Data Type - Here is a good post on this. Oracle has had this for quite sometime. You can see how to use it here with Oracle. It is pretty straight forward. I used this in queries at my past job and having this can remove some craziness in your data model.
I also went to “Things every ASP.NET developer should know.” Don’t let the title fool you into thinking that it was for beginners though. He got into some interesting stuff with IIS and querying IIS logs to figure out problems, HTTP Compression and setting expiration of content in IIS. “Writing better code” was also a great session by Jason Bock, the organizer of this event. One thing that he mentioned that resonated with me was keeping your coding standards to less than three pages. This is something that I think was a very good point. Currently the standards we use are many more pages than that, not to mention the SQL Server standards on top of that. I will be reducing our coding standards in the next couple of weeks.
Overall, it was a great code camp. I feel fortunate to be able to attend as do my teams. Free food, free event with high quality content. You can’t go wrong!
I am current working on a project and needed a date picker. I found a pretty decent one called CalendarDateSelect that integrates very nice with Ruby on Rails. It comes with a few themes. All you have to do is include the corresponding style sheet. It is pretty easy to customize as well.
In Leopard, Apple introduced a new backup solution that is pretty sweet. It is called time machine. It allows you to go to any folder in any point in time. It makes backups of changed files every hour for a day, every day for a week, and a backup for every week for as much space you have. Many products offer this kind of solution, however, I think that apple again differentiates themselves by the ease of retrieving files from your backup with the elegant user interface. Below is a video of this in action. What really amazed me tonight was that it just wasn’t folders/files you can retrieve, it works with applications. I entered time machine while i was in my mail program. My desktop dropped as I entered time machine and my computer went into the time machine universe. All of a sudden I was able to go view my inbox at what it looked like at any point in time. Try not to be too jealous Jeff.
Tonight I was visiting space150’s website. I decided to view the source of their website because I was curious and there was a surprise. Check it out! Pretty clever if you ask me.
Today I spent some time trying to improve the speed of our CI/Nightly builds with TFS. While we found out that it was a backup solution that was causing the majority of our problems, I also found that we were not doing incremental builds. If you put this at the bottom of your TFSBuild.proj file, TFS will only do get of the files that have changed instead of getting all files. Doing this took a 10 minute build down to 20 seconds. Much Better!
Even though I got made fun of for about a half hour straight last week at leadership training for going to Code Camp by sales/marketing people, I thought I would mention the next code camp is coming up on April 5th. I am pumped up for this one because it has a variety of sessions that are different from the MDC conference and previous code camps. I am a little sick of hearing about LINQ and the 3.5 framework. This one has sessions on the MVC framework and SQL Server 2008. There is even a Ruby on Rails one. Since this is on a Saturday, typically a non-work day, I am going to this session and not even going to feel guilty. It is an introduction class though so I don’t know how in depth it is going to get, but I am sure I can get something out of it. Here is a schedule for the event. Did I mention that it is free?
It has been one week since the F1 Web Challenge and I think I have finally recovered. It was a very fun event. It was actually longer than 24 hours. I was up for 36 hours!! It was on the U of M campus (St. Paul). There were eight of us on a team. My team consisted of 4 other co-workers, 2 former co-workers and one back up who worked for the sponsoring company. We had six developers, one webmaster and one project manager/BA. IMO, David probably worked the hardest. I think next year if we do this again, we need to bring two webmasters. Our organization was Hope Chest for Breast Cancer. They have a very unique business model in which they receive very high end merchandise from donors and turn around and sell it in one of their two stores for a fraction of the price. The proceeds are then given to organizations that assist people living with breast cancer. They were very energetic and prepared. They did have a lot of requests though so we weren’t able to get them all done, but they do have a functional website. It is not up yet though. I hope we will have it up within the next two weeks. Below are some screenshots. Next year we will also need to have a designated driver. I got 30 minutes out of the cities and realized I was going towards Duluth and not St. Cloud!
Today I was trying to figure out how to validate if a user entered a number in a given set. I searched the internet high and low and could only figure out how to validate a range. I actually found the solution in a book, so I thought I would post it.
1
2
3
4
5
6
class Story < ActiveRecord::Base
validates_presence_of :name, :description
validates_inclusion_of :storypoints, :in=>[1,2,3,5,8,13], :
message =>"Story Points must be 1,2,3,5,8 or 13"
belongs_to :sprintend
I found a Ruby on Rails tutorial today that I thought I would share because it was easy to follow and it is targeted for version 2.0.2. This tutorial is a little bit more extensive than ones I have posted in the past. In this tutorial you will use scaffolding. This also includes setting up relationships between you entities/database tables. You also work with validation. I thought this was particularly interesting because it is extremely easy to specify if a variable in a Model class and specify if it is required or if it must be greater then a value and that will bubble up to the web page when the user is submitting the page. There is no need to add controls to the page and specify the fields they are validating and what that validation criteria is. This tutorial will also show you how to write a simple unit test for your code as well. You can find the tutorial at: