22 January 2018

existence | resolutions

Resolutions are interesting things. They're traditionally a goal wherein the person declaring said resolution wants to better themselves. "I resolve to exercise more." "I'm gonna take more vacations." "I'm going to lose 50 pounds." The problem with these stated goals is that they are typically spur of the moment declarations with no plan. Now I won't deny that resolutions made in such a manner can succeed, but most fail because there's no plan on how to achieve said goal and most people lose the drive to continue to that goal when they have to put too much thought into it.

I'm not here to say I've failed. My goal is still to improve my health and wellness through exercise and replacing obsessive gaming habits. However, I did fall victim to the age-old failing to plan is planning to fail. And the past several weeks I've merely replaced obsessive gaming with copious YouTube watching. It's made me antsy during the week and then when the weekend arrives, all I want to do is play video games. So I've actually made it worse by saying no weekday gaming. I've managed to maintain my resolve thus far but eventually, it's going to be more problematic than a help. It also doesn't help that I was really sick for 4 days and have been recovering for the following week or two.

Which leads me to an actual plan. I decided my initial plan is to break up the evenings into 1-hour blocks for various activities. The first hour will be my productivity hour, like updating my blog every Monday, organizing my room Tuesday evenings, etc. Then I have a 1-hour block set aside for a walk. I won't necessarily walk that whole hour, but it will be allocated nevertheless. Then I've left a 1-hour free time block, which will likely be filled with gaming many evenings. But it's restricted to that hour. My last hour of the evening will be for winding down and getting to bed. I might include some amount of reading in the wind-down period provided it doesn't rouse my energy levels again. Weekends will likely remain fairly flexible with a tentative plan made each week for the coming weekend. This weekend I plan on spending Saturday morning at Disneyland wandering and enjoying various attractions. Because Disneyland is part of my exercise plan. :D

It's not a fail-proof plan, but it's at least 10% of a plan. And speaking of planning, that's part of my schedule now too. Each Sunday I have a review and planning session scheduled to make sure I stay on track. I figured it would be good to take an assessment of what works and what doesn't to make adjustments as needed.

Until next time:
Work smart. Play hard. Sleep well.

01 January 2018

existence | introspection

/EXISTENCE
I'm pretty hard on myself. And I don't mean physically. I'd probably feel a lot better if I was more physical. No, I mentally beat myself down. A lot. I can't tell you the number of times the phrases, "You're an idiot", "You're a fat, lazy ass", and various other permutations of self-deprecation goes through my head per day. My method of choice to drown out that voice is to play video games. But it seems that voice has just used that as additional fuel to mock me for playing too much. It's a horrible cycle. But for the past week or so, my two best friends left their computers behind as they went to visit family for Christmas and we were each left to our own devices for entertainment. Combine that with some pretty slow days at work, and we have a perfect recipe for "Peter gets lost in his thoughts" time. And boy did I get lost.

A nagging consideration for years has been to completely give up video games. Remove them from all mobile devices, sell all consoles, sell all discs, have someone change my Steam password (and not lose said password), and just cold-turkey walk away from video games as a whole. I did that with Facebook games, so I figured I could do that with video games as a whole. And then my rational and logical thoughts kicked in and warned me against such a drastic action. For me, it would be social suicide to do that. Video games aren't just an escape, they're my social circle. Abandoning that would leave me with nothing and new spiral would form and probably take me down other dark paths. So I kept playing games.

A lot. And it's become a bad habit. Which through a series of conversations with a friend led me to this book about habits. I hadn't even finished it and I made a decision to start changing... no, replacing habits with ones that I benefit from. And when I thought about it, video games are my core and driving habit. But like I said, a complete firesale and removal of video games from my life would be social suicide. So instead I made the decision to reduce how much I play video games and restrict what games I play. The plan is to cut out Minecraft entirely and mostly only play co-op games with my friends. Playtime will also be restricted to the weekends so that I actually get things done during the week. As the book illustrates, habits can't be dropped, they need to be replaced. So in the void, I will put reading, blogging, and walking. I may need to be more specific with my schedule, but that can be determined on the fly.

This plan starts with 2018. This plan starts now.

Until next time:
Work smart. Play hard. Sleep well.

05 June 2017

existence | inspiration

/EXISTENCE
This blog seems to have melted down and become something new over time and I'm thinking that this is more of a personal blog than professional. You can find my professional ramblings about those damn checkboxes over here. Sure, some of my professional life will seep in here, but it's really about me and what I do in my spare time. Most of my spare time for the past 4 years has been spent playing video games with friends. I've enjoyed it thoroughly but it's not really that interesting to talk about. I mean we're pretty juvenile in our humor and we rarely have any moments of insight. That said, we do have some on occasion and I may just share those here.

But I digress. I'm here to talk about inspiration. Inspiration can come from many sources. One more recently for me was hitting a weight that isn't good for my height or age. But negative inspiration rarely has a good effect on me. And so this brings me to my close friend Michael who has lost 250 pounds and transformed his life over that past 2.5 years to one of energy and life. His transformation is especially amazing when you learn that all of this has been done through changing what he eats, regular exercise, and breaking free of his own prison of the mind. I recommend you go check out his blog at http://chooselife.prohealthliving.org/.

Through his story and working alongside him during his journey, I've become inspired to improve my own life. I tried doing more dramatic changes, but they never seemed to work for me. Instead I decided to do small changes, make sure I succeed in making that change stick, and then move onto the next change. The first change I made was to eliminate gluten from my diet. It's been an interesting adjustment and my usual habits of eating out for lunch every day has undergone a change in selection. My current selection isn't the best, but it's a start. Only time will tell at this point.

