|
|
Sean Winstead's web site & blog
-
I've been working on a Community Server project where we're migrating a customer from an existing platform into Community Server 2007. There are over 260,000 posts in their forums. I ran into a performance issue with the Search Barrel provider. The stored proc was taking a wee bit too long to scan through the posts. I messed around with the stored procedure cs_SearchBarrel_Search and came up with what should be a pretty good performance improvement. The original stored proc took 38 seconds to execute a particular search. With this version, it takes 12 seconds. The key changes are to a) set a primary key on a temporary table used to build the list of search results and b) join fewer records together to build the final result set. I'm posting the updated stored proc here as well as to the CS forums. SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO ALTER procedure [dbo].[cs_SearchBarrel_Search] ( @SearchSQL NText, @PageIndex int = 0, @PageSize int = 25, @SettingsID int ) AS SET Transaction Isolation Level Read UNCOMMITTED BEGIN DECLARE @StartTime datetime DECLARE @RowsToReturn int DECLARE @PageLowerBound int DECLARE @PageUpperBound int DECLARE @Count int DECLARE @TotalRecords int -- Used to calculate cost of query SET @StartTime = GetDate() -- Set the rowcount SET @RowsToReturn = @PageSize * (@PageIndex + 1) --SET ROWCOUNT @RowsToReturn -- Calculate the page bounds SET @PageLowerBound = @PageSize * @PageIndex SET @PageUpperBound = @PageLowerBound + @PageSize + 1
-- Create a temp table to store the results in CREATE TABLE #SearchResults ( IndexID int IDENTITY (1, 1) PRIMARY KEY NOT NULL, PostID int, SectionID int, Weight int, PostDate datetime ) -- Fill the temp table INSERT INTO #SearchResults (PostID, SectionID, Weight, PostDate) exec (@SearchSQL) SET @TotalRecords = @@rowcount SET ROWCOUNT @RowsToReturn -- SELECT actual search results from this table SELECT P.PostID, P.ThreadID, P.ParentID, P.PostAuthor, P.UserID, P.SectionID, P.Subject, P.PostDate, P.FormattedBody, P.IPAddress, P.PostType, P.SettingsID, P.UserTime, P.ApplicationPostType, P.PostName, P.UserTime, AttachmentFilename = ISNULL ( (SELECT [FileName] FROM cs_PostAttachments WHERE PostID = P.PostID), ''), S.ApplicationKey, S.GroupID, S.ApplicationType, S.Name as SectionName FROM cs_Sections S JOIN #SearchResults R on R.SectionID = S.SectionID JOIN cs_Posts P on P.PostID = R.PostID WHERE R.IndexID > @PageLowerBound AND R.IndexID < @PageUpperBound AND P.SettingsID = @SettingsID ORDER BY IndexID DROP Table #SearchResults SELECT @TotalRecords SELECT Duration = GetDate() - @StartTime END
|
-
Have you gone to a restaurant and left realizing that you've eaten way more than you should? If you were raised to clean your plate and you eat at typical American restaurants that serve huge portions of food, it's easy to do. Over the past year, I've tended to asked the waitress to leave food off my plate (e.g., leave off the fries when I'm ordering a burger) because I know that it will be too much for me to eat. I'll head home and doze off instead of playing with the kids or working. So I was pleasantly surprised to read an article about TGI Friday's reducing the size of their portions, as well as the size of the bill. What does this have to do with starting a business? Or being an Independent Software Vendor? It's an example of finding a way to stand out from the competition, while still appealing to your customers. The article says that while average bill size has gone down, more people are eating at their restaurants. It sounds like it could be a win-win situation for the restaurant and a society where it's easy to get fat. -- Sean Winstead
Tags: business, life
|
-
The subject of this post is quite off topic for this blog. But it causes me enough concern that I want to write about it anyway. It's been reported that significant numbers of commercial bee colonies have literally disappeared. The hives are intact, they contain honey, but the majority of the bees have left and gone elsewhere, presumed dead. I first read about it in an article on the ABC News website titled Spring Mystery: Where Are All the Bees? It states that "Beekeepers estimate that 600,000, about 25 percent of the colonies, have been affected by the mysterious disappearance". The number of states affected is listed as 27. I've known that bees have suffered serious losses over past years due to mites. But this is different and seems to be larger in scale. Last night, I searched for more information (links to follow). I could find no specific, proven cause of the problem, as it seems there is a lack of funding to find out. The majority of the articles believe it to be related to pesticides and cite forensic evidence where the remaining bees found in the hive are bearing an excessive number of viruses and fungi. They believe these are present because the bees' immune system has collapsed and such a thing could be caused by pesticides. No predators appeared to have caused the losses. I'm not trying to be alarmist. Just writing this up because it scares me, much of our food depends upon bees, and I'd like other people to know about this problem. Following are some of the articles that talk about the bee disappearances. I really don't know how to verify this information, so I'm treating it with a grain of salt. - Where have the bees gone? Here's why you should care - March 31, 2007
- USDA faltering on bee epidemic, House panel says - March 30, 2007 - Mentions that it could be caused by a disease that comes from bees imported from Australia or from "a new generation of pesticides known as neonicotinoids, now being widely used for insect control". A scientist, Diana Cox-Foster, of Pennsylvania State University, was also quoted as saying that the problem has not yet been seen among Africanized honey bees (i.e., killer bees).
- Bee Crisis Hearings Yesterday - March 30, 2007
- Update on Bee Disappearance - March 26, 2007
- Honey Bee Disappearances: Could Pesticides Play a Role? - March 16, 2007, this article includes a map of the affected states. It cites 3 cases where beekeepers experienced a high percentage loss of hives. For example, one beekeeper lost 80% of his hives, another 60%, and another 96%.
- Creating a buzz about massive, mystery bee disappearance - March 6, 2007, one source in the article believes it is parasites that cause the problem.
- Species Under Threat: Honey, who shrunk the bee population? - March 1, 2007, this article mentions that dead queen bees are left behind in the hives. It says that predators are not taking advantage of the deserted colonies, pointing to something toxic in the colony that is repelling the predators.
- Part 1: Earth Life Threads - Alarming Disappearance of Honey Bees - February 23, 2007 - Mentions that Spain and Poland have experienced serious losses, but not France and Italy. Suggests the latter countries may have not experienced losses due to their bans on certain pesticides.
-- Sean Winstead
Tags: bees, life
|
-
Community Server's Single-Sign-On modules handle the case where: - You have an ASP.NET website with an adjoining Community Server website
- Members log into your main ASP.NET website and you want Community Server to recognize that site's authentication of the member
What if members log into your Community Server website but not your main ASP.NET website? Over the past week, I've encountered two people who want membership to be handled by Community Server. But their main website needs to determine whether the member is authenticated via User.Identity.IsAuthenticated and User.Identity.Name. It's possible to do so. I tested the scenario where the main website is at www.yourdomain.com and the community is at community.yourdomain.com. Both sites use forms authentication. In order for www.yourdomain.com to see the authenticated user, you must make sure that two elements within the web.config file of each website are compatible. In the <forms> element of the <authentication> element, the protection attributes must have identical values and the path attributes must have compatible values. In the <machineKey> element, the validationKey, decryptionKey, and validation attributes must have identical values. The following example shows the elements: <authentication mode="Forms"> <forms name=".CommunityServer" path="/" protection="All" timeout="60000" loginUrl="CS login Url" slidingExpiration="true" /> </authentication> < machineKey validationKey = " [your validation key]" decryptionKey = " [your decryption key]" validation = " SHA1" /> This is described with a little more detail in the .NET Framework Developer's Guide, topic Forms Authentication Across Applications.
|
-
When I moved to Colorado Springs in 2000, I opened an account with American National Bank. They were called something else then. Anyway, I've had a good experience with them and they've handled all my banking, personal and business. Recently, I've become associated with some top-notch consultants, a couple of whom are based in the UK. We're collaborating on a project and it turns out that my company, Surehand Inc., will be the primary contact for the project. I'll invoice the customer and the other consultants will invoice me. It should work out well. The problem is, I have to get money into the hands of the UK guys. The only option I've found is to use wire transfers. I haven't had to deal with them much, so I looked into the cost. A couple of weeks ago, I was downtown for business and stopped by the American National Bank main office. Figured I could get some information about wire transfers and one more problem would be gone. I was directed to a personal banker, a young man, who seemed a bit annoyed or impatient with my questions. The bad news: each wire transfer will cost $50 and it's a manual transaction. Today, I stopped by the local branch where I conduct my business. There was a flicker of hope that the young, impatient man was wrong. This time I wound up with a personal bank who seemed pre-occupied and ready to knock me off her todo list as soon as possible. The news was no better and this time in print: $55 per wire transfer. Okay, so I'm a little annoyed at how I felt I was treated. But I'm a bit more shocked at how small American National Bank now appears to me. I like them, but in this day and age, who wants to pay $55 per transaction and drive to the bank to do it? I've explored two other options: Citibank and Chase. Both have fees less than $55 but Chase is significantly less. And the lady who helped me was nice. I'll switch banks to save $30 multiplied by however many wire transfers I'll make over the next couple of months. Does anyone know of a better option? UPDATE: Rich Mercer mentioned that he lives in the UK and Telligent wires him money via Wells Fargo. I opened an account with Wells Fargo and found the people at the nearby branch to be very friendly and helpful. The wire transfers to the UK have been successful and the cost has been $30 per transfer. -- Sean Winstead
|
-
Over the years, I've always done my own taxes and managed my own books. It's tedious, but why pay somebody else to do it? When I incorporated back in 2005, I decided that I would find an accountant. Choosing to be an optimist about my business' future, it seemed wise to find somebody good and establish a relationship with them while I was still a small business. Through a friend, I was referred to Jeff Wyckoff. Our first meeting was memorable. He showed me why I should have organized as an S Corp instead of a C Corp. In order to make that switch, he had to fill out a form and send it to the IRS. The form required justification for the change. He rattled off an official sounding statement. I pointed out that he essentially said "This guy didn't know what he was doing and now we're trying to clean up the mess"  Our second meeting played an important role in moving me into being completely independent. He had reviewed my business finances in preparation for the 2006 tax year. He told me that I was running thin and not charging enough for my services. That was something I had known but didn't have the courage to tell myself. This guy's a really good accountant, but he became more valuable by telling me a truth that I was afraid to tell myself. It gave me the nudge I needed to change things, even though the notion of doing so was a bit scary. -- Sean Winstead
|
-
I've been using the IE Developer Toolbar to debug styling problems in custom Community Server skins. It's been very useful except that in some cases, I couldn't easily figure out why a property had a particular value. For example, exactly which style is setting the font-weight to bold? Yesterday, that problem was solved for me. The IE team uploaded beta 3 of the developer toolbar. It includes a very handy feature call Style Tracer. If you select an element, the current style is displayed in the bottom panel. If you then right click on one of the style properties and choose Trace Style from the popup menu, a window appears, downloads the style sheet, and sets focus to the controlling style. Relevant links:
|
-
...and probably didn't want to know. But I was tagged by Julian, so here goes: - My software engineering career started in high school. A friend of mine was going away to college and he helped me get his job at the local newspaper. We lived in Evansville, Indiana. The Evansville Courier and Press had come up with a program named Newspapers In Education. It was a novel concept: Give teachers free newspapers to use in the classroom for educational purposes.The kids should then be more likely to read newspapers when they grew older. As part of that program, I would write new computer games that tied in with using the newspaper. I also converted old Commodore black and white games into Commodore 64 games with color and sound. We'd hand out the games to the classrooms.
- During high school, the Apple computer came out. The only one in the school was in the office of our biology teacher, Mr. Schwengel. He'd let some of us play with the computer during lunch break. While he was away, I put on a display of my programming prowess by writing a little program. It was an infinite loop that displayed "Mr. Schwengel is a gump!". I proudly showed it off to those gathered around. And then he walked into the room and saw the screen.
- During college, I lived at home. I'd work at the newspaper and go to school. My cooking skills were minimal. One time when my mother was out of town on a business trip, my step father and I were trying to figure out what to eat. I happened to see a big, black army ant crawling on the floor, picked it up, and suggested we should eat it. He dared me. Not being one to back down (at least on this particular dare), I plopped it in my mouth. That's when I discovered that live army ants have sharp mandibles.
- My wife and I discovered that we had previously been at the same place twice, before we officially noticed each other. The one place I'll talk about is at a halloween party. I was dressed as the Jolly Green Giant. I had painted my skin green and crafted some shorts and shirt-like thing that was covered with leaves. She was dressed as a harlequin doll. I remember her saying "Hi" and complimenting me on my costume. But when I was a kid, I had watched a movie with an evil harlequin doll. So I stayed away from her. I was more interested in the girl who had dressed like Sprout.
- One Labor Day weekend while living the bachelor life in St. Louis, I decided to go backpacking in the Irish Wilderness. That's one of the areas in Missouri where motorized vehicles are prohibited. I had been reading books by Tom Brown. He's some guy who would go out in the woods with a knife and live off the land for a while. So I get the gumption to hike into the forest, with only some food, water, knife, and a blanket. No sleeping bag. No tent. After beating my way along a trail covered with spider webs, I climb up a wooded, leaf-covered hill, set up a shelter, and plop down in front of it. While peeling an orange, I hear footsteps on the other side of my shelter. They're walking towards me. My mind starts to freak out. Who's up here on this hill with me? The steps quicken. Then they run. I jump up with my knife. The wild turkey finally notices me and takes off mid-run, flying down the hill.
Hmmm. Who should I tag? I don't know many bloggers who know me well enough to even noticed I tagged them. So I tag Jerilyn and Phillip Blanton (you were already tagged by Julian but haven't written yet). -- Sean Winstead
Tags: Life
|
-
I've been putting the payment gateway portion of the Paid Subscriber add on through various tests. Running it over and over in a test environment is helpful, but there's nothing like the real thing. Yesterday I finished putting together a proposal to skin a site. I'm in the US and the customer is in the UK. It made sense to use PayPal to accept the deposit for the project. So I put together an ASPX page for the proposal. On the page, I placed a Buy Now button for each contract option (e.g., 50% deposit, pay in full with professional discount) and tried them out in the PayPal sandbox. Then I switched the gateway to live mode and used my wife's PayPal account to put through a $1 charge. It worked! That may seem like a paltry thing to get excited about. It is. But then you're talking about the same guy who, with help from a knowledgeable friend, rewired his home from scratch and thought it was magic when the lights actually turned on. Anyway, it was time for the real deal. To make things easy, I put a link to the page in the acceptance portion of the proposal and sent it off to the customer. There's always the possibility that a demo bug shows up (i.e., it works just fine until you show it to somebody). Fortunately, the proposal was acceptable, the checkout process worked, and I had the opportunity to see a real payment come through.
|
-
Did you make some resolutions for the New Year? Is there a whiny, little voice in your head that mutters "What happened to last year's resolutions; you didn't even do one"? Many years ago, I would go through the same old thing each December and January. In my idealistic youth, I could come up with a page or two of resolutions. Out with the old habits, behaviors, and weaknesses. In with the new me! You know what happens. The day-to-day drum of life has a hypnotic beat and it's easy to lose sight of most resolutions. But there is a better way. If you want to see something happen this year, try this approach: - Sit down with your list of resolutions for 2007.
- Find the one that is the most important to you. Not most important to your spouse or your parents or your dog. The one that is most important to you.
- Take a pen and scratch off the rest. You don't need them. What? Do you really think that you can be firm in purpose on more than one thing at a time? That's crazy.
- Think about your most important resolution. Is it a goal or is it a practice? A goal is something like "By the end of the year, I want to be able to run 5 miles without stopping". A practice is something like "I am going to run 1 mile a day every other day for a week. Then I'm going to run 2 miles every other day the next week. And then..."
Behind every practice, there's a goal. There's something that you believe will give you life. But if you don't tell yourself what that goal really is and you're just telling yourself the practice, your practice turns into a law and you stop doing it. Your being cries out for life; sooner or later, your being rebels against law. Make sure your resolution is a goal, not a practice.
- Figure out what practices you need to do over the next two weeks so that you start moving toward your goal. Personally, I'd limit myself to a practice or two. If you have more practices than that, figure out which two you need to do first. Do the others later.
- Do them.
- Give yourself freedom to fail in the practices. You can afford to mess up, especially if you picked the wrong ones or if your stomach was bigger than your eyes.
- Every week or two, adjust your practices as necessary so that you can meet your goal by the end of the year.
- If you meet your goal before the end of the year, congratulations! You should celebrate!
- If you so desire, pick another goal and start anew.
That's it. Pick one thing, figure out how to make it happen, and adjust those plans as necessary. This has worked for me, sometimes despite my plans. -- Sean Winstead
Tags: Life, resolutions, new years
|
-
...and don't read books by people who write blogs. Why? Because they can lead you places that are uncomfortable. They're not to blame for starting me down this unfamiliar path, but I can certainly say they sped up my pace. Where have I gone? Where do I find myself? Shortly before the blogs, I did something unpredictable and helped some other people start a small software company. It's not something you'd expect a married man with four kids to do. But there were good reasons. It felt good to be a founder. In the middle of that, a friend introduced me to the blogs. I read the blogs. Curse you, Julian Bucknall ! One author showed me that I did have something to say. Another showed me that markets are conversations. That the walls we put up in the name of running a business are artificial and silly. And another helped me see the small guy can make a big difference in a customer's life and can have a business that matters. In the middle of that, I became impatient. I butted heads with the principal in our business. And I resigned for those things and for family reasons. I'd left the 9 to 5 world behind and didn't want to go back. Are you still in that world? The principal of the business was merciful. He had a training and consulting business. He let me stay on as an independent contractor, helping out with a big project. It put food on the table and helped me to stay out of the 9 to 5 world. Those were good times. Work hard with good people, make good money. And I kept reading the blogs. They led me to other blogs where people escape from their cubicles, where they extricate themselves from the quicksand of the corporate mold, where there is some hope that you can do something valuable for people and they give you money for it. I got a feel for what I wanted to do, who I wanted to be, what kind of company I wanted to create. A couple of months ago, an itch started. I had the chance to have another customer. I put in a bid for a project and, before hearing back, decided to be forthright with my "boss" about what I'm doing. Forthrightness is good, but if somebody is on the bench after a grueling project and they're loyal where you are not, they get your job. No complaining here. The guy deserves the job. He deserves a quiet holiday season. And so what I longed for, my chance to make something, is now here. The first evening that I learned of my being replaced, of losing my one customer, I was in shock. I had braced myself for it. The blogs, the books, and other things had helped me in that regard. But it was still a shock. If you're familiar with the TV series Lost, you might remember an early episode in the first season where the doctor, a spinal surgeon, talks about an operation where the unexpected happens. It's a nightmare for him. He tells himself that he can be afraid for 5 seconds and then he has to do what he has to do. So that's what I did. I gave myself time to be fearful and now I am trying to live what I dreamed of. It is terrifying and exciting, all at the same time. -- Sean Winstead
Tags: ISV, Life
|
-
We're trying out the payment gateway on a Community Server site. The project lead doesn't have any prior experience with the PayPal test environment, so I wrote a step-by-step article on setting up test accounts in PayPal Developer Central. If you'd like to read it, it's available here on my business website.
-- Sean Winstead
Tags: PayPal
|
-
This is from the back of a Christmas gift that made its way into our home this year. After seeing this, how can you not respect ninjas?

