Total Pageviews

Disclaimer

This is a personal web page. The views expressed on this blog are mine and do not necessarily reflect the views of my current employer.

I am currently employed by Morgan Stanley.

June 28, 2007

Microsoft Office Compatibility Pack: Turn It On Again

After installing Microsoft Office Compatibility Pack, my Office XP can open Office 2007 format files.

Even though I cannot see the internal operations, conversion between DOC and DOCX files should be easy because one of the format is XML based.

What I am interested at is that when designing Office XP, the guys left an interface to add new file format support. Thus, five years later, we can enjoy the support for new formats.

Yes, a delicate design could benefit you long after.

C#Builder Would Be Dropped?

In .NET market, Visual Studio is no doubt the number 1 IDE because Microsoft controls the platform. Now it seems CodeGear has been tired of following MS in this field.

WinForms designer will be dropped in RAD Studio Highlander. However, VCL for .NET and ASP.NET designers will remain.

For Code Beautifier Collection development, this means I cannot build the code in RAD Studio any longer. Because open source SharpDevelop is a great alternative, there is no problem at this moment.

It is nice to see that CodeGear wants to provide something different and distinguishable. VCL for .NET is really a nice feature even though few people try it. The only thing missing there is interoperability between VCL for .NET and .NET FCL. If I can use more classes in FCL (except those in System.Windows.Forms and System.Web.Forms), I would love to use more VCL for .NET. But it seems that when using VCL for .NET, I have to forget about FCL somehow.

Do you know VCL for .NET, please leave  a comment here.

June 26, 2007

HardQuery Report: ToolsAPI 5.0

Borland.Studio.ToolsAPI.dll is an important reference assembly used by Code Beautifier Collection and other experts. Version 1-4 of it was built against .NET 1.1. And now, version 5 included in Delphi 2007 and C++Builder 2007 is against .NET 2.0.

In order to consume the interfaces defined in ToolsAPI 5.0, CBC should be compiled against .NET 2, too. However, I guess the source code can still be ported back to .NET 1.1 with modifications. Now I am evaluating the possibility.

Remember, even if the back port is possible, I insist Delphi 2007 and C++Builder 2007 be used. Support to older versions of BDS is stopped once 5.3.3 is released.

BTW, an experimental build of GExperts with DelForEx has been uploaded to CodeCentral now.

Printed Documents: Intel Volumes Arrived

I ordered a few volumes of Intel manuals and they arrived today by FedEx. Yes, the manuals are printed and packaged in great condition.

Although Microsoft provides a lot of PDF documents now, such as Office 2007 UI Design Guidelines and Windows Vista User Experience Guidelines, no printed version is available.

What about CBC's manuals? I could publish the PDF to Lulu.com some day. Then users can order printed versions from lulu instead.

June 25, 2007

Books Arrived On Time

I booked several books from China-Pub.com about two weeks ago. And luckily it arrived today. That means finally I can read some books at night, not watch the TV plays.

I'd like to say that buying books online is much more convenient than in a book store. In fact, no book stores nearby have a storage as large as China-Pub.com. Many books cannot be found on the shelves only because the store keeper thinks nobody loves them.

The shortages are,

  1. You have to wait after placing an order.
  2. The books sent to you may not be in perfect quality, because it is selected for you by others.
  3. You can generally know of a book by reading the reviews. So as a complement, I'd like to read the electronic versions at first. Remember some chapters are available at Google.com.

In all, it is nice to have another way of buying books. The conclusion I draw is that I shall buy more books from the online book stores than from the local ones.

June 22, 2007

Class Helper Clone From Microsoft

For Delphi for .NET users, even on .NET 1.1 you can add extra properties and functions to a FCL class or classes in other people's assemblies you can not modify. Yes, that language feature is named Class Helper. You can find more information about it by searching on Google.com.

After reading this post from Guy, the author of .NET Internationalization book, I finally knew Microsoft clone Borland/CodeGear again in .NET 3.5. The language feature is nearly the same except different syntax are used.

In all, nice to see Microsoft does something I like.

BTW, this feature is only available in .NET 3.5, while Class Helper has been there for years.

Office 2007 Users' Must-Haves

When I installed Office 2007 Trial, I knew it is Office only because of its title bar - Office 2007. The look is much different from Office 2003/XP, and every menu items are gone.

The mans from Redmond call this UI Ribbon while someone names it rubbish. Even for me, a guy who is curious  about new things, the UI is hard to learn and use. During my trial I finished my Master essay in Office 2007 with a lot of efforts.

