Understanding Twitter

Newsgroups, forums, blogging, Facebook, Google+, etc are all things that I understand fairly well. Twitter less so for me, as it’s not a service that I ‘use’. Some people I know use Twitter but mostly it’s just businesses and marketing, and I don’t care about any of the businesses I like that much to listen; so I’ve little use for the service.

Viewing someone’s tweets reads off like a list of short messages, similar to the blog model (e.g. like a Wall post on Facebook) which almost everyone understands these days. But it includes the users comments inline, along with their comments (replies) on other peoples posts (tweets). In a way, it is coser to the newgroup/forum model where in you have a node that fits into a ‘thread’, yet the head of the thread is just a normal post (node). In the blogging model, it’s somewhat different because of the emphasis on the blog comment.

This makes it rather disconcerting to look at tweets for the initiated. From first glance, it’s like listening to a twittering bird that not only talks to the open air (hello you Facebook mob!) but also to its imaginary friends. By clicking the tweet (look for the icon top right) you can see the thread and explore the relationship between tweets. It’s a decentralized version of how forums work; instead of defaulting to viewing by topical thread, your default view is by the user.

If that last paragraph makes sense, particularlly the last sentence: you now understand Twitter. Or I’m missing something lol.

What remains to be seen until the course of history has advanced much further, is whether or not any given model (newsgroup, blog, twitter) will become the universally accepted model of communication on the internet. Twitter is a leg up over using a mail client that doesn’t do threads (eww) but I personally prefer the newsgroup model, but profese, twitter is an interesting data model for machine processing to whatever corporations will do to profit from that data model.

Definitions:

Newsgroup model
Someone starts a topic, other people reply; replies and topic starts are all the same thing (posts) but things are usually collated into “Threads”. Examples include USENET, mailing lists, and forums.
Blog model
Someone blogs an article, other people comment; comments are distinct from the content and may be deemphasized depending on the platform. Examples include Blogging and Facebook.
Twitter model
Someone tweets a short message, other people may publically or privately reply . All nodes are equal and connected as in a shared thread, but are collated by “Users” rather than threads.

Thoughts of modal/semi-modal editing on Android

In regards to modal, I mean `like vi`, where in the keyboard is shifted between a normal “Command” mode for manipulating text and an “Insert” mode for typing text into the buffer. A prime example can be found by learning vi (or vim or elvis). Personally I think this kind of model fits well with a mobile device like Android, even more so than it does a PC—emacs pinky be damned ;). Which makes me think of something like this:

  • A simple “Notepad” grade editor
  • Press a designated command key, send following keystrokes to command dispatcher
  • Useful stuff: save/load, buffer list, etc.
  • Scripting/configuration language

Something uniquely respective of my vi/vim heritage, yet incorporating lessons from the emacsen school. As a former XEmacs user, I do know quite well that my beloved Vi IMproved is not always well subverted. Using the volume up/down keys (and settings to rebind ofc) would make perfect replacements for Control and Meta (Alt/Escape). Using a keyboard with suitable keys, obviously eliminates this: and for on screen work with a big enough display, I really have to reccomend The Hackers Keyboard. It is an interesting preposition, at least. For scripting language, that one is a stickly wickly one. Android is not well suited to this in the conventional sense. Unless you want to implement one in a suitable subset of Java (double barf). An interesting idea would be to compile something like Lua or a Scheme interp’ to native code, and communicate with it using some type of local socket and RPC. That might be interesting to toy with. Then perhaps, “Plugin-lets” that add useful tools, such as busybox or git. That’s less feasible but certainly interesting.

Evernote sucks

Thumbing around the Android market, the Evernote app caught my eye again. So I decided why not give it a go, it’s probably the best note taking app for Android (and I admit, it probably is). Thus I installed the app, created an account, and went about setting up the Windows app for my desktop.

Last time I went searching for a note taking app, I settled on the Viki plugin for vim. I probably entertained a several dozen stuff, including Evernote. It never made it past the information gathering phase, since it lacks support for Linux and *BSD. Having adapted an ASUS Transformer as my primary system, Android support is now good enough. Evernote AFAIK is widely used and reasonably respected in the business of note taking software. No wonder—it’s about as useful as a notebook and a pencil.

I am not your “Joe” note taker, that I will admit. My notes are frequently pre-processed data. Things where re-parsing it back into my head and bringing order to notes is fairly important.

The desktop application failed glaringly as less than ideal support for:

  • Concept of sectioning is limited to font size/style and horizontal rules.
  • Structure is limited to indentation, bulleted lists, numbered lists, and tables.
  • Cross referencing data is primitive but effective.
  • Support for “Snippets” of formatted content is limited.
    • as in sample commands.
    • log data and program outputs
    • definition lists.

