Showing posts with label Software. Show all posts
Showing posts with label Software. Show all posts

Sep 9, 2010

It's time to vote again!


It is again time to vote for your best tools in the software development.
Don't waste time, showing some love to one vendor or another will help that vendor push harder in the right direction.

So click on the image and show some love to your favorite vendor.

Dec 3, 2009

Introduction to programming with C#

As Vesko Kolev stated in his blog - a new bulgarian book about C# programming is in progress.
I decided to take part because it seems very interesting. I haven't much experience in publishing so it will be very beneficial for me to work on this.
Actually I was author in a software magazine few years ago (as far as I remember I was about 17 years old so it must have been about 6 years ago). It should help me as I took the first chapter - introduction to programming where I will show the readers how to install Visual Studio 2010, how to start their first project and how to write their first program, some diagrams of the .NET framework 4.0 will also be included in this chapter.

We decided not to include any advanced features in this book, just core programming language, no extensions, no lambda expressions, no var, no automatic properties, no nothing.
This is because this book targets potential software developers and not software developers. It should show the developer how to code, how to think etc. We decided that if a man / lady without any software experience may think that auto property won't take memory after it doesn't involve variables (at least visualy :).
That is why we do only core things.

Wish us luck. We would really love to expand bulgarian software development community with few more people :). After all if even one guy / gal of all the people that will potentiall read the book becomes an expert - our mission would be completed (we are dreaming for more impact ofcourse :).

As Svetlin Nakov and Vesko Kolev said - telerik is sponsor for this book so it should be published easilly than their prеvious book - "Introduction to programming with Java" and would probably joy some more marketing efforts.

That was it about the book.
Now about my motivation to join the project no matter my personal engagements and all the work I have at telerik and at the university.
The first reason is that I am a self - taught (almost) developer.
I never had degree that will help me find my work, join some society of developers that will help me when I hit a difficult problem.
There wasn't even internet in my hometown. A friend of mine gave me a book on programming with Delphi (that Sams 21 days brick :).
The Delphi help also helped me and I also downloaded html files to read later when I was at school.

Then I applied for a job in the city where I was studying (Veliko Tyrnovo).
It was all my collegues that helped me improve my skills.
I don't feel as a worldwide recognised expert or something but getting to the intermediate level from nowhere is achievement to me.
So reason #1 to join this book is to give something back.

Another reason is that I would like to see how a book is written, are there different proccesses than in the software development. It has something to do with the blog posts I guess :)
So reason #2 is to steal some knowledge :)

And some kind of nostalgy would be the last reason to join :).As I said, I was an editor in a software magazine, it was very nice thing to do. The article, then the readers asking for some more information. I miss this a bit :)
Reason #3 - to feel the old days when I was an editor :)

The specified service has been marked for deletion error message when removing a service

If you receive this message while trying to delete a windows service - check if the Services.msc application is open.

You will need to restart in order to delete the service, but you will know to first close the Services.msc application the next time PRIOR uninstalling the service (using installutil /u service_exe_name).

Hope this helps someone outthere...

Edit : I found another scenario when this can happen and it seems to be more .NET specific and common to software developers - if your service creates some worker threads, Windows will attempt to kill the main thread, the main thread will attempt to kill the main thread but the worker threads if not marked as BackgroundThreads via the IsBackgroundThread property will remain. The GC will wait for them to reach a safe point so they can be terminated and the service will most probably be only marked for deletion, requiring you to restart windows.

Please note - if you are using the ThreadPool class you will probably not hit this problem as the ThreadPool internal threads are automatically marked as background threads.

Edit 2: Another case when you will receive The specified service has been marked for deletion error message is when you try to uninstall service which wasn't stopped first or it was marked as unstopable.
This is done if you have this.CanStop = false in your service code.
Windows knows this service shouldn't be stopped and it will only mark it for deletion but will not delete it right away.
Be careful with CanStop property.

Nov 24, 2009

Limiting your Internet connection speed with Fiddler.

In some cases you may need to limit your connection for testing purposes.
This is / should be extremely easy using Fiddler.
Here is a simple walkthrough on how to do this:

