Categories
Geeky/Programming

LINQPad to MS CRM 2011

This morning I blogged about using LINQPad to query an XML file. Well did you know you can also query a Microsoft Dynamics CRM 2011 (in the cloud?!?) version directly from LINQPad? Pretty sweet.

The use of LINQ has become more and more prevelant in the last few years, from .NET Developers using LINQ2SQL, and just using LINQ for object queries, and everything in between (when is there going to be a LINQ2OLAP??)

First, you need to install LINQPad, and then you need to download and configure the
LINQPad Plugin for Microsoft Dynamics CRM 2011.

Once you have that all set you can go and get your LINQ Query on.

The possibilities are pretty much endless here, but yeah, now you can run ad-hoc queries against your CRM installation, which is pretty cool. If you want more samples, install the CRM SDK and do some code diving, you will find some LINQ queries they do in the SDK, which is how I initially got the idea to try using LINQPad.

Categories
Geeky/Programming

Create a Word Cloud From Your Twitter Feed

I love playing with data. My data makes it even more fun. Wordle has been around for a long time, and so has Twitter (in Internet years anyways). I have always been fascinated by word clouds and visualizing text patterns, etc.

I figured that hey, there has got to be some analyzer for your twitter stream, and I am sure there are a ton, but I didn’t stumble upon any with some easy Googling, so I did it the hard way.

First goal? Get your Twitter feed and/or data somehow. Multiple ways to do this, but I stumbled upon a pretty cool site. http://tweetbook.in that let’s you create an eBook from your Twitter feed and favorites. It let’s you publish out as a PDF or XML file, so I figured that would work. It is a busy site and you may have to wait to get in but once you do you just oAuth it up to Twitter and grab your data.

Now, once you have your data, you need to do something with it. The data would be in XML so you need to parse out the data you want, for instance, I wanted to analyze my “favorites” so I wanted to get the text out of the XML. Here is my first favorite on Twitter (by the way, it will only go back 3200, I think – I only have 2600 or so faves)

  881539697
  A "Manager" class is like my grandmother's junk drawer.
  Fri Aug 08 14:23:56 +0000 2008
  web
  jeremydmiller
 

Well I just want to grab that <text> value, and without having to do any programming or powershell or C#, I fired up trusty old LINQPad (more on this tool in future posts for sure). I then just wrote a quick little query against the XML file like so:

var xml = XElement.Load (@"c:fave.xml");

var query =
  from e in xml.Elements()
  select e.Element("text").ToString().Replace("","").Replace("","").Replace("RT ","");

query.Dump();

As you can see, I am just loading up the xml file and doing some text cleanup (removing the xml text blocks and removing RT’s, the old syntax which muddies up the results). Note in LINQPad you need to change the query type to C# Statements instead of the default C# Expression.

Once I had my values in the results I wanted, I did a quick CTRL+A, CTRL+C (it still baffles me how many people don’t know CTRL+A is “Select All”) and then pasted it into notepad++, to view, and cleaned up some html characters there (quotes, etc) and then pasted it into Wordle. Here is what I got back:

wordle_of_my_favorites

You can see I really like to favor SQL Server, Microsoft, iPhone, Blogs, sqlpass, Google, SharePoint, Twitter, and pretty much everything geeky. Pretty dang cool. Why doesn’t Twitter offer something like this? I think it would be cool. What other cool things have you done with your “data” – what cool things would you like to see?

Categories
Geeky/Programming SharePoint

SharePoint Report – Missing Managers

Trying to roll out SharePoint at an org can have it’s hard times. One is trying to get User Profile sync working well and making sure the Org Browser works well goes along with that. You can sync over the manager from AD and everything falls into place, but their might be users you are pulling that don’t have a manager set. Now of course you can query AD for this, but you would have to already know the filters and OU’s you are pulling into SharePoint. Another way to do this (and of course, disclaimer here, don’t try this at home if you are scared of querying SharePoint databases, and yes, it probably isn’t recommend, but I am doing it anyways). Here is a query you can use to get the User’s with no manager, and also join it back to get some other attributes such as department, office, and title so you can figure out where they are and who their manager might be (helpful in a larger org). You can easily throw this in an SSRS report, and have it email whomever maintains the managers in AD or in your organization. (Note, SP2010_ProfileDB might not be the name of your actual profile DB, you would have to change that in the query below)