Now if you face the challenge you are much luckier, because an Office add in can ease the pain -

Classic Menu for Office 2007

http://www.addintools.com/english/menuoffice/screen_shots.htm

The screen shot is very attractive. However, my trial has expired so I can not try this one any more.

June 21, 2007

Alex: SharpDevelop 2.2 Is Still Supported

Even though SharpDevelop 2.2 is there, Alex 1.0  still works fine with it.  You can find its source code, too.

I forget the password to SharpDevelop Wiki so I cannot update the information about Alex there. What a pity!

HardQuery Report: 5.3.2.1125 Can Work With C++Builder 2007


I have just installed the trial version of C++Builder 2007 and built CBC HardQuery against .NET 2.0 and ToolsAPI 5.0. And then I manually added the needed registry item. Launch C++Builder 2007 and CBC is there!

Open-mouthed

I used Window Clippings 2.0 to catch the picture and a bug of it can be seen in the first picture - Window Clippings dialog is not hidden at all.

Crying

I will soon deliver you 5.3.3 Final. After that, I would spend more time on .NET 2.0 and ToolsAPI 5.0. In case you forget, 5.3.3 will be the last version of CBC on .NET 1.1 and the .NET 2.0 version is code named GrapeVine.

Stay tuned.

(Updated: The splash window picture has been updated. Window Clippings' dialog is removed.)

Chinese Blog Service Providers' War

Take a look at Windows Live Writer's supported weblog list, you will see no Chinese weblog provider there even though they claims themselves best service providers around here. What they are thinking about?

SINA and SOHU are the two biggest providers in China Mainland who are struggling to attract more users. However, when one user want to move his/her blog from SINA to SOHU (or vice versa), he/she cannot find a easy way. Even when a migration path occurred once, the providers blocked their users as soon as they could.

While Blogger and Windows Live Spaces support more and more service API in order to please their users (especially Writer users) and make migration easier then ever, Chinese providers become more and more stubborn in this field. So I guess one day the Chinese providers would lose the war, as I stopped to use their service a long time ago.

This world (Internet) should be more open in the future and open standards/open source software should win out at last. Isolation would be broken and everyone could enjoy the freedom. A new day has come.

Refactoring Tools: Dangerous

The book Refactoring (Martin Fowler) is my favorite. I read it for the first time about four years ago. Since then, I have been refactoring for a long time in different projects with different programming languages (C#, C++, and Delphi).

Yesterday I tried to refactor code with ReSharper 3 RC, but Visual Studio froze suddenly. Why? This might be caused by bugs in ReSharper or something else. In this very case (and most cases), manual refactoring is much safer because our minds is much smarter.

Many refactoring tools crashed code. I am so lucky that I never experience crashes inside Delphi or Visual Studio 2005 thanks to the  internal code protection. However, dangers may occur anywhere.

So as to keep your code safe, remember to make backup whenever necessary.

June 20, 2007

SharpDevelop 2.2 Is Really There

I prefer SharpDevelop to Visual Studio 2005 just because SD starts much faster, and everything I need to design a form or type some code is already there.

And at this moment, SharpDevelop 2.2 (only available on the build server) is much better for my use - it can now parse complex WinForms.

However, the company is going to buy ReSharper somehow. I believe when ReSharper is available I will use Visual Studio more.

June 18, 2007

Help from a Native American

In my project at work (PAW) a lot of strings must be standardized. However even after a lot of discussions we found out the terms were not easy to understand.

My team lead suggested we ask for help from other teams, that was how I set up a special meeting with a native American. Wonderful, with his help I can finally settle down on the strings.

It is said that during the SVT process, the strings will be reviewed again. Wish the SVT guys provide me more tips then.

ReSharper 3.0 EAP

I knew IntelliJ IDEA a long time ago. However, I did not notice it was created by JetBrains until I tried ReSharper.

I have to confess both the products are wonderful although IntelliJ IDEA has been caught up by SUN's NetBeans.

ReSharper + Visual Studio 2005 can somehow imitate the behaviors of IntelliJ IDEA which is very intelligent to detect defects and vulnerabilities inside the code. I think Microsoft is the happiest to see this kind of add in available in .NET field.

Now ReSharper is growing from 2.5 to 3.0 and you can try ReSharper 3.0 EAP (Early Access Program) for free.

June 15, 2007

ClustrMaps: Who Clicks on This Page?

It is interesting to see where do the visitors of this blog come from with ClustrMaps. I never knew my blog was read by Europeans, Americans, and Indians until I checked the record this Monday.

The mechanism behind may be simple (IP resolution), but the result is very useful and interesting (encouraging me to blog more).

And what is amazing is that this service is now free (you can pay for advanced features). You can set your map up on ClustrMaps.com.

June 14, 2007

Reflector Disassembly

.NET Reflector is such a powerful tool to live with. But I found it bias to C#.

I have disassembled a VB.NET dll lately and cannot compile the generated project at all. However, with a C# compiled dll, anything works fine.

I do not have time to see what is the matter, but maybe I can say writing in VB.NET is more secure than C# in certain cases.

June 12, 2007

TamTam SVN SCC is Now Available

I tried TamTam CVS SCC once. It was great. Now the SVN version is available (after about two months). I love it very much though it is still in Beta. Feel good.
The only problem you may face is that your SVN version is too old. This SCC requires SVN 1.4.3 (I am using 1.4.4). Remember to update you SVN if any unexpected bug occurs.
Thank you, David Levinson, for creating so many interesting tools.

(Updated: Now I am using SVN for my open source project Code Beautifier Collection hosted on Google Code. However, TamTam is not my choice for the client. TortoiseSVN delivers a better experience. SharpDevelop provides me a perfect way to maintain CBC by its integration with TortoiseSVN.)

Compatibility: Should We Do Something Perfect?

During the evolution of Code Beautifier Collection, the settings file format has been changed for several times as well as the Plus registration file format.

I never thought about the compatibility problems that might occur because the risk is not too big. If the settings file format is changed, the users only need to set the parameters again. The core library will never try to load from the old format any more or save to old format. For simplicity, every time a change takes place, the file extension is changed accordingly.

However, for software interface such as OTA, or protocol such as TCP, any changes can impact on a lot of related software. The price of incompatibility will be too high.

We should keep the compatibility in our mind whenever a new version of protocol, file format, or interface is maintained or created. If it is impossible, at least a migration path should be provided. For example, I wrote a plus2plus2 utility to convert .plus file format to .plus2 when I dropped .plus format and turned to .plus2 format(If you are interested, it can be found in the source code package).

My project at work consumes a file format from a third party provider. However, the provider's latest changes bring up incompatibility issues that we have to adapt to. The changes are unreasonable in certain aspects. I believe a discussion will be set soon. Wish the provider changes its mind at last. If it does not surrender, I would have a lot of work to do. Broken heart

June 11, 2007

Windows Live Apology

It is approved that Writer Beta 2 was a big disaster to all the users. Although it was a Beta, it hurt the users hard.

Today I saw at last the apology from the team who works behind the scene. It is welcome but will it bring relief? Any significant bugs of a software will be remembered for a long time. They are unforgivable if they hurt the customers/users. Because Microsoft and Google publish their Alphas and Betas, the complaints will be even more. Thus, how to solve the worst problems if they appear becomes a critical issue. In the most optimistic case, a hotfix will be appreciated. At least a bug alarm and workaround should be provided.

Why this time the Writer team makes thing even worse? The workarounds were not provided to the community in the first minutes (I found them only when I searched in the group) through the most official media --- the team blog until it was too late.

Wish the team could do better next time. After all Writer is a great product of innovation.

June 08, 2007

GIMP and Paint.NET

I have been using GIMP for a long time. From my point of view, it is great. I've known Paint.NET(PDN) for a long time, but never try it.

And just in May, I tried PDN at last. The feeling is that GIMP will be replaced. It is not because GIMP is not as powerful as PDN, but it is harder to use.

If you want to use GIMP, you have to be familiar with Linux operations custom. The differences between user interface are slight, but the dialog style and manipulation measures are totally different.

For me, PDN feels better.

SharpDevelop 2.2: Unexpected

The version number of SharpDevelop has been changed to 2.2 (on the build server), which means there is one more version between 2.1 and 3.0. The changes are not so visible that I noticed the version number update three days after installation.

Even though not a version listed in the roadmap, it is welcome. I love SharpDevelop. It is so small and fast responding. Compared to SD, Visual Studio 2005 is just a slow-moving monster. The only advantage of VS is that more add-ins for it is available.

June 07, 2007

More on .NET Localization

In old posts I talked about the localization work I have done on my project. The posts reflects my understanding of .NET localization. However, if you really need to do localization on an important project, those posts cannot help.

But there are a lot of experts in this fields, such as Guy Smith-Ferrier, author of the book ".NET Internationalization". Even though I do not have a copy right now, I have read the two sample chapters freely available. Yes, it is a well written book about the localization process. Once the project in my charge needs more efforts on localization, I believe this book will help.The only thing missing is ResEx. And I guess at that moment, this quite useful tool has not been built.

June 06, 2007

Fix for Windows Live Writer Part 2

If you want to turn on Check Spelling for English in a localized version of WLW, please read this post.

The only change is that you should use WLWSCL.exe to launch Writer instead.

Since the source code is provided, you can learn how to change the default culture of an assembly. Yes, this technique can be applied in many other cases.

Fix for Windows Live Writer

If you find Writer or svchost consumes 100% or 50% of your CPU, read this thread at once.

Vista Dialog and Controls

It is nice to see Windows Vista delivers new dialogs and controls. They are beautifier indeed. However, for .NET developers there is few resource to use. Even if you are using .NET on Vista, Vista Bridge is all that MS provides you.

However, Pedro M. C. Cardoso published his wonderful article on CodeProject.com. Using his library, the controls reaches you at once.

The only problem is that you have to manually change all references to System.Windows.Forms to another namespace.

For me, the task dialog is the most useful piece even on Windows XP. Yes, the emulation is great!

Digging Windows Live Writer

For a new Windows Live Writer, these three things you may not know (but you know nowSmile).

Do you know this tool is written in .NET? Open it in Reflector, you can even see the source code.

Do you try the latest beta version 1.0(12.0.1193.524)? It will consume your single CPU if you are not using a dual core CPU like me.

Do you know you can set up blog entry categories even in Blogger.com? Yes, Writer makes use of Tag to set up categories. So if you used Tag in the old way, you have to manually remove all the old tags and start to make it categories. Because I have few Tags, the transformation is not tough for me.

June 05, 2007

Busy Month Starts

In the group meeting today, I was assigned new tasks. It seems to be easy but hard in fact. I would take over one project from my mentor and start to update it and do bug fixing.

For a software developer, generally speaking, it is much easier to start new projects than maintaining others' projects, especially when the code has bad smells. If you think refactoring will reduce the pains, you should be warned that enough tests must be done.

Because the project at this moment has no unit tests written, I have to say it is really challenging to refactor on the code. However, I am forced to clean up the code and simplify the logic because so many times I meet bad smells.

Wish everything goes fine after all.

June 04, 2007

HardQuery Report: Dell Inpiron 640m

I have bought such a computer half a month ago and it arrived last Saturday. The silver look is very amazing. I have to say this is the most expensive thing I own now (the 30G iPod Video 2 is second to it).

I do not think Vista Home Premium worth the money so I choose Vista Home Basic. Even with this version of Windows, the main momery has been used 50% by the OS itself.

But now I will start to build up HardQuery 5.3.3 on it, and capture the dialogs on this beautiful OS. Wish I would access the Internet this weekend.

ServiceController Extensions

In the afternoon I had to do something with Windows services. As a result a better ServiceController should be used to know the executable name.

I searched on CodeProject.com. Yes, there is an old article. In the comments section, the technique was mentioned that System.Management should be used.

Fine, everything works well as expected. Thanks a lot, Mohamed Sharaf.

BTW, it is still not easy to use the code in the sample because I need to call ServiceController.GetServices() so I  write a static function instead,

public static string GetServicePath(ServiceController service)
{
    //construct the management path
    string path = "Win32_Service.Name='" + service.ServiceName + "'";
    ManagementPath p = new ManagementPath(path);
    //construct the management object
    ManagementObject ManagementObj = new ManagementObject(p);
    if (ManagementObj["pathName"] != null)
    {
        return ManagementObj["pathName"].ToString();
    }
    else
    {
        return null;
    }
}



June 01, 2007

Busy Week and Happy End

My Dell notebook is finally arriving. And I will subscribe to local ADSL service next week. As a result, soon Code Beautifier Collection 5.3.3 will be available in weeks.

Also, there is a new version of Writer (which I am using now). It seems perfect except that it is localized. In fact, I love using an English version. I will soon delete the zh-chs folder (then it should become an English version).

The project I run in SA is now feature-frozen, which means it will be released in months. I am very happy to say that I love this job.

Now, stay tuned. Many wonderful things may happen soon.