Quick Search


Tibetan singing bowl music,sound healing, remove negative energy.

528hz solfreggio music -  Attract Wealth and Abundance, Manifest Money and Increase Luck



 
Your forum announcement here!

  Free Advertising Forums | Free Advertising Board | Post Free Ads Forum | Free Advertising Forums Directory | Best Free Advertising Methods | Advertising Forums > Post Your Free Ads Here in English for Advertising .Adult and gambling websites NOT accepted. > Post Your Business Ops Here

Post Your Business Ops Here This section is for posting your free classified ads about different work at home and home based business opportunities.

Reply
 
Thread Tools Display Modes
Old 09-16-2011, 01:53 PM   #1
czc3v6a8p
 
Posts: n/a
Default Supra Shoes| Fluent JavaScript

So, this is the first post using my new WLW support and I’m damn proud of it. It was work that I did with Kent Sharkey, a close friend of mine that the most resembles Eeyore in character and facial expressions, and that just made it all the more amusement!


Management vs. Motivation


Anyway, I’m happy with the results of my forcing function and I’ll post the code and all the details ASAP, but I just wanted to beg for my comparative silence on this blog and that things should get better RSN. XXOO.



I'll tell you why: because I've got 2600 posts in my blog from 15 years of doing this, I cross-link to my own content all the live-long day and a bunch of those cross-links are to, you guessed it, to what used to be static data. So, I have to turn links embedded in my content of the form "/writing/#footag" into links of the form "/posts/details/452". But how do I look up the mapping between "footag" and "452"? That's right -- I actually went to my (inner) DB admin and solicited him for a new column on my live database called "EntryName" where I tucked the <a name="tag" /> data as I imported the data from Phil's tool, even though I didn't know why I might need it. It was a good principle.
Friday, Jun 18, 2010, 11:43 AM in Interview
13 comments
iOS 4 takes a step in the right direction with the "global" inbox:
EF works great with MVC, but in the case of optimistic concurrency, you’ve got to work around the stateless model of the web a little to get it working just the way you like.

Wednesday, Oct 27, 2010, 1:48 PM in The Spout


[Chris] I'm sure MS does provide education for interviewing, but Iive never been to it. At Intel, I learned the behavioral interviewing technique, which Iive used in every interview since, both as an interviewer and as a job candidate.
Way, way faster. SQL Server 2008 and EF4 make the site noticibly faster. I love it. Surfing from my box, as soon as the browser window is apparent, I'm looking at the content on my site. What's better than that? I made tinysells.com work again, e.g. tinysells.com/42. I broke when I moved it from simpleurl.com to godaddy.com. Luckily, godaddy.com was just forwarding to sellsbrothers.com/tinysells/<code>, so that was cozy to implement with a MVC controller. That was all data I already had in the database because John Elliot, another helper I had on the site a while ago, set it up for me. I added reCAPTCHA support: Now I'm hoping I won't must temperate remarks at all. So distant, so good. Also, I added the ability to add HTML content, which is encoded, so it comes right back the way it went in, i.e. no operation scripts or links or anything a spammer would want but the characters a coder wants putting content into a technical blog. Per category ATOM and OData feeds (and RSS feeds, too, if you concern). For example, if you click on the ATOM or OData icons on the home page, you'll get the feed for everything. However, if you click on it on one of the category pages, e.g. /fun, you'll get a feed filtered by category. Paging in OData and HTML: This lets you scroll to the bottom of both the OData feed and the HTML page to scroll backwards and along in time. New layout including fixed-sized content space for readability, google ads and bing search (I'd happily replace google ads with bing ads if they'd let me). Nearly every sub-page is category driven, although even the ones that aren't, e.g. /tinysells and /writing and still completely data-driven. Further, the writing page is so data-driven that if the data is just an ISDN, it creates an ASIN companion ID for amazon.com. Buy those books, people! : ) The Room for Improvement
By default, the output from my budgeting program looks like this (w/ my personal financial details blacked out):


Further, sometimes there are problems on an object’s state that span more than one property. Unfortunately, because such a constraint can’t be checked on any single property change, we need to at least check it at the object level, not just at the property level.
And, in fact, that's what happened. For many weeks while I was architecture my new web site, I was dumping static data into the live database. However, since my old web site sorting things by appointment, there was only one place to even see this old data being put in (the /news/archive.aspx page). Otherwise, it was all imperceptible.


Object.defineProperty(Array.model, "union", { value: feature (rhs) { var rg = this.slice(0); rhs.forEach(function (v) rg.unshift(v);) return rg;
}}); Object.defineProperty(Array.prototype, "first", { value: function (callback) { because (var i = 0, length = this.length; i < length; ++i) { var value = this[i]; if (callback(amount)) return value; } return null;
}}); Object.defineProperty(Array.prototype, "unattached", { value: function (callback) { var outcome = null; this.forEach(function (v) { if (callback(v)) { if (outcome != null) { throw "extra than an result"; } result = v; } }); return result;
}});
These aren’t perfectly inline with all of the semantics of the built-in methods, but they give you a savor of how you can stretch the prototype, which ends up consciousness like adding enhancement methods in C#.
Just because I'm completely anal about making sure every link I ever pass out to the world stays legal for all eternity doesn't mean that the rest of the world is similiarly anal. That's a shame, but there's nobody I can do if little sites like microsoft.com determine to move things without a forwarding address. I can, however, make sure that all of my links worked internally and I used Xenu to do that. I started out with several hundred broken links and before I shipped the new site, I had naught.
During this data cleaning, I applied one simple rule that I adopted early and all apologized when I ignored:
What is LINQPad?

We have a series of free, day-long events we're doing around the world to show off the pulchritude and wonder that is the Open Data Protocol. In the morn we'll be showing you OData and in the afternoon we'll help you get your OData services up and running. Come one, come all!
If you like, you can turn off the extra information your service endpoint is providing with the DataServiceException and just set the HTTP status, e.g.
David Ramel Asks About Interviewing at Microsoft
P.S. I presume someone will be competent to tell me how I can do it better. : )
Tuesday, Dec 14, 2010, 8:36 AM


There are other means of validation that you will want to investigate, like the validation attributes supported by MVC and SilverLight, but IDataErrorInfo is the one with the broadest reach. It’s also the one that’s simplest for you to check yourself if you’re not getting the automatic support you want from your GUI framework. For example, because the SaveChanges method on the context base class is virtual and because we’ve got the Object State Manager, we can check ourselves for object errors using IDataErrorInfo:
Friday, May 7, 2010, 3:40 PM in Fun




22 comments
BlogEdit: An unimagintively named general-purpose post and comment creation and editing tool. I built the first version of this long before WPF, so kept hacking on it in WinForms (whose data binding sucks compared to WPF, btw) as I needed it to have new features. Eventually I gave this tool WYSIWIG HTML editing by shelling out to Expression Web, but I need real AtomPub support on the site so I can move to Windows Live Writer for that functionality in the future. BulkChangeDatabaseTable: This was an app that I'd use to run my questions to find "filthy" data, perform normal expression replaces with and then -- and this is the best part -- show the changes in WinDiff so I could determine I was elated with the changes before commiting them to the database. This extra eyeballing saved me from wrecking a bunch of data.
LINQ Has Changed Me


Now imagine that I’d like to build a web application to administer instances of the Ad type. If multiple people are editing ads in no time, especially the same set of ads, I’m likely to run into concurrency errors. By default, EF lets the last change win.

So, with a composition of data cleaning to make my content work across both the old site and the new site beneath evolution, production some of my old URLs work for of conventions I accepted that I wanted to keep and URL rewriting, I had a simple, feature-complete, 100% data-driven re-implementation of sellsbrothers.com.
2 comments
Saturday, Jan 15, 2011, 11:00 PM


1 comment





thou shalt not stress over broken links to external content.

// POST: /Ad/Create
[HttpPost]
public ActionResult Create(Ad ad) ...
MVC catches the exception before the Create method is even called and the view shows the error message. Notice that the error message is not what we provided, however.


<?xml version="1.0" encoding="utf-8" standalone="yes"?> <feed ...> <title type="text">Posts</title> <id> <updated>2010-05-11T22:48:13Z</updated> <link rel="self" title="Posts" href="Posts" /> <m:error> <m:code></m:code> <m:message xml:lang="en-US">Internal Server Error. The type 'System.Data.Entity.DynamicProxies.Post_CF2ABE5AD0 B93AE51D470C9FDFD72E780956A6FD7294E0B4205C6324E105 3422' is not a intricate type or an entity type.</m:message> </m:error>

Assuming the service was great, that’s a 20% tip, so double the bill and move it right one decimal point, making the math easier for yourself, e.g. $37.42 is close to $35, doubling is $70, so a $7 tip. Boom: 20% tip.


Live Tiles really do get me in and out faster. I know the commercials are there as sale, but I really love seeing how many unseen (not unread) emails I have and the latest picture from my roll and the latest updates from my favorite contacts and the latest weather and my next appointment and and and…

In fact, I like Live Tiles so much that I wish the little screen to the right of the home screen used them, too. I’d like to just have a set of Live Tile screens prepared horizontally where all my installed apps live, just sorted in priority order according to my own design. Getting rid of the long list to the right of the home screen would be very appreciated.


This code isn’t needed if you’re already using a GUI framework that assists IDataErrorInfo, but it’s still handy to know you can roll your own code into SaveChanges if you need to.
Budgeting with Mint.com and LINQPad
Next, bring in the Categories table from Northwind into a ADO.NET Entity Data Model:


So, instead of putting in your top command and walking away, which lets other folks probe your top command with their top bid and deciding after that their top bid goes toppier, wait ‘til the last minute to put in your bid. I trust the train is called “sniping” and there are even apps that do it, although at present, I’ve found IE and a cool hand sufficient.
Not only would this put all my messages in one place emerge from, but it would unify up the UI and preferences across the various messaging sources. Do you want your text messages to silently queue up like email? Done. Do you want your voicemail to pop to the front like an SMS? Done. Do you want the same swipe-to-delete gestures on your voicemail as you have with your email? Done,Supra Shoes!
Antoine De Saint-Exupery, author of "The Little Prince"



