iMessage and Safari downloads – get informed when needed

January 19, 2013 Leave a comment

If you are like me then you like to be update on everything that happens on your Mac.
So the time came when I wanted to know how many files are currently downloaded by Safari and when they are completely done (in order to add some more to the queue).
Well my Mac is in my office on the top floor so I was looking for an option to get informed when I need to go upstairs.
And I was thinking to send myself an iMessage if the downloads are done.
And actually that’s easier than I though and I’d like to share that.
It’s a simple AppleScript that looks into the download folder of Safari, counts the number of .downloads files and sends an iMessage if the number decreases or reaches 0.
The only trick is that you obviously can’t send yourself messages, so I send the messages from my AppleID to my mobile phone number (which are registered to the same iMessage account). Replace the values in the script (without the ) with yours.

Let me know whether that works for you as well 😉

set newDownloadCount to 100 
repeat
	set the download_count to 0
	set the download_folder to (path to downloads folder) as alias --or wherever the items are being downloaded
	tell application "Finder" to set the download_count to the count of (every item of the download_folder whose name extension is "download")
	
	if the download_count is less than newDownloadCount then
		tell application "Messages"
			send "Remaining downloads: " & download_count to buddy "**your_mobile_phone_number**" of service "E:**your_appleID_here**"
		end tell
		set newDownloadCount to download_count
	end if
	
	if the download_count is greater than newDownloadCount then
		set newDownloadCount to download_count
	end if
	
	
	if the download_count is 0 then
		tell application "Messages"
			send "All Downloads finished" to buddy "**your_mobile_phone_number**" of service "E:**your_appleID_here**"
		end tell
		exit repeat
	end if
	
	delay 60
end repeat

Thanks to fireshadow52. Got the solution to the number of downloads from him here

Advertisements

Evernote and Kindle – combined (with the help of Pages)

September 28, 2011 Leave a comment

I’m new to AppleScript – First sentence 🙂
I have a Kindle since some weeks – Second sentence.

And I wanted a convenient way to get all my notes from Evernote with a specific tag send to my Kindle.
Yes I’m aware that you can send them via email and stuff but that was not practicable for me.
So I started my first attempt to use AppleScript to achieve this.

First I needed to find out how to get all notes with a specific tag via AppleScript.
Evernote is fully scriptable so that task was easy:

property crlf : (ASCII character 13) & (ASCII character 10)
global myTitels

tell application "Evernote"
   set notesList to find notes "tag:Kindle"
   set myTitels to {}
   repeat with my_note in notesList
      set myTitels to myTitels & title of my_note & crlf
   end repeat
end tell

This left me with a list of all the titles of notes that have the tag “Kindle”.
I’m just using the title here to make the source code shorter and easier to read.

Next step was to create a PDF from this list so that can be read on my Kindle (PDF was easier to achieve than the mobi format)

tell application "Pages"
   set product to make new document
   repeat with my_title in myTitels
      set first paragraph of product to (first paragraph of product & my_title)
   end repeat
   save product in "/Volumes/Kindle/documents/Evernote.pdf"
   close product saving no
end tell

So now I have a PDF (with the help of Pages) on my Kindle.
So far so good, next step was to automate that task once the Kindle is being connected.
For some unknown reason, I was not able to use the script as Folder Action Script (it simply did not auto start) so I used Google a little and what came up was the following page:

http://macscripter.net/viewtopic.php?id=32534

The only thing that I needed to do now was to wrap my script in the one provided:

property crlf : (ASCII character 13) & (ASCII character 10)
global myTitels

property flashState : false
property flashName : "Kindle"

property myApp : "Autoflash"
-- property allNotificationsList : {"Disk present", "Disk gone", "launchd"}
-- property enabledNotificationsList : {"Disk present", "Disk gone", "launchd"}

