<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Thomas G Bates</title>
    <description>The blog of Thomas G Bates, in which our hero describes his adventures with linux, javascript, ServiceNow, books, and anything else he believes is worth posting.
</description>
    <link>http://tgbates.com/</link>
    <atom:link href="http://tgbates.com/feed.xml" rel="self" type="application/rss+xml"/>
    <pubDate>Sat, 20 May 2017 13:40:59 +0000</pubDate>
    <lastBuildDate>Sat, 20 May 2017 13:40:59 +0000</lastBuildDate>
    <generator>Jekyll v3.4.3</generator>
    
      <item>
        <title>Client UI Action in ServiceNow</title>
        <description>&lt;h1 id=&quot;client-ui-action-in-servicenow&quot;&gt;Client UI Action in ServiceNow&lt;/h1&gt;

&lt;p&gt;I had a requirement for work start and end dates to be required for any “Implementation”
Change Tasks.  My existing Close Task UI Action on the change_task form was bypassing
the mandatory change_request.work_start field.
I had it automatically inserting the current timestamp into the work_end field if it was empty,
but now I needed to check and make sure work_start was also entered before closing the task.
This had to happen only for the implementation task in the workflow, not the testing task.&lt;/p&gt;

&lt;ol&gt;
  &lt;li&gt;Add OnSubmit client script to return false if Work Start is mandatory, but not completed&lt;/li&gt;
  &lt;li&gt;Update UI Action with client and server code to check form and update record&lt;/li&gt;
  &lt;li&gt;Update UI policies surrounding work start/end fields and when they are required.&lt;/li&gt;
  &lt;li&gt;Deactivate other Close Task UI Actions on change_task table&lt;/li&gt;
&lt;/ol&gt;

&lt;h1 id=&quot;client-script&quot;&gt;Client Script&lt;/h1&gt;

&lt;div class=&quot;highlighter-rouge&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;Note: This client script relies on the ui policies to set the work_start field as mandatory
Name: Change_Task - Reject if No Work Start
Description: If work start field is mandatory, but not entered, halt submission
Table: change_task
Type: onSubmit
Script:


function onSubmit() {
    var work_start_mand = g_form.isMandatory('change_request.work_start');	
    if (work_start_mand) {
    	var workStartDate = g_form.getValue('change_request.work_start');
    	g_form.clearMessages();
    	if ((workStartDate === &quot;&quot;) ) {
    		g_form.addErrorMessage(new GwtMessage().getMessage(&quot;{0} must be completed&quot;, g_form.getLabelOf(&quot;change_request.work_start&quot;)));
    			return false;
    		}
    }
}
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;

&lt;h1 id=&quot;ui-action---close-task&quot;&gt;UI Action - Close Task&lt;/h1&gt;

&lt;p&gt;This ui action has a client-side function workstart which is called when the user clicks the form button.
If the work start field has been set mandatory by a UI policy, but it is not completed, it gives an error.&lt;/p&gt;

&lt;p&gt;The server-side function runBusRuleCode enters the current time in the work end field.&lt;/p&gt;

&lt;div class=&quot;highlighter-rouge&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;Table: Change Task [change_task]
Action name: close_change_task
Show insert: true
Show update: true
Client: true
List v2 Compatible: true
Form button: true
Onclick: workstart();
Condition: current.state &amp;lt; 3 &amp;amp;&amp;amp; current.approval != 'requested'

    /*
     * If the workflow activity for this task is an implement task:
     *  1. timestamp the work end field for the change request with current time
     *  2. close task
     * (see incident for model used)
     * Force change_request.work_start field to be completed before implementation task can be closed complete
     */
    function workstart() {
    	// client script called initially Onclick
    	// sets state to closed complete to trigger UI policies
    	// checks whether work_start is mandatory
    	g_form.hideFieldMsg('change_request.work_start');
    	g_form.clearMessages();
    	g_form.setValue('state', 3);
    	var mandatoryWorkStart = g_form.isMandatory('change_request.work_start');
	

	if (mandatoryWorkStart) {
		// make sure work start is completed
		if (g_form.getValue('change_request.work_start') == ''){			
			g_form.showFieldMsg('change_request.work_start','Date is mandatory when closing implementation task.','error');
			g_form.addErrorMessage(new GwtMessage().getMessage(&quot;{0} must be entered to close the task&quot;, g_form.getLabelOf(&quot;change_request.work_start&quot;)));		
			return false;
		}					
	}

		//Call the UI Action and skip the 'onclick' function
	gsftSubmit(null, g_form.getFormElement(), 'close_change_task'); // 'Action name' set in UI Action header
}

	//Code that runs without 'onclick'
	//Ensure call to server-side function with no browser errors
	if(typeof window == 'undefined') {		
		runBusRuleCode();
	}

	
//Server-side function
function runBusRuleCode(){		
	if (current.wf_activity.name == 'Implement') {		
		// Implementation step in workflow requires work end timestamp
		var cr = new GlideRecord(&quot;change_request&quot;);
		cr.addQuery(&quot;sys_id&quot;, &quot;=&quot;, current.change_request);
		cr.addNullQuery('work_end');  // Do not overwrite existing work_end data
		cr.query();
		// find change request that is parent of the implementation task
		if (cr.next()) {
			// set the change request work end timestamp to current datetime (and proper timezone)
			var gdt = new GlideDateTime();
			gdt.setDisplayValue(gs.nowDateTime);
			cr.work_end.setValue(gdt);			
			cr.update();
		}
	}
		 
	current.state = 3;
	current.update();	
    action.setRedirectURL(current);
	
}
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;

&lt;h1 id=&quot;ui-policy&quot;&gt;UI Policy&lt;/h1&gt;

&lt;div class=&quot;highlighter-rouge&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;Short description: Make Change Work Times Mandatory
Table: Change Task [change_task]
Conditions: Short Description contains Implement AND State is Closed Complete
On load: false
Reverse if false: true

UI Policy Actions
change_request.work_start - Mandatory: True (Visible and Read only: Leave alone)
change_request.work_end - Mandatory: True (Visible and Read only: Leave alone)
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;

</description>
        <pubDate>Sat, 20 May 2017 12:30:00 +0000</pubDate>
        <link>http://tgbates.com/blog/2017/05/20/client-ui-action.html</link>
        <guid isPermaLink="true">http://tgbates.com/blog/2017/05/20/client-ui-action.html</guid>
        
        <category>servicenow</category>
        
        <category>javascript</category>
        
        
        <category>blog</category>
        
      </item>
    
      <item>
        <title>Orthodoxy, G.K. Chesterton</title>
        <description>&lt;h1 id=&quot;orthodoxy-completed-thursday-december-29th-2016&quot;&gt;&lt;em&gt;Orthodoxy&lt;/em&gt; completed Thursday, December 29th, 2016&lt;/h1&gt;

&lt;p&gt;I think I started this book in late 2015.  I had a paperback and was savoring it slowly and highlighting it.  I put it down in the swirl of changes that encompassed my life for the better part of this year, and picked up the Kindle version for free and read some from it every morning while I waited for the coffee.&lt;/p&gt;

&lt;p&gt;G.K. Chesterton recounts his intellectual and logical conversion to the orthodox Christian faith from his Unitarian background that devolved into atheism in his early years.
It is not in the style of 21th century conversion stories, about specific people, dates, and times, but does tell
his intellectual journey.  The obstacles he had to overcome mentally, logical fallacies commonly held by skeptics
and nonbelievers or spiritualists.  I read the second half of the book on my Kindle and highlighted it paragraphs at a time.&lt;/p&gt;

