<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:dc="http://purl.org/dc/elements/1.1/" version="2.0"><channel><description>Zendeskian, Ruby Hacker, History buff, ex-Thoughtworker.</description><title>Arvind Kunday</title><generator>Tumblr (3.0; @kunday)</generator><link>https://www.kunday.com/</link><item><title>3 Cool Leiningen Clojure libraries</title><description>&lt;p&gt;lein clj-fmt     Clojure formatting tool and allows you to define project standards. In short, this could potentially be a rubocop alternative for our clojure projects. Provides a way to automatically check and correct source files to thecorrect format. Tested against headphones project and works fine.To install this, add the following line to your profiles.clj&lt;/p&gt;&lt;pre&gt;[lein-cljfmt "0.5.1"]&lt;/pre&gt;&lt;p&gt;Look for yourself here -&lt;/p&gt;&lt;p&gt;&lt;a href="https://github.com/weavejester/cljfmt" target="_blank"&gt;https://github.com/weavejester/cljfmt&lt;/a&gt;&lt;/p&gt;&lt;p&gt;io.aviso/pretty     Makes exception prettier and colourful (aka: similar to pry). Works will all our clojure projects, i’ve been using thisfor a while without any problems!To install this, add the following to your profiles.clj&lt;/p&gt;&lt;pre&gt; [io.aviso/pretty "0.1.20"]&lt;/pre&gt;&lt;p&gt;Look for yourself here -&lt;/p&gt;&lt;p&gt;&lt;a href="https://github.com/AvisoNovate/pretty" target="_blank"&gt;https://github.com/AvisoNovate/pretty&lt;/a&gt;&lt;/p&gt;&lt;p&gt;lein-ancientFind out-dated libraries in your project (ala - bundler-auto-update) runs a update from maven central and givesyou the latest compatible project.clj that works. You can also provide it your test command so you are sure atleastunit tests pass. To install this, add the following to your profiles.clj&lt;/p&gt;&lt;pre&gt;[lein-ancient "0.6.8"]&lt;/pre&gt;&lt;p&gt;&lt;a href="https://github.com/xsc/lein-ancient" target="_blank"&gt;https://github.com/xsc/lein-ancient&lt;/a&gt;&lt;/p&gt;&lt;p&gt;For the curious, my ~/.lein/profiles.clj looks like this&lt;/p&gt;&lt;pre&gt;{:user {
        :doc {}
        :plugins [[lein-html5-docs "3.0.1"]
                  [lein-gorilla "0.3.5"]
                  [lein-bikeshed "0.2.0"]
                  [lein-kibit "0.1.2"]
                  [lein-cljfmt "0.5.1"]
                  [lein-cloverage "1.0.6"]
                  [org.clojars.scott/lein-nailgun "1.1.0"]
                  [io.aviso/pretty "0.1.20"]
                  [venantius/yagni "0.1.4"]
                  [lein-ancient "0.6.8"]
                  [repetition-hunter "1.0.0"]
                  [venantius/ultra "0.3.4"]
                  [jonase/eastwood "0.2.3"]
                  [lein-codox "0.9.0"]]
        :dependencies [[slamhound "1.3.1"]]}} &lt;/pre&gt;</description><link>https://www.kunday.com/post/142994366086</link><guid>https://www.kunday.com/post/142994366086</guid><pubDate>Mon, 18 Apr 2016 15:58:21 +1000</pubDate><category>clojure</category><category>developer tools</category><dc:creator>arvind</dc:creator></item><item><title>Why Software Estimates Don’t Work</title><description>&lt;p&gt;”Just came across this wonderful article on why software estimates don’t work&lt;br/&gt;&lt;a href="http://www.innoarchitech.com/why-software-development-time-estimation-does-not-work-alternative-approaches/" target="_blank"&gt;http://www.innoarchitech.com/why-software-development-time-estimation-does-not-work-alternative-approaches/&lt;/a&gt; &lt;br/&gt;TLDR:&lt;/p&gt;&lt;p&gt;&lt;b&gt;Why Is Software Time Estimation Impossible&lt;/b&gt;&lt;/p&gt;&lt;p&gt;·       The productivity and experience level of the engineer, particularly if multiple people are involved&lt;br/&gt;·       PTO, Late arrivals, early departures, sickness, etc.&lt;br/&gt;·       Unforeseen defect and customer requests, troubleshooting, challenges, system/environment issues, software/library issues, learning and ramp-up, design/architecture, required research, etc.&lt;br/&gt;·       The fact that software engineers notoriously underestimate&lt;br/&gt;·       Unforeseen issues with maintainability, architectural flaws/imperfections, scalability, performance, testability, etc.&lt;br/&gt;·       Time associated with spikes, R&amp;amp;D, design, architecture, mockup, prototype, POC, etc.&lt;br/&gt;·       Administrative work and non-engineering related requests&lt;/p&gt;&lt;p&gt;&lt;b&gt;Coupled with the usage of Kanban:&lt;/b&gt;&lt;/p&gt;&lt;p&gt;In David Anderson&amp;rsquo;s book Kanban (read it), he discusses the concept of a target lead time coupled with a due-date performance metric as an alternative to estimation and target date commitment of individual development tasks. He also talks about time estimation as being considered a costly activity, while target date commitments are low-trust activities due to unkept promises stemming from inaccurate estimates.&lt;/p&gt;&lt;p&gt;&lt;b&gt;Quoting further more:&lt;/b&gt;&lt;/p&gt;&lt;p&gt;Let me start by saying that I&amp;rsquo;d say that 99.99% of the time, projects are &amp;ldquo;behind&amp;rdquo; due to incorrect estimates and not because of product development issues. This is a result of everything discussed and is the key takeaway of this article.&lt;br/&gt;&lt;/p&gt;</description><link>https://www.kunday.com/post/128100220016</link><guid>https://www.kunday.com/post/128100220016</guid><pubDate>Tue, 01 Sep 2015 20:39:30 +1000</pubDate><category>estimates</category><category>development</category><category>software</category><dc:creator>arvind</dc:creator></item><item><title>Getting NAT working with Hyper-V</title><description>&lt;p&gt;Recently I switched to Windows on my Surface Pro 3 full time, thanks to Windows 10, windows isn&amp;rsquo;t all that bad anymore. Given the extent of docker usage in our company, i needed docker working in my windows install. My experience with VirtualBox in Mac OSX is that it&amp;rsquo;s slow and using folder sharing brings the host machine to a crawl. So I decided to give hyper-v a try.&lt;/p&gt;&lt;p&gt;I set up two adapters like how I would on Virtualbox, one for NAT and one for internal network. Then i found out that NAT wasn&amp;rsquo;t supported so I used a External switch. The caveat was my home network supported multi-mac address dhcp, but the office router denied this.&lt;/p&gt;&lt;p&gt;Hyper-v doesn&amp;rsquo;t have a proper way to NAT Routing with Linux VM&amp;rsquo;s(or atleast not that I could find). I found a real cool way to fix this problem. I realised VMWare player supports NAT routing on Windows and given that the network adapters created by VMWare can be used by Hyper-V, I tried using that adapter in Hyper-V and alas it worked.&lt;/p&gt;&lt;p&gt;So here is how you get going.&lt;/p&gt;&lt;p&gt;1. Install VMWare player and then restart Windows(I don&amp;rsquo;t know if you need to, but hey I usually do)&lt;br/&gt;2. These should create two adapters (VMWare Network vmnet1 &amp;amp; VMWare Network vmnet8)&lt;br/&gt;3. Create a External Network in Hyper-V and you should see the vmnet8 adapter listed there.&lt;br/&gt;4. Ensure VMWare NAT service is running in services.msc&lt;br/&gt;5. Open the adapter properties and set connection sharing on.&lt;br/&gt;6. Now in linux VM, set eth0 to resolve from dhcp and you should get a new IP Address.&lt;/p&gt;&lt;p&gt;Voila, internet should be working all fine and dandy. And I don&amp;rsquo;t need two adapters and one internal adapter just works great!&lt;br/&gt;&lt;/p&gt;</description><link>https://www.kunday.com/post/128100154701</link><guid>https://www.kunday.com/post/128100154701</guid><pubDate>Tue, 01 Sep 2015 20:37:30 +1000</pubDate><category>windows</category><category>windows10</category><category>hyper-v</category><category>vm</category><category>docker</category><dc:creator>arvind</dc:creator></item><item><title>Introducing Cloudformer, gem for AWS Cloudformation</title><description>&lt;p&gt;&lt;a href="https://github.com/kunday/cloudformer" target="_blank"&gt;Cloudformer&lt;/a&gt; attempts to simplify &lt;a href="http://aws.amazon.com/cloudformation/" target="_blank"&gt;AWS Cloudformation&lt;/a&gt; stack creation process in ruby projects by providing reusable rake tasks to perform common operations such as apply(create/update), delete, recreate on stack along with validations on templates. Task executions which enforce a stack change will wait until ROLLBACK/COMPLETE or DELETE is signalled on the stack (useful in continuous deployment environments to wait until deployment is successful). Refer &lt;a href="https://github.com/kunday/cloudformer" title="github page" target="_blank"&gt;github page&lt;/a&gt; for more information.&lt;/p&gt;
&lt;p&gt;The list of rake tasks provided are:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
rake apply           # Apply Stack with Cloudformation script and parameters(And wait till complete - supports updates)
rake delete          # Delete stack from CloudFormation(And wait till stack is complete)
rake events          # Get the recent events from the stack
rake outputs         # Get the outputs of stack
rake recreate        # Recreate stack(runs delete &amp;amp; apply)
rake status          # Get the deployed app status

