Monday, July 24, 2017

My First Mobile App — Active Wallpaper

The picture on the right gave me the idea for my first Mobile App, so consider this as me just “planting a seed”…
The idea came to me after I bought my first Android SmartPhone. I wanted to come up with a fitting wallpaper for my Pixel, so I did a little graphics editing to put the name of my men's team on a favorite ice climbing picture. And then there was a little whitespace on the cloud, so I wrote in one of our team standards that really speaks to me (and which also goes well with the picture itself) — "Quitting Is Not An Option". Alas, this also was me editing the graphics, so what you see on the right is really just an annotated photo  — your typical Still Wallpaper.
But like most men's teams, we have more than one phrase that describes how we want to be, so I lamented the 'fact' that you can only put one such phrase on a graphic, and that led me to ask: Why can't we change that to be a more Active space — put an App behind it, and have the App cycle thru a set of Phrases … ? — So in the same picture the Phrase changes and you would see e.g. :
The App is very much like ordinary wallpaper except that it wakes up every once in a while to change the picture slightly — by over-writing a different Phrase on a pre-determined Marquis space on the picture…

So this suggests to me a WPF or Xamarin App that (somehow?) gets all the metadata it needs to come up with the picture — along with the collection of Phrases, placement, fonts, and etc. And then when you run the App, what you see is  “Active Wallpaper”.

Details about when and how this might materialize for Mobile are TBS … but click here for details about an “Active Wallpaper” prototype that I created using MVC, JavaScript and AJAX, Sql, WPF (Windows Presentation Foundation), and The Cloud — as a first step towards the Mobile App. (The WPF version runs only on Windows.)

Monday, March 14, 2016

Using C# on Windows to Create Clipboard Cut & Paste Extensions

This article documents a C#/.NET program that I created to provide “a Windows Clipboard Cut & Paste Extension” mechanism. The idea for “Text Transformations” (TT) is simple: (a) you put some text into your Windows Clipboard in any of the ways you can do this, (b) invoke “TT -Flag”, usually by having a ShortCut that encapsulates the details about how to do this — including which “TT -Flag” you want, and (c) after TT runs, it leaves its results in the clipboard so you just “Paste” the text to wherever you want it.

For example, when I do a regular expression search (e.g.“lhsChars.*rhsString”) and it fails, often the very next thing I want is what “TT -Swap” would do: It returns “rhsString.*lhsChars”. The tool is nothing more than a convenience, but for things you do a lot it can be well worth it. Another example that I use when working with Sql starts with selecting a column of strings or numbers from a SELECT grid; after a “TT -InSql_S”, a Paste might return e.g. the Sql snippet: IN ( '3423', '329', '44993', '21812' ) or “TT -InSql_N” would see that all the strings are numeric so it would produce the same thing but without any quotes. If you spend a lot of time editing Sql or C# (or anything), such TTransformations can be very convenient.

A more significant example provides something like Windows File versioning. Using the Windows Explorer right-mouse convenience called “Copy Path”, I can point to a file (put its path into the Paste buffer) and then invoke “TT -Version”. This operation makes a copy of the file, coming up with a variation on the file name so that nothing gets overwritten. e.g. If I started out with a file name like myFile.txt, “TT -Version” would look in the folder where that file resides and the first time I did this it would create: myFile_00.txt   If I already had an “_012” version, the next “TT -Version” file copy would create myFile_013.txt ... and etc.

Some of the other TT transformations read template files and do substitutions on place-holder markers for things like DateTime strings. A specific one of these that I use every day as part of the Agile methodology is “TT -Scrum” — it analyses a fragment of yesterday's scrum sheet and creates a new one, for today!

The intention of this portfolio is that I make my C# code available to others... so if you are interested in getting your hands on TT, simply contact me and we'll have a conversation about that.

Tuesday, April 14, 2015

The WPF Evolution of my Multimedia Flash Cards App

In a previous post I wrote about an MVVM model that I called “Factoids” and used in an App that I created for learning to speak Italian (before a trip that we took to Italy in 2012). This post is a follow-on to that since a lot of things have changed — most importantly, I switched from Silverlight to WPF to gain access to .NET classes that were not available in Silverlight 5. This has led to a much more powerful and general-purpose tool that runs on a touch screen (Windows 8.1 — not my cell yet) where you can do everything without having to click a mouse.