&lt;h1 id=&quot;some-samples-of-passages-i-highlighted&quot;&gt;Some samples of passages I highlighted:&lt;/h1&gt;

&lt;p&gt;“Rational optimism leads to stagnation: it is irrational optimism that leads to reform. Let me explain by using once more the parallel of patriotism. The man who is most likely to ruin the place he loves is exactly the man who loves it with a reason. The man who will improve the place is the man who loves it without a reason”&lt;/p&gt;

&lt;p&gt;“Can he hate [the world] enough to change it, and yet love it enough to think it worth changing?”&lt;/p&gt;

&lt;p&gt;“A woman loses a child even in having a child. All creation is separation. Birth is as solemn a parting as death.”&lt;/p&gt;

&lt;p&gt;“All roads lead to Rome; which is one reason why many people never get there.”&lt;/p&gt;

&lt;p&gt;“And it did for one wild moment cross my mind that, perhaps, those might not be the very best judges of the relation of religion to happiness who, by their own account, had neither one nor the other.”&lt;/p&gt;

&lt;p&gt;“Really, if Jesus of Nazareth was not Christ, He must have been Antichrist”&lt;/p&gt;

&lt;p&gt;“Let us follow for a moment the clue of the martyr and the suicide; and take the case of courage. No quality has ever so much addled the brains and tangled the definitions of merely rational sages. Courage is almost a contradiction in terms. It means a strong desire to live taking the form of a readiness to die. “He that will lose his life, the same shall save it,” is not a piece of mysticism for saints and heroes. It is a piece of everyday advice for sailors or mountaineers”&lt;/p&gt;

&lt;p&gt;“I am here only following the outlines of their argument, which consists in maintaining that man has been progressively more lenient, first to citizens, then to slaves, then to animals, and then (presumably) to plants. I think it wrong to sit on a man. Soon, I shall think it wrong to sit on a horse. Eventually (I suppose) I shall think it wrong to sit on a chair”&lt;/p&gt;

&lt;p&gt;“The chieftain chosen to be the friend of the people becomes the enemy of the people; the newspaper started to tell the truth now exists to prevent the truth being told”&lt;/p&gt;

&lt;p&gt;“Only the Christian Church can offer any rational objection to a complete confidence in the rich”&lt;/p&gt;

&lt;p&gt;“Man must have just enough faith in himself to have adventures, and just enough doubt of himself to enjoy them”&lt;/p&gt;

&lt;p&gt;“In the best Utopia, I must be prepared for the moral fall of any man in any position at any moment; especially for my fall from my position at this moment”&lt;/p&gt;

&lt;p&gt;“The man of the nineteenth century did not disbelieve in the Resurrection because his liberal Christianity allowed him to doubt it. He disbelieved in it because his very strict materialism did not allow him to believe it.”&lt;/p&gt;

&lt;p&gt;“If I vow to be faithful I must be cursed when I am unfaithful, or there is no fun in vowing”&lt;/p&gt;

&lt;p&gt;“Almost every contemporary proposal to bring freedom into the church is simply a proposal to bring tyranny into the world”&lt;/p&gt;

&lt;p&gt;Well, that is enough I guess.&lt;/p&gt;

&lt;p&gt;Chesterton’s logic is lucid throughout, his writing clear as crystal.  There are a few references to people and places contemporary to him that are unknown to me, people like Swinborne and places like Pimlico.  Most of these can
be passed by without missing his point.  His arguments are still forceful today in regards to the materialists (aka the New Atheists) and determinists, as well as the New Agers and lukewarm Christians.&lt;/p&gt;

&lt;p&gt;Chesterton, in some ways, foresaw the world in which we now find ourselves.  The threats of Islam, nihilism, euthanasia, watered-down lukewarm faith, radical environmentalism, the co-option of the media by the elites
He was a true liberal, a true democrat, one who believed in liberty and the common man.  I think of William F. Buckley’s statement that he would rather be governed by random people from the phonebook than the faculty at Harvard.
Much of what he writes comes across as good common sense, that rings true in the hearing, only put much better than we could have put it ourselves.  The way he can turn a phrase is remarkable.&lt;/p&gt;

&lt;p&gt;I have already read the &lt;em&gt;Everlasting Man&lt;/em&gt;, which, as I recall, concerned the idea of the monomyth and the way paganism pointed to Christianity or had some shard of the truth that was fully revealed in Christ.  I will see what notes I have on it and post them later.  &lt;em&gt;Heretics&lt;/em&gt; is the next Chesterton book on my reading list.&lt;/p&gt;

&lt;p&gt;–Thomas G Bates, &lt;br /&gt;
30 December 2016&lt;/p&gt;
</description>
        <pubDate>Fri, 30 Dec 2016 10:30:00 +0000</pubDate>
        <link>http://tgbates.com/blog/2016/12/30/orthodoxy-chesterton.html</link>
        <guid isPermaLink="true">http://tgbates.com/blog/2016/12/30/orthodoxy-chesterton.html</guid>
        
        <category>books</category>
        
        
        <category>blog</category>
        
      </item>
    
      <item>
        <title>Enemy, by K. Eason</title>
        <description>&lt;h1 id=&quot;enemy-by-k-eason-read-in-may-june-2016-timeframe&quot;&gt;Enemy, by K. Eason, read in May-June 2016 timeframe&lt;/h1&gt;

&lt;p&gt;This was available free on Amazon under the Kindle First program.  As part of moving, I used mass 
transit for a time.  This involved 3-4 hours per day.  In the Bay Area, daily commutes 
of 4 hours by car are not unusual.  Between switching from various modes of transport,
I might get 30 minutes or so of uninterrupted time to read.  I found light reading was
best for this.  A book that compelled note-taking or annotating or looking up terms
was not a good candidate for me to plow through during this time.  I could do a chapter
maybe but then would want some time to digest and ponder what I had read, instead of just going
straight into the next chapter.&lt;/p&gt;

&lt;p&gt;Anyway, &lt;em&gt;Enemy&lt;/em&gt; was a good candidate for reading during the ride to work.  It apparently was
the first book in the series, and was given away for free on Amazon Kindle to encourage readership in
the entire series.&lt;/p&gt;

&lt;p&gt;Some notes on &lt;em&gt;Enemy&lt;/em&gt;.  It was set in a fantasy world, in a style reminiscent of Glen Cook’s
&lt;em&gt;Black Company&lt;/em&gt; series, with gritty realism in the action and dialogue.  Magic and the gods
play a strong part, but this is not a formulaic Joseph Campbell monomyth hero story.
A couple of the main characters are outsiders from their culture.
The heroine, Snowdenaelikk (“Snow” for short, thankfully) seems derivative of a Forgotten Realms half-Drow, although I encountered no trademarked terms that anyone could be sued for using, in case any Wizards lawyers are reading this.  Does Wizards still own D&amp;amp;D?  I resisted the urge to look it up and continued working
on this review.  Veiko, the hero, is like an Inuit, who is also an outcast from his people.  They are both compelling adult characters.&lt;/p&gt;

&lt;p&gt;To me part of the fun of fantasy is learning about this alien world, so I enjoy strange terms,
names, places, etc.  &lt;em&gt;Enemy&lt;/em&gt; had these in a proper dose for me to keep me questioning and interested.&lt;/p&gt;

