March, 2009 Archives
Mar
What are you communicating right now?
by Mikael Lundin in Technicalities
In this era of Facebook and Twitter the one-on-one communication has diminished and in its place a new broadcasting kind of communication has taken place. It is no longer about the meeting between individuals, but exactly “What are you communicating right now?”.
It really started with the blogs, a kind of communication where you write your opinion into cyberspace and hope that someone picks it up. Then came the micro blogging, a kind of fast food of blogs. “If you don’t have time to listen to me whine, you may read a summary of my latest thoughts in 140 characters.”
I find it quite astounding that the concept became a hit.
Where will this go to? When everyone stands shouting into the air, who will listen? and who will care? The Web 2.0 has exploded in communication, but the communication lost its target and became pointless.
I believe that e-mail and directed communication will soon have a renaissance.
Mar
Run your unit tests on the web
by Mikael Lundin in Programming
How do you show a client what unit tests are, and what they are good for? Sure, you can lecture them in all the time and money they will save by not hunting for bugs, but it will still be an abstract thing for them. They will never get in touch with the unit tests.
I was thinking about this while going home through Uppsala on my bike. What if there was a UnitTestDataSource that could run all your unit tests. Then it would be easy to just hook up a Repeater and display the results in any way you want to.
I coded most of the DataSourceControl there on the bike, in my head and just typed it down when I came home. This is the result:
This includes the following:
- NUnit test runner
- Support for ExpectedExceptionAttribute
- Support for IgnoreAttribute
Not included in this release
- TestFixtureSetup/TestFixtureTeardown
- TestSetup/TestTearDown
- Category
Usage:
You will probably need to add this to your web.config.
<system.web>
<pages>
<controls>
<add tagPrefix="litemedia" namespace="LiteMedia.Utils.Web" assembly="LiteMedia.Utils" />
</controls>
</pages>
</system.web>
And this is an example of how it could be used in ASP.NET markup.
<litemedia:UnitTestDataSource runat="server" ID="UnitTestDataSource" AssemblyName="LiteMedia.Mint.UnitTests" OnLoad="DataBind" />
<asp:Repeater runat="server" DataSourceID="UnitTestDataSource" OnLoad="DataBind">
<HeaderTemplate><ul></HeaderTemplate>
<ItemTemplate>
<li class="<%# GetSuccessClass(Container.DataItem) %>">
<span class="name"><%# Container.DataItem %></span>
<p class="exception <%# GetSuccessClass(Container.DataItem) %>">
<%# GetException(Container.DataItem) %>
</p>
</li>
</ItemTemplate>
<FooterTemplate></ul></FooterTemplate>
</asp:Repeater>
Mar
jQuery/Thickbox + Prototype/Scriptaculous = ?
by Mikael Lundin in Programming
So, I wanted to implement jQuery/Thickbox in an environment that already were using Prototype/Scriptaculous. The problem you see here is that both jQuery and Prototype use the same $ syntax. Lucky me there’s a solution to this problem.
jQuery.noConflict();
This will let you use all jQuery functionality but with jQuery() instead of $(). So, to be able to use thickbox with this, you need to download the uncompressed thickbox code, add the noConflict statement at the beginning, and then exchange all $() with jQuery(). Like this:
// enable noConflict-mode
jQuery.noConflict();
// instead of this
$(document).ready(function(){ });
// you now do this instead
jQuery(document).ready(function(){ });
Beware of regex and other constructs that also use $. Don’t do replace-all in your thickbox.js, because it just won’t work. Thickbox is a small framework and it will take you just a minute to manually go through it and replace all jQuery calls.
Mar
Death of a software developer
by Mikael Lundin in Technicalities
I’ve just started my career as a software developer and I already imagine my impending doom. What happens when my knowledge is obsolete and I no longer can keep up with whats new? What will I do then? I know that this will happen, maybe not tomorrow, but in 10-15 years if I’m lucky.
I can do it like others and just stick around, pretending everything is okay while the situation keep getting worse.
Some switch positions in their company and becomes sales persons or project managers. That is not something for me. I don’t have the social skills of a sales person and the responsibilities of a project manager would probably choke me to death. I must say that I’m quite impressed by the social skills of all sales persons I know and project managers have my unending gratitude of making every workday a little bit easier.
It was suggested to me I’d become an architect, but I don’t really understand what they do that I don’t do today in my daily work. So how would that help in my more and more declining state of technical skills? It would just be another way to grab hold on what once was, and try to boss with my “superior knowledge” of a dead language over those who knows better.
I could become “the angry tester”. That would suit me pretty well. It would also be a recognition of defeat -I do no longer have sufficient technical skills to be a productive developer. The question is then: would I be sufficient as a QA person?
This is a bit early to plan for these things, but it’s never to early to just look up and see what’s coming. I’d rather see my doom coming slowly from afar, than getting an unexpected immediate moment of truth.
Mar
EPiServer days 2009
by Mikael Lundin in Other
Me and Emil Birgersson held a seminar at EPiServer-days about continuous integration. It was fun, I’ve never held a seminar in English before, so it was a new experience.
It might be, that we didn’t go deep enough into the details. We made a careful choice of keeping it simple, because we wanted all beginners to understand. We wanted customers to demand this of their consultants and we wanted to inform why, rather than how.
All questions where advanced question on how and that may show that we were talking to the wrong group of people. We were talking to developers that already knew why, and were much more interested in how, and in that – advanced how.
That’s a lesson learned for next time – Know your audience!