Many Niches

Jack of All Trades, Master of Some

Mint – Refreshingly Useful

April 7th, 2009 by Brandon Watson

I am not the first person to write a review for the financial software service Mint.com.  Nor will I be the last.  However, after using the product for just a week, I felt compelled to reach out to my readers and let them know that if you have as much of a deep seeded hatred for personal financial software tools (*cough* Money…*COUGH* Quicken) as I do, then you have most likely given up on the category entirely.

Myself, I needed another run at a personal financial software tool like I needed another run at dealing with the tech support line at the cable company.  With the impending arrival of my third child, and the economy being in the state in which it is, it is no longer suitable to utter "leave it to me" to my wife when issues of our personal finances come up.  You see, she went to the bank and withdrew a pocket full of "I don’t give a shit" for whenever I would try to insist that my Wharton MBA was sufficient credential for her to avoid such topics.

Any time I have tried to use any of the aforementioned software packages, they would prove too onerous for the family to use.  Further, it was complicated to ensure that we could share a file across machines.  Synchronization became a complete pain in the ass.  Bottom line – I loathed the software.

The number one problem I had with any of these packages was simply getting started.  The need for the opening balance was enough to derail most efforts.  Don’t you dare try to use Quicken or Money without reconciliation of that opening balance.  You want to get your transactions into the system?  Sure, no problem.  Want to have them categorized?  You’re on your own.  Want the data that the bank provides to be enough so that your software would simply figure out how to auto-classify new transaction?   Good luck with that.  Forget to download transactions for a month and you only use your debit card for all transactions?  Your night is ruined.

Read the rest of this entry »

Posted in Investing | No Comments »

An Open Cloud Requires an Equally Open Manifesto

March 26th, 2009 by Brandon Watson

There’s been a new round of noise in what I like to call the “What is the Cloud?” discussion.  It never ceases to amaze me that so many people seem stuck on this one question, despite the fact that having an answer to it is not the asset people seem to think it is.  The cloud is evolving, with or without us, and is doing so based on the needs and demands of developers.

So it was with some amusement that I caught wind of the “secret” open cloud manifesto being circulated to some of the top companies.  My boss has posted the Microsoft stance on the open cloud manifesto, and I wanted to share some of my thoughts.

The press seems to have glommed onto this meme with quite a bit of coverage.  I didn’t know Steven was so popular.  Perhaps I need to hang around him more.  Darryl Taft at eWeek had a very insightful article, which took a very unexpected turn.  He admitted that journalists have a bit of a bias against Microsoft, and when it comes to us talking about things like open processes and standards, they can’t help themselves but be skeptical.  Here’s the money quote:

“…it’s a whole new world. And not only has the web — and increasingly the cloud — forced Microsoft to become more open and interoperable, so has the sheer force of customer and developer demand.”

That’s spot on.  The Hatorade was fine back in the 90s, but in case everyone missed the memo, the web kind of kicked our ass, and we have made a very strong effort to work with standards, embrace the needs of our developers, and deliver high quality products and services to our customers based on those demands.

Read the rest of this entry »

Posted in Cloud Computing | 7 Comments »

ASP.NET MVC Book Sample Chapter

March 19th, 2009 by Brandon Watson

I have professed my love for ASP.NET MVC, but have come to hate the documentation by blog.  I have been checking Amazon and the local book stores for a book that would help spell out many of the topics not covered in Scottgu’s blog posts.

Here at Mix09, Scott Hanselman is giving out links to the first chapter of his forthcoming book, coauthored with ScottGu, Phil Haack, and Rob Conrey.  Apparently they are doing this under creative commons, and want you to have it.  “First chapter?,” you ask.  What’s the big deal?  Well…it’s 185 pages, and is a start to finish app creation.  That is how I want to learn this stuff, and was psyched to see it.  I am working through the content myself, but wanted to share the link.

The book title is “Professional ASP.NET MVC 1.0” and they have a link to the free chapter.  Enjoy.

Posted in N00b Notes | 1 Comment »