In the screen shot on the left you can see a number of conceptual & usability improvements — starting with the name: Now it's “Flash And Learn”, as you see in the title bar. Below that is a title that shows you the foreign language that your flash cards are for, since I've realized my original vision of making the Word-of-the-Day eMail parser be table-driven and have done this for Italian, French, Dutch and Spanish. What I formerly called “Context” is now “Learning Objective”, and the name of the current objective, “Understand The Phrase”, appears on that title line. At the bottom of the screen a new Status Line tells you what's going on.

Within a Learning Objective you can categorize every word in the Vocabulary by assigning it a “Proficiency”, and one of the most useful new additions to the App is that it can draw a Pie Chart, shown on the right, so you can see exactly how much progress you've made on that objective. Since everything in this App is data-driven, you can have as many Learning Objectives as you want, and you can freely make up the names you want for the Proficiencies.

The primary paradigm for this App is that you use Viewing Rules to pare down and specialize which cards are visible, and then via simple Navigation within those cards you use the multimedia information derived from the cards to help you learn. For example, on the left a small deck has been specialized via rules that say: Only cards which are for Adjectives where the Proficiency is “New”. Appropriate to a Learning Objective such as “English Word Listening to Audio”, the right-hand panel is set up to show the Foreign Language card without any English. Typically, the drill would be (a) spin — do a (random) navigation, (b) click the Icon to listen to the audio, (c) update the Proficiency for that card and (d) spin again.

There are several ways to introduce new Vocabulary. The one on the right called “Create Vocabulary Alias”, shows you the currently-selected flash card and lets you create a new one with the only constraint being that the two must share the same audio and phrases. This is very useful when you get a sentence that has a word you don't know — you can just make a card for it directly. Another way to get more Vocabulary is a new command that gets the Word-of-the-Day for Today so you don't need to deal with eMail at all.

The future: My goal all along has been to make this App run on my Windows Phone, so I've looked into Microsoft's new “Universal App” model for which I at least get to keep my Xaml UI — but no Silverlight, WPF, or ActiveX controls. At least my understanding is that if I target WinRT it's more likely that in the future this can be not only a Windows 8.1 Metro App, but also deployed on iPhone and Android mobile devices.

Tuesday, January 31, 2012

Flash Cards & Factoids — Learning To Speak a Foreign Language

Factoid (Italian) - Full Vocabulary
A while ago I stumbled upon a way to receive a daily eMail delivering a Word Of The Day in various languages — as a learning tool — and I soon realized that without any way to manipulate these "Factoids", they were soon going to go the way of all my other by-gone eMail. Yet I had a burning desire to make use of this rich source of information and training — because it actually speaks the language — so I decided to use my favorite set of Microsoft technologies to provide this "deck of cards" in a way that I felt would best suite my personal learning style — hence "Factoids".

In this article I'm going to talk about a .Net prototype I've created using the MVVM design pattern, called Factoids. This Silverlight tool is aimed at helping ordinary people create and organize multi-media Flash Cards and to then use them for anything that fits the familiar paradigm such as — in the case of my prototype — learning to speak Italian. You use the cards (The Factoids App)  in a wide variety of workflows all aimed at helping you to (a) see one side of "the card", and then (b) recall what's on the other side of the card.

Thursday, March 17, 2011

Pure WPF — What a Joy!

Having worked a lot with Silverlight, I recently decided to take one of my favorite applications (pixRename) and convert it from Silverlight to “Pure Windows Presentation Foundation” or “WPF ”, as it's called... and what a huge relief it is to be freed up from the constraints of an OOB application. Since this application is all about managing the reNaming of picture files stored on your local computer, I guess the bottom line is that it was a mistake to have used Silverlight for that in the first place. But I did it because I really wanted to get my feet wet with Silverlight, and from that perspective it was a really great exercise. But for end users — as I quickly discovered — the constraint of only being able to reference files in "My Documents" or "My Pictures" was just NOT justified; I found that people didn't want to use pixRename solely for that reason. And they were right.

So this article announces the availability of “pixRename (WPF) ” which you can download here. Most people will find this install very simple because I used Microsoft's ClickOnce (software publishing) Technology.