SELECT up.RecordId,PreferredName,NTName,Email, office.Office, titles.JobTitle, dept.Department
	FROM dbo.UserProfile_Full up
	LEFT OUTER JOIN (SELECT [RecordID]
      ,[PropertyVal] AS 'Office'
  FROM [SP2010_ProfileDB].[dbo].[UserProfileValue]
  WHERE PropertyID = 11) office ON up.RecordId = office.RecordId

	LEFT OUTER JOIN (SELECT [RecordID]
      ,[PropertyVal] AS 'JobTitle'
  FROM [SP2010_ProfileDB].[dbo].[UserProfileValue]
  WHERE PropertyID = 13) titles ON up.RecordId = titles.RecordId

	LEFT OUTER JOIN (SELECT [RecordID]
      ,[PropertyVal] AS 'Department'
  FROM [SP2010_ProfileDB].[dbo].[UserProfileValue]
  WHERE PropertyID = 14)dept ON up.RecordId = dept.RecordId

	WHERE
	Manager IS NULL
	ORDER BY Office
Categories
Agile

Agile: Day of Autonomy, 20% Time, etc

A about a year ago or so, I watched the RSA Animate short on YouTube,

httpv://www.youtube.com/watch?v=u6XAPnuFjJc

RSA Animate – Drive: The surprising truth about what motivates us

Go ahead, watch it, pretty good and just a little over 10 minutes.

One takeaway I got from the short was this: The “Day of Autonomy”. If I remember, they talk about a place where once a quarter or something they let everyone have a day of autonomy, to do whatever they want, but the goal is, at the end of that day, they need to show the group what they did. They saw people doing things that were probably never on any agenda or plan, but some things could help the company and spurred other ideas.

Google is infamous for their “20% time”, which has created things like Gmail, and more.

Just recently, I decided to give this a go in the Business Intelligence group, a day of autonomy. Our velocity for that sprint would be slightly lower, but I was intrigued to see what would come out of it.

The results are still being analyzed, but yeah, seeing some cool things. I think for the next one (if we do it), we will need to plan it a little better to get the results shown to everyone. We are a semi-distributed team, so there are some challenges there.

Overall though, I think the Day of Autonomy is probably a good thing, as long as it isn’t taken advantage of. The players on the team should just be bursting with ideas that they should have no problem coming up with something to do. If you don’t have ideas always swirling on something you could crank out or improve, then you probably need to start there and think a bit differently on how you approach your work.

To me, it almost adds on to the Agile way, being able to do things like this yet still adjust and be flexible, and get some great output on regular stories as well. Always keep improving.


Categories
Blogging

Dusting off the Blog Theme

Most people that might follow this blog probably hit it though RSS readers, or a post here or there from a Google search, so the changes aren’t probably noticeable to many, but they are to me.

Having started blogging back in 2004, on Blogger, and then a year or so in moving to WordPress (self hosted) – but moving it and changing it over time, you get some cruft. Back in the day, things weren’t so “easy”. You wanted a change, it meant PHP time. Over the years WordPress has become more and more “drag and drop” if you want it to be, of course you can still code whatever you want in your themes, etc, but the “widget” concept is pretty cool.

I think the last time I changed my theme in a major way was around 2006 or 2007, (if I remember, it was a “code camp” Saturday with Joel Dahlin at G Allens). It didn’t change too much but I think I started with Google AdSense after the last theme change. In order to do what I wanted it was code code code

