Sawant Shah

November 12, 2012

Upgraded WordPress; cleaned up the files; corrected database entries; updated the theme to WP’s default twenty twelve theme … and the site is ready to relaunch and go live (on a new host)!

How to Install Mysql2 Ruby Gem on Windows

If you are getting an error like the following, when running ‘bundle install’ or ‘gem install mysql2’ on Rails 3:

gem install mysql2
ERROR: Error installing mysql2:
The ‘mysql2’ native gem requires installed build tools.

Please update your PATH to include build tools or download the DevKit
from ‘http://rubyinstaller.org/downloads’ and follow the instructions
at ‘http://github.com/oneclick/rubyinstaller/wiki/Development-Kit’

Then read on.

Continue reading

StackOverFlow win!

Yay! I made two achievements on StackOverflow.com with my first two answers there. One, I earned a “Teacher” badge for Active site similar to CSS Zen Garden? And two, I unlocked a few privileges that come with earning points there.

By earning a reputation of 21, I can now participate in meta, got new user restrictions removed (can post images, post more than one hyperlink in a question or answer, post any hyperlinks in my profile, contribute answers to protected questions, ask or answer questions too rapidly), create wiki posts, vote up (this is the privilege for which I actually started answering in the hope to earn enough reputation to vote the good answers up), flag posts, and talk in chat.

So, now that I have started to rock the StackOverflow’s Q&A space for programmers (w00t), you can keep a tab on me there through my StackOverflow profile.

[Me happy at 4:30 am Pakistan time. w00t!]

No more limits!

When it comes to blogging, one of the things that I have tried to follow – very successfully – is that I shouldn’t post more than once on my blog in a day. May be ‘coz I want just one post of mine to bask in the limelight that day.

So, if I have more topics to write about, I say to myself … “hmmm I will do that tomorrow, or day after”. But, no prize for guessing, the next blog post arrives weeks or months later.

A few of us probably have this fear that we shouldn’t do more at any one point in time; but rather divide it over time. We do this probably so that we don’t overwhelm people, that they don’t yell out “enough!”

But is this how it should be? Should we really limit ourselves so that we don’t overwhelm other people?

I don’t know about the rest, but I certainly have to disagree with this, and I have to stop limiting myself!

So from now on, I’ll blog, as much in a day or week or month … just whenever I want to. No more limits!

Firefox is Slow? Check the add-ons you have installed!

Firefox is slow. In fact, it gets very slow the longer it is kept running. If you are web developer like me, who relies on Firefox for better productivity through its excellent add-ons, such as Firebug, then you must be feeling frustrated with the slow (sometimes extremely slow) performance of Firefox 4 (and/or previous versions as well). Browser speed is of course relative: I am comparing Firefox to Chrome in this case.

Turns out that Firefox is not the only one to blame; there are a host of add-ons that render Firefox to a sluggish speed, both at boot and operating times.

Continue reading

Multiple Skype Accounts / Instances on a Single PC

For all those searching for a way to use multiple Skype accounts on a single computer, let me tell you that it’s actually very simple to achieve for Skype 4.0 and above.

When I searched for such a solution, I found lots of links that talked about running multiple Skype accounts through multiple administrator accounts or through Task Scheduler. Pfft … scrap that if you are running version 4 or above!

The solution is posted after the jump.

Continue reading

Developing Facebook Chat: Programming Language and Technologies Used

Facebook Chat looks very simple by design, but if you pry deeper you’ll learn that it’s an impressive engineering and design feat. One must question: how was Facebook Chat, which was to serve over 70 million users when it was built (now serving over 500 million), developed? Which programming language was used to build Facebook Chat? What technologies were put together to bake this web-based chat feature? The primary Facebook chat programming language is Erlang, but that was not the only ingredient. Much more has gone into developing Facebook chat.

Eugene Letuchy, the lead developer of Chat, from Facebook, has put the answers down in a neat presentation that highlights the main aspects of what went into Facebook Chat.

Erlang at Facebook

At the heart of Facebook Chat, and thus the central part of this presentation, is a programming language called Erlang, which is a general-purpose concurrent, garbage-collected programming language and runtime system.

Continue reading

Banksy and His Exit Through the Gift Shop

Today I learned about Banksy through a comment on the status of a friend on Facebook. So, who is Banksy? He’s a renowned graffiti artist. Intro line intro from Wikipedia:

Banksy is the pseudonym of a prolific British graffiti artist, political activist and painter, whose identity is unconfirmed.

Here’s an extended peek at his movie, Banksy’s Exit Through the Gift Shop:

960 Grid System Photoshop Actions

960 Grid System Photoshop ActionDesigning websites with a grid system like 960.gs has been made easier with the availability of two sets of Photoshop actions, which come in really handy to create a new Photoshop document based on the 960 grid system.

These actions will create a Photoshop document ideal for laying websites out in 24, 16, 12, 10, 8, 6 and 4 columns.

960 Grid System Photoshop Actions

These set of actions by Johnny Nines supports 4, 6, 8, 10 and 12 column grids.

Key Features of the Action:

  • Creates a new Photoshop document from scratch.
  • Creates guides to determine grid columns and gutters with transparent layer to show gutter space
  • Creates Layer Groups for Header, Content, Footer and Backgrounds making it easier to lay your sites out in a orderly manner.
  • Compatible with Photoshop CS3 and higher
  • Works on Mac and PC

Download from here

960 Grid Actions

These set of actions by Ben Shoults supports 12, 16 and 24 column grids.

Key Features of the Action:

  • Creates a new Photoshop document from scratch.
  • Creates guides to determine grid columns and gutters
  • Works on Mac and PC

Download from here

Diving back into Designing, HTML and CSS

HTML codeI have been more of a programmer in the past couple of years with my focus on open source languages (PHP, Ruby). I have been writing code and leading programming teams. In fact, my very first job after graduation was as a Software Engineer in Visual Basic.

But there’s a creative side to me as well, which I haven’t let gather dust in all these years that I have been a programmer. I kept my creative side active – be it with photography or be it by studying music, or be it by practicing and improving upon Photoshop skills; creativity never left me. In fact, even in programming I make sure that the code I write is ‘beautiful’ (which doesn’t mean that one has to do anything extra – just proper indentation, meaningful variables, proper white-spaces, following conventions, etc, makes the code beautiful).

Although I have always been able to design in Photoshop, but I have never been able to make an HTML out of that design! This has remained a challenge for me since I’m very much of a hand coder (I loved Allaire’s HomeSite – R.I.P. – more than I would ever love the bloatware called Dreamweaver)!

I always thought that slicing a design and generating HTML/CSS out of it would be easy (or should be). I have tried Photoshop’s slicing and exporting tools to generate HTML, but it leaves a lot to be desired. For example, when saving as DIV-based HTML, Photoshop makes everything absolute positioned (is it bad? I just feel that it’s bad, but I’m not sure)!

But finally, I have learned and applied the skill of creating HTML out of a Photoshop design, and that too a DIV-and-CSS-based-design. All hand-coded, mind you.

So now I’m having fun all over again with designing, as now I can bring my designs out of Photoshop and into the real world, for everyone to see. I already loved playing with HTML and CSS (and soon JavaScript/Jquery too hopefully), and with my new favorite text editor, E – TextEditor (with Notepad++ as a reliable side-kick), I’m writing code that is beautiful; as WordPress’ dictum goes: “Code is Poetry”!

The first of my designs, which I have successfully exported out of Photoshop and on to the web, will be revealed in my next post. So stay tuned.