Here a great little yesterday’s news: ASP.NET MVC 2 is RTM!
Here’s the link for the Microsoft Web Platform Installer, where we can install MVC (among others). Be sure to uninstall the previous versions.
Here a great little yesterday’s news: ASP.NET MVC 2 is RTM!
Here’s the link for the Microsoft Web Platform Installer, where we can install MVC (among others). Be sure to uninstall the previous versions.
Posted by
Mário Romano
at
Friday, March 12, 2010
0
comments
Labels: Development, Tools
csharpopensource is a reference guide to some of (allegedly the best) C# open source projects available. Basically it works as a directory, other than a repository.
Posted by
Mário Romano
at
Saturday, March 06, 2010
0
comments
Labels: Development
Here’s a cool utility to arrange your desktop into nice little “folders”: Fences. I just love the way it hides your icons: just double click!
Posted by
Mário Romano
at
Friday, March 05, 2010
1 comments
Labels: Tools
It’s a light and short 88 pages booklet PDF (have you noticed a trend on this kind of format?). Here it is: “A Guide to Claims-Based Identity and Access Control”. A fast way to get in touch with the Microsoft offering over this scenarios. All about identity management from a decentralized perspective.
Posted by
Mário Romano
at
Thursday, March 04, 2010
0
comments
Labels: architecture, Education
Traditionally dates have never been properly addressed on the development community. First we compacted years on a couple of digits (remember the 2000 year mess?), then we stored them on strings (not particularly bright, I’m afraid), and nowadays we finally typified them onto a datetime structure. But still we didn’t get it right.
Datetime implementations both on .NET and java are still not there. From the inability some have representing the datetime on a format other than the localdate, to non standard, non extensive, buggy and slow implementations, datetime is not yet a first class citizen.
Joda Time is an API intended to replace Java date and time classes. Here’s the .NET version, Noda Time, and the announcement from Jon Skeet.
PS: by the way, Jon Skeet is considered the “Chuck Norris” of the programming community (his stackoverflow reputation is 142,008). He presently works at Google and wrote C# in Depth. Here is a compilation of Jon Skeet Facts:
One of the 2 is for sure: other Jon Skeet is a facade for a large community of developers or he just doesn’t sleep!
Posted by
Mário Romano
at
Tuesday, March 02, 2010
0
comments
Labels: Development
Einstein’s theory of relativity is not as abstract as we may think. An example we often use is GPS, a system that as we know uses a method called trilateration, a method that depends on the precision of the satellite internal clocks to calculate absolute positions.
The problem is that time is relative, and though we all recognize it, probably most of us imagine that we needed extreme conditions to make it happen (I was one of them). But all we need is a satellite at about 20.000 km from the ground, orbiting at about 14.000 km/h and a process requiring 20 to 30 nanoseconds precision, and there you have it, you’ll have to take the theories of relativity into account:
Because an observer on the ground sees the satellites in motion relative to them, Special Relativity predicts that we should see their clocks ticking more slowly (see the Special Relativity lecture). Special Relativity predicts that the on-board atomic clocks on the satellites should fall behind clocks on the ground by about 7 microseconds per day because of the slower ticking rate due to the time dilation effect of their relative motion.
Further, the satellites are in orbits high above the Earth, where the curvature of spacetime due to the Earth's mass is less than it is at the Earth's surface. A prediction of General Relativity is that clocks closer to a massive object will seem to tick more slowly than those located further away (see the Black Holes lecture). As such, when viewed from the surface of the Earth, the clocks on the satellites appear to be ticking faster than identical clocks on the ground. A calculation using General Relativity predicts that the clocks in each GPS satellite should get ahead of ground-based clocks by 45 microseconds per day.
The combination of these two relativitic effects means that the clocks on-board each satellite should tick faster than identical clocks on the ground by about 38 microseconds per day (45-7=38)! This sounds small, but the high-precision required of the GPS system requires nanosecond accuracy, and 38 microseconds is 38,000 nanoseconds. If these effects were not properly taken into account, a navigational fix based on the GPS constellation would be false after only 2 minutes, and errors in global positions would continue to accumulate at a rate of about 10 kilometers each day!
Cool article! But you know what’s cooler? That these theories were almost like pure creation: it’s not like Einstein developed a GPS system, failed to make it work, to finally theorize: what if time would be relative? Naturally he did start from an empty canvas and no purpose at all, but in face of the problem the scientific community had identified, his leap was so extraordinary that after 100 years we still find it hard to explain. Thank you, Albert.
Posted by
Mário Romano
at
Wednesday, February 24, 2010
0
comments
Labels: Education
The all-new Outlook Social Connector connects you to the social and business networks you use, including Microsoft SharePoint, Windows Live, and other popular third-party sites, so you can get more information and stay in touch with the people in your network without leaving Outlook.
For now we only support LinkedIn, but Facebook, Windows Live and mySpace is comming soon. On problem, though, is the lack of 64 bit support.
Here’s a sample:
And here’s my sample on a 64 bit box (disconnected from LinkedIn):
Posted by
Mário Romano
at
Thursday, February 18, 2010
0
comments
Labels: Tools
Let’s start with the obvious: once more, Microsoft had to get a new name for it’s mobile OS, so their brand name is basically: worthless.
I haven’t tried it yet, but from what I’ve been reading:
Hope to get one - probably only on 2011. Until then, I’ll continue to suffer with WM6.5.
Posted by
Mário Romano
at
Tuesday, February 16, 2010
0
comments
Labels: Operating Systems
Object to object mapping is a tedious operation. And lately we all have a bunch to map. Here are the usual suspects:
Generally: whenever the same model payload must traverse boundaries that need to keep decoupled from each other. And here is AutoMapper to the rescue:
What is AutoMapper?
AutoMapper is an object-object mapper. Object-object mapping works by transforming an input object of one type into an output object of a different type. What makes AutoMapper interesting is that it provides some interesting conventions to take the dirty work out of figuring out how to map type A to type B. As long as type B follows AutoMapper's established convention, almost zero configuration is needed to map two types.Why use AutoMapper?
Mapping code is boring. Testing mapping code is even more boring. AutoMapper provides simple configuration of types, as well as simple testing of mappings. The real question may be "why use object-object mapping?" Mapping can occur in many places in an application, but mostly in the boundaries between layers, such as between the UI/Domain layers, or Service/Domain layers. Concerns of one layer often conflict with concerns in another, so object-object mapping leads to segregated models, where concerns for each layer can affect only types in that layer.How do I use AutoMapper?
First, you need both a source and destination type to work with. The destination type's design can be influenced by the layer in which it lives, but AutoMapper works best as long as the names of the members match up to the source type's members. If you have a source member called "FirstName", this will automatically be mapped to a destination member with the name "FirstName". AutoMapper also supports Flattening, which can get rid of all those pesky null reference exceptions you might encounter along the way.
Once you have your types, and a reference to AutoMapper, you can create a map for the two types.
Mapper.CreateMap<Order, OrderDto>();
The type on the left is the source type, and the type on the right is the destination type. To perform a mapping, use the Map method.
OrderDto dto = Mapper.Map<Order, OrderDto>(order);
AutoMapper also has non-generic versions of these methods, for those cases where you might not know the type at compile time.Where do I configure AutoMapper?
If you're using the static Mapper method, configuration only needs to happen once per AppDomain. That means the best place to put the configuration code is in application startup, such as the Global.asax file for ASP.NET applications. Typically, the configuration bootstrapper class is in its own class, and this bootstrapper class is called from the startup method.How do I test my mappings?
To test your mappings, you need to create a test that does two things:Here's an example:
- Call your bootstrapper class to create all the mappings
- Call Mapper.AssertConfigurationIsValid
AutoMapperConfiguration.Configure();
Mapper.AssertConfigurationIsValid();
Can I see a demo?
Check out the dnrTV episode on AutoMapper: http://www.dnrtv.com/default.aspx?showNum=155
So AutoMapper is a convention-based object-object mapper in .NET. It follows the Convention over configuration principle, which seeks to infer as many rules it can from convention, avoiding unnecessary configuration. Some obvious examples of such usage are clear on frameworks like Ruby on Rails and Spring. It can also be read under the DRY principle – don’t repeat yourself!
Posted by
Mário Romano
at
Wednesday, February 10, 2010
0
comments
Labels: architecture, Development
… complex numbers! I was browsing over (now old) new features, and I came across this beauty: complex numbers!
I must confess, except for some geeky fractal computations ages ago when it was geek to calculate Mandelbrot sets, long before .NET, I’ve never really needed to handle complex numbers… But ok, there you have it. Cool.
Long since I’ve been introduced to numbers with this properties, I had to seek help from Wikipedia in order to get a reason for using them. Here they are:
Ok, it checks: not in my daily work task list :)
Posted by
Mário Romano
at
Monday, February 08, 2010
0
comments
Labels: Development
I’m trying out a new softphone – I’m trying to ditch X-Lite. Here a cool option: 3CX. And yes, it looks like an iPhone, cool!
Posted by
Mário Romano
at
Thursday, February 04, 2010
0
comments
Labels: Gadgets
Here’s a cool site dedicated to code refactoring: http://refactormycode.com/. It’s like a forum for code refactoring on a concrete basis (code posted, refactoring suggestions are posted back).
Thanks for the link, Cab_Ux.
Posted by
Mário Romano
at
Wednesday, February 03, 2010
0
comments
Labels: Development