Thursday, November 8, 2012

Write your own web browser in 9 lines flat

This web browser in 9 lines of code comes to you courtesy of the awesome python bindings to the webkit renderer on Mac OSX, WebKitCtrl. One simply defines a window and drops the webkit renderer in, done!

First, make sure you have installed wxPython

Then drop this code into a file called browser.py :
import sys
import wx
import wx.webkit       

theApp = wx.PySimpleApp(0)
theFrame = wx.Frame(None, -1, "", size=(640,480))
w = wx.webkit.WebKitCtrl(theFrame, -1)
w.LoadURL(sys.argv[1])
theFrame.Show()
theApp.MainLoop()
You launch the browser from the command line, passing the URL to go to as argument, like so:
python_32 browser.py http://www.google.com/
The last bit needed is the script python_32, which ensures python will run in 32 bit mode, because the 64 bit mode is broken unless you have installed the wxPython Cocoa libraries. Place these lines in the file 'python_32'
#!/bin/bash
export VERSIONER_PYTHON_PREFER_32_BIT=yes
/usr/bin/python "$@"
and place that file in the same directory as 'browser.py'. Now, also make sure that this script is executable
chmod a+x python_32
Nitpickers take note. One might say that this is no different from calling a browser from the command line directly, which, according to the line counting above, would give you a browser in 0 lines of code:
open http://www.google.com
However, I would not call that 'your own browser' in the sense that you cannot wrap your own controls around it and interact with the browser contents as you can with the script above.

Friday, July 20, 2012

Computer-Supported Collaborative Science, Summer 2012

It was an honor to work with the CSCS team again this summer in the yearly workshop for middle-school science teachers. In the first week of this workshop, we develop new science curriculum using the CSCS methodology: Computer-Supported Collaborative Science.

The teachers then proceed to teach these new lessons to middle-school students that participate in the SAEP (Summer Academic Enrichment Program). This provides instant feedback and allows rapid changes to the lessons based on real classroom experience.

For this workshop, I created two youtube screencasts:

Thursday, May 3, 2012

... or I shall replace you with a small shell script

So, this rather long description that I posted a while ago on how to get Sparkleshare (a cloud storage solution where you host your own cloud) working on Ubuntu can now be replaced with a simple

sudo apt-get install sparkleshare

or select it in the package manager.  This is all possible due to it being available in the repository in the latest Ubuntu: 12.04, aka "Precise Pangolin". Awesome.

Pretty soon I will be able to

sudo apt-get install write_grant write_paper win_nobel

Wednesday, March 21, 2012

Sparkleshare: not quite Dropbox, but better in ways that matter to me

So. You have been using dropbox for some time to make sure all your files are synced between different systems. Perhaps you have shared folders with collaborators and this is how you work together on documents. It has become part of your workflow.

But, there are things that bother you. First, you don't have ownership over where the data is stored. You're not paranoid, but you wonder if trusting all your precious data to an unknown location in the cloud is the best thing. Second, you really cannot afford to pay for more storage, but if would be sooo useful if you could just put everything in the cloud and be done with it, never having to decide whether something needs to go into Dropbox or not.

Enter Sparkleshare. It works on Linux, Mac, and Window 7/Vista (sorry, no XP). It is open source. It is free. And you can store the data in your own system. And it uses git, major geek cred there. That also means you can use sparkleshare to always have the latest snapshots on github etc on your local drive.

The following steps are not too difficult to follow, but it is definitely not as easy as Dropbox.

1. Preparation. As my linux box is running Ubuntu Lucid, I had to upgrade GIT by subscribing to this repository

2. Install sparkeshare, either by subscribing to this repository or installing the client from the website

3. Setup your own data store

4. ?

5. Profit!

Downsides

1. As it uses GIT on the backend, it is not very good at dealing with large binary files. I haven't found any issues yet, but that is what google tells me

2. As it uses GIT on the backend, forget about putting a GIT repository in a sparkleshare folder

3.No iphone/android/Webos clients. Although you may run a web frontend to the GIT repository so you can get to the files that way too.

Saturday, February 25, 2012

Would You Like to Know the Truth?

