Archive for the ‘Uncategorized’ Category

6 days in Perth & Margaret River

Posted: January 10, 2016 in Uncategorized

 

https://www.google.com/maps/d/edit?mid=zUymled5i0RE.kMJ10yKT4JTQ&usp=sharing_eid

 

 

Advertisements

Java Fitnesse quick start tutorial

Posted: February 16, 2014 in Uncategorized

This is a short and quick tutorial to get you started on Fitnesse and I will list down the steps below.
The tutorials on Fitnesse.org should do the trick,

Prerequisites: Why Fitnesse is used(if you are here, I am guessing, you already know this, and you want to get your hands dirty ūüôā )
Code repository: https://github.com/anirbanchowdhury/anirbans_playspace.git
1. Fitness is available at http://fitnesse.org/FitNesseDownload/ . Download and setup

Upon successful setup, you should see the customary http://localhost/FitNesse.UserGuide.TwoMinuteExample (Your port might differ, I am using the default 80)

2. Once, you are at the 2 minute example, an easy way to test your setup would be to edit and add a sample test case, for eg. denominator is 1. The below pic is a before pic, and if you notice, there is no denominator with 1 and no Edit button.

Image

Lets edit this wiki page, and add numerator = 10, denominator = 1, and quotient ? = 10

http://localhost/FitNesse.UserGuide.TwoMinuteExample?edit
Search for the table below and add the last row.

| eg.Division |
 | numerator | denominator | quotient? |
 | 10 | 2 | 5.0 |
 | 12.6 | 3 | 4.2 |
 | 22 | 7 | ~=3.14 |
 | 9 | 3 | <5 |
 | 11 | 2 | 4<_<6 |
 | 100 | 4 | 33 |
 | 10 | 1 | 10 |

Save and Test. The last assertion should fail, which is expected..

Image

3. Now, lets customize.  Lets put up

  • New test page
  • Add Fixture which sits between System Under Test(SUT)
  • Create a very simple biz logic class which mimics the SUT)

4.  Test Page

Edit  http://localhost/FitNesse.UserGuide.TwoMinuteExample?edit
and add next line at the end and save the page.

>SampleExample

Once you save the page, click on the [?] which should open up a new test page. Edit it. Replace everything with below:

!define TEST_SYSTEM {slim}
!path D:\workspace\FitnesseBusinessApplication\bin
 |import|
 |com.fitnesse.fixture|
 !define COLLAPSE_SETUP {true}
 !define COLLAPSE_TEARDOWN {true}

!|Division Program |
 |Numerator|Denominator|quotient?|
 | 10 | 2 | 5.0 |
 | 12.6 | 3 | 4.2 |
 | 22 | 7 | ~=3.14 |
 | 9 | 3 | <5 |
 | 11 | 2 | <6 |
 | 10 | 1 | 10.0 |

From here onwards, it is a Java implementation, and the below steps should be customized for your end system (.Net etc)

Everything below is coded on Eclipse and finally the class files are generated under :

D:\workspace\FitnesseBusinessApplication\bin

5. SUT (Business Logic)

package com.biz.calculator;

public class Calculator {
private float numerator;
private float denominator;
private float quotient;

public Calculator(float numerator, float denominator) {
 super();
 this.numerator = numerator;
 this.denominator = denominator;
 }
 public float getNumerator() {
 return numerator;
 }
 public void setNumerator(float numerator) {
 this.numerator = numerator;
 }
 public float getDenominator() {
 return denominator;
 }
 public void setDenominator(float denominator) {
 this.denominator = denominator;
 }
 public float getQuotient() {
 return numerator/denominator;
 }
}

6. Fixture class which communicates between the SUT and the Fitnesse HTML.
(Actually, this is compiled to D:\workspace\FitnesseBusinessApplication\bin which is present under !path on the Fitnesse page)

package com.fitnesse.fixture;
import com.biz.calculator.Calculator;

public class DivisionProgram {

private float numerator;
 private float denominator;
 private float quotient;

public void setNumerator(float numerator) {
 this.numerator = numerator;
 }

public void setDenominator(float denominator) {
 this.denominator = denominator;
 }

public float quotient() {
 Calculator calculator = new Calculator(numerator, denominator);
 this.quotient = calculator.getQuotient();
 return this.quotient;
 }
 }

Few common problems:

a. Could not invoke constructor for DivisionProgram[0]

FitnesseIssues1

This means, Fitnesse is not able to resolve the Fixtures class, check the below settings on your Fitnesse page