Cloud Platforms – What’s Going On?

March 9th, 2009 by Brandon Watson

I recently delivered a talk for a group of venture capitalists who wanted a primer on the cloud.  It was, so I thought, a pretty straightforward task to put together this discussion.  I have written about the motivations of those building cloud platforms, so I figured I could just transpose that content to slides.  Unfortunately, life often doesn’t work out the way we would like when you think there is an “easy” answer.

I wanted to ensure that there was some relevancy of my content not just to the VCs in the room, but also for their CEOs and CTOs, with whom they would undoubtedly share this content.  Further, I knew that I had to make it simple enough to fit into the allotted time, but meaty enough that everyone took something away from the call.  Given the time constraint, I focused on Amazon Web Services, Google App Engine and Microsoft Azure.  Lastly, given that VCs are investing and looking for ideas, I had to put on my old investor hat and present some high level whitespace analysis with some noted interesting companies.

I think the key takeaways would be that Amazon has built some very cool technology and they continue to innovate.  However, that must be tempered with some cost considerations (tied to growth) and the fact that the platform itself doesn’t solve any hard problems for you.  Google, on the other hand, has little in the way of cost concerns (they have a stated goal of supporting up to 5 million page views for free), but what you can do with the framework is pretty limiting in the context of the richness of applications now possible.  Lastly, Azure is a contender, but we have some things yet to prove, and of course, we are late to the game.  It’s still very early days, but there are some cool things happen in the clouds, both at the platform level, and at the “built on top of” level.

Posted in Cloud Computing | 8 Comments »

ASP.NET MVC – Passing Data Around

February 4th, 2009 by Brandon Watson

I’ve made no secrets of the fact that I am n00btaculous with regard to ASP.NET.  The first week or so with the MVC was pretty painful for the simple fact that the available information online is somewhat dated.  That sounds weird when talking about something that hasn’t even shipped yet, but here’s what I mean.  If you do a search for “ASP.NET MVC”, you will find that some of the links head off to Scott Guthrie’s blog.  This is a good thing, since he’s the big cheese here at Microsoft responsible for a great many things, including MVC.  Here’s the problem: that link is from a blog post in late 2007.  As a n00b, I’m wasn’t sure whether or not anything has changed, especially since we are now at a release candidate for ASP.NET MVC, rendering the code samples useless in my mind.

With that in mind, I have been scrabbling around looking for information.  To quote Jaime Escalante, I was “like a blind man, in a dark room, looking for a black cat that’s not even there.”

It turns out that the ASP.NET site completely redid the samples that they had for MVC, which is pretty awesome when you think about it.  Head’s up, it’s easy to get lost in the site and not find the “new hotness.”  You want this link to their MVC content, and not this link off their “Learn” tab.

Now, to the task at hand.  With the Controllers and Views, you can separate your data from the presentation.  Awesome.  How do I get the data from Controller to View?  When I first started learning, it wasn’t clear that I could pass more than one piece of data, because most of the samples I saw had something along the lines of:

return View(data);

where “data” could be any single object.  As with any function, you wouldn’t expect to be able to return multiple objects.  So, n00b that I am, I was trying to create all kinds of complicated structures to pass different data back.  For example, I did something like:

List<Dictionary<string, int>> myData;

and proceeded to dump data into this complicated structure.  Don’t do this.  I then tried to create custom classes for returning different sets data as one repository.  Please don’t do that.  There is a much, much simpler solution, which I missed in the tutorial sets, because it’s not clearly called out as to what they are doing.  You can pass whatever data you want back to your view, and label it.  I took advantage of this as follows:

ViewData["myDict1"] = myDict1;
ViewData["myDict2"] = myDict2;
return View();

Once you do that, your View can access the data as follows:

<% foreach (KeyValuePair<string,int>kvp in (Dictionary<string,int>)ViewData["MyDict1"]) %>
<% { %>
<%= String.Format("Key: {0}, Value: {1}",kvp.Key, kvp.Value) %>
<% } %>