&lt;p&gt;I am writing months later, but recall feeling that there were some subtle allegorical elements.  These were well-handled, I didn’t feel I was being beaten over the head with them or that it disrupted my enjoyment of the story.  Maybe it instead helped me see the plight of these outsiders from a different viewpoint.&lt;br /&gt;
I think alienation is a part of the human condition that is common to everyone at some point or another.  At certain times and places, I feel like I am the outsider, and
at other times and places, I am the “us” against the “them”, doing to others what I would not want done to me.&lt;/p&gt;

&lt;p&gt;Eason does well in depicting this world, with vivid sensory details of how it looks,
smells, etc.  It was great to escape into this world while commuting.  I could see it
portrayed in an anime.  I eagerly flipped the pages on my Kindle app to find out what would
happen to the characters next.&lt;/p&gt;

&lt;p&gt;In summary, this book was good but nothing in it compelled me to
read the next in the series.  I will say something on why I generally don’t read Fantasy series
here (endless series seem to be the norm in Fantasy (following Tolkien) and Mystery (following Holmes).)&lt;/p&gt;

&lt;p&gt;I read some good advice from Gene Wolfe years ago for those who wanted to be writers.
Don’t read endless series.  And I’ve followed it pretty well.  I mean, I didn’t even
read the next book after finishing Frank Herbert’s &lt;em&gt;Dune&lt;/em&gt;, and that book to me was
mind-expanding at the time I read it in an intense way that is hard to replicate now
that I’m older.  I was afraid of being let down if I continued the series.  Generally the
best effort by the creator of the series is at the beginning and it deteriorates as it goes.  A friend
whose judgement I trusted in fiction was telling me about crazy things in the series
and I didn’t feel like continuing down that path.  I hadn’t heard of Gene Wolfe at the
time, but that is probably why I considered his advice to be good; I was already following
this rule on my own.  Which is probably the best advice, someone telling you to do
something that you know is right and maybe just giving you the validation you needed
to keep doing it.&lt;/p&gt;

&lt;p&gt;And now I hear that among all the other craziness of 2016, that J.K. Rowling wrote
another Harry Potter book?  Is this true, or is it “fake news” like the clickbait 
that most news websites scatter all around any of their presumably legitimate articles?  What happened, did a lot of people write and say they 
would kill themselves if she didn’t write another one?  That last book was such 
torture for me, twice as long as it needed to be, each book longer than the one
before it, and pointlessly so with the case of the last one, it spoiled all the
magic I had felt on first beginning the series.  I understand that some people run
marathons so they can say they accomplished it, and I can see the justification, it
&lt;em&gt;is&lt;/em&gt; an accomplishment.  However, reading a series of books to completion is nowhere
near the level of accomplishment.  Yes, it is time-consuming, but if there are 
moments in reading for entertainment where you have the same feeling as someone
who is about to puke from running, then maybe you should quit reading the book.
There won’t be a quiz on it!  Only binge-watching a TV show on Netflix is a lower
level of achievement.  Wait?  Are there trophies for this stuff?  If so, I’m missing
out.&lt;/p&gt;

&lt;p&gt;So, you’ve completed your “marathon” of reading, and now you have to read to completion again when the final, final book comes out!  I mean, I finished the 
marathon of Harry Potter and now you tell me I have to run another 10 miles!  Not
gonna happen.  I don’t even think I watched all the movies.  (Same for Star Wars
prequels and postquels, btw.)&lt;/p&gt;

&lt;p&gt;So, I am probably done with &lt;em&gt;Bones of Gods&lt;/em&gt;.  I also didn’t continue &lt;em&gt;The Malazan Book of the Fallen&lt;/em&gt;
after reading &lt;em&gt;Gardens of the Moon&lt;/em&gt;, so no knock on Eason’s &lt;em&gt;Enemy&lt;/em&gt;.  I apologize for interrupting
my review with a rant on endless series.  I will not even get started on &lt;em&gt;Song of Ice and Fire&lt;/em&gt;.
I suppose it is like buying art; wait until the painter is dead, then you know what possibilities
you are dealing with before you get started.  Oh wait, now series are completed or even resurrected after the
author is dead.  As the spiritualist told Houdini in the TV miniseries, “When you are dead we can make you say whatever we want.”
That is a topic for another day.&lt;/p&gt;

</description>
        <pubDate>Sun, 11 Dec 2016 11:30:00 +0000</pubDate>
        <link>http://tgbates.com/blog/2016/12/11/enemy-by-k-eason.html</link>
        <guid isPermaLink="true">http://tgbates.com/blog/2016/12/11/enemy-by-k-eason.html</guid>
        
        <category>books</category>
        
        
        <category>blog</category>
        
      </item>
    
      <item>
        <title>Books Read in 2016</title>
        <description>&lt;h1 id=&quot;books-i-read-in-2016&quot;&gt;Books I Read in 2016&lt;/h1&gt;

&lt;p&gt;&lt;img src=&quot;/assets/2016_Books_Read_Montage_v2.png&quot; alt=&quot;2016 Books Montage&quot; title=&quot;2016 Books Montage&quot; /&gt;&lt;/p&gt;

&lt;p&gt;This was a year of great change for me, what with moving across country to start a
new job.  As if that wasn’t enough change, I also went from the business world to
academia, so almost everything is different between the two.  One similarity between this job and the old, is that I have two weeks off for
Christmas.&lt;br /&gt;
I hope to spend some of the time before Christmas reflecting on the year gone by.  Part of that involves writing brief reviews of the books I have
read this year.  I know from experience that if I don’t write something when it is
still relatively fresh in my mind, I will forget what the book was about or what
impressions it gave me.&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;a href=&quot;/blog/2016/10/15/re-reading-gene-wolfe-the-book-of-the-new-sun-series.html&quot;&gt;&lt;em&gt;The Shadow of the Torturer&lt;/em&gt; and &lt;em&gt;Claw of the Conciliator&lt;/em&gt; by Gene Wolfe&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;/blog/2016/12/11/enemy-by-k-eason.html&quot;&gt;&lt;em&gt;Enemy&lt;/em&gt; by K. Eason&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;/blog/2016/12/30/orthodoxy-chesterton.html&quot;&gt;&lt;em&gt;Orthodoxy&lt;/em&gt; by G.K. Chesteron&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
        <pubDate>Sun, 11 Dec 2016 11:00:00 +0000</pubDate>
        <link>http://tgbates.com/blog/2016/12/11/books-read-in-2016.html</link>
        <guid isPermaLink="true">http://tgbates.com/blog/2016/12/11/books-read-in-2016.html</guid>
        
        <category>books</category>
        
        
        <category>blog</category>
        
      </item>
    
      <item>
        <title>Re-reading Gene Wolfe's The Book of the New Sun series</title>
        <description>&lt;h1 id=&quot;re-reading-the-book-of-the-new-sun&quot;&gt;Re-reading &lt;em&gt;The Book of the New Sun&lt;/em&gt;&lt;/h1&gt;

&lt;p&gt;I am in the process of re-reading Gene Wolfe’s &lt;em&gt;The Book of the New Sun&lt;/em&gt; series.
I first read &lt;em&gt;The Book of the New Sun&lt;/em&gt; (&lt;em&gt;TBotNS&lt;/em&gt;) series close to twenty years ago and it made me an instant Gene Wolfe fan. At the time I read mainly for the story and didn’t dwell too much at first on the parts I didn’t understand or the words that were too difficult or obscure.&lt;/p&gt;

&lt;p&gt;This time I am following the method Wolfe himself used when reading &lt;em&gt;The Lord of the Rings&lt;/em&gt;, only allowing myself one chapter per day. He describes this in my favorite essay on Tolkien’s classic, &lt;a href=&quot;http://www.scifiwright.com/2015/10/the-best-introduction-to-the-mountains-2/&quot;&gt;The Best Introduction to the Mountains&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;If you haven’t read it, go do so now!  I’ll wait.&lt;/p&gt;

