Showing posts with label gsoc. Show all posts
Showing posts with label gsoc. Show all posts

Friday, May 22, 2009

You know it's time to backup your hard-drive ...


... when it starts to make audible "clicking" sounds every 10 seconds.

So, I figure, this is a good time for a backup and for me to finally document the procedures I'm using to clone and backup my hard-drive ... (1) to archive them for posterity (2) to make this easier the next time I need to do a backup and (3) to save some others from having to spend time figuring it out on their own.

So I have three backup options to choose from:

(1) Clonezilla: device-device disk/partition to disk/partition
Disk to disk image using Clonezilla. Since this is a manual process I only do this every month or so. However, this is the thing that will save you when your hard-drive crashes and you need to get back up and running as quickly as possibly. Cloning to a drive with the same specs as your working drive will allow you to swap out the broken drive and swap in the cloned drive without losing a beat. I just realized that I need a third internal drive to write the disk-to-disk image in order to keep one disk that will always work (i.e. what happens if both drives end up in the drink during the backup process).

Here's the process for running a Clonezilla disk-to-disk image (screenshots would be nice, but this is all done via CD so I'm not sure if it's possible without a camera)
  1. Insert Clonezilla CD
  2. Reboot System
  3. Answer the following questions
  4. clonezilla> Which language do you prefer? English
  5. clonezilla> Policy for handling keymaps: Don't touch the keymap
  6. clonezilla> Choose the mode: Start Clonezilla
  7. clonezilla> Choose the mode: device-device disk/partition to disk/partition
  8. clonezilla> Choose the mode: disk_to_local_disk
  9. clonezilla> Choose the local disk as source: sda 200GB Hitachi ...
  10. clonezilla> Choose the local disk as target: sdb 100GB Storage
  11. clonezilla> Set advanced parameters: -g-auto Reinstall grub to target harddisk boot sector
  12. clonezilla> Set advanced parameters: Use the partition table from source disk
  13. And finally ... answer the following paranoid, "just watching your back" questions ... I love this part.
  14. clonezilla> Are you sure you want to continue? y
  15. clonezilla> Are you sure you want to continue? If you go on, the original data exist in the target device will be destroyed!!! Be careful!! Are you sure? y
  16. clonezilla> Do you want to clone the boot loader to sdb? y
  17. clonezilla> Now we will start to clone data to target machine ... Are you sure you want to continue? y
  18. Now go get some coffee or a beer (i.e. Bell's Two Hearted Ale or Dogfish Head 60 Minute IPA)
  19. Relax as your life gets cloned over to another hard-drive.

(2) device-image disk/partition to/from image
This is another option and one that I will likely incorporate soon, just so that I always have an extra image lying around in case something goes terribly wrong with the entire universe and this one external drive is the only thing that is spared. For this option, you basically just create the same image as the disk-to-disk image, but copy it to an external hard-drive (any old backup drive), rather than having to buy an exact replica of your current hard drive. This option just gives you a bit more piece of mind and might save you a few bucks in the short-term (you don't have to buy that second internal drive). But once your current drive goes bad (and it will), you'll need to go out and buy that second drive anyway. This just means that your recovery process will take a little longer (i.e. the amount of time it takes amazon to ship you that new drive).

I want to use all three options (just to have an image lying around in case ... yes ... something goes terribly wrong with the universe). However I still haven't adopted this approach (probably because my 500GB external hard-drive is full of Acronis' crappy backups. I hate Acronis, in case I've never mentioned it before. I'll explain in a different post, but essentially it comes down to "four months", which is the time that elapsed between when I sent in an email request to their tech support and when I received a response. If that had happened once, I would have given them a pass. But it's happened twice and I still haven't heard back from them after my last response (sometime in February 2009). For the record, Acronis is a company I want to love (they are from Burlington, MA) ... but I just can't. And until they get back to me with an apology for their terrible tech support, I will continue to give them mean looks when I pass them in the hallway.

(3) Daily backups with Ubuntu sbackup
Daily backup using sbackup (which I just found out was a Google Summer of Code project from 2005). This is going to be the next weapon I add to the backup arsenal, right after I finish my most recent disk-to-disk image.

Conclusion
So I need to get a new external hard-drive. Does anyone have any recommendations regarding backups? I'm thinking about going with a deal from Amazon that includes:
  • Western Digital My Book 1TB USB
  • Western Digital My Passport 320 GB USB
However, I'd love a recommendation. CNET and PCWorld have some recommendations, but nothing looked all that impressive.

And does anyone out there make backups of their backups? I'm thinking about getting an external drive with a few TB of space in order to provide some redundancy in case one of the backup drives fail. So would love some suggestions on that front too.

Friday, May 8, 2009

Update: OpenMRS Test-a-Thon (May 16 - 17)

What the heck is the OpenMRS Test-a-Thon?
The OpenMRS Test-a-Thon is a code-a-thon event that allows people to collaboratively increase and improve our testing process in order to make the OpenMRS platform a more stable and robust piece of software (click here for more details).

When is it going down?
We'll be starting at noon (EDT) on Saturday, May 16 and ending at noon (EDT) on Sunday, May 17. You can come and go as you wish. I'll be hanging out in our IRC Channel all day Saturday and will be taking in a feature film on Saturday night (9 - 11pm CDT). So no pressure. Come inside, submit yourself a junit test, and then go back out and finish your Saturday chores.

Where is the event going to take place?
The test-a-thon will take place online. You can join us on the OpenMRS IRC Channel. Contact me via Skype (jmiranda) or on the IRC channel to discuss how you might be able to help out.


Who can participate?
Anyone. Developers, implementers, supporters, documenters ... people who are bored.

Who should participate?
Everyone.

Why should you participate?
Because ...
  • You love OpenMRS.
  • You want to learn about test driven develement (TDD).
  • You want to learn about behavior driven development (BDD).
  • You want to learn about cool unit testing frameworks (i.e. JUnit).
  • You want to learn about cool web testing frameworks (Selenium).
  • You want to learn about continuous integration.
  • You want to write documentation for OpenMRS.
  • You want to meet the team.
  • You want to make Ben Wolfe happy.
  • You want to win a prize.
  • You have nothing better to do on a Saturday.
How can I participate in this once in a lifetime (more like bi-annual) event?
You can head over to the OpenMRS wiki for more details.

Thank you,

The OpenMRS Team

Thursday, March 26, 2009

On the Quartz Scheduler Project

I have been trying (in vain) to get the Quartz Scheduler project page up on the OpenMRS wiki, but keep getting the following error when posting my changes:

So for now, the project page will just have to be left here.

Overview


There are many activities within a healthcare information system which benefit from automation. For example: daily clinic reports might need to be generated the morning before a clinic opening, decision support rules might need to be run over a patient group once every week, or healthcare data coming in from outside sources might need to be analyzed every 30 mins. To give end implementations the flexibility to define these sorts of automated conveniences, the OpenMRS community has added scheduler functionality to the core software application. The OpenMRS scheduler (based on the JDK Timer) currently supports executing tasks on regular basis (i.e. a task will execute every X seconds, minutes, hours, days). However, there's no way to schedule a task to recur at a particular time every week. The data model supports this type of feature (start time and repeat interval), but we need to add some logic to the Scheduler to handle triggering these tasks to occur at exact times.

We want to support more complex scheduling (i.e. cron-like) in the very near future, where we can specify rules that will allow Tasks to run more more/less frequently based on the day/time. For instance, an implementation might want to schedule a Task to run once every day at midnight, but also at 6pm on Saturday and Sunday. This type of scheduling would be difficult to support using the JDK Timer, so we would like to add an extension point to the scheduler to allow a developer (probably myself) to create a module based on the [http://www.opensymphony.com/quartz Quartz Scheduler]. This will allow us to handle more advanced scheduling requirements.


Requirements

High Level Goals

  • Decide whether to build as a module to extend current functionality or as a core component to replace the current functionality.
  • Decide whether to include Quartz tables in the OpenMRS data model (there are about 7 Quartz-specific tables).
  • Implement a Quartz version of the scheduler to extend (possibly replace) the current JDK Timer implementation.
  • Implement features that allow a user to manage scheduled tasks.
  • Redesign the Manage Scheduler user interface to provide a more user-friendly and intuitive experience.
  • Create unit tests for each expected behavior of every method within the scheduler service and its domain objects.


User Stories


Student will be responsible for soliciting requirements (user stories) from users/implementers. Here are just a few examples of user stories that might be applicable to this project.

  • Allow a user to view all available tasks.
  • Allow a user to view all scheduled tasks.
  • Allow a user to create a scheduled task.
  • Allow a user to update a scheduled task.
  • Allow a user to delete a scheduled task.
  • Allow a user to schedule tasks to be run on an interval (i.e. every 30 seconds) or at specific moments in time (Tue, March 24 at 10:42pm).
  • Allow a user to schedule emails to be sent at a specific time.
  • Allow a user to schedule reports to be generated and sent to stakeholders at a specific time.
  • Allow a user to start an available task.
  • Allow a user to stop a scheduled task.
  • Allow a user to check whether a task is currently executing.

Planning Process

  1. Identify user roles that will be using the scheduler
  2. Identify user stories for each role by interviewing users / stakeholders
  3. Prioritize user stories using MoSCoW rating (Must, Should, Could, Want)
  4. Estimate user stories (a.k.a Planning Poker) using ideal days (0.5, 1, 2, 3, 5, 8, 13, 20)
  5. Discuss acceptance criteria (expected behavior) for each user story with stakeholders.
  6. Create a Release backlog for the current sprint / iteration
  7. Estimate / calculate velocity (i.e. 20 story points)
  8. Create an Iteration backlog of stories
  9. Create tasks for each user story in the iteration
  10. Assign estimated hours to each task
  11. Mockup user stories prior to start of sprint to solicit feedback.
  12. Run sprint for iteration duration (between one to two weeks)
  13. Deploy features completed during sprint to labs.openmrs.org
  14. Solicit feedback from users/stakeholders
  15. Re-prioritize and re-estimate users stories / tasks
  16. Recalculate velocity
  17. Create an Iteration backlog for stories that fit into
  18. After X iterations, deliver final release

Timeline

This section will be completed by the mentor and student.

  • Iteration #1:
  • Iteration #2:
  • Iteration #3:
  • Iteration #4:
  • Iteration #5:
  • Iteration #6:
  • Release:

Mockups

This section will be completed by the student.

FAQs

Still compiling questions/answers. Will post by Friday.

Resources

Project Resources

  • [http://docs.google.com Project Discussion] (has not been created yet)
  • [http://docs.google.com Release Backlog] (has not been created yet)
  • [http://docs.google.com Iteration Backlog] (has not been created yet)

OpenMRS Resources

  • [http://openmrs.org/wiki/Scheduler_API Scheduler API]
  • [http://openmrs.org/wiki/Quartz_Scheduler_Developer_Guide Quartz Scheduler Developer's Guide]
  • [http://openmrs.org/wiki/Quartz_Scheduler_User_Guide Quartz Scheduler User Guide]
  • [http://openmrs.org/wiki/Technical_Discussion#Task_Scheduling Technical Discussion about existing Scheduler]
  • [[ticket:357|Ticket #357]]
  • [[ticket:359|Ticket #359]]
  • [[ticket:1056|Ticket #1056]]

Blogs

  • [http://blog.justinmiranda.com Justin Miranda]
  • [http://www.openmrs.org Student Blog]

External

  • For more information on Quartz, please see the [http://www.opensymphony.com/quartz Quartz Project] home page.
  • more resources to follow

Thursday, March 5, 2009

On Transparency and Staying On Task

The Problem
If you've ever wondered, "What the heck is Justin doing right now?" ... you're not alone. I often wonder what it is I do every day.

The Tangent
Sorry, this reminds me of a scene from Office Space, that I would be remiss to miss quoting:

Bob Slydell: What would you say ... ya do here?
Tom Smykowski: Well look, I already told you! I deal with the g*dd*mn customers so the engineers don't have to! I have people skills! I am good at dealing with people! Can't you understand that? What the hell is wrong with you people?


The Problem (again)
Most of the time, a day passes and I am absolutely exhausted, I feel like my mind hasn't stopped running all day and yet I don't feel like I've actually accomplished anything. I know that I have ... just probably not what I was supposed to be doing. Well, I'm tired of that feeling. Over the years, I've tried every possible system to help me with time/project management: simple ToDo lists, GTD, Agile, Agile + GTD, GTD + FYI + BTW, and even Tony Robbin's tapes. I've worked with systems like Jira/Trac to keep track of the larger tickets/projects, GTD with Day-Timers, GTW with hipster PDAs (moleskin), GTD with real PDAs (BlackBerry 8830) to keep track of the daily tasks, and SlimTimer (which is awesome, by the way) to keep track of actual time spent on tasks. I've used online todo lists with RememberTheMilk, simple todo lists on $1 notepads, electronic todo lists on $200 BlackBerries or in Thunderbird Tasks, or even in Notepad (ala Yaw Anokwa, who also incidentally gave us Bacon-wrapped OpenMRS).

Nothing seemed to work.

And I'm not entirely sure why these technologies and processes haven't helped, but I think it might to do with the fact that I have too many inputs: email, e-task list, paper-based task list, jira, trac, skype, meetings). Another problem is that I'm always "too busy" to follow up on the tasks I've worked on or completed, to leave notes about where I was or to close tickets, so my inbox just keeps growing and growing and the contexts for those tasks keep getting lost. Still not sure how to handle that problem other than to schedule some time every week for "cleanup" and assessment. Unfortunately, the time gets scheduled away with something else. How do others deal with that issue? I guess it's just a matter of will-power and stopping yourself when it's time to move onto the next thing.

The Solution (Staying on Task):
Anyway, I've come up with an approximation of a solution to the problem. I recently decided to try to integrate all of these various task/time/project/life management tools into something that will help me stay on task and keep everyone informed of what it is that I'm up to. It involves integration of a few key systems that each, by themselves, help solve a little piece of the puzzle and together, I'm hoping for better throughput and transparency all around.

Storing Tasks
I love Remember the Milk, but I hate logging into a web site to manage what I should be working on. Ideally, I'd rather have someone (or maybe something) tell me what I should be doing at any given time during the day. Unfortunately, I still haven't found a solution to that. However, RTM at least gives me a way to manage my todos, a database for all of my tasks. Which is a good first step. I've now got an @OpenMRS context in RTM with all of my daily todos from some of my in-progress and future OpenMRS/PIH tickets.

Managing Tasks
Now, I just need something to help me manage tasks, that doesn't require me to log into a web site several times a day. RTM has a great feature that allows you to sync with the BlackBerry (as well as iPhone). I am now using that service to manage tasks when I'm away from my computer. Unfortunately, it doesn't work so well when I'm sitting in front of my computer because it takes a few more seconds to type in the task using the BlackBerry's tiny keyboard. And seconds are hours in the software world (or maybe just in my world). So, I needed something that was sitting right there in front of me, on my laptop, whenever I needed it. I tried using the Thunderbird RTM Provider that integrates with RTM, but ran into a few bugs that were showstoppers. The add-on definitely has promise and I would highly recommend it once it matures for a few more weeks/months.

That brought me to Tasque, which is a neat Gnome project (for Ubuntu) that was developed during the 2008 Google Summer of Code. Tasque integrates with the RTM backend and allows me to add/remove/edit tasks from my desktop. There are still some quirks in Tasque (it won't let me move tasks to different contexts once they've been added), but the pro's far outweigh the con's.

Managing Time Spent
The final problem to tackle was that of "time spent" on tasks. This one was easy. Since, I always have at least one FireFox window open at all times, I use SlimTimer in the sidebar of Firefox to keep track of the time that I spend on individual tasks. I haven't perfected the system yet, but I current track high-level task categories, like Code Review, Design, Development, Testing, Meeting, and Troubleshooting. I will probably get more fine-grained at some point. Unfortunately, there's currently no way to integrate SlimTimer with RTM, so I have to add tasks to the SlimTimer sidebar manually. Keeping the tasks as high-level categories gives me the consistency I need to actually use SlimTimer every day.

The Solution (to the other problem ... "Transparency")
The other nicety from all of these systems working together is that I now I have a way to show what I'm working on all in one place. You can see some of the feeds I've set up for open tasks/tickets, as well as completed tasks/tickets (coming soon). Hopefully that will provide some needed transparency and help others give me feedback on what they think I should be working on.

The Conclusion
So in conclusion, what I settled on was a combination of Jira/Trac to manage big tickets, RTM + Tasque + BlackBerry Tasks to manage daily todos, and SlimTimer to manage the time spent on those tasks. We'll see how this new system goes.