A wiki for your desktop

I have recently been exploring alternative software to OneNote. OneNote works really well for me and it is my main note-taking app. I like how I can easily organise my thoughts into a hierarchical structure that synchronises across all my devices. In fact OneNote has for a long time replaced my own memory. I mainly use it as a 'rough work book' for my own ideas, as well as a collaborative space to work with colleagues. I really like how I can make a new quick note from the taskbar in Windows 10, or from my Windows phone or Android tablet when I am on the move. I can start with a quick idea when I am on my Lumia 950 and then finish the task as a 365 document later on. On my Surface device, the OneNote notebook works very well with the surface pen and feels almost exactly like a fine line pen on paper.

In fact, although this articles will deal with some interesting note-taking applications, I do think that OneNote is the king.

There is Evernote, of course, however I have always thought of this as a poor-man's alternative to OneNote. The free version currently only allows me to use the application on a maximum of two devices at once. This limitation has instantly turned me away from using Evernote and I am very unlikely to ever go back to it.

I have used TreePad a few times. The free version allows you to organise a set of notes as a hierarchical tree structure. Your notes can be exported as HTML for sharing with others. The free version has a look and feel similar to your default text editor albeit with a tree structure for organisation. The paid for versions have more advanced features including a full word-processor style of interface and custom styles amongst many other features.

TreePad Lite (free version) running in Windows 10 showing the tree structure.


TreePad document structure of TreePad PLUS (paid for version) showing custom icons/font and other goodness. 

Treepad files (including the node structures) are plain text files, and so it is fairly easy to generate treepad files programmatically in the language of your choice.

Action Note - note taking in your action center

Another note taking app I use is Action Note for Windows. This is a note taking app that sits in your action center. I use this for taking quick notes on my phone and synchronising with my PC. I have already written a blog post covering Action Note last year.

Zim

Zim is a 'wiki for your desktop'. Just like in OneNote and TreePad you maintain your notes as a hierarchical tree structure. Each page can include text and images, with a bunch of plug-ins available including task manager and equation editor.

Zim pages are formatted in a wiki structure that allow links to other pages in the document. Creating a new node is as simple as linking to a non-existent page. Links are maintained in a simple mark-up syntax, such as :Notes:page1 or +newpage.

Zim notebooks can be exported as HTML pages with various pre-set templates. Indeed the Zim website itself was written in Zim.

I have only just discovered Zim, and as such have not got much to show for it, however I can already see that it has many advantages over TreePad most notably the fact that it is a free download; can run across Linux and Windows, not to mention the simple node creation and exporting features. Until discovering Zim, I was considering paying for the full version of TreePad PLUS, however now I don't think I will bother.

The Zim manual, written using Zim.
Video Time


Taping from the radio in 2017

