KodefuGuru
Name: KodefuGuru
Score: 3,781.41
Last Seen: 20 days, 12 hours, 5 minutes ago
Member Since: 9 June, 2009
DotNetShoutout
atom rss
5
Shouts

ASP.NET MVC DropDownList PostBack Follow-up

published 776 days, 19 hours, 1 minute ago posted by KodefuGuruKodefuGuru 780 days, 15 hours, 8 minutes ago
Monday, April 04, 2011 7:46:31 PM GMT Thursday, March 31, 2011 11:38:57 PM GMT
In 2009, I wrote how to do “postbacks” with the ASP.NET MVC DropDownList control. I wrote the post in response to questions in the forums, and lately that particular article has had a lot of traffic. Now, I don’t explain how to do true postbacks, only how to achieve the same effect. What you really do is use jQuery to retrieve the information. It’s a much more elegant solution. This follow-up is necessary because I wrote that article for ASP.NET MVC 1. The code doesn’t work for the later versions, as is... (more)
category: Web Dev | clicked: 3 | 1 comment | | source: www.kodefuguru.com
tags: ASP.NET MVC 3, ASP.NET MVC, JSON, dropdownlist, jQuery
5
Shouts

CLI Built-In Value Types in Managed Code

published 781 days, 17 hours, 40 minutes ago posted by KodefuGuruKodefuGuru 782 days, 3 hours, 14 minutes ago
Wednesday, March 30, 2011 9:07:17 PM GMT Wednesday, March 30, 2011 11:33:38 AM GMT
The common language infrastructure has many built-in value types with special encoding directly supported by the virtual execution system. Many are frequently used in common managed languages such as C#. The following chart will help you determine the size of each... (more)
category: How To | clicked: 1 | comment | | source: www.kodefuguru.com
tags: CLI, Types
6
Shouts

Technology and Friends: Chris Eargle on Fluent Interfaces

published 814 days, 15 hours, 52 minutes ago posted by KodefuGuruKodefuGuru 815 days, 19 hours, 28 minutes ago
Friday, February 25, 2011 10:54:52 PM GMT Thursday, February 24, 2011 7:19:04 PM GMT
In this interview, Chris Eargle describes using fluent interfaces to build a domain specific language and other nuances of C#. (more)
category: Screencast | clicked: 2 | 2 comments | | source: technologyandfriends.com
tags: C#, Technology and Friends, DSL, Linq, Fluent Interface
3
Shouts

Decompiling Made Easy

published 819 days, 16 hours, 43 minutes ago posted by KodefuGuruKodefuGuru 821 days, 21 hours, 56 minutes ago
Sunday, February 20, 2011 10:04:43 PM GMT Friday, February 18, 2011 4:51:17 PM GMT
Using the soon to be not-so-free version of .NET Reflector requires one to launch the program, open an assembly, and browse to the appropriate class or method. This is fine when you only want to see how the internals of something are working, and you’re not browsing to it from code. But, it can be extremely annoying when you’ve hit F12 one too many times and you’ve arrived at a class that resides in an external assembly. JustCode will soon make this an easy problem to solve. When you’ve arrived at that ... (more)
category: How To | clicked: 0 | comment | | source: www.kodefuguru.com
tags: JustCode, decompiler, Telerik
4
Shouts

Copy-Paste and New Features for Windows Phone 7

published 833 days, 15 hours, 21 minutes ago posted by KodefuGuruKodefuGuru 834 days, 22 hours, 5 minutes ago
Sunday, February 06, 2011 11:26:00 PM GMT Saturday, February 05, 2011 4:42:41 PM GMT
An update for the Windows Phone 7 developer tools have been released. It includes the long coveted copy and paste feature, enabled on TextBox, PasswordBox, and text input fields within the WebBrowser control... (more)
category: Metro | clicked: 0 | comment | | source: www.kodefuguru.com
tags: Windows Phone 7
3
Shouts

Reflector No Longer Free

