jordivayreda-projectteam-stair

Photo courtesy of Neatorama

2 weeks ago I had a seemingly crazy idea. I challenged my colleagues at imason in a contest to see who could last the longest without taking the elevator. Considering we’re on the 8th floor of our building, I figured there wouldn’t be a myriad of people lined up to enter the contest.

Boy was I wrong.

15 people entered the contest, and in the last 2 weeks, imason employees have walked up and down approximately 47,250 stairs.

imason’s employees are so dedicated that some are even riding their bikes to work and carrying their bikes up 8 floors.

Not only is this challenge good for the environment, but it’s also great for everybody’s health. I’ve long been an advocate for active, healthy living and I believe strongly in treating the earth well. This is one simple thing that we can do to help make a small difference.

One thing I don’t know is how long this contest will last. But I can honestly say that I hope it continues for many months to come.

I’m in it for the long haul.

Filed under: ,


Could this be the latest Service Pack for Vista??

IMG_0750

IMG_0749

Filed under:


At first glance, Windows Workflow does a good job of persisting workflows to the database for long-running State Machine Workflows.

However, what happens when you update your workflow assembly? Windows Workflow will try to retrieve the workflow from the SQL Persistence store and de-serialize the object, but it will throw an exception (You’ll see a SerializationException or IndexOutOfRangeException).

There are different ways to handle this situation. The first (and most obvious way) is to set versions on your DLLs so that the workflow will de-serialize into a previous version of a workflow and continue running in the older version. But what if the change you made to the workflow fixes an important bug in the previous version? In this case, you may want  your previously persisted workflows to use the new version of the code.

A few quick Google searches will lead you to a few different options in handling this situation:

  • Using an assembly resolver or using the “AppliesTo” attribute [1]
  • Dynamic Workflows [2]
  • Breaking up into smaller workflows [3]

None of these options are particularly appealing to me, so I had to find a better way to handle updates to the workflow code but still allow my long-running workflows to operate.

My “outside the box” solution: Workflow Rehydration

To achieve Workflow Rehydration, I’m keeping track of the current state in a SQL database and if the current workflow can’t be de-serialized (because the workflow has been updated), I instantiate a new workflow and I set the state to the state it was previously in.

The obvious concern that comes up using this approach is “how do I avoid executing the code inside my StateInitializationActivity?

To get around this issue, I’m passing in a boolean parameter into my State Machine workflow that indicates whether or not the workflow is being rehydrated. I then use an IfElseActivity to execute my State Initialization code only if the workflow is not being rehydrated.

image

The end result is that the workflow goes back into its previous state, but it’s now running inside the new updated workflow code. You might call this a “Utopia State” (Apologies for the lame pun).

The end user has no idea that the workflow has gone through this transformation from an old version of the workflow code to the new version; and it only took a little bit of code along with some IF conditions.

References: 

[1] http://msdn.microsoft.com/en-us/library/aa349375(VS.85).aspx

[2] http://community.bartdesmet.net/blogs/bart/archive/2006/08/28/4322.aspx

[3] http://www.sitechno.com/Blog/WorkflowVersioningOfLongRunningProcessesSucksHereIsMyTakeOnIt.aspx


Seeing my Google Account dashboard made me realize how much I depend on Google:

image

 

A few thoughts came to mind:

  • Google sets the bar very high. They provide high quality products (mostly for free), amazing feature-sets (Google Analytics amazes me), and they always provide a great user experience. It’s very rare that I’ve seen errors in a Google application

 

  • Many Google products are a product of acquisitions. It’s amazing how so many acquired products can be re-factored, seamlessly integrated, and branded to become part of the Google product-line.

 

  • I consider the successes of Google a lesson for me and others in Consulting. If we strive to set the bar as high as Google, we can have a dramatic impact on our clients and build great solutions.

 

I’m only using a small subset of Google applications. Look some of the other applications that are available:

image

 

Not to mention the new applications that are always being developed in Google Labs:

image

Google’s contribution to the explosion of the Internet is as important as Microsoft’s contribution to the explosion of Personal Computing. Google will continue to build great applications and constantly raise the bar to provide end users with amazing options.

My first memory of Google applications raising the bar (Aside from Google Search) was on June 30th, 2004 when I observed Microsoft raise the Hotmail mailbox limit from 2MB, YES, 2 MB!! to 250MB!