The Android tablet application despite the awesome user interface, suffers from all of the same plus the following gotcha’s when editing text notes:

  • Indentation is gone.
  • Adding links is gone.
  • Font styling is gone.
  • Adding tables is gone.
  • It’s to dismal a prospect to test how links, indents, font styles, and tables render when viewed in the app.

Simply put, ever note is more primitive a note taking system than Microsoft Word, and it’s only advantage of adding something like Dropbox or Google Docs to that mixture, is the sync feature. In fact this blog editor is much more powerful than Evernote, even more so because it can take raw HTML.

For a stress test to evaluate if I could tolerate life with Evernote, I tried to reformat one of my notes files from Viki by copy/pasting the content and adjusting. The note consists of numerous sections/subsections  (at least up to 3 deep) and various lists, links, and pre-formatted data; nothing you can’t do in raw HTML, LaTeX, etc. Or even plain text if you roll your own conventions as per org-mode or deplate.

After about 80% of the file, I  just gave up as it came to my mind that “Evernote is about as sophisticated as using a notebook of paper and a pencil, so why don’t I use that?”—It is just so far underpowered that I would get more value out of notepad.

Some could say that I’m being too strict, but hey, I am strict when it comes to software that I will spend *excessive* amounts of time using. If I really wanted to nit pick, I would mention the lack of folding, not that I expected that from an app focused on “Notes”.

Fun with tmux & dtach

Generally the problem with running a terminal multiplexer like tmux or screen on a remote server: is if the server goes down so does your session. Like wise an issue will eventually crop up where in you have to SSH into another server or even the box you’re sitting in front of, if you don’t want a seperate xterm in order to do it; thus losing all that multiplexer goodness.

Well, I pretty much run the session (tmux btw) on my system, and then use dtach for running things I may want to detach from—like a big compile. One perk of this is I get to have my “notes” window in tmux without double the latency.

Today, I was thinking about how can I link this notes window to various tmux sessions? It is possible to link windows (linkw) in a session and entire sessions (new -t {other session}) but that is not what I want. dtach again to the rescue! My notes script already amounts to opening my “Scratch” note file in vim, and changing the window name to “notes” if used in tmux. So I modified it to be smart enough to run vim in dtach, or reattach. Thusly, I can have tmux sessions by project, home, etc, and share the same vim session between them using dtach.

Note tacular!

Ramblings on Electronic Books

Of recent, I’ve been doing a little studying on the issue of ebooks, primarily because I tend to be tighter on shelf space than disk space. For some stuff of interest to me, I must say, the digitial solution is usually cheaper: perhaps up to 40% or less the list price. Although that being said, I usually prefer “Used” books on the cheap to new books at full price, but the nearest decent used bookstore for years has been is Amazon o/.

Two major retailers of books in general exist that are worth my investment: Amazon (Kindle) and B&N (Nookland). Kobo looks intensely interesting but within minutes of checking their website, I do not trust them with my billing information.

Now I may be a major cheapskate but I don’t mind buying what I want, in fact, I prefer it—if it gets me exactly what I want. In the case of the Kindle and Nook stores at least, it is pretty much there. The problem is DRM. You can read it on a PC, a Mac, iOS, Android devices, and their own reader devices.
Well guess what, I prefer a PC but their software doesn’t work on mine. My PC’s run Linux and BSD based operating systems :-).

This creates a bit of a irk for me: why should I give them my money, if they will restrict what I can do overtly? Generally, I would choose the Kindle store as a matter of taste. The problem is each store’s DRM prevents me from using the devices that ***I*** wish to use at my leisure, so it is little better then requiring their hardware. Given the choice of using my cell phone or remoting to a windows or OSX box to read from Linux and BSD, isn’t what I call fair enough versus the cost of a real old fashioned book I can lay in bed and read.

Honestly, I am not against DRM in concept, only how it is typically executed. Because if it is much more complex then email + password + auth token = decode and enjoy content, ala setting up Dropbox on a new PC (to access your content). It is not managing my digital rights, it is removing them. IMHO the only practical form of DRM for books and the like: would be the kind where someone is unable to access the material in _any_ form, unless their DNA matches the DNA of the person licensed to access (read) it, and any violation results in automatic punishment; such as content erasure, imprisionment, etc. Even if locked down expicilitly to the ebook reader’s hardware, and somehow hardware hacking was prevented from being possible—it would still be a failure: because you could just photo copy the screen the same way as pages in a paper book. So in the end, we end up having to pay the price of assholes trying to outfox assholes o/.

