This is from Joel on Software and yes, I had to laugh

“Custom development is that murky world where a customer tells you what to build, and you say, ‘are you sure?’ and they say yes, and you make an absolutely beautiful spec, and say, ‘is this what you want?’ and they say yes, and you make them sign the spec in indelible ink, nay, blood, and they do, and then you build that thing they signed off on, promptly, precisely and exactly, and they see it and they are horrified and shocked, and you spend the rest of the week reading up on whether your E&O insurance is going to cover the legal fees for the lawsuit you’ve gotten yourself into or merely the settlement cost. Or, if you’re really lucky, the customer will smile wanly and put your code in a drawer and never use it again and never call you back.”

Check link here

It had happened to me, hrm, lemme think, probably more than three times. One of the projects was a really expensive one and right after the very few deployments it was never used again. For me that was deeply saddening as we had invested so many hours of work in it, the customer did pay, but sometimes you prefer seeing your software being used, even abused, rather than gone to the oblivion.

Working as tech support

I’ve always wanted to work in a server farm, so when a friend told me he had an available opening for offering tech support on the weekends at a hosting co, I said YES! can I shell access the servers?
OMG, I never thought it could get that hectic on a Sunday, I spent 8 hours without stop attending requests, some were really minor, like “we need to unlock a domain to make a transfer” some were kinda tricky, like “we want to be able use wildcards on our subdomains”…I hope users keep returning after some of my answers, it’s hard to keep up with the technical work they demand and at the same time make every customer happy.
This company has the best tech support I’ve ever experienced, so I didn’t want to let them down…Go Go the Penguins! 🙂

Spanish lessons…, facing a classroom.

You’ve probably noticed that English is not my mother tongue, if you hear me talking you will definetely notice an accent and definetely my grammar could use some improvement. My native language is Spanish and I’ll be teaching a beginner’s course for two months at the Regional College. I’m looking foward to meet the students, it’ll be good for me to learn more phrases in English and interact with people other than IT colleagues and family :-p (most of my friends are colleagues as well) also an opportunity to show them a little of my place of origin and the Spanish speaker world. I set up a small site to publish the lessons http://spanish.theniceweb.com. Take a peek if you want!

Holy smokes, Microsoft changed the certification schema again

Now that I finished reading the Web Developer’s certification training book
and was about to do all the labs and get my hands on the Exam Cram book
I read that MS will be changing the certifications next month and I might need to upgrade my skills, right before getting the MCP exam. Ok, Ok, I knew this might happen, I just didn’t know it would be so soon…

Here’s a paragraph taken from the original article:

According to Valvano, Microsoft will follow tradition, releasing exams for SQL Server 2005 and Visual Studio 2005 about 45 days after the release of the products to the general public. Those exams, however, won’t fit into the traditional MCP schema that one might be familiar with. Instead, Microsoft will introduce a new framework for certification that will pair up a credential with a skill-identifying certification based on a tiered approach consisting of the following credentials:

  • Tier 1: Microsoft Certified Technology Specialist will require simply passing one to three exams based on a Microsoft technology. As products meet the end of the support lifecycle, its related exam will be retired.
  • Tier 2: Microsoft Certified IT Professional or Professional Developer require a Technology Specialist certification, plus one to three more exams, based on the requirement for a particular path. This tier is tied to job role at an organization, such as Database Developer or Business Intelligence. Recertification will be required to maintain status at this level.
  • Tier 3: Microsoft Certified Architect is a rigorous, board-level certification that requires recertification. Achieving Technology Specialist or IT Professional or Professional Developer certification not a prerequisite to attaining this level of certification.

Okay, I honestly don’t know if taking the MCP exam at all…

Frustration with T-SQL 2000

We finally launched a very important web site yesterday.
The web application logs all of it errors in a sql server 2000 database, which is neat as we can review the logs and see what script produced the error, what specific query string was sent to that page, the exception it caused and the end user only sees a nice looking message of “We’re sorry, please try again” kind of thing.
I’ve been trying to isolate a pretty random error, trying to nail down the cause. I reviewed the error log table and need to filter an nvarchar field.

My T-sql sentence looks like this:

SELECT *
FROM dbo.ErrorLog
WHERE
(datestamp = ‘9/19/2005’) AND (error LIKE ‘Object reference %’)

Reviewing the help, I found there are very few wildcards and zero support for regular expressions.

So, here’s my formal complain, how are we going to do decent querying without regular expressions. I know MSSQL 2005 will include the .NET Framework inside and that means it will include the Regex namespace, but, wouldn’t it be more efficient to have reg exps on the T-sql level, instead of having the overload of creating objects just for using regexps?
I’ve been told we should avoid using the Framework on our SQL 2005 sprocs whenever we can accomplish the same task with T-SQL…

Regexps, regexps!

IE 5.2 over Mac OS bug with Localized Strings

While testing our application over multiple browsers/OS combination we came across a pretty odd problem. IE over Mac OS wouldn’t show all the items in the drop down list controls. The html markup was correct, but the drop down lists would show empty spaces when the text string had accented characters, or characters that are not in the English alphabet.

The solution? Unknown, Microsoft is no longer developing IE browsers for Mac Operating Systems, is also no longer giving support for IE over Mac. What we are doing is detecting the browser and OS combination and rendering a disclaimer note on the page.

This post is just a curious note on a so far undocumented bug.

Here’s a very useful browser detection script taken from QuirksMode.org

