The Right Moment to start over with Visual Studio and .NET

Yesterday, Somasegar, corporate vice president of the Developer Division at Microsoft announced Microsoft is going to open source the .NET platform. Since I left Microsoft in 2011, this is one of the moments I am most stunned. There is a fully featured community edition of Visual Studio, Android emulator, .NET open sourced under the MIT License, support for Linux and Mac OS X. Further background information can be found on my former colleague Immo’s post over here.

I went from Windows to Mac once I left, dug into Python, Java, a lot of Apache projects and somewhat C++ and JavaScript, developing for the new Jolla and Sailfish OS and contributing to the IoT project  OpenHAB. Anyway, I never really was that overwhelmed by the dev ecosystem as I was with Microsoft.

It does not look like the Microsoft I left at all, however, with these major changes, I will be definitely one of the first nailing .NET on my Mac OS X.  I am looking forward for this. For today, I will install the new Visual Studio Community 2013 on my virtual Windows, though.

Check and Fix the Shellshock Exploit on Mac OS X

Since I switched to Mac in 2011, I do not keep that much track of vulnerabilities as I did running Windows as my main system. However, the recently announces Shellshock exploit got my attention. As Apple has no patch in place by today, I went for a manual path of the bash shell. Only precondition is Apple’s Xcode being installed on your system.

First, checking whether your  system is vulnerable, you simply need the following bash script being run:

env x='() { :;}; echo not' bash -c 'echo safe'

In my case, unfortunately, I got a

not
safe

on my shell, running Mac OS X 10.9.4. Checking the version is simple done as following:

bash --version
GNU bash, version 3.2.51(1)-release (x86_64-apple-darwin13)
Copyright (C) 2007 Free Software Foundation, Inc.

In case you passed the check, you should run a second one, as since Thursday, there is a second attack vector knwon

env X='(){(a)=>\' bash -c "echo date"; cat echo; rm -f echo

The good news, not vulnerability from this vector.

date
cat: echo: No such file or directory

In case one would get the current date and time, there would be vulnerability, too.

As there is no patch from Apple right now, there is an possibility to build an update manually from the GNU repositories.

mkdir bash-fix
cd bash-fix
curl https://opensource.apple.com/tarballs/bash/bash-92.tar.gz | tar zxf -
cd bash-92/bash-3.2
curl https://ftp.gnu.org/pub/gnu/bash/bash-3.2-patches/bash32-052 | patch -p0
cd ..
sudo xcodebuild

In case you are vulnerable to the second vector, there is a another path to be applied:

mv build/bash.build/Release/bash.build/DerivedSources/y.tab.* bash-3.2/
cd bash-3.2
curl https://ftp.gnu.org/pub/gnu/bash/bash-3.2-patches/bash32-053 | patch -p0
cd ..
sudo xcodebuild

By running

bash-fix/bash-92/build/release/bash --version 
bash-fix/bash-92/build/release/sh --version

you should be able to verify the version of the fix.

GNU bash, version 3.2.52(1)-release (x86_64-apple-darwin13)
Copyright (C) 2007 Free Software Foundation, Inc.

Before replacing the old version, I backup the original bits.

sudo cp /bin/bash /bin/bash.3.2.51.bak
sudo cp /bin/sh /bin/sh.3.2.51.bak

Now you can replace the original ones by

sudo cp bash-fix/bash-92/build/Release/bash /bin
sudo cp bash-fix/bash-92/build/Release/sh /bin

Once this is done, you can check for the exploit again

env x='() { :;}; echo not' bash -c 'echo safe'
bash: warning: x: ignoring function definition attempt
bash: error importing function definition for `x'
safe

Once verified, you can get rid of the bash-fix folder and your system should be safe from this exploit.

 

Wiping all your iPhone’s Photos

Since iOS 7, the possibility to wipe your entire camera roll in iPhone has gone for good. In case you have  a lot of photos on your devices, deleting all of them might be quite an elaborate job to do.

To make it quick, there is still a possibility, if you have your Mac at hand. Connect your iPhone and start Image Capture which comes with your Mac OS X.

Image CaptureMake sure to select your iPhone on the right hand list, select all (⌘+a) photos from your device and press the delete bottom located at the bottom of Image Capture.

Deleting...Depending on the number of photos on your device this might take some time.

Make sure to import your photos beforehand either using Image Capture as well or some synchronization such as Dropbox’s Image Upload.

 

Revolutionary becomes Evolutionary

Recently, I discussed a lot with friends and colleagues about new mobile devices. Using Windows Mobile for years, I switched to Apple’s iPhone 3GS three years ago. Before, I talked quite a lot with a friend who recently bought one at that time.

Before, I used an iPod for listening to music and Windows Mobile devices such as the HTC Hermes or the HTC Touch Pro for quite a few years. Over time, I got annoyed by always carrying two devices, two power plugs, two connector cables and by managing at least two different applications to sync both devices. Eventually, my decision to buy an iPhone was driven by quite rational thoughts.

I was pleased with the hardware quite a lot, never worried about the processor, ram or other components of the device. The only drawback for me as an developer was the fact that you cannot simply deploy your home brewed application to the device.

I skipped two generations of the iPhone, finally rethinking of getting a new device. What shall it be? Meanwhile, I am quite off the track developing for Windows Mobile. Also, the hardware fragmentation for Windows devices is quite a bit. Similar situation with Android based devices. Which one is the reference hardware to buy? While the idea of developing for the Android platform is tempting, there are more facts to consider.

After three years, I have to admitt, the ecosystem lock in is quite a reason. IPad (first gen but with 3G), an almost retina but bought a few months to early MacBook and quite a lot of periphery to use with my devices is a good reason to stay. Nevertheless, with the new Lightning connector many peripheral devices became obsolete.

Much more than the hardware lock in is definitely a data lock in. Dozens of apps with your data, synced address books and calendars, lifelogging and quantified self data collected over the years is a good reason to stay with the current platform.

With the release of the new iPhone there is a lot of making-fun-of-the-new-iphone going on, however considering the facts above you see there are simple reasons to stay with a platform. This is definitely a goal of every manufacturers, and Apple plays this this game very well.

Looking at the new hardware, iOS 6 as well as the new Mac OS, there is no rocket science, there is no Star Trek communicator and no universal translator comming with new iPhone. There is no revolution, simply a technological evolution of a long designed system. A system that grew five generations.

Personally, I think a steady evolution of technology is worth quite a lot. I don’t want to migrate all the data, I don’t want to worry about the hardware to buy, I don’t want to learn new user interfaces and usability concepts for now. I want a device being part of my daily (business) life, easy to use, sitting in my pocket being available when needed. With the current evolution of the iPhone this should be possible for the next one or two hardware generations.

Said that, it will be a 64GB iPhone in white for me while it will be a Nokia Lumina 900 or a Google Galaxy Nexus for others due to the same or similar reasons mentioned above.

iPhone 5