published 836 days, 17 hours, 26 minutes ago posted by KodefuGuruKodefuGuru 837 days, 15 hours, 20 minutes ago
Thursday, February 03, 2011 9:21:07 PM GMT Wednesday, February 02, 2011 11:27:36 PM GMT
Red Gate surprised the .NET community today by announcing that .NET Reflector will become a paid product. In March, version 7 will be released with a $35 price tag. Unfortunately, current versions of Reflector are set to expire on May 30th.Good for the Community At first glance, this is bad for developers. I often use Reflector to find out what’s happening behind the scenes of an assembly, and I sometimes demonstrate this and encourage others to make it part of their toolset. $35 isn’t a lot of money, b... (more)
category: How To | clicked: 0 | comment | | source: www.kodefuguru.com
tags: Red Gate, Reflection, Reflector
4
Shouts

Red, Green, Refactor

published 838 days, 21 hours, 20 minutes ago posted by KodefuGuruKodefuGuru 839 days, 21 hours, 51 minutes ago
Tuesday, February 01, 2011 5:27:42 PM GMT Monday, January 31, 2011 4:55:54 PM GMT
Last night, I was asked why one should refactor if the test is passing. The test-driven development mantra of “red, green, refactor,” is ingrained in many practitioners' head, but why exactly should you bother with this ‘frivolous’ third step? When you write perfect code, why bother? (more)
category: Agile | clicked: 3 | comment | | source: www.kodefuguru.com
tags: Refactor, TDD, Cohesion
4
Shouts

Optimizing the Fill Extension Method

published 851 days, 19 hours, 52 minutes ago posted by KodefuGuruKodefuGuru 852 days, 23 hours, 4 minutes ago
Wednesday, January 19, 2011 6:54:49 PM GMT Tuesday, January 18, 2011 3:43:42 PM GMT
The first thing you may have noticed about the fill extension method was the improper generic constraints. This was due to Array being extended rather than specific arrays. To correct this, it is necessary to set the original method to private and implement overloads for each multidimensional array. Here are the overloads for one and two dimensions.public static void Fill (more)
category: How To | clicked: 0 | comment | | source: www.kodefuguru.com
tags: Array, extension method
5
Shouts

An Introduction to Mocking (Now that we are SOLID)

published 872 days, 15 hours, 53 minutes ago posted by KodefuGuruKodefuGuru 874 days, 14 hours, 29 minutes ago
Wednesday, December 29, 2010 10:54:37 PM GMT Tuesday, December 28, 2010 12:17:53 AM GMT
How does mocking benefit me?  That’s a question I hear a lot as I travel around the world giving talks.  So before we dive into how to use a mocking tool like JustMock Free Edition, let’s discuss why this is important and the benefit that mocking provides over other techniques like Fakes and Stubs. As a primer, I encourage you to read “Mocks Aren’t Stubs” by Martin Fowler.  Again, if you haven’t read it yet  - go ahead. I’ll wait.  Come back whe... (more)
category: Agile | clicked: 9 | comment | | source: www.skimedic.com
tags: Test Automation, Telerik, TDD, Mocking, Mock, Testing, JustMock, BDD
8
Shouts

Cracking a Microsoft contest or why Silverlight-WCF security is important

published 875 days, 2 hours, 40 minutes ago posted by sandrinosandrino 879 days, 6 hours, 4 minutes ago
Monday, December 27, 2010 12:07:02 PM GMT Thursday, December 23, 2010 8:43:36 AM GMT
Now there I was playing the game while I was debugging an application with Fiddler when I noticed something... the Silverlight was communicating with a WCF service. Nothing special here, were it not for the fact that after some time I was able to access the list of all high scores, insert my own highscore (which could make me win a Windows Phone or a laptop), ... After doing a few tests I notified Microsoft Belgium, but I guess someone already took advantage of this 'exploit'. The top score is someone... (more)
category: Metro | clicked: 1 | 1 comment | | source: sandrinodimattia.net
tags: Silverlight, Security, WCF
5
Shouts

Winter Solstice and New Beginnings