&lt;h1 id=&quot;encounter-and-impression&quot;&gt;Encounter and Impression&lt;/h1&gt;

&lt;p&gt;I don’t recall exactly how I came across &lt;em&gt;The Shadow of the Torturer&lt;/em&gt; (&lt;em&gt;TSotT&lt;/em&gt;), the first in the series. Probably at the used paperback store in my small college town. This particular store no longer exists, but you might still have such a place near your home, with a lady reading at a desk who may greet you when you walk in, if she is not too engrossed in her book. “Romance” novels fill half the shelves. Pass the paint-by-numbers trash and head for the shelves marked “Science Fiction &amp;amp; Fantasy” on a hand-stenciled sign, and I hope you have a mystical encounter like mine.&lt;/p&gt;

&lt;p&gt;The Don Maitz cover would have hooked me. I recall reading an anecdote from a writer, maybe Glen Cook, or Wolfe himself, that a book distributor said he’d buy 20,000 copies of whatever book had that cover (pointing at a painting in the publisher’s office), without any idea of what the book was. We are not told not to judge books by their cover, but it is like the interview process–before you open your mouth, your appearance and how you present yourself have told your interviewers much. As with books, the external and internal may have no relation, but our minds are wired for making snap decisions and are biased in favor of caution.&lt;/p&gt;

&lt;p&gt;The Maitz cover depicted a caped, masked man with a sword. It had skulls. These were all fantasy cues, but the masked man stood on a thin metal platform that hinted at science fiction. Maybe the “World Fantasy Award Winner” over the title also helped me buy. My initial impression of the cover art would have been almost instantaneous and I have studied it more in writing this blog post than I did before the purchase or during my reading.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/THSHDWFTHT1980.jpg&quot; alt=&quot;The Shadow of the Torturer Cover by Don Maitz&quot; title=&quot;The Shadow of the Torturer Cover by Don Maitz&quot; /&gt; &lt;img src=&quot;/assets/THSHDWFTHT1980-2.jpg&quot; alt=&quot;The Shadow of the Torturer Cover by Don Maitz&quot; title=&quot;The Shadow of the Torturer Cover by Don Maitz&quot; /&gt;&lt;/p&gt;

&lt;h1 id=&quot;21st-century&quot;&gt;21st Century&lt;/h1&gt;

&lt;p&gt;At the time, I had not yet developed the habit of consulting Amazon reviews on my phone before purchasing a book. In fact, I didn’t have a smartphone, a flip phone, or even a laptop. Today my phone breaks the spell cast on me when I encounter a new book. I might make a note to read it later or come back another time, or get lost browsing the reviews on Amazon or Goodreads and forget about the book altogether. When we buy a book we are imagining that we are also buying the time to read it (I have seen this quote in a museum basement bookstore in San Mateo County.) I now must admit to myself that I do not have time to read all the books I would like. In case the mirror isn’t enough reminder, I keep a Halloween skull on my bookshelf as a memento mori.&lt;/p&gt;

&lt;p&gt;This new habit of checking my initial buy impulse saves me money and space on my shelves, but precludes that serendipitous meeting of reader and book that I have always believed in–that certain books come into our hands at times when we need them or are ready to read them. This can only happen in an analog world and cannot be replaced by algorithmic suggestions that market to us based on the hive mind. The digital simulacrum that will soon arrive may be good enough to fool most of us, and its nature is to shut us off from higher options.&lt;/p&gt;

&lt;p&gt;In Chapter VI of &lt;em&gt;TSotT&lt;/em&gt;, Severian hears about &lt;em&gt;The Book of Gold&lt;/em&gt; from Ultan the librarian. A child, upon finding this book, leaves children’s books behind and is ever after in the library, no matter where he is. I was one of those children who had been lost in the library years before encountering Wolfe. How many children today are lost to a device that borrows its design from slot machines instead?&lt;/p&gt;

&lt;p&gt;Returning to my first encounter with &lt;em&gt;TSotT&lt;/em&gt;, the blurbs on the first page and back, from Harlan Ellison, Gardner Dozois, and Ursula K. LeGuin are marketing, yes, but these blurbs seem quaint today, and what they wrote was true. These were almost like recommendations from friends, because my world was smaller then and I only knew a handful of people personally who had similar tastes in reading.&lt;/p&gt;

&lt;h1 id=&quot;poetry-and-prose&quot;&gt;Poetry and Prose&lt;/h1&gt;

&lt;p&gt;Before Chapter I: Resurrection and Death there is a verse of poetry:&lt;/p&gt;

&lt;p&gt;&lt;em&gt;A thousand ages in thy sight&lt;br /&gt;
  Are like an evening gone;&lt;br /&gt;
  Short as the watch that ends the night&lt;br /&gt;
  Before the rising sun.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;At the time neither the &lt;a href=&quot;http://newadvent.org/bible/psa089.htm&quot;&gt;89th (90th) Psalm&lt;/a&gt; nor the Isaac Watts hymn &lt;em&gt;&lt;a href=&quot;http://www.oremus.org/hymnal/o/o196.html&quot;&gt;O God Our Help in Ages Past&lt;/a&gt;&lt;/em&gt; were familiar to me from my Southern Baptist youth, although it can be found in one of the hymnals I used in the chapel of my childhood.  However, I have sung it many times since this initial encounter and have only come to this realization now as I write this essay.&lt;/p&gt;

&lt;p&gt;The first line of &lt;em&gt;TSotT&lt;/em&gt; reads, “It is possible I already had some presentiment of my future.”&lt;/p&gt;

&lt;p&gt;By now I had reached the decision point and paid the lady at the desk a buck seventy-five (half the cover price.) I’m sure I became lost in the book as soon as I began reading it in the comfort of my dormitory (this place is another that has been torn down, but unlike the bookstore, deservedly so.)&lt;/p&gt;

&lt;p&gt;The beginning of this book is so wonderful, I tried to imitate Wolfe and wrote something in his style in my notebook. What I specifically wrote is not memorable to me but only the impulse to produce something as beautiful and poetic. In Wolfe’s &lt;a href=&quot;http://www.scifiwright.com/2015/10/the-best-introduction-to-the-mountains-2/&quot;&gt;BITTM&lt;/a&gt; (which you should have read by now) he remarks that he wished there were more imitators of Tolkien, even if they are inferior to the original.&lt;/p&gt;

&lt;p&gt;I love the way Wolfe takes the familiar conventions of science fiction and fantasy, many of the tropes and stereotypical characters, and, from that surface similarity, takes us deeper into them, and higher. In &lt;em&gt;TSotT&lt;/em&gt; Ch. XXXIII “Five Legs”, Severian writes a short essay on the similarity between an executioner’s art and a writer’s, concluding that to feel himself an artist, he must add something of his own beyond satisfying the spectators/readers, the authority/publisher, and tradition. This is the kind of digression in the series that I enjoy more and more with each reading. Even in the first reading, when what I mostly cared about was what was going to happen next, they did not dissuade me from continuing.&lt;/p&gt;

&lt;h1 id=&quot;pilgrimage&quot;&gt;Pilgrimage&lt;/h1&gt;

