Archive

Archive for the ‘Tools’ Category

Wordpress for iPhone

July 22nd, 2008

The wordpress app for the iPhone was just released. I’m using it to write this post. The app is pretty nice. I wouldn’t expect any code samples or wordy posts coming from my phone since my texting skills are pretty weak, but it’s a nice app for when blogging on the go is required. The built in access to categories, tags and the live preview are very impressive.

[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]

Tools, Writing , ,

UI-Patterns.com

July 22nd, 2008

I’ve been visiting the Yahoo! Design Patterns Library periodically for the past couple of years, but somehow I only now managed to stumble upon UI-Patterns.com. It’s always good to have another resource to help create better user experiences, so I’m glad I found it. The site is very well organized and cleanly designed, making it enjoyable to use (just as you would expect from a site that focuses on UI/UX). If you do any work that involves a UI, you should check out this site.

[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]

Tools, Usability , , , ,

Jott

July 15th, 2008

I recently discovered jott.com and so far, I’m finding it to be a very useful service.

If you are not familiar with Jott, it’s a voice based note-taking, communication and reminder service. Once signed up, you call a phone number and use your voice to send email or sms messages, leave yourself reminders, create calendar appointments or even post to a blog or twitter account. Jott allows you to call in and have news feeds read back to you. You can even perform product searches on Amazon by telling Jott what you are looking for. The Amazon results are then emailed to you so you can review them later.

There are hooks in place for other services to integrate Jott and there are quite a few apps (such as wordpress, google calendar and twitter) that are already setup tp work with Jott.

There is also a free iPhone application that works with your Jott account.

At the moment, Jott is free. The business model behind it is unclear, but I’m sure there will eventually be some sort of tiered subscription model or audio ads during phone calls into the service (I could also be completely wrong).

It’s definitely worth checking out.

[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]

Productivity, Tools ,

Instapaper and Google Reader

April 15th, 2008

I recently discovered Instapaper. This is a simple app that allows you to bookmark an item to be read later. It is simpler that del.icio.us, in that there are no tags. It doesn’t appear that your list of bookmarked items are meant to be shared or searched. The items are simply put into a list of things you want to read later. So, using a simple bookmarklet to your bookmarks toolbar, you can load up a web page, click on the bookmark, and that current page is added to your instapaper page. When you want to read the item, go to Instapaper and find that item in your list.

This is great. It’s fast and simple, but there is only one problem. Like del.icio.us, I tend to forget to go to the site to actually look at my bookmarks again. There is a simple solution though… Instapaper exposes an RSS feed of your unread items (you get the link once you’ve added an item to your list). So, I have subscribed to my own feed and now, when I have time to read, my items will show up in Google Reader, which is where I go when I have time to read. Perfect.

Remember, this is more about marking pages to come back and read when you have time. I don’t see this as a replacement for other bookmarking sites.

[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]

Learning, Tools , ,

Visual Studio Unit Tests and Abstract Base Classes

April 6th, 2008

I am taking a semi-TDD approach to my most recent project. As I started writing my initial tests, it occurred to me that all of the ServiceLayer/Manager classes in my business layer inherit from a standard base class and that at least a few of the tests will be identical (except of course for the datatypes used). Each test class will also have essentially the same setup and breakdown.

So of course, I immediately fire up a new class and create a generic base class. I added a type parameter for the entity type that will be transported/manipulated through my Bll, one for the class being tested and another for the data access interface that I would be mocking through Rhino Mocks.

I added the internal and private members that would be used for setup and the test initialization method, commented it all out in my actual test class and added my inheritance. So far, so good. My tests ran, but they were still implemented in the original test class, so I commented them out, copied them into my base class and updated them to use my generic type arguments.

At this point, the “CreateInstance()” method that I was using to get a new instance of my target object caused a compiler error due to the fact that it called a constructor on my genric type argument that accepted a parameter. In order to pass in the mock for my data access interface, the parameter had to be there, but there is no way to specify constructor arguments in the constraints for generic type references.

I decided that making the “CreateInstance()” method abstract would give me access to it and then I would just have to add an implementation into my actual test classes… not a bad trade for the ability to “share” a group of core unit tests. So I marked the class as abstract, removed the method implementation, added the override into my actual test class and compiled.

At this point, my test project compiled with no problem, but my tests didn’t show up in test view. I compiled again, closed and re-opened my test class, closed and re-opened Visual Studio… still no tests in the test view window.

A quick Google search turned up this. I haven’t spent much time researching it at this point, but it seems that Visual Studio doesn’t recognize (or won’t run) Unit Tests that are defined in an abstract class. This problem is pretty specific to the unit testing framework that ships with Visual Studio. Sounds to me like this sort of thing would be possible if I were using NUnit (or some other xUnit framework) to do my unit testing.

The base class still seems to handle my setup and breakdown pretty well and I can use it for support methods that I share between tests so it isn’t a total loss, it just would have been nice to be able to inherit some tests as well.

If I find any new information, I will be sure to post it. If you know something I don’t (I’m sure you do but I mean something related…) feel free to share in the comments.

[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]

.NET, TDD, Tools, Unit Testing, Visual Studio , ,

Debug your classic ASP Pages in Visual Studio 2005

April 2nd, 2008

This was originally posted at vanslaars.com in December of 2006. I have not tried this with Visual Studio 2008 (and probably won’t have a reason to anytime soon) but I am pretty confident that it would work with 2008 as well told that it does NOT work.

