Exciting Times


I attended a local college in the fall of 1987 with the full intention of continuing on to receive a BS in Comp Sci. As luck would have it I fell in with a group of tech geeks who were doing some interesting things with PCs.  Unfortunately, I spent more time writing bleeding edge code than doing the punch card/COBOL work that the school was trying have me learn. While attending a job fair and talking shop, I received an offer with a salary that was higher than I would have made had I completed college and gone into the world of COBOL. So much to my parents’ chagrin, I promptly ran away to seek my fortune in the wilds of the upstart PC industry.

I have always been fortunate and could stay on the leading edge of technology for most of my career. I got into windows development right before it became hot. I started doing Visual Basic back when there was a VB for both Windows AND DOS. Managed to hook up with web development back when a site MIGHT have one crappy image on it and flashing text. Portal technology (Plumtree) became my next thing which morphed into collaboration and enterprise content management. I was lucky enough to work with a beta of SharePoint long before it became what it did.

Over the years of developing software, I become language and OS agnostic. I have written software in both.NET (c#) PHP and Java. I use both Windows 10 and Linux (OSX when needed for iOS) as development platforms. I am very comfortable with Windows server and can be trusted with root on Linux. I like SQL Server, MySQL, MongoDB (NoSQL) and Hadoop. I can’t say I like Oracle, but I can write some nice code in PL/SQL.

I am now, for the most part, focused on the world of .NET. But my how that has expanded. Never thought we would see Linux, Hadoop, NodeJS, Angular, Git, Android and iOS development become part of the MS world. And now Mircosoft is embracing open source !! these are very exciting times, and I am very happy to be around to experience them.

 

Advertisements

It’s not what you think!


Some people new to the gym don’t like that feeling when they first get to the gym and have to walk through it. It feels like all eyes are on you and judging.

I remember that feeling well a few years ago. I had been out of the gym for quite a while due to medical issues and was horribly out of shape. It was even worse for me because I knew what I was before.

But as time went on it took me longer and longer to get to the back of the gym. It starts slow.. the fist bumps from the guys you worked in with before. To over time greeting friends and seeing how people are healing from an injury they incurred.

Now as I walk through the gym, I do know that people are watching. I see the nods of approval in recognition of the changes in my body. I see the fresh faces that have started coming to the gym for the first time because they want to change their lives.

Then when I am working out, I see a new person walk into the gym. Yes, my friends and I are watching you. But we are watching you with approval because you made it here.

Welcome to the club. You got this!

Thanks to Mel Burgess for prompting me to write this with a post he made! Please feel free to share this. I want people to know that they are not alone in their struggle.

My Advocate


“It was the best of times; It was the worst of times.”
Nope, it was just the worst of times!

In the span of six months in 2010 and part of 2011, I had;
1) Brain Surgery to remove a Brain Tumor
2) A massive cranial infection requiring yet another Craniotomy
3) My skin trying to burn off of my body due to a reaction to antibiotics
4) A surgically induced debilitating stroke

Through it all though there was a beacon of hope.

Her, Teji. My wife, my protector, my advocate.

Through the semi-conscious haze of pain and pain meds, I could hear her voice. Always strong even though she could barely stand from exhaustion. She was double checking details, making sure she understood what was going on with me at all times.

When I could look around, she was there. Either Standing by my bed watching over me or dozing lightly in a chair by my bedside. Waking up at the slightest movement or noise from me.

There are no words to express the comfort this gave me. I can tell you that had I not had her there, I do not believe I would have survived to tell you this story. I was incredibly lucky to have someone with her dedication and intelligence to be by my side acting on my behalf.

Not all people are as lucky as I. As I sit here thinking of those events, I remember those who were all alone in other rooms. I try to put myself in their shoes, and my mind recoils in horror and fear. I could not imagine what it would be like to have no one there as an anchor and advocate. No that is incorrect I can imagine, I just don’t want to, the emotional abyss is just too great.

Thank you so much, honey, for being there. Great big thanks to everyone else who stands watch over their loved ones through dark times. Your actions mean more to a patient more than your can ever imagine.

Visio 2010 Database Diagram Forward Engineering


Last Wednesday at our local TRINUG meeting, I was complaining about the fact that Visio no longer could generate the SQL to create a Database from a database diagram. Sure you can reverse engineer one. But the creation of a database from a diagram has been left out since version 2003. I mean why provide the tools to diagram a database if you can’t do anything productive with it?

Well I guess I should have looked a bit harder.

There is a project on Codeplex called forward engineer. http://forwardengineer.codeplex.com/ . It will generate the SQL to create tables and databases from your Visio Diagram.

This rocks, thanks guys !

MVC4 Beta: Important Change to DisplayMode


As many of you know the beta of MVC4 came out. Of course I downloaded and installed it.

