Showing posts with label learningjournal. Show all posts
Showing posts with label learningjournal. Show all posts

Tuesday, February 15, 2011

Iteration 4, Tues

Rewriting functional tests and Twist tests after adding universal login requirement to all application functionality is interesting and it depends on how you're implementing it. This will be an ongoing debate tomorrow.

The option to create a custom aspect ratio in Picasa is very very useful for creating images and banners of precisely the correct size for various websites, in this case a 760x100 Etsy store banner. 

Monday, February 14, 2011

Iteration 4, Mon

Jetty login basic authorization is not actually secure; it only concatenates the username and password and base 64 encodes. Anything that can be done in XML can be done in Java, but shouldn't always be.

If you get into hashes, you're still not particularly secure. Only when you start using salts in your hashes is it possible to escape the problem of malicious rainbow tables. And if your project is open source, then it's unwise to include your salt in the source which is going open, unless your salt generator is unpredictable. Cookie based sessions over SSL will follow logically when true security is needed.

Since iteration 1 is drawing to a close, we're planning to branch and continue development after we achieve our release candidate, so the candidate can be tested end to end.

I've been playing with EC2 for things unrelated to work, namely the git bash recursion script Maypole... which is still very basic.

Getting a working handover for the next team is an interesting problem. In general, good code explains itself, but the same doesn't really apply to build systems and to configuring local development systems.

Future TWUers: if you have Windows, dualboot Linux, ideally before development starts so you won't have to do everything twice. Keep in mind that Sonar and Twist sometimes don't keep up with refactorings of package structure and paths. Pay attention to our build monitor. And always, always check and update Mingle. Get everyone to the client site as early in the project as possible. Always invite the devs to the showcase but don't require attendance. Try to stack informative sessions immediately after standup. And remember that the buffet at the Mercurial is the best lunch you can find. Ask for feedback- it's pull, not push. Have a code review weekly and review your technical debt, but timebox it.

Apache Ivy is a .jar dependency manager, and it solves a lot of problems where we need several versions of one package for different functionalities. Without Ivy, you can get difficult to track errors if your .jars are called in an unexpected order.



And remember... there will always be "The technical TWer who likes to write their own and doesn't believe in anything." 


Thursday, February 10, 2011

Iteration 3, Thurs

Today I learned lots about PayPal in India and Etsy in general. I believe that the government of India is trying to force market pressure for a homegrown version of PayPal.

There is a Javascript plugin for intelliJ called JS Test Driver. It is useful although for small projects I guess it's just as good to use TextMate if you have it.

I also learned (from a place where I previously worked) that searching email logs can answer most of your "but what is my username?" questions.

Good client relations are very important. Sometimes this means giving small children a stuffed lion and some tennis balls, and refraining from ordering pizza. Other times, it means practicing endlessly for a short presentation so as to be ready for as many questions as possible.


Wednesday, February 9, 2011

Iteration 3, Weds

UX/UI is complicated to describe and implement. JavaScript is fun, but takes lots of lines of code. CSS is fantastic but you can fiddle with it forever.

Inspiring speakers are inspiring because they are involved in their topic.

KFC in India has veg options.

Pecha Kucha are awesome.

Tuesday, February 8, 2011

Iteration 3, Tues

Today had more string templates and more MVC pattern in Java. Lots of little details to meet sometimes volatile acceptance criteria.

An after hours project led to me teaching some basic computer skills today, and it was very rewarding and also taught me some things about teaching- namely, that doing it once is great for an introduction but won't work for skill retention. Always give the student opportunities to ask questions, because what they ask will teach you how to teach them.

DevOps is an important part of everything that we do, and I think that these articles are a good introduction to a little bit of the why and how.

A showcase is an interesting beast, and the style of it depends heavily on your audience. Technical, nontechnical, big picture, speedy, audience-driven, drawing out the audience...

Big displays on walls made out of post-its and notecards are very valuable, and there are many types of them. An iteration priority overview has a "priority line" and every time a client wants to add something to the "must do now, this iteration, today" pile, they have to take a card and put it below the priority line (which represents what will happen during this next stage of the project). As I understand it, this helps the client understand that the resources are limited and that scope creep cannot all be fulfilled in the original time period... 

Monday, February 7, 2011

Iteration 3, Mon

Giving feedback is one of the most useful things that you can do, but sometimes it's difficult to know what to say or type.

Today I learned that vimdiff exists, and that it's great for comparing long log files to see where exactly things go wrong. (It's a different matter that for some reason this one particular server behaved differently depending on where you call it from.)

