Month: December 2014

AppleScript – XML Parsing


Although Cocoa has a class for parsing XML i.e NSXMLParser and if XML parsing is needed in a Cocoa application I would recommend to use NSXMLParser, But there could be a application which is not Cocoa based and needs XML parsing support through scripting.

For any such scenario we can use AppleScript to parse XML content. The following code will demonstrate the parsing of a sample XML.

View original post 177 more words

AppleScript to copy every song of an iTunes playlist

New Technology Enthusiast

Have you ever wanted to copy some songs of your iTunes library onto a USB key?

Here is a little script to do just that. Here is how to do it :

  1. Gather all the songs you want to export in a playlist
  2. Launch the following script with Script Editor for example.

tell application "iTunes" -- Asks the user to select a playlist to copy set itunesPlaylists to (get name of playlists) set selectedPlaylist to {choose from list itunesPlaylists} -- Get every track in the selected playlist set itunesFiles to (every file track of playlist (item 1 of (item 1 of selectedPlaylist))) -- Asks the user to select the destination folder (where the files will be copied) set destinationPath to (choose folder with prompt "Destination folder :") -- Creates a list of the files' path set pathsList to {} repeat with iTunesFile in itunesFiles set loc to (get location of iTunesFile…

View original post 54 more words

There isn’t a (Mac) App for that? Create one!

乂(ノ⚈_⚈)ノ ~~ ★

Quite a while ago I wrote about Automator. That post dealt primarily with automation. Today we’ll take another look at this mighty tool, but with a (little) bit different focus. I’ld like to show how to start up stuff – the convenient way!

Let’s start with a real-world-scenario. Occasionally I want to establish a SSH-connection to my Raspberry PI. To do that I have to start up the Terminal-App and than – very exhausting (I admit I’m writing about first-world-problems here…) – have to type in the command “ssh pi@raspberry” (For this to work you have to map “raspberry” to the IP of your Raspberry PI. The easiest way to to that is to edit “/etc/hosts”.). There’s got to be a better way!

Luckily Mac OS comes with this wonderful thing called “AppleScript”. To do exactly what I described before, this little piece of code will do:

tell application…

View original post 203 more words

Xcode: wrap code in comment tags

While AppleScript’s Script Editor has long had a built-in function for wrapping or unwrapping code with comment tags, for some reason this seems to be missing in Xcode.

Not to worry, nothing a bit of AppleScript and Automator can’t sort out. This will work in most text editors as well as in Xcode. Here’s what it does:

Install the Service by double-clicking on the downloaded .workflow file and clicking through the dialog boxes. When it’s installed, you can assign it whatever hotkey you want in System Preferences | Keyboard | Shortcuts.

Download Toggle Comments for Selection

Screen Shot 2014-11-29 at 12.28.59

If you want to use it for languages that have different comment tags you can adjust the code in Automator. Likewise, it would be fairly simple to have the script detect a number of different tags and respond appropriately, but here I’ve just stuck with the /* …. */ tags.

A note on usage:

View original post 65 more words

What Is Agile Software Development?

Think Different

What Is Agile Software Development?

The term “agile” now signifies whatever folks want it to. It’s a term that has achieved widespread recognition within the software development field, and with that recognition, dilution to the point of near meaninglessness.

Agile was (circa 2001) a reaction by a bunch of experienced, senior developers to both the conventional “heavyweight” and widespread “cowboy coding” approaches to writing software prevailing at the time.

Forget about talk of incremental, iterative approaches. Forget about “inspect and adapt”. Forget about “embracing change”. Forget about “quicker development of higher quality software”. Forget about “earlier realisation of investment”. Forget about methods or frameworks like Scrum, Kanban, DSDM, XP, etc.. And forget about practices like sprints, wall-boards, and the whole practices nine yards.

These are all post-hoc rationalisations of one basic truth: The Snowbird folks and their fans – then and now – were fed up with wasting their lives on failed…

View original post 169 more words

The most common reasons that prevent IT to reach full potential – 10th: Not leveraging compute, Storage and Networking as commodities

The Friedkin Group CIO

The most common reasons that prevent IT to reach full potential – 10th: Not leveraging compute, Storage and Networking as commodities

Like the production floor, IT also has assets that need to be stored, managed, and provided. Development resources (Servers, DBs, etc.), software code, or production resources are some of the myriad of resources that need to be stored; and they do occupy space. Storage might be very expensive and providing storage, compute and networking as in-house commodities by your company is not the best usage of the company resources as well. After all, you are not running…

View original post 137 more words