Monday, 8 February 2010

Excellent tip on how to go to sleep

(For once a non tech related posts, but still perhaps nerdy...)

I've worked out how to fall asleep quickly, and this is my simple tip:

Basically I start to think/daydream about a fantasy story. Ie something completely irrelevant but interesting.

Maybe it is by coincidence or due to other factors like getting older or simply exhaustion but it seems to work evertime. And fails everytime I don't follow these rules.

So it has to be nothing realistic or related to my real life in anyway. If I think about something in my actual life I get too upset/depressed/happy/excited and very engaged into the thinking that I don't fall asleep.


So my rules are:

  • Never think about what I did today or what I need to do tomorrow. That engages my brain too much and I can't fall sleep.

  • Don't think about regrets of the past or problems in the future, again no sleep.

  • Don't think about anyone you know whether romantically or aggressively. No good can come of that. Well maybe...

  • Don't think about work or hobbies. You minds gets too active to fall sleep.


Think about someting interesting that can not upset you in anyway. Which is best if it is something not related to you at all.


The famous tip of counting sheep [2] jumping over a fence works on the same idea, but never worked for me as it was too boring. I remember a tip on a radio show that also is similar; The lady said she "thought and concentrated" about each part of her body from toes upwards step by step till she felt asleep. Doesn't work for me but is again related to concentrating on something completely irrelevant.


My thoughts/dreams are usually almost like a Hollywood film. Something not related to my real life, but I "live" in detail in these worlds. Maybe because I am a man (with a livid imagination) that my snoozethoughts are related to wild western / jungles / space / racing cars etc but they work.

I can continue the same story for months usually because I fall asleep so quickly so never really get anywhere in the actual story lines!

If trying to sleep try to block out all other thoughts and imagine yourself living a life in a place like the Avatar film, then maybe this will work for you?

If you have problem sleeping, try it!
Don't think about anything in your real life, think unrelated fantasy, and zzzzzzz.

Friday, 22 January 2010

Ubuntufying Jira

This will eventually be published here: flurdy.com/docs/jira/.

But meanwhile Ill edit a draft here:



Ok. Ive "finished" the document. Please read it on my website.


Ignore below


Below is my initial draft howto, but a much more up to date version is on my site.



Why


I want to install and run Atlassian's Jira, as it is just great. Especially as I many moons ago had paid for the $10 starter pack for Jira and Confluence

I want to install and run it on an Ubuntu server.

Downloading the standalone version of Jira works very well. Atlassian has very thorough documentation of every step and issue possible.

But I want to be different... No I just like the idea of Ubuntu/debian's package system and obeying the FHS recommendation of file locations etc. So I decided to modify the download from Atlassian:

Steps



Install Jira as recommended


Launch Ubuntu (Follow flurdy ec2 docs for tips on using Ubuntu & ec2)

Install java:
sudo aptitude install sun-java6-jdk;
sudo update-alternatives --config java;
sudo echo JAVA_HOME=/usr/lib/jvm/java-6-sun > /etc/profile.d/java.sh;
sudo echo EXPORT JAVA_HOME >> /etc/profile.d/java.sh;
sudo chmod +x /etc/profile.d/java.sh

Download jira standalone

Extract and move Jira
tar xzf atlassian-jira-enterprise-4.0.1-standalone.tar.gz;
sudo mkdir /opt/atlassian;
sudo mv atlassian-jira*-standalone /opt/atlassian/jira-4.0.1

Add Jira user
sudo /usr/sbin/useradd --create-home --home-dir /usr/local/jira --shell /bin/bash jira;
sudo chown -R jira:jira /opt/atlassian/jira-4.0.1


If you are not interested in seperating the file locations etc, then you could now run Jira by launching
sudo /opt/atlassian/jira-4.0.1/bin/startup.sh
But I prefer not to...


Makign the install more FHSish



Create folder for changeable data
sudo mkdir /etc/opt/atlassian /etc/opt/atlassian/jira;
sudo mkdir /var/opt/atlassian /var/opt/atlassian/jira;
sudo chown jira:jira /etc/opt/atlassian/jira /var/opt/atlassian/jira


Move logs
sudo mv /opt/atlassian/jira-4.0.1/logs /var/log/jira;
sudo touch /var/log/jira/atlassian-jira.log;
sudo chown jira:jira /var/log/jira/atlassian-jira.log;
sudo ln -s /var/log/jira/atlassian-jira.log /opt/atlassian/jira-4.0.1/atlassian-jira.log;


