My blog has been a bit dead for a while, so thought I could (hopefully) kick it off again with a little follow-up on my recent Interlude post.
I have now been at LifeStyleTV since the middle of February, and things finally seem to at least somehow settle in a bit. The first weeks was a bit chaotic I must admit, but things are much better now and starting to get more regular.
What I do around here depends a bit on what needs to be done, but my main responsibilities consists of two things: Create playlists and develop internal software.
Continue reading →
Posted in Personal
|
Tagged Life, Update, Work
|
Had a tiny fight with Mac OS X the other day, like I often do. This time it was color labels. You probably know (if you have used Mac OS X at all) that you can color label your files. You simply right-click them in the Finder and select a color label.
This can be quite a handy feature, but not so much when it doesn’t work. My problem was that I would give a bunch of files color labels, but then shortly after that the label simply disappeared. I could look at the file in the Finder, it had its label, I’d click on it, and the label disappeared. In fact the color label was already gone, it was just that the Finder is kind of slow to update itself (O’ how I miss F5 sometimes…).
Continue reading →
Not much is happening at the moment. Well, actually quite a bit is happening. It’s just that I find myself in a rather non-eventful interlude of some sort.
Last Friday (January, 29th) I had my last day at SMS Development & Support AS where I have been working for the last 1.5 years. It was my very first job as a full-time software developer and I learned a lot. Both about developing software and about myself as a developer. Good stuff!
Continue reading →
Posted in Personal
|
Tagged Life, Update, Work
|
Say you have an IEnumerable<t></t> of some sort and you want to check if it contains any duplicates. How do you do that?
Continue reading →
I earlier wrote about the book, The Art of Unit Testing, which I finished a while ago. That book was very good and was focused on how to write good unit tests. It also mentioned Test-Driven Development, TDD, but not too much. The book I read next, which I finished a few days ago, was kind of the other way around. Pretty much only about TDD. And from the title, Test-Driven Development: By Example, that shouldn’t be much of a shocker
Continue reading →
The other day I had to test that an event was raised after some asynchronous work had been done. And since I currently am a total test newbie, this was a new thing for me. Say we have this simple shell of a class:
public class Worker
{
public event EventHandler<eventargs> Done;
public void Start()
{
...
}
}</eventargs>
Let’s just assume it does some work, and is supposed to raise the Done event when it is… well… done.
Continue reading →
When writing C#, in Visual Studio, using generics… have you ever tried checking for null? I have always found that a bit of a hassle.
Say we have this method which returns the subject if it is not null, and the result of a createNew() function if it is null.
public static T NewIfNull<t>(this T subject, Func</t><t> createNew)
{
if (subject == null)
return createNew();
return subject;
}</t>
Not claiming this is a very useful method, but it was the simplest thing I could come up with
Anyways, in Visual Studio you will now probably have a blue (is blue here at least) squiggly line under the equality operator. It states you are doing a Possible compare of value type with ‘null’, which of course is reasonable and correct. We could just ignore it and move on… but we don’t really like squiggly lines, do we? I sure don’t… so lets get rid of it.
Continue reading →