Wednesday, June 08, 2016

Cannot get mail on a new iPhone?

You just got your new iPhone, configured your Exchange email, everything seems OK until you actually try to retrieve mail from the server.
All of a sudden, you get a message saying:
"cannot get mail the connection to the server failed"

You tried everything: 

  • deleting the account and recreating it
  • restarting your phone
  • changing different "Period to sync" settings
  • 3G vs WiFi connection
  • Even resetting your phone

Well, if you tried all of the above, then it's time to log in to Outlook Web App.
Go to Options->See all options->Phone->Phones

You should see a list of all the mobile devices you used with ActiveSync for your Exchange account.

Now, if there's already 10 in the list - there's your problem. 
Just delete one of the existing and not used devices and the mail will suddenly start to appear on your new iPhone.


Wednesday, November 13, 2013

Install PL/Python and PLV8 to PostgreSQL (Ubuntu)

When looking at official PostgreSQL documentation, to install PL/Python of PLV8 (JavaScript V8) procedural languages to PostgreSQL 9.3, it is sufficient to do:
postgres@host:~$ createlang plv8 dbname

postgres@host:~$ createlang plpythonu dbname

from a terminal, logged on as a user known to PostgreSQL.

But, when tried this after a fresh install of PostgreSQL 9.3, I got something like:

createlang: language installation failed: ERROR:  could not open extension control file "/usr/share/postgresql/9.3/extension/plpython2u.control": No such file or directory

Well, if you are confused just like me, you need first to install Ubuntu packages for the two procedural language, and then to enjoy the inspiring moments of using these powerful programming languages to write your stored procedures. 
Something like this:
user@host:~$ sudo apt-get install postgresql-plpython-9.3
for Python 2, and 

user@host:~$ sudo apt-get install postgresql-9.3-plv8
for JavaScript V8.

After this, you can issue the documentation instructed:

postgres@host:~$ createlang plv8 dbname

postgres@host:~$ createlang plpythonu dbname


Other Ubuntu packages containing languages that might be interesting:




Monday, December 26, 2011

Tuesday, October 11, 2011

Simple way to debug Windows Service startup


If you come to situation that you need to debug the startup of your Windows Service here's a simple and dirty (and stupid) method that helps in most situations.
This could be used in situation where your service immediately starts and stops.
Windows Services reports a message like this:

The "serviceName" service on Local Computer started abd then stopped. Some services stop automatically if they are not in use by other services or programs.
Usually, to debug a service you'll need to setup the breakpoint in your code, attach to the process from Visual Studio, and debug upon hitting the breakpoint.
Problem is if your service immediately exits and your don't have time to attach the debugger.
Simple, stupid way to debug it is to... guess what?... add a Thread.Sleep() as the first line in your code.
Sample, service acting as a WCF Host and it's OnStartup() method:


protected override void OnStart(string[] args)
{
   System.Threading.Thread.Sleep(30000);
   myHost= new ServiceHost(typeof(MyService)); //set breakpoint here
   myHost.Open();
}



Now you have enough time to attach the debugger from Visual Studio and you don't have to use Windows Debugger Tools or similar advanced methods.

Tuesday, March 15, 2011

Setting up MMS on Google Nexus One

Here's a short post if you ever come to a problem setting up MMS on Google's Nexus One phone.
As far as I've figured it out, the problem emerges if your operator requires different APN's for Internet connection and MMS service.
To skip all the trouble I had figuring out what's the problem, the bottom line is that you must set APN type for the one that you use for Internet access to "default" and APN type for MMS must be set to "mms". Caps matter.
All the time I've left APN type for the Internet APN empty. Nexus One lets you write anything you want for acces, other Android devices usually let you choose from one of the predefined values. If you left it empty, Internet access will work, but if you define another APN for MMS (there you must enter "mms" as APN type), MMS won't work. When you set APN type of the Internet APN to "default", and left everything else as before, MMS will start working.

Here are the sample settings for my operator (BH Mobile) that work on my Nexus One.

  1. Internet APN
    • Name: BHMobile
    • APN: active.bhmobile.ba
    • Proxy:
    • Port:  
    • Username:  
    • Password:  
    • Server:  
    • MMSC:  
    • MMS Proxy:
    • MMS port:  
    • MCC: 218 (this can be different for your operator, Nexus One usually automatically recognizes it)
    • MNC: 90(this can be different for your operator, Nexus One usually automatically recognizes it)
    • Authentication type: None
    • APN type: default (this was the problem all the time while MMS didn't work, it was not set)
  1. MMS APN
    • Name: BHMobileMMS
    • APN: mms.bhmobile.ba
    • Proxy:
    • Port:  
    • Username:  
    • Password:  
    • Server:  
    • MMSC:  http://mms.bhmobile.ba/cmmsc/post
    • MMS Proxy: 195.222.056.041
    • MMS port:  8080
    • MCC: 218 (this can be different for your operator, Nexus One usually automatically recognizes it)
    • MNC: 90(this can be different for your operator, Nexus One usually automatically recognizes it)
    • Authentication type: None
    • APN type: mms 
What is really weird is that Internet APN setting was causing problems with MMS APN. I assume that it was using the Internet APN when trying to send MMS until I've set the APN type to default. Afterwards, it searched the MMS APN and used the correct one. Just assumption...


Thursday, November 18, 2010

Top 5 things that will get you bored

There are several things that get you bored and unsatisfied with your job if you constantly repeat them and if these things make more than 85% of your everyday work for a longer period of time.

  1. Business escalations - if you constantly fight with unsatisfied customers, failing projects, interpersonal problems, etc. If all of these problems end up at your desk too often, you'll get bored.
  2. Repetition - you're constantly repeating previously acquired knowledge and really not learning anything new in the professional sense.  
  3. "Disconnected" boss - this may seem awkward, but if your boss lets you do too much on your own, you'll get bored eventually. Monitoring also means that someone cares for what you do.
  4. Constant pay - you're getting payed same amount of money for your work every month and no change in any direction will also get you bored.
  5. Compensating incompetence - if you often compensate incompetence of some of your colleagues and they're not getting sanctioned will eventually get you bored; regardless of whether you're getting rewarded for it.
Most of these points seem like a regular tasks for some jobs, but if there's too much of these you'll definitely get bored at work.

Monday, November 01, 2010

Human mail dispatchers

I've recently read the book Rework by 37signals.com founders.
First of all, I highly recommend that you read it. It'll definitely make you rethink the way you do your business, at least it did to me, and hopefully you'll really rework to some extent.
Basically, book presents an agile approach to starting, running and growing your business. The ideas presented look revolutionary from the point of view described in widely adopted business related books.
One the chapters deals with delegators It's named "Delegators are dead-weight". Delegators are managers that dispatch work to other people, all work. What I've seen in my career is that the delegators are glorified as great managers and delegating is sometimes pointed out as the single-best management virtue. Don't do it yourself, delegate, I was often said. Delegation is surely important in management, as you're required to organize and lead people. But the problem with delegators is that  delegation is the only thing that they do, and this is not good. Managers are supposed to delegate, of course, but their work must add value. I've seen many managers that delegate all work in such a manner that they can be easily changed with a little bit more complex mail routing script. This will definitely not bring added value. If you see a delegator in your company, fire him and shorten the reporting line.
Related to my previous post, intentional managers are mostly delegators, and accidental managers do too little delegation.