&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;&lt;a href="https://github.com/kunday/cloudformer#installation" target="_blank"&gt;&lt;/a&gt;Installation&lt;/h2&gt;
&lt;p&gt;Add this line to your application&amp;rsquo;s Gemfile:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;gem 'cloudformer'
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;And then execute:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;$ bundle
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Or install it yourself as:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;$ gem install cloudformer
&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;&lt;a href="https://github.com/kunday/cloudformer#aws-environment-configuration" target="_blank"&gt;&lt;/a&gt;AWS Environment configuration&lt;/h2&gt;
&lt;p&gt;Cloudformer depends on the aws-sdk gem to query AWS API. You will need to export AWS configuration to environment variables to your .bashrc/.bash_profile or your build server:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;export AWS_ACCESS_KEY=your access key
export AWS_REGION=ap-southeast-2
export AWS_SECRET_ACCESS_KEY=your secret access key
&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;&lt;a href="https://github.com/kunday/cloudformer#configuration" target="_blank"&gt;&lt;/a&gt;Configuration&lt;/h2&gt;
&lt;p&gt;You can add cloudformer tasks to your project by adding the following to your rake file:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;require 'cloudformer'
Cloudformer::Tasks.new("earmark") do |t|
  t.template = "cloudformation/cloudformation.json"
  t.parameters = parameters
