Entries Tagged 'Programming' ↓

Software from hardware vendors

Why is it that all hardware manufacturers (for PC) write the most crappiest software ever? ASUS builds good hardware, but when it comes to software, their website support section is one of the worst and slowest (from here in the UK at least), and this is their BIOS updater: I have no idea why a BIOS updater for a motherboard should look like a spaceship why can’t they just use normal Windows controls like EVERY BODY else? 

ASUS BIOS UpdaterOr which idiot approved the use of a picture of a Mac on a Windows tool to update PC motherboard BIOS? 

But this is not why I’m so pissed off with ASUS. The problem is a software developer uses “funky” graphics for his application as if it is going to be used by 12-year olds, but leaves options like a list of ASUS FTP servers to choose from or PASSIVE/ACTIVE and Proxy connection settings in there. Couldn’t you bloody used a normal blooming HTTP for that? Was it not possible to try PASSIVE and then ACTIVE if that didn’t work and then show a link for a direct download if everything was unsuccessful? Is upgrading a BIOS somthing that people do every afternoon after picking up their kids from school?

Why should I care about which one of your FTP servers to use? Why should I care which FTP connection method I have to choose? Why should it be my problem that a company as big as ASUS can’t sign a contract with a hosting provider so I don’t get “Too many connections, try again later” in a middle of a download? 

Where do they find there “developers”? Which planet they live on? Haven’t you heard of anything called Apple? Oh wait a second, you idiots make Apple laptops in your factories. Open one up before it goes into the box. You might get something into your thick skills by chance.

More on iPhone Push

OK. So in my quest for a good push solution for my contacts and calendars, I signed up for a MobileMe trial account, imported all my contacts from Google to it (export to VCard and import it in Me), and started to export my emails to it as well (using Mail.app on my MacBook via IMAP). But I decided not to go ahead with MobileMe for the following reasons:

  1. It doesn’t support custom domains (like sajadi.co.uk which is mine) at the moment so I have to keep my hosting for this email address and forward it to Me and then setup the outgoing SMTP server to send it from my host or use the Reply-to solution which is even less elegant in my opinion.
  2. Google (Google Apps in my case) does a brilliant job in filtering spam. I hardly get any passed the filters these days. Forwarding from my Google to Me can benefit from filters though.
  3. The search features are not as strong as Google’s. No need for proof I guess!
  4. The interface is still buggy. Not much but not as good as Google’s.
  5. There are loads of tools out there for Google integration: Calendar Synchronises and more. This means I can use my Google calendars with my work Outlook and lots more (like subscribing to iCal feeds,…)

All this means that shelling out £60 for a MobileMe account is not a good idea. Also the sync on Mac and PC is not instant but every 15 minutes (you wonder how they can do it on a mobile device but not a PC or even Mac)

I mentioned earlier that I am a bit skeptical about NuevaSync because it is in beta, but I still gave them a shot and I’m glad to say that they’ve surprised me nicely. The service has worked flawlessly so far, it syncs my contacts with Google seamlessly (including pictures which is very nice) and is quick and responsive. As for the calendar, since I have 5 different calendars in my Google account and NuevaSync displays them in one iPhone calendar I’m still holding out of that service, but they’ve promised to fix this in future.

I wish NeaveSync best of luck and hope Google buys them (if they want the money!)

Parse free text to names

This code is a C# port of this VB code that parses free text into a person’s name. The result includes Title, Pedigree, First name, Middle name, Last name and Degree.

I’ve used this code in iContact (Google contacts for Windows)


using System;
using System.Collections.Generic;
using System.Text;

namespace DataLoad.iContact.WinClient
{
public class NameParser
{
private string _title;

public string Title
{
get
{
return _title;
}
}

private string _firstName;

public string FirstName
{
get
{
return _firstName;
}
}

private string _middleName;

public string MiddleName
{
get
{
return _middleName;
}
}

private string _lastName;

public string LastName
{
get
{
return _lastName;
}
}

private string _pedigree;

public string Pedigree
{
get
{
return _pedigree;
}
}

private string _degree;

public string Degree
{
get
{
return _degree;
}
}

private string[] _titles = new string[] {"Mr.", "Mrs.", "Ms.", "Dr.", "Miss", "Sir" , "Madam", "Mayor", "President"};

private string[] _pedigrees = new string[] {"Jr.", "Sr.", "III", "IV", "VIII", "IX", "XIII"};

private bool IsIn(string text, string[] values, bool caseSensitive)
{
foreach (string v in values)
{
StringComparison compType = StringComparison.InvariantCulture;

if (!caseSensitive)
{
compType = StringComparison.InvariantCultureIgnoreCase;
}

if (text.Equals(v, compType))
{
return true;
}
}

return false;
}

private string CutWord(string text, out string remainder)
{
int p = text.IndexOf(' ');

if (p != -1)
{
remainder = text.Substring(p).Trim();
return text.Substring(0, p).Trim();
}

remainder = string.Empty;
return text;
}

private string CutLastWord(string text, out string remainder)
{
int p = text.LastIndexOf(' ');

if (p != -1)
{
remainder = text.Substring(0, p).Trim();
return text.Substring(p).Trim();
}

remainder = string.Empty;
return text;
}

public NameParser(string text)
{
// title
string word = CutWord(text, out text);
if (IsIn(word, _titles, false))
{
_title = word;
}
else
{
text = string.Format("{0} {1}", word, text);
}

// degree
int p = text.IndexOf(',');
if (p != -1)
{
_degree = text.Substring(p + 1).Trim();
text = text.Substring(0, p).Trim();
}

// pedigree
word = CutWord(text, out text);
if (IsIn(word, _pedigrees, false))
{
_pedigree = word;
}
else
{
text = string.Format("{0} {1}", word, text);
}

// rest
_lastName = CutLastWord(text, out text);
_firstName = CutWord(text, out text);
_middleName = text.Trim();
}
}
}