Friday, January 30, 2009

Idea: Working Diagrams

This is an idea to represent working systems. Working applications are manifested by the files that they are comprised of. So the idea is to rely on expressing the nature of the application using those very files. This is pretty similar to what anybody usually does when whiteboarding out an application - draw boxes representing pertinent pieces of the application. The boxes could be the whole application, or a part of the application or a line in a file of a part of an application. We then draw lines to represent relations that we're interested in. Specs like UML try to formalize this, but for most purposes, we dont need it to be true to the spec - just understandable enough. And there are representations that UML still doesnt (and probably wont) have in it that we'd like to represent - eg the call chain of our build xml's for example, or how two bash scripts relate to each other.

So the idea is to create an app that given the following input, spits out a graphviz (or eclipse emf/visio/jpg/whatever) diagram of the relationships represented by the input.
* one or more dir paths which are considered the nodes of the graph
* each directory and file is a node
* each directory is a hierarchical node and can be folded/unfolded
* a list of plugins that help to identify relationships expressed in each file that can be parsed using, for eg, regexes. The idea of using regex is to to avoid parsing the whole file. Though there's nothing precluding actually parsing the whole file. Eg, a java file plugin would contain regexes to identify method calls and create relations to external classes used as arguments.

Version 2:
Make an interactive version of the output that can be folded/unfolded at will.

Uses:
* Point the tool at your deployed app and get your whole deployment stack displayed as a diagram.

Note: The notion of a file can be generalized to anything whose representation can be queried for interesting relations. Consider, for example a process tree visualization by traversing the /proc directory in unix, and now think of a tool that translates a windows process list into something similar for processing by this tool

I call it Working Diagrams. Its informal and works for purposes of conversation and discussion.

Sunday, January 25, 2009

I wonder if there's antisocial networking, and webapps for that

I'm a reluctant participant in the whole social networking thing. Must be my INTJ personality type. But as I get connected into facebook and its ilk, I wonder: how about antisocial networking?

How about a bad mouthing network? This was an idea that i got separately as well - a venting wall where anybody can enter some person's name, and rant on how that person ruined their life, and how they hope that person went to hell. I'd call it cheethoo.com, which should be obvious to anybody from bangalore.

but as i think about it, the possiilities are endless. How about an anti-facebook? When you login, it'll tell you how many new people are not your friends, and therefore you can safely ignore. It'll have an app called fortress of solitude, where nobody can get you (except maybe lex luthor).

Tongue in cheek post, this; but shows my frustration with the whole social networking thing. Do we really need to know everthing everyone is doing right now?

Update: I googled anti social networking after I wrote this up, and apparently this is a solved problem.

Saturday, January 17, 2009

Auto indexer

Over the course of my adult life, I've had 1 desktop, 3 personal laptops, 2 official laptops, and a blackberry. Of these, at least 1 personal laptop, 1 official laptop and 1 pda of some sort are actively used depending on which one i'm closest to at the moment. My data, notes and files, therefore, are splintered across all these repositories.

The idea is to have an auto indexer that allows me to retrieve the location of a piece of information regardless of where it is. Essentially, the moment I create a document, it must be indexed with the central repository so that whenever I'm interested in that document, the repository should be able to point me to the location of the document, and possibly allow me to (pre)view it instantly on whatever machine I happen to have handy.

OS Ideas: Tagging FS

I'm sure this has been thought of, and probably implemented, but here goes anyway:
The idea is for each "file" in a filesystem to be tagged instead of put into a hierarchy, and the tags themselves are used as the organizational structure. Tags will be just one of the attributes allowed to each file, so adding meta data will be easy, and even encouraged.

Add to this the ability to organize tags into hierarchies or graphs and you have all possible organizational models available to the user.

Finally, search will be the default mode of finding a file - either by its contents, or its attributes, with tags getting special status.

Other applications: version could be another special tag understood by the file system framework, allowing files to be versioned intrinsically.

All of this of course, will be horrendously slow; but wonderfully flexible as a result :)

Painless Timesheets

This is an idea I got while listening to a few colleagues griping about filling out their timesheets. Nobody I know likes timesheets. Yet everyone has to fill them out. So is it possible to make them at least tolerable?

I think maybe.

There are a few programs out there that monitor you while work. PTM is one - it looks exactly like the windows task manager, but it tracks what you're doing automatically, and you can then map it to a set hierarchy of tasks that you set up and it will generate summarized and detailed reports based on the hierarchy.