I noticed my existing code such as…

DisplayModes.Modes.Insert(0, new DefaultDisplayMode("iPhone")
{
ContextCondition = (ctx => ctx.Request.UserAgent.IndexOf(
"iPhone", StringComparison.OrdinalIgnoreCase) >= 0)
});

gave an error “DisplayModes” does not exist in the current context. Wait a sec, I updated my references and everything, what gives.

well they threw something new in there.

the correct code is now..

DisplayModeProvider.Instance.Modes.Insert(0, new DefaultDisplayMode("iPhone")
{
ContextCondition = (ctx => ctx.Request.UserAgent.IndexOf(
"iPhone", StringComparison.OrdinalIgnoreCase) >= 0)
});

Notice the

 DisplayModeProvider.Instance 

it replaced the older DisplayModes.

I am sure there is more. I will post them as I find them.

MVC4 : Mobile Routing : Part 2


Updated 12 March 2012 to support the MVC4 Beta

In part one of this series I showed a brief intro into the view routing capabilities of MVC4. In this article we are going to dig a bit deeper and explore how it can be extended.

While just havingthe ability to redirect to a mobile view is neat, it would be even better to be able to add more conditions and view types than just the existing mobile one.

Fortunately the framework does have this ability.

To create new view versions (DefaultDisplayModes), you add each DefaultDisplayMode in the Application_Start event of the global.asax.cs.  The running application will the select which view to use based on declared conditions being met.

Here is an example of an a DefaultDisplayMode being added to the DisplayModes list

DisplayModeProvider.Instance.Modes.Insert(0, new DefaultDisplayMode("iPhone")
{
ContextCondition = (ctx => ctx.Request.UserAgent.IndexOf(
"iPhone", StringComparison.OrdinalIgnoreCase) >= 0)
});

DisplayModeProvider.Instance is an IList and Modes.Insert is a standard insert with an index and item to be inserted.

The concise format is;

DisplayModeProvider.Instance.Modes.Insert({index}, new DefaultDisplayMode("{DisplayModeName}") {Context})

{Context} is evaluated at runtime and must return a Boolean, If a true is returned then the View Engine attempts to load a view with that Display mode name.

{ActionName}.{DisplayModeName}.{fileType}

The viewengine starts with the very first displaymode in the Displaymodes<IList>  which is at index 0 and iterates through the  Displaymodes<IList>  until a matching view is found.

So given these inserts in this order in code (no context to keep it simple)

DisplayModeProvider.Instance.Modes.Insert(0, new DefaultDisplayMode("Mobile")
DisplayModeProvider.Instance.Modes.Insert(0, new DefaultDisplayMode("Tablet")
DisplayModeProvider.Instance.Modes.Insert(0, new DefaultDisplayMode("AndroidTablet")

The veiwengine would evaluate for AndroidTablet if that fails go to Tablet, then evaluate for mobile.

There already is a default DefaultDisplayMode(“Mobile”) already baked into the framework. Adding another DefaultDiplayMode named mobile does not erase that display mode it just adds another conditional to direct the view engine to use

{Viewname}.mobile.{fileType}

Complex Conditionals

Remember that the evaluation must return a Boolean ? Well that lets you create fairly complex conditions such as this one below.

<p>DisplayModeProvider.Instance.Modes.Insert(0, new DefaultDisplayMode("Mobile")
{
ContextCondition = (ctx =>
ctx.Request.UserAgent.IndexOf("iPad", StringComparison.OrdinalIgnoreCase) >= 0 ||
ctx.Request.UserAgent.IndexOf("android", StringComparison.OrdinalIgnoreCase) >= 0 ||
ctx.Request.UserAgent.IndexOf("iPhone", StringComparison.OrdinalIgnoreCase) >= 0 ||
ctx.Request.UserAgent.IndexOf("Windows Phone OS",StringComparison.OrdinalIgnoreCase)>= 0
)
});

Here the condition is checking for a variety of user agent strings using the OR (||) operator.

To see how far some have taken this, I highly recomend reading Eric Sowell’s blog at www.thecodinghumanist.com

Conclusion 

We really cant wait till this becomes RTM. No really we can’t, we are running  Mobivant.com on the developer’s preview of MVC 4.

I do hope this has helped some of you out there. I promise I will add more as I get time. Wish me luck.

RDU Code Camp 2011


I will be presenting at this years Code Camp in Raleigh-Durham NC.  I will be showing off the Microsoft MVC 4 Developers Preview. Showing off the new conditional routing features of the framework (Mobile, baby), and a little bit of JQuery mobile just for fun.

So Can you guess what this is ?

DisplayModes.Modes.Insert({index}, new DefaultDisplayMode("{DisplayModeName}")  { {Context}  }

Check out http://www.codecamp.org/ See you there