REQUEST A DEMO

Tag: software

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")

My Google apps get a style makeover

April 29, 2007 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…

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…

Extending SuperEmailClerk.NET to call your own APIs

March 20, 2007  SuperEmailClerk.NET (SEC.NET), when running in API Invoke mode, will invoke requested APIs and return the results in a reply email. SEC.NET can be configured to execute API toolkits purchased from Dovetail Software, such as the ClearSupport toolkit, or custom-built APIs. This post will walk through creating a custom API in .NET that can be invoked by SEC.NET. The example will be a CreateAddress method. Even though there is an existing CreateAddress method in our Interfaces toolkit, we chose this as an example because it illustrates how to use the AdditionalFields property of the Toolkit Setup objects, which allows you to re-use our toolkits, but with an unlimited number of additional fields being set. Overview of the steps involved: Create a SecApiInvokeExample class with a CreateAddress method Create a SecApiInvokeExampleTests class for our tests Create the tags and subtags and add these to the…

Status Update: Yellow Dot, L, Up Arrow

February 16, 2007   This week I received a status dashboard report from the project manager of one of the customer projects that I'm working on.   One of the areas of the report was Key Open Issues and Risks. Seems like valid information to share. However the actual Status column of this Open Issues table completely baffles me. Take a look:         What does a status of Yellow Dot, L, Up Arrow mean? Or Red Dot, M, Down arrow ?   I'm sure this is some type of professional project management secret code, and I'm sure other PMPs may get it. But I'm on this project (I'm not a PMP by the way)  - and I have no idea what this means! I like to think of myself as a pretty intelligent guy, but this one completely baffles me. I would think, that in a status report, that the status might be…