Archive for the ‘Uncategorized’ Category

What does it take to finally run a strong marathon and earn a shoe in the process!

Was it a perfect race, no. But yesterday at the Hamilton marathon I finally ran the marathon I’ve been trying to run since fall 2015. You can tell from the expression on my face it didn’t come without effort, but I’m very happy with the result.


HamiltonFinishPrevious marathons

I always liked 5 km and 10 km races. I blame my sister Judy and my friend Christopher for putting marathon ideas in my head, eventually I decided to give it a try.

  • Spring 2014, I ran 3:53:05 at my first marathon in Ottawa. I was thrilled because that got me into Boston 2015. I ran it in 4:05:43. I was happy. It’s a tough course, I didn’t push it, I wanted to soak in the atmosphere and enjoy the experience.
  • Philadelphia 2015 I tried for a sub 3:50 and ran 3:51:47. I was happy to have a PB but a little frustrated trying to learn how to run this marathon thing. I tried again at Grandma’s marathon 2016. It’s a fast course but unfortunately it was miserably hot and I finished in 4:07. No fall marathon in 2016 due to hamstring issues.
  • Spring 2017 I ran Boston 2 Big Sur, which mean two marathons in 2 weeks so suffice to say I did not try for a personal best, each race was over 4 hours. But, it gave me more confidence in my strength on the longer distances. New York City 2017 was my third attempt to break 3:50, trying to follow the pace bunny was a bit of a disaster, and I gave up on the pacer at km 26, I did hold on to run a PB 3:49:19 but it wasn’t pretty.

 

  • Spring 2018 I ran the Vancouver marathon with a goal of 3:45. I still don’t know what exactly went wrong, probably heat? I’ll never know for sure. Suffice to say I felt great at the start was on pace for my 3:45 and it all fell apart at 21 km. I finished in 4:05:30 bitterly disappointed. My fall race was Chicago, a fast course, In January I had visions of 3:45 in Vancouver and 3:40 in Chicago. but after the disaster that was Vancouver, I needed a morale boost. So I decided to just try and run a strong sub 4. I had a great race, felt strong the whole way, finished in 3:52:30 smiling.
  • Spring 2019 I was back in Boston, it was warm, first run in shorts since November. This is not the day to try and PB, so I set a simple goal of running my first sub 4 in Boston. It was close but I powered through the last km to finish in 3:59:25.

Working towards the goal

Through all four years, all my times on the track, and in shorter distances indicated I could run a marathon faster. I just couldn’t make it happen. People running with me on the track were posting sub 3:40 times. Why was I struggling so much just to break 3:50? The marathon is cruel that way 🙂 it teases you. You know you can do it faster, but you only get a couple of shots at that distance a year and I think that’s part of the appeal. It’s a challenge to run a marathon *well*.

I trained hard every season, I cross-trained, I did hills, I did speed work. 2019 things seemed to be coming together.

I was running well on the track, but I generally do run well on the track. That’s where I look the fastest compared to other distance runners. But, I was hitting some sub 7 minute 1600s. that was new.

canadaDayRandyI decided to take a serious shot at breaking 45 minutes on a 10 km. My current PB was 45:03.  I always had a mental block with the idea of running sub 4:30 kms for 10 km. I picked my race, I even did a ‘run your fastest 10 km’ 6 week training plan leading up to race day. I got my friend Randy to pace me. I jogged the route three days before the race to learn the hills and turns. Race day was not perfect. It was warm. But with some help from Randy, I left it all on the course and finished in 44:36. (as an added bonus I was 5th woman overall, I sneak in the occasional age group placing, but I’m not usually in the top overall).

So could I beat my 5 km PB? That requires a PB friendly race. There’s a 5 km in New Brunswick near my parents place, called the Joe McGuire race that is flat and fast! My dad drove me out while I was visiting, there was a little bit of wind, and it was a touch warm, but I managed to finish in 21:33 beating my previsou PB of 21:47.

armyPacerSo now I had the strength from my marathon training and my legs were remembering how to run fast. Could I put it all together? My fastest half marathon was a 1:46, which I *knew* I should be able to beat. I went out with the 1:45 pace bunny and posted 1:43:20 at the Ottawa Army Run in September and felt good the whole way. You can tell I am having a good race when I have the energy to goof around with the race photographers trying to give my pace bunny bunny ears.