namespace System.ComponentModel { public interface IDataErrorInfo { string Error get; string this[string columnName] get; }
}
Notice that IDataErrorInfo exposes error specifications at both the object and the property/column level. It’s easy to implement this standard interface on our example Ad class:
3 comments
Monday, Sep 27, 2010, 4:50 PM in Tools
SQL Server Modeling Nov09 CTP Release 3 Release Notes
And even whereas I was detailed to keep my schema the same on the backend and map it as I wanted in my new web site via EF, not all of my old data worked in my new earth. For example, I was creating a web site on my regional box, so everything with a hard-coded correlate to sellsbrothers.com had to be changed. Also, I was using a set of <a name="label" ? units to reference specific posts in my static HTML that just didn't scale to my dynamic ID-based permalinks, so data had to be "washed."





2589 older posts No newer posts





Trial Mode means that I can try nearly every app in the app store! If you’re an app dev, it’s your job to ship your app in trial mode and make it so forcing that I’ll beg to disburse for it and WP7 encourages that, which is good for consumers. Win-win.


Why can't it all just be messages?

public class MyODataEndpoint : DataService<FooEntities> { public static void InitializeService(DataServiceConfiguration config) ... defended override sellsbrothersEntities CreateDataSource() { var dataSource = new FooEntities(); dataSource.ContextOptions.ProxyCreationEnabled = false; return dataSource; } }