The subscription model is better: pay x/cycle for such and such content. That is probably closer to what some DRM-folks like in the music indrustry want anyway, making profit off each playback rather than each distribution of content 8-).

It is very strongly worth noting that in general: I am very against dedicated devices like the Kindle or Nook, when you could spend more and get a more general purpose device like an Android tablet or iPad. I’m not willing to buy one of those for myself until after Ice Cream is mainstream, so I really should just buy a darn Kindle 3. It’s only like $140 with the 3G option, and I am more applicable to buying a Kindle then dealing with trying to get around the DRM issues.

While it’s limited to technical books, I really would consider something like Safari Online Books to be a much better investment but I want more than what it can offer. I’ll likely begin evaluating things more closely in the near future, as well as setting up Safari for a trial. Safari has the best techy publishers in my experience.

Paste it!

A while back I was thinking of setting up a personal paste-bin, but obviously that means finding suitable software or writing it. In my case, I’d rather like one that is locked to me or restricted to logins I issue.

But it just occurred to me, that having sufficient access to the system, I can just use vim’s :TOhtml command to export a file as HTML, upload it to a designated area, and have the web server pick it up. Then use a cron-job on the server side to clean out files in that directory every now and then.

Yeah.

Perhaps, how not to do Open Source Software!

In grepping my feeds, I noticed something interesting about Diaspora finally hitting some recent publicity since my last check in. For those not in the know, Diaspora is meant to be a replacement for Facebook. The idea is good, basically take everything you could bitch about privacy issues on FB, fix it and roll it out with a distributed system that gives you as much control as possible over your stuff. I agree with Mark Zuckerberg (the FB guy) that Diaspora is a cool idea, really it is because of the decentralisation.

From what I’ve been reading about their first code drop however, I must say that it does not seem to be off to a very good start. A system that, to my knowledge touts privacy and security (compared to Facebook) as one of it’s strong points, obviously should not premier with more leaky holes than a Windows 98 demonstration. As much as I would like to crack a joke at that old relic, I can’t help but think how well Bill Gates took that incident in public. Old farts and fellow history lovers might see the inner-humour in that comparison. (Yes I used ’98.)

Being able to get a lot more eyes on target and the freedom in which fixes may flow, is one virtue of open source development, especially if you have enough people with a vested “Interest” in the projects outcome. There are many people who would like to see something like Diaspora succeed, and among them surely, more than a couple people willing to contribute aid towards that end. In a closed source environment, problems like that found in Diaspora would have only been findable by playing around with the release, and consequentially only fixed by the original developers a long time after attacks went wild. Like wise investors would be a different sort. Yes, even power users do glance at how their software works, let along crackers. Of those who really are looking closely, most are probably the dregs of the Internet or paid for the job, and either way it would be bad to bank business on the kindness of others. To my knowledge the only profit in finding exploits, is what you can slurp out of saps before it gets patched.

In the first article I checked out, some of the (now fixed) defects highlighted from Disporas code base were just blaringly, “WHAT THE FUCK WERE YOU THINKING!?” kind of problems. In the least, several of them are on my heads internal list of “No, No” to check before wrapping up. It makes me think the masterminds behind implementing the thing, were woefully unprepared for the task: web development is no easy task—and it is best if you take an anal approach to security early on, in my honest opinion.

The thing that irks me however, is who should be fixing those kind of things? Most of what I’ve seen highlighted should have been fixed before the code even left the developers workstation, if you go by my coding ethic. That gives my mind a moment to think about student-programmers, but this isn’t a rant; yet. Any way you slice it however, it is no the whole wide world of Open Sources job to be fixing everybody else’s code! Before you put your name on it, geeze, make sure it smells like a roll before you get rolled. I don’t mean to say anything against the developers… but this is looking like the start of an epic failure. Sadly.

Misc thoughts of a lazy programmer

Since opening a chequeing account, I’ve maintained a simple text file in my home directory, that takes the format:

YYYY-MM-DD +nn.nn // comment about this credit
YYYY-MM-DD -n.nn // comment about this debit

where the entries track the actual flow of money, not what’s in the chequeing account and what’s on my person at any given time. That’s the banks and my job ;p. Basically from this file, I know when I’ve spent or received money, how much, and approximately why. A quick compile of that against my bank balance and petty cash results in an error check: if the sums don’t match, something didn’t make it into my records! Since the file provides an obvious backtrace, it’s trivial to check things against memory/receipts for anything that’s been missed.

Now being a lazy S.O.B. why should I manually write out the entries in vim and do the math in CL? Well, arguably I could just implement a program to do all this for me :-).