Until next time:
Work smart. Play hard. Sleep well.

05 July 2016

existence | rhythm

/EXISTENCE
Today was a hard day for some reason. Clients that I'm normally super happy to work with triggered an unbridled rage within me to which I reigned in only barely by stopping and thinking about what I was doing. My heart was in such a bad place I asked if I could head home early. On my way home I stopped by In-n-Out to get a burger and a chocolate shake. The sugar high did improve my mood, but only temporarily. Surely playing video games with friends online would help, but alas competitive co-op only made me feel useless when my score was less than half of friend and the lowest of the three of us. My heart was sinking and I felt the tailspin of an emotional vortex starting. In a moment of clarity, I decided to drop out of the second round through the game's rather short story in favor of taking it easy the remainder of the evening. I even thought about going and building something in Minecraft, but it didn't feel quite right. In a second moment of clarity, I finally followed the reminder I had setup to do some writing.

But I didn't have to write anything of any use if I didn't feel like it. In fact I didn't initially. I started with some free writing based on what was rattling around in my head. I even tried something a bit new and took off my glasses so I had to write everything by feel. My typing ended up being quite accurate and I was left with a clearer mind. No longer did the words and feelings have to rattle around internally. Now they were recorded in a file saved to my documents. As I let the emotions flow the words came with them, helping create a new description and image for my feelings. Music and audio have always been super important in my life and so I described my state as being in a state of dissonance with life. I don't know if I changed, or what's really different, but I've noticed that slowly I no longer feel a harmony with my work. But I'm not sure it's all IT work. I think it's just this style of IT support.

My sister got me thinking as well about what I really want out of where I live and I realized that where I currently live is actually pretty damn nice. I'm within walking distance of a major shopping center and things in general are pretty chill on the roads. Overall, it's not where I live that's out of sync with me. It's where I work. And it's hard because I am pretty good at what I do. But I hate having to go into LA or even north Orange County because traffic sucks and I just don't like the vibe I get. Everything is too... intense. I hate to think what kind of stress I'd have over in New York City.

So that's my goal at this point: to find harmony and bring a good rhythm back to my life.

Until next time:
Work smart. Play hard. Sleep well.

01 May 2016

that damn checkbox... Java options greyed out

/TECH
My co-worker was going about his business one day when he needed to add an exception to the Java Security Exception Site List. So he popped in, clicked "Edit Site List...", and... couldn't modify the list. The "Add" button was greyed out. We started searching the Internet and found some things that sounded right, but they weren't. Most posts had to do with deployment options. Finally, we decided to compare settings.

As we were comparing various things, he scrolled down to one of my favorite hidden gems within the Java options and I noticed something strange. There was an extra box that he had checked. It seemed so innocuous. So unassuming. And so we unchecked "Store user settings in the roaming profile". He closed and re-opened the Java Control Panel and was finally greeted by the ability to modify his Exception Site List again.



But why would this seemingly good setting cause such problems? We're not sure, but my guess is a permissions issue to the roaming settings. We even tested re-checking the box on his computer and his Exception Site List was working either way now.

If you're having this issue, open the Java Control Panel -> Advanced tab -> scroll to the bottom and uncheck "Store user settings in the roaming profile". You can even re-check it later if you need it as it seems to fix permissions in the process.

And this was all because of a damn checkbox.

Until next time:
Work smart. Play hard. Sleep well.

30 April 2016

existence | renewal

/EXISTENCE
I'd like to preface this posting stating that although I did SharePoint posts in the past, I haven't touched it in 3 years. In some ways I miss it. In more ways I don't. But regardless of my feelings toward SharePoint, it has been too long since I posted anything here. And so like a phoenix from the ashes, I'm revitalizing this blog with new content.

In the coming posts I'm going to dive both into things I've been doing in and outside of work, though mostly inside work since that's where I've learned the most. Nearly 3 years ago I moved to Southern California and I've been doing IT Support and System Administration. We're the local area outsourced IT department for many clients, none of whom I'll mention both due to respect and an NDA. To give you an idea, our work ranges from helping a small local shop keep their Windows XP machines running their business to getting a new production printer setup for a 70+ person office part of an international group of companies. I've worked with Exchange servers, Windows Server 2000 - 2012 R2, Google Apps, Office 2007 - 2016, Adobe CC, Office 365, Okta, VMWare vSphere, Yosemite backup, Dell Compellent Storage systems, Dell Equalogic, SonicWALL firewalls, Apple Mac OS X 10.6 - 10.11, SMB sharing, QNAP, Lenovo, Barracuda, Cisco Aironet wireless, Dell network switches, and more things than I can remember.

My co-worker and I discuss things a lot. Many of the things we've learned are because we were poking about in settings trying to fix some esoteric issue. Sure we get hints from other postings online that talk about other settings or tweaks, but there doesn't seem to ever be nearly enough information. And in the end it's often some check box buried in the advanced settings. So I decided to start a new set of posts regarding these strange issues that are solved by changing one solitary setting. These posts will have "that damn check box..." in the title to indicate what kind of post it is.

The last thing I want to mention is that although I've learned a ton in the last 3 years, I'm rather worn out from this job. It's full of pressure to make things better for users and full of users that are mean. There are plenty of people I've met that are actually quite nice about it, but those mean ones tend to leave a mark. I hope writing about the issues I fix and my current life helps put me in a better head-space as well as enlighten others crazy enough to be in IT support. Additionally I'm quite tired of the busy-ness that is Los Angeles and Orange County. For my own health I believe I need some place a bit slower paced. This not only leads to that I'm looking for new employment, but I'm also looking to relocate. I haven't truly decided on where I want to go, but I've been thinking a lot of the life I left behind when I moved to SoCal in the first place.

