1

Coding for Everybody

Recently I read a post entitled The Hypercard Legacy. For those not familiar with HyperCard, it was a tool that in the 80s and 90s enabled ordinary Mac users to create their own computer programs.

More than a quarter-century after HyperCard’s release, I find it interesting how far we have strayed from this “anyone can code” mentality, into today’s walled-garden environments where only approved applications may be downloaded from an app store.

Continue reading

0

Okuma App Store

MyOkuma

Okuma has recently launched an App Store. The site is not just for Okuma-developed apps: products by several THINC partners are featured on the store.

Registration is required to download, but to see the range of possible THINC solutions, you can browse the apps at MyOkuma.com.

0

Chrome

I bought a Chromebook. Why would I buy a Chromebook?

Actually, I’ve been using this Acer C720 for about three weeks, and so far I’ve been pleased. Since my netbook died a couple years ago, I haven’t had a lightweight device with decent battery life. I don’t care for tablets: I like a device with a built-in keyboard. The Chromebook fills this role well.

For now, I’m using a stock installation: no developer mode, no chrooted Linux. The vast majority of my usage is web browsing and writing. The only option for web browsing, unsurprisingly, is Chrome, but it’s been my default browser for quite awhile.

For writing, there’s no lack of choice for text editors on the Chrome web store. Usually I like to use a markdown editor, but for now I’ve been using Caret. It provides basic plaintext editing with syntax highlighting. In theory, it has a plugin system, but I’m still trying to figure out how to write a plugin for it — my biggest complaint is the inability to view word count for selected text, rather than the entire document.

(Of course, if you need word processing capabilities, there’s Google Docs. )

Downside: there’s still no IDE on par with Visual Studio. With my desktop machine out of commission recently, I have no means of developing Windows applications. Sigh.

0

Garter Snake

Dear Garter Snake in my Backyard,

I have no problem with you. My philosophy is you don’t bother me, and I don’t bother you.

But when you slither unseen onto my patio as I’m getting out the lawnmower, don’t be surprised when I step on you.

My bad, admittedly, but you’re the one whose guts are smeared all over the patio. 

0

WPF Exceptions

I want to rant, but I think the stack trace says it better than I could.