Fast forward to today, where the theme is looking outdated, hard to update, etc. I wanted something new. Without totally jacking everything I had, I wanted to start fresh but yet be able to continue what I am doing and how I want to do it. The ads on the site pay the bills, for the hosting and other tools I use. By no means am I living high off the hog, but it is nice to have the site pay for itself and also allow me to do other projects online.

I searched around a bit, and was looking at WooThemes and others, but then stumbled into Headway. It really isn’t a “theme” in the sense that most other themes are, but a framework/system to be able to do whatever you want easily, visually, etc.

I set it up and I am really liking it so far, I have some ideas where I can go at my own pace yet keep things they way I want them easily, fully extensible and the “code” I might use isn’t at all embedded in the PHP files of the theme, but configurable like a modern CMS.

I hope to get more pictures and article, magazine type look as I move forward, that’s the goal anyways. It’s fun to dust off the site and theme and get back into it a little bit, so much out there to learn and use, pretty cool, also is making me rethink all my plugins I have been using, etc.

Another minor changes? I changed the favicon to my current avatar, which is kinda cool.

Another minor note, I am approaching 1000 posts on this blog. I should amend my 2011 goals and try to get to 1000 by the end of the year.

More to come as time goes on, as always.


Categories
Geeky/Programming Product Reviews

Winforms DevExpress Grid

In the current agile sprint for the dev team I manage, we decided to start replacing ListViews (custom ones at that) and grids with the XtraGrid from DevExpress.

Now, normally I shy away from 3rd party controls, or want to vet them, but I knew there was no way we could do the same functionality in the default grid in .NET. One of the guys on the team did a story the sprint before to do a proof of concept comparing various grids and showing the pros and cons. DevExpress came out ahead, functionality and performance.

What we are seeing now is huge gains. We can use the new grid and functionality we couldn’t even begin to think of, is there by default. Grouping, searching, filtering, FAST performance, print preview and formatting, etc, etc, etc. Tons of options.

In fact, there are TOO many options. It makes it hard for us to digest all the possibilities in what we want to turn off, or how to integrate with existing forms, etc. A good problem to have.

All I know, is if you are doing any serious .NET work (Winforms, WPF, even Web/Silverlight) – it might make some sense to take a look at DevExpress. Focus on your business rules and integrating other parts of your systems, not reinventing the wheel with a crazy custom grid.

In the coming months I will try to talk about other areas that you can “outsource” to 3rd parties, where it makes sense. (And no, I don’t get anything from DevExpress for this post. Just calling it how I see it).

Categories
Life

1st Quarter Goal Update – 2011

Holding myself accountable here..

where are we at from the Jan 1st goal list?

  • Blog More – have been trying to! Could do more here. (14 in March, 2 in Feb, 3 in Jan)
  • Complain Less – same here.
  • Lose Weight – down 10 lbs, was down 15, want to keep going.
  • Spend more Time with Ella and Emily – been trying to do this, need to do more
  • Learn to Cook (more) – signed up for a class through MATC was supposed to be in March, was cancelled, going to have to look into this one more..
  • Develop a cool application/site/thing and ship it – got a wp7, now just need to “build” something
  • Drink less coffee, and beer – failing at this one 🙂
  • Purge things I don’t use – spring cleaning is coming up, sold stuff on ebay too.
  • Organize things physical and digital – need help on this one, or time
  • Consolidate Services I use – working on it
  • Take more pictures – failing at this one
  • Ride my bike more, maybe start running again – did some running in Jan/Feb (lost weight remember) but have been slacking. Bike riding season is right around the corner.
  • Go camping often – camping season is coming up, hopefully will get out more.
Categories
SharePoint

MS Project 2010 Sync with SharePoint 2010

If you get Microsoft Project 2010 and use it to manage your projects (I don’t personally, I use Agile) – then you can sync with with SharePoint 2010.

There is an article, which shows you how to setup the sync, which is pretty cool, but it doesn’t give you tons of detail about the url you need to put in.

The url you would want to put in is the url to your site. Not a page or list.

Ex:

if your site is

http://mysite/sites/Projects/MyProject 