&lt;p&gt;Many things confused me in my first reading, but I ploughed ahead and at least was able to follow the story most of the time. I was not a Catholic Christian at the time I first read &lt;em&gt;TBotNS&lt;/em&gt; so the different orders, saint names and feast days (like for Saint Catherine), the Conciliator and the relic known as The Claw of the Conciliator, these were over my head.  As I learned more about Tolkien and Wolfe I was impressed that such highly intelligent men could be faithful Catholics.  I had gotten this impression of Catholics as simple people who follow the teachings of a man in Rome the same way some Protestants blindly follow their own charismatic pastor or televangelist.  Encountering such intellects in the Church shattered that misconception, removing one of the the obstacles in my own spiritual journey to Rome.&lt;/p&gt;

&lt;p&gt;I think, especially when we are young and more capable of this, that certain books are able to expand our minds exponentially in the reading. I would not have thought myself young at the time, but looking back today, the boy who bought that book was indeed still a boy, who, in wrestling with ideas and concepts introduced in this series, grew and changed immensely.&lt;/p&gt;

&lt;p&gt;I do not know what became of my original copy. I have moved 4 times since that day, so it is possible I lost it in a move. Every time we cut ties to a place we lose an unseen part of ourselves; it seems only fitting that this be represented by visible loss as well.
It was a paperback printed almost 40 years ago, and these generally do not hold up well. I replaced it with Shadow &amp;amp; Claw which contains the first two books of the series. I annotated it and lent it out, never to be returned. Then I bought another Shadow &amp;amp; Claw (the one I am reading and annotating now) and a Timescape/Pocket Books edition of The Shadow of the Torturer to replace my original. It rests in front of my keyboard as I write these words, and I will return it to my glass-fronted bookcase where I keep my most treasured books when I post this entry.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/shadow_and_claw.jpg&quot; alt=&quot;Shadow &amp;amp; Claw&quot; title=&quot;Shadow &amp;amp; Claw cover&quot; /&gt;&lt;/p&gt;

&lt;h1 id=&quot;memory-and-truth&quot;&gt;Memory and Truth&lt;/h1&gt;

&lt;p&gt;Unlike Severian, I do not claim to have perfect recall. It is possible that I didn’t encounter &lt;em&gt;TSotT&lt;/em&gt; this way, but that a friend loaned me a copy or that i came across it in the college library. The latter is the least likely possibility. I distinctly recall my purchase of &lt;em&gt;Sword of the Lictor&lt;/em&gt; at this used bookstore, so to me, it seems most likely that I found &lt;em&gt;TSotT&lt;/em&gt; there.&lt;/p&gt;

&lt;p&gt;As I continue the re-reading of the series in preparation for reading &lt;em&gt;The Book of the Long Sun&lt;/em&gt;, I may post more thoughts and memories here, but I make no promises.  I must admit that this simple post has taken me over a month to write, and several drafts.  I only now feel I am able to turn it out of the nest and let it fall or fly on its own.&lt;/p&gt;

&lt;p&gt;This website is for my own pleasure and I write here mainly to avoid the more serious writing projects that I should be pursuing (One concerned Saint Teresa of Avila, whose feast is today), or as a break from them.  In the meantime, I recommend you read a good book!&lt;/p&gt;

&lt;p&gt;–Thomas G Bates, &lt;br /&gt;
15 October 2016&lt;/p&gt;
</description>
        <pubDate>Sat, 15 Oct 2016 12:00:00 +0000</pubDate>
        <link>http://tgbates.com/blog/2016/10/15/re-reading-gene-wolfe-the-book-of-the-new-sun-series.html</link>
        <guid isPermaLink="true">http://tgbates.com/blog/2016/10/15/re-reading-gene-wolfe-the-book-of-the-new-sun-series.html</guid>
        
        <category>books</category>
        
        
        <category>blog</category>
        
      </item>
    
      <item>
        <title>Adding Disqus Comments Capability</title>
        <description>&lt;h1 id=&quot;adding-disqus-comments-capability&quot;&gt;Adding Disqus Comments Capability&lt;/h1&gt;
&lt;p&gt;I looked at some different methods for supporting comments without resorting to Disqus but one only worked for commenters with a github account.  Another required a script on the server.
I do not know how many potential commenters are out there so I did not want to spend a lot of time on adding comments; Disqus was a solution that did not require a big time commitment.&lt;br /&gt;
If you do not want to use disqus but want to comment, you are free to contact me some other way.  My email, github, and twitter handles are below.&lt;/p&gt;
</description>
        <pubDate>Thu, 06 Oct 2016 14:00:00 +0000</pubDate>
        <link>http://tgbates.com/blog/2016/10/06/adding-disqus-comments-capability.html</link>
        <guid isPermaLink="true">http://tgbates.com/blog/2016/10/06/adding-disqus-comments-capability.html</guid>
        
        <category>javascript</category>
        
        
        <category>blog</category>
        
      </item>
    
      <item>
        <title>ServiceNow Function for Checking an Email Whitelist Table</title>
        <description>&lt;h1 id=&quot;servicenow-function-for-checking-an-email-whitelist-table&quot;&gt;ServiceNow: Function for Checking an Email Whitelist Table&lt;/h1&gt;
&lt;p&gt;Where I work now we accept incidents submitted via email from internal and external customers.
I recently had a requirement for a new assignment group that only wanted to accept incidents from a short list of domains.  Emails submitted to this group from other domains would not be processed into incidents.&lt;/p&gt;

&lt;p&gt;We had an existing script include and inbound action to process incoming emails already, and an easy way to handle this would be with some if statements inside the inbound action.  However, this would not be easy to maintain or update if another group wanted a similar restriction down the road.&lt;/p&gt;

&lt;p&gt;So I set up an email whitelist table with a reference field to the group table, a string field for the domain, and an active flag to turn off the rule if needed.
&lt;img src=&quot;/assets/email_whitelist.png&quot; alt=&quot;Email Whitelist table&quot; title=&quot;Email Whitelist table&quot; /&gt;&lt;/p&gt;

&lt;p&gt;I added a function to the existing script include to check this table.
If the assignment group has an active record (or multiple records), check the domains.  If there is a matching whitelist rule, allow the incident to be created.
If a record isn’t found, allow the incident creation as normal.&lt;/p&gt;

