06 August 2015

Using Atom editor behind a proxy

Many companies love their internet proxies and the place where I work is no different. When I took the new 1.0 version of Atom editor for a spin the package manager complained that there was no internet connection. The reason was that it can't detect the default proxy settings in Windows. I had to specify the proxy settings manually.

The way to do that is to create the file .apmrc in the atom user settings directory. On Windows that will be something like :

C:\Users\username\.atom

Create the file (or update if it already exists) and add the regular proxy settings. Change proxy and port to suit your setup

http-proxy=http://proxy:1234
https-proxy=http://proxy:1234

We have an anonymous proxy here at work but if you need to specify user and password that would look something like this:

http-proxy=http://user:password@proxy:1234
https-proxy=http://user:password@proxy:1234




20 December 2014

Reactive programming with Reactive Extensions (Rx)

Reactive programming is seeing a lot of interest these days. Reactive Extensions is one way of adressing the problems of asynchronous, event-driven programming. Originally developed in Microsoft, it is one of the libraries that they have open sourced and it is now quite popular also outside of MS. Netflix is now the poster boy for Reactive Extension and they run the Java version.

I have put together some resources for people wanting to have a look at it.

Here is a short interview with Erik Meijer, creator of LINQ and Rx.NET, where he explains Reactive Extensions in less than 15 minutes. High ROI!



http://reactivex.io/
This is the homepage of all the variants of reactive extensions. It is actively developed and now is nicely branded. Their resources page is extensive and worth a look : http://reactivex.io/tutorials.html.

https://gist.github.com/staltz/868e7e9bc2a7b8c1f754
This excellent blog post is what made reactive programming start to click for me. This is concrete, clear and well written.

http://reactive-extensions.github.io/learnrx/
Netflix' online tutorial for Rx.js. This is very good. It takes a while to get through the excercises where you implement map, filter, etc. but after that it is a very good intro to practical use of Rx. Highly recommended!

http://www.introtorx.com/
A series of blog posts turned into e-book that gives an intro to Rx.NET. If you're on the .NET platform this might be just what you need.

http://www.infoq.com/presentations/netflix-rx-extensions
http://www.infoq.com/presentations/Netflix-API-rxjava-hystrix/
A couple of presentations by people on Netflix about how they are using Rx.Java. Jafar Husain and Ben Christensen are very good presenters and give a good overview.

http://blog.danlew.net/2014/09/15/grokking-rxjava-part-1/
A blog series about Rx.Java on Android but it explains Rx generally. Well written and helps you grok Rx easier.

https://www.youtube.com/user/reactconf
There was a mini conference about reactive programming in London called React 2014. For all of us that could not attend the presentations are on YouTube.


13 December 2014

Reactive programming with actors

I have looked into reactive programming lately. Here are a few resources I've put together during my research.

The first resource is an introduction to the theory of actors from the horses mouth. Erik Meijer interviews Carl Hewitt, father of the actor model. They have fun and the explanation is clear and straightforward.



http://www.infoq.com/presentations/traits-reactive-applications
This presentation shows Jonas Bonér explaining the tenets of the Reactive Manifesto and how the Akka actor system adresses reactive programming.

https://www.coursera.org/course/reactive
https://www.coursera.org/course/progfun
Coursera has two courses that are relevant. The top link is about the Principles of Reactive Programming. Unfortunately the course has run and it has no future sessions scheduled yet, but it looks good. The other course is a "prereq" for the reactive course that teaches Scala.

http://www.javalimit.com/2010/01/actor-thinking.html
Kresten Krab Thorup writes about how to think about actors when making actor systems.

http://www.scottlogic.com/blog/2014/08/15/using-akka-and-scala-to-render-a-mandelbrot-set.html
A very nice practical write-up about using actors for parallell computing of a mandelbrot set. Well written and easy to understand.

http://www.manning.com/kuhn/
Roland Kuhn is writing a promising book about Reactive Design Patterns. It is currently in the Manning Early Access Program but the first chapter that is an intro to reactive programming is freely available already.

http://www.slideshare.net/jboner/building-reactive-applications-with-akka-in-scala
Slideshare from Jonas Bonér. It isn't the same as watching the guy give the presentation but on the other hand you can get through the slides quicker.

https://parleys.com/channel/53a7d269e4b0543940d9e535/presentations
The presentations from Scala Days 2014 are out on Parleys. There is a bunch of presentations on reactive programming which in Scala basically means actors.

