Saturday, November 23, 2013

External WD 1 TB will not connect (mount) on a Mac

I have had this problem for a while where the external WD drive doesn't want to connect or be visible on the Mac. I thought it was the cable and fiddled about with that but no. Occasionally it would connect but it didn't follow a pattern, or didn't seem to. I am using the drive as a Time Machine backup.

I may not have fixed it entirely but I can now get it to mount and indeed it has mounted correctly ever since - a few times.

I went to the Disk Utility app and the 1 TB WD drive was being found. It was in the left-hand pane as  shown in the image below.


The below image shows the drive in its working state.
In it's error state it was displaying the text: disk1s3




I went to the Terminal and ran the command:
diskutil list

This provided me with the following:

John-Mac-mini:Volumes John$ diskutil list
/dev/disk0
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *500.1 GB   disk0
   1:                        EFI EFI                     209.7 MB   disk0s1
   2:                  Apple_HFS Macintosh HD            499.2 GB   disk0s2
   3:                 Apple_Boot Recovery HD             650.0 MB   disk0s3
/dev/disk1
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:     Apple_partition_scheme                        *1.0 TB     disk1
   1:        Apple_partition_map                         32.3 KB    disk1s1
   2:                  Apple_HFS                         1.0 TB     disk1s3



I then mounted the drive:

John$ diskutil mount disk1s3


I noticed immediately that the drive mounted on the desktop and in the DiskUtility app.

Note that the disk identifier may be different for your setup. If you are unsure, look at the disk Utility app where I have drawn the red rectangle.

As I say, I haven't fixed this because at the next power off it may refuse to connect again.

When running distil list again the drive partition is given a name ' My Book Time Machine' as expected. I am not sure if this name is only available after mounting, and therefore it is correctly blank before mounting, or whether that is a part of the problem.

/dev/disk1
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:     Apple_partition_scheme                        *1.0 TB     disk1
   1:        Apple_partition_map                         32.3 KB    disk1s1
   2:                  Apple_HFS My Book Time Machine    1.0 TB     disk1s3



Friday, November 15, 2013

The INSERT key on a Mac is '0' on the number pad

Yep. It is.

Useful for a number of things. If you're on a MAC, with Windows running in a Virtual, and you're running vSphere to log into an ESXi Windows VM, ... (take a breath) ... then you'll need to enter a CTRL + ALT + DELETE.

Which is actually, Ctrl + alt + Insert, which is in fact, Ctrl + alt + 0.