Filed under: ,


On my current SharePoint/InfoPath project, we’re using NAnt to deploy absolutely everything. NAnt creates SharePoint pages, imports web parts to pages, activates SharePoint features, deploys assemblies, creates SharePoint lists, creates/updates SQL databases (via DBDeploy), packages and deploys InfoPath forms, copies XSLT/XML/ASPX files, and much much more.

I always boast about how when a new developer comes on the project, he/she can have a fully operational SharePoint development environment within minutes. This is an important achievement, as most SharePoint Developers know it can be painful to automate deployments to SharePoint sites.

This works great for a Development environment, but what happens when you need to deploy to Production? Some companies don’t allow NAnt to be executed directly in Production, so you’ll need to setup your NAnt build files to execute on a build server to prepare for a Production deployment.

To achieve this, I went back into my NAnt build file and updated my NAnt targets to allow for the “preparation” of a deployment rather than actually performing the deployment. This provides us the ability to run NAnt on a build server in order to package everything for an easy automated deployment in Production (without NAnt).

I’m leveraging Windows Installer XML (WiX) in order to package the deployment files into MSI packages (In a future post I’ll get into more detail about using WiX MSI’s for SharePoint deployments). For SharePoint feature installation/activations and InfoPath form deployments I’m generating a batch file from NAnt that gets packaged into the MSI and executed when the MSI is installed on the server.

First we prepare the batch files – this will create 3 new empty batch files with a line “ECHO OFF” inside them:

   1: <target name="PrepareBatchFiles"> 
   2:     <echo file ="${featuresDeployment.cmd}" append="true" message="ECHO OFF" /> 
   3:     <echo file ="${formsDeployment.cmd}" append="true" message="ECHO OFF" /> 
   4:     <echo file ="${dataConnectionsDeployment.cmd}" append="true" message="ECHO OFF" /> 
   5: </target>

Next, we append STSADM calls to the batch files – anytime we call STSADM from NAnt, we will add a row into the batch file. Here’s an example when we’re calling the “UploadForm” NAnt target:

   1: <target name="UploadFormTemplate" description="Uploads an InfoPath Form">
   2:     <choose>
   3:         <when test="${prepareDeployment=='true'}">
   4:             <echo file="${formDeploymentBatchFile}" append="true" message="echo Attempting to upload form template '${formName}.xsn'" />
   5:             <echo file="${formDeploymentBatchFile}" append="true" message="${stsadm.exe} -o uploadformtemplate -filename &quot;${deploymentFolder}\Forms\${formName}.xsn&quot;" />
   6:         </when>
   7:         <otherwise>
   8:             <exec program="${stsadm.exe}">
   9:                 <arg line="-o uploadformtemplate" />
  10:                 <arg line="-filename &quot;${publishedFormsFolder}${formName}.xsn&quot;" />
  11:             </exec>
  12:         </otherwise>
  13:     </choose>
  14: </target>

You can see from the NAnt target above that  it checks whether we’re “Preparing” a deployment or if we’re actually deploying. If we’re preparing the deployment, it will generate batch files and copy files to a deployment folder. I’ve added the “choose –> while” condition into each NAnt target so that I can prepare my deployment files for the MSI.

The generated batch file will look something like this:

   1: SET STSADM=C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\STSADM.exe
   2: ECHO OFF
   3: "%STSADM%" -o deactivateformtemplate -url http://sharepoint-serv -filename "C:\MyForms\MyInfoPathForm.xsn"
   4: "%STSADM%" -o removeformtemplate -filename "C:\MyForms\MyInfoPathForm.xsn"
   5: "%STSADM%" -o execadmsvcjobs
   6: ECHO Attempting to upload form template 'MyInfoPathForm.xsn'
   7: "%STSADM%" -o uploadformtemplate -filename "C:\MyForms\MyInfoPathForm.xsn"
   8: "%STSADM%" -o execadmsvcjobs
   9: "%STSADM%" -o activateformtemplate -url http://sharepoint-serv -filename "C:\MyForms\MyInfoPathForm.xsn"

Now when I add a new form to be deployed, it will be automatically added to the batch file for the Production deployment. The end result is that I can run my NAnt scripts on a development environment to actually deploy my SharePoint components, or I can run the same batch scripts on a Production server via an MSI package.


