My blog has moved!

You should be automatically redirected in 6 seconds. If not, visit
http://www.csharpblog.net/
and update your bookmarks.

Sunday, 23 March 2008

iLove the iPhone

I finally got an iPhone through work for R & D. Namely trying to develop applications for the iPhone using the newly released iPhone SDK. This works really well with my new Apple iMac as the new SDK (which basically is Xcode) only works on a Mac.

Here is a screen shot of my hacked iPhone working with my Orange sim card.

photo 

I will keep you posted on how I get on with my iPhone and the iPhone SDK.

Wednesday, 5 March 2008

Back from California to find IE8 Beta 1

Well San Francisco and Las Vegas were fantastic, but even better Internet Explorer 8 Beta 1 (IE8) is now available. You can download it here.

Well I will try to cover in a series of postings my experiences with it.

Installation

Not much changed here yet. As a matter of fact not much has changed generally with IE8's UI.

setup1

setup2

First Run

A new first run settings wizard walks you through the various different old and new settings available, such as Search, Apps and Safety Filter (aka Phising Filter).

setup3

Once you have completed the settings wizard you are prompted with the new IE8 Welcome Page, introducing you to the new features available such as IE7 Emulation mode and WebSlices.

IE7 Emulation

IE7 introduced a lot of "hacks" in order to maintain compatibility with previous versions. Subsequently this meant lack of Web Standards. IE8 now runs in Standards mode by default, but if you need to browse the Internet like IE7 then click the big IE7 Emulation button.

WebSlices

Another new feature, similar to that Safari offers on Mac OS X, is WebSlices. Developers can mark parts of web pages as "WebSlices" and enable users to monitor information they rely on as they move about the web. With a click in the Favourites bar, users see rich "WebSlice" visuals and developers establish a valuable, persistent end-user connection.

Finally when you browse to a web site, IE8 ensures you are sure of where you are by highlighting the domain name of the site - so hopefully Phising will become even more difficult.

ie81

ie82 

I will keep you posted with more as soon as I start using it more and more. So far my main work website works!!!

Monday, 11 February 2008

Mac OS X 10.5.2 Released

Apple just released the anticipated 10.5.2 update for Leopard. Among the myriad of fixes the highlights of this major update are:

- Airport: Improves connection reliability and stability
- Back to my Mac: Adds support for more third-party routers, as detailed in this article.
- Dock: Updates Stacks with a List view option, a Folder view option, and an updated background for Grid view.
- Desktop: Addresses legibility issues with the menu bar with an option to turn off transparency in Desktop & Screen Saver preferences.
- Desktop: Adjusts menus to be slightly-less translucent overall.
- iSync: Adds support for Samsung D600E and D900i phones.
- RAW Image: Adds RAW image support for several cameras, as detailed in this article.
- Safari: Addresses issues with Safari reliably resolving certain domains.
- Time Machine: Adds a menu bar option for accessing Time Machine features (the menu extra can be enabled in Time Machine preferences).
- Time Machine: Improves backup reliability when computer name contains slash or non-ASCII characters.
- Time Machine: Addresses issues in which some external drives are not recognized by Time Machine.

Get your update via Software Update or via a Combo Installer here. One more thing after installing 10.5.2 there is one more update Software Updates will find the Leopard Graphics Update. Get it either via Software Updates or here.

Let's hope I can now connect to the Internet via my corporate MS ISA proxy server. Fingers crossed.

Sunday, 10 February 2008

I Heart San Francisco

Well it is that time of the year again that I need my American fix. So I am off for 3 weeks to San Francisco, Las Vegas and possibly Seattle to visit friends and family. Very tight schedule ahead but really looking forward to it. Sneaky visit to Microsoft and Apple. Ever since I told people I am going over, my phone hasn't stopped ringing. Between the countless calls from Bill Gates and Steve Jobs, I am finding it hard to decide who I am having dinner with every evening. *Just Kidding* - Although a sneaky visit to Redmond is most likely as a good friend is a VP there. Can't wait to raid the Employee Store with its great discounts again this year with him! Finally I am so looking forward to seeing my all time favourite Bette Midler in Las Vegas on her opening night in Caesar's Palace.