1. Go to Fiddler site and download Fiddler latest version (http://www.fiddler2.com/fiddler2/)
2. Install it and start it.
3. Click on Rules -> Customize Rules:

4. An instance of notepad should open. Find the line that says something like "oSession["request-trickle-delay"]":

This setting tells Fiddler how much milliseconds should halt the request. (not quite sure how a request halt will help you though)
5. Find the line that says "oSession["response-trickle-delay"]" and change it:


Save the file.
You should have a connection limitation.
Now, when you want your connections slowed down, you will need to check the following option:

6. Rules -> Performance -> Simulate Modem Speeds (should be checked):


Please do not forget to switch off fiddler when you don't need it as you may find yourself wondering why is your connection significantly slower than usual ;).
Hope it helps someone out there.

Dec 14, 2008

Nice little tool to help me with twitter.

I created a small twitter software what it does is to check each hour if I am listening to Winamp, get the song if possible and write it in twitter for me and the people who are eventually interested in what I am listening.
Here is the deal:



You can download it from here:
TWamp - Nice little twitter software

You can follow me on twitter from the following url:
My twitter profile

Please note: TWamp isn't very user friendly. You need to get along with it in order to use it ;).

Oct 19, 2008

Touchless SDK : Very interesting and promising technology each of you guys should play with :)

I came on this yesterday, I was bored because all the projects I am working on are to some degree "standard". No dev chalenge. I wanted to create, to do something interesting.
So I started to browse CodePlex and found this SDK.

Overview :
Touchless SDK is a software development kit to help developers create applications which can be controlled without the standard peripheral devices (mouse, keyboard and so on). It enable you to create a applications which are controlled without the need to touch anything at all, just gestures in the air.
How is this done?
Well, I think there was a lot of research on this topic. We already have programs to detect motion from your video camera, why not try to extract information from those motions? This is
exactly what Touchless does. It captures an info from your camera and if it finds something that is known to be marker - it raises events, to which you can subscribe and do something.
The better news is that Touchless is Open Source project and can be obtained from CodePlex for free.
You can also whach a video on Touchless:





I downloaded this SDK and in less than a minute I made a small program which let's you move your cursor with fingers (I still can't find a good enough way to left and right click ;).
I hope I will have enough time this week to post this simple project so you can get deeper with Touchless as it seems promising technology to me.

Limitations:
Well every good thing has drawbacks. Don't get it wrong. Touchless isn't the standard in this area. It has problems (however I think after it is open source a lot of people can work on it and improve it).
So what are the limitations?
First of all - Touchless is very very very sensitive to light and to colors. It is because the way it works. In order to work, you need to specify a "marker". Marker is the thing the program looks for. So if you have a red tape on your finger and define it as marker, you will be able to command your computer with it. But if there is a object with the same color on the screen and this object is about the same size, it may be found as another marker.

The second problem (at least for the sample project I did) is that most web cameras are not sensitive enough. They are (most of them offcourse) with 640 x 480 pixels resolution. If you are about to move your cursor and your screen resolutions is 1280 x 1024 you will be only able to move the cursor 640 pixels horizontally and 480 pixels vertically (this can be software corrected by moving the cursor 3 or 4 pixels on each pixel that comes from the camera but for sensitive operations (resizing, drawing) it will not be good enough.


However I think the things above will be resolved and we will have another great way to use our computers for almost no extra charge.
I do really wish those guys luck and I will definatelly watch how this project goes and even if I can I will help a bit.
I really fell in love with this toy!

Aug 14, 2008

Skype4COMLib and Blogger - get your posts as a mood text in skype (or do whatever you want with skype ;).

My dear friend Bobby is going on vacation today at 6 p.m. Since I’m going to miss her while she’s taking her vacation on Black Sea I decided to play a bit with Skype4COM and write a small program for her.


This is where everything started ;) (thanks, Bobby for the inspiration ;).
She had her skype mood text set to how many days are until her vacation takes place. I wanted to help her so I wrote a simple tool to countdown until 6 p.m. and change her Skype mood accordingly.

