Power is in the Present

Productivity, Ramblings No Comments »

I had a wonderful piece of advice the other day, in the form of a quotation:

bq. “Power is in the Present”

In other words, while you can look to the past for advice on how to deal with a situation and you can look to the future to prepare for new situations, the ability to influence your life and _actually do something_ is governed by what you do *now*.

Use your past and your imagination to inform your choices, but *actually focus on what you must do _now_*.

This is a great way to motivate yourself to get on with stuff when you’re in a lethargic mood. Just think “Power is in the Present - Right Now”, and get on with it.

del.icio.us:Power is in the Present  digg:Power is in the Present  reddit:Power is in the Present  magnolia:Power is in the Present

6 Ideas for keeping fit

Ramblings 2 Comments »

Here’s some good ideas for keeping yourself in shape without the need for a fitness regime. Some sound a little silly but “every little helps”:

1. *Lift things, don’t slide them* - When you have to move a chair, pick it up and carry it.
2. *Put your socks and shoes on while standing* - This will improve your balance, as well as help (to some degree) your muscles.
3. *Take the stairs* - Obvious, no?
4. *Get some fresh air* - If you have time go for a 5-minute walk before work (or better walk to work).
5. *Use a rough towel after your shower* - This exfoliates your skin and warms up your muscles.
6. *Box at shadows* - Shodowboxing uses a whole host of muscles and focuses your mind much more than a repetitive activity like jogging. Plus you can imagine pummeling someone you dislike which can be fun.

del.icio.us:6 Ideas for keeping fit   digg:6 Ideas for keeping fit   reddit:6 Ideas for keeping fit   magnolia:6 Ideas for keeping fit

Monte Carlo method in Ruby

Geekery, Programming, Ruby & Rails 1 Comment »

The Monte Carlo method uses random numbers to solve mathematical & statistical problems.” While it’s not a great definition, it’s all I need to say as the “Wikipedia entry for it”:http://en.wikipedia.org/wiki/Monte_Carlo_method explains almost everything you could want to know.

In place of a general explanation I’m going to write briefly about the way in which it can be used to estimate Pi.
[_Explanatory note_: Yesterday I was asked to use an overly complex VB program to analyze estimations Pi using the Monte Carlo Method and, as I’m on a mac, I needed to rewrite it in a language I can understand.]

If we take a square with sides of length _r_, and fill it with a circle (diameter _r_), the probability that a random point on the square will be in the circle is the area of the circle divided by that of the square:

P(In Circle) = Area of Circle / Area of Square

Thus

P(In Circle) = πr^2^ / r^2^ = π

Thus we can estimate Pi by finding the Probability that a Point will land in the circle.

Now, If we take one Quadrant of the circle/square mashup with a radius _r_:


!http://thescri.be/wp-content/uploads/2007/03/monte-carlo.png (Monte Carlo)!


π = P(In Circle) = 4(CircleArea / TotalArea)

If we let _r_=5 and pick a random point on the above square, say (2,3) and work out the distance from (0,0), we can compare this with _r_ to see if the point (2,3) is inside or outside the circle. We can easily find the distance between the two points thanks to “Pythagoras”:http://en.wikipedia.org/wiki/Pythagoras. If we take the root of the summed squares of the point, we’re there. In english:

Point: (2,3)
Length = √(2^2^ + 3^2^)

If this Length is greater than _r_ (in this case _r_=5) then the point is *outside* the circle, if it is less than _r_ it must be *inside*. By repeating this process a number of times we can estimate the value of Pi using our formula.

Here’s a ruby function to do the work for you:

The function myPi(_repetitions_) returns an estimated value of Pi based on the supplied number of repetitions.

There’s a good article similar to this on “datastructures”:http://www.datastructures.info/the-monte-carlo-algorithmmethod/.

del.icio.us:Monte Carlo method in Ruby  digg:Monte Carlo method in Ruby  reddit:Monte Carlo method in Ruby  magnolia:Monte Carlo method in Ruby

Don’t be too special

Productivity No Comments »

As your mother might have told you: everyone’s good at something, and most people are particularly good at one specific thing. In my opinion it’s good to focus your efforts on one particular thing at a time, be it cutting your toe nails or ensuring that your business prospers. I’ll admit that the two are somewhat different in scale, but the principle is the same — focus on *one thing at a time*, it’s the best way to work.

