The first assignment – CollectNewsPaperKarel

Posting my solution to the problem number 1 of assignment 1 of CS106a. Hoping for some feedback to this.

import stanford.karel.*;

public class CollectNewspaperKarel extends SuperKarel {

		public void run(){
			MoveToNewsPaper();
			pickBeeper();
			MoveBackToStart();
		}


		private void MoveToNewsPaper(){
			while(frontIsClear()){
				move();
			}
			turnRight();
			move();
			turnLeft();
			move();
			
		}

		private void MoveBackToStart(){
			turnAround();
			move();
			turnRight();
			move();
			turnLeft();
			while(frontIsClear()){
				move();
			}
			turnAround();

		}
}

The aftermath

20131014-064701.jpg

Chicago was an awesome marathon for the three of us.
Dev got her sub 5 PR. Reagan got a 4:36 and I got a 4:43. I was hoping to get it below 4:41 which was my PR last year at the Twin Cities Marathon but it wasn’t meant to be.

One day I would earn that ultimate dream of mine to have a negative split on my marathons. Right now I am just going with the “run as fast as you can” mentality.

But for now I am still enjoying my strategy even though I hate slowing down at the last half.

I was giving a thought about asking one of the really fast pacers about what it would take to get to their level. But I stopped cause I know I wouldn’t be able to handle the answer at least not just yet.

Another marathon

I am now sitting on a plane to Chicago. Feeling hot right now , the plane AC hasn’t been turned on yet. I hate that feeling. And Dev and I took this connecting flight from Detroit to Midway, and this plane is a small jet.

It still is hot outside. Tomorrow would be better according to the forecast. Lows of 45 according to weather.com. That would be a relief. Its always good to run in cold weather. Hopefully we would get a PR. Most of my best runs were on cold weather.

Chitown here we come. Now what to eat for pasta dinner?!?

20131011-162739.jpg

Freeswitch and NAT audio issues

I am running Freeswitch from git and lately I notice that it’s not working properly. Something changed that I could not put my finger on it.

So this is my setup:

  • Freeswitch from git – I almost always update this when I can. I don’t remember when but I one of the update I did broke the thing
  • Dingaling/GoogleVoice – I don’t know if this is FS or a google voice problem. Maybe google made some changes and screwed up freeswitch
  • Debian Sid – updated all the time
  • PFsense – latest and greatest router .I am doing NAT through this box. I might have made some changes that might have affected my FS . Need to investigate this.

What I have done so far:

  • I had set stun on jingle_profile and I still hear no audio , DTMF works however
  • Setting stun off disables DTMF and still no audio
  • Turned off Call Screening/Presentation
  • I am reverting to version 1.2.stable today. Before I was tracking Master.

Reverting to stable worked!

Pork and Ships

Just recently I was  reading up about all the stuff going on back home, specifically the “Pork Barrel” issue and the Ferry boat sinking.

First off, the “Pork” , I know that people are disgusted that there is this big scandal but hello, this has been going forever and why now? Somebody must have been screwed ie did not get a piece of the “pig” pie. LOL. So ,we had that symbolic march , now what? Should we impeach  our President and replace him with somebody more “makatao” like I don’t know “Erap”. It’s hopeless. As long as filipinos votes can be bought ,this kinds of  situation will always happen. There will always be a winner and a loser . Sadly the winner is the SOB politicians and the poor folks are the losers.

 

And about the Ferry sinking, I am so sorry for all the people that died. It’s tragic but I guess accidents happen. We just have to accept the fact that the Philippines is an archipelago and that the most common means of transport is through the seas . In America, a lot of people die from car accidents because that’s the most common means of transport. 

 

 

The last frontier Marathon-Cation