Can I produce the results I want at a marathon?

The Hamilton marathon is advertised as a fast course. It has a downhill from 22 – 28 km. I struggle the most mentally from 21-32 km so this worked in my favour. The biggest issue with Hamilton is actually the long downhill. A lot of runners find it beats up their quads. One of the things I worked on after my first Boston marathon was my downhill running. I now take pride in begin a strong downhill runner. In fact I ran a leg at the Peak 2 Brew relay race which was 10 km continuous downhill with an average 6% decline this summer. I figured it would be good preparation for Hamilton. I trained for it and even  with the training, it took me 4 weeks to fully recover from that 10 km downhil run, but the training did 100% pay off! I pass a lot of runners on downhills now and it’s very satisfying.

ElevationProfileHamilton

I also knew that my best times always came at fall races. Training in winter and racing in spring does not lend itself to personal bests. It’s hard to run fast in winter on icy and snowy roads, and if you get a hot day for your spring race, you aren’t acclimatized and it can really mess you up. Whereas if you train through the heat in the summer, then you feel really fast when it cools off in the fall.  You do also learn from every marathon you run, even those where you are disappointed with your results. Even if a marathon does not go well the training you put it does build and make you stronger for the next one.

Okay so back to Hamilton… It’s a fall race, I’ve set PBs on 5km, 10km, 8 km, 15km, and 21 km already this year. It’s a fast course. It’s time to run that sub 3:45! I decide to follow a pace bunny since I know my Garmin runs a little fast (i.e. it will read 1.0 km when we are at .98 or .99 kms). I figure if I feel good maybe I’ll even try to pick it up at 37 km and get under 3:44.

zebrawarmupgearMy sister and I hit the thrift shop for our traditional keep warm at the start throwaway clothes (matching zebra outfits this year!)

But wait there is no 3:45 bunny in Hamilton. It’s a small race, there’s a 3:50 and a 3:40. Uh oh. Runnign with a 3:50 and then taking off to get under 3:45 sounds risky. Well, I guess it’s time to see what these legs can do. Let’s run with the 3:40 and see how long I can hold on!

The forecast is decent, not too hot, a little windy, but that’s okay, when you run with a pacer you can usually find someone to draft behind 🙂 I’m in the gynasium at the start line and I see someone holding the 3:40 sign. I walk over to ask his plan, will he walk water stops, will he run an even pace or negative split? He tells me he’s not the pace bunny, he was looking for the 3:40 pace bunny and they gave him the sign since the bunny forgot it. But he introduces himself to me, nice to meet you Julio and says “stay with him since I’ll get you there in 3:40”. We go to the start line. We can’t spot any 3:40 ears. He gets the announcer to ask the 3:40 bunny to come get their sign. At this point a half dozen other runners have come over to join us since he’s holding the 3:40 sign. Julio shrugs and says oh well, I guess I’ll be the 3:40 pacer.

Off we go, it turns out Julio has paced other races, including a recent 1:50 half marathon. He’s also run the Hamilton race before. He starts calling out to runners what to expect on the next stretch of the race and the planned pace. “we are 30 seconds ahead, we’ll lose time when we turn into the wind, but don’t worry we’ll get it back on the downhill at 22 km”.  He calls out the water stops. Since we had already chatted in the gym, I find myself running beside him chatting amiably.

An added bonus, one of my long run buddies Terry joins the pack! Terry has a goal of running 100 marathons before he turns 50! He will run 3 marathons in a month during peak race season. This is the first time we’ve been in the same race. Unfortuantely it’s end of race season, and 3:40 is too agressive given the strong race he ran at Petit Train du Nord and he drops off, but not before we get an official race picture together !

SusanTerryHighREs

At km 13 another runner says to me ‘ you can run faster than 3:40 if you are able to chat that much’. Julio and I laugh, One thing I have learned is that staying relaxed as long as you can really helps. If I can’t talk 15 km into a marathon I’m probably not going to hold that pace! I had the pleasure of doing track work with a guy named Jim who would hum and sing to himself doing speed work while my friend Henry and I panted along trying to keep up.  When I finally ran a race with Jim I discovered he does the same thing during the race, humming as he passes you. Whenever I find myself tightening up in a race, I try to channel my inner Jim, I won’t say I can sing and run a marathon at the same time, but I do try to smile, and relax.