published 875 days, 2 hours, 40 minutes ago posted by KodefuGuruKodefuGuru 879 days, 21 hours, 39 minutes ago
Monday, December 27, 2010 12:07:02 PM GMT Wednesday, December 22, 2010 5:07:58 PM GMT
Winter Solstice occurred yesterday at 6:38pm EST, December 21st, 2010. The days will now be getting longer in the Northern Hemisphere, and it is the natural marker for the closing chapters in life and new beginnings. As such, I feel like it is a good time to reflect on what has occurred over the past year and announce what I have in store for the following year. 2010 has been an amazing year! I’ve ridden horseback around the Great Pyramids in the middle of the night, full moon in the sky. I’ve visited t... (more)
category: How To | clicked: 0 | 1 comment | | source: www.kodefuguru.com
tags: Community, Telerik
6
Shouts

Windows Phone Free App Submissions

published 875 days, 2 hours, 40 minutes ago posted by KodefuGuruKodefuGuru 881 days, 8 minutes ago
Monday, December 27, 2010 12:07:02 PM GMT Tuesday, December 21, 2010 2:39:19 PM GMT
I came across this tip from Oren Nachman about free app submissions for the Windows Phone. I was already reserving my free application slots for very specific purposes (contests and the like), but this makes me want to be very careful about ever submitting them. Here are the guidelines from Oren.Unlimited number of paid applicationsThis includes updates to said applications A paid application cannot be made free 5 submissions of free applicationsUnlimited updates to accepted free apps WARNING: failed sub... (more)
category: Metro | clicked: 0 | 1 comment | | source: www.kodefuguru.com
tags: Windows Phone 7, WP7
2
Shouts

Pluralize English Nouns

published 889 days, 21 hours, 1 minute ago posted by KodefuGuruKodefuGuru 891 days, 22 hours, 32 minutes ago
Sunday, December 12, 2010 5:45:49 PM GMT Friday, December 10, 2010 4:15:46 PM GMT
It’s a common problem: you have a noun that needs to be pluralized (or singularized!), so you end up rolling a custom solution or go with the dreaded (s) moniker. I recently discovered that it is in fact easy: the .NET Framework will pluralize or singularize nouns for you. I stumbled upon this after watching Jim Wooley’s presentation on Entity Framework 4. I was aware that EF4 got rid of the silly EntitySet name structure and had an intelligent way of pluralizing the entity sets, but I never really ques... (more)
category: How To | clicked: 0 | comment | | source: www.kodefuguru.com
tags: C#
4
Shouts

Anonymous Types and Lambdas

published 908 days, 20 hours, 30 minutes ago posted by KodefuGuruKodefuGuru 909 days, 21 hours, 45 minutes ago
Tuesday, November 23, 2010 6:17:39 PM GMT Monday, November 22, 2010 5:02:33 PM GMT
I saw an interesting tweet from @remitaylor yesterday. "Cannot assign lambda expression to anonymous type property." :sadface: So I can't include a lambda as a value in any new { ... } in C# Unfortunately, this is true. I tried it myself.var x = new { F = s => s + 1 }; Console.WriteLine(x.F(1)); The C# compiler doesn’t know if the lambda is meant to be a delegate or an expression tree. The solution is to instantiate the one you want to create. In this case, let’s assume it’s a Func (more)
category: How To | clicked: 2 | comment | | source: www.kodefuguru.com
tags: lambda, anonymous types, delegates
3
Shouts

Compile Micro Focus COBOL.NET to INT

published 910 days, 19 hours, 25 minutes ago posted by KodefuGuruKodefuGuru 912 days, 15 hours, 19 minutes ago
Sunday, November 21, 2010 7:22:41 PM GMT Friday, November 19, 2010 11:27:50 PM GMT
I was recently presented with an odd problem. The COBOL team at work was making the switch to using COBOL.NET, but the compiled DLLs were constantly becoming locked. Instead, they wanted the COBOL.NET compiler to create INT files. There was no build action for individual CBL files for this, and the cblproj file had no option to compile the .CBL files to INT. For those that may be confused by that sentence, each individual CBL file is compiled to a DLL in COBOL. I checked the compiler out, and it did hav... (more)
category: How To | clicked: 0 | comment | | source: www.kodefuguru.com
tags: COBOL, Micro Focus, COBOL.NET
4
Shouts

Windows Phone 7 & “native” apps, the missing link! - Chris Walsh

