April 28th, 2009 Rusty
“Could not load type ‘System.Web.Mvc.ViewTypeParserFilter’ from assembly ‘System.Web.Mvc, Version=1.0.0.0,…”
When I deployed a working and tested build from our svn repos, it threw this error when I tried to access a view that was in a directory containing web.config with the following configuration:
<pages
pageParserFilterType="System.Web.Mvc.ViewTypeParserFilter, System.Web.Mvc, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"
pageBaseType="System.Web.Mvc.ViewPage, System.Web.Mvc, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"
userControlBaseType="System.Web.Mvc.ViewUserControl, System.Web.Mvc, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
Asp.Net MVC installs in the GAC
Remember Com and DLL Hell? If you don’t, you didn’t miss anything. We used to have to register our DLL’s with windows OS in order to call them from applications. It caused all sorts of problems and very rarely bought us any reuse at all. Anytime you had to update a DLL, you had to regression test every application that used it before you could update the server where you needed the enhancement. Therefore, XCOPY deployment was a god send! Being able to share your binary at build time and deploy different versions of the assembly per application without concern for other dependent programs saves a ton of time and headache.
Oh, there is that GAC opportunity if you want to share a single DLL across an OS and you’re certain that its stable and locked in. It makes sense for Microsoft to register their assemblies there. Unfortunately, MVC had a significant update from RC to release but they did not increment their version number. Shame, shame, shame…
I installed Asp.Net MVC on our build server though did not on our production web server. I know: shame, shame, shame… Even though we reference our MVC DLL’s from a libraries directory, the build finds them in the GAC and does not copy to the bin directory. I am sure there is a simple configuration in the build scripts that I could use. My immediate solution was to manually copy the assemblies to the website’s published bin directory in SVN so our prod deployment would have the correct version of that “version” of dll.
Posted in Asp.Net, Mvc | No Comments »
April 21st, 2009 Rusty
For those of you who know me, you know I have dabbled, successfully, in Search Engine Optimization for many years. John Sherrod has been my guru, both in yoga and SEO, for something just south of 10 years. He has been both interested in and solicited to produce training in search optimization. He has been gracious enough to allow me to participate in this venture. We’re not sure of the specifics, yet, but it is going to begin as a hands-on course designed to deliver results during the class. Here are the details we have to share:
Search Engine Optimization Class Details
- small class
- 5 or 6 students per session
- 1 half day commitment
- 4 hours
- Saturday being proposed
- inexpensive
- practical results focused
- arrive to class with a laptop and ftp access to your site
- each topic discussed is applied to your site with the instructor’s guidance
- YOU make the changes that get results, immediate reinforcement of the topical material
- YOU ask questions as you apply what you’ve learned to YOUR website
- You leave the class with some of the enhancements in place, having started to move the needle
The concept is brilliant, I think. John has been doing this a long time and each time he teaches someone the secret sauce, they come back 3 months later having executed nothing. If you don’t apply the techniques, they can’t work for you.
Learn Search Fundamentals Relevant to Small Business
So John is designing a class that takes the fundamentals that he presented at SES NY and boiling it down to a practical, hands-on, effective lesson. He’s an expert in both small and large scale implementations. He has a passion for small businesses in America and is embarking with a class geared toward small business and local (Google Local) search.
What’s my role? …not sure yet. When I was 16, I taught guitar to 17 students. When my guitar instructor asked me to take over, he explained, “you don’t have to be as good as me, you have to be more knowledgeable than your students. Just stay one lesson ahead. When a student passes you by, you’ve succeeded, they don’t need you anymore.” While John has far deeper experience and knowledge on SEO than I do, I’m rising. He and I work together very well. I expect this to take off pretty quickly and hope to be in a position to teach the class as well. However, like my guitar guru, I’ll wait until he deems me ready.
First Atlanta SEO Class 2009
First class tentatively scheduled for mid June. Please contact rustyzarse –at- gmail –dot- com for more information
Posted in SEO | No Comments »
April 21st, 2009 Rusty
I haven’t blogged for a very long time. I’ve had lots to say. Unfortunately, when I finally threw in the towel on Vista and went back to Windows XP, I recalled just how crippled that OS was for serious development. So I upgraded to Server 2003, a very stable, functional and reliable OS (except for a weekly corrupt lock issue form VM and tortoiseSvn but that is besides the point).
No LiveWriter on any stable OS’s. period.
I can do everything I need to in Server, at least for Windows development, except blog. Windows LiveWriter installer, in their product team’s infinite wisdom, will prevent installation on Windows Server OS. It works FINE if you can get around the c0ck-block and install a hacked version of Windows LiveWriter but then plug-ins won’t find the install. That is a huge problem because most of what I blog is code. That nifty code plug-in that formats gorgeous c#? …sorry, doesn’t work if you back door LiveWriter.
What about that sweet Mac you carry around with you?
I decided it was time to blog again and looked into Ecto, once again. Unfortunately, it remembers that I once launched it (never actually tried it) and will not allow me to launch it now. That’s foolish, illuminex, really. I think it would be sufficient to just irritate me with a launch screen reminding (begging) me to pay the measly $20 every time I launch it. Or allow one blog post and then close the app with a “please buy” notice. Anything except preventing launch. You must be taking lessons from Microsoft.
Just buy it, dood, you say? Well, I’m sort of “not able to use credit cards” if you know what I mean. :-/
Solution – VM with XP
I read the Ecto vs LiveWriter smackdown and I realized I had all I needed. It seems so silly but, in reality, its why I switched to Mac in the first place.
When I code, I code. If its Windows, its Server. I don’t want extra software installed unless it directly applies to the art of coding.
When I blog, I am blogging. I might download photos and try software and exhibit all kinds of consumer behavior that will very likely introduce spinning icons and the inevitable need to rebuild the OS. I only need about 500MB to blog with so fire up an isolated VM for blogging and be over it. That XP machine I configured to try to code on? Its now my blogging computer. Yes, I fire up an entire computer just to blog. Well, a virtual computer. Nonetheless, how beautiful is that. Its like having a house to live in with your family that stays clean and fresh and a second house where you keep your exercise equipment and your old beer signs.
For the Adventurous
I’d gotten spoiled with my Mac because it hasn’t hiccupped in more than a year. I’ve been able to reduce to just one instance of Windows Server for my Windows programming duties and everything else works on the Mac. If that were a real goal of mine, I’d try Msi Install for Windows LiveWriter. Actually, I WILL try to install that and see if plug-ins work after that. I have Visual Studio ad everything I need on my XP instance so I can pull a quick bug fix without firing up my fat behemoth of a server VM. I should have the same convenience the other way around. However, this XP Instance boots in less than 30 seconds. LiveWriter will be in my startup items from now on.
Posted in Blogging | No Comments »
April 13th, 2009 Rusty
To make a custom View appear following a button click, I was trying to animate the appearance of a UIView using the following code.
CGRect tempFrame = portfolioAddView.frame; // Get the current frame.
tempFrame.size.height = 0.0f; // Hide the view by collapsing height
portfolioAddView.frame = tempFrame; // set the new frame
[UIView beginAnimations:nil context: @”some-identifier-used-by-a-delegate-if-set” ]; // Tell UIView we’re ready to start animations.
[UIView setAnimationDelegate: self ]; // Set the delegate (Only needed if you need to use the animationDid… selectors)
[UIView setAnimationCurve: UIViewAnimationCurveEaseInOut ];
[UIView setAnimationDuration: 0.4f ]; // Set the duration to 4/10ths of a second.
tempFrame = portfolioAddView.frame; // Get the current frame.
tempFrame.size.height = 120.0f; // open up the height
portfolioAddView.frame = tempFrame; // set the new frame
[UIView commitAnimations]; // Animate!
It worked fine for showing the view but when I tried the reverse, animate the height collapse, the child UIViews remained visible.
I found a property that solved that problem
[portfolioAddView setClipsToBounds:YES];
Now, when I animate the height to 0 (zero), the children are hidden by the collapsed view.
Posted in iPhone SDK | 1 Comment »
March 19th, 2009 Rusty
I have blogged NONE for a very long time. We’ve been crazy busy at Ockham Research building our killer apps.
I discovered something today that I thought might be of value if anyone is still checking this blog. In Asp.Net MVC, when you request a url, the route engine looks up the appropriate controller and action for the request. Assuming a match is found, the controller’s action is executed and your code is called therein. At the end of your action logic, you will typically render a view. You do this like so:
return View( "SignUp" );
Since a while back (Preview 2?), The Microsoft team allowed us to use convention and omit the name of the view
return View();
That was great! So much easier and aligned with the idea of letting consistent behavior reduce verbosity and repetition. One gotcha caught me today…
public ActionResult CalledAction()
{
if( someCondition) return SomeOtherAction();
}
public ActionResult SomeOtherAction()
{
return SomeOtherAction();
}
In that above snippet, the CalledAction has a condition where a different action’s behavior is desired. You can call RedirectToAction and cause a round trip but the code as written will not behave correctly. The "SomeOtherAction()" method will render the "CalledAction" view. Bummer. Somehow I thought there was a reflection map that was initialize on startup that would recognize where the call came from and select the view. Turns out the Route manager pre selects the default view when he calls the initial action.
If you want to do what I proposed above (some might argue that its not good practice), you have to explicitly name your view.
…
return SomeOtherAction( "SomeOtherAction" );
}
Posted in Blogging | 1 Comment »
January 23rd, 2009 Rusty
Microsoft took a beating recently, like every other company in the free world, and has announced job cuts and missed earnings expectations. As a Microsoft developer and someone who built a career by riding the coat tails of the software giant, this is very relevant to me and something I will be watching closely. The news was a bit of a surprise.
Coming Soon…
I’ve been building a new tool at Ockham Research we call RazorWire. It watches TV for you. When stocks are mentioned on financial commentary media, we post what was talked about, what was said, and attach our research and information on that company to the event. In addition, you’ll see the news history on each of our stock report pages. I expect to release this next week.
Bad News from Redmond
While working on some final touches to UI, I noticed a rash of news about MSFT. I quietly considered what this might mean to the company and its future. I, like the rest of the media and its audience, wondered if this might be the beginning of the end for a lot of things we’ve become accustomed to in our world.
When Mega Giants Grow Up
Fortunately, Ned blogged about Microsoft yesterday, unbeknownst to me, and helped me understand why this is not really such a problem. It sucks that they had to let some people go, yes. However, Microsoft has grown up and they are no longer a growth investment like Google or Apple, they are a value investment like GE and Coke have been. I don’t claim to be anything close to an expert in this regard, so read Ned’s awesome write up on why Microsoft is a good long term play right now. For the techies reading this, this means you can keep relying on Microsoft to be strong despite the recent bad news.
http://blog.ockhamresearch.com/index.php/2009/01/microsoft-a-ben-graham-stock/
Posted in Windows | No Comments »
January 6th, 2009 Rusty
Recently, I reiterated a problem I have been having with file corruption from TortoiseSVN while running on Windows Server 2003 under VMWare Fusion. I am writing now because I have nothing better to do other than wait for chkdsk to finish on my Windows VM. Yep, happened again. I updated VMWare to the most recent version, as requested by the support person. He then had the audacity to mark my issue resolved! He closed the ticket.I use tortoiseSVN regularly on bare hardware Windows Server 2003 with no issues, ever. I also have absolutely no issues with this computer running any other programs. If there truly was a hard disk issue, I would see it elsewhere. If this was a tortoise problem (entirely), I would see if on other servers. It seems as though it occurs when I copy files from my mac to the vm. When I do that, I have to change permissions on the copied files. Today I copied an entire directory. I usually copy one file at a time.Assuming I can recover once again, I may try a controlled experiment. If I can reproduce this, perhaps I can get some resolution… Or maybe it really is time to consider Citrix.
Posted in Blogging | No Comments »
December 31st, 2008 Rusty
I live on a very busy road in midtown Atlanta. Its a pleasure to enjoy walking with my family and dogs to no less than 5 parks (including Piedmont Park), the Virginia Highlands shops and restaurants, Trader Joes and Ansley Park shopping. I can ride my bike to everything from coffee shops to the gym. When Georgia weather is beautiful, nearly every day, I don’t even have to touch my car keys in order to access everything I need to work and play. Atlanta is not a town where you can survive without a car (not if you intend to get ahead in life), but living where I do allows a lifestyle that allows moderate freedom from commuting in a metal box.
Unfortunately, this lifestyle comes at a cost. One, its expensive. Two, with denser population and pedestrian friendliness comes increased crime. You aren’t immune to crime when you live in the burbs but the frequency of common theft is reduced. I know people whose houses have been broken into in the Highlands and I know people who’ve had armed burglars enter their Norcross or Sandy Springs homes. However, you are more likely to have your car window smashed in when parked on an urban street than parked a suburban residential driveway. Along the same vein, my front porch is a moonlighter’s shopping mall. When the UPS truck leaves a package (which they’ve been instructed never to do), there is likely someone nearby who marks that location for a late night visit. Should the package not be noticed by a resident, it won’t be there in the morning. If profanity offends you, please stop reading now, sometimes you just gotta let loose…
Bicycle Bandit
11:30 pm, December 30, 2008. I was working late in the back of the house. My dog suddenly barked as if someone was inside the house. I ran to the front, expecting to see someone in my living room. I had just checked the lock on the front door and saw it was still undisturbed. I calmed the dog and looked out the front window. There was a man mounting a bicycle, wearing a winter hat and jacket, about to go on his way. At first I thought he had fallen from his bike and perhaps he was drunk. My dog is not a barker and you have to get inside the safe zone to set him off. This man must have made a loud noise or shouted and disturbed the dog. Under one arm was a sort of messenger bag and under the other… a giant package wrapped in brown paper. It was about two and one half feet by one foot by one foot. He could hardly hang on to it while riding his bike. I thought, "that’s strange, what in the hell is he doing?"
Then it dawned on me. He was already a block away. That package was mine. The pile of pig shit had stolen it from my porch. My dog woke to find someone on our threshold and went bananas. Good dog! I called 911 and explained what had just happened. The 911 operator asked all sorts of stupid questions: was he black or white? black. What color was his jacket? I don’t know, its dark outside. What color was is hat? I couldn’t tell. Light colored maybe grey or white. What color was his bike? I don’t know, its dark outside. I can’t see color at night. If I can’t tell what color his jacket is, I can’t tell what color his bike is. For pete sakes, go look on this empty fucking road at nearly midnight for a black man, heading south, wearing a winter hat, riding a bike, carrying a big fuck-off package under his right arm. If you see someone like that, shoot the mother-fucker with a tazer right in his nuts!
The operator told me a car would come. She couldn’t say when. I expected a knock at 4am for my report. I walked outside to see if I could see the two wheeled criminal down the way. To my surprise, within a could of minutes, two squad cars raced by, search lights shining! They were on the chase. That kind of response to a call is very different from what I’d become accustomed to. Something has changed in the Atlanta Police Dept and it ought to be recognized. They didn’t catch my burglar but they made a powerful statement. He knows the police aren’t going to sit by and do nothing about midnight burglaries. In the past, it was hard to get help with this sort of thing. I hope this welcome change stays long enough to drive out the evil from our neighborhood. I didn’t bother to fill out a report. I would rather let them do their job rather than paperwork. I appreciate the service I received last night and I am now inclined to respect the officers on duty. I have had more experiences that left me disappointed with law enforcement than positive ones but the impact of something like this can trump ten times being left hung to dry. After all, I’d rather be on the side of the guy who can legally shoot somebody than in no body’s corner.
So, coppers, thanks! Thanks for showing up. Thanks for trying to get the bastard. Mostly, thanks for being there in the middle of the night when my thin veil of safety and security was torn down.
The MO
Its been a while since we’ve seen these two wastes of perfectly good oxygen but we used to see two guys: one on a bike, one on foot. One would always have a medium sized messenger bag. They’d hang out together at times when the road was completely empty: midnight, 3 am, etc. My wife would see them as she left for work, earlier than the neighborhood was out of bed. Next time I see them, I think I’ll get the camera out. Its time to stop waiting for someone else to do something about it. If the cops are going to show up and race around the neighborhood trying to bring this sort of thing to an end, we should do what we can to assist.
Don’t Drop Your Guard or Get Caught With Your Pants Down
Its not the first time this has happened. In fact, we’ve been hit more than half a dozen times in the last couple of years. At one time it was so bad that we couldn’t have anything delivered to our home, ever. One Christmas we had box after box of baby clothes and diapers ripped open and rifled through. Sometimes they’d take what they could hock and throw the rest in the bushes to get wet and ruined. For a while we even had our cars regularly broken into. It seemed that every time we happened to forget to lock the car, our cell phone or computer would be stolen. It turned out the neighbor behind the house could see our car door locks well enough to execute this crime. He was so friendly, we never suspected him. We realized, after he moved away, that our jobless, loser neighbor was responsible for some of our thefts. When he left, the problems quieted down significantly. These days there is usually someone home to bring a delivery inside and, every now and then, we use our home address. Nonetheless, I always use my work address for shipments just to be safe. So, the one time we had something left out, predator.
Obviously, it is common sense not to leave valuables in your car or sitting on your front porch. It would be nice if UPS / Fed Ex would respect our request to never, ever leave packages without signature but they can’t seem to get that straight. We’ve made that request in writing with both carriers.
Posted in Atlanta | No Comments »
December 30th, 2008 Rusty
I find I often spend more time trying to choose between alternative frameworks then I do either identifying the need for one, or designing and implementing the solution. For example, I spent quite a bit of time evaluating competing blog engines. When I finally chose WordPress, the install took a fraction of the time that I spent researching various alternatives. Anyone who has used WordPress can attest that there really is no learning curve to using it and it installs ready to blog. The funny thing is, I knew before I had spent any time researching that WordPress was the most popular blog engine out there. Why? who cares? Move on already.
Most Popular IoC Framework
It wasn’t nearly so cut and dry for IoC in dotnet. I found quite a few resources evaluating and comparing various frameworks but nothing really conclusive. Then I realized that most of the tech bloggers I follow tend to use the same tools that I find most valuable. Much of the time its because they turn me on to them.
I decided to narrow my search to my most respected bloggers. I started out with Scott Hanselman but he’s off wandering about Africa and has just started looking into IoC himself (or hasn’t updated his captive audience on his progres in a while). His blog, however, did lead me in the right direction. He was kind enough to post a list of the current dotnet IoC projects that look attractive/viable. Sometimes a list helps to get the Googling going. A short while later, I was reading posts by Ayende Rahien. He’s a somebody I’d like to buy a few rounds of shots for. He’s helped me more than probably any other Microsoft technologist. He got straight to the meat and stated that he prefers Windsor Container (because that is what he has used). Good enough for me! Ironically, that is what I was going to use when I started my research but didn’t want to "make a regrettable choice". What lead me astray is that Microsoft has recently promoted their framework called Unity. If you are the kind of developer or development shop that prefers supported software or you just lean toward Microsoft code, use Unity. It will get the job done. From my perspective, Windsor is mature, stable, simple and natively supports AOP.
Generally Trust in People but Still Lock Your Doors
I trust people in general but I never leave valuables in my car. With code, that strategy can be applied in this way: use what is most convenient to solve your immediate need but loosely couple. The whole point of IoC is loose coupling. I wish I had just committed to keeping my registration code abstracted from any consumer access jumped into Windsor rather than spent all day obsessing about which framework was better. Blogging about it tonight took about an hour. I should have my code finished in about fifteen minutes. At least I feel good about my decision.
Posted in DotNet, Programming | 1 Comment »
December 16th, 2008 Rusty
This is not intended to be any sort of platform war. I love what Apple has done to mobile and I hope Android can catch up. On a whim, I thought I’d browse some Android documentation to see what’s up on that side of the revolution
Performance Advice
It took me quite some time to get my hands around memory management on the iPhone. I finally got it but spent many long, long days staring at EXC_BAD_ACCESS messages in the debugger before I finally learned how to create zombies and back up in the stack to try to find the object that was deallocated prematurely or the caller who needed it. There’s quite a bit of proprietary convention to learn with cocoa on the iPhone. I read the memory management papers and purchased >$100 worth of programming in Obj C books to get through it.
Google just spells it out, how novel! Check out this Android Performance Tips page. I read it and thought, immediately, “why in the hell didn’t Apple just puplish something like this? Just spell it out. Tell your developers (yes, we are now your developers), “do this, don’t do that.” We’ll swallow the pill and do as we’re told. We want to get on to more important things.
What are the performance optimizations for iPhone?
A while back I read that caching things that you get from storage such as DB and Web is the key. I’m requesting JSON from web services, parsing into object graphs, and caching the data using a singleton pattern. There is one instance of the data graph and I load it when its needed, release it either when the app closes or when memory alerts are sent, and use it for all other queries. At some point I’ll probably need to keep subsets in memory but, for now, it works great. Today I completed setting up a relatively complicated hierarchical structure of data in objects with parent child relationships. I was very careful to only allocate on instance of any entity instance and reference that instance from wherever it was prudent. I was pretty liberal with my structure and references, assuming that pointers aren’t very expensive and there is no difference between looping through a bunch of flat arrays or traversing an object graph. Then I read the Google advice and it made me curious: is the iPhone similar? I tried to find a similar document on Apples developer site but all I found were guides on how to set up Instruments and measure memory. There was lots of self stroking for the awesome tools you were now going to have to learn. There were copious misspellings and grammar mistakes (do they even proof read?). I honestly think they were about to launch the sdk and someone said, “shite! We’re going to need some documentation!” Then another cat said, “nah, if they think they are worthy of being Apple developers, they’re going to have to figure it out on their own.”
Java vs Obj C
I think Apple made a great choice using their proprietary C extension language. Java is far too heavy for what its been purposed for. I think the article makes valid points but necessity will soon require an advancement in speed and power on mobile devices, just to keep up with iPhone.
Ferrari or Chevy
Programming in Obj C is like owning a Ferrari. You can’t fix it yourself, its very difficult/expensive to maintain, performance and capability out prioritize usability, accessibility and utility. On the other hand it butters your bread when you’ve got it firing on all cylinders. Java is like a chevy: parts are readily available, its easy to fix, all the engines are the same and well documented - but it weighs too much, guzzles resources and isn’t something you expect to impress the ladies.
Microsoft on the iPhone
Microsoft launches SeaDragon for the iPhone. Its nifty but not anything that I think I’ll use with regularity. What I did find interesting (relieving even), is the following: in describing the experience of developing for the iPhone, Tim Huckaby, CEO of solution provider InterKnowlogy, describes the programming interface for the iPhone as “nightmarish” compared to .Net,
I know someone will be pissed off about that statement but he’s right. I’m getting better at it but I still retun to Visual Studio with love in my heart. I even pimped my theme just because I enjoy using Visual Studio so damn much
Posted in iPhone SDK | 1 Comment »