Julio was wearing gloves and holding the sign, so I open his gel packs for him and we continue to chat, other runners occasionalyl come up to joiKanakoHappyRunnern us and chat as well.

I am feeling good and suddenly I see a spectator in a K2J shirt (there were very few spectators on this race) and it looks like… it is, it’s Kanako and her husband Face!!!  Kanako is another of my long run buddies. Neither she nor Face is racing this weekend, what are they doing here? I run over give her a hug and my spirits are buoyed. Kanako is another fast runner who is always smiling during races. She is constantly getting her race photos picked for race advertisements!

“Okay this next stretch will be windy, we will go a little slower here to conserve energy and we will make it up on the downhill” says Julio. I drop behind the shoulder of Julio or other runners for a good chunk of the 8 km stretch with the headwine. I move out front whenever we approach a water stop. They are short water stops. I am not carrying any water, and with the stops 3 km apart I want to make sure I take something at each stop.

We finally turn off the windy bit and to our shock the police directing traffic stop the runners to let the cars drive through. Frustrated we jog in place afraid of seizing up until he lets us through. I make the comment ‘hope no-one misses their target by 30 seconds because that would suck’ but I shake it off and try to relax, getting angry won’t help my race, and we have just arrived at the top of our 7 km downhill! I am in my happy place, we cruise down the hill and by the time we reach the bottom we have 20 seconds in the bank. I’m at km 28 and still on pace for a 3:40!

Of course the downhill is over now, but it’s flat. Lots of people told me the flat would feel really tough after that long downhill, but honestly I was okay, I think that downhill training paid off. I start thinking maybe I’ll actually pick it up at 37 km and run sub 3:40!

We started with about 20 runners in our 3:40 pack. Once we left the downhill it thinned out fast. By 31 km there were only four of us left. One guy said “I’m going to pick it up the last 10 km, anyone want to join?’ I said no thanks, I might go at 37, but not until then, a lot can happen in the last 10 km. (Foreshadowing?  or experience ?)

Km 32-36 were into the wind. I had dropped behind Julio’s shoulder, and the conversation had definitely dropped off. I was running out of steam. I used my strategy of dedicating each of the last 10 km to a different person who *cannot* run a marathon do to illness or injury and would love to trade places with me right now. Rita, James, Krissie, Jesse, Mel, Chris, Rosanna, Guy. At km 36 I gave Julio his last gel and he said okay that’s my last gel, take off, make your move. I replied weakly ‘I’m just trying to hold on’ . There were two of us still running with Julio and both of us were hurting. km 37-38 I thought of Randy helping me get through the last few km of that 10 km PB and how much that hurt  but I had held on. km 38-39 I thought of the friends I had who were diagnosed with cancer in the past month, what did I have to complain about.  (Side note: Cancer SUCKS!) The last water stop was at km 39, Julio was 100-200 meters ahead of me, The other guy had dropped off. I decided to walk about 20 steps at the water stop. First time I walked the entire race. I was struggling, but I was still passing people. Hey a few spectators – please cheer me on please!!!! What I would give for a familiar face to show up and run me through this last km right now! I’m counting off every 100 m in the last mile. We make the final turn toward the finish – 100 meters to go? and *F*K* it’s uphill into the wind, ” Seriously uphill and headwind” I said out loud completely miserable. “Yes but you can see the finish line” yelled the volunteer. I mustered what I could and I won’t say I sprinted to he finish but at least I didn’t slow down. 3:40:29! FYI Julio finished in 3:39:58 all alone, but I did find him in the finish tent to say thank you, he really helped me pass the miles, and I appreciated not only his pacing but his company!

JulioandSusanFinish

I feel like I finally ran a ‘good’ marathon. Could I have run faster? Not much! I certainly didn’t have anything left at the finish. I had run through the suck and held on to the end without completely falling apart. I didn’t just achieve my goal of 3:45 I had come within 30 seconds of my stretch goal (I wonder what would have happened if we hadn’t been stopped at those traffic lights :))

