Tuesday, February 1, 2011

Iteration 2, Tues

A long morning retrospective is an unintuitive event to schedule, but sometimes a good idea, and my pair and I still got a nice chunk of work done before lunch. As part of the learning process, our team has been leveling up to the point where we self-start our internal processes without trainer (i.e. boss) supervision.

The ruby gem roo imports data from spreadsheets into wherever you want to send it- usually a database of your own. Some experimentation with it today revealed two important things:

  1. roo 1.9.3 does not appear to install its own dependencies. When using roo, write a script to take care of that.
    Dependencies of roo:
    bones (3.6.2)
    builder (3.0.0)
    google-spreadsheet-ruby (0.1.2)
    little-plugger (1.1.2)
    loquacious (1.7.0)
    nokogiri (1.4.4)
    oauth (0.4.4)
    rake (0.8.7)
    ruby-ole (1.2.11.1)
    rubyzip (0.9.4)
    spreadsheet (0.6.5.1)
  2. roo can import data from .xls or .xlsx and parse it into the variable types that we need.
An alternative to roo is Apache POI, which is written in Java and thus will interface with our system through fewer layers than roo would have to. A third alternative which we may or may not explore is to use the java bindings provided by OpenOffice. 

When it comes time to use these with parts of the real dataset, we may expedite redumping the .xls by dumping csv and checking md5sums to validate the cache. i.e, find /path/to/spreadsheets -name '*.xls' |md5sum > checksums.txt, and then use a diff to compare to the last run. 

To open any file in mac terminal, open filename.extension will accomplish the task. 

Quote: "learning what you're dong rather than how to do something" (in relation to how to find and adjust paths of inputs and outputs rather than how to do so for a specific program)

In connection with roo, I spent some time getting several haphazard installs of rvm into a more understandable state, setting a default ruby (1.8.6 because of the OSX support) and examining the different places where gems can be installed to, and the possibility of automagically-generated symlinks from all installed rubies to the system ruby's gem folder. However, it seems too complex for our current problem, and perhaps unwise in general if versions of gems become a relevant concern. 

IntelliJ library dependency filepath complexities are deceptively simple, and some of the error messages are verbose but unilluminating because in this case the desired classpath seems to match the existing classpath but the error persists, which leads me to believe that the error is symptomatic of a different problem. Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/xmlbeans/XmlException

Monday, January 31, 2011

Iteration 2, Mon

The logic and syntax of more involves shell scripts is a continual source of interest and intrigue to me. Specifically, an if-fi statement which determines whether a certain command returned an error and if so exiting the script flow, and if no error the if will continue with the install script. The logic behind double square brackets in conditional statements in bash is that they make a wildcard do "shell globbing" which I interpret as meaning that it is a true wildcard as they are usually used in bash rather than a wildcard limited by the local directory or logic function that they are enclosed in.

I spent some time reading about programming languages which use vocabularies other than English. Not everyone can code in english, even if the ASCII set is generally intolerant of the umlaut and accent marks of the world. To say nothing of ideograms.

I spent a little time with ~/.gitconfig and ctrl-comma to make my environment visually coherent. The standard aliases are also useful.
[alias]
st = status
ci = commit
co = checkout
br = branch

