css frameworks

For my new project, I was looking for a good css layout to use. I have never been comfortable pulling an entire theme I found online into my project. I find it too messy because I wouldn't know what is going on in those styles and layouts for the most part and I would leave most of it unused. What I used to do is extract some layouts, styles etc. from the theme I like and build on that idea.

Last week twitter released there collection of css and js which can be easily used as a framework for your site's design. You can check out their blog post here and the code is here. I was looking into it and through hackernews I found some other similar frameworks like skeleton, blueprint, boilerplate, gridless, 960.js and so on. I ended up going with skeleton because it looked simple, lightweight and easy to use.

After tinkering with it for few days now, I think any one like me who is not good at these UI things and pretty much hates doing it but have no other option should definitely give it a shot.

That's it for now. Back to my floats, styles, and clearfix!

 

Cheers,

Mahesh Murthy

jquery - Part 3

I am continuing with my jquery book after a 3 week break. I was in Boston for 2 weekends and last weekend was busy moving into my new apartment (continuing to be a nomad in chicago).

Chapter 2 was all about different ways of selecting dom elements and such. Chapter 3 is about selecting and filtering and manipulating dom elements. The blog post on Chapter 2 turned out to be really shabby with horrible formatting and not very clear content. So, trying to make amends this time. Let's see how it goes.

Problem: Given the below html, how do you extract the urls from it?

Solution: Enter jquery method each(). So, you would do

It is pretty self explanatory. You pass in a callback function to each method which is applied to each element of the selected array of anchor elements.

Problem: Now from the above html, what if you wanted to select the 3rd link and apply some highlighting to it?

Solution: You would use the eq(index) method to do that.

Next, do you know what this is doing?

$("div")[0].innerHTML?

It should be easy to guess, you are basically getting all the div elements and selecting the first one's html content. Remember when you do $("div"), it returns a jquery object but innerHTML is applied to a raw dom object. It is [] which converts jquery object into a raw dom object.

Now, let's say you have a list of dom elements and you want to just extract a subset of the list based on some condition. You can eithe loop through the array and do an if check and select the element or just use the map function like this.

slice: If you are from the ruby world, you will probably know the slice method on an array. However, the functionality of jquery slice method is completely different. It basically performs a specified operation on a subset of elements. For example:

$("p").slice(1,3).wrap("<i></i>")

 

That was a quick and easy chapter I must say. It helps to have those simple chapters when you are coming back from a 3 week break :P Hope you got something out of the post today (assuming you made it all the way to here)! I will be back next weekend with Chapter 4.

 

Namaskar!

Mahesh Murthy

 

 

Part 2 - India

Continuing where I last left off in the previous post, I finished reading the section about India yesterday. Unlike what I wrote towards the end of my last post, the author does seem positive about things in India. Of course, the book is about scrappy entrepreuners and how they are building companies amidst third world challenges. So, how can she be so negative right? The things which she dislikes about India are not anything new. It is the same old corruption, pollution, traffic, terrible infrastructure and so on. Things are definitely getting better from my point of view and that's what she writes in the book based on interviews with various people.

Amidst hundreds of copycat startups in India (copycat startups are those which basically pop up right after a company in Silicon Valley is mentioned on say Techcrunch. It is fascinating how little time it takes them to put up application which is exact replica of those silicon valley startups), she talks about few companies which are making a real difference, which are solving India's problems. Funny how all of those she talks about revolve around SMS (btw, I work for a company whose core product is SMS marketing. Signal FTW!). 

One of them is RedBus which I had heard when I was in India. It is a service you use to book bus tickets in India. It is hugely popular I hear.

Another one I personally used when I was in India was JustDial. Unlike US where you can just google or yelp for restaurants, bars or whatever, it is not easy to find anything online. That's where JustDial comes in. You want a plumber, call them. You want the address to some restaurant, want some recommendation, just dial. They are basically the human search engine. Eventually they will become less important as online presence of services improve but they are doing a great job right now.

Eko India Financial Services is another one she talks about. I have never used this but I had heard this concept in Economist a while ago. This is basically a service you use to transfer money between people through SMS. So, if I have to pay you Rs.1000, I just text a registered pin and the amount and your phone number and you will be credited that amount. And guess where you can go get your money? Nop, not any banks. It is in that store on the corner of the street! Lot of people in India can't open a bank account because them don't meet the eligibility requirements (I have no idea about the requirements). So, this is how money changes hands. The technology is not all that complex but I think this is brilliant.

The one other interesting I thought was this company VNL which puts up solar powered towers in remote villages to give them cell phone connectivity. Solar is the key here because there is hardly power in those places. What a fantastic way to connect them to the rest of the country.

It is no secret that 2 things India has got it right so far is mobile infrastructure (it is so cheap and easy compared to all the developed countries I have traveled to atleast) and the information technology (Outsourcing). According to her, product companies are slowly starting and is a good sign. Overall, I think she has done a great job of covering India.

I just finished reading the entire book, next were Brazil, Indonesia, Rwanda. It is interesting to how things and issues are so different among different developing countries. To some it up, it was a good read.