Spread the Word, people. PDF is here http://www.csun.edu/~hpostma/thetruth.pdf

Monday, December 26, 2011

Getting Things Done with Thunderbird

Introduction

Let me ask you a question: have you ever used todo lists? I have. Lots of them. And I don't like them. Some require singing on to an online service, and collaboration is clunky, or require money. And then they require your team members to use the same service, let alone people outside of your organization. Some are just downright too basic, and don't sync between multiple computers. But there is a bigger issue, so let me tell you what I do instead and why.

Many of my tasks (stuff on my plate) come to me through email. So, if you have a todo list that is separate from email, you will end up copying and pasting a lot back and forth. Yes, I know you can create todo items from email, but you still need to make sure your todo list stays in sync with your email.

Yes, I have read David Allen's "Getting Things Done", and I love the book. I have tried the paper approach he describes, but I ended up having to write down things that come in through email. And then when the piece of paper shows up on top of my list, I have to dig through the email and locate the item so I can work on it. In all fairness, David's book is not so much about using paper, it is more about the process.

My Approach

So, a far easier approach is to overlay the todo list with your emails. To do so, I am using labels, and I do that in Thunderbird (There are a few tutorials on the web, e.g. : see here).

I have been using this setup since the Summer of 2011 and haven't modified it since the initial setup.

I have renamed the standard thunderbird labels to

"DoNow" and "Do". I really see no need for more than two categories of urgency. You either have to do it NOW or do it a little later. DoNow versus Do only refers to time, both are important. I do not believe there are unimportant things you need to do. If they are unimportant, you don't need to do it. If you need to do it, it is important.

'WF' : Waiting For. I use it to mark emails that I have sent to someone asking for some action. I also use it to track purchases I have made when the order confirmation email comes in, or when the confirmation of a paper submission comes in.

'Someday/Maybe' : I use it for keeping interesting things around for later. Say: a funding opportunity that may be interesting in the future, or a new journal asking for submissions.

Email Triage

I have 'new mail' notifications turned off, so I only check my email when I'm done with something. Yes, I split up my work in 15 minute chunks, so I never miss out on something really urgent. Most of the triaging goes on in the morning though.

So, once I open email, I hit 'N' to go to the next unread email.

If an email comes in and I can do what is being requested in less 2 minutes, I do it right away. This is on of the most powerful things in the David Allen strategy.

Examples:

So, an email comes in requesting if I can review a paper. I decide whether I want to do it, and if so, I hit the key "2", the shortcut for applying the label 'Do' in my label setup. 

An email comes in asking for some information, I hit '2'

An email comes in saying we are out of gold for our evaporator, I hit '1' for 'DoNow'

An email comes in with a confirmation that I purchased something, I hit '5' : WF

I ask somebody to do something, I mark that email with 'WF'

Actually Doing Stuff

Now the time comes to do something. I hit the use the Quick Filter bar, and select 'DoNow' and do whatever is there. Afterwards, I hit 'Do'. I also have search folders setup, but prefer filtering my inbox instead. That way, if there was more communication on that task, I can quickly navigate the message thread.

WF : Waiting For. At the end of the day, I see what I have been waiting for. If things have been completed, I clear the label. If there has been no response, I choose to either send a reminder, or wait a little.

Someday/Maybe. Every once in a while, I revisit this list (about every week), and see if there are things that I want to work on now. In that case, I change the label to 'Do' or 'DoNow'.

Closing The Loop, Capturing Off-Line Action Items. So, what do you do if there is something on your plate that did not have an email that originated it? Send yourself an email! Like I said, most of my action items originate in email, so this rarely happens. But, if someone asked you in the hall to do something, ask them to send you an email, or, what I do, is send them an email with a summary of what you discussed and what actions were agreed upon. And apply the appropriate label. WF for if they need to do something, or 'Do'/'DoNow' if I have to.

Downsides.

What was the action? The problem with using 'email as todo list' is that you need to remember what action was required based on an email, or you'll have to reread the email every time you see it. This is a little bit out of line with the Zen approach to todo lists: only put things on there that are actionable, and use language that is action oriented ("Follow up", "Read", "Think about", "Do", "Write", "Google"), but it works for me. Besides, this is not too much of an issue, as long as you remember what action item was required. As a workaround, you could respond by sending an email to yourself, where you write what action is required and apply the label to that mail.