var detect = navigator.userAgent.toLowerCase();
var OS,browser,version,total,thestring;

if (checkIt('konqueror'))
{
browser = "Konqueror";
OS = "Linux";
}
else if (checkIt('safari')) browser = "Safari"
else if (checkIt('omniweb')) browser = "OmniWeb"
else if (checkIt('opera')) browser = "Opera"
else if (checkIt('webtv')) browser = "WebTV";
else if (checkIt('icab')) browser = "iCab"
else if (checkIt('msie')) browser = "Internet Explorer"
else if (!checkIt('compatible'))
{
browser = "Netscape Navigator"
version = detect.charAt(8);
}
else browser = "An unknown browser";

if (!version) version = detect.charAt(place + thestring.length);

if (!OS)
{
if (checkIt('linux')) OS = "Linux";
else if (checkIt('x11')) OS = "Unix";
else if (checkIt('mac')) OS = "Mac"
else if (checkIt('win')) OS = "Windows"
else OS = "an unknown operating system";
}

function checkIt(string)
{
place = detect.indexOf(string) + 1;
thestring = string;
return place;
}

Fun with Globalization, Double.Parse method and French strings

Friday was a dead line for one of our applications. As usual there were some late bugs detected. One of them caused us a terrible headache. I was pulling out a string from the database representing a float number “1.609”. I had to parse that string on my code and convert it to float, Double type in VB.NET.
The string was converted fine for all the cultures in the application but French.
I was complete puzzled, aren’t doubles the same in all cultures? Isn’t mathematics the same? The Earth is round, the Pi number is the same no matter what language you speak, then why this statement will throw an “Expression cannot be evaluated” exception when the Current Thread culture is fr-FR????? Nonsense.

intUserRadius = Round(intUserRadius * Double.Parse(strRadiusUnits)

The same happened with

intUserRadius = Round(intUserRadius * CDbl(strRadiusUnits)

Both Functions failed on French, it seemed that French doubles are not the same.
Ok, the decimal separator in fr-FR is a comma and not a point, but the strRadiusUnits string is a string that is not culture biased and has a decimal point as separator.
It looks like this parsing functions were expecting a comma instead of a decimal point, so the following work around had to be applied:

intUserRadius = Round(intUserRadius * Double.Parse(strRadiusUnits, CultureInfo.InvariantCulture))

So, beware of the string parsing when you’re handling Global applications.

I got these two replies from a developers list:

Mathematics is the same in all cultures, but the character-based
representations of them may not be.

English is 1.5, others are 1,5

The default behavior Microsoft decided upon was basically “you can write
lazy code to your own current culture and not have to worry about
globalization”. This means that people who use 1,5 to represent one and a
half don’t have to do anything to write code to parse their own cultural
representation of the value. Once you get into multiple cultures, you have
to stop being lazy and use the supplied culture-aware overloads.

In your case, you have an English-centric view of data in your database
(1.609) which just so happens to be the “invariant” culture Microsoft
decided upon in their libraries. So to parse the data you’d need to use
Double.Parse(“1.609”, CultureInfo.InvariantCulture)

Thanks Adam for the reply.

Double.Parse(string)

You are parsing *from* a string, and “1.609” as a string
does not match the local culture. Any and all conversions
to/from strings need to be scrutinised for culture issues.

Far better would have been to store & retrieve a double
value from the database, rather than relying on using
strings as an intermediate format.

Thanks John for that reply.

Hth,

PG

Why there shouldn’t be primary keys with business meaning…

I could explain why you shouldn’t implement composite PKs in real life databases, I could quote a few articles on the subject (my favorites are Scott Ambler’s writings at Ronin) and point out that eventhough composite primary keys look good and make sense in theory, they make the life of programmers like me, difficult. Why? simply because when you have a composite foreign key, things get complicated, you no longer can use this simple and straighforward constructuction to filter values:

SELECT field1, field2 from ChildTable where FKField in (Select PKfield from ParentTable where fileteringfield=’value’)

If the FK is a composite key, this is two fields instead of one field as FK, the statement:

SELECT field1 from ChildTable where FKField1, FKField2 in (Select PKfield1, PKfield2 from ParentTable where fileteringfield=’value’)

will fail.
I know someone might point out, why not using joins? Sure that would be the only solution, but you would be joining on two fields instead of one…and why consuming more resources on a nested loop for the inner join?

Alternatives to Ajax

Finally I found a good article comparing Ajax with the rest of the equivalent technologies out there. It seems like a good resource to present to the team at Resources. I had mention before that I find web UIs quite rigid and the main alternative I had seen for this in the industry was Flash. However, Flash movies can be big to download, specially if you are on a dial up connection, need the Flash viewver plugin and the skills are rare to obtain. The original article

Weighing the alternatives

Why is Ajax getting so much attention

can be found at the Ajax info site. Enjoy!

Google’s having DNS problems


When you do a search in sogo it shows up results like the first image. They even have a privacy policy, second image…

This is fun, I can’t seem to find any recent problem like this on the
news today, the last one I heard of was in May 2005 :D. Still on the discussion list there are several users complaining about this problem.

I found this on a forum though
“sogo owns www.google.com.net, so when google has DNS problems some
browsers will try to append .com, .net, and .org to whatever url you
typed and redirect you there.”

But I bet it’s not unintentional…having a search engine in the net domain 😉
Here’s the original discussion:
http://digg.com/technology/Google.com_has_been_Hacked

Come on Google, buy www.google.com.net!