System.Reflection.AmbiguousMatchException: Ambiguous match found.
at System.RuntimeType.GetPropertyImpl(String name, BindingFlags bindingAttr, Binder binder, Type returnType, Type[] types, ParameterModifier[] modifiers)
at System.Type.GetProperty(String name, BindingFlags bindingAttr)
at System.Windows.PropertyPath.GetPropertyHelper(Type ownerType, String propertyName)
at System.Windows.PropertyPath.ResolvePropertyName(String name, Object item, Type ownerType, Object context, Boolean throwOnError)
at MS.Internal.Data.PropertyPathWorker.GetInfo(Int32 k, Object item, SourceValueState& svs)
at MS.Internal.Data.PropertyPathWorker.ReplaceItem(Int32 k, Object newO, Object parent)
at MS.Internal.Data.PropertyPathWorker.UpdateSourceValueState(Int32 k, ICollectionView collectionView, Object newValue, Boolean isASubPropertyChange)
at MS.Internal.Data.ClrBindingWorker.AttachDataItem()
at System.Windows.Data.BindingExpression.Activate(Object item)
at System.Windows.Data.BindingExpression.OnDataContextChanged(DependencyObject contextElement)
at System.Windows.Data.BindingExpression.HandlePropertyInvalidation(DependencyObject d, DependencyPropertyChangedEventArgs args)
at System.Windows.Data.BindingExpressionBase.OnPropertyInvalidation(DependencyObject d, DependencyPropertyChangedEventArgs args)
at System.Windows.Data.BindingExpression.OnPropertyInvalidation(DependencyObject d, DependencyPropertyChangedEventArgs args)
at System.Windows.DependentList.InvalidateDependents(DependencyObject source, DependencyPropertyChangedEventArgs sourceArgs)
at System.Windows.DependencyObject.NotifyPropertyChange(DependencyPropertyChangedEventArgs args)
at System.Windows.DependencyObject.UpdateEffectiveValue(EntryIndex entryIndex, DependencyProperty dp, PropertyMetadata metadata, EffectiveValueEntry oldEntry, EffectiveValueEntry& newEntry, Boolean coerceWithDeferredReference, Boolean coerceWithCurrentValue, OperationType operationType)
at System.Windows.TreeWalkHelper.OnInheritablePropertyChanged(DependencyObject d, InheritablePropertyChangeInfo info)
at System.Windows.DescendentsWalker`1._VisitNode(DependencyObject d)
at System.Windows.DescendentsWalker`1.VisitNode(FrameworkElement fe)
at System.Windows.DescendentsWalker`1.VisitNode(DependencyObject d)
at System.Windows.DescendentsWalker`1.WalkLogicalChildren(FrameworkElement feParent, FrameworkContentElement fceParent, IEnumerator logicalChildren)
at System.Windows.DescendentsWalker`1.WalkFrameworkElementLogicalThenVisualChildren(FrameworkElement feParent, Boolean hasLogicalChildren)
at System.Windows.DescendentsWalker`1.IterateChildren(DependencyObject d)
at System.Windows.DescendentsWalker`1._VisitNode(DependencyObject d)
at System.Windows.DescendentsWalker`1.VisitNode(FrameworkElement fe)
at System.Windows.DescendentsWalker`1.VisitNode(DependencyObject d)
at System.Windows.DescendentsWalker`1.WalkLogicalChildren(FrameworkElement feParent, FrameworkContentElement fceParent, IEnumerator logicalChildren)
at System.Windows.DescendentsWalker`1.WalkFrameworkElementLogicalThenVisualChildren(FrameworkElement feParent, Boolean hasLogicalChildren)
at System.Windows.DescendentsWalker`1.IterateChildren(DependencyObject d)
at System.Windows.DescendentsWalker`1._VisitNode(DependencyObject d)
at System.Windows.DescendentsWalker`1.VisitNode(FrameworkElement fe)
at System.Windows.DescendentsWalker`1.VisitNode(DependencyObject d)
at System.Windows.DescendentsWalker`1.WalkLogicalChildren(FrameworkElement feParent, FrameworkContentElement fceParent, IEnumerator logicalChildren)
at System.Windows.DescendentsWalker`1.WalkFrameworkElementLogicalThenVisualChildren(FrameworkElement feParent, Boolean hasLogicalChildren)
at System.Windows.DescendentsWalker`1.IterateChildren(DependencyObject d)
at System.Windows.DescendentsWalker`1._VisitNode(DependencyObject d)
at System.Windows.DescendentsWalker`1.VisitNode(FrameworkElement fe)
at System.Windows.DescendentsWalker`1.VisitNode(DependencyObject d)
at System.Windows.DescendentsWalker`1.WalkLogicalChildren(FrameworkElement feParent, FrameworkContentElement fceParent, IEnumerator logicalChildren)
at System.Windows.DescendentsWalker`1.WalkFrameworkElementLogicalThenVisualChildren(FrameworkElement feParent, Boolean hasLogicalChildren)
at System.Windows.DescendentsWalker`1.IterateChildren(DependencyObject d)
at System.Windows.DescendentsWalker`1._VisitNode(DependencyObject d)
at System.Windows.DescendentsWalker`1.VisitNode(FrameworkElement fe)
at System.Windows.DescendentsWalker`1.VisitNode(DependencyObject d)
at System.Windows.DescendentsWalker`1.WalkLogicalChildren(FrameworkElement feParent, FrameworkContentElement fceParent, IEnumerator logicalChildren)
at System.Windows.DescendentsWalker`1.WalkFrameworkElementLogicalThenVisualChildren(FrameworkElement feParent, Boolean hasLogicalChildren)
at System.Windows.DescendentsWalker`1.IterateChildren(DependencyObject d)
at System.Windows.DescendentsWalker`1._VisitNode(DependencyObject d)
at System.Windows.DescendentsWalker`1.VisitNode(FrameworkElement fe)
at System.Windows.DescendentsWalker`1.VisitNode(DependencyObject d)
at System.Windows.DescendentsWalker`1.WalkLogicalChildren(FrameworkElement feParent, FrameworkContentElement fceParent, IEnumerator logicalChildren)
at System.Windows.DescendentsWalker`1.WalkFrameworkElementLogicalThenVisualChildren(FrameworkElement feParent, Boolean hasLogicalChildren)
at System.Windows.DescendentsWalker`1.IterateChildren(DependencyObject d)