The screen shot on the left shows the main page of the app with one of the things that's new for the WPF version - tailor made .Xaml windows that are used to display the "Help Topics" that, in the Silverlight version, were pretty ugly Message Boxes. Look at all of these help screens (via a Flickr slide show) or scan them individually: “Save Settings”, “Composition”, “Date/Time Adjust”, “Folder Location”, “Event Description”, “Change Settings Dialog”, “Naming Pattern” or “reName Semantics”… to get a sense of how pixRename (WPF) works.

There are a number of other User Interface improvements made in this version, but its main claim to fame is simply that you can access picture files that reside anywhere on any of your computer's hard drive(s) because WPF frees you up from the Silverlight restrictions detailed in that link. For more details, visit the FAQ (Frequently-Asked Questions) page — http://bit.ly/pixRenameFAQ — which, for now, describes both the Silverlight and the WPF versions of this .NET Desktop application.

Friday, September 24, 2010

Harvard University Chooses Panorama from Digital Media Magik.com

If you've spent any time on my company (DigitalMediaMagik.com) web site, you've likely seen the gallery of panoramas and you may even have seen (on my first business cards) the “Harvard Yard in Fall” one that I have inserted at the bottom of this posting. What you have probably not seen is this "same picture" being used as the masthead on a new publication of the Harvard College Writing Program — their “Harvard Guide to Using Sources” web site.

Since I do not know how long Harvard University will continue to use my panorama on their site… on the right is a screen shot that I captured (and then annotated slightly to highlight the credit to "Kevin G. Pammett" + the simple URL) to show off my panorama on one of the pages from Harvard's new web site. For a better look… the click-thru on that screen shot takes you directly to their site, but note that it may show different content from time to time. The arrangement with DigitalMediaMagik.com simply gives Harvard University the right to use it in their masthead (on all pages) for the entire site.

Below is a thumbnail of the “Harvard Yard in Fall” panorama … or, iff you have Java, click here to see the same picture in a pop-up panorama viewer that shows the image rotating thru 360° — demonstrating that there is no right-hand or left-hand edge to this picture; the two edges automagically connect to form a seamless image.

In October 2008 I took the 27 snapshots that you see above, auto- stitched  into a single 6175 x 833 pixel image. The resulting “Harvard Yard in Fall” panorama captures the New England Fall beauty of Harvard University from the center of the courtyard known as "Harvard Yard" on the campus of Harvard University in Cambridge, Ma.

If you are interested in engaging DigitalMediaMagik.com to create — or to help you create — panoramas of your own favorite vistas… please contact me (Kevin Pammett) at your earliest convenience.

Wednesday, September 8, 2010

Making Use of Silverlight Technology — A Digital Picture Renaming Tool

In a previous article I introduced the Silverlight App that I call pixRename, and herein I'm announcing the "version 1.0" release of this tool.  To try it out on any computer that can run Microsoft's .NET Framework, follow the instructions at: http://bit.ly/pixRenameV1

Aside from wanting a "modern" version of my reName tool — I really do use it to process digital camera pictures — the other reason I created this was to get hands-on experience with the following Silverlight 4.0 technologies:
  • Isolated Storage — relative to browser-based cookies, this persistence mechanism is a huge step for a pervasive development technology because it essentially gives you a database that's built-in. I use this to persist tool options and 1:many relationships that are really named sets of  (name,value) pairs — the so-called "Settings" or "[camera] profiles".
  • Windows Presentation Foundation (WPF) is a modern technology for creating, persisting, connecting and deploying UI components  — app controls  — which I use for buttons, labels, radio controls, checkboxes, special-purpose combo boxes and dynamic controls that reflect the end user's personalizations.
  • Child Windows which share data with the main App, greatly simplifying the UI that you normally see, providing mechanism for a "Splash screen", the log for a "Preview" command, & general-purpose dialogs.
The "Change Settings" PopUp
  • Demonstrate an Object Oriented design, implemented with C#, lots of encapsulation, developed following the Agile paradigm.
  • Uses ExifLib — an external .NET library that I adapted to work with Silverlight, described in this article.
  • Gain expertise using Silverlight to make OOBs — like "desktop apps" — that run outside of the browser.
  • Doing something significant with the .NET framework, including the System.IO classes that allow direct access to files and folders on the local computer's hard drive.
  • I created a "Browse Folders" User Control because Silverlight 4.0 has an OpenFile dialog but you can only use it for files (not folders).
  • Handling a multi-page .xaml application with dynamic pages.
Any comments or feedback please contact me (Kevin Pammett, © 2010 DigitalMediaMagik.com)