Showing posts with label Philosophy. Show all posts
Showing posts with label Philosophy. Show all posts

04 May, 2007

Delphi 2007 - how to install packages and components

Hello. As I see in my statistics one of my old posts, Creating a new component package in Delphi 2005 (Win32), is very popular. Also I have notice that with appearing of Delphi 2007 for Win32 Steve Trefethen wrote a very nice tutorial which shows How to Install Components in the Delphi IDE and Nick Hodges made a great streemcast on the same topic. Now this theme is fully uncovered!

Come again!

27 April, 2007

Subversion, Continuous Integration

Hello all! As I was saying in one of my previous posts, I am going to write some articles about Continuous Integration, Subversion (SVN) and other related things. But looking on some circumstance I decided not to write about those things (well, however I'll write some short notes). The reasons are pretty simple - few guys already started to write on this topics (here and here). They are much stronger in English than me and more advanced in this field. That's why I decided to make way for them. And therewith I don't like to clone blog posts.

PS: don't forget to read a very good book about Subversion. There is also a Russian version of this book.

Come again!

-- 4/05/2007 - New useful link
Delphi and SubVersion

19 April, 2007

Interesting sample from the book

Hello. Yesterday I was reading one nice book about ASP.NET - ASP.NET: Tips, Tutorials and Code. In one chapter I have found an interesting code sample which shows how to work with Hashtable. Here is a piece of it:

Dim htSlaries As New Hashtable()

htSalaries.Add("Bob", 40000)
htSalaries.Add("John", 65000)
htSalaries.Add("Dilbert", 25000)
htSalaries.Add("Scott", 85000)
htSalaries.Add("BillG", 90000000)
' Then show this list in the label
htSalaries.Remove("BillG")
 

Now guess who is BillG?! :) Firstly he gets his salary on paper and then employers change their mind :) Probably they decided that he has got enough already.

17 April, 2007

First impression about Delphi 2007

Hello all! I finally have installed Delphi 2007 about an hour ago and now make some testdrive. Here is my first impressions:

Positive:

  • New installer became nicer and faster;
  • BDS 2007 starts faster then BDS 2006 (not pretty much but still faster);
  • The second start of BDS 2007 is definitely much faster than BDS 2006;
  • Help looks better too (hope the content became better too);
  • Finally we have Build Events!;

Negative:

  • New installer didn't want to run properly from my D: partition (Windows installed on C:);
  • Text size button in the help doesn't work (actually it works but the only thing that changes is bullets size; the text size remains the same);

More will be later!

Conclusion:

First impression is pleasant so far.

13 April, 2007

The Returning

Hello-hello! Sorry for the long period of silence. I have been out of the city and had not much opportunities to be online. Also I had to finish few projects. So in one word - busy :)

Well during that nice period I have visited the capital (Kyiv). I have spent such a great time there even in spite of the fact that I have been in the business trip :). I spent in Kyiv 3 wonderful weeks and have passed very interesting courses - Visual Studio .NET. So from now I am starting to dig dipper into the world of .NET and planing to write on this blog not only about Delphi but also about C# and .NET.

At the courses I have started to learn C#. Nice programming language but I am interesting in it only as a language for writing ASP.NET applications. All the rest I'll write exceptionally on Delphi (Delphi for .NET). Even ASP.NET applications I write in Delphi (code behind) but sometimes it is necessary to write some code in the aspx file and exactly for such situations I need to know CSharp (or at least VB.NET).

Currently I am playing with few very interesting technologies: CVS, Subversion (well now I know precisely that Subversion is better than CVS and I'll use exactly Subversion; Continuous Integration), XML Documentation and OpenTools API. More about this later.

And probably the most important thing - I am going to move my blog to the new place! Hurray! New online home for my blog will be at www.iskomorokh.com. For now this place is empty but soon everything will change. The reasons of this move are pretty obvious:

  • Desire to have more features then Blogger can give and more styles (own implementation);
  • total control;
  • great chance to have practice;
  • many other :)

See you.

15 January, 2007

Color namespaces and their implementation in Delphi or any other programming language

There are few color namespaces (color models). Some of them are better in one field but worse in other. Sometimes it happens that you need to convert some color from one color model to another. This is exact situation which has happened to me. So I decided to find a little bit more information about color models which I need to work with. I went to Wikipedia and Google and found a lot of useful information and few code snippets. That made me happy … but not for long L

Well, here is the situation: there is one color which I need to convert from RGB color model to HSL (HLS) and back but for all that I need all the work to be done with whole numbers. It seems that the task is not complicated. But I have been put in horror by the fact that all the versions of the source code I have found in Internet use different approaches to present color formats. Some represent RGB values as 0..255 but the other as 0..1; HLS values as H – 0..360, S и L – 0..1 or H – 0..239, S и L – 0..240 (e.g. Microsoft). I have seen few another modifications. Weird – isn’t it?