end
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;where &lt;code&gt;cloudformation/cloudformation.json&lt;/code&gt; is the stack json file and parameters is a hash of parameters used in the template. For a template which takes the following parameters:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;"Parameters": {
  "PackageUrl": {
    "Type": "String"
  },
  "PackageVersion": {
    "Type": "String"
  }
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;the parameter hash(Ruby Object) would look like:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;{
  "PackageUrl" =&amp;gt; "http://localhost/app.rpm",
  "PackageVersion" =&amp;gt; "123"  
}  
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;If you have a template with no parameters, pass an empty hash &lt;code&gt;{}&lt;/code&gt; instead.&lt;/p&gt;
&lt;p&gt;You can find the open source code in &lt;a href="http://www.kunday.com/post/65029274005/introducing-cloudformer-gem-for-aws-cloudformation" target="_blank"&gt;github&lt;/a&gt;, any feedback/ pull requests would be awesome :)&lt;/p&gt;</description><link>https://www.kunday.com/post/65029274005</link><guid>https://www.kunday.com/post/65029274005</guid><pubDate>Fri, 25 Oct 2013 18:34:00 +1100</pubDate><category>aws</category><category>Amazon</category><category>ruby</category><category>rails</category><category>sinatra</category><category>deploy</category><category>automation</category><dc:creator>arvind</dc:creator></item><item><title>Continuous deployment with cloud formation and cfn-hup</title><description>&lt;p&gt;Cloud formation lets you create application stacks from scratch in EC2. In my project I use cloud formation to do continuous deploys using cfn-hup with every git push. If you haven’t used cloud formation before, there are plenty of tutorials on the web to get you started.&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Structure:&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;The application is bundled into a RPM using FPM with all the application dependencies and post install scripts to be executed when the RPM is installed.&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Packaging and CFN-Script:&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;As a part of the CI build, RPM of the app is created and uploaded to S3 tagged as ‘latest’ and the cfn-script downloads the RPM and installs it. An example looks like:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;curl ‘package_url’ &amp;gt; /tmp/earmark-app.rpm
yum erase -y earmark-app
yum install /tmp/earmark-app.rpm
&amp;lt;/code&amp;gt;
CFN-HUP Configuration:
&amp;lt;code&amp;gt;
[main]
stack=stack-name
region=ap-southeast-2
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;b&gt;Waiting on Resource Condition:&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;You can use ApplicationWaitHandle &amp;amp; ApplicationWaitCondition to signal cloud formation deploy to wait until the installation of the package to complete. You can then use cfn-signal to indicate cloud formation stack that the particular action is complete. If cfn-signal isn’t received within a specified time period, the stack creation will fail. Here is an example WaitCondition:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;“ApplicationWaitCondition” : {
    “Type” : “AWS::CloudFormation::WaitCondition”,
    “Properties” : {
    “Count” : “1”,
    “Handle” : {“Ref” : “ApplicationWaitHandle”},
    “Timeout” : “300”
    }
},
“ApplicationWaitHandle” : {
    “Type” : “AWS::CloudFormation::WaitConditionHandle”
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;You can then wait on this condition in your stack by using:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;“LoadBalancer”: {
    “DependsOn”: “ApplicationWaitCondition”,
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;b&gt;Signalling Cloud Formation:&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;You can then signal cloud formation that the install was successful using:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;"/opt/aws/bin/cfn-signal -e 0 -r "Application Installation Complete." ‘", { "Ref" : "ApplicationWaitHandle" }, "’\n"
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;b&gt;Limitations:&lt;/b&gt;&lt;/p&gt;
&lt;ul&gt;&lt;li&gt;Cfn-hup checks for updates on the stack every 15 minutes by default and there is no way to alter the duration.&lt;/li&gt;
&lt;li&gt;Cfn-hup cannot be used to signal stack wait during stack updates.&lt;/li&gt;
&lt;li&gt;Cfn-hup failures aren’t propagated back to the stack events which could result in a false positivies even when update fails.&lt;/li&gt;
&lt;/ul&gt;</description><link>https://www.kunday.com/post/64857608699</link><guid>https://www.kunday.com/post/64857608699</guid><pubDate>Wed, 23 Oct 2013 22:20:00 +1100</pubDate><category>aws</category><category>cloud formation</category><category>amazon</category><category>deploy</category><dc:creator>arvind</dc:creator></item><item><title>Futurespective: Influencing your team's future</title><description>&lt;p&gt;&amp;ndash;&lt;/p&gt;
&lt;p&gt;&amp;ldquo;Our life is what our thoughts make it.&amp;rdquo; (Marcus Aurelius)&lt;/p&gt;
&lt;p&gt;&amp;ndash;&lt;/p&gt;
&lt;p&gt;Any team practising(or claiming to do agile) is well aware of the positive outcomes that retrospectives bring into the project. Retrospectives helps us to refocus our priorities based on our past experiences, identifying potential areas of improvement to help us be more productive and increase delivered value. Retrospectives are derived from the parallel in the medical universe - &amp;ldquo;retrospective cohort study&amp;rdquo; where individual circumstances are assessed based on a particular outcome(in software engineering world: successful delivery of a project). Like any other representative study, it suffers from cognitive biases(selection and information bias). In software engineering, such biases results in the discussion being skewed towards perceived problems in the past few weeks(assuming retros happen that often). Typically, an action from a retrospective would be geared towards fixing a problem based on its occurrence in the past(you were trying to get more productive after all), which need not necessarily help the team achieve its goal over the next 6 months(or 2 years, depending on how far you look).&lt;/p&gt;

&lt;p&gt;To quote Uncle Bob here, &amp;ldquo;Agile is not just processes and practices but a belief in achievement&amp;rdquo;. If agile is all about believing in achievement, we should be able to set goals as a team that we would like to achieve in the future and agree that  reality is not necessarily all about harshness and things going wrong all the time. So, once in a while(either during the kick-off of a project or even in the middle of a project), it&amp;rsquo;s a good exercise to step forward and see where we would like to see ourselves as a team in the next 6 months(or 2 years) and what we would like to achieve in that time-frame. It helps the team to refocus team values and come to a agreement on a common goal and vision, helping us all to be more collaborative in how we can reach the ultimate end goal.&lt;/p&gt;

&lt;p&gt;Enter futurespectives. A really retro, retrospective. &lt;/p&gt;

&lt;p&gt;&amp;ldquo;Imagine yourselves in a kick-ass time machine and you decide to land in the future(6 months) and have a peek how the team is performing. You are intrigued to find out that the team has achieved all it&amp;rsquo;s set goals and objectives of the project and team member satisfaction is at it&amp;rsquo;s all time high. How did it happen? What were the things that the team did to reach nirvana?&amp;rdquo;&lt;/p&gt;

&lt;p&gt;Given that there is no actual time machine(jeez spoilers) available, the only option you have is to walk backwards to find out how this parallel universe came into existence. Here are some of key things to think about: &lt;/p&gt;
&lt;ol&gt;&lt;li&gt;What’s the *common goal* everyone was trying to move forward to?&lt;/li&gt;
&lt;li&gt;What did we do *more*?&lt;/li&gt;
&lt;li&gt;What did we do *less*?&lt;/li&gt;
&lt;li&gt;What things were *we not sure* that we monitored.&lt;/li&gt;
&lt;/ol&gt;&lt;p&gt;Such a discussion into the perceived future makes few key assumptions:&lt;/p&gt;
&lt;ol&gt;&lt;li&gt;We all agreed and understood that the team had common goals to achieve.&lt;/li&gt;
&lt;li&gt;We were fully aware of the end goals of the project &amp;amp; team and were in the same page.&lt;/li&gt;
&lt;/ol&gt;&lt;p&gt;Though we cannot be really sure such a universe could exist, we all can agree which actions(success factors) will land us on the happy universe and what(failure factors) will land us on the not so happy parallel universe. Using the outcomes of this brainstorm, we could focus our energies to get our act together towards the happy universe. &lt;/p&gt;</description><link>https://www.kunday.com/post/58148202477</link><guid>https://www.kunday.com/post/58148202477</guid><pubDate>Tue, 13 Aug 2013 23:23:00 +1000</pubDate><category>futurespective</category><category>agile</category><category>retrospective</category><category>future</category><category>programming</category><category>agile_coaching</category><dc:creator>arvind</dc:creator></item><item><title>Barebones XMonad config for Ubuntu</title><description>&lt;p&gt;After countless hours of dabbling with Xmonad, a few really weird bugs, I got Xmonad to work nicely in Ubuntu 12.04 LTS. If you haven&amp;rsquo;t used/heard of Xmonad before you should check out Xmonad. It&amp;rsquo;s a simple and beautiful tiling manager written in Haskell and is configured in Haskell. I hope this post helps someone who gave it a go but backed of due to some of the weird issues relating to window focus in Java apps.&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Why&lt;/b&gt;&lt;/p&gt;
&lt;ul&gt;&lt;li&gt;Kickass multi-monitor support (xinerama) with per screen workspaces.&lt;/li&gt;
&lt;li&gt;Simple, minimalistic and fast.&lt;/li&gt;
&lt;li&gt;Kickass WM layouts that you can configure using Haskell.&lt;/li&gt;
&lt;li&gt;Amazing keyboard shortcuts to re-align windows and navigate seamlessly.&lt;/li&gt;
&lt;/ul&gt;&lt;p&gt;&lt;b&gt;Known Issues&lt;/b&gt;&lt;/p&gt;
&lt;ul&gt;&lt;li&gt;Xmonad has some window focussing issues when it comes to Java apps (hack is available which does not work on JDK7)&lt;/li&gt;
&lt;li&gt;Doesn&amp;rsquo;t work well with Unity 3d, so you might have to switch to Unity 2d. Alternatively if you are using classic gnome-shell, it should work well.&lt;/li&gt;
&lt;/ul&gt;&lt;p&gt;&lt;b&gt;How to get it&lt;/b&gt;&lt;/p&gt;
&lt;ul&gt;&lt;li&gt;
&lt;p&gt;If you are ubuntu you can use the traditional package manager aka apt-get to install.&lt;/p&gt;
&lt;pre&gt;sudo apt-get install xmonad&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;You should also get some application launcher(Unity dash works, but there are some performance issues). I use dmenu, it&amp;rsquo;s simplistic and works &lt;/p&gt;&lt;img src="https://extranet.atlassian.com/s/en_GB-418945332/4020/1b87f1aa5a7aa4d7d29fd539f2999e40b0880239.72/_/images/icons/emoticons/smile.png" alt="(smile)"/&gt;&lt;pre&gt;sudo apt-get install dmenu&lt;/pre&gt;
&lt;/li&gt;
&lt;/ul&gt;&lt;p&gt;&lt;b&gt;Gnome Session Config&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;Default install of Xmonad in Ubuntu 12.04 LTS adds the necessary session for Xmonad to work with Gnome with the exception of Default-window manager and DefaultProvider-panel. You can add them by editing the /usr/share/gnome-session/sessions/xmonad.session. You add them to session config which should look something like this.&lt;/p&gt;
&lt;pre&gt;[GNOME Session]
Name=Xmonad Unity-2D Desktop
RequiredComponents=gnome-settings-daemon;
RequiredProviders=windowmanager;panel;
DefaultProvider-windowmanager=xmonad; #this would have been missing
DefaultProvider-panel=unity-2d-panel; #this would have been missing&lt;/pre&gt;
&lt;p&gt;&lt;b&gt;Issue with Intellij IDEA:&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;There is a known issue with XMonad not being able to interact with the GUI components when running under JAVA 7, so simplest would be to run under JAVA 6 and use ICCCMFocus#setWMName &amp;ldquo;LG3D&amp;rdquo; to ensure Idea to gain focus and play nicely with Xmonad(It&amp;rsquo;s included as part of the minimalistic xmonad config.)&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Minimalistic Xmonad config&lt;/b&gt;&lt;/p&gt;
&lt;pre&gt;import XMonad
import XMonad.Util.Run
import XMonad.Util.EZConfig (additionalKeys)
import XMonad.Hooks.ManageDocks
import XMonad.Hooks.ICCCMFocus
import XMonad.Config.Gnome
import XMonad.Hooks.SetWMName
import XMonad.Actions.DynamicWorkspaces
myManageHook = composeAll (
  [ className =? "Unity-2d-panel" --&amp;gt; doIgnore
  , className =? "Unity-2d-launcher" --&amp;gt; doFloat
  , className =? "gnome-do" --&amp;gt; doFloat
  ])
main =
  xmonad $ gnomeConfig { modMask = mod4Mask
               , startupHook = setWMName "LG3D"
                       , manageHook = manageDocks &amp;lt;+&amp;gt; myManageHook &amp;lt;+&amp;gt; manageHook gnomeConfig
                       , layoutHook = avoidStruts $ layoutHook defaultConfig
                       , logHook = takeTopFocus
                       } `additionalKeys` [ ((mod4Mask, xK_d), spawn "dmenu_run -b")
                                          ]&lt;/pre&gt;
&lt;p&gt;&lt;b&gt;XMonad Keymap cheat sheet&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;A vim style cheat sheet for Xmonad is available &lt;a href="http://www.haskell.org/haskellwiki/Image:Xmbindings.png" target="_blank"&gt;here&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Using OSX ? &lt;a href="http://brianmckenna.org/blog/osx_tiling_window_manager" target="_blank"&gt;Brian McKenna (ex - Atlassian) seems to have patched Xmonad to work nicely under OSX.&lt;/a&gt;&lt;/p&gt;</description><link>https://www.kunday.com/post/35700432761</link><guid>https://www.kunday.com/post/35700432761</guid><pubDate>Wed, 14 Nov 2012 22:53:00 +1100</pubDate><category>xmonad</category><category>ubuntu</category><category>linux</category><category>keyboard-fu</category><category>intellij-idea</category><dc:creator>arvind</dc:creator></item><item><title>Review/Opinion- 2016:Obama's America</title><description>&lt;p&gt;It&amp;rsquo;s confirmed, we have proof, America will transform itself into a communist country by 2016 and Obama will serve as its most fond dictator - or so is the message of the documentary &amp;ldquo;&lt;a href="http://en.wikipedia.org/wiki/2016:_Obama's_America" target="_blank"&gt;Obama&amp;rsquo;s America 2016&lt;/a&gt;&amp;rdquo;. D Souza and his team attempts to walk through Obama&amp;rsquo;s past and show us how it influences his actions and policies.  First forty minutes of the documentary explores young Obama&amp;rsquo;s life, influence of his absentee father and how it shaped his thoughts (base on his  own book - &lt;a href="http://en.wikipedia.org/wiki/Dreams_from_My_Father" target="_blank"&gt;Dreams from my Father&lt;/a&gt;). &lt;/p&gt;
&lt;p&gt;He follows his life back to Kenya, Indonesia, about his father&amp;rsquo;s accidental death and about his mentor who supposedly was a pro-communist. He also points out that Obama Sr. wrote a pro-anticolonial paper and suggested increased taxes upto 100%. So? D Souza who pointed out the similarities with &lt;a href="http://en.wikipedia.org/wiki/Socialism_in_India" target="_blank"&gt;his childhood in India&lt;/a&gt;, however D Souza was able to &lt;a href="http://reason.com/archives/2006/06/06/the-rise-and-fall-of-indian-so" target="_blank"&gt;change his opinion on pro-socialistic thought processes that he grew up with&lt;/a&gt;, but Obama was influenced by it, even though he hardly lived with his father. He also claims that Obama was pro-seperatist when he grew up in Hawaii, with practically no-evidence whatsoever. All this, is quite a logic stretch.&lt;/p&gt;
&lt;p&gt;Apart from these unsubstantiated personal attacks, there are so many factual inaccuracies and careful omissions to construct the innuendo. D Souza suggests that Obama sides with radical Jihadists, that he did not help a friendly regime(&lt;a href="http://en.wikipedia.org/wiki/Hosni_Mubarak" target="_blank"&gt;Hosni Mubarak, the dictator&lt;/a&gt;) wants to reduce military spending(&lt;a href="http://en.wikipedia.org/wiki/List_of_countries_by_military_expenditures" target="_blank"&gt;which is already 5 times as much as the next country China&lt;/a&gt;), reduce presence of military in Iraq and Afghanistan and hand over the power to rest of the world. Hold on, that pretty much sounds ridiculous. What do conservatives want? Wage war all the time and leave the world in a state of perpetual chaos?&lt;/p&gt;
&lt;p&gt;Apart from policies in middle east, in the debate of national debt, he claims that Obama increased the national debt significantly, with the inner lining like, &amp;ldquo;Hey, America, Obama is trying to take all your money and give it to the poor&amp;rdquo;. Everybody who does their own fact checking and does not get all the news from fox know that when Obama came into power, bush left out a 1.2 Trillion dollar / year debt and a financial crisis on top of it. All based on the conservative policies that D Souza camp argue for. &lt;/p&gt;
&lt;p&gt;I don&amp;rsquo;t understand the difficulty that the conservatives have in understanding Obama&amp;rsquo;s motives as he is well-meaning to the whole world except conservatives. All i can tell is America has never been or wanted to be &lt;a href="http://www.dailykos.net/archives/003167.html" target="_blank"&gt;imperialistic&lt;/a&gt;, &lt;a href="http://en.wikipedia.org/wiki/Independence_Day_(United_States)" target="_blank"&gt;pro-colonial&lt;/a&gt;(American Indepence from British, Hey?) and always has been a entitlement nation(Obama-care won&amp;rsquo;t make it any different. Trivia - this was first put forward by a conservative republican candidate). &lt;/p&gt;
&lt;p&gt;P.S At-least Obama was not caught in a private dinner video talking how he will not be the president of those 53% Americans who want all these tax cuts. &lt;a href="http://www.youtube.com/watch?v=PyJ_k2z-nTA" target="_blank"&gt;Romney did&lt;/a&gt; call 47% of America as lazy and he won&amp;rsquo;t care about them. Now it could just be gaffe, but I couldn&amp;rsquo;t resist bringing it up.&lt;/p&gt;
&lt;p&gt;Links:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://en.wikipedia.org/wiki/2016:_Obama's_America" target="_blank"&gt;http://en.wikipedia.org/wiki/2016:_Obama&amp;rsquo;s_America&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://en.wikipedia.org/wiki/Dreams_from_My_Father" target="_blank"&gt;http://en.wikipedia.org/wiki/Dreams_from_My_Father&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.dailykos.net/archives/003167.html" target="_blank"&gt;http://www.dailykos.net/archives/003167.html&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://en.wikipedia.org/wiki/Socialism_in_India" target="_blank"&gt;http://en.wikipedia.org/wiki/Socialism_in_India&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://reason.com/archives/2006/06/06/the-rise-and-fall-of-indian-so" target="_blank"&gt;http://reason.com/archives/2006/06/06/the-rise-and-fall-of-indian-so&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://en.wikipedia.org/wiki/India_Unbound" target="_blank"&gt;http://en.wikipedia.org/wiki/India_Unbound&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://en.wikipedia.org/wiki/Independence_Day_(United_States)" target="_blank"&gt;http://en.wikipedia.org/wiki/Independence_Day_(United_States)&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.youtube.com/watch?v=PyJ_k2z-nTA" target="_blank"&gt;http://www.youtube.com/watch?v=PyJ_k2z-nTA&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://en.wikipedia.org/wiki/Hosni_Mubarak" target="_blank"&gt;http://en.wikipedia.org/wiki/Hosni_Mubarak&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://en.wikipedia.org/wiki/List_of_countries_by_military_expenditures" target="_blank"&gt;http://en.wikipedia.org/wiki/List_of_countries_by_military_expenditures&lt;/a&gt;&lt;/p&gt;</description><link>https://www.kunday.com/post/33153482795</link><guid>https://www.kunday.com/post/33153482795</guid><pubDate>Mon, 08 Oct 2012 22:02:00 +1100</pubDate><category>obama</category><category>documentary</category><category>2016</category><category>2016 Obama's America</category><category>D Souza</category><category>Mitt Romney</category><category>communist</category><dc:creator>arvind</dc:creator></item><item><title>Git Config Hacks</title><description>&lt;blockquote&gt;
&lt;p&gt;TL; DR - Skip to the end of the page for a quick look at my git config file&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Basic hacks&lt;/h2&gt;
&lt;p&gt;&lt;b&gt;&lt;b&gt;Colors in Git:&lt;/b&gt;&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;Stating the obvious, git supports colors on any ANSI terminal. You can turn on git colors using&lt;/p&gt;
&lt;pre&gt;[color]
  branch = auto
  diff = auto
  status = auto
[color "branch"]
  current = yellow reverse
  local = yellow 
  remote = green
[color "diff"]
  meta = yellow bold
  frag = magenta bold
  old = red bold
  new = green bold
[color "status"]
  added = yellow
  changed = green
  untracked = cyan&lt;/pre&gt;
&lt;p&gt;This gives nice tangy colors to your git command outputs.&lt;/p&gt;
&lt;p&gt;&lt;b&gt;&lt;b&gt;Change your pretty log format:&lt;/b&gt;&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;Spice up your git log by showing relative times like (4 hours ago than 2010-20-20 10:34 PM). Also the pretty format config below will squash it into a single nicely readable line&lt;/p&gt;
&lt;pre&gt;[format]
  pretty = format:%Cred%h%Creset - %Cgreen%an -%C(yellow)%d%Creset %s %Cgreen(%cr)%Creset
  date = relative&lt;/pre&gt;
&lt;h2&gt;Handy hacks&lt;/h2&gt;
&lt;p&gt;&lt;b&gt;Changes made yesterday:&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;Git has got a handy command to see the changes that were committed yesterday. You can see it by typing&lt;/p&gt;
&lt;pre&gt;git diff "@{yesterday}"&lt;/pre&gt;
&lt;p&gt;&lt;b&gt;Files changed in a each commit:&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;Sometimes it&amp;rsquo;s handy to look at the files changed in each commit. &lt;/p&gt;
&lt;pre&gt;git whatchanged&lt;/pre&gt;
&lt;h2&gt;Fairly Advanced hacks&lt;/h2&gt;
&lt;p&gt;For abbreviated commit log with branch and tag information add the following alias to your ~/.gitconfig&lt;/p&gt;
&lt;pre&gt;  log1 = log --pretty=oneline --abbrev-commit --decorate&lt;/pre&gt;
&lt;p&gt;To see the log with graph information and branches/tags where the commit is present, Add the folllowing alias to your ~/.gitconfig&lt;/p&gt;
&lt;pre&gt;lgn = "!f() { git log --graph --pretty=format:'%Cred%H%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)&amp;lt;%an&amp;gt;%Creset' --date=relative $@ | git name-rev --stdin --name-only ; } ; f"&lt;/pre&gt;
&lt;h2&gt;My DotFile&lt;/h2&gt;
&lt;p&gt;For those who are interested, here is my .gitconfig file&lt;/p&gt;
&lt;pre&gt;[color]
  branch = auto
  diff = auto
  status = auto
[color "branch"]
  current = yellow reverse
  local = yellow 
  remote = green
[color "diff"]
  meta = yellow bold
  frag = magenta bold
  old = red bold
  new = green bold
[color "status"]
  added = yellow
  changed = green
  untracked = cyan
[alias]
  y = diff "@{yesterday}"
  w = whatchanged
  c = commit
  st = status
  dc = diff --cached
  co = checkout
  lg = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr)%Creset' --abbrev-commit --date=relative
  lgn = "!f() { git log --graph --pretty=format:'%Cred%H%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)&amp;lt;%an&amp;gt;%Creset' --date=relative $@ | git name-rev --stdin --name-only ; } ; f"
  log1 = log --pretty=oneline --abbrev-commit --decorate

[format]
  pretty = format:%Cred%h%Creset - %Cgreen%an -%C(yellow)%d%Creset %s %Cgreen(%cr)%Creset
  date = relative&lt;/pre&gt;</description><link>https://www.kunday.com/post/29594688306</link><guid>https://www.kunday.com/post/29594688306</guid><pubDate>Fri, 17 Aug 2012 12:34:00 +1000</pubDate><category>git</category><category>tips</category><category>kunday</category><dc:creator>arvind</dc:creator></item><item><title>Long way to go!</title><description>&lt;p&gt;Take the case of Shanti, a silver medal winner who protected her gender &lt;a href="http://www.omanforum.com/forums/showthread.php?17037-Indian-silver-medalist-fails-gender-test-in-Doha-Qatar" target="_blank"&gt;identity&lt;/a&gt;. She was stripped of her medals and laurels when she failed gender test in Doha. Unable to work elsewhere as a coach nor find herself a federal job, the medal winner &lt;a href="http://timesofindia.indiatimes.com/sports/off-the-field/Asiad-medallist-labours-at-brick-kiln/articleshow/15112611.cms" target="_blank"&gt;now does hard labour making as much as 4$ a day&lt;/a&gt;. Worse part is the constant humiliation that she has been subject too just because of what she is, rather than her achievements.&lt;/p&gt;
&lt;p&gt;The situation is not much different for other under privileged groups. The country does not count physically challenged in national census nor keeps track of their unemployment figures. While Western countries are fighting for equal marriage rights, countries like India even fail to recognize them. Only in 2009 was homosexual consensual sex was legalised by overturning the &lt;a href="http://en.wikipedia.org/wiki/Section_377_of_the_Indian_Penal_Code" target="_blank"&gt;150 year old law&lt;/a&gt;. Judge in his closing statement insisted that - &amp;ldquo;It cannot be forgotten that discrimination is antithesis of equality and that it is the recognition of equality which will foster the dignity of every individual.&amp;rdquo;&lt;/p&gt;
&lt;p&gt;A country that boasts of a civilisation nurtured by harmony for at-least a few thousand years and whose citizens who are smug about the amazing achievements that india was capable of in the past, this is a shame. Is it difficult to embrace such people with love and recognise them for what they have achieved?&lt;/p&gt;
&lt;p&gt;&lt;a href="http://timesofindia.indiatimes.com/sports/off-the-field/Asiad-medallist-labours-at-brick-kiln/articleshow/15112611.cms" target="_blank"&gt;Inspired by the TOI article&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Update:&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;Looks like &lt;a href="http://timesofindia.indiatimes.com/sports/more-sports/athletics/Sports-minister-Ajay-Maken-vows-to-fight-for-athlete-Santhi/articleshow/15132722.cms" target="_blank"&gt;somebody&lt;/a&gt; is listening. Also GAIL has announced 1 Lakh INR as a relief fund.&lt;/p&gt;</description><link>https://www.kunday.com/post/27893623226</link><guid>https://www.kunday.com/post/27893623226</guid><pubDate>Tue, 24 Jul 2012 16:05:00 +1000</pubDate><category>doha</category><category>transexual</category><category>identity_crisis</category><category>india</category><category>third_world_problems</category><dc:creator>arvind</dc:creator></item><item><title>Will google drive succeed?</title><description>&lt;p&gt;There has been lot of fuzz around the interwebs about the launch of &lt;a href="https://drive.google.com" target="_blank"&gt;google drive&lt;/a&gt;. Google is a late entrant into the online personal file syncing business while competitors like box.net and dropbox are well established and asserting dominance. Is it just another me-too product from google is it something that google values and cherishes?&lt;/p&gt;
&lt;p&gt;&lt;b&gt;&lt;b&gt;&lt;br/&gt;&lt;/b&gt;&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;Google has asserted in the past that the &lt;a href="http://www.dustincurtis.com/files.html" target="_blank"&gt;concept of files is dead&lt;/a&gt; and how it shuttered the near complete GDrive project which provided a tight integration between the local file system and online filesystem. What led google to change it’s minds about the file syncing market? As &lt;a href="https://plus.google.com/116651741222993143554/posts" target="_blank"&gt;Sundar Pitchai&lt;/a&gt; points &lt;a href="http://allthingsd.com/20120424/sundar-pichai-google-drive-is-about-context-where-competitors-are-about-files/?mod=googlenews" target="_blank"&gt;out&lt;/a&gt;, google drive is a natural evolution of google docs and collaboration being one of its key strengths.  &lt;/p&gt;
&lt;p&gt;&lt;b&gt;&lt;b&gt;&lt;br/&gt;&lt;/b&gt;&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;By taking the concept of filesystem/drive to the App ecosystem, google is taking a bold step into a filesystem less future. Though it is counter intuitive, it enables a whole different class of applications that can be built apart from managing files. It lets you edit documents, presentations, diagrams and much more.  All of it online and the user doesn’t have to care about where the files are stored as long as they can access them.&lt;/p&gt;
&lt;p&gt;&lt;b&gt;&lt;b&gt;&lt;br/&gt;&lt;/b&gt;&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;There are tons of apps in &lt;a href="https://chrome.google.com/webstore/category/collection/drive_apps" target="_blank"&gt;google chrome webstore&lt;/a&gt; which lets you open &lt;a href="http://app.8reader.com" target="_blank"&gt;epubs&lt;/a&gt;, &lt;a href="https://chrome.google.com/webstore/detail/bdehgigffdnkjpaindemkaniebfaepjm" target="_blank"&gt;build mind mapping graphs&lt;/a&gt;, video editing(these are available only on the chrome webstore) and lot more. Sooner or later, there will be apps which cover most of the stuff we do, all online and google drive could be the center of all the data that’s being fed. It’s same as the promise of iCloud, except that iCloud is geared towards native apps than web apps.&lt;/p&gt;
&lt;p&gt;&lt;b&gt;&lt;b&gt;&lt;br/&gt;&lt;/b&gt;&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;Google drive is also important to google chrome os which forces the users to shuttle files between online apps back and forth due to a lack of a shared underlying file system. Now, google drive can act like the datasource(if the apps are integrated with google drive), people can create a document in one app and continue editing in another app seamlessly. Google executives have already confirmed that google drive will be merged into &lt;a href="http://www.wired.com/wiredenterprise/2012/04/google-gdrive-chrome-os/" target="_blank"&gt;chrome os&lt;/a&gt; in later builds.&lt;/p&gt;
&lt;p&gt;&lt;b&gt;&lt;b&gt;&lt;br/&gt;&lt;/b&gt;&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;Let’s wait and watch how this plays out for google.&lt;/p&gt;
&lt;p&gt;Update: Google drive &lt;a href="http://techcrunch.com/2012/04/27/google-drive-arrives-in-chromeos-developer-channel/" target="_blank"&gt;arrives&lt;/a&gt; for chrome os in developer channel.&lt;/p&gt;</description><link>https://www.kunday.com/post/21890869827</link><guid>https://www.kunday.com/post/21890869827</guid><pubDate>Fri, 27 Apr 2012 12:23:00 +1000</pubDate><category>google</category><category>drive</category><category>gdrive</category><category>googledrive</category><category>tech</category><category>ramblings</category><dc:creator>arvind</dc:creator></item><item><title>ruby debugger config</title><description>&lt;p&gt;Whenever you notice a strange behaviour in the code or unable to assert the strange behaviour via a test, it&amp;rsquo;s helpful to launch the debugger and start inspecting the variables / try evaluating the piece of code. The REPL has so far been the best features offered by any good dynamic or functional language like ruby, haskell, clojure, python etc.&lt;/p&gt;
&lt;p&gt;You could install ruby debugger for ruby 1.9 using the traditional gem command or adding it to the Gemfile depending on your environment.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;gem install ruby-debug19&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;The debugger can then be invoked anywhere in the code by requiring the debugger.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;require &amp;lsquo;ruby-debug/debugger&amp;rsquo;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;The debug console is pretty advanced in terms of functionality and can be used in the same way as gdb. However, more often you use the debugger, typing eval every time gets tedious. You can avoid this by typing in &lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;set autoeval&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;By doing so, every single line of code you type in the console will be immediately evaluated in the context of the currently executing code.&lt;/p&gt;
&lt;p&gt;Also, when the debugger launches, it gives the next line of code it&amp;rsquo;s about to evaluate. In most cases, this should be fine but it helps to see few lines around the code. You can enable this by&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;set autolist&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Once this is set, it will show the line surrounding the current code execution.&lt;/p&gt;
&lt;p&gt;Or you can set this is the environment default by setting it up in .rdebugrc. This is how my  .rdebugrc looks like this.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;set autolist&lt;/p&gt;
&lt;p&gt;set autoeval&lt;/p&gt;
&lt;p&gt;set autoreload&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;For a full list of debug commands, look up the &lt;a href="http://cheat.errtheblog.com/s/rdebug/" title="cheatsheet" target="_blank"&gt;cheat sheet&lt;/a&gt;. Also check pivotal labs &lt;a href="http://pivotallabs.com/users/chad/blog/articles/366-ruby-debug-in-30-seconds-we-don-t-need-no-stinkin-gui-" target="_blank"&gt;article&lt;/a&gt; on quickly setting up debugger for rails.&lt;/p&gt;</description><link>https://www.kunday.com/post/21633345048</link><guid>https://www.kunday.com/post/21633345048</guid><pubDate>Mon, 23 Apr 2012 15:21:25 +1000</pubDate><category>config</category><category>debugger</category><category>hacks</category><category>rdebugrc</category><category>ruby</category><dc:creator>arvind</dc:creator></item><item><title>csshx - handy tool to ssh multiple boxes</title><description>&lt;p&gt;One of the major pains in managing many servers is at times you would want to do some command like changing to a particular directory and tail a log file. It&amp;rsquo;s painful and time consuming having to ssh to each of these boxes manually and execute the commands over and over again. While there are tools like &lt;a href="http://puppetlabs.com/" target="_blank"&gt;puppet&lt;/a&gt; and &lt;a href="http://www.opscode.com/chef/" target="_blank"&gt;chef&lt;/a&gt; to automate software installations, it could be a over kill for such a simple situation.&lt;/p&gt;
&lt;p&gt;I recently came across &lt;a href="http://code.google.com/p/csshx/" target="_blank"&gt;csshx&lt;/a&gt; (works only on mac) which perfectly solves this problem. csshx will attempt to create multiple ssh connections to list of servers you specify and give you a seperate terminal where you can key in commands which will be executed in all the other open windows(AppleScript magic).&lt;/p&gt;
&lt;p&gt;Say for example you would like to connect to two servers 192.168.1.1 and 192.168.1.2 and tail a log file, you could do this using csshx with the following command,&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;csshx &amp;ndash;login username 192.168.1.1 192.168.1.2&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;and voila, you have two windows with a login to each of these boxes and a red window to enter your commands. This will be copied across to all the other terminals. csshx also has an awesome set of keyboard shortcuts that you could master to get things by quickly.&lt;/p&gt;
&lt;p&gt;You can install csshx using brew by typing the command:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;brew install csshx&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;For people using other package managers refer their info site, or you can download the csshx script directly from &lt;a href="http://code.google.com/p/csshx/" target="_blank"&gt;google code&lt;/a&gt;.&lt;/p&gt;</description><link>https://www.kunday.com/post/18941402097</link><guid>https://www.kunday.com/post/18941402097</guid><pubDate>Thu, 08 Mar 2012 19:11:00 +1100</pubDate><category>ssh</category><category>tricks</category><category>puppet</category><category>chef</category><dc:creator>arvind</dc:creator></item><item><title>Tweaks to default Hg config</title><description>&lt;p&gt;The default mercurial installation does not support colours, pager or a progress bar by default. Unlike git, hg is highly customisable with python and a ton of extensions are available. Some of these extensions are &lt;a href="http://mercurial.selenic.com/wiki/UsingExtensions" target="_blank"&gt;bundled with mercurial&lt;/a&gt; and other &lt;a href="https://bitbucket.org/sjl/mercurial-cli-templates" target="_blank"&gt;nice ones&lt;/a&gt; can be found across the web. &lt;/p&gt;
&lt;p&gt;&lt;b&gt;Color Output:&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;Mercurial by default outputs all the diffs and logs using the default colour of the terminal. Mercurial standard library has support for colours by adding this line to .hgrc.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;[extensions]&lt;/p&gt;
&lt;p&gt;color=&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;b&gt;Progress Bar:&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;Mercurial is generally fast but in certain cases(like a slow network) or a big repository, some of the commands take a considerable amount of time and mercurial command line does not produce any output until the action is complete. You can get a kickass progress bar by adding the following line in .hgrc.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;[extensions]&lt;/p&gt;
&lt;p&gt;progress=&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;b&gt;Pager:&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;Most of the mercurial output is redirected to STDOUT without using less / more support. While this makes sense for default install, its painful when reading big diff logs or trying to traverse the hg graph log. You can add support to use less by adding this to your .hgrc.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;[extensions]&lt;/p&gt;
&lt;p&gt;pager=&lt;/p&gt;
&lt;p&gt;[pager]&lt;/p&gt;
&lt;p&gt;pager = LESS=&amp;lsquo;FSRX&amp;rsquo; less&lt;/p&gt;
&lt;p&gt;ignore = version, help, update, serve, record&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;b&gt;Git diff:&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;For people who are used to reading git diff formatted files, you can enable use git diff format by specifying the following to your .hgrc&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;[diff]&lt;/p&gt;
&lt;p&gt;git = True&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;My .hgrc can be found in this &lt;a href="http://journal.kunday.com/post/10517711503/hgrc-my-hg-config" target="_blank"&gt;gist&lt;/a&gt;.&lt;/p&gt;</description><link>https://www.kunday.com/post/18768072305</link><guid>https://www.kunday.com/post/18768072305</guid><pubDate>Mon, 05 Mar 2012 13:17:00 +1100</pubDate><category>mercurial</category><category>hg</category><category>dot_files</category><dc:creator>arvind</dc:creator></item><item><title>Feature Toggles, Feature Branching and Branch by Abstraction</title><description>&lt;p&gt;Note: For people who argue only one of it is good, please read &lt;a href="http://www.sci.brooklyn.cuny.edu/~sklar/teaching/s10/cis20.2/papers/brooks-no-silver-bullet.pdf" target="_blank"&gt;this&lt;/a&gt;. Its written by Fredrick Brooks, one of the seminal guys in software engineering. &lt;/p&gt;

&lt;p&gt;Purpose: Main aim of this article is to spur a thoughtful discussion around the topic than religious opinions or fear mongering about how other option is scary.&lt;/p&gt;

&lt;p&gt;There is so much of debate around &lt;a href="http://martinfowler.com/bliki/FeatureToggle.html" target="_blank"&gt;feature toggles&lt;/a&gt; and &lt;a href="http://martinfowler.com/bliki/FeatureBranch.html" target="_blank"&gt;feature branches&lt;/a&gt;. Most of the existing literature seems to be around each one of it rather than contrasting them and giving a holistic picture. Some of the ones that do give like &lt;a href="http://www.thoughtworks.com/perspectives/30-06-2011-continuous-delivery" target="_blank"&gt;this&lt;/a&gt; seems to be missing the big picture. Here is my attack at the whole situation.&lt;/p&gt;

&lt;p&gt;Why These?&lt;/p&gt;
&lt;p&gt;Before we delve any deeper lets look at the various reasons around why we would need these techniques in first place.&lt;/p&gt;
&lt;p&gt;1. Ability to release at any time. Delay in the development of a particular feature does not halt the entire production release cycle.&lt;/p&gt;
&lt;p&gt;2. Ability for the business to hide features / AB test them / do a delayed release of a particular functionality / back out a particular feature.&lt;/p&gt;

&lt;p&gt;For purposes of argument, this article will focus only on 1. Look here for debate around 2.&lt;/p&gt;

&lt;p&gt;The Promise of Feature Toggles:&lt;/p&gt;
&lt;p&gt;1. Continuously integrating changes in CI and if anything goes wrong could be reverted back.&lt;/p&gt;
&lt;p&gt;2. Functionalities can be switched off if the integration does not go well.&lt;/p&gt;
&lt;p&gt;3. No merge hell / Semantic merge conflicts&lt;/p&gt;
&lt;p&gt;4. Code changes made are immediately in trunk available for the entire team for review.&lt;/p&gt;

&lt;p&gt;To Note:&lt;/p&gt;
&lt;p&gt;1. Feature Toggles aren’t necessarily used only in case of Large features, it could be used to hide certain functionalities that could be as simple as introducing a field to a form.&lt;/p&gt;

&lt;p&gt;Arguments against Toggles:&lt;/p&gt;
&lt;p&gt;1. Every Toggle added to the system needs to be checked with state on and off. So the more toggles in system would mean more combinations to test. &lt;/p&gt;
&lt;p&gt;2. Some toggles cannot be clearly done in a clear way. In some places it could be as simple as a change in the injected object to if statements clobbered everywhere across the code.&lt;/p&gt;
&lt;p&gt;3. Since feature toggles themselves involve code, we could accidentally be exposing something that’s potentially untested / that should not be displayed(How do you think the apple rumours(like this) are fuelled anyways?) &lt;/p&gt;
&lt;p&gt;4. The longer the Toggle is existent in the system, the more expensive it is.&lt;/p&gt;

&lt;p&gt;The Promise of Feature Branches:&lt;/p&gt;
&lt;p&gt;1. Well tested code after QA’ing ends up in master.&lt;/p&gt;
&lt;p&gt;2. Master can be deployed at any arbitrary moment.&lt;/p&gt;
&lt;p&gt;3. Ability to track which changes went to each story/feature.&lt;/p&gt;
&lt;p&gt;4. Ability to isolate noise when working on something big like a refactor(note: large refactoring is usually bad and should be done incrementally as much as possible).&lt;/p&gt;

&lt;p&gt;Arguments against Branching:&lt;/p&gt;
&lt;p&gt;1. Delays Testing(wait, am I getting wrong or qa’s don’t start testing until we call the story complete, in case of feature branching its after developer calls it complete.)&lt;/p&gt;
&lt;p&gt;2. Merge Hell and Semantic Conflicts.&lt;/p&gt;
&lt;p&gt;3. Integrating with CI less often.&lt;/p&gt;


&lt;p&gt;Feature Bits&lt;/p&gt;
&lt;p&gt;1. The arguments in feature bits of Facebook kind of invalidates the whole statement&lt;/p&gt;

&lt;p&gt;Authoritative Articles about the subject.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://techcrunch.com/2011/05/30/facebook-source-code/" target="_blank"&gt;http://techcrunch.com/2011/05/30/facebook-source-code/&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://www.facebook.com/video/video.php?v=10100259101684977&amp;amp;oid=9445547199&amp;amp;comments" target="_blank"&gt;https://www.facebook.com/video/video.php?v=10100259101684977&amp;amp;oid=9445547199&amp;amp;comments&lt;/a&gt;&lt;/p&gt;</description><link>https://www.kunday.com/post/18351387544</link><guid>https://www.kunday.com/post/18351387544</guid><pubDate>Mon, 27 Feb 2012 11:58:00 +1100</pubDate><category>feature_toggles</category><category>feature_branching</category><category>branch_by_abstraction</category><dc:creator>arvind</dc:creator></item><item><title>Traveller's Ancedote, an open mail to redbus</title><description>&lt;p&gt;I have been a regular user of &lt;a href="http://www.redbus.in/" title="redBus" target="_blank"&gt;redbus&lt;/a&gt; for the past one year and had some annoyances, issues with redbus. I decided to mail them and see what they feel about those issues. I got an impromptu reply from their head of marketing and I am publishing the email publicly just for the benefit of everyone.&lt;/p&gt;
&lt;p&gt;Here is my mail followed by their reply.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I have been a regular user of Rebus since last year and hats off to you guys,you guys provide one of the best online booking services I have ever used.As a software engineer myself, providing a usable end product to a customer is always the most difficult rather than the engineering that went to the product.&lt;/p&gt;
&lt;p&gt;My experience with red bus usage has extremely good but some buses charge ridiculous amount of money and provide a really bad user experience. I have seen people being maltreated with rude words and the customer scolding red bus for selling shitty tickets. At times the buses are so bad that you don&amp;rsquo;t really know if you will really make it to your final destination.&lt;/p&gt;
&lt;p&gt;Even though red bus has very little to do with any of the above, not everyone will understand that its a problem anyone will face when they try to run such a startup.&lt;/p&gt;
&lt;p&gt;&lt;b&gt;In summary the common problem I have faced with red bus so far is:&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;1. Quality of buses&lt;/p&gt;
&lt;p&gt;2. Cost/Price of the tickets&lt;/p&gt;
&lt;p&gt;&lt;b&gt;I am interested to know how you guys are trying to mitigate the problem, also i have few suggestions &lt;/b&gt;&lt;/p&gt;
&lt;p&gt;1. Introducing Red bus Certified Program ( Similiar to ratings but not aggregated from the users)&lt;/p&gt;
&lt;p&gt;Redbus could tag a bunch of operators based on your own travel experiences and double check with the operators, based on the badge of the travel operator, someone can choose to buy the ticket or not. This is different from ratings as ratings data could be quite tampered by the operator itself. I have travelled in bad buses which had good ratings in redbus site.&lt;/p&gt;
&lt;p&gt;2. Introducing something like a Customer grievance cell as a pilot who will present at some of major boarding points and classify the ratings of buses based on customer experiences. This gives a sense of good will to the customer as they have some one to go walk and talk in case he is irritated by the quality of operator during the beginning of travel itself.&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Simple Improvements:&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;1. Changing values in drop downs don&amp;rsquo;t retain the sorted result, kind of annoying&lt;/p&gt;
&lt;p&gt;2. Why should booked buses come on the list?(Should'nt the cancel option be more explicit or show a tool tip)&lt;/p&gt;
&lt;p&gt;3. An option to say any seat when there are only few seats available as back and forth you don&amp;rsquo;t get to book any of the seats.&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Other outstanding annoyances:&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;Getting an exception page when something goes wrong (/ error in some .aspx page) should not be a problem most of the time but might confuse naive users as redbus involves credit card transactions and as such.&lt;/p&gt;
&lt;p&gt;- Arvind Kunday&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;And here is the reply I got from Mayank(Head of marketing)&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Hi Arvind,&lt;/p&gt;

&lt;p&gt;Thanks for all the insightful feedback and the compliments likewise.&lt;/p&gt;

&lt;p&gt;We recognize the issues you&amp;rsquo;ve spoken of. The best thing that can be done in the situation we are in is to give our customers the freedom to rate buses and we can in turn make this information available to everyone. We can't certify any single bus because that means guaranteeing a level of service when it&amp;rsquo;s not in our control. We do plan to have a boarding point assistance -something that you mentioned in your mail.&lt;/p&gt;
&lt;p&gt;So, to tackle the quality of the buses we have introduced two features - one is the user ratings and the other one is a -ve alert. The bad rated buses are highlighted in red. You can hide them by using a filter above the&amp;quot;ratings&amp;quot; tab. Even if you do select a poor rated bus, we&amp;rsquo;ll alert you that it&amp;rsquo;s been rated badly by other travelers and on the parameters it got rated badly. Hence we ensure that you are taking an informed decision at every step.&lt;/p&gt;
&lt;p&gt;We are also in the process of weeding out the really bad service level operators.&lt;/p&gt;
&lt;p&gt;On the pricing front, we have a feature that informs customers of high prices. If you search for Diwali tickets, you&amp;rsquo;ll notice that bus operators have hiked fares because of the demand and supply. Very similar to what you see in airlines. Pricing is neither regulated/dictated by redBus nor any government body and every bus operator does so at their own will. Sometimes for good reason and sometimes for profiteering. When they ply buses on some high demand days, they genuinely incur higher costs in terms of taxes so they pass on that additional cost to the customers. Of course, redBus has nothing to do with such pricing. In fact we mark it as a high price so that customers know so.&lt;/p&gt;
&lt;p&gt;On the simple improvements you&amp;rsquo;ve suggested, point no. 2 - we show sold out buses because many of our customers would like to know if there actually is a 3 PM bus or not. Even if it&amp;rsquo;s sold out, they can use that information for future reference while planning their trip. It&amp;rsquo;s our responsibility to reflect the market, hence we show what&amp;rsquo;s sold out. You can ignore those. We will soon put a filter above the &amp;ldquo;status&amp;rdquo; tab to avoid annoyance from sold out buses.&lt;/p&gt;
&lt;p&gt;The other improvements you&amp;rsquo;ve suggested are being worked on.&lt;/p&gt;
&lt;p&gt;-Mayank&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;I am actually looking forward to meet those guys in person and try understand how they are solving these problems. Its quite challenging indeed.&lt;/p&gt;</description><link>https://www.kunday.com/post/1494973351</link><guid>https://www.kunday.com/post/1494973351</guid><pubDate>Sat, 06 Nov 2010 19:41:15 +1100</pubDate><category>rebus</category><category>india</category><category>bus</category><category>mail</category><category>review</category><dc:creator>arvind</dc:creator></item><item><title>Excerpts from Leslie Lamport's Interviews</title><description>&lt;p&gt;&lt;b&gt;Sources:&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;&lt;a&gt;A Discussion with Leslie Lamport&lt;/a&gt;&lt;b&gt; &lt;/b&gt;&lt;/p&gt;
&lt;p&gt;&lt;a&gt;An Interview with Leslie Lamport&lt;/a&gt;&lt;b&gt; &lt;/b&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt; &lt;/b&gt;&lt;/p&gt;
&lt;p&gt;&lt;i&gt;1. When asked about some of the important problems in distributed systems.&lt;/i&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;On the theory side, recognizing a problem has been harder than solving it. &lt;/b&gt;Since you are asking about problems that are already recognized to be problems, the answer is probably none. On the practical side, I don’t think I have any more insight into that than most other people.&lt;/p&gt;
&lt;p&gt;2. &lt;i&gt;When asked about&lt;/i&gt; &lt;i&gt;currently available formal methods are unable to prove correctness of large software systems, such as real operating systems. What is your advice to software developers for bridging this gap between algorithms (which can be analyzed) and full software systems?&lt;/i&gt;&lt;/p&gt;
&lt;p&gt;People fiercely resist any effort to make them change what they do. Given how bad they are at writing programs, one might naively expect programmers to be eager to try new approaches. But human psychology doesn’t work that way, and instead programmers will find any excuse to dismiss an approach that would require them to learn something new. &lt;b&gt;On the other hand, they are quick to embrace the latest fad (extreme programming, templates, etc.)&lt;/b&gt; that requires only superficial changes and allows them to continue doing things basically the same as before. In this context, it is only fair to mention that people working in the area of verification are no less human than programmers, and they also are very reluctant to change what they do just because it isn’t working.&lt;/p&gt;
&lt;p&gt;&lt;i&gt;3. The fundamental idea behind verification is that one should think about what a program is supposed to do before writing it&lt;/i&gt;. Thinking is a difficult process that requires a lot of effort. &lt;b&gt;Write a book based on a selection of distorted anecdotes showing that instincts are superior to rational judgment and you get a best seller.&lt;/b&gt; Imagine how popular a book would be that urged people to engage in difficult study to develop their ability to think so they could rid themselves of the irrational and often destructive beliefs they now cherish. So, trying to get people to think is dangerous. Over the centuries, many have been killed in the attempt.&lt;b&gt; &lt;/b&gt;&lt;/p&gt;
&lt;p&gt;4. I think my most important contribution is my work on writing structured proofs, which is perhaps more relevant to mathematicians than computer scientists. &lt;b&gt;In the unlikely event that I&amp;rsquo;m remembered 100 years from now, I expect it will be for that.&lt;/b&gt;&lt;/p&gt;</description><link>https://www.kunday.com/post/300048298</link><guid>https://www.kunday.com/post/300048298</guid><pubDate>Sat, 26 Dec 2009 03:22:36 +1100</pubDate><category>leslie-lamport</category><category>general</category><category>interviews</category><dc:creator>arvind</dc:creator></item><item><title>Ordered Pairs in Naive Set Theory</title><description>&lt;p&gt;&lt;b&gt;Ordered Pair&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;An ordered pair of a and b, with first co-ordinate &lt;i&gt;a&lt;/i&gt; and  second co-ordinate &lt;i&gt;b&lt;/i&gt;&lt;b&gt; &lt;/b&gt;is defined by,&lt;/p&gt;
&lt;p&gt;(a,b) = {{a}, {a,b}}&lt;/p&gt;
&lt;p&gt;The proof for the above ordered pair is given by,&lt;/p&gt;
&lt;p&gt;If (a,b) and (x,y) are two ordered pairs, then (a,b) = (x,y) if and only if a=x and b=y.&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Proof:&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;If in case,&lt;b&gt; a = b, &lt;/b&gt;then, (a,b) =&amp;gt; the singleton set of {{a}} or the singleton set of {{b}}.&lt;/p&gt;
&lt;p&gt;Also, conversely, if (a,b) itself is a singleton set, results in {a} = {a,b}, so {b} ϵ {a,b} so which leads to a=b&lt;/p&gt;
&lt;p&gt;On the other hand if we assume , (a,b) = (x,y) then both of them have to be singletons which can lead to&lt;/p&gt;
&lt;p&gt;Singletons on both the sides, like {a} = {x}, so that a = x.&lt;/p&gt;
&lt;p&gt;Also both the pairs should have atleast have one element which is not a singleton({a,b} and {x,y}), it results to  {a,b} ={x,y}.&lt;/p&gt;
&lt;p&gt;Now since we already know that b ϵ {a,b}, b is also a subset of {x,y}.&lt;/p&gt;
&lt;p&gt;Since a=x, b also cannot be equal to x and hence, b = y.&lt;/p&gt;
&lt;p&gt;T his completes the proof that, (a,b) = (x,y) If and only if a=x and b=y.&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Cartesian product:&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;When A and B are two sets, we can define a set which contains the ordered pair (a,b) such that a is in A and b is in B.&lt;/p&gt;
&lt;p&gt;Assuming above, we can conclude that {a} ϲ A and {b} c B, implies that {a,b} c A U B. Also, {a} C (A U B) and {b} C {AUB}, which implies, (a,b) C {A U B}.&lt;/p&gt;
&lt;p&gt;There is an important observation from this, {a}, {b}, {a,b} are actually some of the members of the power set of the elements of the set {a,b}.  So we can conclude that, (a,b) ϵ ‽(a,b). Its also obvious that ‽(a,b) has more elements than the ordered pair hence we can define a new set ‽(‽(a,b)) when a ϵ A and b ϵ B.&lt;/p&gt;
&lt;p&gt;Applying the axiom of specification and axiom of extension we can obtain the set A X B which is the Cartesian product  such that&lt;/p&gt;
&lt;p&gt;A X B = {x:x=(a,b) for some a in A and some b in B}.&lt;/p&gt;
&lt;p&gt;We can take forward the equation in a converse order for any set of ordered pairs there exists a set R such that, for sets A and B, R C (A X B).&lt;/p&gt;
&lt;p&gt;Now, ({a},{a,b}) ϵ U R. Now, since {a,b} is one of the subsets of the ordered pair, its safe to assume that, {a,b} ϵ U R. This also assumes that a and b also belongs to UUR.&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Projections&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;Its also often desirable to construct projections (like projection in relation algebra for example). By using the definitions,&lt;/p&gt;
&lt;p&gt;A = { a: for some b in ((a,b) ϵ  R)}&lt;/p&gt;
&lt;p&gt;B = { b: for some a in ((a,b) ϵ  R)}&lt;/p&gt;</description><link>https://www.kunday.com/post/300031578</link><guid>https://www.kunday.com/post/300031578</guid><pubDate>Sat, 26 Dec 2009 03:03:46 +1100</pubDate><category>naive-set-theory</category><category>math</category><dc:creator>arvind</dc:creator></item><item><title>Compliments in Set Theory</title><description>&lt;p&gt;&lt;b&gt;Relative Difference &lt;/b&gt;&lt;br/&gt;If A and B are two sets, then the diﬀerence between A and B, the relative compliment of B in A, is the set A - B deﬁned by (note that = is just a abuse that &lt;br/&gt;we use to ϵ) &lt;br/&gt;&lt;i&gt;A − B = xϵA : xϵ′ B &lt;/i&gt;&lt;br/&gt;This does not necessarily mean &lt;i&gt;B ⊂ A &lt;/i&gt;&lt;br/&gt;But when the above condition holds true, then &lt;br/&gt;&lt;i&gt;A − B = A − (A ∩ B) &lt;/i&gt;&lt;br/&gt;For the sake of simplicity, we assume a set U , the universe on which we can assume that all sets that we create are subsets of them. &lt;br/&gt;Given a set A, we can deﬁne a set which is the absolute compliment of A, which is A’, which also provides that&lt;i&gt;&lt;b&gt; (A’)’ = A. &lt;/b&gt;&lt;/i&gt;&lt;br/&gt;Also as with all ∅, &lt;br/&gt;&lt;i&gt;&lt;b&gt;∅’ = E and E’ = ∅ &lt;/b&gt;&lt;/i&gt;&lt;br/&gt;Also, its easy to prove that, &lt;br/&gt;A ∩ A′ = ∅ &lt;br/&gt;Also, &lt;br/&gt;A ⊂ B if andonlyif , B′ ⊂ A′&lt;/p&gt;
&lt;p&gt;Lets proceed to prove the above one. Lets assume the if part, if B′ ⊂ A′ : if xϵA, its self evident that xϵ′ A, and since B′ ⊂ A′ which clearly implies that , x ⊂ B′ which leaves us withxϵAandxϵB. Proceeding with the only if part, A ⊂ B if xϵB′ the clearly, xϵ′ B and since AϵB, its self evident that xϵ′ A, which proves the above one. &lt;br/&gt;Moving forward with the De Morgans Laws, &lt;br/&gt;&lt;b&gt;(A ∪ B)′ = (A′ ∩ B′ ) &lt;/b&gt;&lt;br/&gt;Lets proceed to prove the above , lets assume xϵ left side then xϵ′ (A ∪ B) which &lt;br/&gt;means, xϵ′ A and xϵ′ B which directly leads to xϵA and xϵB. Proceeding to the &lt;br/&gt;right side, if xϵrightside then xϵ′ A and xϵ′ B which means that x is not present in &lt;br/&gt;either A or B which leads to x being in A or B, hence, (A∪ B)′ = (A′ ∩ B′ ).&lt;/p&gt;
&lt;p&gt;Hence, Demorgan Law have been proved. Similiarly, we can also prove that &lt;br/&gt;(A ∩ B)′ = A′ ∩ B′ &lt;br/&gt;&lt;b&gt;Principle of duality of Sets &lt;/b&gt;&lt;br/&gt;One of the major implication of De morgans law is that, all theorems in Set &lt;br/&gt;theory come in pairs.&lt;/p&gt;
&lt;p&gt;&lt;br/&gt;&lt;i&gt;So if an inclusion or an equation containing, unions, intersections and compli- &lt;br/&gt;ments of a sub-set E, we replace al l the sub-sets by its compliments, inverse its &lt;br/&gt;unions and intersections and reverse the inclusion , we arrive at a new theorem. &lt;br/&gt;&lt;/i&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Symettric Diﬀerence &lt;/b&gt;&lt;br/&gt;&lt;i&gt;A + B = (A − B) ∪ (B − A) &lt;/i&gt;&lt;br/&gt;This is the kin of XOR operation http : //en.wikipedia.org/wiki/Exclusivedisjunction &lt;br/&gt;This is commutative and associative. &lt;br/&gt;&lt;b&gt;Why is theory of intersections only applicable to non ∅ sets ? &lt;/b&gt;&lt;br/&gt;Lets just assume a set, where xϵX : xϵof ∅ &lt;br/&gt;Lets try to prove the other part, If this does not hold true, then ∅ must contain &lt;br/&gt;a set X such that xϵX ′ , which of course is ridiculous, which proves the point. &lt;br/&gt;To clear this, we can deﬁne a sub set in the Universe U, such that, ϱ(All subsets &lt;br/&gt;of universe) &lt;br/&gt;&lt;i&gt;xϵU |xϵX f oreveryX inϱ&lt;/i&gt;&lt;/p&gt;</description><link>https://www.kunday.com/post/293696609</link><guid>https://www.kunday.com/post/293696609</guid><pubDate>Tue, 22 Dec 2009 06:07:55 +1100</pubDate><category>naive-set-theory</category><category>math</category><dc:creator>arvind</dc:creator></item><item><title>Asymptotic Notations</title><description>&lt;p&gt;Why use Asymptotic analysis?&lt;br/&gt;&lt;br/&gt;Since its a well known fact that for a small input set, all algorithms perform well regardless of the complexity, so to determine the complexity we need to analyze the algorithm for large values of n , typically n -&amp;gt; infinity. Also we need to bound the computed value between two values(a range) , or in short create a subset within which the execution time of the algorithm falls.&lt;br/&gt;&lt;br/&gt;An asymptote of the curve is a line such that the distance between the curve and the line approaches zero as they tend to infinity. So, we use this to determine the function which is fixed while n-&amp;gt; infinity.&lt;br/&gt;&lt;br/&gt;Asymptotic notations are calculated based on if the asymptotic lower and upper bounds can be calculated for a function properly.&lt;br/&gt;&lt;br/&gt;Various Notations&lt;br/&gt;&lt;br/&gt;Θ  - when both asymptotic upper and lower bounds can be calculated and is tight.&lt;br/&gt;&lt;br/&gt;θ -  when only asymptotic upper bound can be calculated and is tight.&lt;br/&gt;&lt;br/&gt;Ω - when only asymptotic lower bound can be calculated and is tight.&lt;br/&gt;&lt;br/&gt;o - when the asymptotic upper bound can be calculated but cannot be tight.&lt;br/&gt;&lt;br/&gt;ω -Only when the asymptotic lower bound can be calculated but cannot be tight.&lt;br/&gt;&lt;br/&gt;Θ Notation:&lt;br/&gt;For functions g(n) and f(n), we define a function, Θ(g(n)) such that,&lt;br/&gt;Θ(g(n)) ϵ { f(n): c1,c2,n0, all non-negative constants for, 0 ≤ c1g(n) ≤ f(n) ≤ c2g(n)}&lt;br/&gt;&lt;br/&gt;What it essentially means is that, by using the above description, we obtain a set of f(n)&amp;rsquo;s where f(n) lies between the upper and lower bounds, effectively sandwiching f(n) within c1g(n) and c2g(n).&lt;br/&gt;&lt;br/&gt;So, we obtain a set f(n) ϵ Θ(n), for sake of convenience we use the notation, f(n) = Θ(n).&lt;br/&gt;&lt;br/&gt;This makes, g(n) asymtotically tight bound for f(n) meaning that f(n) is equal to g(n) within a given constant factor C0.&lt;br/&gt;&lt;br/&gt;Assumptions:&lt;br/&gt;&lt;br/&gt;∀ f(n) ϵ Θ(n), f(n) has to be asymptotically nonnegative for sufficiently large values of n.&lt;br/&gt;&lt;br/&gt;Also, it requires g(n) to be asymptotically nonnegative as otherwise, Θ(g(n)) =  ∅&lt;br/&gt;&lt;br/&gt;So we reach a point where, any function computed with Θ(n) has to be asymptotically nonnegative.&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;When computing Θ(n), lower-order terms of a function can be ignored when computing the Θ(n) as its insignificant for large values of n.&lt;br/&gt;Similiarly, to compute the value of the constants c1 and c2 which define the bounds of the function, its enough if we pick a lower bound value lesser than the higher-order term and upper bound greater than the higher-order term.&lt;br/&gt;&lt;br/&gt;For any asymptotically nonnegative function with a higher-order term 0 or if its constant we use , Θ(n0) = Θ(1). (though its sure that 1-&amp;gt; infinity). This notation is just used to make clarity that the function computes in constant amount of time.&lt;br/&gt;&lt;br/&gt;θ notation:&lt;br/&gt;When we have only an fixed asymptotic upper bound, we use θ(g(n)) (pronounce as big oh.)&lt;br/&gt;&lt;br/&gt;For functions f(n) and g(n), we define a function θ(g(n)) such that,&lt;br/&gt;θ(g(n)) ε {f(n), for constants , c and n0, such that 0 ≤ f(n) ≤ c.g(n) ∀ n ≥ n0}&lt;br/&gt;&lt;br/&gt;θ(g(n)) is a subset of θ(g(n)), if it exists as Θ notation is stronger than θ notation.&lt;br/&gt;&lt;br/&gt;-&amp;gt; is most commonly used as asymptotic upper bound characterizes the worst-case behavior of an algorithm.&lt;br/&gt;-&amp;gt; we arrive at an θ notation by looking at the structure of a program&lt;br/&gt;&lt;br/&gt;What we mean by saying a program is θ(n2) what we mean is for any value of n, above a specified n0, running time is bounded above the value of the function f(n).&lt;br/&gt;&lt;br/&gt;Ω notation:&lt;br/&gt;When we have only an fixed asymptotic lower bound, we use Ω(g(n)) (pronounced as  big omega.)&lt;br/&gt;&lt;br/&gt;For functions f(n) and g(n), we define a function Ω(g(n)) such that,&lt;br/&gt;Ω(g(n)) ε {f(n), for constants, c and no, such that 0 c.g(n) ≤ f(n)  for all n &amp;lt; n0 }&lt;/p&gt;

&lt;p&gt;Following figure gives a clear understanding of the above notations:&lt;/p&gt;
&lt;figure class="tmblr-full" data-orig-height="171" data-orig-width="500" data-orig-src="https://66.media.tumblr.com/tumblr_kuwwkm9D9G1qz4u69.jpg"&gt;&lt;img src="https://66.media.tumblr.com/d03b90b3832c01f2190f56909d064432/tumblr_inline_pk9pemN7oi1qz4u69_540.jpg" alt="image" data-orig-height="171" data-orig-width="500" data-orig-src="https://66.media.tumblr.com/tumblr_kuwwkm9D9G1qz4u69.jpg"/&gt;&lt;/figure&gt;&lt;p&gt;Theorem 1:For functions f(n) and g(n), f(n) ε Θ(g(n)) if and only if f(n) ε θ(g(n)) and f(n) ε Ω(g(n)).o notation:The asymptotic upper bound provided by \theta notation may or may not be tight. For ex, 2n ε θ(n2) is not tightly bound. In such cases we use little-oh of g(n)For functions f(n) and g(n), we define a function o(g(n)) such that,o(g(n)) ε {f(n), for constants c and n0, 0 ≤ f(n) ≤ c.g(n) for n&amp;gt;n0 and n0 a constant greater than 0}ω notation:When we have have an asymptotic lower bound provided by ω notation may or may not be tight.In such case,For functions f(n) and g(n), we define a function ω(g(n)) such that,ω(g(n)) = { f(n), for constants, c and n0, 0 ≤ c.g(n) ≤ f(n)}&lt;/p&gt;</description><link>https://www.kunday.com/post/290464306</link><guid>https://www.kunday.com/post/290464306</guid><pubDate>Sun, 20 Dec 2009 04:17:00 +1100</pubDate><category>asymptotic-notations</category><category>algorithms</category><dc:creator>arvind</dc:creator></item></channel></rss>