&lt;div class=&quot;language-javascript highlighter-rouge&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;	&lt;span class=&quot;nx&quot;&gt;checkWhitelist&lt;/span&gt;&lt;span class=&quot;err&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;function&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;assignment_grp&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;sender_domain&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
		&lt;span class=&quot;c1&quot;&gt;// assignment_grp = reference to sys_user_group table&lt;/span&gt;
		&lt;span class=&quot;c1&quot;&gt;// sender_domain = string&lt;/span&gt;
		&lt;span class=&quot;c1&quot;&gt;// lookup whitelist table and if there is an active entry, apply it&lt;/span&gt;
		&lt;span class=&quot;c1&quot;&gt;// if no entry returned, then allow any sender&lt;/span&gt;
		
		&lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;gr&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;GlideRecord&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;'u_email_whitelist'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
		&lt;span class=&quot;nx&quot;&gt;gr&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;addQuery&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;'u_group'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;assignment_grp&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;		
		&lt;span class=&quot;nx&quot;&gt;gr&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;addQuery&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;'u_active'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;kc&quot;&gt;true&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;  &lt;span class=&quot;c1&quot;&gt;// if entry has been deactivated ignore it		&lt;/span&gt;
		&lt;span class=&quot;nx&quot;&gt;gr&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;query&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;();&lt;/span&gt;
		&lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;grp_flag&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;kc&quot;&gt;false&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;c1&quot;&gt;// at least one active entry on whitelist table?&lt;/span&gt;
		&lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;match_flag&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;kc&quot;&gt;false&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;  &lt;span class=&quot;c1&quot;&gt;// matching domain for assignment group on whitelist?&lt;/span&gt;
		&lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;i&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
		&lt;span class=&quot;k&quot;&gt;while&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;gr&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;next&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;!&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;match_flag&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;))&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt; &lt;span class=&quot;c1&quot;&gt;// the group has at least one entry on the table but no match found yet&lt;/span&gt;
			&lt;span class=&quot;nx&quot;&gt;i&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;++&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
			&lt;span class=&quot;nx&quot;&gt;grp_flag&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;kc&quot;&gt;true&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;  &lt;span class=&quot;c1&quot;&gt;// group entry on whitelist table&lt;/span&gt;
			&lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;gr&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;u_domain&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;==&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;sender_domain&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
				&lt;span class=&quot;nx&quot;&gt;match_flag&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;kc&quot;&gt;true&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;  &lt;span class=&quot;c1&quot;&gt;// sender allowed on whitelist&lt;/span&gt;
			&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
			&lt;span class=&quot;k&quot;&gt;else&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
				&lt;span class=&quot;nx&quot;&gt;gs&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;log&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;'checkWhitelist - no match for '&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;gr&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;u_group&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;name&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;' : '&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;gr&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;u_domain&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
				&lt;span class=&quot;c1&quot;&gt;// sender not a match, keep looping through all matching records&lt;/span&gt;
			&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;		
		&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
		&lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;grp_flag&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;   &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt; &lt;span class=&quot;c1&quot;&gt;// both entries good&lt;/span&gt;
			&lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;match_flag&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
				&lt;span class=&quot;nx&quot;&gt;gs&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;log&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;'checkWhitelist - match for '&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;gr&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;u_group&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;name&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;' and '&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;gr&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;u_domain&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
				&lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;kc&quot;&gt;true&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;c1&quot;&gt;// there is a match and that's ok&lt;/span&gt;
			&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
			&lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;kc&quot;&gt;false&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;c1&quot;&gt;// there wasn't a match&lt;/span&gt;
		&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
		&lt;span class=&quot;k&quot;&gt;else&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
			&lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;kc&quot;&gt;true&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;c1&quot;&gt;// there wasn't a match for the grp so it's ok to accept from any domain&lt;/span&gt;
		&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;		
	&lt;span class=&quot;p&quot;&gt;},&lt;/span&gt;
	
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;To whitelist new domains we only need to add another entry to the whitelist table.  The same goes for a new assignment group with a similar requirement.&lt;/p&gt;
</description>
        <pubDate>Fri, 30 Sep 2016 14:00:00 +0000</pubDate>
        <link>http://tgbates.com/servicenow/2016/09/30/function-for-checking-an-email-whitelist-table.html</link>
        <guid isPermaLink="true">http://tgbates.com/servicenow/2016/09/30/function-for-checking-an-email-whitelist-table.html</guid>
        
        <category>servicenow</category>
        
        <category>javascript</category>
        
        
        <category>servicenow</category>
        
      </item>
    
      <item>
        <title>I Found Some of My Book Reviews from Last Century</title>
        <description>&lt;p&gt;I read a lot of books when I was in college.  I wish I had kept better records and wrote more about what I liked about them, what I learned, how they made me feel, alas.
However, I did come across some notes in a bunch of old files that I have copied from old computer to new computer at least three times.
I can’‘t call these reviews but they are all I wrote at the time.  These were mostly library books (dead tree, not digital, denizens of the 21st century), so I have no Kindle highlights or annotations to look up.
If you want to remember something 20 years from now, write it down!&lt;/p&gt;

&lt;hr /&gt;

&lt;h1 id=&quot;neuromancer&quot;&gt;Neuromancer&lt;/h1&gt;
&lt;p&gt;by William Gibson&lt;/p&gt;

&lt;p&gt;The Cyberpunk book that started it all.  Gibson’s 1984 version of the future
is anarchistic and gothic and exhilirating.  The AI issue receives treatment
as basically, if the AI’s smart enough to think, it’s smart enough to get
Out of Control (Kevin Kelly) and does just that.&lt;/p&gt;

&lt;hr /&gt;

&lt;h1 id=&quot;out-of-control&quot;&gt;Out of Control&lt;/h1&gt;
&lt;p&gt;by Kevin Kelly&lt;/p&gt;

&lt;p&gt;A must-read book, even if all you read is the bibliography, which contains
tons of books that consider the issues of AI, Complexity, Science, etc.
Kevin Kelly asks a lot of good questions that still have me thinking.
Read it again.&lt;/p&gt;

&lt;p&gt;note: I did not read it again.  However, the issues he raised are now in our daily news feeds. -tgbates, 2016&lt;/p&gt;

&lt;hr /&gt;

&lt;h1 id=&quot;count-zero--spoiler-alert&quot;&gt;Count Zero – SPOILER ALERT&lt;/h1&gt;
&lt;p&gt;by William Gibson 
Is the 2nd book in the trilogy (I guess it’s
a trilogy).  Looks at the Projects in the future, has a neato little hacker
punk who dresses very hackishly, but doesn’t know what’s going on.  I liked
the Samurai more by the end than I did at first.  He finally decided he was
tired of getting shot up and settled down with his dead brother’s girlfriend.&lt;/p&gt;

&lt;hr /&gt;

&lt;h1 id=&quot;the-difference-engine&quot;&gt;The Difference Engine&lt;/h1&gt;
&lt;p&gt;by William Gibson and Bruce Sterling
  Book concerns England in the 1850’s and on to 1905.  Sybil Gerard, daughter
of Walter Gerard, who started a revolutionary movement but was killed, starts
off as the main character, a typical cyberpunk character.  She doesn’t know
much about the Engines or Kinotropes, but has a mentor in Mick Ralley, who
does.  Unfortunately, he is killed by a Texas Ranger sent out to kill Sam
Houston.
  Things switch to Edward Mallory, a scientist digging up dinosaur bones.
He shows the reader a scientist with integrity, who can kick butt, too.
He’s the most awesome scientist I’ve ever seen in a book.  Maybe that game
with the scientist fighting the space marines isn’t so far-out.  Of course,
Mallory has been in Wyoming with the savages, not in a lab.
  TDE covers topics similar to Out of Control.  The Science of Complexity is
covered.  Examples:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;p.183 Flocking is discussed&lt;/li&gt;
  &lt;li&gt;p.211 The use of engines for simulations to observe how things work, etc.&lt;/li&gt;
  &lt;li&gt;p.223-224 Chaos theory explored&lt;/li&gt;
  &lt;li&gt;p.243-245 Vivid picture of London in anarchy&lt;/li&gt;
  &lt;li&gt;p.302 View of history as progress opposed by the Catastrophe theory&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In the book, Inspector Ebenezer Fraser is an awesome guy, working in the
special services (your typical secret govt agency)
  There are some Japanese there, ready to reject their language in favor of
English so that they can be like the English.
  When the evil antagonist disrupts their sister’s wedding, Mallory and 2 of
his brothers, along with Fraser, decide to take matters into their own hands,
there being a general state of anarchy in London.&lt;/p&gt;

&lt;hr /&gt;

&lt;h1 id=&quot;the-hacker-crackdown&quot;&gt;The Hacker Crackdown:&lt;/h1&gt;
&lt;p&gt;by Bruce Sterling&lt;/p&gt;