Well I am not going to explain you how I did this. I got better idea later. I decided to make a mood changer for me. The mood changer will take my blogger posts and rotate them as skype mood text.

Skype Mood Text Changer, made with Skype4COM Lib and .NET C#

First of all, where should I get my posts from? Well, there are two ways I can think of. The first one is to use the Blogger API (login with the user, get all user blogs, get all user posts, etc.).
The second one is to use the RSS feed that blogger automatically creates for each blog.
Since this is very small tool I think the first approach is too “heavy” and “complex”. After all we aren’t going to post to the blog or anything that will require us to login in Blogger. So I took the RSS approach.

Let’s see how you can create a small program to do this for you:
1. Start new windows application.
2. Right click your References folder in the solution explorer and choose Add Reference …
3. In the dialog box click on the “COM” tab and find Skype4COMLib.
4. Click OK.

Now you have that skype thing referenced in your project. Add it to your using clause:

using SKYPE4COMLib;

After we are here, and we know we are going to use RSS, we will need Xml namespace as well. Add it too:

using System.Xml;

Okay. In my approach, I wanted to display random post on every 10 seconds. This means I will need to store a post title -> post link pair somewhere. I did this in a generic List of string[] arrays. I am not quite sure how optimized is this but this is only sample and it works fine for me. If you can think of something more optimized - please do not hesitate to write a comment ;). For now, however, add the System.Collections namespace to your using clause:

using System.Collections;

Okay, we have everything we will need to create our small tool. Now add a timer on your form. It’s timer1 in my sample. Set it's interval to 10000 (10 seconds).

Add the following global variables to your project:

List<string[]> posts = new List<string[]>();
private SKYPE4COMLib.Skype skype;

Here is how your Form_Load event should look like:

    
private void Form1_Load(object sender, EventArgs e)
     {
        skype =
new SkypeClass();
        
this.WindowState = FormWindowState.Minimized;
        GetBlogs();
        timer1.Enabled =
true;
     }

What I want you to note in the Page_Load is that I am assigning the skype variable. This way it will remain linked to your skype until the program is runned.

I used routine GetBlogs() in this project, here is it:

private void GetBlogs()
{
XmlDocument docRSS = new XmlDocument();
docRSS.Load(
"http://donchevp.blogspot.com/feeds/posts/default?alt=rss");
    
foreach (XmlNode nodeItem in docRSS.SelectNodes("/rss/channel/item"))
    {
    
string title = nodeItem.SelectSingleNode("title").InnerText;
        
string href = nodeItem.SelectSingleNode("link").InnerText;
posts.Add(
new string[] { href, title });
    }

}


NOTE: replace the url in the docRSS.Load() method, otherwise you will promote my blog ;).

This routine simply takes all the posts and stores them in the List of string arrays as link, title pairs.
Now we need to display the posts as title “-“ link. This will happen in the timer1_Tick event:

private void timer1_Tick(object sender, EventArgs e)
{
int iPostIndex = int.MinValue;
    
if (posts.Count > 0)
    {
    
Random rnd = new Random();
        iPostIndex = rnd.Next(0, posts.Count);
        skype.CurrentUserProfile.MoodText = posts[iPostIndex][1] +
" - " + posts[iPostIndex][0];
}
}

Everything seems to work fine now. Run your program. Skype should ask you if you are sure you want to give access to this program to use skype. Agree with that. You should now see your posts rotating each 10 seconds.

Here is the complete code (I will also upload the project on Chameleon Bulgaria site, as codes in Blogger doesn’t appear very smoothly):

Form1.cs:

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using SKYPE4COMLib;
using System.Xml;
using System.Collections;