set currentDisks to paragraphs of (do shell script "ls /Volumes")
(*
tell application "GrowlHelperApp"
   register as application myApp all notifications allNotificationsList ¬
       default notifications enabledNotificationsList icon of application "Disk Utility"
   notify with name "launchd" title "Notification" description ¬
       "Folder Volume changed" application name myApp
end tell
*)
if (flashName is in currentDisks) then
   if (flashState is false) then -- the flash drive is present
      -- do something when the disk is mounted
	tell application "Evernote"
	   set notesList to find notes "tag:Kindle"
	   set myTitels to {}
	   repeat with my_note in notesList
	      set myTitels to myTitels & title of my_note & crlf
	   end repeat
	end tell
		
	tell application "Pages"
	   set product to make new document
	   repeat with my_title in myTitels
	      set first paragraph of product to (first paragraph of product & my_title)
	   end repeat
           save product in "/Volumes/Kindle/documents/Evernote.pdf"
	   close product saving no
	end tell
		
       -- Growl_notify("Disk present", ("Disk " & flashName & " is present"), "")
	set flashState to true --After the script has been run, change the flashState property
   end if
   else
	if flashState is true then --This is ONLY accessed when the flash drive is NOT present
	   -- do something when the disk is unmounted
		
	   -- Growl_notify("Disk gone", ("Disk " & flashName & " has gone"), "")
	   set flashState to false
	end if
end if
(*
on Growl_notify(name_, title_, description_)
   tell application "GrowlHelperApp"
       notify with name name_ title title_ description description_ application name myApp
   end tell
end Growl_notify
*)

And last step using the launchd_installer from the same page and install the script to run automatically.

This solution works perfectly fine for me. If I plug in my Kindle, a PDF is created from my latest notes with the Kindle tag and automatically transferred to my device.

Mission accomplished 🙂
For sure that can be done easier, as I said this was my first attempt to automate anything on my Mac.
If you have suggestions how to make this easier, let me know in the comments !

Categories: Misc Tags: , , , , ,

Be proud of your software creation ! But what if not all think the same way ?

April 13, 2011 Leave a comment

Be ProudImagine you and your team create a piece of software, a product, completely new. New technology, new tools, from scratch.
After learning for more than a year how to effectively use Scrum as development process, of course also the new product is created in that way.
Iteration after iteration the product comes to life. More and more. Exactly as the product owner defines it. Yes the progress may seem as fast as expected, due to architectural decisions, things that are done under the hood, but still you always have a shippable product after the iteration.
And you are proud of the product you’ve created, because you know you have created it in a high quality manner (even partially test driven) with a good sense of scalability and modularity.
You have taken all into account what you’ve been asked for.
But there is that feeling that not everyone is completely happy, with the product and with it’s progress. It feels like not everyone is as proud as you are. Not everyone is talking as good of the product as you are.
And if you want to “sell” the product to your stakeholders, you sound way different than the POs for example.
That causes confusion.
Are the expectations different ? Can’t be, you have a prioritized product backlog that you go through from top to bottom.
Are you too slow ? You have retrospectives after every sprint and no one told us you are too slow.
Is the quality not acceptable ? According to your data you have a high quality product with a well defined test suite.
Are you missing other stakeholders expectations ? You are listening closely to your PO and also suggest actions to work into the directions of stakeholders.

So why is not everyone as proud as we are ? Are they happy at all ? Do they believe in the success of the product ?
Is it really just because we know things about our product that others don’t know ? Architecture, Technologies, Design, Performance, Scalability ?
Or are there hidden expectations that no one communicates ?

Transparency as a principle is a good thing. But everyone has to work according to that principle. Otherwise no one will be satisfied in the end.

Performance reviews for agile teams ?

Performance ratingDo agile teams need to have their performance evaluated in a yearly or bi-yearly performance review ?
Is there a need for these kind of reviews or don’t they make sense at all ?

