Productivity

Medium Trust is a PITA

There. I said it. Medium Trust is PITA. I wont be surprised if someone replies with  one of the following:

“Well, not really, you only have to do x, y and z and your code is compatible with medium trust environments”

or

“It’s there (Medium Trust) because code needs boundaries within controlled scenarios such as hosting environments.. “

Blah. Blah. Blah. You’re both right. However, it’s still a PITA. Why? In the past 4 months I’ve spent countless hours figuring out why my app is broken in a medium trust environment. I use certain tools to make my life easier (such as Castle Active Record, Windsor, ASP.NET MVC, Spark, etc) yet a lot of them assume full trust. They do have options to get them running under partial/medium trust but in my experience the debugging of these tools in said environments sucks.

Needless to say, I just got done debugging for 2.5 hours why my Spark MVC site would not precompile my views. The error was “No Input could be found". WTH!?! Finally, after walking through my app line by line I found the following in a Spark view:

 

${Html.ActionLink("Track Admin", "index", new { controller = "track" })} ${Html.ActionLink("Speaker Admin", "index" , new {controller="speaker"})}

 

The problem is that I had deleted those controllers and moved that part of the app. Once I removed the code, it recompiled fine. Completely frustrating and the root cause of this is Medium trust. I just spent 2.5 hours working on a debugging issue for Medium trust when I could be creating my app for a mobile start up company that I’m heading up.

Long story short : I’m not a fan of Medium Trust. I don’t know many people who are.

How Can we Get Around It?

I’m not sure we can in the .NET space. Other dynamic languages don’t seem to have these issues, but they do run into odd edge cases at runtime which can be even more of a pain to handle. So at this point, the only answer I have is to recommend any open source or commercial vendor to test their product on a lock down medium trust environment and provide very clear and concise instructions for how to get their product to run under medium trust.

I’ve Moved to WordPress

I’ve moved my blog engine once again. I started with DasBlog, then went to BlogEngine.NET and now I’m finally on WordPress.

Why WordPress? You’re a .NET guy …

Plain and simple. What I had, didn’t work and I need my blog to work, and work quickly. I don’t have time to write plug-ins, hacks to fix something I didn’t write simply so I can communicate with everyone via my blog. I need a solution that allows me to fire up my blog or Live Writer and create an entry very quickly.  I need a solution that allows me to add the new whiz-bang widget created by Developer X. I don’t want to be a blog widget developer,  I am an entrepreneur. My time is better spent figuring out business problems with code.

Secondly – My Host, RackSpace Cloud didn’t work well with Blog Engine .NET. I spent 3 hours trying to figure it out with their support team and they said the problem was my fault, I said it was their fault and we went back and forth. When it comes down to it, the problem was that when I created a new post, a new xml file was created in APP_Data and it was not being propagated across the cloud. Some users would see my post, others would not. A royal PITA.

Long story short. Yes. It’s WordPress. Yes. Its PHP. Yeah, I’m running this on Apache. Yes, I write .NET software for a living. But as I said in my last post, go with what solves the problem. Use what gets the job done. WordPress does that for me right now. Who knows, that could change in the upcoming years.

Suspending Resharper 5

For those of you who don’t know, ReSharper is no longer a Visual Studio add-in. Previously if you needed to disable ReSharper for whatever reason you could do so in the Add-In Manager in Visual Studio. You no longer can. Disabling ReSharper is now termed “Suspending” it. You can suspend ReSharper from the Tools > Options > Resharper options window. Press Suspend. ReSharper will now be suspended.

I know, why would I disable ReSharper? Well, at my current client I’m working on a VB.NET ASP.NET Web Forms application which talks to Microsoft CRM through the CRM WebService and LinqToCrm. The web service proxy that gets generated is over 94,000 lines long. Thats 94,000 lines of VB.NET. When ReSharper starts to analyze that file (as well as the other VB.NET files in the app) all hell breaks loose. The IDE locks up and I can’t do a single thing. Therefore I had to suspend ReSharper while working in this project.

Here’s the crux … the only VB.NET project is the Website, all other libraries are C# (thankfully) and I want to use ReSharper. Going through the tools menu each time I need to Suspend/Resume Resharper is a royal PITA. Thankfully ReSharper gave us a key command: Resharper_ToggleSuspend to assist in toggling the suspension of ReSharper. This is not mapped to any key combo by default. What I have done is mapped it to CTRL + ALT + F6. Now when I need to turn ReSharper On/Off when I enter/leave the VB.NET project I hit the key combo and I’m back in action (or out of action in regards to turning it off). Super easy. Booyakasha.

Frugally Increasing Employee Moral

Lately I’ve witnessed some amazing failures in regards to employers increasing employee moral during a time of need for an organization – they just don’t they actually do the reverse. This usually has a very negative effect on organizational efficiency and employee morale in general. For example – The organization is not doing so well, so they decide to cut costs. The economy is in the toilet, just today the employment rate hit 10.2 percent and nearly everyone who has a job is seeing a lot of “fringe benefits” being cut from the list at work. I have a problem with this, let me explain why.

 

Some Background …

I used to work at an entertainment company for awhile and we received a few fringe benefits that I thought were good – at the time (since I’ve learned better): 

  • Free Coffee (not good stuff, but average brew)
  • Free Creamer – Now this was not like gold plated creamer, but we had 2 different flavors to choose from, but its nice if you don’t like that “lets grow some hair on your back” kind of black coffee.
  • Free hot chocolate
  • Free tea
  • Free aspirin/ibuprofen/basic medical supplies