Some people utilise spreadsheets, which is more work than it needs to be, until they become more advanced or more thoroughly programmable, not to mention. Namely I’m to lazy to use things like =DATE() and argue locales when I could use something else. There is also a ton of financial software in the world, but reading the manual tends to take longer than writing it, and many are overkill.

My thoughts? Either a small local program or web app would be perfecto. Finding one of the latter should be as easy as using Google or taking 20 minutes to write one. Decisions, decisions :-).

The thing I have against “Canned webapps” that some business runs, is the lack of control: it’s impossible to hack the code quite the way as something home brewed.

The STAMAN Project: Phase IV,

Having thought of tasks and storage formats, it’s now time to figure out an implementation language, i.e. what programming langauge am I going to write the task manager in.

O.K. based on what we’ve got so far, it is easy to infer the following is worth having:

  • Portable between systems—a must for me 😉
  • Easy access to SQLite—usually trivial.
  • Better tools than gmtime().
That means this page is rather useful, for what languages can be ruled out. In my répertoire this means Go (aww), Scheme, AWK, and shell languages can be skipped. Reason being the portability of Scheme bindings in general, and the others lacking sufficient portability (for my taste) at this time. That still leaves about 13 languages, lol. PHP, Java, Lua, JavaScript, and X86 assembly are easy for me to rule out. Reasons for that can all be easily guessed; at least if you remember how much I enjoy Suns Java tools. JS/Lua are great choices but I don’t want to screw with the bindings and stuff.

I’m not very interested in compiling SQLite in C/C++ on Windows, or the CLI binding everywhere. So this effectively makes the choice Perl, Python, or Ruby. Out of those three, none is perfect either: perl doesn’t come with the required database code, it just has the definitive interface for databases everybody mimics. Python and Ruby on the other hand, come with SQLite bindings—which many distributions separate out into separate packages. It’s just a lose, lose situation when you think about dependencies, but it does beat writing your own everything for every program. Sometimes. Setup with these three dynamic languages would be easy though, in so far as we’ve gotten with the above.

Time handling is another issue. Perl has fairly minimalist handling of time built in, but on the upside, if you need it, it’s probably three abreast on CPAN. Time::Format and the core Time::Piece module each come to mind. What isn’t built into Perl, often comes with it or can be added to it. Ruby provides a simple but effective Time class, that makes for more natural code than you may expect. More complex operations will require Googling for a Ruby gem, or hand coding it on demand. Python on the other hand provides a comprehensive datetime module, and supporting time and calendar modules, all out of the box! I would say Python takes the lead here.

Rule one of getting work done: know how to leverage libraries.

In terms of programming languages, Perl, Ruby, and Python are generally equal enough for most tasks, so long as you don’t shoot yourself in the foot. Some subtle differences that personally irk me:

  • Perls autovivification can be almost as much a miss-feature as it can be a convenience. You’ve just got to learn the damn language :-P.
  • Ruby functions are not first class objects! Some things can also be weird if you’re not used to Ruby.
  • Python doesn’t always stand up well to typos, especially if they involve indentation o/.

Because of how many lines of code I’ve done in Python over the years, I am more familiar with it’s set of “Irks” than Ruby’s, like wise I know Sh, C, and Perl more intimately than other languages, so I really know their irks. For perl, it’s mostly thin things that get in inconvenient when combing the warnings pragmata with the nature of perl syntax. They spiritually conflict at times. Under Ruby, I mostly find gripes that have a bigger place in programmer culture. My issues with Python generally have to do with trade-offs that I disagree with as a matter of my convenience, even if it usually results in a Good Thing overall. It comes from a C-oriented background meshed with a love for the Perl programming language.

This is a fact: you will always be irked by your programming language, if you use it enough. What can I say, nothing is perfect. Shoot!

For this particular application, there’s some things worth noting also: language portability. If the machine doesn’t run perl, it’s not a real computer. Most systems you’re likely to care about will run Ruby and Python, and there’s probably a crusty old version of Python for those you don’t (nor directly should). In contrast however, Perl is often a lower level of “Cross platform” behaviour than Ruby/Python. You’ll find this highlighted well in the Camel book. One reason I use Python frequently, it always behaves as expected without so many subtle hiccups.

How much this pertains to the current matter, i.e. implementing STAMAN. Perl is the most universally available language, and I’m more prone to need such a feature than most people. A plus over Ruby is no crappy 1.8.x/1.9.x porting issues…! Of course however, I have a camel to ask about minor details, hehe. In my experience the Python 2k/3k thing is less issue than Ruby’s for writing code yourself, more of an issue in leveraging existing code.

So I reckon, that means Perl or Ruby is best called for here. I exclude Python, because I just use the frick’n thing to often.