Showing posts with label Tools. Show all posts
Showing posts with label Tools. Show all posts

Saturday, August 2, 2008

C++ Development with Eclipse

Eclipse has been the only Java IDE I can comfortably use. And while I'm writing C++ code on Windows, Visual Studio is naturally my first choice. But what should I do if I need to develop Linux C++ code (okay, I know vim and xemaces are out there...)?

Luckily, there is Eclipse CDT (C/C++ Development Tools). It seems basically build (with make) and code completion works nice and neatly. What I'd like to test next is to see whether the relatively "tricky" things, such as code completion with templates and smart pointers, might work with this...

Wednesday, November 7, 2007

Handy Tools

  • Windows Live Writer: Just came out of Beta, fresh.
    Finally a decent enough, truly WYSIWYG, free blogging tool. It supports Blogger, Windows Live Space (of course) and a few other blogging site. (I'm using it to write this post right now...) 
  • Videora iPod Converter
    A free iPod video converter that can convert a good deal of different video file formats for iPod. It downloads and converts youTube video too.

Thursday, August 9, 2007

Dr. Watson

A common problem bugslayers all have faced one day is that your application crashed on a client's machine. There is simply no debug tools available for you to investigate further each if you have the source code and symbol files on hand.

It's good to know that Windows does come with a default error logging tool, Dr. Watson. It would create a crash dump file with the call stack and variables. Later, you can load the dump file in Visual Studio to reproduce the crime scene.

Here is all you need to konw in order to set it up and make it work...

Monday, August 6, 2007

Forfiles

A very common maintanence task for a file server is to purge files older than a certainly date. For example, to delete all files under a directory that's more than 10 days old.

I'm sure some one can do this in Perl or some other script language in no time. But here is another handy tool for the job: Forfile comes with Windows 2000 Resource Kit and later versions of Windows .Net Servers. It can accomplish that task in just one command, sure beats mingling with date format in a batch file.

One thing to note is that the examples given in that msdn help page don't really work. You need to test things out yourself...

Monday, July 9, 2007

Windows Live Messenger Add-In API

Seeems to be a nice way to create an alert/query service interface. The API is incredibly easy to use. You can probably create your own Messenger Robot in minutes (a automated trade alert, for example).

BTW: There is really no SDK to install, as the required assembly comes with Windows Live Messenger itself.

  • A simple guide on how to write Windows Live Messenger Add-Ins.
  • In case you need some ideas on your next messenger agent, check this out.

Wednesday, April 18, 2007

Visual Studio Tools for Office Second Edition

Technically speaking, VSTO 2005 SE is not really the second edition of VSTO. While VSTO 2005 is an independent version of Visual Studio 2005, VSTO SE is more of an add-on to different editions of Visual Studio. For example, VSTO 2005 SE can be installed on top of VSTO 2005. In addition, VSTO SE doesn't really cover all VSTO features. Noticeably, document level customization and action pane are not available in SE. On the other hand, it does add support for Custom Task Panes and Ribbons. And here is an decent overview of the mechanics of VSTO (Outlook is used as an example, but I imagine it should be almost identical for other office products). To my surprise, VSTO still works its way through the good (bad? evil?) old COM interfaces (IDTExtensibility2, etc), with AddInLoader.DLL wraps around managed code. It seems .NET is not treated as a first class citizen even in Office 2007 (to be fair, VSTO does add some nice touches of the managed world, such as added security with separate AppDomain).

Thursday, April 5, 2007

MSBuild, NUnit and CruiseControl.Net

I thought this would be the de facto standard setup for most .Net project these days. But it turns out making the whole thing work is far from "standard". Here are the steps I took, for what it's worth:

  • MSBuild is installed with .Net Framework 2.0. Install CruiseControl from here, and NUnit from here.
  • Install MSBuild Community Tasks, which includes a NUnit task for MSBuild.
  • Now you can create NUnit task in MSBuild project like this:
  •    <Import  Project="$(MSBuildExtensionsPath\MSBuildCommunityTasks\MSBuild.Community.Tasks.Targets"/>
       <NUnit Assemblies="myTest.dll"
           ToolPath="C:/Program Files/NUnit 2.4/bin/" 
           OutputXmlFile="TestResult.XML"/>
  • Setup MSBuild task in CruiseControl. Strangely, the custom logger used in the example is NOT part of CruiseControl installation. You need to download it here and put it into CruiseControl installation folder.
  • Use NUnit with CruiseControl. Since NUnit is setup as part of MSBuild, the only thing left to do is to merge the test result output into build log.
  • Finally, if CruiseControl is setup as a windows service and you're compiling a C/C++ project with MSBuild, you might get this error:
  •       Fatal Error C1902: Program database manager mismatch; please check your installation.
    Believe me, this has nothing to do with the pdb files. Unfortunately, link to the hotfix mentioned in the KB article is broken. An alternative is to set your CruiseControl service to run under a different use account than the default SYSTEM. (Yeah, I know...)

Wednesday, April 4, 2007

C-Runtime Libraries, DLL Hell and Side-by-Side Deployment

Starting from Windows XP, Microsoft has created a new "side-by-side" deployment model for native libraries as its latest attempt to solve the "DLL Hell" mess. The concept is pretty much the same as versioning in the managed world: libraries are versioned and signed, then installed in a global cache (WinSxS folder). Different versions of the same library can co-exist in the cache. A manifest is embedded in executable files to identify the version of the library the application was built with. C-Runtime libraries (MSVCRTxx.DLL, MSVCPRTxx.DLL, etc) are treated the same way. The process will throw a nasty error message if the executable or any DLL doesn't have a manifest embedded. If a third party library or an old DLL lying around doesn't have manifest built in, MT.EXE can be used to embed the manifest xml into the DLL directly:

    mt /outputresource:yourlib.dll;#2 -manifest yourlib.dll.manifest
More references in MSDN:

Thursday, March 22, 2007

Tools I have been using...

Time to create a list of tools I have been using in my current project before jumping into a new bunker next week:

  • SubVersion
  • I honestly don't have a preference when it comes to version control software. I have used VSS, CVS and now SVN. The differences in terms of file lock, branch etc are not really that big a deal. TortoiseSvn sure makes your life a lot easier by integrating version control into windows explorer though.
  • CruiseControl.NET
  • I had been using home-made daily/weekly automated build process and regression tests to ensure continuous integration, before I got to know CruiseControl.NET, that is. Make sure you install the client tool CCTray.
  • BugTracker
  • I feel that bug tracking tools are generally understated in the software development methodologies such as XP. Most developers are probably put off by the term "bug". But bug tracking tools are not limited to track "bugs", they can be used to track new feature developments, document design limitations and provide a structured "knowledge base" for the project. I have used Bugzilla in the past. Built on .NET platform, Bugtracker is not super sophisticated, but it's small enough to get your hands dirty on. And it probably provides enough functionalities for Scrum-sized development teams.
  • TWiki
  • I'm so obsessed with Wiki style documentation at one time, I was called the WikiMan... The benefit of using Wiki for knowledge sharing is that the documents created are naturely structured, and most Wiki implementations provide full-text search functionality. And also because it's so easy to use, a Caveman can do it... TWiki is not .NET based. It's on Perl and Apache. And I never got into the TWiki plugin stuff, which can probably be used instead of the bugtracker. I'd be interested to see a .NET implementation of Wiki --- it has to be at least as good as TWiki though.
  • Reflector
  • Any .Net developer NOT using Reflector? I use it primarily to get a peek into framework library implementations (and Whispering: third party tools). If, however, you want to gain some insights into CLR itself (GC, thread pool, etc), SSCLI is a better bet.
  • Regulator
  • If you ever need to write a multiline regular expression, you need this. Period.
  • ManagedXLL
  • Anyone in Finance will tell you that Excel is the best product of Microsoft. And any developer ever wrote a XLL plugin for Excel will tell you how painful that experience was. Creating Excel plugins in C# with ManagedXLL, on the other hand, is almost pain-free. You still need to watch out for the mysterious way in which Excel updates the spread sheets though.
  • CodeSmith
  • In retrospect, I probably used CodeSmith in a not-so-effective way: we used it to produce the DAO and Store Procs. The design of the system is less clean-cut:
    • If we take a data centric view of the world, we should probably take the typed datasets and push it all the way through out the system.
    • If the view is object centric, an O/R mapping tool (such as NHibernate) would be a better fit.
    There is nothing wrong with CodeSmith though. It's very useful when you need to produce large batches of template based classes.
  • Spring.NET
  • I dont' pretend to be an expert on IOC/DI or AOP. I have only used Spring.NET framework as a generic configurable Factory pattern implementation (IoC, in its simplest sense). Still, I feel the extreme flexibity the framework provides. In fact, I think the downside is that it makes developer easily over-design their system by abusing the pattern with too many dependency injections.
  • GenuineChannels
  • A bidirectional TCP channel implementation. A feature .NET Remoting developers have cried out for since the day .NET came to existence.
  • MSAS/PivotTable/ADOMD
  • This is the first time I tried OLAP reporting. The Microsoft OLAP pipeline is quite impressive, even with MSAS 2000. MSAS integration with Excel pivot table is seamless and it freed up developers from writing an ocean of custom reports as customers could easily slice and dice the pivot table in their liking, not to mention the update is realtime.
Of course, these are only from the special menu. The usual would undoubtedly include NUnit, Nant, log4net etc.

Tuesday, February 27, 2007

RSS Aggregator, FeedBurner

I'm sure that all earthlings know about aggregators, and they are using one as well. But there is always someone from caveman age, like myself, keep refreshing some twenty browser tabs to read all the blogs and news every day. Anyhow, I'm finally getting tired of it and decided to find a good feed reader:

  • IE7 and Outlook 2007 both support RSS feeds directly (check out the RSS icon on the IE toolbar), but I don't quite like the way IE displays the feed content.
  • I'm trying out RSSOwl. The interface is clean and the way it organizes feeds is also very intuitive.
  • Also, check out NewsFire for Mac OSX.
  • You can add a feed into Google Personalized Homepage (check the Add by URL link on the right of search bar).
  • I also came across FeedBurner, a site that provides feed distribution and statistics services. You can check the number of subscribers of your feed through their website. But there doesn't seem to be an easy way to aggregate these numbers with the website statistics. FeedBurner also provides some HTML snippets you can eaily put on your website for different types of aggreagators (check RSS Feed section on my blog page banner, for example).

Thursday, January 18, 2007

Get the name of the worksheet

   =MID(CELL("filename",A1),FIND("]",CELL("filename",A1))+1,256)
CELL function returns the file name of the currently opened workbook, appendixed by the worksheet the referenced cell (A1 in this case) is on. The file name is quoted in squre brackets. Other information can be retrieved with the same function includes "width", "format", etc. Here for details.

Process Explorer

Ever wondered which application is keeping what files open and what registry keys its using? Process Explorer comes very handy on that. The search functionality allows you to search for the process that open a specific file or registry key. Aside from Process Explorer, Sysinternal (Acquired by Microsoft in 2006) has produced a host of extremely useful tools. Check them out here.

Tuesday, January 16, 2007

Snap!

Snap Preview Anywhere is a nice gudget that displays a preview image when the mouse hovers on a link. It's free, and adding one line to the page template does the trick.

Excel: define drop down list for a cell

When defining a drop down list for a cell in Excel Data Validation, the valid values have to be on the same worksheet. A work around to this is to define the values as a named list first (I.E. name "Departments"), then reference the list name in Data Validation ( "=Departments"). Details here.