See you in a few weeks.

Monday, 4 February 2008

Windows Vista SP1 & Windows Server 2008 hit RTM

According to the Microsoft Windows Vista blog, today Microsoft released Windows Vista SP1 to manufacturing. Unfortunately it will not be until mid-March before it hits Windows Update and becomes available for download.

Today also Windows Server 2008 made it to manufacturing as well. As of a few hours ago Microsoft published the final versions for download in their MSDN Subscribers' Download area.

Hopefully it wont be too long before Vista runs faster on my iMac thanks to the service pack.

Friday, 1 February 2008

Apple iMac - 2 weeks on

Well it has now been two weeks since my amazing new Apple iMac arrived. So far it is a match made in heaven. Still no solution to the MS ISA Proxy server issue (although googling the problem reveals a possible fix in Leopard 10.5.2, that's about to be released).

I am almost completely happy with VMWare Fusion as well. My corporate workstation image with Windows XP and Visual Studio 2008 is actually running far more reliably and fast than it did on my HP workstation. The virtual machine is configured to use both cores of the Intel Core 2 Duo Extreme *Intel Inside Jingle* and 2GB of physical RAM. This configuration is pretty similar to my original HP workstation. The only annoying thing with Fusion 1.1 (not a problem with Parallels though) is the lack of support for multiple monitors. Basically if you are using multiple monitors you can not use both of them at the same time with the emulated machine. You can not drag Windows/Linux/OS2 windows from one monitor to the other in Unity mode. Hopefully a fix is soon on its way as Parallels do explicitly offer that option with their Coherence feature.

I suppose unlike a Tiger or a Leopard or a Panther I have managed so far to change my stripes and spots without problems!

Tuesday, 22 January 2008

New Year - New Computer - New Apple

Well, there is always a first, there is always a new resolution and of course there is always one thing we all try to change every New Year. Well my one change this year is to not use a PC anymore, or shall I use the old style phrase "IBM compatible". Yes for the first time ever I've decided to take the plunge and use an Apple Computer as my main work computer. To be precise a brand new 24" iMac with a 2.8GHz Core 2 Duo Extreme processor and 4 GB of RAM. I am also using a second 19" monitor as well as an Apple Wireless mouse & keyboard. If you exclude the countless problems that Safari and Mac OS X have in dealing with Microsoft ISA proxy servers (standard Enterprise setup really), the machine is HOT!!! I ABSOLUTELY LOVE IT. And just to make you even more jealous here is a picture of it!

iMac

I am currently running Mac OS X Leopard 10.5.1 and VMWare Fusion 1.1 with Windows Vista and Windows XP. I have Visual Studio 2005 & 2008 and SQL Server 2005 all running as one big happy family. I am also testing Parallels 3.0 to see if it performs even better than VMWare. Currently when in "Unite" mode with VMWare (makes Windows apps look as if they are running under Mac OS X) all my applications, and especially Visual Studio, run better than my previous PC.

I will keep you posted on how I am getting on with it!!!

Tuesday, 25 December 2007

Merry Christmas & Happy New Year

I want to wish all my readers a Merry Christmas and a happy new year full of tons of coding without bugs!

Merry Christmas everyone.

Joe

Sunday, 25 November 2007

www.csharpblog.net

Yes I got a new address for this blog - www.csharpblog.net. I think it is quite cool that I managed to get this domain name!

You can update your favourites or just keep going to the existing one!

Thanks again for reading.

Joe

Subversion & Visual Studio 2008 - Part 1

Most .NET developers would be comfortable working with Visual SourceSafe (VSS) when it comes to source control. VSS is good but there are several problems with it and with Team Foundation Server (TFS). First of all they are all very expensive, do not offer a very good disconnected model ("meaning that it is quite hard to work offline"). VSS also expects you to pretty much exclusively check out a file before working on it, making it harder for large teams to work together. Finally VSS and TFS's automated build system are very heavy and do not really offer immediate deployment to development servers. But again that is only my opinion.

On the other hand Subversion (initiated in 2000 by CollabNet) is a very light, open-source and free alternative to VSS that requires minimal maintenance once installed and configured. A lot of large and well known organisations such as Google use Subversion. Arguably Subversion and CruiseControl.NET (CC.NET), a continuous build system, are more difficult to install and configure than VSS is. There's more to it that just double-clicking an executable file like with VSS. Hopefully the series of articles on this subject will aim to provide you with a solid guide on how to configure them.

During this series, I will be using Virtual PC to demonstrate how to setup a Subversion server and a development machine. I will be setting up two different virtual machines, one running Windows Server 2008 RC0 Web Edition (this will host the Subversion server) and one running Windows Vista Home Premium with Visual Studio 2008 (this will be development workstation).

1. Setting up Apache Web Server on Subversion server machine

This guide assumes that you have already installed and configured successfully Windows Server 2008 (W2K8) RC0 Web Edition. Below is a screen shot of my server's about screen.

aboutserver

Please note that you can use Standard Edition for this as well. As a matter of fact you do not need any of the web features of W2K8 if you are only going to use this server as a Subversion repository. I decided to use the Web Edition because I will be using this server later on in this series as a web development server.

Subversion on its own gives you access remotely to the source repository only via the custom Subversion SVN protocol (default port 3690). But you can still access your repository via the HTTP/HTTPS protocols as well, with the help of a web server. Unfortunately using IIS with Subversion is extremely difficult and almost impossible. The server of choice, recommended by Subversion developers, is Apache a free web server that can run as well on a Windows platform as it does on Linux.

So once you have W2K8 installed and configured, you will need to first install Apache on your server. You can download Apache 2.0 here. I will be using version 2.0.61. There are later versions than this but are not as stable with Subversion. There are two options here you can either download a version without SSL support or with Open SSL support. I will be using the non SSL version. If though you will be providing access to your repository remotely over HTTPS then you should install the Open SSL version. I chose to download apache_2.0.61-win32-x86-no_ssl.msi.

Once you have downloaded the Apache setup executable you can go ahead and start the setup. It is straight forward really. Just fill in your server details as in the screenshot below and then choose Typical Install.

apacheinstall1

Once the installer completes you should see a new tray icon appear and if all has gone smoothly the icon should be a green play-like icon.

apacheicon

You can check your server's installation by navigating in your browser to http://localhost. If you had IIS installed prior to installing Apache there is bound to be a conflict as the default port for both is port 80. To avoid this please change the default port of IIS prior to installing Apache. You can afterwards change Apache to listen to a different port (i.e. 81).

In the next article I am going to show you how to setup Subversion to work with Apache.

Friday, 23 November 2007

Subversion can play well with .NET

I don't know about you, but I never really liked Visual Source Safe. Don't get me wrong I love Microsoft products, but somehow I do not think VSS cuts the mustard.

Subversion is a much more light-weight, open-source, disconnected source control system that works and plays really well with Visual Studio 2008 and .NET.

In the coming days I will try to give a comprehensive guide in setting up Subversion, automated builds and integrating it with Visual Studio 2008.

The articles are to be organised as follows:

  1. Subversion & Visual Studio 2008
  2. CruiseControl.NET - Automated Builds
  3. Visual Studio 2008 Subversion Integration
  4. Other CruiseControl.NET Integration Stuff (FxCop etc.)

I hope you find this interesting. I think it is really good stuff and an excellent development environment. But let me know what you think before I start writing!

Wednesday, 21 November 2007

Forgot that connection string?

There is an excellent web site for all of us who can not possibly memorise and remember all the different settings for connection strings. This web site includes pretty much every type of connection string you might need to generate from SQL Server 2005 to Oracle, Paradox even IBM DB2! Really cool, easy and free to use.

Bookmark it now!!!!

http://www.connectionstrings.com

Coding Tip 3 - To scroll or not to scroll

bulb Tip 3 - Automatically scroll position between postbacks

I don't know about you, but I get very upset when I do a postback and my scroll position is lost. Thankfully .NET 2.0 now offers a way to resolve this problem on all moderns browsers.

<% Page MaintainPostBackPosition=true %>

So scroll and postback away!

Tuesday, 20 November 2007

Visual Studio 2008 Review - Part 1

Visual Studio 2008 is finally here. It brings more enhancements and language features than any previous version of the Microsoft IDE. I will try to review some of these as time goes on. Today I will focus on some of my first and most obvious additions to features and the user interface of the IDE. Also I am including some screenshots to tempt all of you to download it and use it.

Find out more about purchasing Visual Studio 2008

First of all the traditional Microsoft splash screen - updated for this version:



The first thing you will notice once the IDE has finished loading is the new and slightly slicker menu and toolbars. The usual Recent Projects area and RSS news reader from MSDN are still there as well.


One of the greatest new features of Visual Studio 2008 is the ability to choose which version of the .NET Framework you wish to target your new project. Have a look at the highlighted drop down list in the New Project window. This new feature is very powerful. It will allow developers still working on legacy versions of the .NET Framework to still take advantage of the new IDE features.



One of my favourite new features is the new split view of web pages. The new view allows you to edit the source of page but still view the design of the page at the same time. This feature works well but the synchronisation of the content is not immediate. Most times for changes to appear in the design split view you need to save your code.





One of the final little helpful features I will show in this post, is the window switcher (ctrl + tab) inside the IDE. As you know using this combination allows to switch between documents in an MDI environment. Microsoft decided to add a bit of Vista magic to Visual Studio. Even though it is not as good as Flip 3D, using this feature now allows you to get a small preview of your window contents (like alt + tab in Vista)!



Hope this got your appetite going - more soon!

Monday, 19 November 2007

Visual Studio 2008 RTM Available on MSDN


Microsoft just released Visual Studio 2008 to manufacturing. The full Team Suite version is now available to download from MSDN Subscriber Downloads. Get yours from https://msdn.one.microsoft.com (You obviously need a valid MSDN account).

Coding Tip 2 - Fields Change

Tip 2 – Non-constant fields should NOT be visible

Static fields that are neither constants nor read-only are not thread-safe. Access to such a field must be carefully controlled and requires advanced programming techniques for synchronizing access to the class object. Because these are difficult skills to learn and master, and testing such an object poses its own challenges, static fields are best used to store data that does not change. This rule applies to libraries; applications should not expose any fields.
Example:

WRONG:
public static DateTime publicField = DateTime.Now;
//This is wrong because the field is public and not a literal

CORRECT:
public static readonly DateTime literalField = DateTime.Now;
//Correct because it is a literal read-only field
static DateTime privateField = DateTime.Now;
//Correct because it is a private field.

Thursday, 15 November 2007

Coding Tip 1 - Evil Strings

Starting today I will be posting a weekly coding tip that will hopefully help us all avoid common mistakes and errors.

Tip 1 – Evil Strings (Avoid Unnecessary String Creation)

Avoid creating strings unnecessarily. When converting strings to upper or lowercase, cache the result where necessary rather than duplicating a previous string creation. Prefer string.Compare over converting strings to upper or lowercase when performing case-insensitive comparisons. Do not create strings that are not subsequently assigned to variables. Unnecessary string creation degrades performance.

Example:

WRONG: if (string1.ToLower() == string2.ToLower()) //case insensitive string comparison

CORRECT: if (string.Compare(string1, string2, true) == 0) //case insensitive string comparison

To blog or not to blog

My name is Joseph Megkousoglou - I know it is a bit of a mouthful.

I work for Knight Frank in London. Knight Frank is the largest privately owned property services firm in the world, you can read more about them on Wikipedia. My title is Associate, Senior Lead Developer and I am responsible for the web site software engineering team at the firm. We have a number of web sites that help the firm advertise all its properties and services. You can have a look at our UK one here.

Prior to working at Knight Frank I was a Senior Software Engineer and Technical Manager for AKQA, a leading digital agency in London. During my time at AKQA, I worked mainly on the Sainsburys.co.uk and Dominos.co.uk web sites. I was also involved in other work with Microsoft, Xbox and Gucci.

I feel that, after working professionally as a Software Engineer for over 8 years and with almost 20 years of software development experience, I should help others via my blog. I will try to post technical articles relating to Microsoft programming technologies (namely C# and .NET).

I currently hold a BSc in Computer Science (Brunel University) and an MSc in User Interface Design (London Metropolitan University).

I hope you will find this blog useful and that you will visit regularly.

To blog then it is.

Joe