Archive for the 'Work' Category

Nokia N95 SIP “unable to connect to the connection server”

No translations available for this entry

As many other happy owners of one of latest (well, it was released more than year ago, but it is still quite modern) gadget from Nokia, I could only use a fraction of its features, which it has in abundance. There are some rarely used (has anyone ever used “barcode scanner”? ), some just not frequent, but some of them are just not easy to use. And some have bugs despite it has been a long time since phone’s firmware was first released.

Device has WI-FI. And SIP VoIP client. And I was desperate to find a way to make cheap, or, better, free international calls. Finding VoIP provided isn’t hard - there are plenty of them around, and I am currently with JustVoIP (free landline calls to some countries, particularly to one I am interested in, guess which one), but getting communicator working with it was something similar to playing DOOM 2 on “Nightmare”. Yes, every time, again and again, I was getting wise error message “Unable to connect to the connection server”. No explanation why and what to do about it.

You, probably, already came across small truckload of Nokia SIP setup guide, but still could not get that working, as I did. Well, this is not because these guides suck, they just miss a point.

Before configuring SIP, make sure you switch Wireless power saving off. On my Nokia it was of by default, which, I guess leads session initiation to break when phone thinks nobody uses WiFi.

To switch power saving off, go to: Settings->Connection->Wireless Lan->Option->Advanced settings. Power saving option will be at the bottom, switch it off.

Now you can return to your provider’s connection guide and repeat attempt. A couple of other points I also noticed are:

  • Always enter your public name as xxxx@myvoipprovider.com, where xxx is username or SIP number they provided to you. Don’t forget to replace myvoipprovider.com with your provider’s domain name
  • It may be worthwhile using server IP address instead of domain name in proxy and registrar server options
  • I could not find how “Realm” affects the connection
  • User name is case sensitive!

In my case, justvoip started to work right after I switched power saving off. Voip quality rocks - people on the other side of globe think I somewhere much closer :)

Unmanaged C++ client for WCF service.

No translations available for this entry

Recently I have been evaluating different options and solutions for creating distributed network applications. Of course, this definition is too broad and there might be hundreds of answers and they all would be useful in different circumstances but I paid special attention to WCF.

As Microsoft released a Visual Studio 2008, I can hardly see any reasons why someone who is up to developing a distributed network application might choose anything different. New Studio even has a project template for WCF services, what makes network servers and clients development as easy as can be… But, of course, that would only work if no other platform except Windows is considered. Which is not uncommon.

So, what options are there if we need to build a client for existing WCF service that would work where .NET framework is not installed (because it is not available for that platform)? There is one way offered by Microsoft (using sproxy.exe) and some could use it. Other way involves writing “moniker” in .NET and then use it via COM. They both would work on windows platform only, moreover, I couldn’t make sproxy.exe to work with WCF service at all, so I had to look for the third option, which was gSOAP. And this worked.
Continue reading ‘Unmanaged C++ client for WCF service.’

Software engineering proverbs.

This entry is also available in: Русский
Software is Too Important to be Left to Programmers, by Meilir Page-Jones

More proverbs here.

Another joke:

Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end. (Henry Spencer)

From here.

WCF services development made easy in VS 2008?

No translations available for this entry

Or what?

Yes, I am C++ maniac and would write everything in C++, if I could, but I am not an idiot. I have written distributed network applications in C++ before, this is why for a new project I decided to see how .Net eases such tasks.

That’s true - Windows communication foundation looks pretty good. It’s straightforward, it hides all network stuff behind and even newly released VS 2008 has sufficient project templates that make WCF services creation as easy as can be.

Read more - it is not as easy as it seemed…

About design patterns

This entry is also available in: Русский

Well.. it seems to me that they will soon ask about anti-patterns than proper patterns at job interviews. At least there are some books available.  Can’t even imagine what comes after that.. :)

Best programmer’s font

This entry is also available in: Русский

It looks like I am not the only one who ever tried to find another good font to replace default and ugly “Courier” in Visual Studio. I found a discussion here with some examples… Monaco looks nice, actually, but link to is was broken. Found it here, tried to install.. surprisingly, the font appearance reminds me one of those old DOS IDEs from Borland.

Life as it is

This entry is also available in: Русский

This Dilbert comics is right about what I have been doing at work for several weeks

bash.org again

This entry is also available in: Русский

While looking for any ideas about what I already asked on RSDN, found this:

A>Users can upload their own photos in their profiles
A>An algorithm that rejects meaningless or inappropriate pictures is needed

McSeem2>At first, you need to learn how to tell pornography from Fidel Castro eating a banana.

BTW, still have no success. Found  heaps of theoretical works and books but none of them explain how to apply that theory to a stream of strings.

Hit the wall

This entry is also available in: Русский

Need to find as much information about pattern recognition as possible.

Does anybody know good books or sites? “Bayesian theory” and “fuzzy logic” sound good, but question is how to apply theory in practice?

Quizz..

No translations available for this entry
You have found an ancient carpet in your attic. It was originally black, but during it’s long life it obtained some white stains. Since it is so old we can’t remember maybe it was a white carpet, and the stains are black! You can not tell if it was white or black! Luckily you have found a bottle of Universal Spot Remover. A single drop of this magic liquid can change the color of any white spot to black, no matter how big the spot is. Amazingly, the same drop, if applied to a black spot, would change the color to white! You would like to remove all spots from the carpet. Since you do not know if it was initially black or white, you would be happy to have a carpet that is either completely black OR completely white. Just don’t waste the remover!
Your Task:
Write a program that finds the minimum number of drops needed to remove all stains from the carpet. Assume that the carpet is a MxN rectangle divided into M*N regular checks, some of which are black, some white. The stain is a group of checks of the same color connected side-by-side. For example, if the carpet were 8×8 (with alternating colors, like a chessboard), there would be exactly 32 white and 32 black stains. Note that when you remove a stain, it will merge with other neighboring stains.

Via RSDN

Upd: Answer can easily be found using Graph theory (look for something about finding the longest route in a graph or similar). Or, I just used a hint (chessboard) from the task, considering which it is easy to see that 3 drops would be enough for a carpet of 8×8 stains. The rest is trivial.