published 917 days, 2 hours, 28 minutes ago posted by NickolayNickolay 918 days, 12 hours, 16 minutes ago
Monday, November 15, 2010 12:19:44 PM GMT Sunday, November 14, 2010 2:31:14 AM GMT
Ok, take a deep breath, let it sink in, are you ready? What I discovered today was some FUNKY code that Samsung had created to set the Network properties of a Windows Phone 7 handset.  Taking a peek under the skirt, I noticed something unreal.  The application has unmanaged DLL’s inside the XAP file!!! Ok, you’re thinking, so what, this isn’t anything special.  All they’ve done is add them manually into the project as a content build action. True, they have done that, but what’s next is even more UN... (more)
category: Smart Client | clicked: 1 | comment | | source: blog.walshie.me
tags: Windows Phone 7, Windows Phone, Windows Phone 7 Series
2
Shouts

Don’t Close Work Items with Remaining Hours

published 918 days, 18 hours, 38 minutes ago posted by KodefuGuruKodefuGuru 920 days, 23 hours, 16 minutes ago
Saturday, November 13, 2010 8:08:52 PM GMT Thursday, November 11, 2010 3:31:34 PM GMT
Project management doesn’t seem to like it when they generate reports from Team Foundation Server and see tons of hours remaining for work that should have already be completed. In my organization, it’s not due to lazy developers not completing their tasks, but people tend to forget to zero out the remaining hours in their tasks before closing it. Luckily, there’s a way to fix that. Open up a command prompt and change directories to %ProgramFiles%\Microsoft Visual Studio 10.0\Common7\IDE. Then run the f... (more)
category: How To | clicked: 1 | comment | | source: www.kodefuguru.com
tags: Team Foundation Server, Work Item, TFS
6
Shouts

Fill a Multi-Dimensional Array

published 935 days, 23 hours, 6 minutes ago posted by KodefuGuruKodefuGuru 937 days, 17 hours, 1 minute ago
Wednesday, October 27, 2010 3:41:07 PM GMT Monday, October 25, 2010 9:45:58 PM GMT
It is rare that I need to work directly with arrays in today’s world of LINQ to Objects. However, yesterday evening I found myself with the need to fill the elements of a multidimensional array. If I had any observers, I’m sure this would have been an amusing period of time as I struggled to find the correct iteration mechanism to set elements on a multi-dimensional array. It’s quite easy when you’re working with a vector type (one dimension). You grab the array’s length, then iterate using a for loop s... (more)
category: How To | clicked: 0 | comment | | source: www.kodefuguru.com
tags: function, extension method, arrays
2
Shouts

KodefuGuru | Life Student of the Kodefu Arts

posted by KodefuGuruKodefuGuru 943 days, 1 hour, 23 minutes ago
Wednesday, October 20, 2010 1:24:00 PM GMT
I named this pattern, or anti-pattern, after Invasion of the Body Snatchers. The gist is that you’re writing managed code, and you have one type that you’d like to treat as another. The instance is going to be snatched and a new reference returned that can be treated like the desired type… kind of like pointers! Only, I didn’t use pointers. This is done with managed code. Here are our two classes:public class Person { public string FirstName { get; set; } public string LastName { get; set; } ... (more)
category: How To | clicked: 2 | 1 comment | | source: www.kodefuguru.com
tags: Pattern, trick, antipatterns, memory
6
Shouts

Homework Will Never Be The Same

published 954 days, 27 minutes ago posted by KodefuGuruKodefuGuru 956 days, 16 hours, 57 minutes ago
Saturday, October 09, 2010 2:20:14 PM GMT Wednesday, October 06, 2010 9:50:12 PM GMT
I found tutorials for Microsoft Math 3.0 on Microsoft Downloads and felt compelled to view one. What I discovered was one of the coolest graphing programs I’ve ever witnessed. You just enter an equation into it, and it will graph it for you. Back on the worksheet tab, it not only solves equations, it will tell you how to solve them step by step! This makes me tempted to go dig up my calculus books for problems that were tough to solve, and see how Microsoft Math handles it. This thing has so man... (more)
category: How To | clicked: 0 | comment | | source: www.kodefuguru.com
tags: graphing, math, Microsoft Math