Tonight I was changing some settings on my personal blog when I was prompted to type in a CAPTCHA word to verify I’m not a spamming bot.

Normally the words are meaningless words such as “BRASSI” or “LILLI”. This time the word was a bit more recognizable:

image

The word was actually “Licksak” if you can believe it. I can picture the person who built the CAPTCHA functionality for Blogger throwing in a few words like this to amuse himself/herself. Vulgar enough to be funny, but not too vulgar that it won’t get past QA.

I know what you’re thinking, CAPTCHA words are computer generated. But I still prefer to picture a computer geek, alone in a dark, closed room deviously thinking of vulgar terms to sneak in.



Thanks to everyone who made it out to our Advanced InfoPath Development session yesterday at the Toronto SharePoint Camp. We had quite a good turnout; so I’m glad to see there are lots of other people out there using browser-based InfoPath forms using Forms Services on SharePoint.

InfoPath makes it easy to quickly develop forms, but it doesn’t come without its limitations. It’s very heavy on JavaScript, thus performance isn’t great when you have a lot of fields and rules. It doesn’t support multilingual, and it’s not very good at field validation. In this session we showed the audience how to get around these limitations by writing some simple C# code.

I’ve posted the PowerPoint slides as well as the source code for the InfoPath form, the Web Service, the Web Part, and the NAnt XML build definition.

If you’re interested in learning more about NAnt, send me an e-mail because I’m thinking about organizing a NAnt lunch and learn session at the imason office open to all Developers. We’re located in downtown Toronto on Adelaide Street near Peter St.

Download the source code (SharePointCamp.zip), and PowerPoint slides (SharePointCamp-2009.pptx) here.

image

image


On Saturday, January 24th, four of us from imason will be presenting at the 2009 Toronto SharePoint Camp at the Manulife Corporate Headquarters @ 200 Bloor St. East. If you’d like to come out to see our sessions, register here. There will be lots of free giveaways and prizes. Here are some details about our sessions:

Upgrading your SharePoint platform from WSS 2.0 to WSS 3.0/MOSS 2007

Bob Brown

bobbrown

Time:   9:00 AM to 10:15 AM  Room: Holmes B

With SharePoint 2007 taking on widespread adoption, many enterprises are starting to take advantage of the new and improved features of the new platform; but what about administrators and developers that are still supporting a growing business critical SharePoint 2003 environment and have been assigned the daunting task of upgrading? There seems to be an endless list of things to take into account before taking the plunge and upgrading.

In this session, I will walk through how to assess your system to make an educated migration path decision, draw up the high level upgrade steps, and then dig in on some specific snags you'll likely encounter (including custom web parts, FrontPage and unghosted pages, broken permissions, site themes, and legacy templates)

Advanced InfoPath development with SharePoint

Jim Schwartz & Boyan Tsolov

jimschwartz boyantsolov

Time:   2:30 PM to 3:45 PM  Room: International B&C

InfoPath 2007 has many limitations and doesn’t scale very well with complex forms. Using a custom solution built on SharePoint, we’ve extended InfoPath to support very complicated form functionality. In this session, we will describe to you how we overcame several InfoPath limitations, including multilingual support, pre-populating form data, field validation, and support a flow between several forms.

Effective Deployment of SharePoint Publishing Sites

Ivan Neganov

ivanneganov

Time:   4:00 PM to 5:15 PM  Room: Holmes B

SharePoint implementation presents many challenges to development teams with deployment often viewed as an area of the primary complexity and importance.

Over time we have accumulated a rich set of utilities which allow deploying SharePoint sites in a fully unattended fashion or close to it, by using custom logic interacting with SharePoint API.

Efficiency of deployment has a dramatic impact on practical aspects of agile and team development using SharePoint, which makes us invest in building comprehensive tools for SharePoint deployment.


Having 2 separate blogs sometimes makes it difficult to decide which blog to post to; especially when writing on a topic that applies to both.

I decided to post today’s article to The Urban Country, but I still wanted to capture it here because it’s about Technology. Here’s an excerpt:

“I'm confident that humans are intelligent enough not to succumb to the form of extreme laziness illustrated in Wall-E, but the movie should indeed be a wake-up call for what could happen if we embrace technology for all of the wrong reasons.”

Read More