(That will make sense if you need to do it, it's just garbled nonsense if you're not trying to do it)
  1. You are on a Mac.
  2. You have VirtualBox
  3. In VirtualBox you have a Windows virtual machine
  4. You are running the Vshpere application in the Windows machine.
  5. vSphere is connecting to a Windows VM on another computer (Windows #2).
  6. You will need to issue the CTRL+ALT+DELETE command to that other Windows (Windows #2) to start it.
  7. vSphere will accept CTRL+ALT+INSERT, however because we're on a Mac, we'll need to use CTRL+ALT+0


Thursday, October 31, 2013

Reverend Thomas Bayes lived in Tunbridge Wells - now there's a thing

The other night I was in Tunbridge Wells happily wandering along in the dark autumn drizzle. The damp orange street light was skimming off the cold black road surfaces. I was off to see Norman Watt-Roy again. He's great.
Quite by chance I noticed Bayes' plaque on the gate post.




A couple of my earlier posts:

The very best Bayes explanation? Actually I don't think so now. I re-read it a few months back and it was confusing.



Tuesday, October 29, 2013

Virtual Box error with OSX Maverick

I just knew it would happen. I knew that upgrading to Maverick would trouble my VirtualBox. And so it was.

This is my third post on VirtualBox. I really think I should have learnt something by now. Will I never learn!



The first thing I thought I'd check was the version. The latest is 4.2.18. The version I was running was  4.1.18. So I should upgrade. That fills me with dread also.

First though I thought I'd test the Ubuntu VM I had. It worked. So that meant that VirtualBox will work with Ubuntu on Maverick, but it will not work with Windows 7 on Maverick. I'm not sure if this is good news or bad.


Uninstall the new VirtualBox, unintall the old one


Run the instal package, and when presented with the following window, run the script (see bottom right of the window).




But, you may get this error when running the VirtualBox_Uninstall.tool





So try this if you feel brave. It may be that your OSX is protecting us from Developers not identified by the App Store.
Set the Allow apps... from Anywhere. I would suggest you set this back to something more secure once finished with it.



The run the uninstall again. More errors in the Terminal Windows?
Sigh!

Restart OSX. Do not start VirtualBox. Retry the uninstall.

Note:
  • When the script asks you for Yes/No, type Yes.
  • When you enter your password during there is no feedback. Type the password in carefully and hit return.

There will be one feedback on the screen that looks like errors. They may not be. I can't remember what they were, something like "...forgotten". You can ignore them.
Once the uninstall script has run, then install and go.

Good luck.

Let me know if this was of any use. Thanks





Saturday, September 21, 2013

How to password protect a Pages file on iCloud

It took me awhile to figure out how to do this it so I thought I'd post it.

This isn't special for iCloud usage of course, it's for the Pages file in general which can be stored locally or on iCloud. It's very handy for accessing a sensitive doc from home, work or on the go with the phone.

Anyway, it's very easy. The feature is tucked away in the Inspector. See below.








Thursday, September 19, 2013

Drawing class diagrams or flow diagrams in ascii characters

I've always wanted this, and I have often thought about writing it. But I needn't.
This is great.

Drawing flow diagrams, or class diagrams in ascii.

http://www.asciiflow.com/#Draw



+------------+
| Comparison |
+------------+            e.g. Apple     e.g. Pear    e.g. Grape
                          +---------+   +---------+   +---------+
                          | Thing   |   | Thing   |   | Thing   |
                          |         |   |         |   |         |
                          +---------+   +---------+   +---------+

  +---------------+       +----------+  +----------+  +----------+
  |ComparisonPoint|       |Calculated|  |Calculated|  |Calculated|
  +---------------+       | Value    |  | Value    |  | Value    |
                          +----------+  +----------+  +----------+

  +---------------+       +----------+  +----------+  +----------+
  |ComparisonPoint|       |Calculated|  |Calculated|  |Calculated|
  +---------------+       | Value    |  | Value    |  | Value    |
                          +----------+  +----------+  +----------+

  +---------------+       +----------+  +----------+  +----------+
  |ComparisonPoint|       |Calculated|  |Calculated|  |Calculated|
  +---------------+       | Value    |  | Value    |  | Value    |
                          +----------+  +----------+  +----------+

                          +----------+  +----------+  +----------+
                          |Comparison|  |Comparison|  |Comparison|
                          | result   |  | result   |  | result   |
                          +----------+  +----------+  +----------+







         Strategy Pattern
        -----------------


        +-----------------------+        +----------------+
        |      Context          |        |   IStrategy    |
        |-----------------------|        |----------------|
        |                       +-------->                |
        | ctor(IStrategy)       |        |                |
        |                       |        | PerformWork()  |
        +-----------------------+        +---^------------+
                                             |
                                             |                          +
                       +---------------------+----+
                       |                          |
                       |                          |
        +-----------+--+-----+      +-------------+------+
        | ConcreteStrategyA  |      | ConcreteStrategyB  |
        |--------------------|      |--------------------|
        |                    |      |                    |
        | PerformWork()      |      | PerformWork()      |
        +--------------------+      +--------------------+



Wednesday, September 11, 2013

Install libraries into Clojure

This can be a bit confusing at the beginning, the loading of libraries into the Clojure project.
For this I use Eclipse and the excellent CounterClockwise.

The initial dependencies can be found in the Leiningen dependencies folder, shown below.




This is the initial project.clj file with one single dependency.



Adding the dependencies to the project.clj file


Doing the above will make Lein go and get the libs and place them in the dependencies folder as shown.




Not using Eclipse?

If Lein is installed, you can navigate to the project folder in the command line, terminal, and enter:
lein deps




Monday, September 9, 2013

Six Deadly Sins of Leadership - a comment

This post by Jack Welch and Suzy Welch appeared on Linked in and it struck a note with me. I feel that there is a lot in it that I think I agree with. I'm not sure if I'm entirely in agreement with the list or if it really matters whether I agree or not but there is, deep down in me, a healthy dislike of the mundane, uncreative and uninspired leadership/management here in the UK.

http://www.linkedin.com/today/post/article/20130327154206-86541065-the-six-deadly-sins-of-leadership?trk=eml-mktg-inf-m-top13-0827-p3

The main headings of the article are, the six deadly sins are:

  1. Not giving self-confidence its due.
  2. Muzzling voice
  3. Acting phoney
  4. Lacking the guts to differentiate
  5. Fixation on results at the expense of values.
  6. Skipping the fun part
The trouble with these lists are that they can only dumb-down what is a very serious problem. That's a bit unfair of me as its purpose is to highlight some problems and I guess it works at that. It's generated me to waffle on in this post to no-one in particular, so at least I'm thinking about it. But dumbing-down? Well probably. Or maybe just over-simplifying. Perhaps that's a nicer way to say it.

#1 - Not giving self-confidence its due

"Self-confidence is the lifeblood of success."

I'm not a great manager, or leader in the charismatic way, but I think and learn and challenge. Sometimes when time permits I can look up and innovate. But the above list of six things are not quite right, or in the right order. You do tend to associate precedence to the order of things and, Not giving self-confidence its due, isn't number one.
There are at least two equally important and crucial additional aspects to this. 
One - Not giving confidence or time to the person that lacks confidence. I have seen an environment where a person was not regarded highly for his talents. In fact the prevailing opinion of him was truely low. Behind the scenes, management would talk rather poorly of the person. I knew the person was bright, was hard-working, sharp, but there were issues. The transformation to this person's life, career and prospects are now profoundly improved because I worked at this, pressing  ahead with  support and mentoring. I remember that it took just one year from meeting this person to bring about significant change to him and the team.
Two - not dealing with the over-confident or arrogant.
This is tough and it takes good judgement and self-control. One person's arrogant is another person's genius. You must get it right but you must look at the personal interplay in the team and ensure that personalities are in control and in some sort of harmonious balance and that other potential stars are not being stifled. I've seen very dominant characters suppress others through bullying or sheer confidence. Whatever the method of handling this, it is important.

#2 - Muzzling voice

"Perhaps the most frustrating way that leaders underperform is by over-talking." 

Over-talking is bad. Yes I agree to that. But, over-talking is different to over-driving the discussion to your favour. I talk too much after coffee, but always listen to the input of the team. Collectively we know more and are greater than the sum of our individual voices. So I agree in general with the #2 but I think it's slightly off.

#3 - Acting phoney

"Can you spot a phoney  Of course you can – and so can your people. Indeed, if there is one widespread human capability, it is sniffing out someone who is putting on airs, pretending to be who they’re not, or just keeping their real self hidden. Yet too many leaders spend way too much time creating personas that put a wall between them and their employees. What a waste."

I didn't agree with this at first. I thought it over simplified what I imagined to be the real problem. But now I think I agree. There are a lot of "suits". Even if they don't wear them. Often they are well intentioned and well-ordered. Sometimes they are playing the corporate ladder of survival and progression. Maybe the companies need them. Maybe the company simply needs fewer of them. But there is a style that can be destructive to creativity and motivation. This needs to be understood and managed.

#4 - Lacking the guts to differentiate

"You only have to be in business a few weeks to know that not all investment opportunities are created equal. But some leaders can’t face that reality, and so they sprinkle their resources like cheese on a pizza, a little bit everywhere 
... 
But leaders who don’t differentiate do the most damage when it comes to people. Unwilling to deliver candid, rigorous performance reviews, they give every employee the same kind of bland, mushy, “nice job” sign-off."

Yes I probably understand this and agree. But  headline problem for this list. I'm not sure because I haven't managed many managers.

#5 - Fixation on results at the expense of values.

"Everyone knows that leaders deliver. Oratory and inspiration without results equal…well, a whole lot of nothing. But leaders are committing a real dereliction of duties if all they care about are the numbers."

I like this one. One thought along these lines that I believe is with visual products for example. It is simply not good enough to provide function and expect to differentiate ourselves from the rest. If we can get people to love our product through aesthetics or service then we have values and we have pride.  There are many aspects to this results v values equation that I need to think about. I will waffle on some more in another post.

#6 - Skipping the fun part

"What a lost opportunity. Celebrating makes people feel like winners and creates an atmosphere of recognition and positive energy. Imagine a team winning the World Series without champagne spraying everywhere. You can’t! And yet companies win all the time and let it go without so much as a high-five."

Yep.
I agree in the celebration part but celebration is not the only definition or expression of fun. Before that there is the fun of doing the job. I'm thinking particularly of a development environment here and there has to be a lot of appropriate fun. Interaction in the team, jokes, support, team work, banter - all useful where appropriate and sensitive to those who might feel alienated by certain behaviour.
Success comes daily. Solving a sticky bug, a change to a design, writing a good doc. It's not all big end-of-project celebrations.


Friday, September 6, 2013

Can't get (use 'clojure.repl) to work in Clojure

Clojure 1.5.1
In the REPL you might not be able to use the clojure.repl library.

Normally you would type:
(use 'clojure.repl)

However this causes a problem. You need to Require it first.

So type,
(require 'clojure.repl)

then,
(use 'clojure.repl)

Sunday, September 1, 2013

Propositional logic, First order logic and Higher order logic

Propositional logic

In Propositional logic symbols represent Facts (Propositions).
for example:
W - the person is a woman.

Syntactic elements

AND, OR, IMPLIES, EQUIVALENCE, NOT

First order logic (First order predicate calculus)

First-order logic represents the world in terms of objects and predicates. It uses the relations between objects and their properties. It also uses quantifiers and connectives.

syntactic examples

Objects - door, house, dog, ...
Relation - employer, sister, inside, ...
Properties - black, free, empty, hot, ...
Functions - first in, father of, friend of, ...

Syntactic elements

terms - objects
Quantifiers - UNIVERSAL (for all),  and EXISTENTIAL (there exists)
EQUALITY symbol (=)

Syntax

In propositional logic every expression is a sentence and every sentence expresses a fact. In addition to sentences First order logic also has terms that represent objects.



Higher-order logic

First order logic is so called because it works with the first order objects of the world. Higher-order logic enables us to quantify not only objects, but relations as well. What that can mean in practice is that two objects can be thought of as equal if and only if all of their properties are equivalent . We could say that two functions are equal when their arguments have the same value.

I'm not too sure of the value of HOL and it seems a bit contentious.