Dates: No capturing of due dates. If it is really important, and requires long stretches of work with not too many little tasks, use your calendar.

Final thoughts

And it's portable! Since I use thunderbird to access my google mail through imap, both thunderbird on my mac as well as linux machines are always in sync, and that includes the labels. Just make sure you name the labels the same on all thunderbird installs. Sometimes I need to restart the applications to force reloading labels, especially when coming to work, when I have been applying and changing labels on my laptop, and want to continue on my desktop.

Threading provides history and context. One of the greatest advantages of using this method is that you can always use the threaded message view to see the history and context of that action item. In addition, that also helps if you forgot to clear the WF label if you forgot to do so, because you see the follow up messages right below it.

Thread hijacking and multiple action items per email. Sometimes threads get hijacked, or you get a message with multiple action items associated with it. In that case, forwarding separate emails to yourself with separate action items may be advisable.

Cross-platform and -organization. As all my communication is through email, the collaboration and communication aspect of this todo list comes for free and it works across organizations! 

No context. A lot of David Allen's framework is about contexts: At Home/At Work/Behind Computer. I don't use them, as I almost always have my computer with me, or I know I can only do a certain task when I'm physically at work or at home. If you want, you could have a third label 'AtHome', yes, you can have multiple labels, and use that to provide some context, but I don't. I do minor triaging on my cell phone, adding stars to things I need to apply labels to when I'm behind the computer. Yeah it is not ideal, but my silly phone email does not do mail labels and I'm not in the market for a new phone just yet.

No associated files. I wish there was a nice way to link files and folders to action items. So when you start work on a certain task, you automatically open the right file and folder. This would be especially useful for actions that have a long lead time, and documents don't get revisited until a few months later. If possible, I keep the attachments around and work off that. 

Finally. Always be aware of the 'next thing'. When you clear a label, always ask yourself if there is a next action item that is supposed to follow after this one. Rinse, Repeat, Enjoy :)

Wednesday, November 9, 2011

Podcasts I Listen To

Keeping me informed, entertained, and sane during my daily commute.

This is what I listen to

Back To Work
Good show about working efficiently, presentations, planning, heavily inspired by Getting Things Done

The Command Line Podcast
Tech news, interviews, creative commons culture, monologues

Stanford Entrepeneurship Corner
Lectures by entrepeneurs, lots of them in the dot-com sector

Engadget Podcast
Gadgets, gadgets, gadgets

Futures in Biotech
Every episode has a specific theme in biotech. Interviews with great people. 

Floss Weekly
Every week interview with leader of an open source project. 

Hacker Public Radio
Random bits

Linux Outlaws
Linux news and views, great banter, rants are epic

The Naked Scientists
Science news, question of the week, kitchen science projects

The MythTV Cast
News, tips, and tricks for MythTV, the PVR software we run at home

NPR Planet Money
Basically Freakonomics in a weekly show, e.g. find economics in Gangnam Style

Peach and Black Podcast
All things Prince. News, reviews of albums

NPR Science Friday
Weekly science show

Security Now
Probably my favorite show: propeller-head descriptions of the basics of crypto, how the internet works, security news, Q&A, with excursions into latest finds in Scifi etc.

The Vergecast
Tech, gadgets. Hosted by the former Engadget editor in chief.

This Week in Science
Pretty much says it all

This Week In Startups
Great show, interviews with entrepreneurs and investors, news.

This Week in Tech
Roundtable discussions of the news

Wait, Wait, Don't Tell Me
The famous news quiz

This is what I watch
no ... I don't watch and drive :)

The Ben Heck Show
Building stuff, modding

Engadget Show
Gadgets, gadgets, gadgets

On the Verge
Tech, gadgets, in a talk show format, with great interviews, reviews, and discussions

Geekbeat TV
Gadgets, tech news

Make TV
Making, building

Dutch

Evers Staat Op
Journaal
Nieuwsuur

Edit Nov 5, 2012: 

Added Planet Money, The Vergecast, On the Verge, This Week in Startups