A few years ago, I was congratulating Corey,  another K2J runner, on winning a race (yes 1st overall) with a PB and he said “well the pixies and fairy dust showed up’. I have always loved that phrase. You can train, you can prepare, you can do yoga or physio, you can eat right, but you also need the pixies and fairy dust to show up to get the performance you want on race day.

So thank you to all the running buddies who helped me learn to embrace the suck, to enjoy the good runs, to make sure you do a few races just for fun (Bay 2 Breakers anyone?)  to get through the crappy runs, to pick up the pace a little, to take a risk on race day, to appreciate every day you are not injured or sick because at least you *can* run, to run that optional 6th 1600m on the track, to drag yourself out there when you would rather stay in bed.  Thank you to all of you who kept telling me I could run a 3:40 and who will probably tell me I should now try for 3:35.  I’m good with the 3:40 for now thanks! Marathons are exhausting 🙂

Oh and with regards to the shoe… our running group K2J fitness has a K2J award, run a PB in a 5km, 10km, half and full in a 16 month period and you get to give them a shoe to have nailed to a piece of wood. It’s the highest award in our little running group. I love it because it’s all about achieving your *personal* best. It resets when you turn 50, 60, or 70 because at some point you have to accept you will slow down and you aren’t going to beat the PB you set at 25.  Setting lifetime PBs at the age of 49 feels pretty damn good, now if you will excuse me, it’s time go decide which expired running shoe to give the coach!pile of running shoes

 

 

 

 

 

 

 

Want to learn more about Visual Studio 11 and .NET 4.5 Beta?

I know I’m not the only one curious about the contents of Visual Studio 11 and .NET 4.5 so here are some resources to help you see what’s coming!

Get the beta February 29th!

The Visual Studio team has gone hog wild the past few days releasing lots of great information about Visual Studio 11 and the .NET 4.5 Beta that will be available February 29th. I just wanted to share with you some of the great articles they have posted so you can start geeking out!

And one last link, because betas are great to download and explore but if you haven’t bought or renewed your existing Visual Studio license Get ready with MSDN: Save up to 35% on Visual Studio with MSDN

How do I use HTML5 in Visual Studio 2010?

cadhtml5coaIn this post, I’ll share what I learned about how to get started writing HTML5 code in Visual Studio 2010.

HTML5 seems to be everywhere these days! I started trying it myself a few months back and I quickly decided that if possible, I wanted to play with it in Visual Studio. I’ve been working with Visual Studio for years, it’s got to be simpler to keep working with the developer tool I already know and love rather than moving to a new tool. Besides I want to be able to incorporate HTML5 into ASP.NET applications!  It took me a bit of messing about to get up and running with HTML5 the way I know there will be greater support for HTML5 in Visual Studio 11. But for now I am working with Visual Studio 2010.  I thought I would share what I learned so hopefully it will be easier for you.

Here’s what you want to do:

  • Add HTML5 validation and intellisense
  • Create an HTML5 project
  • Set up for <video> and <audio>
  • Play!

Add HTML5 Validation and Intellisense

You will definitely want to make sure you have Service Pack 1 installed! By installing Service Pack 1 you get both intellisense (can’t live without that anymore) and validation for HTML5. Don’t forget after you install Service pack 1 to go to Tools | Options | Text Editor | HTML | Validation and set the validation to HTML5 or XHTML5 or the HTML5 validation won’t work.

First of all there is a really great blog by Burke Holland on how to use the MVC HTML5 template for Visual Studio 2010 here.

Create an HTML5 project in Visual Studio

You have a couple of choices here.

  • Modify an existing template to be HTML5 or create your own template. There is a great blog describing how to do that here.
  • Download the MotherEffin ASP.NET MVC HTML5 template that Jacob Gable was kind enough to post on the VisualStudio Gallery.
  • Download the mobile ready ASP.NET MVC HTML5 template that Sammy Ageil was kind enough to post on the Visual Studio Gallery

Set up for <video> and <audio>

