November 2006 - Posts
According to Mr. Rails himself, Amazon is getting in on the Rails fever.
UnSpun is a Rails application that relies heavily on the Amazon Mechanical Turk Web Services. It allows you to "see the community consensus on what's the best or the worst, the scariest or the funniest, the tastiest or the dumbest, UnSpun provides the right amount of structure to make that possible". Once a list is created, its sent to the Amazon Mechanical Turk which helps get the list populated with items, as well as the most relevant web links for the items.
Perhaps Amazon chose Rails because Ruby is the best programming language, or maybe because it's #5 on the Best Model View Controller Frameworks list, or maybe because its #194 on the Most Promising New Technologies list, or maybe because ActiveRecord is the Best ORM Layer?
Whatever the reason, it's interesting to see a company like Amazon embrace Rails. Maybe one of these days I'll get around to building something in Rails, brand it as Web 4.0 and rake in a cool billion?
When can I start using LINQ in "production"? Not soon enough...
Over the last year we've had a lot of internal discussions about the database platforms we intend to support for our software. One of the things that's come up time and time again is that our enterprise customers don't feel SQL Server is an "enterprise scale database". Given this, it shouldn't be all that surprising that I found this report comparing the security of Oracle and SQL Server very interesting.
The conclusion is clear – if security robustness and a high degree of assurance are concerns when looking to purchase database server software – given these results one should not be looking at Oracle as a serious contender.
That wasn't exactly what I was expecting.
Me neither, but Ryan Tomayko did. Lucky for us he captured it all in a nice blog post here:
How I explained REST to My Wifetags:
rest,
webservices
When learning a new programming language or framework there is nothing more valuable that having someone there along side you to help show you "the way". You, of course, need to make sure that person themselves knows the way, but once that's been done a tremendous amount of learning can occur by just observing "the way". If you are doing Ruby on Rails development you should definitely checkout
The Rails Way.
Jamis Buck
and
Michael Koziarski, who are both on the Rails core team, have just started on a series of posts which focus on evaluating an existing Rails application, and pointing out how best to do things the "Rails Way".
While I still haven't come close to writing a "real" Rails application, I'm hopeful that one of these days I'll get around to building something.
tags:
rails
Speaking of REST,
it appears that the next version of Rails (1.2?) is going to have some
nice built in support for accessing "resources" with REST. It seems
similar to what Alex is looking for in
RESTQL.
tags:
rest,
rails,
webservices
If you've done any work designing SOAP based web services you undoubtedly know that that The S stands for Simple, right?
As someone who has been working extensively with SOAP based web services (developed using Indigo) over the last year+, I have a lot of interest in the REST approach. I've found the following "REST Dialogue" posts useful, and I'm definitely looking forward to checking out Leonard Richardson and Sam Ruby, "REST Web Services" book! Where do you stand on the REST vs SOAP debate?
The REST Dialogues
As an admitted LINQ addict I'm going to start posting "LINQ Links" which will contain the most recent, and most interesting articles, videos, blog posts, books, or etc that I've found about LINQ.
- Rough Spots in the LINQ to XML Learning Curve - Mike Champion talks about some of the rough spots that he's seen from those learning LINQ to XML.
- LINQ for Visual C# 2005 - It appears all the major publishers are scrambling to get LINQ material out to developers. Apress is the latest, with this 150 page eBook (Price: $12.49)
- LINQ MSDN Forums - Ok, I admit it, I couldn't bear to have only 2 links in my inaugural "LINQ Links" post so I went scrounging for something else to include. The LINQ Forums are a great place to visit if you have any questions or comments for the LINQ folks.
Technorati tags:
linq,
xlinq,
dlinq
Today I tracked down an interesting bug within a set of code in our Query API. The code is responsible for converting a Criteria<T> object to a Predicate object. As I mentioned in several of my previous posts, our Query API allows us to create strongly typed queries to access our database. For example, to query all customers who live in London we can issue the following query:
List<Customer> customers =
Customer.FindAll(Customer.Columns.Country == "London");
We can also use the same query (or criteria), to query in memory collections that support searching by a predicate, such as List<T>. To query an in memory List<T>, we can use the following code:
List<Customer> customers = // get list of customers from somewhere
List<Customer> londonCustomers =
customers.FindAll(Customer.Columns.Country == "London");
In order to support this functionality, we have some code that creates a Predicate<T> from a PropertyCriteria<T>. The code uses the lightweight code generation features in .NET 2.0 (DynamicMethod, ILGenerator) to generate the method on the fly by spitting out the appropriate IL OpCodes. What we came across today was that the current code did not consistently work when querying by date. So if we issued a query such as:
Customer.FindAll(Customer.Columns.HireDate.HappensAnytimeDuring(dateOfInterest));
We ended up with completely random results. After spending a little bit of time looking at the code today at work, I shelved the issue in favor of more important needs. Out of curiosity I couldn't help but return to investigate the issue this evening. After running a couple tests, and reconfirming that the results were completely random, I turned to Reflector to see if I could uncover anything. After a little bit of digging I would up in the op_LessThan method of System.DateTime. I then switched over to System.Int32 (since int's where working swimmingly) and realized there wasn't a corresponding op_LessThan method. Of course this is because an Int32 is a primitive, while a DateTime is not. Well to make a long story short, I was using a set of OpCodes that (as far as I can tell) is designed for comparing primitives, namely: OpCodes.Ceq, OpCodes.Clt, and OpCodes.Cgt. Switching my predicate generation code to call the Equals, op_Inequality, op_LessThan, opGreaterThan, op_LessThanOrEqual, and op_GreaterThanOrEqual methods instead of using the OpCodes mentioned above resulted in consistent, and more importantly, correct results.
Once again via Sam via Mark Miller
Here's a couple options provided by Mark:
There are two ways to share templates. The first is to place the
templates you want to share inside a folder category (on the template editor options page), then right-clicking this folder and selecting "Export
Folder". Then you can distribute this template folder to other team members who can import it by right-clicking on the category list on the template editor options page and selecting "Import Templates.."
The second is to check your template files directly into source control,
with one team member having read/write access and the other team members having read-only access. Currently, all templates are stored into a single binary file (for a fast read), and a backup xml file. The binary files are read when templates are needed (if a binary file isn't found then the XML file is read). Both files are written when you save template settings in the options dialog. So I would probably suggest checking in/out only the binary files since they are about one seventh the size of the XML files. Templates are stored in the "Editor\Templates" folder inside the Settings directory.
Technorati tags:
coderush
via Sam via Mark Miller
As I mentioned in a previous post we recently purchased a couple CodeRush licenses. As such, we're trying to figure out how to use it. This post is meant to provide details about how you can import/export CodeRush settings between team members.
CodeRush settings are stored here:
{SystemDrive}\Documents and Settings\{CurrentUser}\Application Data\CodeRush for VS .NET\{Version}\Settings\
You can import/export these by simply performing an XCopy. Setting
sub-folders match the folder organization in the Options dialog. You don't have to export the settings in the Loader folder (used for load on demand), since those are maintained automatically by the products.
It would be nice if you could change where it stores settings so at least some could automatically be shared via source control. For the time being this should do the trick.
Technorati tags:
coderush
We recently purchased a couple CodeRush licenses and I'm looking for the answers to a couple questions.
- How do you import/export CodeRush settings?
- How do you share templates?
- Who has a Template & Keyboard Cheat Sheet (something like this ReSharper one)
- Are there any killer DXCore plugins that I should check out?
Technorati tags:
coderush,
vsnet
When I saw the beta announcement for
blogmailr, I was immediately interested. Since I still haven't found a good blog publishing tool for the Mac, I've been on the lookup for software that would allow me to easily publish to my blog (when I'm on my Mac). Since blogmailr uses an email client it sounded like a good solution. Although my first attempt to setup my site failed - due to it being a custom blog engine - the Telligent folks quickly resolved the issue and posted an update that fixed an issue with people using a custom blog engine. Of course we won't know for sure if it worked until this shows up on my site.
Anyway, if you're looking for an easy way to post to your site checkout
blogmailr. It works with any existing email client (I'm writing this with Gmail) and should work with any blog that supports the Metablog API.
Bart has a report from Anders talk at TechEd on C# 3.0 Future Directions. I'm hoping that the various talks from TechEd will be posted somewhere for us all to enjoy. One of the new features Bart mentions... that Anders mentions...that I mention now....is Automatic Properties. Up until this morning I had not heard of it as a feature, but apparently it's coming in a future release. Like some of the other C# 3.0 features its sounds like it involves a bit of compiler magic! Typing this:
public string Bar { get; set; }
Results in the compiler generating this:
private string foo;
public string Bar {
get { return foo; }
set { foo = value; }
}
Cool, eh?
Technorati tags:
csharp,
linq,
c#
For those looking to feed your Linq hunger you might want to checkout:
Via Kathy Sierra I came across Kevin Briody's post about the two simple words that he thinks passion starts with. In his post he talks about the raw, gut feeling, he wants his users to have when using his product. He wants them to feel passionate about his product and declare it "F**king cool!"
I agree. 