Link configurations
sudo ln -s /opt/atlassian/jira-4.0.1/atlassian-jira/WEB-INF/classes/jira-application.properties\
/etc/opt/atlassian/jira/;

sudo ln -s /opt/atlassian/jira-4.0.1/atlassian-jira/WEB-INF/classes/log4j.properties\
/etc/opt/atlassian/jira/;

sudo mv /opt/atlassian/jira-4.0.1/conf\
/etc/opt/atlassian/jira/tomcat;

sudo ln -s /etc/opt/atlasiian/jira/tomcat\
/opt/atlassian/jira-4.0.1/conf



Edit configuration and enter Jira home
sudo vi /etc/opt/atlassian/jira/jira-application.properties;
jira.home=/var/opt/atlassian/jira


Move the database
sudo mkdir /var/lib/hsqldb;
sudo mkdir /var/lib/hsqldb/jira;
sudo chown jira:jira /var/lib/hsqldb/jira;
sudo ln -s /var/lib/hsqldb/jira\
/opt/atlassian/jira-4.0.1/database



Move non static tomcat files
sudo mkdir /var/opt/atlassian/jira-tomcat;
sudo mv /opt/atlassian/jira-4.0.1/work\
/var/opt/atlassian/jira-tomcat/;

sudo mv /opt/atlassian/jira-4.0.1/temp\
/var/opt/atlassian/jira-tomcat/;

sudo ln -s /var/opt/atlassian/jira-tomcat/work\
/opt/atlassian/jira-4.0.1/;

sudo ln -s /var/opt/atlassian/jira-tomcat/temp\
/opt/atlassian/jira-4.0.1/





Init script



Copy Atlassian's init.d script


Jira port


Follo Atlassian's port page.



Apache proxy



Using elements from my own tomcat+apache howto and Atlassian's Apache page




Monday, 21 December 2009

Islands and lagoones - office open plan rant

Time to rant/moan/"throw my toys out of the pram" regarding another perhaps insignificant matter:

open plan

Open plan offices, I don't like them.

Unfortunetly it is now the norm in almost all the offices I work or visit. It is meant to enhance team work, increase communication, lowering barriers etc. And while the idea sounds good, I find it very tedious and believe it is counter productive.

But I know a solution; small open plan rooms laid out in a lagoon style. More detail further down.



For a knowledge worker, a developer, normal open plan offices are very intrusive and limits the ability to work effectively. For managers, sales and administration staff whom require a lot of communication and less concentration I can certainly believe it is a benefit, but not for people whom need to concentrate.


Placing people in rows of desks facing each other is much an extension to the American cubicle office spaces. It is like an office factory. The current trend of islands, whilst better, especially if two backs against a wall,
islands
but still leaves two or more in the wind swept corridor seats. But they still suffer from all the issues I detail below.

An even more amusing contradiction is when the knowledge staff are in an open plan office but the administration are in separate offices. It should really be the opposite, in terms of whom need to be isolated. True they may have confidential work, but that is what quiet rooms are for.


Main issues

  1. open-plan-bad-health
    An important issue should be that open plan office is bad for your health.

  2. The noise is however my main problem. Both audible and visual noise.

    • People talking about items which does not interests me but still disturbs me and breaks my concentration. Or worse talks about something interesting! Especially if you are as nosy as I am.

    • People walking by especially if you have a door / virtual corridor view point. Again being a bit nosy, my head pops up and down like a bobble head doll every time someone walks in, and since about 30 people sits in this section + meeting rooms, that is quite often.

  3. Low barrier to disturb.
    hi, just wondering...

    Nothing as annoying (ok a bit strong..) as when someone walks up to ask a question, when you are in the zone, in deep concentration, got a number of values, logic flows and algorithms in your head. Especially if it just a status update (not very agile), or a lazy question.

    Emails and IMs you can schedule a time to reply to when you are not in the middle of something. Phone calls, whilst annoying, can be rejected, But people standing over you can not be ignored. (Well you can try but that is not very nice)

  4. Paranoia.
    Another discomfort I have with open plan is the paranoia of people seeing your screen. You have to look busy, especially when I work as a consultant/contractor. It is another side of facetime, perhaps Screentime.

    Windows / websites that does not look like you are hard into coding right that minute might reflect bad upon you. So whether you are looking for solutions via google groups or downloading updates to applications but the vendor's website is too colourfull, it might reflect bad upon you even if it is important work. You hope most people realise this is normal work and even when you stray and look at bbc news, they would see it as normal.

    Unfortunetly many people do not perceive it this way, at least not subcontiously, so often you feel the need to cover your actual work with pretend work, especially for people higher up whom do not know your day-to-day work.

    Okay, after a while, (almost immidetely with me), I no longer care too much what others think I am doing, and run whatever applications and/or look at whatever websites I feel I need to. But it does still make me feel a bit paranoid, and still make me look over my shoulder, thus disturbing myself...