I don’t do much work with classic ASP pages, but part of my role in my current position involves maintaining legacy ASP websites until they are all converted to ASP.NET 2.0. The thing that really gets to me when working with classic ASP are the generic server errors that tell you practically nothing about what went wrong… this, coupled with the fact that none of the members of the current team were here when these applications were written, makes it very difficult to track down and fix bugs.

Well, there is a solution, yet it seems to be a difficult one to find instructions on. Since the first time I worked my way through this, some additional information has been publshed on various blogs… this is my attempt to help fill the gap for those searching desperately for the steps involved in debugging ASP pages through Visual Studio 2005.

The first thing you need to keep in mind is that this requires IIS (5 or 6) and WILL NOT work through VS 2005’s built-in Cassini web server.

Secondly, before you start working through the steps, you need to run your page without debugging (just browsing to it on localhost will do too) BEFORE trying to debug… this requires you to attach the debugger to a process, therefore, the process needs to be started before you attempt to debug (this one got me a couple of time when I first attempted it).

So, here are the steps:

  1. Make sure your site is set to run through IIS (not Cassini)
  2. Make sure you enable ASP debugging on your server
  3. Open your target ASP file in Visual Studio 2005
  4. Set a breakpoint somewhere in your ASP page
  5. Run your page without debugging from Visual Studio (or browse to the page through localhost)
  6. In the Visual Studio menu, go to Debug -> Attach to Process
  7. Choose the process:
    In IIS 6 (Server 2003) choose w3wp.exe
    In IIS 5.1 (XP Pro) you want to choose dllhost.exe - Unfortunately, it isn’t this simple though… you will need to attach to the process based on the process id to ensure that you have the correct process. In order to do this: follow these steps:

    1. Download the ListDLLs utility from sysinternals.
    2. Assuming you have the ListDLLs executable available on your machine, in a command prompt, go to the directory which contains ListDLLs and run the following command:
      listdlls.exe -d asp.dll
    3. This will return the process id for the instance of dllhost that loaded asp
    4. Use this ID to select the process in the Attach to Process dialog
  8. You may need to refresh your ASP page in the browser to hit your breakpoint.

I hope this helps out the next person having difficulty finding these steps.

Happy Debugging.

[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]

Tools, Visual Studio , , , ,

aspnet_merge.exe exited with code 1 - WTF?

March 31st, 2008

This was originally posted at vanslaars.com in January of 2007. I haven’t encountered this error message with Visual Studio 2008 yet, but the instructions to update the options DO apply for Visual Studio 2008 as well.

When using a Web Deployment project in Visual Studio 2005, you may encounter an error similar to this: ?aspnet_merge.exe exited with code 1?. This reminds me of the classic ASP “Internal Server Error” message, which basically says ” Something is broken, figure it out and fix it!”.

Well, I have good news, you can get more detail with your error messages by setting a simple option in Visual Studio 2005.

To do this, simply browse to Tools -> Options -> Projects and Solutions -> Build and Run, and in the options to the right of the dialog, switch the “MSBuild project build output verbosity” drop-down value to “Diagnostic“. Now you will see detailed output during the build process, including detailed errors when something goes wrong.

[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]

.NET, Tools, Visual Studio ,

WordPress Upgrade

March 31st, 2008

I just upgraded to WordPress 2.5 and while you can’t tell from the front-end, I wish I had done this sooner. The administrative interface has been drastically improved! If you are a wordpress user and haven’t upgraded, you should do it. The whole process took me about 10 minutes and most of that time was spent downloading my backup and uploading the new files. Nothing appears to be broken and all of my theme modifications, posts, and pages seem to have made it through the upgrade without being harmed.

[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]

Tools , ,

Google Login Madness

February 16th, 2008

I log into Gmail and I can go to Google Reader without logging in again. It also works the other way around. The same behavior applies to Google Docs and Google Calendar. This makes sense, same service provider, same login credentials, same browser session.

Now, when I go to Google Analytics, it knows who I am, but I have to enter my password again… ok, maybe they are trying to make analytics more secure? Doesn’t make much sense to me, but ok.

Now if I go to AdSense (you know, to count my millions) it doesn’t even recognize me… you would think a company that can store, index and search ALL of the information, anywhere, would be able to create a consistent user experience across their applications.

It’s not a major issue, but it lacks the level of usability and consistency I would expect from the all-mighty Google.

[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]

Tools, Usability , , , ,

LINQ with LINQPad

February 11th, 2008

My latest project at work has me working with LINQ to SQL. This is definitely cool stuff!

If you are not familiar with LINQ, it is a new feature of .NET 3.5 (C# 3.0/VB 9.0) and stands for Language INtegrated Query. It offers query syntax that can be used to query in-memory objects, XML, Databases, and more. You can learn more about LINQ here, here and here.

As I started working with LINQ, I found myself writing SQL queries and then working backwards to translate them into the appropriate LINQ syntax. This was fine to get the first couple of queries running and allowing me to get my project moving, but I wanted to be able to write LINQ queries without the SQL step and I wanted to be able to test them outside of the context of my application.

I found LINQPad, and it was exactly what I was looking for. To simplifiy, LINQPad allows you to write and run LINQ queries in a similar fashion to writing SQL queries in SQL Server Management Studio or Query Analyzer before that.

LINQPad comes pre-loaded with a couple hundred sample queries and can be used to run snippets of C# 3.0 or VB 9.0 code, not just LINQ queries!

If you are working with LINQ, this is a great way to practice, learn, test and just keep thinking in LINQ when simply querying your databases.

[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]

.NET, C#, LINQ, Tools , , ,