namespace dayOffCounter
{
  
public partial class Form1 : Form
   {
    
List<string[]> posts = new List<string[]>();
    
private SKYPE4COMLib.Skype skype;
    
public Form1()
     {
        InitializeComponent();
     }

    
private void Form1_Load(object sender, EventArgs e)
     {
        skype =
new SkypeClass();
        
this.WindowState = FormWindowState.Minimized;
        GetBlogs();
        timer1.Enabled =
true;
     }

    
private void GetBlogs()
     {
        
XmlDocument docRSS = new XmlDocument();
        docRSS.Load(
"http://donchevp.blogspot.com/feeds/posts/default?alt=rss");
        
foreach (XmlNode nodeItem in docRSS.SelectNodes("/rss/channel/item"))
        {
          
string title = nodeItem.SelectSingleNode("title").InnerText;
          
string href = nodeItem.SelectSingleNode("link").InnerText;

           posts.Add(
new string[] { href, title });
        }
     }

    
private void timer1_Tick(object sender, EventArgs e)
     {
        
int iPostIndex = int.MinValue;
        
if (posts.Count > 0)
        {
          
Random rnd = new Random();
           iPostIndex = rnd.Next(0, posts.Count);
           skype.CurrentUserProfile.MoodText = posts[iPostIndex][1] +
" - " + posts[iPostIndex][0];
        }
     }
   }
}

Things to consider: Unfortunately skype has some constraints we can not avoid. First of all - the text seems to be too short to hold some of my posts, which results in links not being rendered correctly and leading to a wrong page (or even worse - to a page that doesn’t exist). I really wish to be able to set click here links as a mood text but it is not possible for now (at least I couldn’t find such functionality).

Happy codding!

Jul 17, 2008

Code Policies - the first step to get rid of boring code policy violations is made.

As I and Vesko (only!) discussed - it is great to follow code policies, and they are saving time. A lot of time. I agree.
I really like to have so strict policies at work so I can find for example the ObjectDataSource of some dropdown, without knowing its name. For example i will type "objDsSomething" or "odsSomething" or "ODSSomething". It really saves time.

I don't really agree with Vesko's opinion that only in the begining you are violating the code policies. I think even developers who worked on the same project for year will violate its policies (not so often offcourse).

The problem is that we are all human beings and we all make mistakes. I decided to do something to help myself get rid of at least the boring code policies - such
as naming conventions.
Here is what I have so far (I started this thing few days ago and I am working on it for about an hour daily after I was all day at work so it may not look very promising but I think it has potential):



When you click on "Validate Current Document" the document which is currently open will be validated against predefined naming conventions. If you violated something you will have this output:



I have few more problems to solve and will be really glad if someone can point me the direction:

1. I need to find a way to add this menu to the context menu for the document and also I would like to add hot key so you can for example validate the document by pression "CTRL + V + D" or something else (this is low priority).
2. I would also like to be able to check the code itself for inadequate assignments, method calls and so on. The CodeModel approach I think, will not allow me to do so.
3. I would like to change those standard icons with custom ;) (low priority).

Currently this thing can fly only for naming conventions.

Mar 31, 2008

Never tought I will need Award Images module on my site ...

I recently built a PAD generator script on my site in order to easilly promote my software, but I never tought my software will be awarded. The surprise came from Sedo Auctions Watcher, it was awarded 5 stars by redsofts.com (you can find my program listed here). Becouse I built this little tool for few hours and it wasn't doing anything than informing you on ending domain auctions I was pretty surprised. What's even more interesting is that Sedo Auctions Watcher is adware program. It displays banners, but it does this by following some guidelines. It will not change your homepage or install toolbars.

Probably because I was trying to play fear I was awarded. What's good is that this award changed the way I think. After 4-5 hours of work
were awarded, what will happen if I spend some more time?

You'll see soon ;)

You can find the rating guidelines here:

http://www.redsofts.com/awards.html

Mar 24, 2008

Finally its here ...

Skype passport 1.0 is out, you can find the simple html page on Chameleon Bulgaria



Online demo: Here



Download page: Here
>

Mar 20, 2008

World's first Skype Passport is almost out ;)

This is a little javascript which will allow your users to easilly register on your site, by filling their contacts automatically from skype (offcourse only few fields are populated, but most registrations require only few fields after all).
Here is a screenshot of this neat little javascript placed on a page:



Note : This works only if your users are using IE (as this thing depends on ActiveX).

The tool will be available for free download at my site : ChameleonBulgaria so visit it regularly ;)

When I publish it, I will also publish a news on the frontend so you can know.
Just a few more hours ;)
.

Mar 19, 2008

