Pages

Tuesday, July 24, 2012

Search Engine Optimization

Not a week goes by that I don't get a call at the office from some robot claiming that they can "put my website on the front page of Google search".   This is of course, pure bullshit.  My page is indexed by its content, and trying to trick Google into thinking it's something it isn't is a one-way ticket to the blacklist.  Which leads me to a question.

Look: like all of you, I want my site to get noticed. I try to use words and phrases that clearly state what services I offer so that someone searching for what I offer may see it.

What is SEO?
Ideally, SEO is the art of creating a concise, well-stated description of your product or service.  But years ago, some sites started including - what's the technical word - CRAP - in the meta tags to draw more hits in the hopes of creating traffic.  They loaded their meta tags with stuff that was not relevant to their site, but that was currently trending in searches.  So you'd have say, a clothing store with meta tags including every porn search word, every celebrity's name, every city, state, province, etc.  And way back then, the Google crawler just indexed it all.

Of course if you were selling shoes, and you got a million hits from people searching for "naked porn stars" or "free money", then you know you never got any sales from those people. Your site just became more and more hated and blacklisted.

But things change.  Google edited the crawler to recognize this and ignore it.  A while back I read that Google doesn't even read a page's meta keywords anymore.

Links
Also, Google ranking depends on links.  How many people from other sites link to your site?  Some sketchy characters found that if you register 1000 domain names, point them all at a single page, and sell people a link, they could boost your ranking.  That's why there were all these sites that were just pages full of nothing but random, disorganized links.  That no longer works, either.  The Google crawler can see these sites a mile away and nothing gets indexed.


Organic SEO
There is some good advice about SEO here, on Google's own site.  You don't need to hire an expensive consulting firm to trick search engines into promoting your page.  The trick, if there is one, is to make your page clear and relevant to your potential clients.  Organic SEO is the practice of making what you say in the text of your site deliver your message clearly, and without subterfuge.

There are reasons to hire an outside firm to help with Organic SEO.  They can help you fix grammar and spelling errors (do you want to be indexed under "women's fashoin", or "web desing"?).  They can look at your text with an outsiders eye and help you make it clear and concise.  They can help you pick a decent domain name and avoid the kind of problems that Experts Exchange had when they registered expertsexchange.com 

But consultants can't guarantee you a #1 ranking and they can't gin up massive traffic that will generate sales. Any firm who claims they can are looking to scam you.


...

Bryan Valencia is a contributing editor and founder of Visual Studio Journey.  He owns and operates Software Services, a web design and hosting company in Manteca, California.

Friday, July 20, 2012

Context Formatting, PreferredSize

Row n Column n Context Formatting, PreferredSize... System.Windows.Forms.DataGridViewDataErrorEventArgs 

I was working in Visual Studio 2010 on a desktop app and it started throwing this error hundreds of times.  This app is using SQL Server database, with a DataGridView on a form.

A little investigation showed  that the columns referenced were always ComboBox columns.  In my case they were comboboxes where the list info is being populated at runtime, and not from the dataset. 

how to fix it:

Simply make sure that the tableadapter.fill() is not executed until the combobox lists are already populated.



...

Bryan Valencia is a contributing editor and founder of Visual Studio Journey.  He owns and operates Software Services, a web design and hosting company in Manteca, California.

Thursday, July 19, 2012

Determine a Shipper from the Tracking Number


    //from http://www.beginnercode.com/2010/11/09/regex-for-common-courier-tracking-numbers/
    ///****
    //[ UPS ]
    //9 digits, or 1Z+whatever digits
    //The quick brown fox 1Z9999W99999999999 jumps over the lazy dog.
    //*/
    //$ups = '/(\b\d{9}\b)|(\b1Z\d+\b)/';

    ///****
    //[ Fedex ]
    //12 digits, 15 digits, or '96'+ 20 digits
    //The quick brown fox 999999999999 jumps over the lazy dog.
    //*/
    //$fedex = '/(\b96\d{20}\b)|(\b\d{15}\b)|(\b\d{12}\b)/';

    ///***
    //[ USPS ]
    //30 digits, '91'+20 digits, 20 digits (untested)
    //< TOTALLY UNTESTED BY ME AT THIS TIME >
    //*/
    //$usps = '/(\b\d{30}\b)|(\b91\d+\b)|(\b\d{20}\b)/';

    enum shipper { FedEx, UPS, USPS, unknown }


    class ShippingClass
    {
        //[ UPS ]
        //9 digits, or 1Z+whatever digits
        const string UPS_REGEX = @"(^1Z\w+)|(\b\d{9}\b)";
        //[ Fedex ]
        //12 digits, 15 digits, or '96'+ 20 digits
        const string FEDEX_REGEX = @"(\b\d{12}\b)|(\b\d{15}\b)|(^96\d+)";

        //[ USPS ]
        //30 digits, '91'+20 digits, 20 digits (untested)
        const string USPS_REGEX = @"(\b\d{30}\b)|(\b91\d+\b)|(\b\d{20}\b)";

        public static shipper getShipper(string TrackingNumber)
        {
            shipper answer = shipper.unknown;
            if (Regex.IsMatch(TrackingNumber, USPS_REGEX)) { answer = shipper.USPS; }

            if (Regex.IsMatch(TrackingNumber, FEDEX_REGEX)) { answer = shipper.FedEx; }

            if (Regex.IsMatch(TrackingNumber, UPS_REGEX)) { answer = shipper.UPS; }
            return answer;
        }
    }


