REQUEST A DEMO

Tag: Gary Sherman

Configuring logging in the fcSDK without a config file

May 14, 2007 I banged my head against this for a while today, so I figured a post was in order. I was writing a PowerShell script to re-create a customer scenario today, and I needed to enable debug level logging. I was building the config on the fly, such as this: $config = new-object -typename System.Collections.Specialized.NameValueCollection $config.Add("fchoice.connectionstring",$connectionString); $config.Add("fchoice.dbtype",$databaseType); $config.Add("fchoice.disableloginfromfcapp", "false"); $ClarifyApplication = [Fchoice.Foundation.Clarify.ClarifyApplication] if ($ClarifyApplication::IsInitialized -eq $false ){ $ClarifyApplication::initialize($config) > $null; } I created a logging.config file that looks like: Then added to my config: $config.Add("fchoice.logconfigfile", "C:\customers\test\logging.config"); I ran my script, but I didn't get a log file. I went back to the fcSDK docs on logging configuration, and realized what was happening. The LogManager is a singleton, and only gets its LogConfigFilePath set upon initialization. So, it has to be set before its initialized. However, the fcSDK does logging when parsing…

Are your code comments a way to say I’m Sorry for the actual code?

May 11, 2007 There's a great post on perlmonks focused on the topic of comments in code. It fits with a lot of what we've been practicing here at Dovetail lately. We often talk about the benefits of loose coupling, but I never really thought about the coupling that occurs with code and comments. The original post sums it up nicely: One of the high priority goals in programming is the removal/avoidance of codependencies. We avoid using parallel data structures (eg.parallel arrays), because it becomes a nightmare to maintain those parallel arrays in synchronisation as algorithms and projects evolve. One of the key attributes of well designed classes (and other abstractions), is that they are as fully independent of their peers as possible. As decoupled as is possible to achieve.By relying upon both code and comments to describe our algorithms, we are purposely…

Making the app work the way the user expects it to work

May 9, 2007 Every morning I get an email report containing all of the Full Text Searches that our customers performed within our SelfService application, along with how many results each search resulted in, and if there were any errors. Our volume is low, so it's not too much information for me to process on a daily basis. This report allows me to gain some knowledge of who's using the app, what types of things they're searching for, and if they are finding answers to their inquiries. This morning's report showed that a customer searched for just an integer (for our example, we'll say they searched for 12345), and came up with no matches. Knowing the  customer, I knew they were searching for a case number. However, our search is currently setup to perform full text searches on the textual information with a…

Austin .NET Code Camp re-cap

May 8, 2007 The Austin .NET User Group put on another fantastic Code Camp this past weekend. I was especially proud to see 3 members of our staff presenting. You guys rocked. Kevin Miller launched a potential new career as a public speaker/presenter with a well-received talk on Monorail. The attendees were very excited about what they saw. And kudos to Kevin for coding on the fly, which flowed well and showed his confidence in his knowledge and abilities. Coding on the fly takes some stones. Bret Pettichord did a talk on Scripting Web Tests with Watir and Ruby. The participants had lab machines and were able to actually script tests. It was the only hands-on talk that I saw, and I heard  lots of good feedback from the attendees. Scott Bellware filled the big room for his talk on Good Test, Better Code - From Unit Testing to Behavior-Driven Design. He…

My t_head t_hurts from t_looking at t_this t_code

While working on one of our legacy products today, I ran head first into this code: Set cl_list = Cobj_LOR_CLAUSE.Contents For t_int = cl_list.Count - 1 To 0 Step -1 Set cl_rec = cl_list.ItemByIndex(t_int) If cl_rec.GetField("parameterized") = 1 Then t_str = "XYZZYParamXYZZY#" & Trim$(Str$(t_int)) t_pos = 1 While t_pos > 0 t_pos = Instr(sql_stmt, t_str) If t_pos > 0 Then If Left$(cl_rec.GetField("operation"), 3) = "is " And _ Instr(cl_rec.GetField("operation"), "equal")

Real blogs are written by real people

April 29, 2007 Sara Smith from ViaMetric has an interesting post titled A blog is not a brochure. Amen! (Full Disclosure: ViaMetric does some marketing work for us) My favorite line from her post: [Blogs are] your chance to show your customers that your company is run by actual living, breathing humans who like to think about things, and sometimes even write about them  She hits the nail on the head with this one. And it's so easy to tell when a blog is written by an actual human, speaking in their own voice, wanting to engage in a conversation, wanting to share information. Those are the blogs I connect with. Because you're connecting with a person. Not a sales or a marketing message. Sara goes on to say: For a great example of how it can be done, check out the blogs written by…

My Google apps get a style makeover

A cleaner, more functional GMail I use GMail for my personal email, and functionally it's great, but I always thought it could use some help in its look and feel. Even the new beta of Hotmail has a nicer look. Not any more. Lifehacker recently rolled up multiple gmail enhancements and styling into one package: Better Gmail. I love the Super Clean skin, and the Conversation Preview option is sweet - simply right-click on a message to preview its content in a popup bubble.   Goodbye Newsgator, Hello Google Reader I've played with Google Reader here and there, but the look and feel of Newsgator Online kept me with Newsgator. However, using the Stylish extension, with the Google Reader theme, makes for a much nicer looking Google Reader. This was the final straw that pushed me to move away from…

ADO.NET Entity Framework cut from .NET 3.5/Orcas

Kevin Miller recently blogged about the recent confirmation that the EDM Designer will not be in Orcas. Yesterday, the ADO.NET team reported that the ADO.NET Entity Framework will not be in the RTM of Orcas, but should ship in the first half of 2008. When I hear "first half of 2008", I interpret that as June 30, 2008. Microsoft shipped the first CTP of the ADO.NET Entity Framework in August of 2006. That means it will be almost two years from the first CTP to a release. Two years! Unreal. Frans Bouma has some interesting thoughts as the underlying reasons. Our decision to switch to ActiveRecord and nHibernate has been clearly solidified.

Using the fcSDK in PowerShell

April 25, 2007 Years ago, if I wanted to "script" Clarify [formerly linked to www.myclarify.com which no longer exists], I would use UNIX shell scripts, including UNIX mini languages such as sed and awk, that would create dat files that could be imported with dataex. When ClearBasic was introduced, we also got cbbatch, which was a command line interpreter for ClearBasic, so we could script Clarify using CB. When we (First Choice Software) introduced FCFL (First Choice Foundation Library), which was a set of COM objects, we could script using VBScript or JavaScript making COM calls. Same story for the fcSDK. Although the fcSDK is all native .NET, it also exposed a COM interface, so we could still do scripting as we did with FCFL, but we didn't have all of the .NET capabilities of fcSDK. But now, with the availability of PowerShell, we…