I've been delving into the complexities of string templates and HTML logic as they're used in forms, and I'm becoming rather fond of both of them as much for what they won't let you do (insert logic, much, often) as for what they will let you do (put data on the screen, iterate over arrays or sets for you, and let the CSS have something to grip onto). The rationale behind the way that string templates are designed is also interesting. Hidden fields in string templates are very useful for passing data without showing the data.

To get the Ruby gem which is parsing .xls files into our database to interface nicely with the Java/Hibernate system, the current least-work solution is to export each Ruby-generated Insert statement into the large SQL file of insert statements, and then run the file from the Java code.

Bash and testbed - extracurricular stuff that I'm working on (including the somewhat messy Maypole project, which is unconnected to work- or, indeed, anything "useful" other than keeping me entertained)

Future TWUers: Cafe Thulp sells burgers made with beef. After a few weeks in India, you or your coworkers may crave these. It's a pretty short walk from the office- only about 5 blocks. Prices are reasonable, considering the rarity of what they're selling.

Thursday, February 3, 2011

Iteration 2, Weds


I will be working more with the Ruby gem roo, and also jruby. I'm looking forward to it and I believe that my teammates also welcome this opportunity.

To add a .jar file (or a directory of them) to the IntelliJ filepath, in your module dependancies tab (in the project structure dialog) add a "Module Library". There you can select a Jar Directory (from your local computer) to add. Then make sure the run profile is using the Classpath and JDK of the correct module when it runs (this is in the run config dialog).


In Java, the Date and GregorianCalendar objects are verboten when following best practice unless you have a "good reason" (i.e. not ignorance or laziness) and really Jodatime is much better and more intuitive anyway.

I've been reading through the documentation of guava, which Google's favorite java libraries.

Axure for wireframes is doing good things to my understandings of stories right now, and it seems pretty simple for the analysts to use.


Iteration 2, Thurs

Hibernate is an interface layer between Java (or .NET) and a database. Saving a change in a record in a table from Java through Hibernate to a database is as easy as creating a Session, then a SessionFactory which is a new Configuration, which you configure using buildSessionFactory. The session is your new factory, and you open a session with it. Then, create a new transaction which begins a transaction in the session. 
Dog dog = (Dog)session.get (Dog.class, new Long(1)); 
Then update your object, say Dog, with the parameters you want, like .setBark and .setFurColor. Then use the .update function of your session, the .commit on your transaction, and finally close the session. 

CCMenu is a nice small and clean build monitor. And it turns out that with a plugin you can rig it up to play a music clip which changes depending on whether the build is red or green. 

Git is an interesting beast. Hard reset is useful, and revert is easy to misuse but is still the best way to fix a broken build and get out of everyone's way (if it's not a merge that you're trying to revert).  Fetch is useful for seeing the differences between your most recent pull and the most recent state of the origin master without having to commit and stash your local changes to prevent being overwritten.




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.

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. 

Tuesday, January 18, 2011

7

Often, presentations require slides, and often slides require pictures without copyright restrictions. FlickrCC, coolIris, SXC, and EveryStockPhoto.


Monday, January 17, 2011

Training Day 6


Today was my first day at the ThoughtWorks Bangalore 2 office. The people seem very nice here. We have floors 2-4. The second floor is where the snack room is, and the 4th floor (open to the air) is where lunch and breakfast are served, and there are games tables if you want to play pingpong. Everywhere in between is work space- classy, clean, well-supplied work space.

The first day in a new office (for new employees, no less) can be expected to be a sort of shaking-down period, wherein everyone loses their way and their train of thought sporadically.

Future TWUers: Between B2 and Diamond, there is a mall which contains a grocery store called Spar, which is reputed to have lots of "international" food if you're homesick. Although you can get popcorn, potato chips, and soda pretty much everywhere. A rickshaw ride from Spar to Diamond should be about 40Rs.

When typing up a retrospective, just put down the action points and the names of the people responsible for them.

Homebrew is a great tool for Mac users. It's roughly equivalent to apt-get for *nix.

Friday, January 14, 2011

Learning journal (training day 5)


Future TWUers: many people travel in India outside of Bangalore on weekends. Buy your tickets a minimum of two weeks in advance, or ticket prices rise dramatically. Some stay in Bangalore and find other entertainments. The bar Geoffery's at the Royal Orchid is just next door, and has prices roughly comparable to what you'd find in a neighborhood bar in Chicago.

I should post the retrospective notes (perhaps using this? http://retro.play.railsplayground.net/)

Reticular Activating Syndrome is concept within neurolinguistic programming, which we had an open space on today.