Very simple tool to watch ending Sedo Auctions

Few months ago I was interested in the domain trading business. It was interesting to me as it generated 14.2 million dollars back in 2006. It is based on speculla I think. Something like FOREX but not quite.

I registered two domains and placed them on Sedo Auctions.

I was also interested on how other domains are going so I decided to write a small tool. It will stay in your tray and will show you the auctions which are about to end the next 24 hours. The following information is gathered about each auction:

- Domain for sale
- Price
- Currency
- Time left before the auction is closed
- Google PR for each domain

The program is available for download from Chameleon Bulgaria

I decided to put a banner on this program so my domains
for sale are visible to the users (well, after all I spent some time on this program and I would really like ot have some incomes after all ;).

Here is a direct link to the program page on Chameleon Bulgaria may be found
here

Feb 9, 2008

sealed class usage

We recently started an internal academy in our company to improve our software development skills. The first meeting was about OOP fundamentals, it was really interesting (thanks Vesko for your efforts!). This question appeared as interesting for me - when should we use the sealed class.

Some collegues guessed it should be used in the most concrete classes, as they will not be used as a base classses, but I don't think so. After all - why should you say : "Hey, don't use this thing as a base class" explicitly after you know it will not be used anyway.

I did soem research on the net about the sealed class usage, it appeared it's common use is for classes with static methods. The example I've found was about Brush and Pen .NET
objects. They are sealed as they have only static fields like : .Blue and so on.

So when you are doing software you may keep in mind that you have that sealed thing to help you limit the inheritance of your classes.

Jan 28, 2008

Job Done!

I think I made it finally. The osCommerce 2 vShop import was made this afternoon. Just waiting QA test now.
>

Jan 22, 2008

.NET C# to parse MySQL queries? Impossible? Pavel can make it ;) (with some ifs and buts offcourse ;)

The most interesting task in my career came the end of the last week. As a Vizibility employee I was asked if I can port osCommerce live site to out vShop solution (http://www.vizibility.co.uk/tmenu/vshop.asp) The interesting thing is that I had no access to osCommerce nor did I ever worked with it. What's even more chalenging - osCommerce database was given to me as SQL queries, something like :

drop table if exists table ;
create table table (
-- Some things here ...
);

insert into table () values ( );

As a normal software developer so there were 3 big chalanges:

1. How to parse this SQL thing (it is MySQL) ?
2. How to figure out
the osCommerce Logic ?
3. How to port all those things as a script so it can be applied to our live servers by the support team?


It's really chalanging don't you think? First I thought it will be a good step to install fresh copy of osCommerce, import the products and try to port them as CSV or something. But then I understood it will take too much time, so I decided to parse the SQL queries on my own and store them in a predefined objects like tables, rows and so on and so on. Then I could easilly transfer them as a text files in the format we needed.

And I almost made it - the parsing methods are done (I was able to parse this thing in a day but some bugs still appear).

Seems the more I work on our shopping solution the more easier I can understand other's shopping solutions.

Great task in a great company!

Jan 13, 2008

Another 5 minutes with C# to post to Google Blogs (Blogger.com) using Google Blogs SDK (2)

I revised the tool a bit, here is how it looks now:





Also I made some refactoring to the code and it looks better now (no more richTextBox1 names ;).
I plan to release this tool in order to help developers blog code to their blogger accounts easier. The next secret I am going to reveal is that I started a toolkit to help you create blog related programs with C# / .NET / Google Blogs API.

For now I am planning to release the program for free, as a Lite version and I plan to spend some more time to create a better looking version with SEO features in it and distribute it for a small fee (something like 10 EU).
The Toolkit will released for free now.

Well that's it. I am looking forward when I will have some more time to develop those
controls and programs to help the Blogger community grow ;)

Jul 8, 2007

New company - new luck :)

Yep, only in few hours I will be on my new desk in my new company :). I am very excitet about this. The new company is Vizibility and it is developing web modules. At first glance it seemed very very interesting with all the young people there. They were very hospitable on the interview and managed to earn my complete confidence. It seems that I did that too. After I met their requirements they met mine too.

So it is a big day today :). Wish me luck
!