It's hard to close my existential posts sometimes. I feel like I need to say something poignant, but I can never find the words. Sadly those words rarely coalesce. So...

Until next time:
Work smart. Play hard. Sleep well.

06 September 2014

schedule

/EXISTENCE
It's a beautiful Saturday morning here in Southern California and my alarm wakes me from a strange dream about camping. This dream subject may come as a surprise to some, but it really doesn't surprise me at all. I've been thinking about getting away from the craziness of my job for weeks... no, months. So why don't I? Let me explain.

For those of you who are thinking, "there's too much, please sum up", here's that version:

Work is crazy busy. Several clients drive me more insane than I already am. I feel like I have an overly developed sense of loyalty and haven't made vacation plans because of it. Recent events outside of work have made me reconsider what I want to do with my life. And I want all 4 seasons again. I want something different. But don't get me wrong, I regret nothing and I've learned a ton about computer networking, management, and security.


Now I'll explain.

As I'm sure you read the above summary, you're probably wondering, "What the hell happened?!" My problem isn't completely the fault of my work, but I do put some of the blame there. It's mostly on me for not realizing the impact of a statement I was given when I was considering this job: "There will be opportunity for overtime." At first I thought, "Oooo... overtime would be nice. That means more money!" And I was partly right. I've come to discover that I actually really hate overtime. Overtime at work means less time for me and less me time means I start getting frustrated. So I've really made an effort to keep my schedule at 40 hours a week. I even turned down an even greater pay increase as it would have meant that I would be on constant call outside of normal work hours.

Then there's the clients. I'm sorry, I started that wrong. Most of our clients are actually pretty cool. One client in particular keeps me fairly busy while not being so demanding I have to request time to work on the weekend for them. But there are a couple clients that make me just want to scream. They actually make our whole team groan and question what we've gotten into. One particular client causes us red foreheads and endless wonder.

"Then take a break, Peter. Go on vacation." You're right, I should take a vacation. But I seem to have this overly developed sense of loyalty to the people I work for and with and for some reason, going on vacation is registering as abandoning them. I desperately need to get over this. I actually need a vacation. My sanity levels have reached such a point that I think they're affecting my physical health. It doesn't help that my supervisor is one of my best friends and my roommate either. I know he'd understand, but I also know his reaction to every time I've talked about taking a Monday off here and there. Worst of all, I think our situation has started putting a bad pressure on our relationship. I find myself avoiding him outside of work more often than I care to admit. When I first got here, things seemed like they were going to work out really well, but the honeymoon period is over and our core personalities are finally starting to grate on each other. ::sigh::

During a recent phone call with my mom, I vented several of these frustrations and I mentioned wanting to move back up to Spokane or in that area. Heck, I even thought about finding a place in Oregon when I was driving through during my move to So. Cal. To the surprise of many but not all, I actually miss having four distinct seasons. Here, there's like two seasons: summer and spring. Mom said, "You should start looking for new employment now even if it isn't until next spring that you'll start." And she's right. Part of my problem is that I really don't know what I want to do. I can't even figure out what I want to try next. Then after a test message from a friend stating I needed to check Facebook, I found an interesting quiz that another friend had posted their result of. The quiz was, "What career were you meant for?" She got engineer, which she seemed surprised about. So I decided to have a go at it. I was surprised (and not) that I got writer. In some ways, I could sense what was coming as I answered questions, but seeing the result still hit me harder than I anticipated. I immediately thought, "Then what the hell am I doing?! Why am I doing IT support?!" It inspired me to the point that later that night I couldn't sleep as I started thinking about the story I started 9 years ago. I had some ideas and I got up to write them down. I finally went to bed at 4:00 am.

I was inspired for that weekend and when work came around again on Monday and things got busy again, I lost my drive and went straight back to playing video games in the evenings. But the result of that quiz has stuck in my head and I'm constantly wondering if what I should be doing is writing. Perhaps not strictly science fiction or fantasy, but even tech things. I mean, look at all the writing I did here regarding SharePoint stuff! I know I'm a good tech guy! I know that computers and video games will always be part of my life! So why the Hell do I feel like technology is ruining my life after every long day at work?! Because when we go to a client after hours to perform a couple of simple upgrades that turns into 6 freaking hours of work and we don't get home until 4:30 am after just getting it to mostly work, it is ruining my life. I want to stay up until 4am because I was doing something I love, not something that drives me crazy.

At this point, all I know is I want something different. I miss the people and the environment in Spokane. Sure it sucks dealing with driving in snow and the like, but I actually miss the joys of finding my way to a warm spot where I can finally enjoy a cup of hot chocolate and listen to some music. Or snuggling into bed under a heavy blanket after a day of gratifying work. Or finding the energy to sit down and do something truly creative like write on my story that I really need to finish.

Thanks for reading my complaints. It isn't healthy to dwell on my negativity and so I also want you to know I don't regret taking this job one bit. I can't tell you how much I've learned about computer networking, management, and security in the year and half I've been here. The people I've met because I took this job are awesome, my boss and his family included. There are days, even weeks, where I've felt very productive and that I've made a difference and it's incredibly rewarding. It's an incredible feeling when a user says, "Thanks, you've made my day."