You can replace the “myDict1” with “myDict2” if you want to access that data set.  The data structures can be whatever you want – I just used two dictionaries for illustrative purposes.

Posted in N00b Notes | 2 Comments »

ASP.NET – Membership Hides Its Privileges

February 3rd, 2009 by Brandon Watson

One of the problems I have had thus far with my foray into ASP.NET has been a simple concept.  How do you deal with users logging in.  Not so much the actual mechanics of it, but where is the data, and how can I get to it?  By default, when you are using forms based authentication, that data is stored in tables that you cannot easily get to, and certainly not in the Solutions Explorer.  Essentially, nothing is showing up in your “App_Data” node, and there is no .MDF file to add from your project directory.

What then are you to do when you want to have direct access to your membership tables from within Visual Studio?  Well, let me walk you through the steps, as I did them, to achieve this.  I won’t say that this is the official way, but it’s what worked for me.  I hope to save you some of the pain and suffering associated with my searching on the web to find these answers.

Create your new project

This is self-explanatory.

Turn on forms based authentication

This is accomplished by editing your web.config file.  Look for the following:

<authentication mode="Forms">
  <forms loginUrl="~/Account/Login" />
</authentication>
Run the ASP.NET Configuration

It’s important that you don’t look for this option (under the “Project” menu) when you have the web.config file as your open window.  It won’t be there.

Add A User

Click on the security tab, and from there you can manage your users.  Add one.  One time when I did this, I saw the following error:

The following message may help in diagnosing the problem: Could not find stored procedure ‘dbo.aspnet_CheckSchemaVersion’.

The annoying bit was that when I tested the connection, through the tool, it was able to successfully establish a connection.  Wonderful.  I am not sure how I fixed this the one time I hit it, but I wanted to throw it out there as a potential issue.

The Unfun Complicated Bit

So, this is where having a friend on the dev team is important.  I had read one of the tutorials over at asp.net which had content on this topic. They tell you to run “aspnet_regsql” from a Visual Studio command prompt.  If you do nothing else, know this: if you are using SQL Express, your server that you want to connect to is in the form of <machine name>\sqlexpress.  If you get that wrong, this tool will fail.  Always.  That’s roughly two hours I just saved you.

I am not sure what this tool did that this command line bit didn’t do for me (courtesy developer friend).

NAVIGATE TO:

C:\Windows\Microsoft.NET\Framework\v2.0.50727>

RUN:

aspnet_regsql.exe -d "<path to project dir>\<projectname>\App_Data\ASPNETDB.MDF"

With the following options:

-A all -C "Data Source=.\SQLEXPRESS;Integrated Security=True;User Instance=True"

If everything goes according to plan, you will see:

Start adding the following features:
Membership
Profile
RoleManager
Personalization
SqlWebEventProvider
…..
Finished.