Et cetera. I think it’s turtles all the way down.

0

Slashdot Beta

Yes, I admit it — I still read Slashdot. I have a certain fondness for it: I remember lurking there way back in the far distant past of my high school days. Fourteen years later, it’s one of the few sites I visited back then that is still around.

Over the years, Slashdot has been through a few changes. Recently they started rolling out a new look. Slashdot Beta has been polarizing, to say the least.

As a loyal lurker, I present my modest review of Slashdot Beta here, in pictorial form. My comments are written in Comic Sans font, so that they may be taken with all the seriousness they deserve.

First, a look at an article page. Even though most of the fonts have been enlarged, it is much harder to locate things like the article title, post date, etc.

buck-feta-screen-1
Click the image to enlarge.

Next, a look at the comments. The heart of Slashdot was always its discussion comments. Sure, it had a few problems with moderation, but the new Beta comments section seems to have thrown the baby out with the bathwater.

That’s a real shame — I visit Slashdot for the discussion on the articles, not for the articles themselves. Slashdot Beta is virtually unreadable in this respect.

buck-feta-screen-2
Click the image to enlarge your — oh, sorry, was browsing my spam folder

So what alternatives would I propose? For now, I would probably leave well enough alone.

But, in the spirit compromise, if Slashdot must change, here are some changes that I think would actually be in-line with the spirit of the site.

buck-feta-screen-3
Eat Me.

What a trainwreck. All good things must come to an end, I suppose.

1

The Tau of Pi

Pi Day. A day to celebrate that transcendental number, π. A day to eat circular desserts, and reflect on the nature of the most famous constant in mathematics.

No matter what field of science, technology, engineering, or mathematics you may be in, π probably plays a prominent part. Yet certain tau infidels dispute this.

Continue reading

0

WPF ate my Control.Invoke

Today I ran into the dreaded cross-thread UI call in my WPF application. In WinForms I’m quite familiar with the solution: check Control.InvokeRequired. If it returns True, then you’re making a cross-thread call and must Invoke the method on the UI thread. Some quick air code:

Sub Foo(ByVal bar As String)
  If (Me.InvokeRequired) Then
    Me.Invoke(New Action(Of String)(AddressOf Foo), bar)
  Else
    TextBox1.Text = bar
  End If
End Sub

In WPF, there is no Control.InvokeRequired. Instead, there’s Dispatcher.CheckAccess, which returns False if you’re making a cross-thread call. Good luck finding the CheckAccess method if you don’t know about it: it’s hidden from IntelliSense.

Most of the samples I found online (and I found plenty of blog posts) reference the control’s Dispatcher object, e.g. TextBox1.Dispatcher.CheckAccess. Unfortunately, my cross-thread call was occurring in my ViewModel, in a method that updated a property with a binding in the View. Like any good ViewModel, mine is completely ignorant of the View and all of its controls.

Fortunately, there’s a dispatcher on the Application object itself: Application.Current.Dispatcher. From there, I could use Dispatcher.CheckAccess and Dispatcher.Invoke to resolve the problem.

Hopefully this post saves someone else a few minutes of searching.

0

Unfinished Proj

My last post looked back on some of my unfinished projects. At the time of its writing, I was in a retrospective mood, and not just because it was the end of the year.

After five years with the same company, I left my position at the end of the year. Three weeks into the new year, it’s too early to say how things will work out, but I know it was the right move. Still, I look back to see a lot of unfinished business: proofs-of-concept, prototypes for products that never materialized, pet projects perpetually on the back-burner, and so forth.

Sadly, I won’t get to see them finished.

I enjoyed working both in the THINC realm and in the growing MTConnect realm. Most of my posts in this blog were about one or the other. Since my new job is in a different field, unfortunately it seems unlikely that I’ll be able to continue working with either.

To the folks who visited this blog either for THINC or for MTConnect, thank you for visiting. I’m always open to answering questions or providing quick code examples for either technology. (My ability to answer questions about THINC may be limited, as all of my documentation and libraries now reside with my former company.)

As for this blog, time will tell what direction it moves from here.