Take cutting your nails. If I try to eat dinner, read a book and clean the kitchen sink all at the same time I’m liable to drop my book into a dinner-filled sink and spill my toes all over the floor. Not ideal.

In contrast, if I want to see my business prosper (or attain my degree), I can’t be doing much else - I need to specialize, right? I’d say no, *not right*. While it’s important to focus your attention on a particular goal, it mustn’t be to the exclusion of all the other important things around you.

Over-specialization, as I like to call it, leads to a single-track mindset where you stop pushing your horizons and assume that only information relevant to your goal is important. It’s all very well to march in quick time towards *your* one particular point on the horizon, but it’s far too easy to lose sight of all the *other* weird and wonderful things on it. I know that all of my “fringe hobbies” impact on the way I see the world and my approach to both work and other people.

So while it’s okay to specialize, don’t over-specialize or you’re in danger of stressing yourself out, alienating friends (or at least those unconnected with your specific goal) and, over time, losing interest in a broad range of subjects.

del.icio.us:Don't be too special  digg:Don't be too special  reddit:Don't be too special  magnolia:Don't be too special

Wordpress and Textile 2

Geekery No Comments »

I’ve just spent about half an hour trying to find a working version of the Textile plugin for wordpress. I gather that some versions of WP ship with a Textile plugin but this (2.2 bleeding edge) doesn’t seem to.

To save anyone else the hassle you can get “version 2.0.5 from idly.org”:http://idly.org/2004/09/10/textile-205. It seems to work.

del.icio.us:Wordpress and Textile 2  digg:Wordpress and Textile 2  reddit:Wordpress and Textile 2  magnolia:Wordpress and Textile 2

Skin Windows XP to look like a mac

Ramblings 2 Comments »

Back in the good old days before I had the money for a real Mac I, like many others, had to put up with Windows. It wasn’t great, but it worked… just. The point is, it did most of what I needed at the time.

Although I was happy to put up with all those little annoyances, i saw no reason why I should look at an ugly interface while I waited for my PC to crash — I wanted a pretty GUI.

As I was fiddling and installing things I wrote a short guide and bundled it with a lot of the software I used. Having rediscovered the Zip file I thought I’d post it up for anyone who wants to give it a go.

I found that most of what I did had little impact on the speed or performance of my PC so it’s preferable to something like WindowBlinds.

*BE WARNED*: The software is probably out of date so you might want to grab the latest versions of it all.

Download the Tutorial”:http://thescri.be/wp-content/uploads/2007/02/windows_cust.zip

del.icio.us:Skin Windows XP to look like a mac  digg:Skin Windows XP to look like a mac  reddit:Skin Windows XP to look like a mac  magnolia:Skin Windows XP to look like a mac

A bit of Self Reflection

Ramblings No Comments »

Sometimes it’s a good idea to sit down and just think. I did just that the other day and as my mind wandered I started thinking about what I’m good at - what I like doing. It struck me that I should try to push my aspirations and ideas towards these things.

So here are some of my thoughts, in a simple old-fashioned list. No Waffle:

  • I’m good at making things neat and tidy.
  • I like procedure, order and outlines.
  • I like documents that follow conventions. My conventions.
  • I like implementing systems which are written down in detail.
  • I like designing paperwork, but not using other peoples.
  • I like stationary. A lot.
  • I like being outdoors and doing visual, manual work.
  • I like pretty things - stuff that is clean and functional, but looks nice too.
  • I like structures and schedules.
  • I like teaching, an awful lot.
  • I’m good at writing detailed plans & orders.
  • I enjoy writing documentation.
  • I like talking.
  • I like meta-stuff

Writing these down just now was a rather enlightening experience. It seems I’m rather a perfectionist, at least when it comes to paperwork and organization. It’s all rather at odds with my fairy laid-back attitude to things. I guess I’m a secret perfectionist.

del.icio.us:A bit of Self Reflection  digg:A bit of Self Reflection  reddit:A bit of Self Reflection  magnolia:A bit of Self Reflection

WordPress Theme & Icons by N.Design Studio
Entries RSS Comments RSS Log in