In case you can't read it, it says:
Ninjas can turn invisible whenever they want!
Ninjas can destroy anything without caring!
-- Sean Winstead
Tags: Life
|
-
It's been a while since I wrote about the Paid Subscriber project. That's because I did enough talking and needed to get something done.
Well...part of it is done!
There's now a somewhat generic payment engine that plugs into Community Server and integrates with PayPal. And when I say "generic", the code is structured such that I can add support for other payment gateways like Cybersource or Authorize.Net.
The video below shows you what one of your customers would see. The starting point in the video is a test page containing some buttons for various scenarios. It shows you what it looks like when handling payments through PayPal Web Payments Standard (i.e., IPN), Express Checkout, and Direct Payments.
All the CS-related screens you see in the video are custom screens that come with the payment engine. They use CS themes and are copied into your CS installation. If the layout doesn't suit you, you can tweak them to a certain extent.
Things you don't see in the video: The custom Control Panel screens used to configure the engine. The Shipping Information page.
Enough of that. Here's the video...click on the link and it will pop open in a separate window. Run time is 8 minutes, 23 seconds.
Please let me know your thoughts and questions about what you've just seen. When it comes to the payment process, is this what you're looking for? Is there some way it could be improved? Is the video too long? Too short? What more do you want to see?
If you want to be notified when more is done and when the final product is ready, please either subscribe to my RSS feed or send me an email.
-- Sean Winstead
Tags: CommunityServer, PayPal, SHSubscriber
|
-
This is too good not to mention. Here's the introductory lines from an entry on the Colorado Springs Police Blotter:
At approximately 9:45AM Stetson Hill Officers were sent to stop two donkeys and three horses that were traveling without riders or licenses in the middle of the road on Constitution Ave. heading toward Murray Blvd. Strategically dispatch had sent the CSPD finest cowboys and cowgirl to round up this wild herd.
If you want to read the rest of this fun story, go to the Colorado Springs Police Blotter and look for the incident dated December 13, 2006 at 9:45 AM. As of today (December 14, 2006) it is number three on the list.
-- Sean Winstead
Tags: ColoradoSprings, Life
|
|
|
|