...

Bryan Valencia is a contributing editor and founder of Visual Studio Journey.  He owns and operates Software Services, a web design and hosting company in Manteca, California.

Tuesday, July 17, 2012

Agile Methodology

I had to attend an Agile presentation at a company I once loved.  I got worried around frame 2 when I learned that it was designed by a couple psychologists who had never even attempted to complete a software project in their dreams.   I gave up about frame 12 when they listed the assumption that developers don't do anything until 2 days before a deadline.  So, given a 4 week project, they assume we all just browse for porn for 26 days and then bash the thing out real quick.

Somewhere later, while I was dozing, they said that having a 2 hour daily group meeting would really help speed up development.

Given that I had been working 10 hour days for about 6 years, I took a little issue with the whole ball of string.  It was like trying to teach me Keynesian economics.  Basically, if you make a big pile of generic and mostly false assumptions, then you can draw a firm, but absurd course of action.

6 months later, they laid off 2,000 people.  10 months later that company was out of business.  Just sayin'.
...

Bryan Valencia is a contributing editor and founder of Visual Studio Journey.  He owns and operates Software Services, a web design and hosting company in Manteca, California.

Sunday, July 8, 2012

I Don't Trust Sourcegear Vault

Sorry to have to say this, but in my short time trying to use it I have had numerous issues like:
  • Don't use the latest version, use this special old release.  It's the only one that works for us (version compatibility issues).
  • You check in a project and when you check back out it's in the wrong place.
    • This makes it so when you browse your tree, all the files show as missing, which makes me panic every single time.
    • If you try to fix it incorrectly, it adds your whole project to a folder inside your project like root/myProject/myProject/...all my folders - again
  • It locks all your files when you told it not to.
  • At least once in every project, things have gotten so banjaxed that I have had to delete and re-upload the entire source set, meaning all previous revisions are lost.
Bottom line, Vault has lost my confidence. Now only on the rarest occasion, when all the pressure is completely off to get my work done, will I dare to try a check-in.  Because about 65% of the time, trying to check in my source means losing a significant part of a workday trying to sort out some stupid problem.

Incidentally, I have used Subversion many times, and NEVER had any of these problems, or really had to dig through manuals for answers.

...

Bryan Valencia is a contributing editor and founder of Visual Studio Journey.  He owns and operates Software Services, a web design and hosting company in Manteca, California.

Friday, July 6, 2012

MSSQL: Find the next available number in a sequence

 So I have this data table, with a non-key column, and I need to write a SQL Query to find the next unused number in the sequence that is greater than a certain starting number.

It's like this:
A long time ago, the table started somewhere around 1000.  This is not a key column, and some of the older records have been archived out of the table.  So I have a weird number that will serve as my minimum.   BUT! there are also some wacky big numbers in the system and I don't want to do a max(n)+1.

Here's a beakdown:

0-35956these numbers are there, with lots of missing numbers and gaps due to archiving.
35957-1904121900a few of these are there, I want to find the next available number in this region.
1904121901 and upI want to ignore these numbers, and not use them (until all the numbers leading up to here are filled).

My Goal here is to create a SQL Query I can run once to find the next available number (meaning the lowest number above 35957 that does not exist in the column).

Here is what worked.

select min(Item_No)+1 as NextID
from Data_Table DT
where not exists
(select 1 from Data_Table DT2 where DT2.Item_No=DT.Item_No+1)
and Item_No > 35956

...

Bryan Valencia is a contributing editor and founder of Visual Studio Journey.  He owns and operates Software Services, a web design and hosting company in Manteca, California.

Share This!

Contact Us

Name

Email *

Message *