When disturbed, audible, visually or physically, it breaks your concentration and refering to the Peopleware book (wiki) it can take up to 20 mins to get back to that point. If this happens enough times during a day, that day is practically wasted.



Minor counter actions

  1. Head phones / headset

    • Music if loud enough kills audible noise.

      Which I use alot. Not sure what doctor would think about the damage to my ears. And wonder what Health & Safety would think about this near requirement for developers?

      It also scares the living daylights out of me when someone creeps up and taps me on the shoulder...

    • Headphones on but not on.

      A great trick to discourage unimportant interuptions is wearing head phones but without any music.

  2. Big, tall monitors, or just plain seperation screens to hide visible noise

    Again, a bit cubicle, but effective.

  3. Physical barriers

    Such as boxes, plants, narrow gaps to cupboards etc. Making it more difficult for people to actually come up to your desk, also discourages pointless interuptions.


All a bit anti-social, but with various effectivness they may help.

Bit these counter actions only paint over the main problems. The main issues are too many people in the room and no privacy.


The real solution


So my solution using the island nameing standard is: Lagoons.

Simple take a group of desks in an island and move their desks backwards to each corner or wall. Combine this with reducing the people in the room to 3-6 people whom work together.

What does this solve?:
  1. Audible noise:
    Only from the others in room can now be heard. No bable from people in other departments or teams which you could not care less about.
  2. Visual noise:
    Depends a bit on the layout of corridors etc, but mainly only the people in your little room will create visible noise.
  3. Physical disturbance:
    It would take more for people to walk into separate office rooms for minor issues that they could just as well emailed.
  4. Paranoia:
    You can work away, no one is looking over your should and virtually micro managing your every click.



Conditions of the room:

  1. They are all similar people and roles:
    So they will get on better, act similarly etc.

  2. Know how each other work and respect it.

  3. Reduce mobile phone use:
    Use quiet rooms when neccessary.

  4. One person is not frequently visited more than everyone else.

  5. Desks have space behind/ spare chairs for people to move around to encourage team work and pair programming.


defensive office

An amusing look at the defensive office space

Other office solutions:

  1. Separate individual offices.
    Would be nice, but might entice cabin fever and tangent development with little communication. And probably quite costly.

  2. Two per office.
    Can work, but people really have to get on very well. Also might feel need to socially interact more than normal, thus actually cause more interuptions.

  3. Home office.
    Really dependant on how the team communicates. Can work very well, if combined with excellent communications, and especially if time is split between a lagoon office and home.



Risks:

  1. Inter-room cooperation.
    The main issue this can cause is Us & Them situations between rooms.

    Possible solutions:
    1. Larger comfortable common coffee rooms. (with more than coffee available...)
      By combining this with actualy encouraging breaks this will stimulate interactions and break down barriers.
      rubber duck

      It can actually assist in problem solving by simulating rubber duck ([2], book) chat.
    2. The walls between does not need to be visually block each rooms.
      They can be glass at the top etc especially towards corridors etc. While still protecting against visual noise and paranoia this can hide the feeling of physical separations.





In the end for me personally, I need to be comfortable to get in the zone and be 10x more productive than in a busy noisy environment. And while everyone are different, I believe this applies to a large if not majority of developers and probably other knowledge workers.

Setting Spotify proxy settings when logging in

My problem:

* Installed Spotify for the first time on work machine.
* Work has very restrictive default proxy, which bans Spotify.

Thankfully being a developer in IT we know of a few more leniant alternative proxies....

Further problem:

* When launching spotify you need to log in with no option of defining the proxy to be used.
* And the error message just say unable to log in.


Solution:

* Unplug the the network cable

This prompts an error message with allow you to change the proxy settings.
Remember to plug in your cable again!

Tuesday, 8 December 2009

Deny mercurial, git, subverion folders in web sites