The first tags I started playing with in Visual Studio were the video and audio tags. I immediately had problems getting an actual video to display on my web page it was really frustrating. Here is what I had to do to get everything working. The basic problem was with the MIME types. When a .avi, or .MP3 file was used on my website, the web server didn’t recognize that those were video and audio files. To get it working I had to edit my web.config file and make sure I had IIS express running in the development environment instead of the development server built into Visual Studio to ensure that my web.config file was being used to figure out the MIME types. You need to do this for the WOFF fonts as well.

  • Install IIS Express
  • Specify the mime types you will be using in your web.config file. Here’s an example:
        <system.webServer>
          <staticContent>
            <mimeMap fileExtension=".mp4" mimeType="video/mp4" />
            <mimeMap fileExtension=".m4v" mimeType="video/mp4" />
            <mimeMap fileExtension=".woff" mimeType="application/x-woff" />
            <mimeMap fileExtension=".webm" mimeType="video/webm" />
            <mimeMap fileExtension=".ogg" mimeType="video/ogg" />
            <mimeMap fileExtension=".ogv" mimeType="video/ogg" />
          </staticContent>
        </system.webServer>

    .csharpcode, .csharpcode pre
    {
    font-size: small;
    color: black;
    font-family: consolas, “Courier New”, courier, monospace;
    background-color: #ffffff;
    /*white-space: pre;*/
    }
    .csharpcode pre { margin: 0em; }
    .csharpcode .rem { color: #008000; }
    .csharpcode .kwrd { color: #0000ff; }
    .csharpcode .str { color: #006080; }
    .csharpcode .op { color: #0000c0; }
    .csharpcode .preproc { color: #cc6633; }
    .csharpcode .asp { background-color: #ffff00; }
    .csharpcode .html { color: #800000; }
    .csharpcode .attr { color: #ff0000; }
    .csharpcode .alt
    {
    background-color: #f4f4f4;
    width: 100%;
    margin: 0em;
    }
    .csharpcode .lnum { color: #606060; }

Change the project settings, by right clicking on the project and changing the settings to Use IIS Express when debugging in Visual Studio.VisualStudioDevelopmentServer

Play!

Once you have it up and running you can start exploring the world of HTML5. There are some great resources on learning HTML5 here. Make sure you read up on feature detection since different browsers will support different HTML5 features and because you will need this for backwards compatibility as well!

If you want to experiment with <video>, I found it handy to just download Big Buck Bunny since you can get it in multiple formats so it’s great for experimenting with the fallback features of HTML5 <video> for different browsers.

Since a big part of HTML5 is the cross browser support, make sure you try it out in different browsers, or use the F12 developer tools in Internet Explorer to test how your code will work in different browsers or older browsers.

Most of all have fun!

Do you hate SharePoint? Part 4 of 4

If the answer is yes, could your hatred be caused by your local implementation? In this final post of our blog series we look at the last of four common problems with SharePoint implementations and how you can address them.

Once again, a huge thank you to Neil MacIsaac, SharePoint MCT, for putting this entire series together. Happy reading!

If you missed the earlier posts you can find them here

  1. Business Intelligence

This week we look at Business Intelligence.

4. Business Intelligence

Are there organizations out there that are really striving for Business Unintelligence? Wouldn’t everything that an organization does be in an effort to do something better? I love the term Business Intelligence (BI) mainly because of its massive overuse and its wide misunderstanding as ‘reporting’. So the question really becomes "How do we maximize our BI?" First, it is important to understand what BI really is. It is about making better decisions. If we have better data, and a better understanding of our data, it would be logical to conclude we would make better decisions right? Not necessarily. The theory is correct, but in practice most organizations fail to implement this properly by not focusing on the decision that they are trying to improve and instead only achieve in bombarding their key decision makers with an avalanche of reports. What is also surprising is that most of the decision makers in an organization are probably the ones asking for the reports in the first place. Let me give you an example. In a sales based business, you might see some monthly sales figures like this (overly simplified for the sake of discussion)

Sales Member

Monthly Sales (Units)

John

5,437

Mary

8,350

Bob

3,043

Jim

7,410

Why do we need to see these sales figures? The typical answer you will get will be "Because I need to know if there are any problems and to see if we are doing better or worse than last month or last year." So, with the above numbers, where is the problem? Most people would focus on Bob because his numbers are lower than the others. What isn’t shown with these numbers is that Bob is the newest of team and manages the smallest sales area. Can you still spot where the problem is in the above sales numbers? The typical failure in implementing a BI solution within SharePoint is usually in the disregard for a proper BI solution that focuses on those key decisions which strives to achieve a better decision by supplying as much data around the factors and drivers of the data as the data itself. Instead we see fancier reports of the above sales table and hope that our decision makers will ‘figure it out’. Another interesting point concerning SharePoint and BI integration is the potential for SharePoint to implement the decision. If our BI solution is focused on key decisions, a good solution should allow the user to implement the decision as quickly and easily as possible.

Conclusion

As you can see, SharePoint offers many challenges when deployed into an organization and requires due diligence to maximize your return. I hope that some of my tips may make their way into your organization and perhaps save you from some of the common pitfalls that have trapped others. There is good reason why SharePoint has become as popular as it has and hopefully you will be better able to get the most out of your implementation.

Do you hate SharePoint? Part 3 of 4

If the answer is yes, could your hatred be caused by your local implementation? In this blog series we look at four common problems with SharePoint implementations and how you can address them.

We continue our series by Neil McIsaac, SharePoint MCT, for putting this together. Happy reading! If you missed it you can still read Part 1 and Part 2 of the series

SharePoint is an interesting platform and as it grows as a product and with its already incredible adoption, it is an important cornerstone for many organizations. But ask the people that work with it, and you will find a divided love it or hate it passion for the product.

Why hate it?

It’s my experience (which dates back to the site server/dashboard days), that many customers have difficulty handling the product and I mean this a number of ways. Here’s the issue:

SharePoint will amplify your problems.

So why do we hate it? I would hate anything that made my problems larger. But did SharePoint create the problem? That would be like blaming the carpenters hammer for building a crooked house. The problems are our own doing in the majority of cases. In my experience, the most common problem SharePoint seems to amplify are the following;

  1. Information Security
  2. Business Intelligence

This week we look at Information Security.

3. Information Security

SharePoint has a confusing security architecture. A friend of mine continually jokes that you can do anything in SharePoint, as long as you know the 6 strategically placed security settings you need to set to allow users to interact with your content. I like to keep things simple. I always start addressing security by asking these 3 basic questions;

What are the requirements?

This question is pretty straight forward and we do it relatively well. Who gets access, and who doesn’t.

How do we know we meet the security requirements?

This is one area where SharePoint poses some difficulty, since it lacks any worthwhile reporting tools and has enough security layers that are hidden in the UI that it feels like finding an answer to this question is akin to finding the meaning of life itself. Paired with the products inability to properly handle security inheritance and the lack of a proper method to deny permissions and you are on a never ending hunt for individualized permissions. Yuck. Unfortunately the best security reporting tools are third party. Your team needs to sit down and address how your organization will address security reporting and auditing.

When is the last time we checked?

Security audits are often checked at implementation, but rarely checked afterwards. Permission elevation happens for various reasons such as troubleshooting, making it necessary to schedule our audits. If running an audit is painful because we haven’t properly addressed the above question, then scheduling it will hurt that much more. Again, get a good security tool.

Information Security Tips

Here are a few tips on implementing security in SharePoint to help make things a little more manageable.

Libraries/Lists are for security

I am not a fan of the Shared Documents Library which comes as a default. If you have ever heard me talk on the subject, you know I get a bit worked up about it. I am a fan of lists/libraries in SharePoint and I completely understand Microsoft’s position in adding it. It was a necessary evil. The problem that I have with it is what most people put in it. It goes against pretty much every information management principal that we have. Many organizations use this library and why not? It says "Shared" and I want to share my stuff, so why not? The reasons are many, but at a simple level, you will end up with a folder structure that mimics your old file shares, and make it work by placing individual permissions on folders and files to compensate for your lack of proper architecture. If you think of lists and libraries as containers, which if you were paying attention in the previous blog post when I ranted about the importance of structure, you can shape these containers to better store its information. You can change the shape (think ‘content types’), and you can change the behaviour (think ‘workflows’ and ‘views’) to better aid the end user in the task they have at hand (think ‘Use Cases’). Coming back to permissions, if we have a container with similar information in it, we can control permissions to all of its content by controlling permissions to the container. In other words, permissions in SharePoint are best handled at the list and library level and not at the folder or file/item level. Which brings me to a solid point: If you are not sure how many libraries you should have, look at the common permissions to your content. If a group of people need read access to one type of content but not to another type of content, then the content should be in the same list/library and we can control permissions to the content by setting the permissions once on the list or library. So how many lists or libraries should you have? The answer is in how many groups of content with the same permissions you have. This is not always the answer, but it is a good starting point.

Use SharePoint groups as functional roles

SharePoint groups are best used to reflect functionality rather than entity. Since we typically use Active Directory groups, adding the AD groups to our SharePoint groups to reflect the same group would be redundant. For example, having a Sales group in AD, which we mimic and create a Sales group in SharePoint usually offers little benefit. Having a group in SharePoint that reflects their ability is preferred. For example, I can create a group in SharePoint called Sales Lead Generators that can better reflect what anyone in that group can ‘do’ rather than who they are. Not only does it simplify security administration, it makes audit reporting a lot easier to read and verify.

Use Information Rights Management

Information Rights Management has been around for some time now. Surprisingly, most organizations that want to secure documents rely on securing the folder or physical media where the file is stored. The problem is that this security simply doesn’t follow the document where ever it goes. IRM on the other hand, does! You just have to ask someone if their documents are just as secure after an employee that has proper permissions to the file copies it to a thumb drive, or inadvertently emails it to the wrong person. SharePoint and IRM integrate very well. You can check out more about IRM here.

Next week, part 4 business intelligence…

If I can build a phone app anyone can: Changing the keyboard and IsNumeric

In todays blog I start coding my app, the first task is having users enter a time for my timer and making sure they enter a number. So I explore adding code to make sure they enter a number, and changing the on screen keyboard to show just numbers.

Wow I’ve been spending a lot of time learning about the projects, tools, and controls, it’s great that I am finally starting to code! If you missed any earlier posts you can find them here. My application will be a presentation timer that I can use to make sure I don’t talk too long.

I’ve created a New project of type Windows Phone Application in Visual C# (by the way as I start to code if you can make any of my code more elegant, feel free to leave comments, I am open to suggestions and improvements).

When I created my project I chose target Windows Phone OS 7.1 (which is the same as 7.5 which is the same as Mango) because at this point most Windows Phone users have Mango and I want to be able to use the latest features.

Adding validation code

I need a text box where a user can enter the number of hours, minutes, or seconds for the timer. So I’ll just drag a TextBox control to my page. I change the name of the TextBox to txtHours and set the Text to a value of 1, this will be the default value. When I run the app and click in the TextBox it looks like this.

TextKeyboard

I don’t want users entering letters, so I had better add some validation to make sure the users enters numbers in the TextBox and i will add a TextBlock for displaying an error message to the user.

I create a TextBlock control and name it blkMessage and set the Foreground property to Red and the Text property to an empty string.

Now I double click on the my TextBox control which takes me to the code page and creates a TextChanged event handler for me. The TextChanged event handler fires whenever a user changes the content of my TextBox, so it literally fires every time you type in a letter or number (that means I don’t want too much code in there because it wouldn’t be great for performance). In my event handler I test to see if the value in the text box is numeric, if it isn’t, I display an error message. If it is a valid value, I clear out the error message. My code looks like this. BUT IsNumeric is a function I had to add myself it is not built in! I got the code for the IsNumeric function from this blog post (thank you Keith Murray)

        private void txtHours_TextChanged(object sender, TextChangedEventArgs e)
        {
            if (!IsNumeric(txtHours.Text))
            {
                blkMessage.Text = "You must enter numbers only";
            }
            else
            {
                blkMessage.Text = "";
            }
        }

.csharpcode, .csharpcode pre { font-size: small; color: black; font-family: consolas, “Courier New”, courier, monospace; background-color: #ffffff; /*white-space: pre;*/ } .csharpcode pre { margin: 0em; } .csharpcode .rem { color: #008000; } .csharpcode .kwrd { color: #0000ff; } .csharpcode .str { color: #006080; } .csharpcode .op { color: #0000c0; } .csharpcode .preproc { color: #cc6633; } .csharpcode .asp { background-color: #ffff00; } .csharpcode .html { color: #800000; } .csharpcode .attr { color: #ff0000; } .csharpcode .alt { background-color: #f4f4f4; width: 100%; margin: 0em; } .csharpcode .lnum { color: #606060; }

Now if a user enters letters or other non numeric values in the field they see an error message like this:

EnterNumbersOnly

Changing the on screen keyboard

That works, but I don’t like the way the keypad comes us as letters as default which could be a bit annoying. With mobile apps you really want the user to have to use the keyboard as little as possible, so every keyboard tap I can save the user is a good thing. In addition, it’s good design to stop someone from entering an invalid value in the first place wherever possible, if I display a numeric keypad I don’t need to worry about someone entering letters and symbols! A quick bing search turns up a blog post that talks about setting the InputScope to get the numeric keyboard. Sounds worth a try. Unfortunately I can’t find a way to set that value in the property page so I am going to have to edit the XAML, and of course the XAML example in the blog post doesn’t work, but a quick search on MSDN for InputScope gives me the correct syntax.

So I have to open up the XAML pane by clicking on the little arrow button in the corner

imageThen find the <TextBox …/> called txtHours and add the InputScope attribute and set it to Number (wow I didn’t think I’d be messing in the XAML code this soon! but this really wasn’t that scary)

        <Grid x:Name="ContentPanel" Grid.Row="1" Margin="12,0,12,0">
            <TextBox InputScope="Number" 
                     Height="69" 
                     HorizontalAlignment="Left" 
                     Margin="76,106,0,0" 
                     Name="txtHours" 
                     Text="1" 
                     VerticalAlignment="Top" 
                     Width="77" 
                     IsEnabled="True"/>
        </Grid>

.csharpcode, .csharpcode pre { font-size: small; color: black; font-family: consolas, “Courier New”, courier, monospace; background-color: #ffffff; /*white-space: pre;*/ } .csharpcode pre { margin: 0em; } .csharpcode .rem { color: #008000; } .csharpcode .kwrd { color: #0000ff; } .csharpcode .str { color: #006080; } .csharpcode .op { color: #0000c0; } .csharpcode .preproc { color: #cc6633; } .csharpcode .asp { background-color: #ffff00; } .csharpcode .html { color: #800000; } .csharpcode .attr { color: #ff0000; } .csharpcode .alt { background-color: #f4f4f4; width: 100%; margin: 0em; } .csharpcode .lnum { color: #606060; }

And now when I run the application in the emulator, check it out: just numbers! Much better for my user!

NumericKeypad

So now I just need to replicate that logic for my hours, minutes and seconds textboxes. It’s fun to be starting my application. We’ll see what I learn next. Hope you are making progress with your apps as well. Remember if you publish an application by May 20th, 2012 you can get cool stuff thanks to the developer movement so get coding!

Hang out with others who geek out on technology, find your local user group!

canadamapThere are user groups all over the country where fellow geeks meet, share knowledge, network, and talk technology. Find your nearest user group and check it out!

I was speaking recently about HTML5 and pinned sites in Internet Explorer 9 to 58 developers in Fredericton, New Brunswick. It was a meeting of the Fredericton Developer  User Group. They meet once a month. A typical evening involves pizza and pop, time to network with the others at the meeting and then a presentation on a topic of interest by either a group member or a guest speaker.

Sometimes we get so caught up in our own department or our own projects that we forget to take time to learn, grow and just have a little fun from time to time with other people who will get our jokes about constructors and garbage collectors. If you are fortunate, you may get to attend conferences like TechDays, DevTeach, or Prairie DevCon but not all of us can get away for a conference and even if you do those are usually just once a year.

Joining a user group gives you a chance to be part of a like minded community who deal with the same sorts of challenges you do, day in and day out. It can keep you motivated, interested, and can help you stay on top of technology. We often co-ordinate with user groups when we have new content we want to share across the country. We’ve organized a Windows Phone Mango Tour, Cloud camps, and an ITpro tour tour through local user groups, so you can trust them to know about any significant events and promotions going on in Canada that could help you.

There are two places you can look up your local user group: MSDN Canadian Community and TechNet Canada User Groups. Check both lists because some user groups are listed on one and not the other. There are even a few virtual user groups if you don’t find one physically located near you.

Find your nearest user group and go geek out!