What if we used a program similar to this to capture how time is spent, use inputs both from live monitoring and scheduled information. Further we make the mapping simpler by providing the ability to tag any timeslice with multiple keywords, and a means to map keys to a hierarchy or graph - whatever makes sense to the official timesheet system. Finally we provide a browser plugin or expect/mechanize type mechanism that auto fills the fields so that the user doesnt have to ever enter time. To top it off, we make the whole system pluggable so multiple timesheet systems can be supported - and extended by anybody.

Advantages:
  • User entry is automated, and never requires remembering what was done in the past
  • We use the best evidence in hand - calendar info, and actual tracked time on pc
  • Its still not big brother as there's no reporting to anyone but the individual
  • Data entry is also automated.

Tuesday, January 13, 2009

Learning Haskell -1

I started learning Haskell as part of "learning a new programming language every year". Here's the frist post:
Am using Real World Haskell, first ed, as that's whats available on Safari books.

Notes:
  • Installed Hugs, then ghci cos the book uses that, and there're sufficient differences in the output of the interpreters for me to not bother about it.
  • Have started reading about types.
  • They are strong, static and inferred.
  • Type names are Capitalized
  • ints are signed, fixed width integers dependent on the machine word size.
  • Integers are signed integers of unbound size
  • Add :: TypeName after a declaration to set the type. Mostly not required
  • function args are written after the name without ()'s or ,'s. Eg fn arg1 arg2
  • lists are written as [item,item,..]
  • head and tail work similar to lisp car cdr.
  • Strings are character lists. So tail "abcd" returns "bcd"
  • Tuple is a collection of items of different types. Witten as (itemofType1, itemofType2, ..)
  • () is the type and value of a tuple of zero elements, called unit.
  • take, drop work on lists
  • fst, snd work on tuples. due to strict typing, we cannot define a fst fn for all kinds of tuples, only pairs.
  • Side effect explained: If a function is dependent on a global variable, each run of the function will differ based on the current value of that variable, which alters the way it executes. And therefore, even if it doesnt ever change a value, it has a side effect.
  • Pure functions dont have side effects. That is, they're idempotent - every execution of such functions return the same value. Kinda like GET.
  • Impure functions have side effects. They are identified by the Monad tag before their type. Eg:Prelude> :type readFile
    readFile :: FilePath -> IO String
Next week:

2.9. Haskell Source Files, and Writing Simple Functions

Sunday, January 04, 2009

A pc my 2 year old can use

My kid already can use a pc - minimally. She knows how to start a pc. With the right settings she manages to get it to hibernate. She figured out all by herself that hitting the space bar will pause and resume video on youtube and windows media player.

The key to her ability IMO is following simple rules: She presses the biggest buttons, and recognizes simple patterns. I was wondering if it were possible to create a controlled environment where everything is consistent with what she knows, and therefore she's able to use it better. Some of my ideas:

Direct manipulation: these are based on my observation that she sometimes doesnt make the connection between hitting a key/clicking a mouse and the action it triggers on screen. No fault of hers, imo, its akin to Pickard talking into a mouse.
  • Use concepts from Johnny Lee's wiimote project to create a direct manipulation display for her
  • Combine this with creating a projection tv using projector panel + OHP to make a viewing + playing + learning environment for her
Sandboxed input: These are based on the earlier mentioned observation - she tends to hit the larger keys, or the ones at the edges. So the idea is to put a fixture around the keyboard that allows access to only those keys. Or put on a template such that all the usable keys are highlighted in red, and the others aren't. And the usable keys would have simple one-to-one mappings to actions -eg, start, shutdown, run video, pause/resume, play (gcompris) game, nav keys. Similarly, the mouse too would be in controlled mode - no right click, click=double click, etc.

The good part about sandboxing is that it allows her to learn, and as her understanding expands, I should be able to scale up towards full keyboard and mouse functionality and this enables her to be productive with existing hardware sooner.Need to research laptop templates for this.

Easy Interface: The OLPC's Sugar UI comes to mind. But methinks an even simpler UI is in order to get her to understand how to use things - with a lot of association thrown in. Eg, really large buttons on the screen, that are the same shape, color and location as the keyboard. Icons that are the same on the keyboard as well.

Scheduled Programs: This is an idea I got from noticing that my kid seems to gravitate towards one of the screens we have at home (no tv, but 4 laptops and 1 dvd player) automatically, and turns it on - invariably to her favorite dvd or cartoon. What if the laptop came up, and the only option allowed at that time was to play an educational game? Or maybe if she's already done one ed game, it shows a cartoon as a reward?