How things have changed. Long ago, when I was grass-high to a knee-hopper, I used to record tunes from the radio onto compact cassette (If you are the copyright people reading this, then, no, no I didn't). I would then put the cassettes in my portable stereo and listen to them on the way to geek school. If you were young in the 70s, 80s or early 90s, then it is likely that you did the same.

An actual compact cassette tape actually from back in the actual day

When compact cassettes became obsolete, I didn't miss them. By the mid 90s I had a growing collection CDs and a decent PC hooked into my stereo amplifier in place of a tape deck; and the transition to digital format was seamless, albeit, streaming had replaced recording from the radio.

Today, however,  I found myself doing what I once had always done, except instead of recording tunes from the FM radio onto compact cassette, I was listening on digital radio on my LaMetric Time device. And instead of compact cassette I am using the feature of Cortana on my phone to identify music and then head over to the Groove app to place them into a playlist.

Cortana at work on my Lumia 950
When I said that I don't miss compact cassettes, that is something of a lie. I do. I think that there is something intangible about music on cassette. There is a joy to using them akin to tinkering with a vintage car, or keeping a retro computer alive. It has something to do with the clunk click of the rewind mechanism, or the feel of a chunky plastic cassette in your hands, or maybe it was because you had to write the track listings on a piece of cardboard with a pen. Maybe it was this investment of effort that makes the format enjoyable. If someone gave you a mixtape back in the olden days, then it meant that they really liked you.

I have often considered buying a cassette player to relive my compact cassette days. Unfortunately, apart from a small revival movement amongst some genres of music, compact cassettes are not a viable storage medium beyond the sheer joy of operating them. I have encountered a couple of virtual cassette apps, but they really aren't the same. To the current date I have avoided taping digital radio onto virtual compact cassette, but it really is just a matter of time until I do!

Tape recorder for Windows Phone, available also for Windows 10, and yes, there are a load of cassette apps for Android devices as well, I've looked.
I am not sure what the future will bring. I am hoping for an embedded brain implant that - as soon as someone walks into the room - automatically plays their theme tune into my ear, and plays incidental music so I know when I am in peril.

I can dream.

Well, that's it for now. I will of course post the moment I get a new compact cassette player. Until then, you  might like to read about some more retro computing stuff, or, I don't know, perhaps you just find out your Starwars name or something.

New characters in Have Spell Will Travel

Following some feedback from players, I have implemented some new characters into Have Spell Will Travel (and I intend to add some more soon!).

What is Have Spell Will Travel? Only the best 2D text-based adventure game ever! In #HSWT you can choose one from over two hundred characters in an attempt to complete various quests. You have at your disposal 15 statistics that describe your character. Each challenge will require you to test these statistics, however you are never told how difficult the challenges are. It is up to you to work out how best to tackle a challenge, and up to you to decide whether you will use your magical items to assist you.

Character sheet for a Dwarf Adventurer. Dwarfs are good at 'Endurance' and 'Intuition' based tasks.
Here is an example of a challenge.  The Rabid sheep can be tackled by testing one of five of your stats, but some are more difficult to complete than others. Even though my Dwarf is better at combat than hiding, it may be the case that hiding is easier to complete than combat. Success at Have Spell Will Travel is a careful blend of luck, lateral thinking and extreme violence (well, not the last one).


I have recently added three new characters: The Treant, the Feline and the Robot. Where the Treant is strong and wise, the Feline is a stealthy warrior. The Robot on the other hand is extremely tough and intelligent, however it cannot eat or drink potions; nor can it visit the healer or be turned into a Vampire. This is Have Spell Will Travel the hard mode, because it has not escaped my attention that the robot cannot replenish lost lives in any way. Maybe I will fix this in the next version, with some sort of robot puncture repair kit.

If you have read this far, then it is likely that you will really want to just click this link and play it.

If you enjoy #HaveSpell, then do please let me know (especially if you defeat Warren Fogbender, meet Bert or find the whereabouts of the Armoured Weremole).

Depth First Search in Python

Well, it has been a while since I posted some code onto these pages, so what follows is some Python 3 code for a depth-first search as I taught it to some students today.

The code uses a stack to implement the depth first search. The output shows the nodes visited.

I shall use the following graph as an example. The graph has been coded as an adjacency list using a dictionary where the nodes are assigned integer keys and their value is a list containing the nodes that they are connected to.

A graph representing a maze with ten nodes featuring closed loops. You can ignore the path leading from 9. I have chosen a maze that cannot be solved by following the walls method (it will ignore node 5)

The code:
(Also available as a download from OneDrive because it is highly likely that it won't work well pasted from the browser.)

class mystack:
    def __init__(self, size):
        self.__stack = []
        self.__size = size
        for i in range (size):
            self.__stack.append("")
        self.__tos = -1

    def peek(self):
        if self.__isEmpty():
            pass
        else:
            return (self.__stack[ self.__tos ])
   
    def push(self, item):
        if not(self.__isFull()):
            self.__stack[ self.__tos + 1 ] = item
            self.__tos += 1
        else:
            print("STACK OVERFLOW")
           
    def pop(self):
        if not(self.__isEmpty()):
            self.__tos -= 1
            return self.__stack[self.__tos + 1]
        else:
            raise StackEmpty("Stack is empty")
           
    def __isEmpty(self):
        return (self.__tos == -1)

       
    def __isFull(self):
        return self.__tos == self.__size-1


    def display(self):
        for i in range (0, self.__tos+1 ):
            print (self.__stack[i], end=", ")



class dfs(object):
    def __init__(self):
        #map is the adjacency list
        #visited keeps track of which nodes have been visited
        #stack is the stack of current nodes under investigation
        self.__map = {0: [1,5,4], 1:[2,0], 2:[3,1,6], 3:[2], 4:[0,8], 5:[0,6,9,8], 6:[2,7,9,5], 7:[6], 8:[4,5,9], 9:[8,5,6]}
        self.__visited = [False, False, False, False, False, False, False, False, False, False]
        self.__stack = mystack(10)

    def main(self):
        start = 0
        current = start
        solved = False
        while not(solved):
            try:
                print("exploring node", current, end='')
                if not(self.__completed(current)):
                    self.__stack.push(current)
                self.__visited[current] = True
                next = self.__findNextNode(current)
                if next != None:
                    current = next
                else:
                    current = self.__stack.pop()
                    print("...deadend...backtracking to", current, end='\n')
                self.__stack.display()
                print()
   
            except StackEmpty as e:
                #assume maze is solved
                solved = True
  
        print("\nMaze fully explored by dfs :-)")
  

    def __findNextNode(self, p):
        #finds next unvisited node in the adjacency list
        nodes = self.__map[p]
        i = 0
        while i<len(nodes):
            if not(self.__visited[ nodes[i] ]):
                return self.__map[p][ i ]
            else:
                i += 1
        return None

    def __completed(self, p):
 #returns true if node p has been fully explored
        nodes = self.__map[p]
        i = 0
        while i<len(nodes):
            if not(self.__visited[ nodes[i] ]):
                return False
            else:
                i += 1
        return True

   
   

class StackEmpty(Exception):
    def __init__(self, value):
        self.value = value
    def toString(self):
        return self.value



app = dfs()
app.main()



The output

exploring node 0
0,
exploring node 1
0, 1,
exploring node 2
0, 1, 2,
exploring node 3...deadend...backtracking to 2
0, 1,
exploring node 2
0, 1, 2,
exploring node 6
0, 1, 2, 6,
exploring node 7...deadend...backtracking to 6
0, 1, 2,
exploring node 6
0, 1, 2, 6,
exploring node 9
0, 1, 2, 6, 9,
exploring node 8
0, 1, 2, 6, 9, 8,
exploring node 4...deadend...backtracking to 8
0, 1, 2, 6, 9,
exploring node 8
0, 1, 2, 6, 9, 8,
exploring node 5...deadend...backtracking to 8
0, 1, 2, 6, 9,
exploring node 8...deadend...backtracking to 9
0, 1, 2, 6,
exploring node 9...deadend...backtracking to 6
0, 1, 2,
exploring node 6...deadend...backtracking to 2
0, 1,
exploring node 2...deadend...backtracking to 1
0,
exploring node 1...deadend...backtracking to 0

exploring node 0
Maze fully explored by dfs :-)



This clock is the Internet in a box

I recently bought a LaMetric Time.

What is it?

LaMetric Time is an Internet connected clock with a difference. I like to think of it as a smart watch in clock form. A smart watch for your desktop. It has just three buttons (forwards, backwards and 'action') and a cheerful LED display. Although it is a clock, it differs from your current wall or desk clock with one phrase: 'App store'.

The LED technology in the LaMetric Time defeats all ut my best attempts at capturing a good image on my cameras. See the links for better images. The display scrolls like those you see in airports or shops, or whilst waiting for your doctor's appointment. I can't stress enough how the display actually looks much better than shown in the image captured on my cheap Samsung camera above.

Setting up

Getting going with LaMetric is painless. You simply pair it with your Android device and point it at your WiFi connection. As with such devices there is a usually a software update, which it performed fairly quickly although there was no indication of how long this would take. Ultimately, it it not take long. The device picks up the correct time from time servers on the Internet and you are good to go.

LaMetric Time is a clock...durr!

As you would expect, the date and time are displayed in big bold chunky 8-bit-style characters. There are also apps for stop-clocks, calendars, timers, alarm clocks and count-downs. You can set LaMetric so that it displays just the time, or a single app, or you can have it cycle through all the apps. You can even customize for how long the apps display on screen.

One really nice feature is the sunset and sunrise time. I like having this information on my desktop. It also shows the number of hours of sunshine (important as we move from our vitamin-D deficient UK winter into the ever-so slightly brighter months of summer). You can also choose to show the moon phase, which keeps me happy, and could help avoid any unpleasant entanglements with werewolves. Again.

LaMetric Time is a Radio

Initially I was disappointed with the 5 preset radio stations my LaMetric came with. That was until I found the 'plus' button which lets you add from over 3000 Internet radio stations including those you also might expect to also get on FM radio. There is an audio-out socket at the back and I have mine hooked up to my stereo pre-amp. The sound quality is really rather good.

Message Board

This app turns your device into one of those scrolling display tickers you see in shop windows. If you feel like you need one of these in your life, then maybe you are a shop window, or you own one. I haven't found a use for this yet. I am not sure why I would want to display a scrolling message to myself, however I guess this app is for people you want the LaMetric to be a public-facing device.

The LaMetric companion app interface running on my Samsung GT-N5110. Just press the plus button for more apps!

All the other apps...

Although not supported quite as well as other smart products on the market, there is an app store full of all-sorts of stuff for you to personalise your desk clock. One of my favourites is the hugely pointless 'Coffee Counter', which tracks how many coffees have been consumed by LaMetric users (actually it keeps track of how many times someone has pressed the action button whilst using the app, but close enough). Somehow this helps you feel closer to other coffee drinkers.

The Asteroid Today app shows you how close we as a planet came to a collective inhalation today. Phew. Most of them miss.

Scrolling through the apps in the app store I can see dozens of apps both for productivity and entertainment: News headlines, motivational quotes, Facebook fan counters, Chuck Norris jokes, London Underground status and Weather to name just a few.

Furthermore you can connect your LaMetric time to other Internet of Things such as the Amazon Echo or Hue lights. Or you may just wish to use it to stream music from your phone through the Bluetooth speakers.

The really cool part.

LaMetric gets really interesting when you connect it to your IFTTT account. If you didn't know, IFTTT lets you connect all your favourite online services (well, perhaps not all of them, but more are arriving all the time).

With IFTTT you can create 'applets' or 'recipes'. Litterally, if this happens, then that should happen. There are two ways this can play with your LaMetric. This first is so you can receive notifications on your LaMetric in the form of a notification sound, icon and short message, and the other is through the IFTTT indicator app. This leaves a permanent message appearing on your device (until the next message appears). You can also use your LaMetric device as an IFTTT 'do' button, should you so desire.

I have found it most useful to receive notifications whenever new YouTube videos have been uploaded onto my favourite channels. I wouldn't want to miss the next Lindybeige.

I have other applets set up to inform me of new tweets, mentions or followers on Twitter and other social media including Yo. I get a notification whenever the International Space station passes overhead along with news and weather from Mars. I even have a notification telling me when my bedtime is (it was twenty minutes ago).

In fact, there really is no end to what you can do with your LaMetric once you have IFTTT working with it. I suggest you head over and buy one now. They really are an awesome tech toys.





Don't believe me? Perhaps this video from Techmoan will be of interest to you.



Or, perhaps you would listen to the Elders of the Internet?


That's all from me for today. +1 geek experience point for LaMetric Time (even though the calendar app does get the date format wrong!)

PS. If you enjoyed this post, then you might like my RSS news ticker for Raspberry Pi.

Label