&lt;p&gt;Looks at several sides of hacking, including law enforcement, hackers, and
civil liberties.  Makes me side with civil liberties when I think about
people busting in and taking my computer, disks, everything away and never
giving them back, never going to trial, anything.&lt;/p&gt;

&lt;hr /&gt;

&lt;h1 id=&quot;the-cuckoos-egg&quot;&gt;The Cuckoo’s Egg&lt;/h1&gt;
&lt;p&gt;by Clifford Stoll&lt;/p&gt;

&lt;p&gt;His story of catching the cracker who broke in to many different computers
from Germany.  He calls him all kinds of nasty names, talks about how these
people are destroying the openness of the net, but also recounts how he
stole monitors and printers and everything else to try to catch the guy,
how he got the FBI and everybody worked up to do something about it instead
of handling it himself, etc.  Plus he was a hippy type, cozying up with the
feds.  Even his own friends would be worried about what he was doing.&lt;/p&gt;

&lt;hr /&gt;

&lt;h1 id=&quot;the-meaning-of-it-all--thoughts-of-a-citizen-scientist&quot;&gt;The Meaning Of It All:  Thoughts of a Citizen-Scientist&lt;/h1&gt;
&lt;p&gt;by Richard P. Feynman&lt;/p&gt;

&lt;p&gt;A short book consisting of 3 lectures he gave in 1963.  I’d say a must-read.
  Talks about how science is never certain.  If it is certain, then it is
prejudiced about new breakthroughs, etc.  A scientist can say, this is
probably what happens, but he isn’t 100% certain.&lt;/p&gt;

&lt;p&gt;note: I had a note to finish this review but never did. -tgbates, 2016&lt;/p&gt;

&lt;hr /&gt;
</description>
        <pubDate>Wed, 21 Sep 2016 14:00:00 +0000</pubDate>
        <link>http://tgbates.com/books/2016/09/21/i-found-some-of-my-book-reviews-from-last-century.html</link>
        <guid isPermaLink="true">http://tgbates.com/books/2016/09/21/i-found-some-of-my-book-reviews-from-last-century.html</guid>
        
        <category>books</category>
        
        
        <category>books</category>
        
      </item>
    
      <item>
        <title>ServiceNow SNUG</title>
        <description>&lt;h2 id=&quot;norcal-snug&quot;&gt;NorCal SNUG&lt;/h2&gt;

&lt;p&gt;Yesterday I attended the &lt;a href=&quot;https://community.servicenow.com/events/2696&quot;&gt;NorCal SNUG at ServiceNow HQ in Santa Clara&lt;/a&gt;.&lt;br /&gt;
When I was in Alabama I hadn’t attended any SNUGs in Birmingham, but this one was only a few miles from my new home.&lt;/p&gt;

&lt;h2 id=&quot;chuck-tomasi&quot;&gt;Chuck Tomasi&lt;/h2&gt;

&lt;p&gt;I enjoyed getting a chance to chat with Chuck Tomasi about the &lt;a href=&quot;https://youtu.be/z2Ebuih3srw&quot;&gt;ServiceNow Live Coding Happy Hour&lt;/a&gt; and other videos.  I followed along with this one and got the Activate/Deactivate working.  Our users aren’t necessarily employees so we have to do deactivation differently than relying on LDAP refresh dates as a surefire indicator.  Using a script include means I can have these as buttons or call the deactivate methods from a script as well.
Later, during Chuck’s talk on ServiceNow as a Development Platform, I learned he had been driving all day to get there so I really appreciated that.&lt;/p&gt;

&lt;h2 id=&quot;istanbul&quot;&gt;Istanbul&lt;/h2&gt;

&lt;p&gt;We got a sneak peek at Istanbul (not Constantinople), the next major release, which should be available before the end of the year.  Next year will be Jakarta, (not Jerusalem).  The CAB workbench looked useful as a way to replace the old multi-hour meetings I used to dial into.
I liked the automated agenda (the system at my previous company involved browsing for changes that were awaiting approval and could last 3 hours or more), and especially the idea of getting a notification when your time to speak is approaching!&lt;/p&gt;

&lt;h2 id=&quot;asset-life-cycle-management&quot;&gt;Asset Life Cycle Management&lt;/h2&gt;

&lt;p&gt;KPMG &amp;amp; Ebay presented their case study on asset life cycle management that included integration with SAP.  That would be a major challenge and it sounds like they devoted the resources necessary to tackle it.&lt;/p&gt;

&lt;h2 id=&quot;organizational-change-management&quot;&gt;Organizational Change Management&lt;/h2&gt;

&lt;p&gt;We gathered in small group discussion to talk about our own experiences.  Incidents submitted via email still seems to be a challenge for everyone.
At my old company, we had incident creation via email disabled at Go-Live, cutting that off at the pass.  However, where I am now, we have to allow email incidents even from outside our domain, due to the nature of our business.  Incidents are about 10% spam as a result.  I implemented a business rule that might reduce it a little but am still waiting to see the results.&lt;/p&gt;

&lt;h2 id=&quot;mobile-and-barcode&quot;&gt;Mobile and Barcode&lt;/h2&gt;
&lt;p&gt;I also learned about the new barcode field type and successfully tested it in my dev instance.  Now any mobile device can be used to scan barcodes directly into ServiceNow, great for asset management and saving the expense of those bulky scanners I used to deal with at my old company.  I set up a mobile page on my dev instance with a barcode field and scanned some of my books.  The next step will be to retrieve the title and author information.&lt;/p&gt;

&lt;h2 id=&quot;cancel-requested-item-ui-action&quot;&gt;Cancel Requested Item UI Action&lt;/h2&gt;
&lt;p&gt;I’ve added a few more ServiceNow scripts to my snow repo, like the &lt;a href=&quot;https://github.com/tgbates/snow/blob/master/ui_actions/Cancel_Requested_Item.js&quot;&gt;Cancel Requested Item UI Action&lt;/a&gt;.&lt;/p&gt;

&lt;h2 id=&quot;impressions&quot;&gt;Impressions&lt;/h2&gt;
&lt;p&gt;I thought it was a great experience attending the SNUG, and I enjoyed getting to meet people and hear about how they are using ServiceNow.  And it included two meals!  Who says TANSTAAFL?&lt;/p&gt;

</description>
        <pubDate>Wed, 24 Aug 2016 02:00:00 +0000</pubDate>
        <link>http://tgbates.com/servicenow/2016/08/24/servicenow-snug.html</link>
        <guid isPermaLink="true">http://tgbates.com/servicenow/2016/08/24/servicenow-snug.html</guid>
        
        <category>servicenow</category>
        
        <category>books</category>
        
        
        <category>servicenow</category>
        
      </item>
    
      <item>
        <title>Upgrade from Linux Mint 17.1 MATE to 17.3</title>
        <description>&lt;h2 id=&quot;update&quot;&gt;Update&lt;/h2&gt;

&lt;p&gt;I moved West to start a new job and during the chaos wasn’t updating my blog.&lt;br /&gt;
I’m getting settled in and have been learning a lot so I should be able to throw up some more content here.&lt;br /&gt;
I have also posted &lt;a href=&quot;https://github.com/tgbates/snow&quot;&gt;a few more ServiceNow scripts in my snow repo.&lt;/a&gt;&lt;/p&gt;

&lt;h2 id=&quot;new-office&quot;&gt;New Office&lt;/h2&gt;