But this is yet far not the end of the story. Later I have been put into more horrible horror. Having tested some variants of a code I have discovered that returned results from the different versions of code almost completely mismatch, though the input was the same for all of them. Suddenly one interesting question came to my mind. Is it possible that Borland (or I should better say CodeGear) or Microsoft do not give us some solution for this, it would seem basic task? And I have appeared right! Both giants give us necessary routines. CodeGear gives us ColorRGBToHLS and ColorHLSToRGB respectively which can be found in GraphUtil unit. You can get access to the Microsoft functions ColorHLSToRGB and ColorRGBToHLS with the help of ShlwAPi unit. Hurrah! – I exclaimed, but again it was too early. Once again a great surprise expected me.

This time the thing was that at the first glance everything seems to work, and even looks like the truth, but it turned out, that as a result – this is just at first glance. The fact is that few colors in RGB model has been found which can be converted into HLS model without any problem, but it is impossible to get the same RGB color back from the HLS model. You can easily make sure in it. Simply run MS paint and enter these RGB values R=196, G=136, B=248 in the Select Color dialog. Remember HLS values. Now change the color to some other. And now enter HLS values which you remembered. Then compare resulted RGB values with RGB values you have been entering at the beginning. See?!

I have found a bug in the ColorRGBToHLS procedure which is in the GraphUtil and reported it in QC (QC#37436: GraphUtil.ColorRGBToHLS). It was rounding issue. I thought that this will save the situation but I was wrong. The ColorHLSToRGB routine was buggy too (QC#37572: conversion issue between ColorRGBToHLS and back ColorRGBToHLS (GraphUtil)) but this time the problem hides in formulas.

Conclusion:

  • I still don't understand - is there any standard in this field? If yes, why nobody follows them?
  • Don't try to remove those bugs I described above. The problem is not in code - the problem is in the formulas. Yes, yes ... I am saying that HLS color model is buggy!
  • No matter which code version you will use (CodeGear, Microsoft, anybody else) - they all works wrong!

03 October, 2006

Video lessons (tutorials)

Hello all!

If you know English and love Delphi then I am almost sure that you know Nick Hodges (at least his blog). You probably wondering why I am talking about him? The answer is pretty obvious. Nick Hodges is great man which is strongly related to Delphi. Recently this incredibly active man has created 30 videos in 30 days about Delphi. His action inspired Camtasia team to make 30 videos in 30 days about their product - Camtasia Studio. I think that Nick Hodges action should inspire all the professionals in the Delphi community to do the same.

IMHO - video tutorials/lessons is a right direction! Microsoft has chosen this direction and walks on it confidently. Visit www.ASP.net and you will make sure in it. You will find there a lot of fresh video material for beginners and video answer on frequently asked question "How do I ... ?".

I like to watch video from BDS 2006 presentation and found them very useful and informative. I think Borland should spend some time and efforts to make more Delphi videos. It is good to read books, articles ... but it is much better to read some book and then to watch related video made by Delphi professionals.

PS: some video material can be found at Borland Developer Network

Thank you!

29 September, 2006

Straggle between blogging software giants

Hello all.
Today I want to get back to my previous post about blogging software and blogging services. I have promised that soon I'll announce who has won (IMHO) in this battle for users. As you remember (if you don't you can recollect here) I was talking about 3 competitors: BlogJet, Windows Live Writer and www.writely.com (Google's service). I don't know how I forgot about Microsoft Word 2007 :). Microsoft has added an ability to blog directly from Word. Honestly saying I like it pretty much.
Well, who is the winner? I guess it is Windows Live Writer!!! You will ask why. Because it is FREE, easy to use and convenient. It is a standalone application thus we don't need to go to the web and be tied to the Internet connection speed. In spite of the speed of www.writely.com and my Internet connection I still didn't used to use it as a text processor. Who knows? Maybe sooner or later things will change but for now my decision is Windows Live writer.
But! But one thing has disappointed me. Recently Microsoft released an updated version of Windows Live Writer and said that support of Blogger Beta has been added. That made me excited ... but not for long :(. I have downloaded an updated version, installed it and discovered that it is not completely true. First, I had to get my BlogId number to be able to work with my blog. For me it was not a hard task.

For example JCHeng in his blog post "Blogger Beta Workaround" says that you should navigate in browser to your blog, view source and find blogID string.

That's easy. But you can also do it in other way. Just navigate to your blog and move your cursor to "New Post" link and in the status bar you will see the link url which has your blogID at the end. So you simply copy that link (right click an url and select 'copy' command from the context menu) and then insert it wherever you need and remove everything unnecessary. That's all! Second, I had to change the beginning of the string (url) from "http://www.blogger.com" to "http://beta.blogger.com". Ok, a piece of cake. But all these movement didn't help :(. I continued reciving errors.
Fortunately one of the visitors of JCHeng's blog left a very useful comment. He gave a link to another workaround which fixed an issue. The problem was in the regional settings. If you want Windows Live Writer to work correctly you should change the regional settings to English (United States). Thanks SiD. This method works but it is not acceptable for me. Therefore all I have to do is wait when another new version of Windows Live Writer will be released. Hope it won't take long!

14 September, 2006

Delphi extensions (experts)

Hello world! Probably favorite phrase of most programmers :) Today I want to tell you about a very useful extension for Delphi.