You make a symlink (which doesn't really exist in Windows) using ln -s origin destination and it is extremely useful, especially when trying to get all of the correct files into version control when one of them "has" to be in a certain directory which should not be under version control. I learned about how to copy a path using pwd | pbcopy and also the rules of meaning behind . .. / and ./

/absolute path
./path relative to current director
. local directory
.. out one dir (closer to root) 
Previously, I knew many correct usages but not the underlying syntax logic. 


I believe that it is currently impossible for a program to analyze code well enough that it could autotag a class or project with tags representing certain code technique chunks which are used in it, like the Observer design pattern or a for loop which iterates over an array in order to concatenate all the contents of the array into one long string, or a do while loop which iterates through a list to add the sums of all the odd numbers in it.

The purpose of this would be to be able to search your own (or communal) codebase for certain code chunks. This relates to the "I did that in a previous project but I don't currently remember how and googling this has a low cost-reward ratio" problem which I believe is somewhat common. This is kind of like a code snippet search system, except that the search is secondary because the identification of the purpose-driven techniques is the main point of the automation. Again, I don't think this currently exists or is even implementable, but if I'm wrong I will be very interested in the manner of the solution.

For future TWUers:
When you must order ice cream to clear the ice cream meter, keep in mind that the fruit Chikoo is very tasty and you can order ice cream flavored with it to B2 from a place called Natural.

Friday, January 28, 2011

Iteration 1, Fri

Today I spent a large amount of the time discussing analytic paths and the site visit yesterday rather than coding/configuring/scripting.

Git is a complicated beast which enables many fantastic data exchanges when you use its higher level commands and setting modifiers. I have found no tutorials particularly suited to my usage needs, although this one was informative.

I installed and spent some time using Wordpress today. Also, I learned some things about path errors in OSX and thus about .bashrc and .bash_profile.  

Thursday, January 27, 2011

Iteration 1, Thurs


Wednesday was Republic Day in India, which is a national holiday. Thursday, after the morning standup meeting, work continued on iteration 1. Tools I used included XML for Ant, bash scripts to automate pre-commit testing, git for version control, and Go.

In the afternoon, some team members participated in a site visit. Discussions with the client about terminology, logic structure, and priorities continued apace.

After the site visit, we had the weekly Pecha Kucha presentation night. Presentation topics included comparative education quality and its implications for the rise and fall of nations on the global stage, the history of Bangalore, inspirational quotes from Fight Club, the island Noronha, investing, Latin, and the Manneken Pis statue. 

Monday, January 24, 2011

TWU learning journal (project day 2) Tues

Today, donations for the client are up through Ammado. This is major value delivered.

The main representatives of our client visited us at the office today to observe the process, give feedback, and to discuss priorities and next steps.

In Go, you make a pipeline by writing it into existence in an XML file. In a pipeline, there are stages. In a stage, there are jobs. Jobs have input, and produce output files which are known as artifacts and which following jobs and stages can use as inputs. Agents are machines on which your build will run. Jobs can be run in parallel.

Power outages are not uncommon in most of India and thus our office has good protections and backups which prevent productivity disruption.

I worked with automating processes using shell scripts. I have made great strides with using IntelliJ efficiently. I am learning about git, especially the usefulness of git rebase. Also, chmod, which is a bash command. To call TextMate from the commandline, use "mate filename"

A .war file is a type of .jar file which is a type of .zip which is self contained i.e. has everything inside of it that everything inside of it requires to run.

In our project, an enhancement to a story should be a new story card.

You can write unit tests for XML. I wonder if this is a good idea for our project.

For the future TWUers: a good food delivery place near the office is
called Healthy Affairs. Phone# 9900690600



TWU learning journal (project day 1) Mon


Sonar is for code metrics, and is usually installed on a build server. It requires a database as well as access to a code repository. By default it uses localhost:9000.

A spike is a (usually timeboxed) experimental activity (usually by developers) to calibrate time estimates about new technology by gaining experience with that technology.

I am currently unable to find mentions of using Sonar with Apache Buildr.

Future TWUers: the food at the office is quite good, although it can be difficult to get used to if you are accustomed to a significantly divergent foodgroup norm. It is possible to order out for lunch either in a group or individually. In the pantries, you will find juice, soda pop, milk, bread, and snack items like chips and popcorn, as well as quite nice coffeemakers.

Sunday, January 23, 2011

Weekend in Bangalore

This weekend, many TWUers flew to Goa to enjoy the beach. In Bangalore, there was a political protest which caused the majority of shops to be closed until the evening.

Future TWUers: The Java cafe is a sit-down but informal 24hr resturant in G block which has passable hot food. Service may be slow.

Total Mall and Oasis Mall are both within a short rickshaw ride of Diamond, and both will supply your grocery and clothing needs more than adequately.

The Sunday brunch buffet at the Citrus restaurant in the Leela Palace is elegant and has an enormous selection of delicacies and deserts to taste, including gourmet cheese and lots of meat as well as many veg dishes. The cost is rather high but I consider the experience more than worth the cost. The gardens and architecture are beautiful.

Elsewhere in the Leela there is a shopping mall which contains a bookstore that also sells board games and nerf guns.

Friday, January 21, 2011

Training day 10 - Fri



The tech stack for the upcoming project is not unusually long and it's quite interesting. This is my first introduction to Jetty, Log4J, and Hibernate.

Today I installed Twist for the first time and learned some advanced user ways to use Mingle.   

Some types of testing include browser compatibility, security, performance, variety of users, usability.

Open space talks today included: our tech stack, the complexities behind floating point numbers, and origami. 

We've been experimenting with a variety of different ways to perform retrospectives, including writing our thoughts/concerns/goals on post-it notes and sticking them to various types of cartesian coordinate graphs drawn on whiteboards. 

Our first TWU pub night was very nice. The pub quiz was a great rendition of its sort, and TWUers had much fun with nerf darts, balloons, rubix cubes, and the hotel swimming pool. Later in the evening some us played with remote control helicopters bought at the toy store in Oasis Mall. 

Thursday, January 20, 2011

Training day 9 - Thurs


Stretching the mind to include not only new tools but new concepts involves a period of confusion as the knowledge is first acquired and then internalized and merged with the existing knowledge base.

Hibernate can create tables from your object setup. Presentation on Hibernate

A build should be crisp: complete, repeatable, informative, schedulable, portable.

The conventions for a project filetree are based on the need for structuring things so that the build won't include the source code or the tests.

New terminology: smoke tests

Configuration file discrepancies are the most common cause of "but it works on my machine!"

Today I extended my knowledge of MVC, SPring, java servelets and their usage as dispatcher servelets, some programming patterns including Observer, Controller, and Filter, IntelliJ keyboard shortcuts, and JSTL

Recommended books:


Wednesday, January 19, 2011

Training Day 8 - Thurs


Composition is preferred over inheritance because having a reference to another object rather than inheriting from the other object increases the amount of the flexibility in the system, which is inherently desirable for systems which will need to be modified. 
An important part of pair programming is having a mental map of each other's sentence structure and idiomatic phrases. This is not a cross-cultural problem so much as it is a problem experienced by people who do not yet share a common set of descriptors for the problems that work brings to them. 

Estimating project stories is an exercise which relies on relative measurements rather than absolutes, because absolutes (i.e. time taken per "point") will be discovered in the process of the first iteration. Also, points per unit of time are roughly equivalent across different groups of developers if and only if a "point" is understood to be like a unit of currency. In other words, I can buy a pair of sandals for Rs300 or for USD $6 but they still cost the same amount. In my opinion, this also has parallels in "absolute time" as it is measured across systems undergoing relativistic affects.  

The good citizen principle by Dan North discusses reasons why checking inputs that are passed internally within a program rather than in from user input is usually unnecessary.  

Mockito makes provisions for a test which is expected to throw an exception. @Test(expected=IndexOutOfBoundsException.class) delights me with its implications for testing sad paths. 

DBDeploy and types of test doubles came up today. Also, Junit is more complex than I knew about, and a little reading goes a long ways.

Future TWUers: 
  • There is a small object somewhat like an air freshener that plugs into a wall socket and glows orange. If you are having a problem with bug bites, stop by the H-block corner store (or N-block may have them also), buy one, and put it in your bedroom. I believe it costs ~300Rs and the price is absolutely worth the reward. 
  • In India, "sick" means "nasty" and "ill" means "sick" i.e. if you call someone sick, you're calling them disgusting. In general, everyone here is very understanding about nomenclature misunderstandings, and they're usually entertaining rather than offensive. "elevator" vs "lift" in the USA vs the UK appears to be the difference between a part of an airplane, and what one does to freeweight exercise equipment.
The internet tells me that somewhere in the world there are companies which have all of their code in a database, which they access with a thin interpretive layer. This is apparently an enormously bad idea because of its effects on testing, maintainability, and speed. I don't know how anyone thought that such a thing would be a good idea in the first place... and I'm curious. The way to refactor this codebase is to slowly add test coverage, and then refactor (in small chunks, starting with the most-used and -modified parts of the codebase) but first they have to start by making and watching a giant logfile to understand the current/expected/default behavior.

This was the first week of Pecha Kucha presentations, and some of the topics included constructive failure, clubs, the concept of "chaordic", science fiction, and saving the tigers.