First: we are performing bi-yearly reviews with all our staff (meaning developers, QA specialists, Operations guys etc.)
A short explanation what we are doing in these reviews before I come to the why:
the performance review is a 45 minuets individual talk with a team member and a person from the next hierarchy level. Well given the fact that we have very very very shallow hierarchy levels (two usually, max. 3) the talk is always between a team member and a senior management person.
What happens now during these reviews ?
We are performing them in three steps:

Step 1) This is the time for the team member to describe from his personal perspective how (s)he sees the last 6 months and self rates his/her performance.
Saying something about personal goals, personal development for the next 6 months is also part of this step.
And (hopefully) the management member gets also some direct feedback on his performance or on the company.

Step 2) Now we are coming to the feedback towards the team member.
No we are not evaluating the technical performance of a team member, more we are giving direct feedback what went really good in the last 6 month and what is supposed to be better.
Usually the things “to improve” are soft skill related, e.g. improve communication to business or increase your visibility towards the company.

Step 3) We agree on actions that should be taken out to personally improve in the next 6 months.
These steps are not tied to any bonus payout or similar (we only have team related goals), they should more act as cheat sheet for the team member for the next 6 months.
We also use these steps to support career moves, e.g. from Junior -> Senior developer for example.

So why are we doing this you may ask ? The team is supposed to give the individual, immediate feedback on his/her actions during daily work.
Yes, correct and this also happens.
But we are strong believers that, first, also management is supposed to give direct feedback to a team member. With shallow hierarchy also management is supposed to know the team members! And second, everyone should get the chance, without fearing any impact on himself personally, to give direct feedback to management.
So far this works quite well for us and is also appreciated by all team members.

What’s your take on this ?
Are you having personal performance talks with your team ? And if yes, how do you do them ?
Leave a comment !

Losing one or more team members – chance or impediment ?

February 23, 2011 2 comments

What if you lose a senior team member ?
Can this be a chance for the rest ?
Or is it an impediment ?

It happens to all teams: senior team members decide to leave the team or even the company.

What happens to the remaining team members especially if the level of seniority is low ?
What are your next steps ?

Having Scrum as your development process may help you to overcome the gap and may make it easier because it proclaims that we should have a cross functional team and everyone should potentially know about “everything”.
But even if you run Scrum a leaving team member always leaves a gap.
Not necessarily technical but at least personal – so if you lose important team members, the immediate thing to do can be “enabling” others. That means giving them the confidence and support to fill the gap if they want to. My experience shows that if you look closely enough, there are always one or two individuals who are able and willing jump into a new role and take over more responsibility.
Sometimes it needs some convincing efforts but usually it’s worth to look internally first.

The important part (which a manger and the team have to take care of) is support !
Because if someone is being pushed (willingly of course) into the middle of attention there are a lot of expectations from the team, the company and others and secondly it creates some kind of pressure for the one filling the gap.
This is by default not bad but still there must be room for failure without being blamed or even punished.
So helping individuals to grow into their new role fast is essential to the remaining success of the team.

After starting the process of enabling your remaining team members, you need to start the feedback process.
Ask around the team what they think about the situation and what, in their eyes, needs to be done to continue successfully.
This feedback may vary from training request to fill the technical gap until “we need more people”. Finding the root cause of the request is very essential here because uncertainty of the team maybe quite high which may lead to wrong conclusions how to solve the problem.

Together with the approach or enabling your existing team members and asking for their feedback it is important to start finding new members to the team so that the existing team does not feel weaker than it actually is and that if you really need to strengthen the team you are already prepared. Spending a lot of time on finding the RIGHT candidate is as important as letting the team help in choosing the correct one.
After losing team members and needing to “restock” there is no place for failure with HR.

Overall being in the situation of leaving team members leaves a lot of opportunities to the team, the company and last but not least to the individuals if carried out correctly.

So in my eyes it is more a chance than an impediment.
Let me know your thoughts in the comments.

Categories: Agile, Lean, scrum Tags: , , ,