Personally I don't like to use extensions at all. The main reason is "functional overflow". Seems to me that it is hard to find in Internet an experts package containing only necessary functionality which you will use regularly. I don't want to say that all (or almost all) the experts are useless! No! There are a lot of extremely useful experts but they are often not free.

Want proves? Well, no problems!

Visual Forms - is a thumbnail viewer for the forms in your project. Greatly useful and especially for large projects which contain large amount of forms but :( not free. It costs 35 EUROS. Expensive as for me. This expert has only required features and there are no such which will never be used.

GExperts - a very huge Delphi experts package, free but contain some useless features. I am wondering how much time someone should spend before he will be able to use all of them efficiently? I think that a lot. Once again I don't want to say that this package is bad I am just trying to say that user should have a way to install only those experts which he consider useful.

Well, now let's get back to the experts package which I wished to describe to you. It is DDevExtensions Delphi/BCB/BDS IDE plugin. This plugin is free and has only useful features (IMHO). Go and try it! I should say that when I saw it for the first time on the home page I thought that this expert is absolutely useless because the new tool palette layout in BDS is very convenient. But I was wrong. I understood it after I tried DDevExtensions.

have a couple idea concerning creation of experts for Delphi. Hope you will see the realization very soon. Keep in touch!

29 August, 2006

Blogging software

Hello all!
Before this day I was using BlogJet (BTW, can't wait to see new version 2.0) to post to my blog but recently Microsoft released its Windows Live Writer and I began to doubt which software to use. My doubts became greater after I saw this blog post. In my opinion both programs are great. Each has its own benefits but .. but Windows Live Writer (beta yet) is FREE and I should say that this is a very telling argument. BTW, my previous post was made from Windows Live Writer. I should say that's its functionality is great.
But its not the end! Today Google finally renew the work of its Writely service. Using Writely you can post to your favorite blog too (its not the only and not the main feature of this great service) and it is absolutely FREE (at least for now). So now I am fully confused! But its not for long! Soon, after some research and test, I'll find out which way/software is better to use.

Almost forgot to tell that www.blogger.com is going to update its way of editing posts. Now AJAX technology will be used and I am sure that it would be much more convenient to edit the blog then it is now.

Stay tuned and soon you will know my conclusion about who is the winner.

PS: this post has been written with the help of www.writely.com

29 June, 2006

ASP.NET

After a long period of silence the first thing that I want to write about is ASP.NET. The reason why I am speaking about it is my diploma theme. It was something like “ASP.NET in Delphi”. In this post I am not going to tell you about how ASP.NET technology is tough, simple and efficient. In this post I want to highlight the first thing that disappointed me in Delphi (actually in an IDE but not in the language).

Well I love Delphi and I like new DBS 2006 IDE very much. But when I started to study ASP.NET and tried to write some plain .aspx files in BDS 2006 I was very, very much disappointed. The visual HTML editor in this IDE is terrible, awful, horrible … Solution was found very fast. I have simply opened an .aspx file in the DreamWeaver and made everything as I wanted. But there are few annoying things on this stage too. Also Code Editor sometimes behaves really strange when I am editing an .aspx file.

The other thing that made me feel sad is that when I was checking the results of my work in Internet Explorer everything appeared wonderful but when I was using Firefox to see the results WebControls where looking not exactly as I wanted them to look. E.g. when I was changing the width of some control to 100 pixels it was shown correctly in IE but in Firefox it was shown with default width. Fortunately the decision of this problem was found. Thanks to Dr.Bob’s post. He explained the reason of the problem and how to solve this problem.

Conclusion:

  • ASP.NET – Rulezzz;
  • Borland (DevCo) should greatly improve it’s solution for ASP.NET;

Thank you for your attention and sorry for bad English.