Aspect-Oriented Programming

Lately I’ve been trying to learn how to use aspects in .NET. So far, I
haven’t had much success. Most of the AOP tools that are available for
.NET are either incomplete, or extremely complicated. To date, I’ve
looked at Aspect#, and AspectDNG. I can’t get Aspect# to
actually work, and AspectDNG has me totally confused. I’m not real sure
where to begin.

Recently, I discovered that there is a port of the Java Spring framework
called Spring.NET. (shocking!) It also has an AOP component that
might be worth checking into.

RSS Bandit

I’m switching my Windows RSS/ATOM reader from SharpReader to RSS
Bandit
. SharpReader has served me well these past few years, but now
it’s time to move on. SharpReader hasn’t been updated in what feels like
eons, and I have outgrown it’s rather basic feature set. RSS Bandit
supports search folders, (a big plus for people who subscribe to more
than 100 feeds) is open source, and has an active developer community.

If your looking for a no-frills reader, then I would suggest
SharpReader. Once you figure out the basics, then I suggest you get
something else. For now, that’s going to be RSS Bandit on Windows. For
anybody who cares, my favorite reader on Linux is Akregator. I use
the reader plugin that integrates it with Kontact.

If anybody has suggestions for other readers on Linux (KDE) or Windows I
would love to hear them.

Cool VS.NET Add-In

From Scott Hanselman’s List of Ultimate Visual Studio.NET AddIns,
CopySourceAsHtml. This little gem allows you to copy code from the
Visual Studio.NET editor to the clipboard complete with HTML formatting.
If you have ever wanted to easily create HTML documents with code
examples or post code snippets on your blog, then this is the tool for
you. Take a look.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
using System;
namespace MyHtmlApp
{
/// <summary>
/// An example class illustrating the joy of CopySourceAsHtml.
/// </summary>
public class MyClass
{
private int _someVariable;
public MyClass()
{
_someVariable = 0;
}
public void SomeMethod()
{
_someVariable++;
}
public int SomeVariable
{
get { return _someVariable; }
set { _someVariable = value; }
}
}
}

Very nice. Highly recommended.

Gentle.NET Follow-up

After being side-tracked by some pressing issues, I’ve finally had a
chance to play around with Gentle.NET. For the most part, it is a
fairly straightforward and easy to understand framework. I only
encountered two problems while working with it. First, use caution when
naming your database fields. For reasons unknown certain words, like
“state”, get wrapped in square brackets. Gentle.NET doesn’t compensate
for the square brackets when it builds a query, and as you might guess,
those queries will fail. This led to an extended session of pulling out
my hair as I attempted to figure out why my test program wouldn’t work.
My other problem is with the lack of documentation. The source code
comes with a complete set of unit tests, but I would prefer a nice
tutorial outlining the major features and how to use them. If you find
yourself in need of a mapping framework, I recommend that you give
Gentle.NET a look.

With that said, I won’t be using it anytime soon. I’ve come to the
conclusion that Gentle.NET, and object/relational mapping in general, is
a clear violation of YAGNI. For now I will continue to use and
refine the data layer I originally designed for my project. Maybe in the
future, I will have need of something with more features. If/When that
occurs I will be sure to give Gentle.NET another look.

Edit and Continue Coming to C#

Microsoft has announced that EnC is coming to C# in Visual Studio

  1. John Robbins at Wintellect doesn’t like it. I have mixed
    feelings about having the EnC feature in C#. The only thing I have ever
    seen EnC used for is making bad code even worse. I’ve watched numerous
    VB hacks sit their in a perpetual state of EnC as they debug a program
    into existence. This leads to very poorly designed (if you can call them
    that) programs. More often then not, they manage to introduce an equal
    or greater amount of defects by using this feature. In my world, one
    does not write production code using EnC. I personally prefer
    test-driven development. Since I’ve started writing unit tests with
    NUnit, I have found myself spending less and less time using the
    debugger.

On the other hand, I have to admit that I like using EnC when playing
around with a new API or component. I like the ability to sit there and
twiddle with the component and get instant feedback. For me, that is the
way I learn new things best. When it’s all said and done, though, I
think I would prefer the inconvenience of having to do the
code-compile-run dance than to have to deal with code written using EnC.

KDE 3.3.1 First Impressions

This is a follow-up to my post last week. KDE just keeps getting
better and better with each new release. I haven’t found anything in
this release that is earth-shattering yet, but this release adds a
heaping helping of bug fixes and usability tweaks that make the
experience that much better.

Highlights include:

  • Konqueror has gotten faster, and the Netscape plugin wrapper appears
    to be performing better. Now I can watch Flash animations without
    the audio stuttering.
  • Kopete now sends messages when you press Enter. (Finally!) Before,
    Enter gave you a newline in the text entry widget, and Ctrl-Enter
    sent your message.
  • Kontact has a new Summary layout.
  • Various crash fixes. Web pages that used to crash Konqueror now
    work, Kontact/Kmail appears to be more stable.

My only complaint is the side-bar media player in Konqueror is still
broken. Any attempt to play a file causes a segfault and the appearance
of the KDE crash dialog.

Overall, a nice improvement to an already great desktop.

Gentle.NET

Lately, I’ve been looking for a better way to persist my objects into a
relational database. I’ve tried various methods including the Data
Application Block
, embedded SQL queries, and stored procedures. None
of these solutions really seemed to do a satisfactory job of solving my
problem. They just don’t feel very object-oriented.

I’ve been playing around with Gentle.NET. Gentle.NET is an
Object/Relational Mapping framework. So far I’ve only made simple little
test programs. The documentation is somewhat lacking, but I’ve managed
to create a simple program that can save and load simple objects. I want
to try and incorporate Gentle.NET into a project I’ve been working on.
As I work on this project, I’ll try and post details of my experience
here.

FileZilla

Today I found myself in need of a solid FTP client for Windows. I was
attempting to upload some files to a remote website, and I was getting
nowhere fast with Windows’ FTP folders. For reasons unknown, the FTP
folders lose connection with the remote site after about 20 seconds. A
quick Googlesearch later, I stumbled across FileZilla. It has
all the features I expect a good FTP client to have. Active/Passive
transfer modes, queue support, it’s all there. Plus it’s Free Software
to boot. If you need a FTP client for Windows, I recommend you check it
out.

Download FileZilla here.