&lt;p&gt;I had my desktop packed up until I could set up an office at my new place.
After unpacking it, reinstalling my hard drives and plugging in my monitors, I couldn’t get them working right.
Either my primary monitor would work with the right resolution but the secondary wouldn’t display anything,
or the secondary would only be a clone of the primary, which was at such a low resolution it was one step above useless.
I also have to admit that at one point I thought I needed an adapter (was I secretly wishing for an excuse to make my first trip ever to a Fry’s?) when I really only needed my DVI cable which was tangled up with all my other cables.
And I also plugged in my DVI and HDMI into different video cards (my previous setting, if documented with a picture in Evernote before I packed for the move, wasn’t consulted).&lt;/p&gt;

&lt;h2 id=&quot;emptying-the-trash&quot;&gt;Emptying the Trash&lt;/h2&gt;

&lt;p&gt;Oh, I forgot to mention that I was doing some last-minute backups before the move and managed to fill up /dev/sda1.&lt;/p&gt;

&lt;p&gt;Before worrying about the dual monitors I had to boot to a command prompt and clean out the trash.
&lt;a href=&quot;https://forums.linuxmint.com/viewtopic.php?f=90&amp;amp;t=225222#p1187583&quot;&gt;I found a little tip on how to prevent that from happening again.&lt;/a&gt;&lt;/p&gt;

&lt;h2 id=&quot;black-screens-and-elephants&quot;&gt;Black Screens and Elephants&lt;/h2&gt;

&lt;p&gt;I looked at my notes on the last time I had this situation back in 2015.&lt;/p&gt;

&lt;p&gt;&lt;code class=&quot;highlighter-rouge&quot;&gt;   ctrl+alt+f1 to get to terminal &lt;/code&gt;&lt;br /&gt;
&lt;code class=&quot;highlighter-rouge&quot;&gt;   $ sudo service mdm stop &lt;/code&gt;&lt;br /&gt;
&lt;code class=&quot;highlighter-rouge&quot;&gt;   $ sudo X -configure &lt;/code&gt;&lt;br /&gt;
&lt;code class=&quot;highlighter-rouge&quot;&gt;   $ sudo service mdm start &lt;/code&gt;&lt;br /&gt;&lt;/p&gt;

&lt;p&gt;This generated a new xorg.conf file that I could move to /etc/X11 but all it really accomplished for me was getting resolution right for 1 monitor and nothing for the secondary monitor.  After having two monitors, you can’t go back to only one.&lt;/p&gt;

&lt;p&gt;I’m sorry for not having more screenshots but I wasn’t in a position to capture anything but text and will refrain from pasting huge blocks of output.&lt;/p&gt;

&lt;p&gt;During this monitor process (I will skip recounting my dead ends playing with cvt, xrandr, get-edid | parse-edid, modelines, and editing xorg.conf), 
I had to blindly resort to the &lt;a href=&quot;http://www.howtogeek.com/119127/use-the-magic-sysrq-key-on-linux-to-fix-frozen-x-servers-cleanly-reboot-and-run-other-low-level-commands/&quot;&gt;Raising Elephants Is So Utterly (Obtuse/Boring) trick a few times.&lt;/a&gt;&lt;/p&gt;

&lt;h2 id=&quot;time-to-upgrade&quot;&gt;Time to Upgrade&lt;/h2&gt;

&lt;p&gt;By this point I had been flailing around for about 3 hours, so I decided it was time to try something else.
Upgrading to Mint 17.3 wasn’t really on the weekend agenda, but it did promise better multi-monitor support, so it was worth a shot.
I didn’t see how it could make things worse, and it was only a minor upgrade and was quick and painless.  This is why I installed Linux Mint in the first place!
It wasn’t a silver bullet, but at least it helped an aggravating problem I was having with windows missing their menu bars and spawning partially off my screen in the top left corner.&lt;/p&gt;

&lt;h2 id=&quot;use-the-force&quot;&gt;Use the –force&lt;/h2&gt;

&lt;p&gt;After that I thought updating my graphics drivers might help.
Another tip: If you use proprietary graphics drivers downloaded from AMD’s website and –force the installation you will break synaptic and have to fix it.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;BAD IDEA&lt;/strong&gt;—&amp;gt; &lt;code class=&quot;highlighter-rouge&quot;&gt;   $ sudo ./amd-driver-installer-14.20-x86.x86_64.run --force &lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Worse than that, I broke X completely when I uninstalled fglrx from the command line.&lt;/p&gt;

&lt;p&gt;When I saw the results of that I reinstalled it but by then it was time to leave for church and I didn’t have time to try it out.&lt;/p&gt;

&lt;p&gt;…a couple hours later, I booted up and the monitors were detected (they had been “unknown” all this time in Mint) and I was able to set up resolutions, set primary/secondary, get my panel set up correctly, etc.&lt;/p&gt;

&lt;h2 id=&quot;fixing-synaptic&quot;&gt;Fixing Synaptic&lt;/h2&gt;

&lt;p&gt;Synaptic couldn’t heal itself and Warned &lt;br /&gt;
    &lt;code class=&quot;highlighter-rouge&quot;&gt;Uninstall : inst_path_default or inst_path_override does not exist in /etc/ati.&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/20160815_monitorsb.jpg&quot; alt=&quot;broken Synaptic&quot; title=&quot;broken synaptic&quot; /&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://bugs.launchpad.net/ubuntu/+source/fglrx-installer/+bug/565407&quot;&gt;I found a bug workaround posted that pointed a way to the solution.&lt;/a&gt;&lt;/p&gt;

&lt;h2 id=&quot;use-the-force-again-and-reinstall-the-amd-driver&quot;&gt;Use the –force again and Reinstall the AMD driver!&lt;/h2&gt;

&lt;p&gt;&lt;code class=&quot;highlighter-rouge&quot;&gt;   $ sudo ./amd-driver-installer-14.20-x86.x86_64.run --force &lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;code class=&quot;highlighter-rouge&quot;&gt;   $ sudo apt-get -f install &lt;/code&gt;&lt;/p&gt;

&lt;p&gt;…&lt;/p&gt;

&lt;p&gt;&lt;code class=&quot;highlighter-rouge&quot;&gt;   restore of system environment completed &lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Now Synaptic is working properly again.&lt;/p&gt;

&lt;h2 id=&quot;lessons-learned&quot;&gt;Lessons Learned&lt;/h2&gt;

&lt;ul&gt;
  &lt;li&gt;I should have been more patient.  Impatience could have led to reinstalling my hard drives incorrectly, along with the incorrect initial monitor setup. I’m fairly certain I took a picture of my cables before the move but didn’t take the time to look for it.&lt;/li&gt;
  &lt;li&gt;I should have uninstalled fglrx properly before installing the AMD driver (without using the –force option, which the AMD installer recommended not using).&lt;/li&gt;
  &lt;li&gt;I didn’t always think before I acted when running commands.  This is only my personal computer, but it is still my most important personal computer, and a useful tool that I don’t want to break irreparably.&lt;/li&gt;
  &lt;li&gt;I ended up spending hours on this when maybe I could have only had to uninstall and reinstall fglrx if plugging the cables in right hadn’t prevented this from happening in the first place.&lt;/li&gt;
&lt;/ul&gt;

</description>
        <pubDate>Wed, 17 Aug 2016 14:00:00 +0000</pubDate>
        <link>http://tgbates.com/linux/2016/08/17/linux-mint-17-3-upgrade.html</link>
        <guid isPermaLink="true">http://tgbates.com/linux/2016/08/17/linux-mint-17-3-upgrade.html</guid>
        
        <category>linux</category>
        
        <category>mint</category>
        
        <category>servicenow</category>
        
        
        <category>linux</category>
        
      </item>
    
  </channel>
</rss>
