Posted: February 2nd, 2010 | Filed under: Database, Full-Text, Search
Author: Tom
2 Comments →
Full-Text Search
When I dove into the SQL Server 2005 Full-text search, I was pretty stoked. At the time we were having a heck of a time with SharePoint full text searching (it was literally take 2-3 days to do a single crawl). We needed a faster more able solution. Tada! SQL Server to the rescue! Full-text capability comes with it. Why did we need that Sharepoint search anyway, in fact, we figured SharePoint was probably using the same service only with a ton of other overhead to gather data into it’s own structure, etc.
The dataset I was working with wasn’t really that big. ALL the data was probably less than 2mil rows. We had tables and tables of related data, some of which we wanted to search. I’d never worked with full-text searching or indexing before so it was a learning experience. I went out and read whatever I could because while the crawl and populates were substantially faster, the queries were still slow, sometimes slower than the Sharepoint counter part. So I’ve been optimizing queries and my full-text properties to get better and better results. There’s a lot of information out there, and a lot of it is useful.
Then I stumbled across a relatively small change that gave me the biggest performance gain yet.
Read the rest of this entry »
Tags: containstable, freetext, Full-Text, fulltext, Search, sql 2005, sql server
Posted: February 2nd, 2010 | Filed under: Programming
Author: Tom
No Comments →
I’ve never needed to write a function that converted hex. On top of that I never needed a function that calculated a power.
Tonight, I did both. I chose to put the code to determine the value of the hex digit in a separate function. I think it’s a little cleaner this way. Honestly coding in C is a blast for me. I love thinking about this really simple problems.
It’s oddly refreshing from the goofy pretend issues I cover writing reports and update pages. Some how these types of problems seem more… I don’t know… real?
Read the rest of this entry »
Tags: absolute value, c programming, c programming language, convert hex, exponents, hex to dec, hexadecimal, hexidecimal conversion, negative exponent
Posted: February 1st, 2010 | Filed under: Programming
Author: Tom
1 Comment →
The idea of true or false is a little strange in C. I’ve been thinking about it all day, and the standard practice of “0″ as the default return int when a function is successful. My understanding is that generally NOT 0 is considered true. If NOT 0 is true, then wouldn’t you want to return a 1 as default from a function?
I’m used to thinking about function calls returning true on success. I do things like this a lot.
if(MyFunction())
print "Success!";
This would have been more normal to me. However in C, at least by the standard behavior this isn’t going to work. I suppose that maybe they imagined that it would only return on error? So a 0 (or false) was a success.
Read the rest of this entry »
Tags: boolean, c programming language, c#, false, Programming, true
Posted: February 1st, 2010 | Filed under: Programming
Author: Tom
No Comments →
I mentioned in my brief OOD post that I a web developer without a Computer Science degree so I’ve never really needed to know C. In the modern world of web development, we work in high level languages. Often scripty ones that do so much for us that we don’t really know or care what’s happening underneath.
One day I’d like to work in lower level programming so, I have to learn it. And learn it well.
Finding the right tools
Before I can code in C, I need to be able to write and compile C code.
I considered Vim (wiki: Vim) as my editor, but I don’t know how to use it (outside of some very basic use that pops up in git) so I figured learning one thing at a time is probably a good idea. UltraEdit wins the day, my version is a little old but it will do handsomely, its a very capable text editor.
For a compiler, I’m going with Cygwin w/GCC. Apparently, Cygwin grants you a Linux like shell for use in Windows. Now I don’t know my way around a Linux shell very well but I’ll have to learn.
a C Tutorial
A friend recommended the book: The C Programming Language, so this is what I’m using. Even though I know how to program I’m working from the beginning and really trying to do the exercises listed. These are exercises I’m not used to thinking about or needing to do, it’s stuff that every language I work in now has built in libraries to handle. I know, I could find a library for C and have the same effect but this is something I want to learn properly.
Read the rest of this entry »
Tags: basics, c programming language, cygwin, gcc, learning, low level programming, string reverse, tutorial