Why to try ? You do it or leave it !

February 2, 2011 Leave a comment

Just a short braindump, as a very common situation just happened to me again !

Some sentences tend to annoy me. One of this is “… I try …”.
Whenever I talk to people proposing them something, asking them to do something I very often get the response: “Yes, good idea, I’ll try to do that”.
In my eyes there is not something like “trying”. Either you do it or not. And once you “try” you already started it and you are doing it.
So there is no try. Yes there is success or failure that’s right but that’s a complete different story.

So could you please remove the word ‘to try’ from your vocabulary ? Better say “I’m giving my very best” or something similar.
Remember once you try it, you’ve started it already 🙂

Categories: Misc Tags: , ,

Agile metrics – what to measure

January 31, 2011 Leave a comment

Agile Metrics

After reading another blog post (Antoine Alberti – What metrics do you need ?) regarding agile metrics and what other teams are measuring, I decided to finally finish my first post.

The above mentioned post suggested to use the following metrics:

    Release Burnup
    Velocity Trend
    Test coverage
    All anomalies

I agree to these metrics and we have even more. And all for the sake of transparency, to become better over time and find problems early.
These are the metrics we are gathering:

1. Velocity
Yes, (almost) everyone does that. Some team include a trend, some don’t. But we all agree that this is the minimum that you should know about yourself / your team.

2. Hours spend per USP
Here it already gets interesting. We are using the total capacity of the team in hours in order to find out how many hours have the teams totally spent per user story point (USP).
The total capacity is the whole time the team has in order to fulfill they commitment.
But what does that number mean in the end ?
Three possible benefits:

1) We can easily see whether the estimations of the teams per sprint are correct.
If the hours spent per USP vary a lot, the estimations are not correctly aligned to their baseline and may be incorrect.

2) We can identify early whether the team spends a lot of time on other work than the user story.
An example:
Assume that the average per USP is 5h.
In the current sprint it increased to 7h.
A possible reason – if the team did not change the baseline of their estimates – is that the distraction (other work) increased heavily.

3) We can easily say what a single USP costs the company.
To make it clear, we are not interested in individual “performance numbers” but in an overall look at they teams work in order to identify waste.

3. Predictability
Sounds like a big thing but is nothing more than calculating the amount of USPs delivered compared to the actual commitment. The rational doing that is to identify whether the sprint is a success and the “promise” from team’s side to the POs has been kept.

4. Work found during the sprint
This metric tries to measure the amount of work that the teams identified during the sprint. It does not matter whether this is US related work or other (incidents, bugs etc.). The number give the teams an idea how good they are at breaking down USs during the initial commitment phase and how good they break the US in tasks.
And it additionally gives us an insight into the organization to see what other tasks are put on the teams desk, and are too important to be postponed, like live system incidents.

5. Confidence level of the team
The Scrum master of the teams asks after the daily standup what the confidence level of the teams is to finish the sprint successfully. This percentage together with looking at events that recently happened can give a good insight on how the teams react to different kind of events, what the impact is on sprint success.
And last but not least, the PO has a very early indicator how the sprint is progressing.

6. Development metrics (Test coverage, PMD, etc)
In addition to all the “process” related metrics, we also gather some development metrics so that the team is able to better judge their own progress from a technical perspective and move forward towards a high quality product.
We are using a continuous integration tool to gather all the metrics at one place and whenever new code is being committed.
The data we are collecting is coming from the following sources (but not only):
– Number of unit tests run and passed
– Test coverage of all our code base
– Number of Selenium tests run
– PMD code quality metrics
– …
Of course we measure the trends here in order to take immediate action once we are going the wrong way.

We are always looking into other data that are useful for the teams to gather but so far we are quite happy with what we have.
What is your team using to measure progress, trends, etc. ? Or do you disagree to what we measure ?

Let me know in the comments.

Categories: Agile, scrum Tags: , ,