Category: Code


The future of my kind of work

November 20th, 2009 — 1:30am

Today Google announced its release of the source code for the Chrome OS. That is their version of a computer operating system that revolves around the web browser.

I have mixed feelings about this from a user perspective. From a technical perspective I’m totally buzzed about it.

For family and friends reading this (all 5 of you) this plays really well to explain what it is “I do for money”. See in the video when they are talking about the software you use (Gmail, YouTube, Searching etc), well that is the kind of software I build. Web based software. Presumptuously this would would mean that in a world where computers only run software from the internet – I have a lot of opportunity.

But I have a concern as a user. Frankly I like things the way they are. I want to store data on my machine. I want local (native) applications. But then again, I’m rather techy and maybe there’s context about all of that. When I think of my Mother using her computer, I don’t think of anything local. It’s email, browsing and that’s really it. So this kind of thing would be perfect for her.

So while I’m totally digging the idea and I’ll be paying really close attention, I have this underlying suspicion that it won’t be “applicable” for a while yet.

Maybe I’m wrong.

Comment » | Code, Work

AcDc 0.5.0

November 16th, 2009 — 3:13am

Pushed a new version of AcDc out. This version is much more reliable and frankly has the full set of functionality that it never quite had before. It likely contains a few bugs here and there, and probably is missing a big huge stinkin feature that I neglected to think about, but hey it’s not 1.0 yet. XML Namespaces is sort of a dark hole. Nested XML Elements is a little sketchy (really nested – I’ve tested for 2 level deep elements but not much more).

I built this gem to support Siffer and it consumed most of my last few months of time. And it will probably change the look and feel of Siffer quite a bit. So goes greenfield projects. I’m hoping to dig into Siffer more real soon.

And as always I’m learning a bunch. XML is one of those things I’ve always used, but never quite had my brain wrapped around fully. It can get really complicated (unnecessarily in my opinion) and if you don’t know the deep intricacies it can be really hard.

http://github/clinth3o/acdc

Comment » | Code

SIF Message Parsing made easy … with Siffer

July 15th, 2009 — 2:35am

Forgive the formatting of this post. But I wanted to share the XML parsing I added to Siffer with an example.

require 'rubygems'
require 'siffer'
xml = "<SIF_Message Version=\"2.3\" xmlns=\"http://www.sifinfo.org/infrastructure/2.x\">
<SIF_Ack>
<SIF_Header>
<SIF_MsgId>AB1058CD3261545A31905937B265CE01</SIF_MsgId>
<SIF_Timestamp>2006-02-18T08:39:40-08:00</SIF_Timestamp>
<SIF_SourceId>SifInfo_TestZIS</SIF_SourceId></SIF_Header>
<SIF_OriginalSourceId>RamseyLib</SIF_OriginalSourceId>
<SIF_OriginalMsgId>1298ACEF3261545A31905937B265CE01</SIF_OriginalMsgId>
<SIF_Status><SIF_Code>0</SIF_Code>
<SIF_Data><SIF_Message Version=\"2.3\"><SIF_Request>
<SIF_Header><SIF_MsgId>A3E90785EFDA330DACB00785EFDA330D</SIF_MsgId>
<SIF_Timestamp>2006-02-18T08:39:02-08:00</SIF_Timestamp><
SIF_SourceId>RamseySIS</SIF_SourceId></SIF_Header>
<SIF_Version>2.*</SIF_Version><SIF_MaxBufferSize>1048576</SIF_MaxBufferSize><
SIF_Query><SIF_QueryObject ObjectName=\"LibraryPatronStatus\" />
<SIF_ConditionGroup Type=\"None\"><SIF_Conditions Type=\"None\"><SIF_Condition>
<SIF_Element>@SIF_RefObject</SIF_Element><SIF_Operator>EQ</SIF_Operator>
<SIF_Value>StaffPersonal</SIF_Value></SIF_Condition></SIF_Conditions></SIF_ConditionGroup></SIF_Query>
</SIF_Request></SIF_Message></SIF_Data></SIF_Status></SIF_Ack></SIF_Message>"

msg = Message.parse(xml)
puts msg.is_a?(Ack)
puts msg.status.code == "0"

Notice that the msg object returned from parse is actually the Ack object and can return the attributes accordingly.

The way to do this yourself is the following:

gem install siffer -v 0.0.7

Then create a file with the proper require statements you see above. Grab an example SIF Message XML and call Message.parse. The parse method will return the proper object of the parsed messgae (i.e. Request message will return a Request object back).

There are edge cases yet to be debugged – but 90% of all SIF messages are now parsing and Siffer includes all SIF Message objects.

Stay tuned for PUSH/PULL Agents!

Comment » | Code

Back to top