This is no Google or Microsoft, but at that point in time in my life, I thought it was cool. I was single, didn’t have much at the time and this was the first job I’d really had that offered employees much of anything – so I was stoked/excited for this “free stuff”. That was until the company stopped buying it because of “cost savings” reasons.

… AND THAT’S A LOAD OF BULL.

Instantly I went from a somewhat happy employee to a jaded, “I hate you Mr. CTO because you took away one of the few things that helped me love my job. Free creamer and hot chocolate.” Seriously, I no longer “loved my job” – it pissed me off that much. Yes, this is an extreme example, but its a real life experience that actually happened to me early in my career. I wasn’t the only one that felt like this either – this pissed everyone off. Nearly 90% of the company drank coffee and used that same type of creamer. Employees complained about this for months. Everyone was jaded in one form or another. Everyone knew this was BULL.

To prove my point that it was a load of malarkey I calculated the cost of the creamer at a wholesale rate for a given month. I found that we spent something like $80 on hot drink supplies per month. $80 dollars in supplies made a lot of people happy. More than happy, it was something people liked a lot. It increased morale. We had about 100 employees, so per person, we’re talking PENNIES ON THE DOLLAR.

 

The Point

The point of this is … happy people produce more. Unhappy people don’t. How many times have you seen an unhappy person at work cranking out code quickly or busting out reports at breakneck speed? Umm…rarely ever, if at all. However, if that same employee is happy, they’re output is exponentially higher – I’ve witnessed this myself, heck, I’ve even been both of those people. I’m not going to go cite any articles saying x and y and z with some fancy charts proving this, go look it up on Google if you really need to prove it, trust me, the proof is in the pudding.

My last full time employer, Magenic, is a great example of a company with nice fringe benefits. While these fringe benefits were not expensive they were seen as golden nuggets by all employees. We were given free soda (tons of various flavors), free premium brewed coffee, creamer, hot chocolate, water, and snacks if there were any around at the time (snacks were a here and there kind of thing if we had an event, etc). This had a profound effect on people. Giving nerds like us free soda while coding was awesome! At all times you knew you could go grab a soda if you wanted. There was literally an endless supply. Morale was high because of this. Don’t get me wrong, we still had up’s and down’s, but this very cheap offering helped morale more than most know. The key thing is… Magenic was not immune to the economic downturn of the last year. But regardless how bad things got, people still needed to work, and nerds needed soda. These fringe benefits were never taken away because of a “cost reduction strategy”. Taking away these fringe benefits would cost the company more money than it would ever save. Morale is expensive to lose, and can be cheap to gain.

But how cheap, is cheap?

 

How To Improve Morale Frugally

There are a ton of ways to do improve moral frugally. Here are a couple:

  • Free Soda  – If it cannot be free, buy your own machine and charge 10 cents or 25 cents a can. Keep it dirt cheap if you ABSOLUTELY have to charge. IMO – you don’t need to charge, tightwad.
  • Free Weekly Lunch (or better yet, free lunch) -  While not as cheap as soda, its an excellent team builder as well as morale builder. However this is usually only possible at smaller companies.
  • Free Premium Coffee/Creamer/Hot Chocolate/Tea – This is another no brainer. Get a couple industrial brewers and keep that stuff on TAP. Seriously. At MarketWatch.com Lou and I were constantly making trips to get coffee up to as late as 4pm. Caffeine == awake nerds. Side note: If you charge your employees for coffee, sit down, slap your self in the face and stop. That’s all. It’s coffee. Its pennies on the dollar for your return.
  • Dont Sweat The Small Stuff – 2 Monitors, the fastest machine you can buy. All of these things have cost benefits not to mention employee morale.

This list could go on forever… but I feel there are more idea’s (and much better ones than the ones above) brewing in this thread than I can post in this blog. I suggest you check out the thread and get some ideas.

Employee’s are not cheap. Intellectual knowledge is even more expensive. Treating your employees to these cheap fringe benefits is like a very cheap insurance policy on your employee’s staying with your company.

Think about it …

Would you be more likely to think twice about leaving a company that gave you tons of great fringe benefits (soda, coffee, snacks, a lunch, powerful equipment) than if you were treated like a 10-Key Data Entry 15 year old?  My experience says that you’d realize that “If I leave this company, I’m not going to get x, y or z. I’ve never had x, y or z at any other company. I really like x y and z. Maybe leaving is not an option.”

Think about it. Happy employees = More Output = Happy Company

An Article Every Manager, VC and Angel Investor Should Read

Awhile back Paul Graham posted an artcile that every Manager, Venture Capitalist and Angel Investor should read.

It’s located here: http://paulgraham.com/makersschedule.html

Having personally been a developer, manager and entrepenuer who has dealt with development managers, angel investors and private venture capitalists I can tell you, this post hits it out of the park. The makers schedule is exactly what this post describes it as. If software companies and departments recognized this more often, productivity would jump quite a bit.

Here’s an example of my day:

Arrive at Office & Start working: 7am

Stand up Meeting: 8:30-8:45

Meeting: 9:30-10:30

Lunch: 11:30-12:30

Meeting: 1:45-2:45

Go Home: 4pm.

 

My longest period to “get in the zone” was 1.5 hours at the beginning of the day. That is barely long enough to just really get into what I’m doing. This is why managers always wonder “why didnt you get anyting done yesterday? I got x, y and z done, you didnt get anything done.” Reason being: They’re on the managers schedule, I’m on the makers schedule.