04 October 2014

Rooting Samsung Galaxy S4 I9505 International Version

For a long time I have resisted rooting my phone. I haven't been entirely happy with the way Samsung has packed the phone with all kinds of apps but it hasn't bugged me enough to do something about it. Now I'm going on a flight and I wanted some games on the phone to shut the kids up and the phone is already full. And when I check which apps to remove I see that all the apps that I want to remove are Samsung apps that are locked to the phone and can't be removed.

Enough is enough so I start researching ways to root the phone at last. I am on OS X which basically narrows the options down to Motochopper. I actually tried that but it didn't work with my firmware. Possibly I could also use Jodin3. That looked so complex that I never got around to it.

The reason for that is that I stumbled across a very simple way of rooting the S4. It is all done by the application TowelRoot as shown on the instructions here : http://gs4.wonderhowto.com/how-to/root-any-samsung-galaxy-s4-one-click-0155622 . Very straightforward and easy. And it actually works on my S4!

Basically what you do is first set up your S4 to allow sideloading of applications outside of the app store. Then open towelroot.com in your browser on the phone and hit the lambda to download the app. Then install it and run it. The app only has one button with the text "Let it Ra1n". Push the button and you've rooted your phone!

That was easy! Now I'm off to kill Flipboard, ChatON, WatchON and the rest of the bloat.

16 January 2014

Author: (no author) not defined in authors file

I'm still using git as my Subversion client and just today I came over this strange error message:

Author: (no author) not defined in /path/to/repos/authors.txt file

I'm not sure how the author can be missing on any commits in the Subversion repository, but the solution was quite simple. Just add an author called "(no author)" to the authors file like this:

(no author) = No Author <no.author@mail.com>

And then continue as normal with git svn fetch

18 November 2013

Git ignore won't ignore my files

Today I wasted a good half hour scratching my head over why Git wouldn't ignore my files. I put  my .gitignore file in my .gitignore:

.gitignore 

But .gitignore was still showing up in git status. At first I tried adding some stars and generally just fooling around, but that didn't work. After thinking and reading some documentation I still couldn't find anything wrong with it.
Finally I stumbled over the problem. There was an extra space at the end of the line. I removed that and all was well again.
Remember: Remove whitespace!

16 August 2013

State of the cloud

I'm going to do a quick presentation at work about the state of cloud providers these days. Since we are developers I'll probably have a bias that way and I'm going to look mostly at IaaS and PaaS providers. And I thought it would be a good idea to put down some of my notes here for reference.

Overall Gartner says that the IaaS and SaaS are more mature markets than PaaS which is still evolving. That article also says that they estimate the total cloud market to be $130 Billion! That sounds exceptional but reading further they estimate that half (48%) of that is online advertising and 28% is Business Processing as a Service. They further estimate SaaS at 14.7%, IaaS at 5.5%, management and security services at 2.8% and PaaS at one percent. So in money this would translate to $20 Billion on SaaS, $6 Billion on IaaS and $0.5 Billion on PaaS.

It is also expected that IaaS will grow fastest of the next year, but that PaaS will dominate growth further into the future.

The overall market leader is of course Amazon. In Gartners Magic Quadrant of cloud providers Amazon is both market and thought leader excelling in both vision and ability to execute. At the moment it is hard to see who can seriously challenge their position.

In a study by Synergy they find that Amazon has a market share of 36% in the IaaS segment, with IBM in second place after some acquisitions and British Telecom in third place. Salesforce is a clear market leader in the SaaS segment and has used that (and buying Heroku) to secure a leading position also in the PaaS segment. But Amazon is growing rapidly into this segment as well with their Elastic Beanstalk. Microsofts Azure platform is also a contender, but as we can see in the graph, the market is much more open than in the other segments and the market shares are smaller for the leaders.

I'm going to look at IaaS and PaaS providers to see what they offer and possibly at price points, but which clouds should I look at? Here are my IaaS candidates so far:

Amazon, of course.
Azure
IBM
Rackspace
Joyent
Oracle
Redhat
GoGrid
Cloud Provider
Savvis

And these are the PaaS candidates:

Amazons Elastic Beanstalk and Simple Workflow Service
Force.com, Salesforces cloud including Heroku
Google App Engine
Azure
VMware
Engine Yard
CloudBees
Intuit
AppFog


Some sources: