Please check out my post Warren Buffet’s Long Bet on the BreadVault blog.
September 30, 2011
September 19, 2011
offline HTML 5 validation
I’m liking Henri Sivonen’s Validator.nu service. I’ve got it running locally, and it works well. I can use it as a web service and validate HTML from within Vim, using quickfix to rapidly resolve errors. My Jenkins CI server uses the same validator via phpunit tests.
Warning: it took me a very long time to get it running locally. Technically easy (just run a build script), but it downloads tons of libraries and files before it can do its job.
July 26, 2011
Debugging web tests on remote servers
I run “web tests” on a remote server. I use Selenium to act like a person interacting with a website, viewing and entering data. Selenium is pretty awesome, it can drive a real web browser like Firefox.
Even better is to have these web tests run automatically every time I commit code. I use Jenkins for this. Jenkins even fires up a headless desktop so Selenium can run Firefox.
When a web test breaks (especially in some way I can’t reproduce on my local desktop), sometimes it helps to actually see what Jenkins sees as it runs the test. Here’s a quick guide for doing so on an Ubuntu GNU/Linux server.
- Connect to the remote server using SSH. Install VNC server:
sudo apt-get install vnc4-server
- On the remote server, become the user tests run as. For example:
sudo su - ci
- Set a password for the VNC server using the
vncpasswdcommand. - Start headless X server by running
vncserver. Note the given display. Ifexample.com:1is included in the output ofvncserver, the display is:1. Figure out which port the VNC server is using. I usually do something like
sudo netstat -nape | grep '^tcp.*LISTEN.*vnc.*'
Here’s some example output:
tcp 0 0 0.0.0.0:6001 0.0.0.0:* LISTEN 107 3099855 13233/Xvnc4 tcp6 0 0 :::5901 :::* LISTEN 107 3099858 13233/Xvnc4
By trial and error, I figured out that 5901 was the port I should use.
Port-forward VNC to your local machine.
- Disconnect from the server.
- Reconnect, including
-L10000:localhost:5901on your SSH command line. - Leave this connection open.
On your local machine, connect a VNC client to localhost:10000. An X terminal should be displayed.
In the X terminal, run your web tests.
- When finished debugging, kill the X server using the display noted earlier.
vncserver -kill :1
January 25, 2011
Measuring Development Speed
We’re rewriting the Mifos front-end from Struts 1.0/JSP to SpringMVC/Freemarker. So far it’s been slow going, so we’re trying out several experiments to speed up the process.
I think it’s important to measure the impact of our improvements. I want to know: are we moving faster? Is product quality flourishing? Can we say so quantitatively? The last bit has been the most elusive. It’s like measuring how useful a painting is!
Still, here are some measures which we hope will eventually show how much the improvements are or are not helping. Right now we’re just establishing baseline data.
The red line in the graph represents legacy front-end code that will eventually disappear. The green line is new code, but it really doesn’t matter.
From the chart data, we can say the following by measuring deltas between points: the most dramatic change in Struts/jsp LOC was 4380, for the time period ending Aug 2010. The most dramatic change in SpringMVC/ftl LOC was 3665, for the time period ending Sep 2010.
Assumptions:
- these data are not useful for estimating speed of future refactoring work
- all acceptance tests pass in refactored areas
- look & feel of refactored areas is acceptable
The 2nd & third bullets are a bit vague. To address this shortfall, we’ll measure the following aspects of quality:
- Time spent modifying CreateSavingsAccountTest.
- Number of issues (regressions) caught during CSS walk through.
- Number of layout or functional bugs logged during testing phase (missed during walk through).
- Time spent by QA manually testing the feature, including logging issues and retesting bugs fixes.
Finally, developers should know if things are better. This is the most qualitative and possibly the most important “measure”! Certainly, for the migration of our codebase from svn to git, it was the only measure we used, and it was enough.
Thoughts/comments/feedback are appreciated. I’d rather have some kind of simpler measure, like “x increased by 250%”. Do you know of any more effective (and hopefully simpler) means of measuring development speed?
I used gnuplot to generate the graph. Here’s the source.
October 5, 2010
Mifos opportunity: i18n
We need help with i18n (and support of L10n) in Mifos. Are you interested in becoming the Mifos i18n champion? It’s a great volunteer opportunity! The work should be intermittent, and basically at your leisure. One of the really fun parts is working with the folks at Translatewiki.net… they added a bunch of messages from our “questionnaire” module, and after a few days it was completely translated to Interlingua, Macedonian, Dutch, Norwegian, and Finnish! There’s an army of talented translators ready to help.
Here are some example tasks for the i18n champion:
- Make sure messages in Mifos are translatable.
- Document messages and resolve issues mentioned on our Translator Helpdesk.
- Hang out in #mediawiki-i18n (an IRC channel on Freenode), answer Mifos questions when they come up, or add them to the Translator Helpdesk.
- Work on specific i18n issues: MIFOS-3859, MIFOS-3821, MIFOS-2018 and others.
- Improve and refine the Mifos i18n/L10n guide.
See also: #Mifos, #microfinancing and #Wikimedia
Update
A day after I sent out this call for help we got two volunteers! Thank you, Stanley Kwok and Jasmine Sandhu!
September 13, 2010
Mifos Manual as an ebook
I learned about ebooks last week. Very cool! I’ve found them much more readable than PDFs or Web pages. Maybe it’s the ebook readers… they sure help me focus on the content.
Since we used FLOSS Manuals to write our manual, it’s easy to generate an ebook using Objavi. Here’s the Mifos Manual as an ebook. Looks pretty good on the iPhone (lately I’ve been using “Stanza”). Probably looks even better on a Nook, Kindle, or iPad.
June 28, 2010
FLOSS technical/dev summits: why? how? with Tarus Balog of OpenNMS
Tarus Balog is the CEO of the OpenNMS Group, a company which funds the development of OpenNMS: FLOSS enterprise network monitoring software. OpenNMS lets you know when your machines go down, among other things. I use OpenNMS at work to keep Mifos infrastructure up and running: build servers, cloud, databases, etc.
Our corner of the Grameen Foundation focusing on Technology for Microfinance has a lot to learn from OpenNMS! They’re also FLOSS, and they’re profitable.
I talked with Tarus the other day. Turns out he’s a really cool guy. I’ve been following his blog closely for quite a while now, so I was thrilled with the chance to pick his brain. The point of the call was to find out why and how they run their developer summits: in-person meetings where coding, alignment, teambuilding and planning are plentiful. OpenNMS hosts these yearly, and we’d like to do them for Mifos.
April 1, 2010
The Mifos user manual sprint; how we’ll break Brooks’s law
I’m really excited for the Mifos user manual sprint tomorrow. We’re using FLOSS Manuals to write our new user manual. FLOSS Manuals is an exciting way to write a book, it provides a framework for high-bandwidth collaboration, publishing to HTML and print, translating, and more. There are many examples of small teams (less than 10 people) publishing large, excellent books in short time periods (less than a week).
We’ll have a video feed going. I’ll be wearing my track suit.
Check out our coordination wiki page and stop by our IRC channel if you’d like to join in! If you’ve ever edited text on a wiki, are brave enough to learn how, or just want to see me in a track suit, come on by.
I suppose I should explain the title of this post. If we can establish a framework for software development on Mifos like we’re running this sprint, we can break Brooks’s law. Why not? The Ksplice folks did it, so we can too!
March 29, 2010
Ehcache Java library’s UpdateChecker == spyware
I just took a peek at recent Grails development, and noticed they added code to disable a “phone home” feature in Ehcache. Strange, I thought, why would this be necessary?
Apparently Ehcache includes an automatic update check that is also effectively a phone home. Terracotta software conveniently collects some extra information (such as your IP address) when Ehcache phones home. The information they collect is benign. But, seriously? A library phoning home, by default?
Who decided it would be a good idea to add this feature to a popular Java library? It’s a transparent attempt at gathering usage statistics. As a participant in a professional FLOSS project, I can fully identify with the need for knowing who is using your software. But automatically, secretly phoning home is not the way to do it!
Terracotta, will you turn this feature off by default in the next Ehcache release?
I see this issue has come up in forums:
- Ehcache update check
- Can Ehcache check user local info?!
- ehcache 1.7.0 calling home to check for updates?!?!?
- Possible justification by a Terracotta employee
Other tidbits:
- We use Ehcache 1.4.1 in Mifos, but that (pre-Terracotta) version does not phone home
- Quartz, another recent Terracotta acquisition, also phones home
- Here’s an open issue about the update checker creating unnecessary threads
