Neeraj's Blog

A blog on programming and web techniques.

Script to Record Screen on Mac Osx and Save on Disk

| Comments

Ever tried programmatically recording your screen on mac?

My recent tryst with applescript and some technical issue at work lead me to find out ways to record a screen programmatically on mac. (The current version I am using is Mountain Lion on a macbook pro). And the scripts out there currently, which do the same thing fail miserably.So I had to go ahead and write code from scratch. People who want to directly jump to the code (and explanations) can click here.

HCI : The Rest Is Just Commentary

| Comments

I recently came across a book by Joel Splosky, “User Interface Design for Programmers”. In this book, Joel talks about the ideologies behind good user-interface design. With my developing interest in HCI, this book has been a real help in understanding the role of HCI in design of user-interfaces. I plan to blog a about the techniques Joel talks about in his books, and put my thoughts into this blog as a reference for myself and others. Lets start with a very basic understanding of what HCI stands for.

Etymology

HCI stands for Human Computer Interaction, a multi-disciplinary field of study which involves the study, planning and design of interaction tween people and computers. Because of the various ways in which a user can interact with a computer( by definition this can be extended to any high-end electronic device like smart-phones etc), this branch of studies lodges its teeth into many subjects like computer graphics, cognitive psychology, communication theory, graphic and industrial design principles, behavioral sciences and many more.

Comet : Bringing the Event Based Paradigm to Web

| Comments

Prenote:

This blog post is introductory in nature and gives a basic idea of what comet is.

History

The web has always worked on a stateless and pull based paradigm, where the browser/client comes and asks the server periodically or irregularly, and updates itself. But with the growing demands and the changing scenarios, there has been a need for an event-based mechanism for web. A good case in point is the facebook timeline. Updates from so many of your friends are of-course irregular in nature and the browser/client polling continuously is a waste of CPU, network and other such resources. In essence this(server-push) technique was being used for quite sometime with Applets and Flash plugins.But all these require an extension/plugin to be installed on your browser and hence are not native to the JavaScript. Comet (Reverse-ajax, streaming HTTP) is first such model which enables a server-push/event-based paradigm from right within your browser i.e native to JavaScript.

Introduction

Comet is an umbrella term for a suite of web-applications which allow dynamic updates in a browser, without the browser polling in any way.

Baked Blogs

| Comments

Etymology

I honestly don’t know where this term originated, but usages can be found from as early as 2002.

Definition

Baked blogs can be defined as blogs the pages/posts/contents of which are majorly served statically.(http://en.wikipedia.org/wiki/Static_web_page).

Restrict Packages Using Maven Sonar Plugin

| Comments

The need to restrict!

There might come a time when a dev team as a whole is required NOT to use a specific java package due to certain possible reasons that those might be deprecated or might be proprietary but are still ported with the standard JRE.

Lint Your Javascript

| Comments

Etymology

The word linting was most commonly used , for the process of removal of fibers or particles from uncoated paper before the process of printing is stared , as these particles caused issues with printing material.

Now that we have a brief gist of what linting means, lets discuss linting in programming languages.

Prefetching Media Using HTML5

| Comments

Prenote

As a prenote to the blog, I would like to share with the readers that HTML5 is still not a final specification and there are still almost 3 years and a quarter before the specs are finalized and another year before the browsers implement those specs and come up with a stable version. So as of now, we might still be 4 years from time when HTML5 will actually be something stable and robust to be used in the industry. Nonetheless, browsers have started supporting HTML5 , as and when the specs are updated , the browsers come up with newer versions supporting those specs and hence developers can still upgrade to a newer and cooler version of HTML.

CSS3 Transitions With HTML5

| Comments

Introduction

From a lot of cool feature packed with CSS3 I feel the one that has a lot of utility is transitions.

Transition as a word can be defined as the process of changing from one state to another.When you see a website, there are a lot of transitions happening resulting from user-interaction E.g menus dropping down, buttons changing shape/size/color due to a hover, items appearing/disappearing etc.