de.velopmind | The Det about Programming

January 20, 2013

Time is running …

Filed under: Uncategorized — de.velopmind @ 1:23 pm

Wow, time is running!

It was a really shocking experience, when I realised that my last post is far more than a half year old.

I am sorry that I could not follow up my series about Functors, Monads and Applicatives as well as I wanted, due to heavy workload, and I hope that I will be able to post more in-time than last year. We will see.

In the meantime I thought about how that whole stuff could be presented more graphically, as sometimes images are better suited to create a mental model about stuff than only text.

So you can expect me to present some more on that topic in the future. (No promise about time, though).

April 25, 2012

y ( is ( 6 afraidOf 7 ) )

Filed under: Scala, Uncategorized — de.velopmind @ 5:49 pm

Or: What happens when a simple number joke meets a bored Scala developer …

Save the following code into a file, e.g. named Fears.scala.

type Reason = () => String

class ReasonedState(val state:Boolean, val reason:Reason)

case class True(why:Reason)  extends ReasonedState(true, why) {
   override def toString() = "yes"
case class False(why:Reason) extends ReasonedState(false, why) {
   override def toString() = "no"

class Fears(value:Int) {
   def afraidOf(other:Int) = (value,other) match {
      case (6,7) => True (() => (7 to 9)" "+_))
      case _     => False(() => "nothing to fear")

implicit def numbersFears(nu:Int) = new Fears(nu)

def is(rs:ReasonedState) = rs
def y (rs:ReasonedState) = rs match {
    case rs:True => "because "+rs.reason()
    case _       => "wrong question"

Then open the Scala REPL in the same directory as the file you saved and type:

scala> :load Fears.scala

Now type:

scala > y ( is ( 6 afraidOf 7 ) )

…and enjoy the result.

Tip: If you don’t already know it, read the input and the result aloud (in english).

August 21, 2008

mozconcept – Bookmarks, Files, Tags => The Resource Browser

Filed under: Uncategorized — Tags: — de.velopmind @ 10:55 am


This draft describes a coarse idea I had shortly when I tried to reorganise my Thunderbird mail folders as well as my harddisc folders.

As I recently got knowledge of the Mozilla Concept Series, I will now try to describe this idea in a Mozilla related context.


As part of the concept I will present suggestions about improvements in the bookmark maintenance:

Currently Firefox is able to display the bookmarks in a sidebar, what is a convenient way to overview them. The Firefox 3.0 is also able to mantain tags for the bookmarked links.  Unfortunately, the sidebar view seems not to be possible to list the bookmarks based on tags instead of folders . Also there seems to be no way to hierarchically organise tags or add tags to a bunch of already existing bookmarks afterwards.

For the concept described here, the usability of tags has to be strongly improved.

The Sidebar should list the tags, where tags are organised in hierarchical order (say: a tag can be tagged ) and the tag-tree can be expanded or collapsed like the current folder view.

More about Tagging

Tagging is the basic concept of organising bookmarks, so no need for folders any more. Even the symbol bar detects what to show by selecting items with the predefined tag ‘sidebar’.

Thunderbird is able to set tags on mails too and to store searches for them. Beside the fact that hierarchical organisation is missing, it is a good first step in the direction I imagine. By organising tags in hierarchies and using a tag tree instead of a folder tree, mails could be organised better.

Google Mail is a fine example too.

Filetypes and inline editing/reading

Firefox is able to start plugins based on file types and so to display downloaded files in a firefox window. The Acrobat Reader plugin is a good example.  This should be enhanced to more filetypes.


The management of files and folders on disk should be enhanced.  At least and most of all it should be possible to find a file or folder(!) on disk and store this as a bookmark.

Currently when opening a file on disk via the Filechooser dialog (Menu: File-> Open) or by starting an external application, an empty tab is shown, without the file url displayed in the address bar. This makes it extremely annoying to find a file on disk and bookmark its URL.

With a specific Fileexplorer plugin, a folder content can be displayed in a window/tab and allow for the typical file operations (open, rename, delete, copy and paste, show properties).  A file or folder marked in this view could be bookmarked easily.

Email-Client integration

With a specific mail client integration (plugin) , mails could be presented in a window/tab and accessed by a URL.  That can be imagined like a local pendant to Google Webmail.

Contacts integration

An additional plugin can maintain a local address database containing contact information, where each contact is referred by a URL.

This contacts, you may guess, can be bookmarked by tagging.

Extending the tag concept

The tag concept can be extended to more flexibility, when instead of only listing the maintained tag hierarchy in the tag tree (so finding bookmarks according to “where tag = x”), you can store queries instead. A simple and automatically created query would be the one-tag-query mentioned above, but queries like “tagA and (tagB or tagC) and not tagD”  would be possible to organise bookmarks even better.

The combinating usecase.

Taking all the above mentioned approaches together,  local files, and emails would be bookmarked using tags in the same way like web pages.

By this way you can organise all information resources (local file, web link, mail, feed) relating to a common topic together, while on the other hand the physical location of the resource is unimportant.

As a resource can be bookmarked with more than one tag, each resource can be listed in different result sets.

You are now free to organise your resources by defining meaningful tag sets and to work with all of them more topic oriented instead of resource-type and physical-location based.


I am a musician playing in a band and organising some technical stuff for it, as well as maintaining its website.  When we plan our rehearsals or gigs, we do this by mail.  Beside that, I have documents containing lyrics or leadsheets on my hard disk, as well as some mp3 files.  One of the band members, Arthur, is my very close friend. You can imagine that we are not only communicating about band stuff.

With the current approach of organising resources, it is so:

I have a folder “band” in my email program, as well on my hard disk, as well as some weblinks in a “band” bookmark folder.

I have a folder “techstuff” in my email program, as I am subscribed to a sound tech mailing list. I have a folder “techstuff” on my hard disk, where I collect PDF manuals for my music equipment at home. I have a bookmark folder “techstuff” in my webbrowser, bookmarking links to articles and vendor websites.

Not all about the band is tech stuff.  Not all tech stuff is about the band. Not all mails about the band are from Arthur.  Not all from Arthur is about the band.   Not all about the band is in my email account. Not all tech stuff is on my hard disk.

Showing all different resources which share a common topic in a plugin based tag aware meta-explorer seems to be the future killer application.


This article roughly frames the idea of an integrated browser application for maintaining the different digital information resources in one place.  None of the ideas mentioned here is new, some may even exist or be easily made possible with current Mozilla applications.   But as far as I see, it is not possible today to realise the combining use case if your resources are not fully located on the web.

Blog at