I maintain my websites mostly with a source control of some type (Subversion or Mercurial), but the folders with the SCM data should not be displayed on the actual web site.

Here is quick way to disable access to SCM folders in Apache by Ryan on Palaminum.net:

paluminum.net/blog/deny-scm-directories-with-apache

Saturday, 17 October 2009

Make or transfer ringtones to IPhone

I have a few ringtones Ive been using for years, across many phones. And I am now very tuned into them.

It was therefor quite annoying to find out that IPhone does not allow you to simply transfer them directly to it from my Nokia N95.

A bit of googling I found out that Apple deliberately bars this.
A bit more of googling I found out how to circumvent this restrictions.

Basically I followed this:

and this


And you do not have to jailbrake your phone, nor pay for software. The software used is simply a free well established audio sampling program.

Here is a breakdown:

  1. Transfer ringtone to PC (a windows box this time) from old phone. By bluetooth, email, Nokia's filebrowser etc (I located them via the phones file browser and emailed them as my desktop dont have the cable nor bluetooth)
  2. Install Audacity v 1.3+
  3. Install Lame for Audacity
  4. Install FFMPeg for Audacity
  5. Launch Audacity and locate audio file
  6. (You can copy into new file, edit etc if you want, but dont overwrite your original ringtone/song)
  7. Go to File/Export
  8. Enter details if desired, and choose m4a(ffmpeg)as export file type.
  9. Exit Audacity and locate new file in windows explorer
  10. Rename extension from m4a to m4r
  11. Open ITunes, and drag file from explorer into your library
  12. Sync and voila!

Friday, 9 October 2009

Twittering Blog

I used to write blog entries more often, whenever I had something on my mind that I wanted to rant about. Although prevously never a frequent blogger , lately I have blogged less and less.

Why? Twitter.

Before I would write pages and pages of mostly repeating rants. Now I restrict it to one twitter tweet (or two). And quite frequently...

But my long rants are now gone, or very rare. Maybe that is a good idea.



So what if any are the pros and cons of this "evolution":


Pros:
* My blog is not filled with rants.
* I twitter a lot.
* My rants are to the point, not filled with reiterated jibberish.
* My grievances are shared with more people.


Cons:
* I twitter too much?
* I rant more often.
* My blog is never updated.
* My twitter rants have no detail, or reflection.
* The threshold to rant is lower, and often rant needlessly, before I can rethink and research my issue.


And I presume this has happened for other people as well.

Funny, since the people behind [1] [2] blogger are some of the founders of twitter. Killing their own lovechild?

Wednesday, 2 September 2009

Wrong pub


Wrong pub
Originally uploaded by flurdy

Wednesday, 26 August 2009

26082009822.jpg


26082009822.jpg
Originally uploaded by flurdy

Tuesday, 21 July 2009

New spam/scam

Got this in the mailbox:
-----------------------
from judith
sender-time Sent at 12:55 (GMT+08:00). Current time there: 3:26 AM. ✆
to info
date Tue, Jul 21, 2009 at 12:55
subject About " anyview" intellectual property rights ( TO CEO & Principal )


Dear CEO & Principal ,

We are a domain name registration and dispute organization in Asia, which mainly deal with the global companies' domain name registration and internet Intellectual property right protection. Currently, we have a pretty important issue needing to confirm with your company.

On July 20, 2009, we received an application formally. One company named " Odnny Holdings Ltd " wanted to applied for the Internet Keyword "anyview " and some domain names through our body.

Now we are handling with the registration of these domain names and find that the keyword of these names is identical with your company's. So we have to confirm with you at two points:
1. If your company consign Odnny company to register these names, we will send application form to them and help them finish the registration at once.
2. If your company have nothing to do with Odnny company, they maybe have other purposes to register these names.

We haven't finished the registration of Odnny company yet, and we have postponed this application of this company temporarily already. In order to deal with this issue better, please contact us by telephone or email as soon as possible.

Waiting for your reply ASAP.

Judith
Auditing Department
________________________________________________________________________________________________________________________

Tel: +852-2297-9279
Fax: +852-2297-9209
Email:judith@eworlddnr.hk
Email:judith@eworld.hk
Website: http://www.eworlddnr.hk
judith
2009-07-21

-----------------------


Though about it for a second, seemed a quite odd,
then a quick google to confirm it is a scam.

If you receive something similar, ignore it. Or more fun string them along, but be careful.