Dependency Injection?
In one word explain why dependency Injection is useful?
TESTABILITY.
In one sentence explain why dependency Injection is useful?
By turning code into configuration, DI makes code more testable and modular.
Cosimo Galluzzi
Xuebing Du

#extradirty
NASA

❣ Chile in a Photography ❣

oozey mess
Keni
DEAR READER
taylor price
Jules of Nature

No title available
noise dept.

if i look back, i am lost
TVSTRANGERTHINGS
trying on a metaphor
Noah Kahan
Sade Olutola
occasionally subtle

Kiana Khansmith
Aqua Utopia|海の底で記憶を紡ぐ

seen from United States

seen from Türkiye
seen from T1

seen from United States
seen from United States

seen from United Kingdom
seen from Brazil
seen from Iraq

seen from United Kingdom
seen from Tunisia
seen from United States

seen from United States

seen from United States
seen from United States

seen from United States
seen from Türkiye

seen from United States

seen from United States
seen from United States
seen from United States
@mirchikasalan-blog
Dependency Injection?
In one word explain why dependency Injection is useful?
TESTABILITY.
In one sentence explain why dependency Injection is useful?
By turning code into configuration, DI makes code more testable and modular.
Installing tomato on ASUS RT N16
Finally I got around to installing tomato on my ASUS RT N16 home router.I found the following resources helpful.
DD-WRT vs Tomato : If your router is supported go with Tomato because Tomato = DD-WRT + all factory firmware features + opsware (USB, VPN etc..).
If you only own a mac, follow the following instructions to install tomato on your router.
If you have an Xbox, you would want to enable UPnP on your router.
Testing a Random number generator
All the articles I read on testing a random number generator have been very academic. But I recently came across very approachable write up titled testing random number generator in the book Beautiful Testing. Highly recommended!
On LiquidText
I am an avid reader. But, lately I have put on a few pounds and have become quite lazy. My laziness not only affected my from day to day activities, but also my reading habits. I was lazy even to scroll back to a piece of text to clarify what the author meant. As a result, my comprehension and retention abilities have also taken a hit. This problem bothered me for a few days after which I decided to do something about it.
After thinking about it for a few days, I felt that that it would be cool to just grab arbitrary pieces of text from a document arrange them in a way that would make more sense to me. I built a prototype of the idea and then let life decide the fate of the project.
Today while browsing the internets, I can across a project/company/product called liquidtext. To understand the power of this idea, you should watch the demos. Basically, liquid text breaks the confines of the rigid paper text by allowing you to grab arbitrary pieces of text from a document, organizing and annotating those collected pieces in different ways and to occlude the selected portions of the document using multi touch gestures. In short, LiquidText makes an e-reader better than paper.
The real treasure on the website turned out to be the research papers. The best part of the papers was not the implementation of the liquidtext, but the background on why liquidtext was important. Turns out people spend about 27% of the time navigating, a document while reading it. Navigating a document, annotating and highlighting a document are common practices of avid readers. This technique of reading even has a name called "active reading". There is years of research that shows that this method is very effective and a lot of systems were designed to make this process simple. Craig Tashman, has done excellent background study and has built an excellent system. The only downside of the papers was lack of empirical evidence that show that liquidtext indeed is better for active learning.
While I am skeptical that this software is most useful on a 10" ipad screen, I am keenly waiting to get my hands on their product.
The challenges in building a personal cloud
TL;DR The future of personal cloud computing is one where every user has his own server in the cloud that hosts is own applications and data with a well defined API. We need a general framework to enable that use case.
Long version
After recently reading Dalton Cladwell's post on what's wrong with twitter, I was relieved to see that a lot of people also feel that social media startups are better run as life style businesses than "get rich quick" growth business that we see today.
I was excited to see Dalton doing something about it by starting a paid version of twitter. But I was disappointed once I started looking into the details. For a start, people wouldn't pay $50 a month to know what I ate for lunch/dinner. Further, a paid twitter or a social network would never have lead to an Arab spring, only a free version would allow that.
I believe in the idea that web users should have control over their data and that the web companies should do better than coming up with innovative ways to package their users and their data as products for advertisers. But, I think in practice the idea is being put in practice in the wrong way.
The idea of giving users the control of their data at a price should start with their critical applications like email and dropbox clone. Starting with social applications twitter or a facebook clone is a bad place since they thrive on network effects and no one will really pay for an app is not critical for their day to day lives.
The ideal framework for protecting the users privacy is to have each user his own personal server in the cloud that he can control. While this idea is simple, getting there involves solving atleast 3 problems well. Firstly, managing server is a bitch even for the most savvy computer programmers. So, some one (like a cloud hosting provider) else other than the user should do it on user's behalf. This service should be responsible for keeping the server up and also to scale it's compute and storage capabilities as necessary.
The second challenge comes from the fact that software that server software is neither user friendly nor is easily maintainable. To solve this problem the framework should provide an app store like interface using which users can install the applications that would run on the server. These server applications should also be one click install and expose the minimum configuration to the users.
The third challenge, is providing an eco-system of usable mobile and desktop applications on all platforms so that these services can be useful for day to day activities. In addition, enough marketing muscle should be put in place so that this platform gets adopted.
The first problem is generally solved by a cloud hosting provider like Amazon AWS. The later 2 problems remain to be solved well.
State in programming languages
There is no end of opinions about state in programming languages on the web. Most blogs/discussions on the web start with a vague hand wavy definition of state and then go on to propose a "silver bullet" solution to solve all of our problems with state. However, most people miss/ignore the subtle distinctions between different kinds of state in a program. In this blog post, I will try to document (disclaimer: the list is non-exhaustive) different kinds of state in a program.
Non-persisted local state: This type of state is a state in a function. For example, in a function call, all the local variables can be treated as local state. This state is not persisted across program execution and most often beyond the scope of the function.
Non-persisted scoped state: Fields in classes, modules and other such abstractions would be considered as non-persisted scoped state. This state won't be persisted across program executions either.
Non-persisted global state: This is state that is shared by the entire program. Global variables would be a good example of this state. This state will not be persisted across program executions.
Persisted global state: This state is data/information that is persisted to disk. This can be data stored in a database, data stored on files on disk, config files etc. However, log files don't count towards persisted global state.
External state the program reacts to - Events: External state is state that comes from the outside world. However, there are 2 types of external state. The first type are events, state that is time varying and fleeting. For example a mouse click, button click, an arrival of a network packet or a keyboard button press event. This state typically also has context associated with it.
External state that is accessible to the program- State of the world: This is external state that is the state of the world. This state is state that causes side effects and can only be manipulated by a side effect. Typically these kinds of state change can't be undone and it's will be extremely expensive or impossible to control all the factors that affects this kind of state. For example, the state of various nodes in a distributed system, writing to syslog etc.. are examples of state about which no assumptions can be made. Further, reading and writing that information involves true side effects. This kind of state is an inherent property of the world.
Thoughts on Xtend: a new language for the JVM
Eclipse.org today announced a new language for the JVM called Xtend. To summarize xtend is a
OO Language that compiles to JVM byte code.
Statically typed, uses type inference
Better syntax for accessing properties etc..
Comes with closures and multiple dispatch and better syntax.
In short, xtend simplifies Java development by making code clearer and simpler. Unlike, some new program language, it comes with IDE support from eclipse. All is well and good up to this point. But this will be a failure because:
Most of the work most people perform involves maintenance and for that one should switch back to Java.
Further, it's is far easier to maintain a system in a single noisy language than code in 2 languages.
I think xtend is solving the right problem in the wrong way. Instead of a new programming language, I think we should have an xtend mode for eclipse that would display code in a much cleaner fashion. For example, in extend mode:
A code snippet for a switch block can be shown with a cleaner switch syntax.
The IDE can perform an type inference of the code and can just hide repetitive/noisy code. Similarly, I will be able to write code as if type inference existed but the IDE can fill the types for me.
The IDE can make parenthesis and semi-colums optional and add them later when saving the program to the file.
Further, it can let me call a property by it's name but replace it by an appropriate get and set method.
Most of these language features don't sound that great once you have to integrate with legacy code.
I have to get everyone on my team and management to use this new language. A big investment.
I have to hire programmers who know this new language.
Implementing a new language as a mode in an IDE rather than a new language is better for the following reasons:
Unlike a new language, I can even comprehend existing Java code much faster. That is a big feature!
New code will be easier and faster to write.
If some code doesn't fit well xtend mode, I will go back to my Java mode to write it.
I don't have to get management's permission to use this new mode. My team mates would never know that I am using this mode.
Since this is purely enhancing productivity, no one in their right mind would oppose this.
While, this approach may not let you get all the benefits of the new language, I think you can reap a large portion of the benefits just by adding this as an editing mode to an IDE.
Buy a bigger screen, be more productive!
What other hardware would you buy once you have a quad core processor, 8GB of RAM and an SSD harddisk?
A 27"/30" high resolution monitor.
I was surprised to see that a lot of people don't think about screen real estate as a productivity boost. There are several studies that show that more screen real state (high resolution monitors or using multiple monitors) will improve your productivity.
However, unlike buying a faster processor or a faster disk, upgrading to higher resolution of monitor needs some planning. Unlike a hard disk which makes your existing work faster, buying a high resolution monitor is no good if your application can't make good use of it and most applications can't. If you are using linux, you can use a tiling window manager like awesome. Mac doesn't have a proper tiling window manager but a few alternatives do exist.
Demo applications
The easiest way to get a feel for a new framework, library or a programming language is to implement a demo application in it. However, it is super hard to choose the right demo application that covers all the bases. The list below may help you choose the right example for your demo application:
To evaluate a Programming language - Implement a HTTP Server.
To evaluate a Database/Data store : implement a Shopping cart with some reporting.
To evaluate a web framework - implement a twitter clone.
To evaluate a Java script framework - Implement a ToDo list service.
To evaluate a networking library - implement an echo client.
Until now, Kno reader/app is just another glorified e-book (e-book, note taking, hyperlinks, embedded videos) reader with bonus materials and social distractions. However, the new Kno 3D feature changes that. As can be seen in the embedded video above, Kno can parse the text in the book and can construct 3D visualization of molecules. (src)
It's features like these that take us closer to realizing the true potential of e-books. Unlike paper books, e-books have the potential to augment our human cognitive abilities by enriching the text with more context and presenting it a more intuitive fashion.
While I am excited at the potential of e-books, I don't think automatic generation of visualizations from text is possible anytime soon. In this particular case, Kno may be simply converting the description into CML and using an off the shelf CML visualization library to visualize it. I doubt if they will be able to extend it beyond anything else than chemistry since there are no other widely used markup languages and visualization tool kits.
Until next time, I will try to recollect how a visualization like this would improve my grades.
Life at an indian call center
Today I read a very well written article describing the life at a call center written by an american who flirted with the idea of working in a call center in Gurgaon. Looking at the title, I was expecting another article describing cows, culture and curry. But I was pleasantly surprised to find a well penned fuller experience of an expat who did something more than order in Domino's and complain about the heat.
The below excerpts from the article would capture the aspirations and the costs of weak brainwashing imparted at these BPO sweatshops.
Arjuna was more conflicted. he was still stuck in the same customer-support job, still verging on depression, and still single. He never could figure out how to date casually nor could he bring himself to use the matrimonial websites popular in India. In a sense, Arjuna is too westernized to be happy in India. He speaks with an American accent, listens to American rock music, and suffers from American-style malaise. In his more candid moments, he admits that life would have been easier if he had hewn to the traditional Indian path. "I spent my youth searching for the real me," he says. "Sometimes I feel that now I've destroyed anything that is the real me, that I am floating somewhere in between."
Mittu from Chennai wore black jeans, steel-toed boots, and a charm bracelet. Looking closely at his bracelet, I saw a peace sign, a marijuana leaf, the anarchist "A," and a swastika—not the Hindu kind. "You know this is the Nazi one, right?" I asked. Mittu grinned. "I just bought it for the pot leaf."
The characters in the TV show "outsourced" are not way stereotyped after all.
Doing client SSL authentication correctly
Today I was trying to explain SSL authentication to a co-worker and realized that I don't understand it as well as I thought I did. So, after some digging around and chatting with co-workers, I realized that client authentication entails 3 things:
Checking that the certificate is valid. Verifying that the "CA chain" (not just the CA in the cert but the whole chain) is valid and trusted.
Making sure the Distinguished Name(DN) on the SSL matches the hostname of the client or the DN is in the list of acceptable reg-ex's in your application.
Making sure that the certificate is not part of any CRL (certificate revocation list).
Until today, I would always do (1) and might do (2), but would have never bothered to do check the CRLs.
Are E-books really better than physical books?
E-books are gaining a significant foothold these days. So much so that Amazon is selling more e-books than physical books. With devices like the kindle and the ipad gaining prominence, it is interesting to see the evolution of e-books. However, to me paper books are better because
I also find it hard to read a book on a screen for long duration. I have never tried a kindle, so I am not sure if it's any better.
With too many books on my electronic device, I am more likely to not finish reading the book I have in hand since there are other distractions.
Since there is a lot of content on my electronic device, even when I manage to finish the book, I spend less time processing the information since I will be distracted by something else.
Apart from carrying the inconvenience of carrying a physical book, I find no compelling advantage of an e-book over a physical book.
(f)Utility of information overload
Off late, I am consuming a lot of information. However, I only remember and use a part of it. I only recollect the information I have produced or the information I have discussed at some length with someone. Every other of piece of information I consumed is forgotten after a short while. In retrospect, reading content online turns out to be a huge waste of time.
Further, the information density of most of the online content is so abysmal that it hardly stretches my understanding/imagination. I avoided the TV because it makes me mindless couch potato. I guess, I should shun most of the internet as well. I want to read long form content and want to produce long form content.
iPad vs Laptop debate
The iPad vs laptop debate at this point is all over the internet and everyone and his dog has an opinion about it. So here are my $0.02.
On almost all the discussions people either think of it as a useless device or people think about it as a laptop killer. In some discussions people see a different niche use for the device. I find all these discussions incoherent. In this blog post I will try to opine on this topic using a task centric model to computing.
An iPad is great for any task that involves sequential navigation of an action graph or tasks can be performed as using a breadth first traversal of an directed acyclic action graph. To put it more lightly, any task you can do on a single screen with one hand. Tasks wherein the user consumes content like reading casual email, browsing, watching short clips, social networking, buying a specific book on amazon all involve simple actions and simple navigations. It is also a great device for short simple interactions like responding to tweets, checking and updating your todo list or calendar or signing your fed-ex receipt.
However, an iPad is a horrible device for tasks that require a complex navigation over an action graph. More plainly, any task that involves looking at more than one screen is hard to do on an iPad. For example, it is a horrible device if you want to type a quick email summarizing 2 emails or when you have to do comparison shopping to buy that next printer/tv or camera.
By looking at a tablet like the iPad from a task centric approach one can explain the experience of each and every user. So if the tasks you perform mostly involve mostly linear navigations iPad is a great device for you and you can replace your laptop with it. However, if a significant percentage of tasks you perform involve complex navigations then you are better off working on a laptop.
Choosing between a laptop or an iPad need not be an either or situation if both the devices provided a unified seamless navigation experience. A seamless navigation experience is important because we can't build one app for everyone that can streamline all the complex navigations into a linear navigation. Likewise, it is inefficient, uncomfortable and hence less pleasurable to perform simple linear navigations by sitting infront of a computer.
So extending my example from above, I want to check my casual email from my iPad but want to quickly summarize those 2 emails from my laptop before returning to casual browsing on my iPad again. Similarly, I want seamlessly switch between watching the netflix movie from my laptop to my iPad and vice versa. Such seamless integration will enable and empower the user to choose the right tool for the job at hand.
The task centric model is also useful for understanding the market dynamics of the tablet market. More on that in my next post.
Software for personal cloud computing
For personal cloud computing to be a reality we need a lot of software in the cloud to host the services. Further we also need the enabling technologes so that we can access ans share the the data on your personal cloud seamlessly on the desktop and mobile devices. In this post I will document the pieces of software that exists today to make this a reality. On the server side we have the following open source software that do different things.
Zimbra: You personal email server.
Ushahidi: Your personal foursquare.
Plogger: Personal picture gallery.
Kaltura: Open source video hosting platform.
Opengoo: Google docs alternative.
Diaspora: A distributed social network
However, a lot of work is needed so that the data from various applications can be shared and accessed seamlessly. Further, A lot of these tools replicate each other's functionality and for a personal cloud solution, there should be only one great way to do everything. Further, all the software should have support a single authentication and authorization mechanism.
While all the pieces of the puzzle sort of exist on the server side, the client side is not so rosy. The client side of the personal cloud computing is a much harder problem since there are multiple desktop technologies and several mobile technologies. No single language or stack ter rules the windows, linux and Mac platforms. Further, each mobile platform uses a different technology.
Personal cloud computing
This blog post will serve as an index for my thoughts on personal cloud computing.
What is personal cloud computing?
Importance of personal cloud computing important.
Advantages of personal cloud computing.
Challenges in personal cloud computing.