DAT Stuff

Random thoughts and observations from DAT

Processing Demo

OPES

Demonstrating processingjs on sketchpad to the 5th graders at OPES

Chess Visualization

While searching the archives of the Processing forums, I discovered Thinking Machine 4.  I especially like what it does when it is not thinking about a move, just showing the squares that are influenced by pieces on the board.

Several weeks ago, I started creating a similar visualization, but the complexity quickly became too much for me to deal with in my spare time.  This will inspire me to take a fresh look at the problem.

SharePoint Workflow Hack

Before I describe what I did, let me point out that this might not be the best way (or even a sane way) to solve this problem. Regardless, it worked for me and I wanted to record it for posterity.

I have a SharePoint list (named “MLD” for short) that has two lookup columns, as shown here. Each one has a supporting list that the users maintain.
ColumnDefs

ProjectLookup ReleaseLookup

Originally, there was no connection between Release Lookup and Project Lookup, but I realized that Projects are tied to a Release (i.e. Everything in Project X will be in the same release).  To support that, I added a Release column to the Projects list.  I now had Release being set in two places, and maintaining the same information in two places is just asking for trouble. However, I didn’t want to remove Release from my MLD list, because I still want the ability to sort & filter by Release. What I needed was a workflow that would set the Release on MLD list items based on the Project that was chosen for that item.

I fired up SharePoint Designer (version 2007, which is the latest version compatible with my SharePoint site), and created a new workflow that would run any time an MLD item was created or updated. First, I created a variable to hold the ID of the selected project:

DefineVariable

The next step was to store the Project ID from the current item in that variable, then look up the Release for that project in the Project Lookup list and assign that Release to the current MLD item.

DesignWorkflow DefineWorkflowLookup

Java hosting

Most of my sites are running on dreamhost. They’re pretty good for sites running Python, Ruby, or PHP, but they don’t support server-side Java.

Over the years, I have searched for Java application hosting to fill that void. I was mostly looking for a place to explore and try new things, so I wasn’t willing to pay much. The inexpensive ones I found usually had very low RAM, and sometimes shared JVMs between users. To get a private JVM capable of running a decent app server usually cost more per month than I was willing to spend, and often required a dedicated server or VPS, which was more of a time commitment than I wanted. Eventually, I stopped looking.

At some point Google came along with their App Engine. It allowed part of what I was seeking, but came with its own limitations.

Today I discovered OpenShift, though it appears to have been started two years ago (May 2011). In additioon to Java, it supports a handful of other languages, as well as an assortment of frameworks and databases. It has a free version that is limited, but even the free version appears to support JBoss and MySQL!

Thinking about PowerShell

I am looking for a way to migrate documents from one SharePoint site to another, and create items in a separate SharePoint list. I found a blog post that looked promising, so I fired up PowerShell to poke around.

I quickly found that my version of PowerShell (v1.0 on Windows XP) didn’t have the Get-SPWeb cmdlet that seemed to be the first step toward my goal, so I went in search of a newer version. I found another blog post that provided a link to the 2.0 download, but it also recommended articles by the Scripting Wife that I want to check out.

I installed 2.0, but I still don’t see the Get-SPWeb cmdlet I need…

Crapcha!

Tired of hard-to-read CAPTCHAs?  Try this:

Mobile Wiki Skin

The next step in reviving my wiki was to make it accesible on my iPhone.  A quick trip through Google, and I found an answer on Stack Overflow. I installed the extension and the skin, and it worked – for the most part.  It did format the content nicely, but I saw the following error at the top of the page.

WPtouchError

I haven’t done much with MediaWiki skins, but was hoping it wouldn’t be too hard to fix. So I searched my MediaWiki skins directory for the problematic function, and the following lines stood out:

I changed WPtouch.php to make it consistent with Vector.php, and the error went away. Following is a diff of the before (top) & after:

I also changed the Display_Actions flag, to enable mobile edits (among other things).  It worked, but the Portrait mode needs a little tweaking:

Portrait: Portrait

Landscape: Landscape

It’s not pretty, but it seems to work fine in landscape mode, so I’ll leave it alone for now.  If you’re on a mobile device, you can see it here: datguy.net/wiki

EDIT: I thought that there might be a newer version of the skin.  The Stack Overflow answer links to a 2010 page, but the mediawiki gallery links to a 2012 update.  I examined the download links and they seem to be the same.

Also, after posting my solution I got a reply from someone that had the same problem, and his solution to the “Actions” problem in portrait mode was to change the “Personal tools” text.  I changed mine to “My tools” (in ./languages/messages/MessagesEn.php), and that was enough to prevent Actions from wrapping onto the second line.

 

It’s alive!

I recently brought my wiki back to life at wiki.datguy.net datguy.net/wiki, consolidating my old wikis onto a newly upgraded MediaWiki installation.  After I went through and removed a lot of dead links, I decided it was time to work on the configuration.  The first thing that had to go was the default URL structure (i.e. http://wiki.datguy.net/index.php?title=Main_Page).  I was hoping to simplify it to http://wiki.datguy.net/Main_Page.

I found a page at mediawiki.org describing how to shorten the URL, but it recommended against page names in the root directory, with a link to a warning page.  As much as I want to have pages directly in the root, I didn’t want to deal with the complications yet – so I picked a random letter to use as a virtual directory, resulting in http://wiki.datguy.net/w/Main_Page.

EDIT

That extra virtual directory kept bugging me, so I moved the MediaWiki installation out of wiki.datguy.net into a directory underneath datguy.net, where I could use the /wiki path.  I changed the old domain to redirect to the new location — http://wiki.datguy.net/Main_Page redirects to http://datguy.net/wiki/Main_Page.  However, the wiki subdomain still has the problem that they recommend against — http://wiki.datguy.net/robots.txt is redirected as if it is a regular page, and displays an error when http://datguy.net/wiki/Robots.txt is not found.

Writely test

This was entered as a Writely document (now part of Google Docs), to test Writely’s ability to post to my blog.

It can! However, the following features don’t work right:

  • it can’t unpublish the entry
  • posting updates adds an entry instead of updating the original one
  • when I finish editing this document, then edit again, it doesn’t seem to know that it’s been posted to the blog. It would be nice if it kept that history (which would probably require fixing the previous two problems).

The entries themselves have some problems:

  • no title
  • they are not tagged (they default to the General tag, instead of picking up the tag I assigned on Writely)
  • the “comment” link (under the entry) and the “view” link (on the admin pages) don’t work. The relative url of the entry was /2006/08/30//. There should be an entry name between the last two slashes…

In summary, Writely might be a nice editor to use in place of the built-in blog editor, if these problems are fixed…

Virtual windows, but no Xen

I couldn’t get Xen to work on Fedora. I was following a quick start guide, but the computer failed to start with the Xen kernel.

I downloaded VMWare server and registered for a free license. During installation, it needed to compile a module; I didn’t have the compiler or kernel headers installed, so I had to dig around for the right packages to install. But once it was compiled and running, I installed Windows XP in a virtual machine on top of Linux.

I confirmed basic functionality (opened Internet Explorer and browsed to an external site), but the next step is to apply the all of the patches (including XP SP2). Then I’d like to clone the image and set up one for general use (Quicken, etc) and another for programming (compiler, debugger).

Post Navigation