Writing this blog entry this morning has been really good for me. It's served partly to help me relieve and assess the stress I've been dealing with. The other part is that it has inspired a writing schedule. I will try to post more often and Saturday mornings seems to be the best moment. I guess I'll just have to make sure I don't stay up all night on Fridays...

Until next time:
Work smart. Play hard. Sleep well.

21 November 2013

shifting gears

/EXISTENCE
When I posted my last entry, I talked about a change of pace. Little did I realize at the time how big of a change that pace would be. To give you a perspective, let compare the phases of my life so far to a car's gearbox. My life in Montana was nice and laid back. I had a job at a video rental store and enjoyed shooting the breeze with the regulars. The speed limit in town was a lazy 25MPH. At these speeds, I could remain in first gear or a really low RPM second gear.

When I move to eastern Washington, the pace picked up a bit. There were more people, roads were faster, but it was still a pretty laid back community. School kept me busy and work was flexible enough to allow me to say, "I'm not planning on coming in during the week of finals" and my supervisor would be cool with it. When I became a regular employee, it was still pretty chill. I never really had to leave second gear much. Third gear was optional.

Now I live in southern California, near Irvine. There are a lot of people. And I travel north to L.A. on a fairly consistent basis where there are even more people. On top of this, people drive like demons on the freeways when given the opportunity. I have to be constantly aware of traffic when driving. My job as an IT support technician means that I'm solving other people's emergency's. Constantly. Fourth gear is nearly a constant with fifth gear occasionally necessary.

As you can imagine, unnecessary things have fallen by the wayside, one of which included this blog. I wish it hadn't but as you can imagine, life has changed a lot for me. One might ask, "If unnecessary things have fallen to the wayside, why do you still play so many video games?" My answer to that is they are necessary. Video games are my way of letting my brain unwind. But as life settles more and I keep trying to improve my life, I find myself thinking about writing here again. I will try to make an effort to post here again, though it will be on a new schedule as posting on Mondays will no longer work very well. But I'm tired and unwilling to commit to a schedule right now. So I'll bid you good night.

And until next time:
Work smart. Play hard. Sleep well.

08 May 2013

a change of pace

/EXISTENCE
Typically when someone mentions a "change of pace" they're usually referring to slowing down, stopping to enjoy nature, and even finding a bit of serenity amid the normal noise. On the contrary for me, I am happy to announce that I've accepted a job offer at eStream in Southern California. I'll be starting in June. So over the next month I will be busy trying to concentrate on work, sorting through my stuff to sell and donate various items, packing the rest, and finding the money to move myself and stuff.

So why do you care? Well, mostly because I won't be writing about SharePoint for much longer in the current context. My new job will be providing support. So after I finish my "codeless" series, I won't have much to say about SharePoint any more. This is a wonderful thing in my opinion. Don't get me wrong, SharePoint is a very versatile system. It's also quite quirky and must be managed carefully. And constantly. I think Wictor Wilén put it best: "It is always fun to get back on site after a couple of days off work. SharePoint 2010 is like an annoying little critter, if you're not there to cuddle with it it will do the most strange things."

The next note of business is that my posting schedule will be changing over the next month as well. Instead of posting every other Monday, I'm going to look into posting on Sundays. I haven't decided how frequently yet but I should have a better idea of that once I'm functioning again after moving to California.

Until next time:
Work smart. Play hard. Sleep well.

12 April 2013

Please Log In, Please Log In, Please Log In

/TECH
Life and work has kept me busy for several weeks and is my excuse for not posting anything in quite some time. It's not much and probably not a very good excuse, but it's the one you're getting. One of the things that's been keeping me busy is that I've been doing a lot of documentation lately. Over the past 3 years I haven't documented the many InfoPath forms I've developed and am now paying the price for waiting so long. It isn't so hard as it is time consuming, not as exciting, and a lesson in how it doesn't take long to forget why you built it that way. Of course, InfoPath doesn't have any kind of documentation tool built in to it and you can't exactly add comments to your forms. So I've been using Microsoft's Word software to copy screen captures and type explanations where necessary. It's not the most amazing thing ever, but it gets the job done.

But every now and then a login box pops up and asks me to log in to the SharePoint server. It doesn't happen very often, but it's annoying because I never asked Word to connect to the server. I did a Google search and found this article outlining the same problem, though much worse than my experience with it. In the article, Ernst mentions that the issue occurs when you use a particular feature of Office to connect to a SharePoint server, but I've never used that feature directly. Somehow just by opening a document located in a SharePoint Document Library causes the issue. So I'm here to document the issue again and inform you how to remove this annoyance.

The problem stems from a feature where Office remembers the locations you've created or accessed previously and tries to connect them every now and then. To fix this, you will need to use regedit.
  1. Close all Office programs to be safe.
  2. Hit Win+R and type regedit
  3. Navigate to HKEY_CURRENT_USER\Software\Microsoft\Office\14.0\Common\Portal\Link Providers\
  4. This should have one or more sub-keys with the same name as the offending sites Office keeps trying to connect to. Delete the offending keys and close regedit.
Now your Office programs should stop asking you to log in.

Until next time:
Work smart. Play well.

11 March 2013

codeless: temporary variables

/TECH
One of the problems I ran into in January was that the userName() function in InfoPath returns something different when used on a web form in a claims-based environment. This post will walk you through two things: creating "temporary variables" in InfoPath and sanitizing the userName() result.

Temporary variables are wonderful in programming and I missed them dearly when I started working with InfoPath. Typically I'd just make a field in some obscure part of the form and not publish it, but there was always a chance that someone with some know how could find that data. It became even more prudent when I started experimenting with a service that retrieved a list of the current user's SP security groups. So I finally searched for a solution. I don't remember who's blog I read first, but there are lots of results out there that all say the same thing: use an XML file.

