Posts Tagged ‘exercise’

Stagnancy

Thursday, July 1st, 2010

I just finished reading an article on stagnancy http://www.lifehack.org/articles/lifehack/5-steps-to-move-out-of-stagnancy-in-life.html. From my own experience I couldn’t agree more with all the suggestions given. I’m one of those cyclic people; I go on a high working tirelessly and then I reach a low point. So now I try to relax a bit more and spent some time doing things other than work.

My one tip for combating stagnancy is to start slowly and let the momentum build. This is especially useful when you are having trouble starting a project; start with something mundane. I have trouble with focusing when reading something very technical, so I start off by writing down what I read. The combined motor action helps me focus more and gets me started. The hardest part to combating stagnancy is getting started. So start off slow and steady.

OOP

Saturday, December 5th, 2009

Object orientated Perl! Boy, if there is one thing that I want to fully grasp, this would be it. So I spent time (yet again) reading perldoc perlboot. This would be the second time I’ve been through the beginner’s guide to OO Perl. Here’s are the key points (from memory which may be inaccurate):

  1. Packages are used to create “Classes”
  2. In each class, you have methods which operate on an object
  3. Methods are created by using Perl’s subroutines
  4. Methods from can be “inherited” from another class using the @ISA array
  5. The @ISA variable needs to be explicitly (if that’s the right word) declared, either using the full namespace or defined globally using “our”
  6. A constructor is a method used to create a specific instance
  7. An instance is a blessed Perl reference (be it a scalar, hash or array)
  8. The arrow invocation arrow “->” is used to specify a method for an object (i.e. $object->$method)
  9. When using “->” with an instance, the first argument passed to the method is the object
  10. When using “->” in the manner of Class->method, the first argument passed will be the class
  11. Interestingly (to me), when you use “->” with an instance, the method can still pick up the class from the instance

So by using these ideas, you can create classes with packages; within these classes you can create methods, i.e. the new method as the constructor which creates an instance of the object.

I think the best way to really learn OO Perl, is to start writing some. I will post my OO Perl exploits as they come along.

Day 3 of my new regime

Wednesday, June 3rd, 2009

I have been keeping up my three pillars of health so far; been eating healthier, and much more in general, been sleeping a tad earlier and doing a tad more exercise. And the best thing of it all is that I’m feeling much better. I’m more coherent, I feel more energised and in general I feel much better. So definitely reaping the benefits already.

Today was also lab meeting day where I had to present, and although I didn’t really feel like presenting I felt the talk went well, especially for how much preparation I had. Tonight was also “State of Origin” night so I went over to a friend’s place to watch the game. I don’t have a great understanding of the game, but it was still good to be more social. For the records, Queensland won tonight due to pretty sloppy play by NSW. I also passed by Borders and purchased Learning Perl The Fifth Edition, which I plan to read from start to finish.

I plan to start from the beginning and move forward to the more advanced Perl programming books. I have decided to be known as a Perl programmer due to the usefulness of the language. Again this is another dedication that I need to keep and although I won’t push myself too hard so that I burn out, but I will definitely try to keep up with my regular Perl reading. My current knowledge of Perl is just too scattered, and I hope I can start building the foundation towards a strong understanding of the language.

First day of the month

Monday, June 1st, 2009

So I’ve been in a slump lately, which can be attributed to several factors; lack of sleep, lack of nutrition and lack of exercise. Coincidently, I was watching a documentary last week about sleep on SBS called “Awake is the new sleep”; it documented how lack of sleep can severely affect a person’s lifestyle. It was very intriguing, even though I knew the importance of sleep. An important message that was conveyed in the documentary and also why I brought up the documentary, was that to have a healthy lifestyle we need the three pillars of health which are composed of good nutrition, exercise and sleep. As such I suffered the consequences of having no pillars to support my health.

Today is the first day of the month, a good time to start a new regime. I went grocery shopping tonight and purchased almost 120 dollars worth of groceries. I bought lots of fruits, vegetables and breakfast! I’ve been buying food from the university for almost two weeks now, and besides wasting a lot of money, it has been unhealthy. I have also finished doing some light skipping and weights, and necessary cleaning of the bathroom! And my mind is definitely much more clear and active now. A week ago I would have difficulty writing my blog and just thinking concisely. I should really remember the importance of good health.

I know I can easily lose focus and lose track of things, but for once I would like to keep focused. It has been physically and mentally rewarding, and it is only day one.