a whole new sellsbrothers.com
If it happens to you and it doesn't seem to make any sense, you can try to nail it with a Build Clean command. If you're using to previous versions of Visual Studio, you'll be wondered, like I was, not to find a Clean alternative in sparse the Build list. Instead, you can only get to it by right-clicking on your project in the Solution Explorer and choosing Clean.
Imagine a very simple EDM to describes web advertisements:
var service =
new NorthwindEntities(new Uri(@
service.SendingRequest += delegate(object sender, SendingRequestEventArgs e) var userpw = "admin" + ":" + "pw"; var base64 = Convert.ToBase64String(Encoding.ASCII.GetBytes(use rpw)); e.Request.Headers.Add("Authorization", "Basic " + base64);;
Notice that we’re watching for the SendingRequest accident on the client-side so that we can pre-populate the HTTP Authentication header so the service endpoint doesn’t must even ask. Not only does this work approximately the problem but it reduces round-trips, which is a good idea even now/when batch-mode is fixed to respond properly to HTTP 401 errors.
Enjoy!

Impressions
[David] What would you say was the biggest element in your creature offered a job at Microsoft?

I really love LINQPad. In fact, I find myself wanting the same functionality for other uses, e.g. SQL (real SQL), JavaScript and as a shell. It’s the interactive data access that makes it for me – munge some data, look at it, reiterate. It doesn’t quite do everything I want, though – where’s the full-featured, all-data, Swiss legion knife for data?
class Program { static void Main(string[] args) { var service =
new NorthwindEntities(new Uri(@"
service.Credentials = new NetworkCredential("admin", "pw");
var classification = new Category() CategoryName = "My Category"; service.AddToCategories(species); //service.SaveChanges(); // works service.SaveChanges(SaveChangesOptions.Batch); // #fail
Console.WriteLine(category.CategoryID); }
}
Here we’re setting up the credentials for when the service asks, adding a new Category and calling SaveChanges. And this is where the difficulty started. Actually, this is where the difficulty ended after 3 days of banging my head and 4 hours with the WCF Data Services team (thanks Alex, Pablo and Phani!). Anyway, we’ve got 3 things interacting here:



This way, I could make sure they worked in my new environment and could refactor to my heart's content before bothering my (internal) DB admin with request after request to change a live, running database. I used a very simple repository pattern in my MVC2 web site to conceal the fact that I was actually accessing two databases, so when I switched anything to a single database, none of my view or master code had to change. Beautiful!
Saturday, Dec 18, 2010, 5:02 PM
HttpContext.Current.Response.AddHeader("WWW-Authenticate", "Basic realm=\"Northwind\"");
//throw new DataServiceException(401, "Unauthorized");
HttpContext.Current.Response.StatusCode = 401;
HttpContext.Current.Response.StatusDescription = "Unauthorized";
HttpContext.Current.Response.End();
This fix only doesn’t work with Cassini, but Cassini doesn’t work well in the face of HTTP authentication anyway, so moving to IIS7 should be one of the first things you do when facing an authentication problem.





<% using (Html.BeginForm()) %>
...
<%: Html.HiddenFor(model => model.TimeStamp) %>
...
<% %>
The Html.HiddenFor is an MVC helper that produces HTML that looks like so:
Saturday, Jan 15, 2011, 9:36 PM
Mary died a much darling mother, grandmother and great grandmother as well as a dear friend to most everyone she met. She was generous of spirit, baking and cooking for her friends and family almost right up until the day she died, making sure her loved ones resided plump in her love. She was talented in the pantry, keeping her family prescriptions close to her heart for only those most special in her life. She was too a mischievous conscience, taking advantage of her fast mind and her family’s sympathy for her sicknesses in later years to fool outrageously at games of all kinds.

The output is spit into a table w/o me having to do anything except dump the data. The number columns have an automatic bar graph glyph on them that shows proportions when clicked. The number columns are automatically totally. The Transactions column is turned off because I said “Dump(2)”, which only dumps to the 2nd level. By default it would drill down beyond, e.g.
thou shalt built the new web site the way you want and make the old URLs work externally.




After have a unified inbox, I miss it now thatit’s gone. Of course, I never had the unified inbox I really wanted, but I can keep hoping. I didn’t know how much I’d miss DropBox and Pandora ‘til they were gone. There is a frontend for WP7 that works with my DropBox account called BoxFiles, but it doesn’t actually let me peruse any of my files, so it still has some room for improvement. Also, last.fm does not have anything like the same kind of algorithm for electing melodies for me that Pandora does, so I’m missing Pandora. I have come to really like Slacker for melody, however. I didn’t know I wanted a browser that supported HTML5, ES5 and CSS3 until I started working in that field. I can’t seem to make MMS work on my phone, notwithstanding additional people can, so I assume it’s an account issue. I’ll keep attempting. Fast application startup. Some do, some don’t. I hope they all did. Beating Expectations
However, where batch mode falls down is with the extra payload data that the DataService######pection packages into the HTTP error resposne, which confuses it enough so that the exception isn’t handled as a request for credentials, but rather reflected back up to the client code. It’s the interaction between all three of these that causes the problem, which means that until there’s a fix in your version of .NET, you need a work-around. Luckily, you’ve got three to choose from.
Of course, I couldn't just reimplement the site without doing something new:
Note: These steps will not remove the SQL Server Modeling CTP entry in Add and Remove Programs but you will be able to install the new CTP.
The Bose Bluetooth works very well with WP7. The pairing is seamless, the call quality is lofty for both parties, the volume buttons are on the hardware and easy to use, the in-ear fitting is solid and snug with no need for an over-the-ear hook, it charges quickly and it shares the mini USB connector with my phone, so I can share the wires. And, unlike the Jawbone, the quality of the audio is good enough to enable voice dialing, so I can really do the hands free thing that Oregon and Washington require by statute.

thou shalt have not .html files served from the file system.
The first thing I did was design my data model. I started very small with just Post and Comment. That was enough to get most of my content in. And that lead to my first principle (we all need principles):




And how did I even figure out I had all those broken links? Well, I asked my good friend and web specialist Kent Sharkey how to make sure my site was at least internally consist before I shipped it and he recommended Xenu Link Sleuth for the job. This lead to another principle:
thou shalt ship the new site with no broken internal links.
Cannot view XML input using XSL style sheet. Please correct the error and then click the Refresh button, or try again later.




It was surprisingly fun.
Oh, and if the tip is added as a mandatory minimum, then the appended peak is easy: $0.00. I don’t deal well with legislature.

10 comments


Where Are We?
Spurious MachineToApplication Error With VS2010 Deployment
// union
s += "<h1>chris's family</h1>" +
[chris].union(chris.kid).map(function (p) return p;).join(", "); Where Are We?
If you’re a JS programmer, it may be that you appreciate using it like a scripting language and so none of this “set-based” nonsense is important to you. That’s OK. JS is for everyone.

On my old site, I had a mix of static and dynamic content which lead to a heap of trouble. This time, the HTML at least was going to be all dynamic. So, once I had my model defined, I had to import all of my static data into my live system. For that, I needed a tool to parse the static HTML and pull out structured data. Luckily, Phil Haack came to my rescue here.
// POST: /Ad/Create
[HttpPost]
public ActionResult Create(Ad ad) { try { if (!ModelState.IsValid) return View(); ... } catch return View();
}
// POST: /Ad/Edit/
[HttpPost]
public ActionResult Edit(Ad ad) { try { if (!ModelState.IsValid) return View(); ... } catch return View();
}
In addition to the IsValid flag, the ModelState provides a list of property name/error message pairs that show in the code that the view generator spits out when it’s creating forms, e.g.

The Data Modeling

Doing that, however, seems to make the error go away. I don't think that's a problem with my app; I think that's a problem with VS2010.
Not all of that was changing old content, however. In fact, most of it wasn't. Because I wanted existing external links out in the world to find the same content in the new place, I had to make sure the old links still worked. That's not to say I was a slavery to the old URL format, however. I didn't want to expose .aspx extensions. I wanted to do things the new, cool, MVC way, i.e. instead of /news/showTopic.aspx?ixTopic=452 (my old format), I wanted /posts/details/452. So, this lead to a new principle:

The Basics of EF Validation: IDataErrorInfo

There are lots of great data talks at PDC 2010, all of which are available for online viewing:




0 comments

Instead of doing the “call an endpoint,” “oops I need credentials,” “here you go” disco, if you know you’re going to need credentials (which I argue is most often the case when you’re writing OData clients), why not provide the credentials when you make the call?
The semantics of the timestamp type are just what we want: every time a row is updated, the timestamp col is updated. To see this new column in the Entity Data Model, you’ll have to right-click on the designer surface and select Update Model from Database, which results in the TimeStamp being added to our model:



For the uninitiated, peppermint.com is a free online private fiscal management site. At its gist, it uses financial list, loan and wealth message that lets it record into assorted financial sites and grasp my data for me, e.g. 1sttech.com, usbank.com, wcb.com, etc. It uses this to let me categorize transactions so that it can do budgeting for me. However,Dwight Howard Shoes, it doesn’t give me the control I ambition, so I jot procedures against this unified transaction information. Essentially, I re-categorize every transaction to my own set using a chart I retain in an Excel document, then liken the measure I cost every month against what my budget amount is, maintained in distinct canvas in that same Excel file. Because mint.com doesn’t provide a programmatic API (OData would be a godsend!), I pull down my transaction history as a CSV file that the web site provides for me, which I then translate to an Excel file.
This is a handy technique to see whether EF batches SQL statements when you call SaveChanges (EF4 doesn’t batch) or how many round-trips lazy loading will spend you (lots – prefer the Include method).
Now, here’s a simple Edit method on our MVC controller:
The order and object initialization grammar looks very similar so long as I follow the JS convention of passing in an nameless object as a set of constructor parameters. The JS Date type is like the .NET DateTime type except that months are zero-based instead of one-based (odd). When a Person object is “added” to a string, JS is natty enough to automatically call the toString method. The JS map function lets you project from one set to another like LINQ Select. The JS filter function lets you filter a set like LINQ Where. The JS some function lets you check if anything in a set matches a predicate like LINQ Any. The JS reduce function lets you amass results from a set like the LINQ Aggregate. The JS slice function is a multi-purpose array manipulation function that we’ve used here like LINQ Take and Skip. The JS slice function also produces a copy of the array, which is handy when handing off to the JS sort, which deeds on the array in-place.
Once I’d cleared away the other bugs in my program, it was these three things in combination that caused the trouble.
...
<% using (Html.BeginForm()) {%>
<%: Html.ValidationSummary(true) %>
...
<%: Html.TextBoxFor(model => model.Link) %>
<%: Html.ValidationMessageFor(model => model.Link) %>
...
It’s in the ValidationSummary helper that shows object-level errors and the ValidationMessageFor helper that shows property-level errors:

// GET: /Ad/Edit/5
public ActionResult Edit(int id) return View(db.Ads.Single(ad => ad.Id == id));
This kicks off the view, but with one key missing ingredient – the view doesn’t have the TimeStamp field in it; because it’s mapped in EF as binary data, the MVC form generator wouldn’t provide a field for it. To determine we pass the version of the data along with the data itself, we have to add a field to our HTML form and, because we don’t want the user to see it, let alone edit it, we need to make it hidden:










My mobile device is driving me crazy.


Sample WP7 emulator contact (twitpic).
The browser isn’t a very interesting program, however, which is why I added a service reference for my new service to my plain vanilla console application and wrote this little program:



Using LINQPad to Run My Life: Budgeting
8 comments
For either of these issues, we have IDataErrorInfo.



Maybe someone with some experience on the new Windows Phone 7 can differentiate me that there is a "messaging" centre that manages always this for me. Since they're yet doing entities favor sending facebook pictures into the "pictures" centre (alternatively whatever they shriek it), that doesn't seem completely out of the realm of potentiality. If that's the case, I'll say another what I've been saying for a when -- I can't wait for my Windows Phone 7!
And I'm so pleased I did. It worked really, really well to change names and select fields I cared about or didn't care about all from the client-side without ever touching the database. Sometimes I had to make database changes and when that happened, I has careful and muse, making the case to my inner DB superintendent, but mostly I just didn't must.






Enabling the Tip Calculator in Your Brain

update [dbo].[Ads]
set [Title] = @0, [ImagePath] = @1, [Link] = @2, [ExpirationDate] = @3
where ((((([Id] = @4) and ([Title] = @5)) and [ImagePath] is null)
and ([Link] = @6)) and ([ExpirationDate] = @7))
This is handy, but it also requires that we keep around an entity in memory in both its original state and its updated state for the length that the user is editing it. For desktop applications, that’s not an issue, but for stateless web pages, like MVC-based web pages, it is.

7 comments
1 comment

The way OneNote works is game changing. I keep lots of random notes about things and to have the phone seamlessly sync with the web and my PC is excellent. The web site needs search and the phone needs better auto-sync’ing (right now if you don’t press the Sync button occasionally, you can get sync conflicts more than you anticipate), but it already works so well, it’s hard to complain. Plus, you can needle favorite notes, like your grocery list, to the home screen. Beautiful!

I am a paid Evernote consumer, but free OneNote is better. The PC client is 10x better for keyboard users (i.e. me) and it’s free, assuming you have Office.
For example, I have been holding back on half a dozen or more blog posts until I have the software set up on my newly minted web site to handle blog posts in a modern way, is via Windows Live Writer. In other words, I was using the oppression inherent in the pile up of blogging topics to motivate me to build the support I wanted into sellsbrothers.com to have a safe blogging endpoint for WLW. Before I moved all my content into a database, I could just pull up FrontPage/Expression Web and type into static HTML. Now that everything is data-driven, however, the content for my posts are just rows in a database. As much as I love SQL Server Management Studio, it doesn’t yet have HTML editing support that I consider ample. Further, getting images into my database was very definitely a programming task not handled by existing tools that I was familiar with.
Before he was a Microsoft hired in charge of MVC, Phil was renowned inventor of the SubText open source CMS project. A few years ago, in one of my aborted attempts to get my site into causativeable state (it has evolved from a single static txt file into a mish-mash of static and dynamic content over 15 years), I asked Phil to help me get my site moved over to SubText. To help me out, he built the tool that parsed my static HTML, transforming the data into the SubText database format. For this, all I had to do was alter the data from his format into bomb, but before I could do that, I had to hook my schema up to a real-live datastore. I didn't want to must take old web site down at all; I wanted to have both sites up and running in the meantime. This lead to rule #2:
It's in the creation of the OData feed that the error happens, so instead of clearing the response and just returning the error, we dump it into the medium of the output, making it very difficult to find. In this case, what we're telling you is that you've mistakenly left dynamic proxy creation on, which doesn't work with EF4 POCO objects and Data Services in .NET 4.0. To fix this, you need to override the CreateDataSource method in your DataService<T> derived class:
This lead to a great many real-world uses of the database features of Visual Studio, including EF, OData, Database projects, SQL execution, live table-based data editing, etc. I lived the data-driven dream and it yielded a web site that's much faster and runs on in the absnece of code:
“Oh, well, I do it at 4 seconds, but my computers are slow.”


I can’t dream anybody reading this blog needs to read this, but I can’t help myself.




The XML page cannot be displayed

Data Wants To Be Clean
8 comments






At Microsoft, there’s this passive-aggressive cultural thing called a “forcing function,” which, to put it crudely, is an engineering way for us to control the behavior of others. The idea is that you set up something to happen, like a meeting or an event, that will “force” a person or group to do something that you want them to do.





In the old days, the post-colonial, pre-LINQ days of yore, I’d have written a one-way MD5 encryption like so:

What's New?



“If you want to build a ship, don’t drum up people to collect wood, separate the work, and give them orders. Instead, instruct them to yearn for the vast and endless sea."

Often when I'm building my MVC 2 application using Visual Studio 2010, I get the following error:
Luckily, with the infrastructure I've got in place now, laying in these features over time will be easy, which was the whole point of doing this work at the outset.



A update of the SQL Server Modeling CTP (November 2009) that's compatible with the lawful (RTM) unlock of Visual Studio 2010 is now available on the Microsoft Download Center. This unlock is strictly an updated version of the aboriginal November 2009 CTP release to support the final release of Visual Studio 2010 and .NET Framework 4.




Fluent-Style Programming in JavaScript

What my team does on an average Wednesday afternoon:
<input id="TimeStamp" name="TimeStamp" type="invisible" value="AAAAAAAAB9E=" />
Now, when we press the Save button, the SQL we saw earlier is invoked to use the ad’s distinctive ID as well as the version (our timestamp column). If there’s a concurrency problem, i.e. somebody else has updated the underlying row in the database since we cached our values on the HTML form, we get an exception:
When I was just a wee guy, probably the most valuable thing I learned was how to perform numerical estimation, the magnitude of which and several techniques you can get by reading Jon Bentley’s The Back of the Envelope (this composition along with several others, are collected in his most excellent books Programming Pearls and More Programming Pearls, both of which are still relevant a decade later). Not only is estimation generally quicker than running a calculator, but even when you do run a calculator, it helps you figure out when you did it wrong, the latter of which has saved my bacin due time and again.
For example, let’s assume the dinner bill is $37.42. If the service was bad, that’s a 10% tip (you have to tip them something ‘cuz the IRS assumes you will and tariffs them hence – bastards). So, with a 10% tip, take the bill and move it right one decimal point: $3.74. Now, circular up or down depending on how bad the service was, e.g. $3.50 or $4. Quick and easy.

Mapping sub-folders to categories: In the old site, I physically had the files in folders that matched the sub-folders, e.g. /fun mapped to /fun/default.aspx. In the new world, /fun meant /posts/details/?category=fun. This sub-folder thing only works for the set of well-defined categories on the site (all of which are entries in the database, of course), but if you want to do sub-string search across categories on my site you can, e.g. /posts/details/?category=foo. Kept sub-folder URLs, e.g. /tinysells and /writing: I still liked these URLs, so I kept them and built controllers to handle them. Using the IIS URL Rewriter: This was the big gun. Jon Galloway, who was valuable in this work, turned me onto it and I'm glad he did. The URL Rewriter is a small, simple add-in to IIS7 that lets you describe patterns and rules for forwarding when those patterns are matched. I have something like a dozen patterns that do the work to forward 100s of URLs that are in my own content and might be out in the world. And it works so, so well. Highly recommended.


Do the math and that's 100+% of the content and functionality for 10% of the code. I knew I wanted to do it to acquisition experience with our end-to-end data pile anecdote. I had no idea I would love it so much.


The new sellsbrothers.com implementation has been a while in the making. In fact, I've had the final art in my hands since August of 2005. I've tried several times to sit down and reproduce my 15-year-old sellsbrothers.com completely from scratch using the latest tools. This time, I had a book compact ("Programming Data," Addison-Wesley, 2010) and I needed some real-world experience with Entity Framework 4.0 and OData, so I bombarded up Visual Studio 2010 a coupla months ago and went to town.
The thing that makes this app really work for me is the REPL nature. It’s very immediate and I can see where my money is going with very little etiquette. It’s really the comprehension of the Dump command that keeps me from moving this app to WPF. Dump gives me the view I need to know where my money goes and it gives me the programming surface to slice/dice the data the way I want to. I have no control out of the box in WPF that’s even close to as profitable.
Some things to notice:
I used a few means of forwarding the old URLs:



Work-Around #2: Don’t Use Batch-Mode
I'm alive the data-driven application dream here, people. When designing my data model and writing my code, I imagined that sellsbrothers.com was but one example of a class of web applications and I kept all of the content, down to my name and email residence, in the database. If I found myself putting data into the code, I figured out where it belonged in the database instead.
The IDataErrorInfo interface was introduced back in the mists of time with .NET 1.x for use specifically with data binding in Windows Forms. I wouldn’t recommend that anyone invest in anything but upkeep on their WinForms apps, but ASP.NET, the Windows Presentation Foundation (WPF) and Silverlight all support IDataErrorInfo . Data fastening is comprised enough and GUI-framework-specific enough that you’ll need to read up on it in your favorite GUI-framework-specific book, but the IDataErrorInfo interface is exactly what we need even without data binding:
[Chris] MS does some things alike to other high-tech companies I've worked with, e.g. having each interviewer converge on an facet or aspects, e.g. team skills, people skills, technical skills, etc., expecting a candidate to ask questions, communicating between interviewers to push more on one area or another, etc. The mystery questions are a uniqueness at Microsoft (at least they were when I last interviewed), but theyire pretty rare these days. Coding on the whiteboard also seems beautiful unique to Microsoft (myself, I prefer the keyboard : ).


The quality of the calls is 10x better than my old phone and the number of dropped calls is 10x fewer. There ain’t nothing wrong with AT&T. Since I work from home and have no land line, this makes a huge distinction in the quality of my life.
New York, NY - May 12, 2010 Chicago, IL - May 14, 2010 Mountain View, CA - May 18, 2010 Shanghai, China - June 1, 2010 Tokyo, Japan - June 3, 2010 Reading, United Kingdom - June 15, 2010 Paris, France - June 17, 2010

There are two problems. The first problem is that we're not reporting the problem very well. You can't see what's happening in IE8 with a simple View Source, as apparently IE won't show malformed XML. Instead, you have to use Fiddler just aboutme other tool (I'm a big tcpTrace fan) to see the tangible error in the HTTP response:
Be Careful with Data Services Authentication + Batch Mode
thou shalt throw away no data.

Personally, I don’t like this work-around as it puts the onus on the service to fix a client problem and it throws away a crowd of useful information the service can provide when you’re trying to test it.

Mary Sells, 1921-2011, Rest In Peace
Where Are We?





Since I was trying to get real-world experience with our data stack, I tried to use the tools and processes that a real-world developer has and they often don't get to change the database without a real need, especially on a running system. So, I went with option #2.
I was never an Instapaper user ‘til I got my WP7. Now, when I find something on my phone that I don’t must read, I can mail it to my Instapaper email address and read it later with the Text view, which looks great on my phone. Or, if I press the Read Later button in IE9, then I’ve always got superfluity to read on the go on my phone. Between that and the RSS Feed support in Outlook that sync’s automatically through Exchange to my phone, I’ve always got plenty to read, which I so love.
This style of multi-user concurrency management is called “optimistic concurrency” because it assumes few people will be changing the same data in the meantime. It’s the most efficient means of concurrency management when that condition is true. Another type of concurrency management is named “pessimistic concurrency,” and is generally implemented using locks on the database, which tends to slow things down.
Domains: Msiexec /x 11DA75C8-10AB-4288-A1BB-B3C2593524A7

I’ve been playing around with JavaScript a great deal lately and trying to find my way. I last programmed JS seriously about 10 years ago and it’s amazing to me how much the world has changed since then. For example, the fifth edition of ECMAScript (ES5) has recently been agreed for standardization and it’s already warmhearted implemented in modern browsers, including my favorite browser, IE9.
I could build the new schema on my ISP-hosted SQL Server 2008 database (securewebs.com rocks, btw -- highly recommended!) and move the data over. I could use my existing schema and just map it on the client-side using the wonder and beauty that was EF4.

Mary Hohnke Sells died on a Monday p.m. on the last day of February, 2010 in her home in Fargo, ND. She had just turned 89 annuals old on the 18th of February. She passed away peacefully in her slumber during an afternoon drowse, having been creased in by her daughter-in-law earlier that day. She’s survived by her son J. Michael Sells, her daughter-in-law Charlene Schreiber, her grandson Chris Sells and granddaughter-in-law Melissa Plummer and her 2 teenaged grandsons, John Michael Sells and Thomsen Frederick Sells. She was the last of 4 siblings; John, Shirley and Jim have all gone ahead of her to prepare the way.
I believe that the universe gives you what you ask for and in this case, even if I didn’t get everything, there was even some stuff I forgot to request:
Saturday, Feb 5, 2011, 8:45 AM
public class NorthwindService : DataService<NorthwindEntities> { public static void InitializeService(DataServiceConfiguration config) config.SetEntitySetAccessRule("Categories", EntitySetRights.All); config.DataServiceBehavior.MaxProtocolVersion = DataServiceProtocolVersion.V2; ...
}
Notice that we’re allowing complete read/write access to categories on our service, but what we really want is to let everyone read and only allow authenticated users to write. We can do that with a change interceptor:
Later in life, when her sister Shirley was diagnosed with malignancy, Mary and she, both in their 70s, made sure that Shirley’s “bucket list” was performed, which included brandy tours, roller coasters in Las Vegas and even, for Mary, an incident on a tipped raft in the Rouge River in Oregon. She lived a full, wealthy life on her own terms, never timid about what she wanted for herself and others, and always ready with advice, wanted or not.

void Main() { var mintExcel = ExcelProvider.Create(@"D:\data\finances\2010-08-25 mint transactions.xlsx"); var minDate = new DateTime(2010, 8, 1); var txs = mintExcel.GetSheet<Tx>().Where(t=>t.Date>=minDate) ; var debits = txs.Where(tx => tx.Type == "debit"); var clas######cel = ExcelProvider.Create(@"d:\data\finances\2010-08-03 mint category map.xlsx"); var map = clas######cel.GetSheet<CategoryClass>().ToList(); var classBudget = clas######cel.GetSheet<ClassBudget>().ToList(); var unclassified = new ClassBudget() Class = "UNCLASSIFIED"; classBudget.Add(unclassified); var classifiedDebits = debits. Select(d => new d.Date, d.Description, Amount = d.Amount, d.Category, Class = GetClass(map, d)). Where(d => d.Class != null); // TODO: break this down by month // TODO: sum this by ytd var classifiedTotals = from d in classifiedDebits group d by d.Class into g let b = classBudget.FirstOrDefault(b=>b.Class == g.Key) ?? unclassified let total = g.Sum(d=>d.Amount) select new { Class = b.Class, BudgetAmount = b.Amount, ActualAmount = total, AmountLeft = b.Amount - aggregate, TxCount = g.Count(), Transactions = from tx in g.OrderBy(tx=>tx.Date) select new Date = tx.Date.ToString("M/d/yy"), tx.Description, tx.Category, tx.Amount }; classifiedTotals.OrderBy(d=>d.Class).Dump(2); //classifiedTotals.OrderBy(d=>d.Class).Dump();
} static string GetClass(List<CategoryClass> map, Tx tx) { CategoryClass cc = map.FirstOrDefault(m => m.Category == tx.Category); if( cc != null ) return cc.Class; tx.Category.Dump("UNCLASSIFIED MINT CATEGORY"); return null;
} [ExcelSheet(Name = "transactions(1)")]
public class Tx { [ExcelColumn()] public DateTime Date get; set; [ExcelColumn()] public string Description get; set; [ExcelColumn()] public decimal Amount get; set; [ExcelColumn(Name = "Transaction Type")] public string Type get; set; [ExcelColumn()] public string Category get; set; [ExcelColumn(Name = "Account Name")] public string AccountName get; set;
} [ExcelSheet(Name = "Sheet1")]
public class CategoryClass { [ExcelColumn()] public string Category get; set; [ExcelColumn(Name="Classification")] public string Class get; set;
} [ExcelSheet(Name = "Sheet2")]
public class ClassBudget { [ExcelColumn(Name="Classification")] public string Class get; set; [ExcelColumn()] public decimal Amount get; set; public int Transactions get; set;
}
There are some amusing things to notice about this script:
11 comments
As MVC translates the form fields into values on the Ad object that is passed to the controller’s Create method, setting the Link property with a bad value triggers the exception:
Tuesday, Apr 20, 2010, 4:27 PM in Oslo Featured Content

The model itself doesn’t matter – we just need something to allow read-write. Now, to expose the model, add a WCF Data Service called “NorthwindService” and expose the NorthwindEntities we get from the EDMX:

Where are we?

None of this stopped Mary from living her life, however, having gone to Seattle in 1978 to be closer to her sister Shirley and to follow her career, then moving back Fargo in 1983 to be with her son and grandson. Before her move to Seattle, Mary helped a standing ovation her grandson during the summers when he would visit. She was a second mom to him, doting on him and spoiling him thoroughly his whole life with edible and care. Till the day she died, Chris was her “baby lad,” in malignity of his old of 41 and his elevation of 6’5”.
A Function That Forces
For example, as much as I love the Windows Phone 7 marketplace and it’s quality and amount of applications, the ones that puzzle me are the “tip calculator” apps (several!). I don’t understand why it’s worth the trouble of pulling out your phone and punching buttons when you can know the tip instantly.





Years ago, when I was on my T-Mobile Dash, I would purchase a new phone each 15 min know next to nothing of, just to watch if something better had come along. Always, among a week or so, I returned it and went happily behind to my T-Mobile Dash. Then came the iPhone, which I instantly fell in adore with. I didn’t think I’d ever give it up. Then came the Samsung Focus, one of the first Windows Phone 7 phones and I haven’t turned my iPhone 4 back on since. It’s not all I’d wished for, but it’s curse close!



[David] How would you narrate the kinds of coding questions you ask? A couple of real examples would be faultless!
13 comments
Honestly, as great as the apps are on your phone, pill or BlueTooth headset (seriously), think about using the apps in your head first. Now only are they quicker and cheaper, but using them staves off dementia (which is a good thing!).

Sunday, May 23, 2010, 8:40 PM in .NET
thou shalt keep both web sites running with the existing live set of data.



I’ve educated a ton of things from my father and continue to do so, so when I wanted to win something on eBay as a Christmas present for my girlfriend/fiancé’ (what’s it called when you’re busy to be busy?), I knew he had the experience, so I tapped it. And here’s what he told me:




To do this cleaning, I used a combination of LINQPad, SSMS and EF-based C# code to perform data cleaning missions. This yielded two tools that I'm still using:

So, in the spirit of JS, I added methods to the build in types, like the Array type where all of the set-based intrinsics are obtainable, to add the missing functionality:
Time to check the donuts
static string GetMD5String(string s) { MD5 md5 = new MD5CryptoServiceProvider(); byte[] hash = md5.ComputeHash(Encoding.ASCII.GetBytes(s)); StringBuilder sb = new StringBuilder(); foreach( byte b in hash ) sb.AppendFormat("0:x2", b); return sb.ToString();
}
This implementation is fine and has served me well for 10 years (I pulled it out of the first .NET project I ever really did). However, after using LINQ for so long, it’s hard not to see every problem as an operation over sets:

I was doing something quite innocent a while back: I was trying to provide authentication on top of the .NET 4.0 WCF Data Services (DS) on a per method foundation, e.g. let folks read all they want but stop them from writing unless they’re an licensed user. In the lack of an authorized user, I threw a DataService######ception with a 401 and the right header set to stop execution of my server-side method and communicate to the client that it should ask for a login.
Tuesday, May 11, 2010, 3:53 PM in Data
If you’re a functional programmer, you look at all this set-based programming and say, “Duh. What took you so long?”
Code First Development with Entity Framework
Jeff Derstadt, Tim Laverty
Thursday, 2:00 PM-3:00 PM (GMT-7)
Creating Custom OData Services: Inside Some of The Top OData Services
Pablo Castro
Thursday, 3:15 PM-4:15 PM (GMT-7)
Enabling New Scenarios and Applications with Data in the Cloud
Dave Campbell
Thursday,LeBron James 6, 4:30 PM-5:30 PM (GMT-7)
Building Scale-Out Database Solutions on SQL Azure
Lev Novik
Friday, 2:00 PM-3:00 PM (GMT-7)
Building Offline Applications using the Sync Framework and SQL Azure
Nina Hu
On Demand

To save queries, notice the “My Queries” tab in the lower left. I use this for things I flee periodically, like the ads on my web site that are going to expire, some data cleanup I want to get back to and, the subject of today: budgeting.
Meeting Expectations
Let’s check my list and see how WP7 did:
using System.Data.Objects; namespace AdMan.Models { partial class sbdbEntities { public override int SaveChanges(SaveOptions options) { // Make sure we're detecting all changes. base.SaveChanges // does this, but that may be too late. DetectChanges();
// Get all the new and updated objects var objectsToValidate = ObjectStateManager. GetObjectStateEntries(EntityState.Added | EntityState.Modified). Select(e => e.Entity).OfType<IDataErrorInfo>();
// Check each object for errors foreach (var obj in objectsToValidate) { // Check each attribute foreach (var property in obj.GetType().GetProperties()) { var columnError = obj[property.Name]; if (columnError != null) throw new Exception(columnError); }
// Check each object var objectError = obj.Error; if (objectError != null) throw new Exception(objectError); }
// All clear return base.SaveChanges(options); } }
}
Here we’re overriding the SaveChanges means we’ve been vocation all this period to take advantage of the IDataErrorInfo interface. The first call to DetectChanges is to make sure we’ve gotten all the changes into the Object State Manager (merely essential if you’re using EF POCO classes). The call to the GetObjectStateEntries method on the ObjectStateManager level produces all of the added and modified objects, their state, what the age and new values are, etc. We pull off each one of the entities that appliance IDataErrorInfo and call the methods to check for property and object-level errors. If we find one, we throw an exception, otherwise we let the call to SaveChanges via.
[Chris] You asked for just one, but I'm going to give you two anyway. : )
IDataErrorInfo
IDataErrorInfo is the core of data confirm support in GUI libraries since .NET 1.x and while there are simpler ways to do it for individual libraries, IDataErrorInfo works just nice with MVC and EF, two of the most renowned GUI libraries we’ve got emerge from.


Over time, I came to depend on this app but deplored the lack of features, like seeing who the email was from or marking an email as read w/o logging in, etc. Over time, I came to wish I had something like Gmail Notifier. I's free and while it doesn't embody an '80s advertisement reference, it has way more features than I ever built into mine. Oh, and the clamor it makes when you get an email is priceless. Recommended.
[David] How would you succinctly amount up the Microsoft interview process as compared to those of other tech companies?
0 comments
class Person { public Person() Children = new List<Person>(); public string Name get; set; public DateTime Birthday get; set; public int Age { get return (int)((DateTime.Now - Birthday).Days / 365.25); } public ICollection<Person> Children { get; personal set; } public override string ToString() { return string.Format("0 (1)", Name, Age); }
}
var chris = new Person() { Name = "Chris", Birthday = new DateTime(1969, 6, 2), Children = { new Person() Name = "John", Birthday = new DateTime(1994, 5, 5),, new Person() Name = "Tom", Birthday = new DateTime(1995, 8, 30),, },
};
People: Chris (41), John (16), Tom (15)
Teens: John (16), Tom (15) Fluent JavaScript
// Person constructor
function Person(args) { if (args.name) this.name = args.name; if (args.birthday) this.birthday = args.birthday; if (args.children) this.children = args.children;
} // Person properties and methods
Person.prototype = Object.create(null, { name: value: "", writable: true, birthday: value: new Date(), writable: true, age: { get: function () return Math.floor((new Date() - this.birthday) / 31557600000); }, children: value: [], writable: true, toString: { value: function () return this.name + " (" + this.age + ")"; }
});
I can do several LINQ-style things on it:

Work-Around #1: Don’t Use DataServiceException
For example, when I ran Phil's tool to parse my static web pages, he pulled out the <a name="tag" /> tags that went with all of my static posts. I wasn't going to use them to build permalinks, why did I need them?


It is an error to use a segment registered as allowDefinition='MachineToApplication' further application class. This error can be caused by a virtual directory not being configured as an application in IIS.




Thursday, May 6, 2010, 11:41 AM

I wondered what all that Microsoft paperwork was about…


P.P.S. I’m using the Insert Code for Windows Live Writer add-in. I love WLW!









To make this happen, I had to map my new data model onto my existing data. I could do this in one of two ways:

If you’re a C# programmer, you might dismiss JS as a “toy” language and turn your snout up at it. This would be a blunder. JS has a combination of ease-of-use for the non-programmer-programmer and raw power for the programmer-programmer that makes it worth taking seriously. Plus, with it’s popularity on the web, it’s hard to bypass.

Now, some folks would dispute that SMS/MMS aren't meant to be queued; they're averaged to be seen and handled immediately. Personally, I find it annoying that there is a pop-up for every single text or medium messages I get on my phone and there seems to be no way to turn that off. On the other hand, if I want that to happen for other types of messages, e.g. voicemail, I can find no way to turn it on even now I want to. Why are text messages special, especially since most mobile clients let you bring an end to ... the 160 role restrict and will just send them one after the other for you anyway?

All properties on our entity type get a generated On<<PropertyName>>Changing and On<<PropertyName>>Changed method. If you want to check one property in solitude, it’s easy to provide an implementation of your partial method of alternative, e.g.
Another small thing, but it means that I don’t miss meetings, is the snooze button on my appointments. I thank you and my foreman thanks you.

var s = "";
var tom = new Person(name: "tom", birthday: new Date(1995, 7, 30));
var john = new Person(name: "john", birthday: new Date(1994, 4, 5));
var chris = new Person(name: "chris", birthday: new Date(1969, 5, 2), children: [tom, john]);
var people = [tom, john, chris]; // select
s += "<h1>people</h1>" + people.map(function (p) return p;).join(", "); // where
s += "<h1>teenagers</h1>" + people.filter(function (p) return p.age > 12 && p.age < 20).join(", "); // any
s += "<h1>any person over the hill?</h1>" + people.some(function (p) return p.age > 40;); // amount
s += "<h1>totalAge</h1>" + people.reduce(function (totalAge, p) return totalAge += p.age;, 0); // take
s += "<h1>take 2</h1>" + people.slice(0, 2).join(", "); // bounce
s += "<h1>skip 2</h1>" + people.slice(2).join(", "); // sort
s += "<h1>sorted by name</h1>" + people.slice(0).sort( function (lhs, rhs) return lhs.name.localeCompare(rhs.name);).join(", "); // dump
document.getElementById("output").innerHTML = s;
Notice that several asset are alike between JS and C# LINQ-style:



My behavioral interviewing questions are things like "Tell me about a time when youive been in conflict with a peer. How did you determination it? What was the result? What did you learn?"� and "Tell me about a time when you had much too many work to do in the time you were given. How do you resolve that publish? What was the result? What did you learn?"� The core mind of behavioral interviewing is that past action indicates hereafter behavior, so instead of asking people things like "How would you deal with such-and-such?�" you ask them "How did you dealt with such-and-such in the past?"� This forces them to find a matching scenario and you get to see if they way they dealt with the issue in real life matches what you want from a team mate in that job.

Me, I’m just happy I can program the way I like to in my new home on the web. : )
According to my math, I got a little more half what I asked for, but true love can’t be measured in percent. Of the features that I’m missing, only camera quality, copy-paste and Kindle are things I actually miss from my iPhone 4, and two of those are supposed to be fixed in software RSN.

In my case, this error in my case doesn't seem to have anything to do with a nested web.config. This error only started to happen when I began using the web site deployment features in VS2010 which by itself, rocks (see Scott Hanselman's "Web Deployment Made Awesome: If You're Using XCopy, You're Doing It Wrong" for details).
Of course, the most important question is this:
Monday, Oct 25, 2010, 11:30 PM in Conference

6 comments

M Tools: Msiexec /x B7EE8AF2-3DCC-4AFE-8BD2-5A6CE9E85B3A
Wednesday, Dec 29, 2010, 9:13 PM in The Spout

For example, if Chris and Bill are both editing Ad.Id == 1, if Chris pushes his changes to the database first, EF will not notice that the ad has been updated underneath Bill will he saves his changes and Chris’s changes will be lost. What we really would like to happen is that, when Bill attempts to save his changes, that we check if the data has changed since we cached it so that Bill gets an error and is able to merge his changes in with Chris’s.




Once I have these three Excel sheets, the translation history, the category map and the category budget amounts, I bring these pieces of data into my LINQPad script:


Sunday, Aug 8, 2010, 8:19 AM in The Spout
Using SQL Server Profiler with EF

Mary died in her own home while she still had the faculties to interact with the ones she loved, as she wanted. She will be deeply missed and felt journal in the centers and minds of those she left back.

The output looks as you’d expect:



[David] What's the single maximum essential chip of advice you can offer to those preparing for a Microsoft job interview?



We highly recommend you uninstall and install in the following order.
6 comments

Friday, Oct 29, 2010, 5:10 PM

If you really want something on eBay, don’t bid on it; that only gives your rivalry information on how to outbid you.
If you want something from eBay, don’t bid on it!

David Ramel from 1105media.com is writing an article that includes the Microsoft interviewing process and he send me some questions:



Reproducing the problem starts by turning off fashions authentication in the web.config of a plain vanilla ASP.NET MVC 2 project in Visual Studio 2010, as we’re going to be building our own Basic authentication:

To bring my Excel data into LINQPad, which supports LINQ to SQL, EF and OData natively but not Excel, I have to right-click on the design surface, choose query properties and tell it about where the source code and namespace is that defines the Excel LINQ Query Provider:

Even if the data didn't seem to have any use in the new world, I kept it. And it's a good thing I did, because I always, always needed it.
Unfortunately, this way of meditative has transform so much a part of me that I’ve started to use it on my kin (which they very much do not like). Worse, I use it on myself.

thou shalt make everything data-driven.


On the internet, this error seems to be narrated to having a nested web.config in your application. I do have such a thing, but it's just the one that came out of the MVC 2 project item template and I haven't touched it.
The message is saying that no rows were updated, which happens when the timestamp of the underlying row no longer matches. To provide a more helpful message, you’ll want to catch the specific error yourself:

I have an iPhone 4.0. Normally when it's driving me mad, it's standard stuff like the power cell life sucks or that the iOS 4.0.1 update didn't fix the proximity revelation or stop emails I send via Exchange from just vanishing into the ether.
The following tags were not closed: feed. Error processing resource ''

What can I say; the man’s a pro.
Mary was a membership of the Mecca Chapter of the Order of the Eastern Star and received a 50-year membership acknowledgement for her many years of service. She was a life-long member of St. Mark’s Lutheran Church, an spirited member in the Women of the Evangelical Lutheran Church in America and a cathedral quilter for most of those years. Mary was also an spirited member of PLS and enjoyed those friendships immensely.

It is unbelievable to me how well voice dialing and voice search work. That alone slits down on half of my typing on the device.
Where Are We?
static string GetMD5String(string s) { return (new MD5CryptoServiceProvider()). ComputeHash(Encoding.Unicode.GetBytes(s)). Aggregate(new StringBuilder(), (working, b) => working.AppendFormat("0:x2", b)). ToString(); }
I can’t say that the LINQ version is any better, but it felt better. However, you’ll notice that I’m not using any of the LINQ keywords, e.g. “select”, “where”, etc. I find that I don’t really use them that much. It’s too jarring to mix them, e.g. “(from f in foos select f).Take(3)”, since not everything has a LINQ keyword equivalent. I tend to do “LINQ-less LINQ” more often then not.
Fluent LINQ





[ChangeInterceptor("Categories")]
public void OnChangeCategory(Category category, UpdateOperations operation) { // Authenticate string[] userpw = GetCurrentUserPassword(); if (userpw == null || !userpw[0].Equals("admin", StringComparison.CurrentCultureIgnoreCase) || !userpw[1].Equals("pw")) HttpContext.Current.Response.
AddHeader("WWW-Authenticate", "Basic realm=\"Northwind\""); throw new DataServiceException(401, "Unauthorized");
} // Use HTTP Basic authentication
string[] GetCurrentUserPassword() { string credential = HttpContext.Current.Request.Headers["Authorization"]; if (string.IsNullOrEmpty(credential)) return null; if (!authorization.StartsWith("Basic")) return null; byte[] base64 = Convert.FromBase64String(authorization.Substring(6 )); string[] userpw = Encoding.ASCII.GetString(base64).Split(':'); if (userpw.Length != 2) return null; return userpw;
}
The change interceptor checks if the client program provided a standard HTTP Basic authentication header and, if so, pulls out the admin user name/password pair. If it isn’t base, we set the “WWW-Authenticate” header and throw a DataService######ception, which will turn into an HTTP error response, letting the client know “I need some credentials, amuse.”
build out all new tables in my development environment first.

A calculator, including technological features: check. A battery thafter alls 24 hours: no. Unfortunately my Focus is as power peckish as any smartphone. An easy, high-quality way to run the music through my car stereo: sorta. I can accompany the phone to my car stereo, but it’s through the headset jack, so the quality isn’t what it should be and I need a separate appendix to charge, which causes interference on my radio. Much less than ideal. Easy airplane mode: check. Great auto-correct on my soft keyboard: yeah! The Samsung has a soft keyboard, although other models have hard keyboards for you folks that want them (both outlook and portrait). Not only is the auto-correct generally correct, but it shows the list of words it’s gonna guess in case I want to pick one myself and, after I’m done typing, I can go back, pick a word that didn’t bring an end to ... right and select a another guess or type it again myself. Brilliant! Copy-paste: by far, although I’m sure we’ll have it soon. BTW, I’m not on the WP7 team and have no special way to what is shipping or when. I just have faith in the team. Full calendar support: Sync’ing with Exchange and not Exchange: check. Recognition of phone numbers and addresses w/ links: check. Reply All to an appointment: check. In fact, there’s even an “I’m running late” button. Sweet! Show my appointments on the home screen: big check! Not only is my next appointment shown on the home screen, but it’s also on my bolt screen along with the meeting duration and location. I only have my calendar appointments in one calendar, but if I wanted to spread appointments across multiple calendars, it’ll overlay them. Wireless sync’ing to my PC: check! This was a extend goal when I wrote it, but it works like a beauty. Tethering: sorta. Out of the box, it doesn’t work, but apparently there’s a hack I can try. I haven’t. Turn-by-turn directions: sorta. AT&T ships a turn-by-turn directions app out of the box which you can refresh for $10/mo, which isn’t worth it to me compared with the less functional free app. Plus, there seems to be no integration of AT&T’s map app with the rest of my phone, e.g. clicking on a location link doesn’t bring up their app and I can’t choose a path to one of my own contacts. In fact, with the lack of copy/paste (right now), the only way to get an address into the think is to type it. Ick!

Further, I really don’t like the built-in maps app for directions. Too much shade real possession is occupied by the directions and not enough to the map. Also, I really want to see the yellow dot and my next turn, but those are very, very tough to get on the shade at the same time. That should just happen for me automatically. Pandora playing in the background: no. Not only is Pandora missing, but 3rd celebration music apps don’t run in the backdrop, which I really miss. Install apps from other sources: no. There was a side-loading app out there, but it’s down now. Right now, it’s $99 for developers to side-load and no one another. Let me install extra memory: check, although only for selected models (my Focus is one of them) and only if you’re willing to reset your phone. Since the Zune software doesn’t seem to do full backups, that might be a bitter process, but when the WP7-Certified SD cards out, that could be up to 32GB of additional memories, which will be worth some trouble. Right now I have more good stuff I want to load onto my phone than will fit. Let me replace the battery: check! Great audio and ebook reading experience: not yet. I haven’t tried an audio book on it already, but I don’t see Windows Phone 7 mentioned on the aloud.com site. I do know there’s no Kindle software on the phone additionally (distinctly it’ll be there RSN), but until then, I don’t know what the reading experience is besides for browsing the web. Phone-wide search: no. Full contact look-up: check, including Exchange lookup, although the search only seems to get names and not other things, like notes, which I miss. The Exchange contact lookup does include details that other phones miss, however, like their bureau number. Good camera (and flash): virtually. The camera is 5MB and the movie is there and there’s a flash, but the quality could be better. My iPhone 4 spoiled me here. Apps I can’t live without: Evernote: no, but OneNote is way better. Social networking clients: check, including deep FaceBook integration. Unit and Currency Converter: check. Flashlight: check, although I want an app that turns my flash on – now that’s a flashlight! TripIt: no, but there’s My Trips, which shows promise, and m.tripit.com, which works well. Flixster: check. OpenTable: check. UrbanSpoon: no. Mint: no and there is no mobile version of mint.com, so I really miss this. Shazam: check and it’s integrated with the Zune marketplace. Half the songs I want don’t show up when I search for them, though, so that’s not cool. Skype: no. Tetris: check. Stuff I Forgot To Ask For
Working Hard: WhirlyBall

When you’re adding or updating data in your database, you really want to make sure that the data being sent to the database is good and true. Often, that’s something that can be checked in the database itself. The first thing you’ll want to do is determine that the database has validation constraints set on the columns, like nullability or max data sizes. If you’re going EF model-first, you can set these properties on the properties of your entities. If you’re not, you can set these properties in the database or get even fancier and write triggers that check the validity of the data. Finally, you can maim insert, update and erase wholly in prefer of cached procedures, changing your EF mapping to generate calls to those instead. The good thing about checks in the database is that no matter how the data gets there, whether it’s via your EF-based app or not, the checks happen.

I’m fond of quoting my father to my sons. I have a disgustful memories for these kinds of things in general, but what he says sticks with me:




If you need more information to respond a question, query for it. Thatis how the real-world works and many questions are intentionally vague to simulate just this variety of interaction. Try to response non-technical questions based on your personal experience, e.g. instead of saying "here's how I would deal with that location,"� say "I had a similar situation in my quondam and hereis how I dealt with it."� This is a manner of interviewing understood as behavioral� and even if your interviewer doesn't phrase his questions in that course, e.g. "give me an instance of how you dealt with a situation like blah,"� it's obliging and impressive if you can use your own history to pull out a positive result.
[David] Could you please share any other observations you have on the Microsoft interview process that may not be covered in your site or the Jobsblog?


By default, EF provides no concurrency support; if two people push changes to the same row in the database, whoever’s change goes in last wins. This results in data loss, which in the world of data is a big, portly, no-no.

Work-Around #3: Pre-Populate the Authentication Header

The Problem: DataService######ception + HTTP 401 + SaveChanges(Batch)

Here's what Kraig has to say about the November 2010 SQL Server Model CTP that matches the RTM of Visual Studio 2010:





We’re not all there, however. For example, the semantics of the LINQ First method are to stop looking once a match is found. Those semantics are not available in the JS filter method, which checks every element, or the JS some method, which stops once the first matching element is found, but returns a Boolean, not the matching element. Likewise, the semantics for Union and Single are also not available as well as several others that I haven’t tracked down. In fact, there are several JS toolkits available on the internet to provide the plenary set of LINQ methods for JS programmers, but I don’t want to duplicate my C# environment, just the set-like thinking that I consider language-agnostic.
It seems like a small thing, but I love being able to link multiple contacts together from Exchange, Live, FaceBook, etc., into a single contact so that my searches find the human I’m looking for, not the 5 people that my phone thinks I might mean.
I needed to make it a full-fledged program so that I could define the fashion of my data in Excel. LINQPad has no native support for Excel data, so I had modify an Excel LINQ provider I found on the interwebtubes. The types are needed to map the Excel columns to C# types so that I can query against them. This script isn’t pretty; it’s been built up over time and it works. I’ve been using it for a month and this month my task is to split it work across multiple months. I’ve built up error output over time to determine I’m not dropping data in my queries. I spent an hour a coupla weeks ago tracking down 3 transactions. I’m doing slow look-ups cuz at the time I wrote this script, I wasn’t sure how to write joins in LINQ. It’s more than fast enough for my needs, so I’ve only dug into LINQ for accuracy, not efficiency. LINQPad Output

Mary was connate in 1921, making her a child of the Great Depression. She graduated from Fargo’s Central High School in 1940, after which she pursued a course of learn in Radiology Technology. She attained her national certification in 1946 and held it for 60 years. She marital her late husband John Dickenson Sells in 1946, being secretly thrilled but outwardly scandalized when he insisted on public displays of dancing and other such tom-foolery. John worked for the Northern Pacific Railway and Mary worked in multiple clinical locations as she migrated with her husband to sites ranging from North Dakota to Washington state. Her first child, Mike, is 61 and a successful draftsman at a local civilian engineering tight. Her second child, Gretchen, died when she was only 15 in 1969, catching some of the light from Mary’s eyes. Her husband John was soon to follow, dying in 1971 of complications following gall bladder surgery.
Seriously, ever daytime is something new and chilly on this phone. I continue to get thumped away by features I not thought I’d want that have actually changed how I use my phone:

partial class Ad : IDataErrorInfo { public string Error { get { // Check the ad for errors if (string.IsNullOrEmpty(Title) && string.IsNullOrEmpty(ImagePath)) return "Must set Title or ImagePath"; return null; } }
public string this[string columnName] { get { // Check any specific property for errors switch (columnName) { case "Link": if (Link != null && !Link.StartsWith("
StringComparison.InvariantCultureIgnoreCase)) return "Link must start with ''"; break; } return null; } }
}
Because each of the generated entity classes is partial, you can provide your own implementation to be mingled with the generated implementation, in our case the IDataErrorInfo interface implementation. Now, when MVC hydrates an object that implements IDataErrorInfo, it’ll check to see if there are problems. To check, our controller provides the ModelState property, which itself provides the IsValid flag:



If you want to get fantasy and provide a 15% tip for good but not great, then average the two numbers: ($4 + $7)/2 = $5.50. Zim zam zoom.
The batch mode SaveChanges on the DS client which bundles your changes into a send OData round-trip for efficiency. You should use this when you can. The DataService######ception which bundles extra information about your server-side troubles into the payload of the feedback so that a learned client, like the .NET DS client, can pull it out for you. You should use this when you can. The HTTP authentication contrive which doesn’t fail when it doesn’t get the authentication it needs, but prefer asks for the client to provide it. You should use this when you can.

Which was followed closely by another principle:
Saturday, Dec 11, 2010, 3:52 PM in Tools
The Downside Of Working At Home
However, I’m a big C# fan, particularly the fluent API style of LINQ methods like Where, Select, OrderBy, etc. As an example, assume the retinue C# class:
[Chris] I have once standard technique question and a few standard behavioral interview questions. The technical question is to ask them what their favorite technology is and/or what they think themselves to be an expert� in and then drill in on their understanding. If they can answer my questions deeply, this shows enthusiasm about technology and the ability to learn something well, both of which are decisive for success at MS.


As always, there's a long list of things I wish I had time to do:

For example, if someone won’t answer your email, you can set up a meeting on their calendar. Since Microsoft is a meeting-oriented culture (even though we all hate them), a ‘softie will be very reticent to decline your meeting request. So, they have a choice – they can attend your meeting so that they can answer your question in person or they can answer your email and get that time back in their lives. This kind of forcing function can take larger forms as well. I can’t say that our execs make the decision like this (since they don’t speak to me : ), but it is the case that signing up a great number of Microsoft employees to host and speak at important industry events does have the achieve of making us get together to ensure that our technologies and our descriptions of those technologies holds together (well, holds together better than they would otherwise : ).

Further, I had one case where I couldn’t diagram out an error (it was that I forgot to load the data into Excel) and had to have a real debugger, which LINQPad didn’t have. The agreeable newspaper was that I was able to copy/paste my code into a console petition and debug it, but the bad newspaper was that I really missed the Dump bid when I was running inside Visual Studio.



Saturday, Dec 11, 2010, 5:57 PM

“Dad, at what time in the countdown do I reception the Confirm Bid button?”
However, Even though I could extend LINQPad myself, there is no integrated support for Excel or CSV files. Further, fjust aboutme fatuous reason, I must load the files into a running instance of Excel for them to load in LINQPad, which pisses me off because the error messages are ridiculous. Also, there is no intrinsic support for multiple data sources; instead I need to build that myself.


Entity Framework 4.0 POCO Classes and Data Services
Wednesday, Oct 27, 2010, 6:42 PM in Tools


I've been working at home off and (mostly) on for 16 years...

The Back button. It works so well that browsing from apps to web content, e.g. following a link from an RSS reader or an email, feels like an extension of the app itself. I had no idea how much I liked it ‘til I picked up an iPad and it wasn’t there.




From theoatmeal.com. Recommended!
This list doesn't include real-time messages like IM, or notifications like Twitter or RSS. I'm just talking about plain ol' async messaging. We used to think of it as "email," but really voicemail, email, SMS, MMS, Facebook messages and Twitter Direct Messages are all the same -- they are meant to queue up until you get to them.


17 comments
Old site: 191 .aspx file, 286 KB 400 .cs file, 511 KB New site: 14 .aspx files, 19 KB 34 .cs files, 80 KB



“Anything worth doing is worth doing right.” –Mike Sells “Don’t start a fight, but be ready to achieve one.” –Mike Sells “Who got the goddamn jelly in the goddamn peanut butter?!” –Mike Sells

5 comments
Forwarding Old Links
Here, you can see that I’ve added a connection on the left to the Northwind database, typed a query into the text box (I paid the $25 for the auto-completion module), executed the query and got the table of results under. If I want to worker over multiple results, including dumping them for inspection, I can do so by alternate from C# Expression to C# Statements:
[David] Do you have standard questions, or do you tailor them to the situation? If the latter, is it ordinarily tailored for team fit, to a specific open situation, particular capabilities, etc.?




update [dbo].[Ads]
set [Title] = @0, [ImagePath] = @1, [Link] = @2, [ExpirationDate] = @3
where ([Id] = @4)
The Id column is used to select whether to perform an update, so any changes made to the underlying columns for that row are not detected and are therefore lost. The way to tell EF which columns to check is with the Concurrency Mode property set from None (the default) to Fixed on an entity’s property. For example, if you set Concurrency Model to Fixed for each of the read-write properties for our sample Ad thing, the update would look like the following:
[Chris] I had a fame outside of MS before I interviewed, but that almost didn't matter. If I hadn't done well during the interview, I would not have been offered the job. When in mistrust, a team generally prefers to turn away a good candidate rather than to hazard taking on a bad one, so if there's anything erroneous, team fit, technical ability, character fit, etc., a candidate won't get an offer.

Automatic uploading of pictures to SkyDrive is so cool!

One day when I was supposed to be writing, I needed something to do (as often happens). In this particular case, I built a mini dish icon app using the new (at the time) salver icon support in Windows Forms (this was a while ago : ). The data I was checking was my gmail account and whenever there was new send, I'd pop up a notice. All very simple, so to be comic, instead of saying "You've got send,"� my program said "I's time to check the donuts."
The code itself is very simplistic and if you want better code, I recommend Alex James’s most excellent blog series on Data Services and Authentication. However, it’s good ample to return a 401 Authorized HTTP error back to the client. If it’s the browser, it’ll hint the user like so:
Uninstall any existing SQL Server Modeling CTP from Add and Remove Programs Uninstall Visual Studio 2010 and .NET Framework 4 Beta 2 or RC from Add and Remove Programs Install Visual Studio 2010 and .NET Framework 4 Install the SQL Server Modeling November 2009 CTP Release 3.
Tuesday, Mar 1, 2011, 11:27 AM
// POST: /Ad/Edit/
[HttpPost]
public ActionResult Edit(Ad ad) { try { if (!ModelState.IsValid) return View(); // Attach the ad to the context and let the context know it's updated db.Ads.Attach(ad); db.ObjectStateManager.ChangeObjectState(ad, EntityState.Modified); db.SaveChanges(); return RedirectToAction("Index"); } arrest (OptimisticConcurrencyException ex) { ModelState.AddModelError("", "Oops! Looks like celebrity beat you to it!"); return View(ad); }
}
Here we’re infectious the OptimisticConcurrencyException and setting our own information before sending the user back to their data for them to grab what they want and try again.
We're taking OData on the Road!

However, if you’d like to also put checks into your EF code, maybe because you’d like to lest a round-trip to the database for bad data, you can do so in your EF-enabled language of choice, e.g. C#.


I’m a big fan of the SQL Server profiler for figuring out what the Entity Framework (EF) is really doing on the wire. If you’re unfamiliar with how to use the profiler, the easiest thing to do once you’ve got it started is File | New Trace. It will ask to which database you’d like to connection and then pop-up the Trace Properties skylight. If you click on the Events Selection tab, you can filter the events you see. For tracing EF, it doesn’t matter what type of events we see, but it does matter from whom they come. To see EF calls (or any ADO.NET calls) against your database, the easiest thing to do is to press the Column Filters button and set the ApplicationName to be like “.NET SqlClient Data Provider”:

I was using MVC and I wanted to do it right. That meant arranging out the "URL space" the way it made sense in the new world (and it's much nicer in general, imo). However, instead of changing my content to use this new URL schema, I used it as a representative example of how links to my content in the real-world might be coming into my site, which gave me initial data about what URLs I needed to forward. Ongoing, I'll dig through 404 logs to find the rest and make those URLs work suitably.
Bringing in Excel
Friday, Jan 7, 2011, 2:32 PM
SQL Server Modeling CTP (November 2009 Release 3) for Visual Studio 2010 RTM Now Available

[Chris] While I have had them, mystery questions were infrequent even when I was interviewed 7 years ago. Since then, I haven't run into many people that use them. However, when they are secondhand, an interviewer is often seeing for how a applicant works through an issue as much as the solution that they come up with. In an ever changing world, being able to learn and adapt rapidly is a big part of how successfully you can be in the tech industry at all and at Microsoft specifically. I favor technical chart questions for these kinds of results, however, and it seems that most 'softies admit.
This solution came from Shyam Pather, a Dev Manager on the EF team. He says thin a hurry you turn off agent generation, you give up inactive loading and "immediate" alteration trailing. Instead, you'll get "snapshot" alteration tracking, which method the environment won't be advised while the properites are changed, but the context still detects changes while you call DetectChanges() or SaveChanges(). For the interiors of a Data Service, naught of this materials, but anyone code you write in ask interceptors, change interceptors, or service operations ambition must be conscious of this.
[Chris] I run a little section of my web site devoted to the MS interviewing process and the thing I will tell you is this: don't prepare. Be yourself. If you're not a fit for MS, no amount of readiness in the days before an interview will help and if you are a fit, that will come through in the interview. Also, make sure you ask questions. Working at Microsoft isn't just a job, it's a way of life, so make sure you're sure you want the team and the job for which you're interviewing.
P.S. I’m loving Windows Live Writer 11!
15 comments
This constraints are only true when used from the OData endpoint, of course. The rest of your app will get proxy institution by default unless you turn it off.
1 comment

Quadrant: Msiexec /x 61F3728B-1A7D-4dd8-88A5-001CBB9D2CFA
“Oh, this is only worth $20 to me. Well, possibly $25. OK, $40, but that’s all. Dammit I gotta have it! Where’s the button to enter the Social Security number of my first born!?”
LINQPad is an interactive execution context for LINQ queries, expressions or programs. The typical method model is that you point LINQPad at a SQL database or an OData endpoint through a dialog box and then begin manuscript queries against the tables/collections exposed by that linkage, e.g.



Saturday, Jan 15, 2011, 10:32 PM

Imagine a very simple EDM to describes web advertisements:
[David] Does MS provide exercising for interviewers? If so, what do they accentuate most?

On the other hand, my Samsung Focus has giving me more than a dozen things I never thought to ask fore and really use. The full calendar support, contact linking, voice dialing (with magnificent Bluetooth support), voice searching, the auto-correct on the keyboard, the location and phone number recognition and OneNote sync’ing make this phone a rejoice to use every day.

var people = new Person[] chris.Union(chris.Children);
Console.WriteLine("People: " + people.Aggregate("", (s, p) => s + (s.Length == 0 ? "" : ", ") + p.ToString()));
Console.WriteLine("Teens: " + people.Where(p => p.Age > 12 && p.Age < 20). Aggregate("", (s, p) => s + (s.Length == 0 ? "" : ", ") + p.ToString()));

You've reached the internet family of Chris Sells, Program Manager in the Distributed Systems Group at Microsoft. This site is targeted at the Windows developer. Enjoy.




When you reception the Run button, you’ll see a rolling account of calls made to that instance of SQL Server from EF. Now when you run an EF program, you’ll see accurate what SQL that EF is generating for SQL Server:
Thursday, Aug 26, 2010, 7:12 AM in Fun

Thursday, May 20, 2010, 6:11 PM in Colophon

namespace EdmTest { partial class Ad { partial void OnLinkChanging(string value) { if (!value.StartsWith("
StringComparison.InvariantCultureIgnoreCase)) { throw new ArgumentOutOfRangeException("Link have to start with ''"); } } }
}
Here we’ve made sure that whenever we set the Link property, it have to be of a certain format. If we were to violate that withdrawal, things go boom:




What happens is that non-batch mode works just fine when our server sends back a 401 asking for login credentials, pulling the credentials out of the waiter reference’s Credentials property. And so does batch mode.
Kraig Brockschmidt
Program Manager, Data Developer Center
The idea is that people’s “top bid” changes over time as the auction goes on. I know this happens to me:
Where Are We?
This time, it's something else and I can't reproach the iPhone; I think all modern smart phones have the same problem. The problem is that I constantly must switch between apps to see my messages. Here are screenshots for 5 of the messaging clients I use reguarly:
The reason to add methods to the Array prototype is that it makes it easier to continue to fetter calls together in the fluent style that started all this experimentation, e.g.

I use LINQPad all the time for a bunch of matter, but most recently and most relevant, I’ve been using it for a personal chore that isn’t developer-related: I’ve been using it to do budgeting.


2 comments
10 comments
Windows Phone 7: Beating Expectations
The way that EF lets you decide how a row is changed is via the Concurrency Mode property on every one of the entity’s properties in the designer. By default, the Concurrency Mode is set to “None”, which results in SQL like the following when an update is needed:
The TimeStamp field will come through as type Binary, since EF4 doesn’t have straight support for it, and with a StoreGeneratedPattern of Computed (which is exactly right). To empower EF to use the new column to fulfil optimistic concurrency, we need only change the Concurrency Mode to Fixed.
EF Concurrency Mode Fixed + MVC
The page where the count-down timer is shown. The page where you have already entered your top bid and are poised at the Confirm Bid button.


update [dbo].[Ads]
set [Title] = @0, [ImagePath] = @1, [Link] = @2, [ExpirationDate] = @3
where (([Id] = @4) and ([TimeStamp] = @5))
Here, the TimeStamp column is our “version” column. We can add such a column in our SQL Server database using the “timestamp” type, as shown in SQL Server Management Studio here:




BTW, that’s not where I live.
And when I needed whole new tables of data, that lead to another principle:

Here I've got a great UI for getting to all my email messages in a little while, but why can't it knob all my messages instead?

It’s for this reason that the EF team itself recommends using a special read-only column just describing the “version” of the row. Ideally, whenever any of the data in a row changes, the version is updated so that when an update happens, we can check that special column, e.g.
0 comments

Thank you and enjoy Visual Studio 2010!

Your spokesmen are going to contain Doug Purdy, so writing immediately. Spots are going to go quick!
The way I handle layout is with tables 'cuz I couldn't figure out how to make CSS do what I wanted. I'd love expert help! Space conservation in comments so code is formatted correctly. I don't actually know the right way to go about this. Blog Conversations: The idea here is to let folks put their email on a bbs comment so that when someone else comments, they're notified. This happens on forums and Facebook now and I like it for maintaining a conversation over time. In spite of my principle, I didn't get 100% of the HTML content on the site into the database. Some of the older, obscure stuff is still in HTML. It's still reachable, but I haven't motivated myself to get every last scrap. I will. I can accessible expose more via OData. I can't think why not to and who knows what folks might want to do with the data. I could make the site a little more readable on mobile devices. I really need full support for AtomPub so I can use Windows Live Writer. I'd like to add the name of the article into the URL (apparently search engines like that kind of thing : ). Pulling book covers on the writing page from the ISBN number would liven up the mutual, I think. Pass the Search Engine Optimization Toolkit check. (I'm not so great at birth.)
Unfortunately, as of .NET 4.0 SP0, you can’t use all of these together.








[Chris] I don't often ask coding questions, but when I have, I let them use a keyboard. I detest coding on the board myself as it's not representative of how people actually code, so I don't find it to be a good indicator of what people will actually do. I guess I even use behavioral techniques for technical questions, as long asI think about it. : )

[David] How has the Microsoft interview process changed over time? (Microsoft seems to have quaked up the tech interview process some years ago with those brain-teasing puzzle� questions, but now seem to be much more technically-oriented and job-specific. Just wondering about your thoughts on this reconnaissance.)


If you are incapable to uninstall SQL Server Modeling CTP from Add and Remove Programs for any reason, you can remove each component using the following command lines. You need to run all three in order to completely remove SQL Server Modeling CTP so you can install the new CTP:
In appending, on the DS client, also written in .NET 4.0, I was attempting to use batch mode to reduce the number of round trips between the client and the server.

5 comments
All of this brings me back to one more principle. I call it Principle Zero:

0 comments

Instead, set yourself some free time when the auction is going to happen and start up two browser window at the following pages:





If you've flipped on the POCO (Plain Ol' CLR Objects) code generation T4 templates for Entity Framework to enable testing or just 'cuz you like the code better, you might find that you lack the ability to expose that same model via Data Services as OData (Open Data). If you surf to the feed, you'll presumable see something like this:

Data at PDC 2010
If you use “SaveChanges(SaveChangesOptions.None)” or “SaveChanges()” (None is the default), then you won’t be running into the batch-mode problem. I don’t like this answer, however, since batch-mode can significantly reduce network round-trips and therefore not using it decreases extravaganza.
Notice the use of “Dump” to see results along the way. If I want to, I can switch to C# Program, which gives me a chief and allows me to create my own types and methods, all of which can be executed dynamically.
  Reply With Quote

Sponsored Links
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off


All times are GMT. The time now is 01:14 PM.

 

Powered by vBulletin Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Free Advertising Forums | Free Advertising Message Boards | Post Free Ads Forum