Division Program should point to DivisionProgram class in fixture.

!path D:\workspace\FitnesseBusinessApplication\bin
|import|
|com.fitnesse.fixture|
!|Division Program              |

b.  Method Quotient[0] not found in com.fitnesse.fixture.DivisionProgram.
FitnesseIssues2

This will not come if you follow the instructions properly, but if you customize, then this might happen. Basically, Quotient? searches for a getter named Quotient() on the Fixture, but if you check again, you have a getter method named quotient() [Case sensitive]

My physical transformation

Posted: November 2, 2013 in Uncategorized

before_front

7 weeks before

front_full

7 weeks after

How did I do it?

1. Goal Setting  РTom Venuto (Burn the Fat, Feed the Muscle) . Absolutely top notch , no

2. Training Program ¬†–

Weight Training :

first 4 weeks : Ian King (Get Buffed)

next 3 weeks : John Romannielo I wish I had got this first, coz I would have lost more

While I did do some cardio in the 1st 4 weeks, there was none in the last 2 weeks, and I still lost fat which was kind of amazing, because I find cardio extremely boring.

while there is no substitute to Ian King’s methods. none whatsover, period, but if you have to lose max. fat in shortest possible time, John Rommanielo is the man to go to.

3. Diet Р4 to 5 meals a day, high protein , low carbs for the most part. This is where I did the most mistakes and I would do so much better if I have to redo this. But the key thing was : all my meals were pre planned, printed and put on my fridge door,  and there were no waverings, none. No cheat meals. nothing.

Simple rules :

1. Dont mix fat and simple carbs together

2.  complex carbs and very little fat only after workouts

 

 

Why the 1 month break? 1st week of July was a planned deconditioning week. I was feeling restless (possibly overtrained) and my lower back was just beginning to bother me. Then my mrs. fell ill, so had to help her out for another week. All that took its toll, and when I came back,I myself caught the virus. Hence I decided to take another week off. Finally, momentum had its sway and I started the 4th week with very little motivation to lift anything at all. Its strange, how habits change in the course of a few weeks. In the meantime, I gorged on junk food, bought more stuff from MacD in a week, than I did in the past 1 year.

But men will be men! Last weekend, my bodyfat looked to my naked eyes as hovering around the 10-12% mark. (My calipers made a scrawny sound, as soon as I turned them on yesterday, so probably the battery has run out). Coupled with the fact that my guns have got back to the baseline of puny 12.5 inches before I started prioritising them around April, I decided enough was enough. Eventually, I did eke out my workout plan for the coming 3 weeks and visited the temple, ahem, the gym, yesterday.

The results

1. I lost some strength, obvious , given the long break. But it wasn’t much. I was just around my bodyweight squating before the break (2 RM) Yesterday, I went for about 10 kg less for 5RM and literally had plenty in the tank . I decided to play it safe since it was such a long break.

2. I lost LOTS of stamina. I was out of breath after doing just a couple of warmup sets of squats. I used to do 8*8 on squats with 30 s rest interval and anybody who’s done that¬†knows how gruelling that can be. Yesterday I had to go for 1 min to 2 min breaks just to regain my breath. ūüė¶

Its not that, I did absolutely nothing during this 1 month. Last 2 weeks, I swam , though not much. A recent fixation (I hope this dream comes true soon) with NAUI Scuba certification has forced me to spend some liquid moments.. ha ha ha. But then, it was highly inadequate as I kept panting like some dog on a sunlight drenched day after every set.

3. My big three (quads, hams, back) didn’t lose much size or definition. A little, perhaps(since visual appearance is relative, so an inch lost on legs would obviously¬†look¬†to be¬†much less than an inch lost on the biceps). So anything built on low reps, heavy weight is going to last longer. I already knew this, but this was a nice firsthand example to rely upon.

Goals

A key point here is my short goals are NOT too high at the moment, I just want to keep on the Progressive overload, to gain strength. I dont want to follow the low rest, high reps to fire the GH . My primary goals are in another domain. Its extremely difficult to the point of self sabotaging the goals if there are too many eggs in the basket.

Long term goal : end 2012 with a body fat of 8% and a weight of 66 kg empty stomach.

There might be substantial upheaval in the personal/professional front in the meantime as there are 6 months to go and lots of other things planned out, but this is something which can be achieved. See you sometime soon!

Calcutta

Posted: May 23, 2012 in Uncategorized

Calcutta.