photo-vhs

Filed under: ,


Every day for the 2 weeks leading up to to Christmas, imason gave each employee a small gift. One of the gifts was something of a "confetti canon". A few colleagues and I had wars between us and on one occasion I videotaped Boyan shooting the confetti in a senior co-worker's office.

I wanted to try out Windows Movie Maker, so I put together a short clip of the confetti shooting coupled with some Benny Hill music (The idea for the music came from the Benny Hillifier - a site where you can take any YouTube video and apply Benny Hill's Yakety Sax to it).

Using Windows Movie Maker, it took only 10 minutes to make this short video (The haste in which I created the video will quickly become apparent when you watch the video). Although Windows Movie Maker has a couple neat features, I still prefer Corel/Ulead's VideoStudio Professional which I used to create my Summer 2008 video. The price tag of $79.99 is well worth it, but Windows Video Maker is free so if you don't need the extra features provided by VideoStudio, Windows Movie Maker might do the trick.

Here's the short movie clip that I've entitled "Fun at imason":

 

 

Filed under: , ,


Many of my co-workers here at imason are University of Waterloo alumni. I often hear people talking about Waterloo Economics Associate Professor Larry Smith. He's apparently a very knowledgeable and entertaining professor, but I didn't have the privilege to attend Waterloo.

Somebody posted a "Larry Smith Lingo & Prof Quotes" page and although these are probably more entertaining for those who have attended his classes, I still found them to be very amusing anyway. Here are my favourite 11 quotes:

  • I'm sorry, ladies and gentlemen; we're finishing this course come hell or heart attack
  • You can go to the Bank of Canada website and look up these numbers [about forms of money]. It's more fun than visiting a porno site.
  • People who have REAL lives get hundreds of email messages a day. How do I know you're a real person? When I ask you how it's going and you say: Damn email's driving me crazy! Yes! You've reached manhood!
  • Maybe I should fall down and break my neck. That would be entertaining
  • Masturbation is merely the act of making love to the one you love best.
  • I'm a legend in my own mind.
  • Beware, beware, danger there lurks. Warning, warning, run in the other direction...
  • Americans know of only two countries America and Not-America.
  • A person who can see in the land of the blind will be king
  • I wonder where she [Buffy the Vampire Slayer] was in my highschool. . .all my teenage fantasies rolled together.
  • I don't need to impress you, I impress myself
Filed under: ,


While working on my .NET State Machine workflow today, I ran into an issue: I wanted to send an e-mail to a user every XX days to remind them to finish filling out a form, and I wanted those e-mails to continue being sent until the form had been filled out.

At first I thought this would be a simple While Activity with a Delay Activity timer inside it, but a Delay Activity has some limitations: I originally added it to my StateInitialization Activity, but it can’t be used inside a StateInitialization Activity because it inherits the IEventActivity interface. This also means that you can only use a Delay Activity as the first Activity in an EventDriven Activity, which prevents you from putting a Delay Activity inside a While loop.

So I took a quick look at other people running into the same issue and found this user group discussion, but I didn’t see any viable solution for repeating the Delay Activity indefinitely.

So to solve this, I added a new EventDriven Activity to my State Activity and set the Delay Activity as the first Activity in the EventDriven Activity.

clip_image002

Then I added an IfElse Activity to check if the form had been filled out or not. If the form is filled out, I change the state to “CompleteState”. But if the form hasn’t been filled out, I set it back to the current state which will re-trigger the EventDriven Activity, thus re-starting the Delay timer.

clip_image004

It will continue this loop until the form is filled out, sending an e-mail every time it executes. This is exactly the functionality I was looking for, but the approach to accomplish this was slightly different than I had expected.


In my 6+ years in the software development business, I’ve used a variety of techniques for performing developer knowledge transfers. When I hold a knowledge transfer session, I like to set my own objectives (What am I hoping to get out of the session?), familiarize myself with the objectives of my audience (What is my audience looking to achieve?), know the audience’s skill level (If I move quickly, will they be able to follow?), and I like to be familiar with the logistics (Have I booked a training room? Do I have sufficient hardware? Software is installed? Do I have Admin privileges?)

When your audience is large, the technique is much different than when the audience is small. It’s more difficult to completely engage a larger audience, so the key is to do hands-on training to ensure your audience is following along. I’ve done sessions that weren’t hands-on, but they were far less effective than the hands-on sessions, and are usually a result of time/logistics constraints than anything else.

To date, my most effective developer knowledge transfer session involved choosing 2 or 3 small feature enhancements (Or bugs), and using a “Pair Programming” approach to develop these features. This obviously works best in a pair (i.e. training 1 other person), but I think it can also be effective for training up to 3 developers. Using a meeting room on a projector, each developer would take turns writing some code. This keeps them engaged and when they aren’t writing code they stay focused because they need to know what is happening for when it’s their turn to write the code.

I feel that this is the absolute best way for new developers to learn about the code, and it’s the most rewarding way for the developer(s) who wrote the code to showcase his/her code. In addition to the learning benefits, you are also using your time efficiently by actually addressing a new feature or existing bugs. If you’re on tight deadlines, this approach allows you to keep the project moving forward while transferring knowledge at the same time. The last benefit of this approach is you can incorporate a code review into the session by getting an objective viewpoint from the developers you are transferring the knowledge to (Assuming the recipients are experienced enough to have constructive suggestions).

In summary, the benefits of hands-on knowledge transfer are as follows:

·         Productivity in that the project keeps moving forward (Tight project deadlines are a reality in our industry)

·         Hands-on learning for the recipients (Make sure to use proper source control in case something goes wrong J)

·         Simultaneous code-review (Find all those divide by zeros)

·         Better focus from the participants (Nobody falls asleep)

Filed under:


Over the years, India has evolved from being a cheap-labour offshore destination in the late 90's to becoming a premier full-range IT services destination in the 21st century. The primary reason for this trend is the highly educated and English-speaking workforce in India, as well as their hard work ethic and enormous population.

In the early 2000's, India had achieved some great accomplishments in the area of software quality; 75% of the world's CMM Level 5 software centres were in India (At the time, CMM Level 5 was known as one of the highest levels in standards of quality).

Offshoring has not been without difficulties. Many projects that I've personally been an observer of have not lived up to expectations, mainly as a result of miscommunications or lack of sufficient business requirements. I can imagine how difficult it would be to get clarification on business requirements with the time zone differences and the long distance. Technology consulting companies have enough difficulties as it is even when having the luxury of a nearby client.

But alas, the point of this article was not to delve into the pros and cons of offshoring, but to point out how India's services have evolved over the years.

Just today, the Pittsburgh Pirates have signed two 20-year old Indian baseball players who have never played baseball. Rinku Singh and Dinesh Patel took part in a pitching competition reality TV show in India sponsored by a California sports management company, who awarded Singh $100,000 and Patel $2,500 for winning the contest.

The Pittsburgh Pirates are hoping to teach these young men how to play baseball in the minor leagues in the hopes they could become Major League pitchers in 3-4 years. Being cricket players, they weren’t accustomed to wearing a baseball glove, so they had to be taught not to catch the ball with their bare hands.

In our world of globalization companies both inside IT and outside IT are scouting the global pool of talent to find the best and the brightest people. The Pittsburgh Pirate recruitment from India is symbolic of the direction business is headed in our ever-shrinking world, and countries like China and India will become more than just offshore destinations, they will open the door to many new possibilities previously untouched.


A bunch of us at imason are taking part in Movember to raise awareness and raise money for Prostate Cancer.  For those of you who aren’t familiar with Movember, the idea is that you grow a moustache during the month of November to raise awareness for men's health. I don’t want to say that we’re “embarrassing” ourselves to raise money, because that could be perceived as a shot against people who normally wear a moustache.

There  is nothing wrong with having a moustache, but for those of us who don’t normally wear a moustache, it is a bit embarrassing (but fun at the same time).

It’s interesting to me how everyone looks completely different when they grow a moustache. My co-worker Boyan looks like Freddie Mercury, Rez looks like a scary hitman, Shahzad looks like a Venice Taxi Paddler and Steve looks like a Medieval Viking.

I wasn’t sure what I would look like until I trimmed up today. Due to my inept ability to grow hair on my face combined with my “overtrimming”, I unfortunately ended up looking a bit like Adolf Hitler.  I have one more week remaining to let it “thicken out” a bit. Hopefully by the end of the month I’ll look more like Tom Selleck.

 

Filed under:

More Posts Next page »