you would use that. Some might think you would put in a link to your task list or something else, but you just need the root site. Now you know!

Categories
Geeky/Programming Work

VB6 to .NET Migration: Preparation and Migration

In my previous post on this topic, VB6 to .NET Migration: Decision and Analysis, I talked about the decision to migrate instead of rewrite, and also the analysis portion of the project.

Once you are ready to go, what happens? You need to prepare for the migration process. What ArtInSoft needs in Test Cases and Test Scripts so they can run through your application on their end in QA (the VB6 version) and then once they migrate it, run through the same scripts again (once migrated to .NET).

My guess is shops have some kind of test scripts, but nothing too extensive. This is where we were scrambling, we had things all over the place and not very complete test scripts/cases. This ended up biting us in the end as a lot of the app wasn’t covered by test cases so it was hard for ArtInSoft to test and migrate it without tons of exploratory testing.

Since the migration, we have shored up our test scripts and test cases by using a QA firm, Beta Breakers, but that is for another post.

After ArtInSoft gets your test scripts, they run through them and ask any questions, and in the mean time, their dev team is migrating your code and looking for areas they can automated in the migration, that aren’t in the main migration scope of the their migration tool.

ArtInSoft sets up a SharePoint portal for your project so you can share documents and other things, as well as a discussion forum for “technical queries” – or things they want to know on a technical level what they should do during the migration.

As you can guess, many things in .NET aren’t the same as VB6, the way some controls react, etc. They want to know what to do in those cases. Also, you might have some crazy things going on in VB6 that have no direct translation to .NET, so they need to know what to do there, overall though it shouldn’t’ be too bad

Along the migration, you can get the migrated code as they are doing it every once in a while and look at it and get into source control on your end if you’d like. Also, up to to a certain point you can send minor changes to ArtInSoft, so you don’t have a to have a code freeze for the entire migration. Obviously at a given point, you can’t be sending changes, if you have them, you can do a “change control” request, but it is going to cost you, which is expected.

As they work on the migration, you can work on other things on your end, whatever you’d like. Towards the end of the migration (development), you will send 1-2 people down to Costa Rica to help finish the migration and deep dive into testing and development.

The final phase of the of the migration comes when your team becomes the “testing team” and you do User Acceptance Testing (UAT). You have a specified amount of time to test on your end and send bugs back to ArtInSoft. This is a good back and forth for 1-2 months possibly depending on the size of your application. Once you are OK with the code and app, you sign off and the code in your hands. Next up.. your own “fixing” period.

Categories
Uncategorized

MADPASS Monthly Meeting Tonight!

The second meeting for the Madison Area SQL Server Users Group is tonight. The talk is about SQL Server Clustering for High Availability.

Meetings are always FREE and food is provided.  Details about the next meeting can be found below.
In an ongoing attempt to make the content presented useful to our members we start each meeting with a short Q&A session.  Unless noted in the meeting notes the schedule for each meeting will be:
5:30 – 5:45 – General Q&A session & Announcements
5:45 – 6:15 – Short Presentation
6:15 – 6:45 – Food & Networking
6:45 – 7:45 – Main Presentation
7:45 – 8:00 – Door Prizes & Q&A Session

Topic:   

SQL Server Clustering for High Availability

Date:

Wednesday, March 23rd, 2011  5:30 PM

Speaker:

Michael SteinekeMichael Steineke is the Vice President of Information Technology for Edgenet – Big Hammer.  He has been working with NLBS and Windows Clustering on Windows NT 4 Server through 2008R2, creating clusters with IIS, File System, SQL, ISA, and Hyper-V, including geographically dispersed clusters.  Michael has designed and implemented multiple systems for scalability, high availability and disaster recovery.

Location:

2310 Crossroads Drive
Madison, WI 53718

Park behind the building and walk in main entrance.
Our room will be straight ahead on the first floor.

Live Meeting:
Click here to enter the meeting.

Add Meeting to Calendar:

Click here to add the meeting to your calendar.