It's a pretty simple and clever solution. Since data connections can either be "read" OR "write", when you change the data in a secondary connection that's a read-only connection it doesn't save the data. Hey, that's kind of like a temporary variable! Constructing the XML file is pretty simple. Here's one that I've used:
<?xml version="1.0" encoding="utf-8"?>
<currentuser>
 <username />
 <preferredname />
</currentuser>
You can't specify type--as far as I can figure out--but most of the time strings are just fine. The advantage of this system is that you can get info about the current user, store it in a field for use, but not have to worry about purging the data before saving the form. This became a huge advantage with our recent userName() debacle.

In January, we launched a new web application on our SharePoint farm that utilized single sign-on and a claims-based authentication. Two major things broke when we tried using a form: accessing web services and the userName() function returned a string I'd never seen. Normally the function would return "jdoe", but in the claims-based environment it returned "i:0#.w|domain\jdoe". This was a huge issue because a lot of our forms compare the current user to some kind of list to determine access. Changing every single rule that used userName() to some unwieldy expression was not sounding fun either. So I devised a new method.

Instead, I used a temporary field and two form load rules. Using the XML example above, I then created two rules in my form load rules.

Click here to return to my listing of "codeless" blog entries. The underlined username is referring to the field in the secondary XML resource.

Rule #1 - current user has slash
Condition: contains(xdUser:get-UserName(), "\")
Action:
  Set a field's value: username = substring-after(userName(), "\")

Rule #2 - current user no slash
Condition: not(contains(xdUser:get-UserName(), "\"))
Action:
  Set a field's value: username = userName()

Now I have a field that will always contain only the username of the current user. The disadvantage of this is where you have fields that set their default value once and used the userName() function. To overcome this problem all you have to do is add a third form load rule that I like to call "First Load".

Rule #3 - First Load
Condition: FormName is blank
Action:
  Set a field's value: FormName = concat(now(), "_", username)

And that's all there is to it. Click here to return to my listing of "codeless" blog entries.

Until next time:
Work smart. Live free.

25 February 2013

changes

/TECH RANT
I looked at my blog today and realized it has been quite some time since I last posted and there's a reason for this. Actually several reasons that all combine into a singular issue that has caused me some personal and work grief. In most cases I would mask my troubles by writing a more technically oriented entry, but this time there is no getting around the technical and emotional issues that have occurred.

To begin, in the week of January 21st we were finally publishing a form to our newly setup production environment, complete with claims-based authentication to facilitate single sign on. We did a backup of the test site collection and restored it to production. The first thing I check were the workflows as I had used a new feature to help ease the pains of changing publish locations. It worked fantastically. The workflows generated links based on where they were and didn't have to be statically set. Then we launched the all important full-trust form that was to go live by the end of January and immediately there was an error screen. Okay, so it wasn't a flawless victory. I hit OK and proceeded to attempt to visually diagnose what was broken. It didn't take long to see that every single data connection had failed to connect.

The rest of that week was spent diagnosing what had happened and what was truly broken. As it turned out, it was a small quartet of issues. The first and foremost: the test environment used classic authentication, the production environment used claims-based authentication. This small oversight caused a small cascade of issues to crop up, namely: using web services in InfoPath forms no longer worked, username() returned a very different string than expected, and SSO is really annoying to develop under.

Let's start with the string returned by username(). In InfoPath, username() normally returns something like "jdoe". And it still does when you hit preview or you happen to be using a client form. But in a web-form on a claims-based web app, username() returns something like "i:0#.w|domain\jdoe". This is a huge issue when the form is trying to compare "jdoe" to the whole claims token. This was easily enough worked around by creating a temporary variable that was assigned the current username based on a couple of form load rules. Some aspects of the form become less dynamic with this method, but it fixes the issue of "jdoe" != "i:0#.w|domain\jdoe" when it is clearly supposed to.

The next issue is that of web services. One of the services I use in most InfoPath forms is the userprofileservice.asmx service. This allows me to get the current user's preferred name, work phone number, preferred email, and Whitworth ID number. It's quite useful, and in some forms, required. And now it was completely inaccessible. At first I thought it was a problem with the string from username() causing problems, but even after I fixed that issue, the server kept spitting out a SharePoint error code 5566. I discovered this is similar to the HTTP 401 error, namely that the service is reachable, but the user has either not provided credentials or their credentials have failed to authenticate. Most sources that talk about this particular issue state that it is because InfoPath is not "claims aware", but none of their solutions work or cause a security concern.

Finally, single sign on is a wonderful tool for end users and probably even for most development situations. But for SharePoint Designer and InfoPath Designer, this caused me undue grief. This is largely due to the way the tools function in this situation. Every time I went to add a data connection, I had to log in. Every time I published, I had to log in. Every time I went to access the site collection with SharePoint Designer I had to log in, and then open the site a second time to get it to actually load. And just getting the site collection to open in the first place took me hacking the link into the Recent Sites list in SharePoint Designer. It's annoying.

At the end of this week of discovery, I found myself unable to do anything because it was all server settings I don't have access to. It was also very disheartening to realize that most of the forms I had worked on over the past 9 months wouldn't work in the production environment. My mood fell and I let a lot of things go. I probably used more sick time in January than I had previously at all. Even now I still have issues motivating myself to continue working on forms. New forms have gone to utilizing manual entry of the current user's name and ID number when needed. Where I used to have a tolerant love of SharePoint has turned into something else. I've reached the end of what little sanity I had left. When I get home from work, I can't think about design any more and usually find myself playing a game, watching a show, or reading a book that has nothing to do with work. This blog sadly refers to work quite frequently and thus it has been put off for far too long.

Don't get me wrong, I know that SharePoint can be an amazing system that provides awesome features for team sites, file sharing and collaboration, and business processes with automated workflows. I think I just need a short break from SharePoint's particular blend of crazy and a new perspective. In fact I made the decision a couple weeks ago that if I'm going to truly continue to work with SharePoint I will become an expert so that when someone comes to me and says, "It's broke", I can tell them why and what to do to fix it.

Until next time:
Work hard. Play harder.

17 January 2013

codeless: on-change workflows

/TECH
When I started working in SharePoint nearly 3 years ago, I noticed a severe lack of looping functionality built-in to InfoPath or SharePoint itself. This was irritating because when I started work, I was still a student learning C++ and there loops are life-blood. So, what was a programmer to do in a designer's system?

The place I noticed the greatest need for looping was actually in the workflows that our custom forms used to notify approvers. And when I arrived to the SharePoint team, workflows were done in such a way that it would start when the form was created and keep running, waiting for changes before proceeding, and finishing when the form reached its completed state. The real problem occurred when there was a issue with a form and the process had to be reset. This meant terminating the workflow, making the changes, and then restarting the workflow. Even then, the workflow had to go through each of the steps again, even if the change affected only the last step. Wouldn't it be nice if it could keep checking everything until it was actually complete? Yeah, like you can with a loop.

This is when I noticed that the SharePoint team didn't utilize the option that a workflow would run when an item was changed. There were reasons, good reasons for this, but if it's there we should at least understand why we weren't using it for that workflow. The first form I worked on I discovered a really good reason not to use the on change option: if your workflow changes a field/column for the item it is running on and then completes, it detects there was a change to the item and the workflow is triggered again. Welcome to the infinite loop of SharePoint. The workflow in question had to first set the form's Status and then emailed the next person in the process (me). Because it finished so quickly, the Status change was detected as a change and the workflow triggered again. And again. And again. And again. And it proceeded to send me a constant stream of emails while I frantically tried to stop the loop. 15 seconds later I was deleting the 60+ emails I had received.

But this only occurred because something was being modified in the current item by the workflow. I quickly learned that it is better to handle changes in the form template as much as possible. To solve the problem however, I employed another workflow feature: Wait for Duration. This enabled me to change the field, wait, and then send the email a couple minutes later. By having it wait the event handler no longer saw the change as recent enough to start the workflow again. The problem with this solution was that it slowed down the process. And I still had to worry about workflows spamming because several processes I work with use more than one workflow and often one of those has to make changes to the item. In these cases I employ a flag for each email to mark which ones have been sent already. The flag can be added to the library or content type directly, but I prefer to add it to the template. This is because InfoPath forms have a much more powerful rule system built in than the ones that libraries and workflows can do. An excellent example of using these flags is actually in a process I'm currently working on.

Workflows that trigger on-change were essentially the "loop" I was looking for. We also discovered that this method reduced the server load significantly, an unintended benefit. Ever since then my boss has asked me that when I'm rebuilding a workflow that if I can change a workflow to triggering on change that I should.

The best practice in my opinion is to assess what needs to be accomplished to see if the on-change workflow fits your process. In my case, most situations benefit from the on-change style workflow.

Oh, and always test the workflow by having it send to yourself first. You really don't want to have to explain yourself to your boss's boss as to why you flooded his inbox with God knows how many emails.

Until next time:
Work hard. Play harder.

04 January 2013

codeless: double eval

/TECH
My current job title is SharePoint Developer. However, my work is a lot more specific than that. Yes I develop for SharePoint, but more specifically I develop custom, codeless web forms using InfoPath as my primary design tool. The key here is that everything I do doesn't contain custom code but rather out-of-the-box functionality used creatively. And boy do I get creative. Over the next several blog entries I want to explore some of the codeless designs I've found, developed, and refined.

The first trick I want to talk about is one that I use a ton: the double eval. When I first started developing with InfoPath I found that there were several things I couldn't do that I could in C++. Now, I understand that InfoPath isn't a programming language, but it is based on web-technology and several web languages support. So why the hell can't I systematically grab data from a repeating field?! Well, you can. I remember looking at all the functions I could use in an expression once and when I got to eval(), I had no idea how to use it. Even the description of for using it was cryptic: "Returns a node-set containing the result of the expression for each set of elements in the context field." If you added it to the expression, you got the following template:
eval(double click to insert field, "type expression here")
Now I don't know about you but I learn much more about a function by seeing an example of it being used. I finally saw an example one day of the following expression from Infopath codeless programming (walkthrough) 2:
eval(eval(Person, 'concat(my:AccountId, "|")'), "..")
At first I couldn't figure out what was going on, but after I used it several times in different forms I figured out how the two eval() functions were working together. Let's break this down starting with the inner eval().
eval(Person, 'concat(my:AccountId, "|")')
This eval() is referencing the field Person and then using concat() on it. The trick here is that the concat() function is being run relative to where Person is located. This means that if you need to do a comparison to another field with your concat(), you need to write the xpath as if the concat was running on Person. Say you want to filter AccountId based on Department. If you were to look at the xpath for the two fields you might get something like this:
- MyFields
  - Person
    = AccountId
  = Department
You'll notice that Person and Department are parallel and AccountId is a child of Person. For our concat() above to filter AccountId using Department, it would have to be done like so:
'concat(my:AccountId[../../my:Department = "IT"], "|")'
What this does is back up twice relative to where AccountId is located and then looks for Department. It's really important to know where in the hierarchy an expression is going to run. You may have also noticed that the entire expression for the eval() is enclosed in single quotes, not double quotes. That's because the expression needs to use double quotes to function correctly, thus you change the overall encapsulation to single quotes.
eval(eval(Person, 'concat(my:AccountId, "|")'), "..")
The outer eval is easier to break down and is where the "looping" action actually occurs. The outer eval() is treating the inner eval() as the field it is working on and the ".." as the expression. The unique thing about the expression here is that it is looking for one thing: when the field has to go back or up a level in the hierarchy. As soon as that happens, the outer eval returns the results of the inner eval() that occurred on each instance of Person, in this case, a string of concatenations that results in the output of a single string of text. The output would look something like this:
jcool|cbrown|ppatty|lucyvanpelt|
This is now a really useful way to gather info into a single field for further use and/or processing. I've used it to concatenate the usernames from a SharePoint list to use in a comparison in the form for security, creating a list of approvals still needed, and even doing a sort of "group by" query on a repeating table.

Thanks to Alec Pojidaev and posting that little trick to his blog. It's come in extremely useful. Check out his blog for some other codeless solutions. Click here to return to my listing of "codeless" blog entries.

Until next time:
Work hard. Play harder.

codeless

/TECH
My current job title is SharePoint Developer. However, my work is a lot more specific than that because the I nearly exclusively develop custom, codeless web forms using InfoPath as my primary design tool. The key here is that everything I do doesn't contain custom code but rather out-of-the-box functionality used creatively. And boy do I get creative. Over the next several blog entries I want to explore some of the codeless designs I've found, developed, and refined. To keep things tidy, I'll preface each post title with "codeless" so you know what you're getting into and additionally keep links to all my "codeless" posts here. If you're working with InfoPath, I hope these articles help you.

"codeless" articles:
Until next time:
Work hard. Play harder.

18 December 2012

codeless: expression box/calculated value

/TECH
Have you ever needed to display text that changed depending on other aspects of the current form in question? If you have, perhaps you've already used these. But if you're like me and you didn't see an obvious solution (a rarity in SharePoint and Infopath) you found another way. I personally used sections and text fields to dynamically hide and display text. But this isn't the only way.

I discovered this little feature by accident one day. They're called an Expression Box in 2007 and a Calculated Value in 2010. These incredibly simple controls are part of the form template only, which means the data in them is never stored with the form itself. One disadvantage that I can tell though is that you can't reference them, much like a button control. But if you're already basing the info in the control off of data in the form, you don't need to reference it.

But the thing that bothers me the most is that I've been working with InfoPath for 2.5 years now and never knew about them. If you haven't discovered them yet, go use them cause God knows they're useful.

Until next time:
Work hard. Play harder.

03 December 2012

not an article

This is just to inform you that I'm working on a series of posts about some of the things I've learned about SharePoint and InfoPath. I am also in the process of breaking off the more personal side of this blog into a separate blog that I'm hosting on my very own server. There I will post my rants, ravings, and reviews about things not related to work and personal projects. I will post a link to it when it's ready.

So until next time:
Work hard. Play harder.

19 November 2012

(re)work

/TECH RANT
Remember last time when I said Doppelganger has the caveat of "subject to change"? Yeah, apparently my work projects also have that. Two weeks ago I was "finishing" a form project only to have a discussion last Monday that made me go, "Oh crap." So my main project for the past month or so has been updating our Cell Phone Allocation form to include the option of getting a phone through the company. Previously you could only get a reimbursement for using your personal phone for business related work. Now, the university is offering full-time employees phones paid for by the university and the employee takes a deduction on each pay check for using the business phone for personal purposes. What I had spaced was the fact that the addition and the deduction were opposite from each other. So in five days I re-worked a significant portion of logic in the form to properly calculate the pay period allocation or deduction.

Five days isn't much, but I managed it. The worst part is because all these changes had to be to the current form, we now need to re-convert the form for our SharePoint 2010 migration. You might think that I should just make the changes to the new form rather than re-convert but I'll tell you now, it'll be faster to re-convert. The changes were extensive and although I just finished working on it, I can't remember everything I did and really need to hand the 2010 version over to a co-worker. So re-conversion it is.

The Cell Phone Allocation form isn't the only one that's been hijacked. So has one of the SharePoint Team's least favorite form: the IRB application. This form has given us numerous problems though most of them can be attributed to user error. However, to attempt to mitigate these issues the form has been updated numerous times since it was converted. Yes, with proper documentation we could probably update the 2010 form without trouble but how often do you have good documentation available? How often do you make good documentation?

I've even been improving our documentation, but it's improvement is secondary to the immediate problems of conversion and troubleshooting. Documentation wasn't always a problem for me. In fact in programming I'm pretty good about commenting code and what-not. But SharePoint and InfoPath documentation are different because they're visual design editors with no way to comment segments. So documentation has to be put in a separate document. Which means if you update something, you have to update the documentation separately. And most of the documentation is done through screenshots of the layout and design.

I apologize to people reading this expecting to see solutions to problems on various systems. Perhaps I should move these rants to my other blog and start posting more technical things here...

Until next time:
Work hard. Play harder.

05 November 2012

subject to change

/TECH
Tech changes a lot. A generation in technology is often only a few months to a couple years long depending on which technology you're talking about. In the case of servers, it's more often a couple years. This is because servers are supposed to be a more consistent resource, constantly providing data or services. But for me, servers on Doppelganger are more often going to be talked about at the month level of iterations. Here's a quick rundown of the various appliances and VM's I have running on Doppelganger, my Proxmox Virtual Environment:
  • Amarok
    Service: Plex Media Server
    Allocation: 2 cores, 2GB memory, 20GB storage
    Status: running, rarely used
  • Balrog
    Service: Minecraft server
    Allocation: 2 cores, 6GB memory, 8GB storage
    Status: offline, merged to Gryphon
  • Faoladh
    Service: LAMP for developing a Dungeons & Dragons character tracking web app
    Allocation: 1 core, 1GB memory, 10GB storage
    Status: running, not used
  • Gryphon
    Service: Minecraft server and Tekkit server
    Allocation: 3 cores, 8GB memory, 8GB storage
    Status: running, frequently used
  • Kitsune
    Service: WordPress
    Allocation: 1 core, 512MB memory, 4GB storage
    Status: running, untested
  • Naga
    Service: Ubuntu 12.04 server
    Allocation: 2 core, 6GB memory, 6GB storage
    Status: offline, waiting re-purposing
  • Raven
    Service: TeamSpeak
    Allocation: 1 core, 2GB memory, 8GB storage
    Status: running, frequently used
  • Siren
    Service: Icecast
    Allocation: 1 core, 512MB RAM, and 10GB storage
    Status: offline, not working
  • Warg
    Service: Windows 2008 R2 Server running Terraria server
    Allocation: 2 cores, 8GB memory, 32GB storage
    Status: offline

At the beginning of summer I had an idea and an overly simple plan that allowed for exploration. I never imagined I would have all the things above set up and I'm still exploring different possibilities of things to do. Looking back I now see a trail of projects--some working, some failed, some in between--and a series of decisions that were made on a thought. Naga had a very short lived purpose to serving as a remote platform for a friend to finish a school assignment. I set it up in about 30 minutes. It still sits in the list of servers hoping to someday become something else. Balrog had a long-term plan, but has since been incorporated into Gryphon, a more stable appliance. I maintain a spreadsheet online with a list of all the computer names I'm using or might want to use, what purpose that machine might serve, and various details about ones that are in use such as IP address and machine number. There are a lot more names on that list than I gave here, some of them being the names of my personal computer (Phoenix) and other active devices, some being undetermined, and some being machines that will be setup in the future.

Perhaps the most interesting machine on my list is the one that sits at the top and has never been implemented in any way but has gone through the most iterations: Cerberus, my eventual router and firewall. Although its name and eventual IP have never changed, my ideas of how it's to be implemented have been in constant flux. And unlike most of my machines that are virtual, Cerberus has to be a physical box to be its best. The hardware I want to use for it has gone from using an old Pentium 3 or 4 with 3 network adapters, a 24-port switch, and a wireless access point to buying a specialized integrated device that minimizes power consumption and physical space requirements. My thoughts on Cerberus could be an entire post for that matter and probably will be one when the time comes that I finally build it.

In the end, I discovered that my initial plans weren't that good and that there was a better way. I now have an asterisk next to the whole plan that refers to a footnote stating: subject to change. And in the end this was and is the best way to approach Doppelganger.

Until next time:
Work hard. Play harder.

23 October 2012

usability

/TECH
Over the summer I participated in a program here at work to journal every day and/or complete a project of some kind. At the end, the person that did the best would get a prize of some kind. But at the end of the summer when we all got together to share our summer progress, there were only six people that participated, including the organizer. Since there were so few of us, she decided that everyone would get a prize by choosing a book that she would order. She had several books laid out as options but she also said we could choose a different book of our own choosing. I requested the book Don't Make Me Think by Steve Krug, unless it was too expensive in which I'd have a different book called 62 Projects to Make with a Dead Computer. Asking if I'd mind used books--which I don't--our organizer actually obtained both books for me. So awesome.

So last Friday they turned up on my desk and I proceeded to start reading Don't Make Me Think. It's a book on web usability and the basic premise is that as a user, we shouldn't have to think about where things are, what something is, or how to use it when browsing the Web. I obtained the book on a recommendation from a friend for the purpose of personal learning. As it turns out, it has also been helping me rethink how I design our custom web forms in SharePoint. And at a very opportune moment.

For some reason a form that worked quite well last academic year is pitching a fit this semester and causing students, faculty, and staff all sorts of problems. I mean lots of problems. We have had at least 4 problems a week with user access, usage, or otherwise on a process that's had a mere 50 applications submitted thus far. And when I started reading this book we had been considering expanding the instructions further to hopefully eliminate some of the confusion. More text was exactly the wrong thing, according to Steve Krug. But redesigning the form would be even worse as it would change it mid-process for many people. So rather than putting in more text or significantly altering the appearance, I found small tweaks like just disabling buttons instead of hiding them to do instead. I don't know if it has helped yet, but here's to hoping.

Steve's book doesn't just apply to web usability though. It really applies to any GUI design whether it's web, stand-alone applications, or operating systems. I know that everything doesn't fit within the bounds of the guidelines he sets, but even he admits that everything fits nicely into it. In fact the book isn't a step-by-step guide to making particular things, but rather a set of (not-so) common sense suggestions.

I haven't even finished reading the book and I've already been able to improve so much of the designs that I think of. With the resurrection of my D&D character tracker project on the horizon, having a common sense approach to design will drastically improve the usability of the web app.

Until next time:
Work hard. Play harder.