If not, you will see many errors. This broke for me when the ASPNETDB.MBF file was not already there.  It showed up for me only after I had successfully built and run the project and added a user.  The asp.net mvc default app has a new user wizard, which I could also use (which I did when I hit that stored proc error above in “Add a User.”  Of course it worked, and I don’t know why.

Add the Database File

In the Solutions Explorer Window, right mouse click, and select “Add/Existing Item.”  Select ASPNETDB.MDF.  Careful that you don’t select the _log file.  I did that.  Don’t do what I did.  Fail.

There you go.  A step by step, “how the hell do I get my user tables into my project so that I can edit them” tutorial.  Hopefully this saves some poor unsuspecting n00b some time.

Posted in N00b Notes | 1 Comment »

ASP.NET MVC How I Love Thee

January 22nd, 2009 by Brandon Watson

So far, I am in love with ASP.NET MVC.  Let’s just hope this doesn’t turn out like my love affair with other potentially fleeting items, like the great Seattle snow storm of December 2008.  I think my Facebook update on that one was:

FacebookStatus1After throwing my hands up in disgust yesterday, while trying to do a simple thing like put some data in a database, get it out, and display it arbitrarily on a page, I got a note from a friend who really urged me to check out the MVC beta that Microsoft had put out.  The download was easy enough, and once I had that done, I wandered over to tutorials on ASP.net to see what all the fuss was about.  Remember, MVC is how my mind thinks about building web apps, so this was a welcome starting point.

SampleMVC First off, the default project code is quite cumbersome.  There’s a ton of files that get created, which I am sure are great to get started, but without context, they are a bit overwhelming.  Remember, I am approaching this as someone who quite literally has no idea what is going on.

However, if you take a closer look at what they have included, you will see that there was some care given to the functionality that comes to your right out of the box.

The application itself doesn’t do much, but it does have user account functionality built in for you.  For most people building applications, they are going to want to have the ability to create user accounts.  More importantly, if you did into the code, what you see is that the user accounts was implemented without using the asp:login controls.  Trust me, you are very happy about this.  The login page uses tables, instead of CSS (my good friend, the UI Guru, always makes such a big deal of table-less UI), so no points for style.  You get it…style…style sheets?  Anyone?

Another bonus was that they had the good sense to throw in the JQuery JavaScript files.  I don’t know JS, but from reading enough headlines at Hacker News, I know JQuery is what you want.  Eventually I will get around to learning some JS goodness, but I suspect that will come after a very turbulent affair with CSS.

After watching that short video on how to build a task list, I felt like I had all the information I needed to get started building the My3Words app.  Sure enough, within a much shorter period of time, I had a working prototype which allowed me to input usernames, and words, and that data routed into the database, and was able to display that data on an arbitrary page.  I cannot tell you how happy that made me.

So there you have it.  If you, like me, have done some MVC development (even a teeny tiny bit), I am pretty confident you are going to find this set of Microsoft technologies much easier around which to wrap your brain.  The next post will have the walk through of my building some base functionality of the My3Words app.

Posted in N00b Notes | 2 Comments »

Fun Times With ASP.NET

January 21st, 2009 by Brandon Watson

First off, there’s the two worlds of doing things with ASP.NET.  Actually, there’s three if you count classic ASP, but who’s looking at that?  The first path that I went down in trying to wrap my head around ASP.NET was the web forms method of development.  The bulk of the content online is targeted at this way of building apps, and it was the methodology switched to around the time ASP became ASP.NET.  The second path is the MVC path, and we will get to that in a bit.

At first, I was happy with the materials that I had come upon for learning ASP.NET.  There appeared to be no shortage of books available, and plenty of results turned up in the live.com search (37.1 million to be exact).  The first book that I got from our library (yes, Microsoft has it’s own library, and it’s awesome) was ASP.NET 3.5 Step By Step.  The ratings on Amazon were good, so it seemed like a reasonable starting point.  For kicks, I also grabbed a couple of others.

Here’s my first problem with the ASP.NET literature that I have seen thus far.  For the most part, they really, really want you to understand how ASP.NET works, internally, before you can do anything.  Unfortunately for the ADHD generation, we want to build things, and we can’t be bothered with details.  Page upon page upon page of HTTP pipelines and other minutia.

I myself learn from examples; preferably code tied to a real application.  Too often in books, when there is sample code, the author provides a dump of the code, as if they are trying to say “look how much code I can write,” when all that does is make me want to close the book.  Reading source code is hard, and certainly reading someone else’s is even harder.  Truth be told, that’s why I embarked on this endeavor…to put out postings which were step by step about how I built something in the hope that some other novice would appreciate that I am going through exactly what they are going through.  I know I am not the best developer out there, and I am going to make a ton of stupid mistakes, but no one wants to feel stupid when they are trying to learn something new, and stupid is all I felt trying to learn the forms method of development for ASP.NET.

ASP.NET has a very cool feature called “code behind” which basically separates the code from the HTML for your pages.  I thought this was cleaner than trying to interleave the C# code into the HTML.  That is until I tried to access code that wasn’t part of the code behind source.  I am sure that if I had kept at it long enough I would have sorted through my issues, but for whatever reason, I could not make it work where I had a function in one .CS file and call it form a code behind file.  If you are trying to do this, things to look out for are the differences between “<%=” and “<%”.  That “=” matters quite a bit.  Another thing to be on the look out for, which they seemingly never cover in the code samples and books, is how and when to use includes and the “using” directives.  Remembering that one thing, more than anything, has caused me pain and suffering that I don’t want to recount.  Again, I know I am not the ace developer, but imagine if you have read this far, you aren’t either.

Further annoyances around getting started were things like trying to find useful tutorials online.  Here’s a great exercise.  Perform the following searches:

Did you do it?  How many clicks did it take you to get to useful information for ASP.net?  You would think that first link to the W3Schools Tutorial would be a good one.  It took me 5 clicks to get to the first bit of writing code.  Four pages of really superfluous stuff.  It actually felt like the whole site was set up for SEO and ads.  Not that there’s anything wrong with that, but contrast that experience with the Ruby on Rails example.  One click from the first returned link, and you are writing code.  Still a doubter?  Python was two clicks from the first returned link.  My point in all of this is it simply shouldn’t be hard to get started with a web app platform.

In all fairness, I eventually removed the word “tutorial” from my search term and landed at the asp.net site.  They have many informative articles, videos, etc, upon which to feast, but it took me a while to reduce my search terms.  Unfortunately, the video content at ASP.net suffers from three issues, in my humble opinion.  First, it’s dated – many of the video lessons for ASP.NET are several years old, and are specific to ASP.NET 2.0, not 3.5.  The ASP.NET 3.5 videos all assume you know what the heck you are doing.  Second, the bulk of the intro lesson videos that you can view display visual basic code.  I was a VB6 nerd, so I can appreciate that, but it bothered me that some of the videos didn’t have C# tutorials with C# on screen.  I get wanting to be language independent, but all of the tutorials should be in the two major Microsoft languages.  I know that sounds like a nit, but it’s important for people trying to get up to speed on your platform.  Don’t alienate them, and don’t make it hard.  Third, and last, is the same fatal flaw as the books; the heavy reliance on the forms and server controls for the programming model.  I get it.  People want to see immediate results, and “yeah” I made a grid of data from a database, but when you have specific ideas about things you want to do, and they don’t fit into this notion of using server side controls, it gets difficult to digest the information.  It simply doesn’t line up with the type of apps that breadth developers are building; it feels more geared toward enterprise developers building quick apps for intranets.

Here’s a great example of my difficulties: I wanted to connect to a database.  I created a simple table in SQL Express (that alone was a fun exercise to discuss another time).  I plowed through a bunch of content, all of it showing how “easy” it was to data bind controls.  All well and good, but what I wanted to do was execute a query and put text on the screen.  Eventually I figured out how to create a Data Set.  Have a gander at this first search result which shows up when searching for “asp.net data set.”  Make heads or tails of that.  Oh, and don’t make the mistake of not knowing the name of the data set as defined in the properties window of Visual Studio.  you kind of need to know that.  I didn’t of course.  Further, I took quite a bit of head banging trying to understand why I needed to declare adapter as follows:

UserWordsDSTableAdapters.UserWordsTableAdapter myAdapter = new UserWordsDSTableAdapters.UserWordsTableAdapter();

YIKES!  Thank goodness for auto-complete and intellisense.  Unfortunately, because C# is strongly typed, and because I couldn’t remember that the Data Set was called UserWordsDS, which then gives me the UserWordsDSTableAdapters, I had a hell of a time getting the adapter object created.  Nothing about using the Data Set was easy to just wrap my brain around.  Perhaps one day I will appreciate that there are Get functions that I have created which have the SQL queries in them, and in order to get the data, I have to create a UserWordsDS.UserWordsDataTable object, and then set that equal to the return value of the myAdapter.GetData() function, but I doubt it.  It just feels like obfuscation for the sake of obfuscation.

Finally having the ability to get data from the database had me hopeful, but this is where I ran into the problem of not understanding why I couldn’t create a new .CS file in the project, and use the very same code that I had used in a code behind file to access data and either return a string or write the Response object.  It was at this point that I threw my hands up.  I actually had three different books on my desk, all in a desperate attempt to figure out how to call C# from the aspx file.  I gave up.  And then I discovered ASP.NET MVC.  We’ll leave that post for tomorrow, but let’s just say I got more done in two hours then I did in a couple of days of “learning” traditional ASP.NET.  Must be my Django and Rails tendencies coming through.

Posted in N00b Notes | 2 Comments »

My3Words

January 21st, 2009 by Brandon Watson

Description: I want to build an app that has value for self development within organizations.  The app will have user accounts, which you will need in order to leave feedback and view your own feedback.  People can enter 3 words about another person, for whom they must have their email.  I may restrict feedback to people of the same top level domain, but I haven’t decided.  All feedback will be anonymous.  The 3 words are meant to be the two that you like and the one that people say about you when you leave the room.  I want to be able to display a tag cloud of all the words in the system on the default page, with the positive words in green and the negative words in red.  Further, once someone logs in, I want to have multiple clouds representing:

  • words about you
  • words you have written about others
  • words written by others about people you have written about
  • words written by others about who have written about you

So there it is in a nutshell.  I am going to start the N00b Notes with my quest to get this done.

Posted in N00b Notes | 3 Comments »

Starting Out With ASP.NET

January 21st, 2009 by Brandon Watson

Now that I have been working in the Developer and Platform Tools marketing group at Microsoft for close to a year, I have decided that it’s probably a good idea for me to be technically proficient in our own technologies.  I have spent the better part of the last decade outside of the Microsoft stack.  Most recently, I have been hacking away with Python and learned high level Ruby and Ruby on Rails, as part of the development process for IMSafer.

When you have been using dynamic typed languages, and MVC models for so long, the notion of jumping into ASP.net using C# is one that I looked on with trepidation.  Thus the birth of my N00b Notes.  Throughout this series of posts, I am going to start building apps using the Microsoft stack, and I am going to blog every step.  Quick note: it won’t be pretty.

Ultimately I want to be building apps on the Azure Services Platform.  Unfortunately, without adequate knowledge of how to build ASP.net apps, that’s a bit too much to take on at once.  So I will start with a basic app that I want to build, and try to build it in ASP.net.  For kicks, I may try to build the exact same apps on one or all of PHP, Rails and Django.

For the record, I don’t know how to deploy SQL.  I don’t know how to use CSS (I always had a buddy do the front end stuff for me).  Likewise, I don’t know JavaScript, and I don’t know PHP.  I know how to program, and I can pick up languages as needed.  Case in point, I taught myself how to use C# by building a basic app that polled FriendFeed using their API, and figuring out the frequency of post methods from their customers.  It turns out that at any given time during the day, 40% of their traffic is coming from Twitter, and 20% comes from blogs.  I was surprised that Delicious wasn’t more than about 6%.

What do I hope to accomplish?  I want to figure out how to get more of the breadth developers on the Microsoft platform.  I want to puzzle through how we can get more of the app builders creating applications on Azure.  It’s my contention that there is a core set of archetype applications that people are trying to build for the web on the consumer side, and those have a core set of things that you need to know how to do if you are going to build web apps.  I am going to start in the consumer app space, as that’s the spot where I have the most depth of experience.  Expanding that set of archetypes to include enterprise applications will prove to be a great learning experience in speaking with customers, ultimately understanding what it is they expect to get from the cloud and how they want to use it.

You can expect plenty of fumbling and bumbling on my part.  I will make many mistakes.  I will code things badly.  I will go about doing things the complete wrong way.  I know this in advance.  However, I feel pretty confident that I am not alone in my skill level, and hopefully this set of posts will be useful to others looking to use the Microsoft stack.

Posted in N00b Notes | 1 Comment »

« Previous Entries Next Entries »

 
© 2009 Many Niches Powered by Wordpress