Banglore Accessibility – Second Meet-up

On Saturday, the second meet up of Accessibility was held at National Association for Blind, Karnataka. (@nab_kb)

Got a chance to be at the lab observing students with disability learn computer. And believe me, they are not at all disabled by features, we just have to make everything accessible to Assistive Technology.

Video of their Lab
http://www.youtube.com/watch?v=u1VGywpsCyg

http://www.youtube.com/watch?v=9DDL59pe9Rw

Will put up a MOM on it soon.

Here is MOM by Srinivasu Chakravarthula :

http://sgaccessibility.com/sites/accessibility-meet-up-augus…

Independence day wishes!

I am proud to call my self living in an independent nation. I realize the efforts and lives gone into achieving this. But i don’t see it realized when people recognize it on a single day and rest of the year indulge in fights and divisions on the basis of caste color creed religion country and now political party.

I stand at that position where i see whole world as one. we attained freedom not from British but from an era of dark practices. Are we progressing? no. We are still stuck at the same separation. Now at different level, call it by the name of country or god or money. Liberate your selves, your minds from the exile of greed and urge for domination. Celebrate with me a day of Independence!

How many of us Care ? Accessibility A11y

Inspiration to write this blog was through my studies on Accessibility and how disabled people want webpages to be delivered for better understanding and interaction.

That’s when I got a lot of points that we could use to improve the accessibility experience in our applications. I am using Facebook as an example for explaining some real world situations people experience. Many of them, Facebook is/was facing at one or other point.

I’m jotting down some of them here with solutions for some as per guidelines.

  • Much talk is there about having accessible images. Giving image element alt attribute. using aria-labelledby and aria-describedby to make it much presentable, using role as presentation. But from the users posts, it looked like they where not much concerned about images or their labels. Couple of things we need to think about are.
    • Their audience and whom they follow where unique. they also posts the content in a fashion very much accessible to users. Mostly Text updates, status messages etc.
    • While a normal user, when he uploads an image, he doesn’t bother to make the image accessible by giving an explanatory label/caption, or a descriptive definition of image as image description. Worst case, they put in puzzles as image caption, which will not hold a direct relation/ explanation with the image.
    • Suggestions from users, was to avoid pictures from timeline, or at least give an option to hide all pictures with a link.
    • It is a good thing to understand how these users would prefer the content to be and provide additional controls.
    • If a control like hide all photo statuses is irrelevant for a normal user, then providing it offscreen is a wonderful feature to add for ATusers(one who uses Assistive Technology).
    • So they don’t want to interact with photo’s at all.
    • Similarly they would want to remove all games and ads(advertisements), because games are totally inaccessible and ads clutter up things so you can’t find what you really want to find like a text status post – UX
    • Well when it comes to Ads, Its your call. However is there any point of disturbing AT’s (Assistive Technologies). with ads that will not be read out properly to these users ? – in that case aria-hidden is what you want to have to save these souls.
    • In terms of look and feel of the app, they are okay with fair bit of changes in the way the app would behave otherwise, to adapt to their needs. All what matters is semantical meaning that is conveyed by the page, overall.
  • Another common issue raised would be “The feature did exist earlier, but was moved later with update to new layout.
    • Moving around stuffs every now and then confuses people with perfect vision. For people who rely on placement of things on the page, shifting things is like playing Hot Cold Game.
    • So please provide easy access to info and config of the object (Object here is any part of the page that has a logical explanation of itself)
    • Do not change the layout pretty often. An ATuser will find it hard and will feel lost.
  • Another issue would be, if all devices doesn’t represent data in a same format.
    • example issue: lack of chronological order in mobile, while computer follows that.
    • People do expect a relation between the behavior of an app in computer and mobile, or any other device. Again the placement, order, and similar logical organization is crucial. For them whether its a computer, mobile or anything else, its all representation of a same set of data.
  • People uses ATs like Dolphin Guide, Jaws, Braille-notes, Dragon NaturallySpeaking, System Access, Window-Eyes, NVDA, Voice Over and more.
    • Its a difficult task to get it right across all of these. But doing it is the only way to get your site accessible. If you hold a huge user base.
  • Provide a Special feedback form for Special Users. https://www.facebook.com/help/contact/169372943117927
    • This one, FB has got it perfect. Its highly customized and made easy for an ATuser to submit a grievance. But still remember, they might not even be able to understand what is happening, other than something is wrong.
  • Understand that an ATuser wouldnot understand what went wrong. Say a comment posted with just an Emoticon in it, and a like button. A user will be wondering what that like button is there for, if the emoticon doesn’t have an alt text or is not read. He wouldn’t even understand that he is in a comment object.

Some basic tips while coding…

  • Every thing that is a list of lists(not just ul-li lists, list here is semantically list), should be made as a tree. With option to skip from list to list. Each list should be provided with proper explanatory label. Don’t forget about I18n, while adding label.
  • usage of Headers should be done properly. Headers should be nested properly.
    • Headers with an improper level, when the Html elements are represented in a tree structure, is a smell.
    • <div>
      
      <div>
      
      <h1><!— third level —></h1>
      
      </div>
      
      <h2><!— second level —></h2>
      
      </div>
      
      
    • is considered to be wrong implementation.
    • AT’s have their own ways to navigate through Headers. So even if you miss to give ‘skip to content’ links, proper Headers will serve the best. Even better that ‘skip to content’ links.
    • eg:  in JAWS, press H to navigate to the next heading
  • By this, what I want to superimpose is the truth that making a site Level AA by an audit is not exactly all, when it comes to accessibility.
  • The scope is way too more, to achieve. And achieving it correct comes with an add-on advantage of easy keyboard access to the site.

Now to Panic, Target Corporation was charged $6 Million as penalty for not being accessible http://en.wikipedia.org/wiki/National_Federation_of_the_Blind_v._Target_Corporation

 

These are just some of them. WIll try to keep this blog updated with things that I learn. Do feel comfortable to disagree, and please be sure to share your opinion. 🙂

References:

https://www.facebook.com/notes/facebook-accessibility/developer-spotlight-a-conversation-with-stefan-parker-user-interface-engineer-at/567184129991983

Internet – Employers and Employees, enhance your IT business…

How can our life supporting stuff of the date – internet – save us our time money and more ???

Websites like odesk and many others have already taken this initiatives to a consultant based job level. Not soon, we can see this in employee based plans, and who knows we all will have to loose our employees shoes and wear a consultants shoes. May be not that far.

Being a software engineer, I was lucky enough to work from home for a couple of months. These are some points that I figured out in this course of time.

Not all software companies require their employees to be at their facility. Instead they can get their service remotely. This is beneficial for both company and Employee.

Company saves,

1. energy, money for hosting a facility, internet, cleaning staff etc etc etc
2. More attendance, as to secure train tickets employees take two days extra of leave for a celebration that has already got some lowed days of vacation, or a friday at office will be mostly people less if the thursday and saturday near it is already a holiday.
3. You wouldn’t talk about recession unless you want to use it deliberately to lay off some of your employees.
4. Rapport formation can be regulated, and project overloading by a race causing problem for other race can be reduced to a bigger extend.

( believe me, that exists in India, say you are in Tamilnadu( a state in India) 85% of your colleagues will be them, and I being from a renowned MNC i would share one instance. My friends who are non tamil have been asked to get out, when they raised their voice against team level meetings happening in tamil ( Tamilnadu’s native language) ! enough ? I had a neat Manager who was Tamil, thus we were safe in all those stuffs mentioned above, but colleagues grouping themselves by language they speak, existed there too. BTW they all can speak English.)

Employee Save, ( More points goes here, as I’m an employee)

1. First, get relieved from the mess of securing the unavailable train tickets ( well tatkal(emergency rail tickets) booking agents will incur job loss! ) towards home at weekend.
2. Don’t need to have a bad talk with supervisor, about securing leave.
3. Of course no body like to be formal in dressing and sitting posture, the way we behave at office.
4. You don’t have to do two times investments, one at city and the other at your native. Doing it at native would do.
5. Saved from the rush of city.
6. Trust me alcohol, cigarette consumption will come down dramatically, and you don’t have to visit a rehabilitation center.
7. With all these, you save a lot in the form of bank balance, just by avoiding unwanted expenditure.
8. If you have problems at your rented flat in City, live water, power or cable or your flat owner himself, forget them and feel at home. Ah! be at home.

Always you all can have a meet up once in every two months or so, and that can be extended with a team outing, which will keep the bonding strong.

And while remote, today we have enough softwares to support us to work in a team. And I have been working that way since last 10 months. All you need is uninterrupted Internet and Power supply, and a sane place to work.

Fed up of this repeating life situation which occurs while in city may happen here too, though in a very very less proportion. But that is what cities are meant for, take a small vacation, or go to cities for a week with your family or nearest person to your heart. Don’t lose your leave days, work in the morning( assuming you have a laptop and a mobile internet connection) and enjoy rest of the day.

Drawbacks:

Togetherness with colleagues will be missed, city night life with friends will be missed. But if you have got a feeling to live with family, these would never be a reason at all. And with more and more companies deploying this facility, you will have your neighbor and childhood friend available after office hours for your bash though he is not working with your company. Some would even love leaving near a calm quite beautiful country side, with a small river flowing by.

High secure jobs, like banking projects at IT companies cannot even think about this. But still a lot of open source based companies at least can follow this.

And Employees, you better make sure you have supportive family behind you. And at those places where arranged marriage happens like India, you may face difficulties finding a girl just because you work from home. No matter how high your position is. But if you are a girl, you will have a good book entry in the marriage market just because you work from home. Well this differences in boys and girls are subject to another blog which I am not going to write now…:)

Hey thanks for reading, and feel free share your views about this topic with us.

Take care,
Sumit.

PhpMyAdmin on Ubuntu 10.10 with apache2 and php5

Let us install PhpMyAdmin on your machine. You know, PhpMyAdmin is the coolest way to view your database, easy to modify, see the table structure and even search around your tables if you have got a hundred of them in a single database. This web based tool helps fasten our development heavily by saving a lot of time. I will oppose this installation only for one reason, coz you will forget how to write an sql query to fetch data. But if you want, PhpMyAdmin gives provision to give query on your own, in it. So let us move on to the installation part.

We need a couple of packages to get this Installation work. Let me assume you have mysql. If you don’t have it, install it first.

Get all required support packages using

apt-get install php5 apache2 php5-mysql libapache2-mod-php5

We are using apache2 to host this web application, and php5, as PhpMyAdmin is a Php application
php5-mysql is the set of libraries that provides the connection with mysql for the php application. libapache2-mod-php5 helps apache compile php code and render html in your browser. Understand, if after the installation is completed and you are pointing to phpmyadmin from browser and the php file is offered for download by the browser, instead of viewing html, libapache2-mod-php5 is not installed well. But if you are sure you have installed it well, then try running

a2enmod-php5

on your command prompt. This is to enable the php module for apache.

Download latest PhpMyAdmin package, unzip it and move it to /var/www/ directory of your file system. This is where the sites hosted via apache are defaulted to.

now we have a directory /var/www/phpmyadmin/ with contents inside the package in this directory.
For more clarity the index file inside your phpmyadmin package downloaded must look like this

/var/www/phpmyadmin/index.php
/var/www/phpmyadmin/setup/

Now I’m going to walk you through the easiest way of configuring your application, but easy means less safe. But for a normal home use this would be enough. Don’t share your sql password with any as your application will be available to anyone who knows your IP address. Create a file config.inc.php

/var/www/phpmyadmin]$ vim config.inc.php

and copy this code into it and make the required changes. That is enter your mysql username and password in the place of your-mysql-username and mysql-password-for-the-above-user respectively

<?php
$i=0;
$i++;
$cfg['Servers'][$i]['user']          = 'your-mysql-username';
$cfg['Servers'][$i]['password']      = 'mysql-password-for-the-above-user';
$cfg['Servers'][$i]['auth_type']     = 'config';
?>

auth_type config is the easiest type to go with a home installation. Save and Exit.

Now go to /etc/apache2/sites-available/ and copy file default to a file phpmyadmin.

 $ cd /etc/apache2/sites-available/
/etc/apache2/sites-available  $ cp default phpmyadmin 
vim phpmyadmin

edit the phpmyadmin file you created now in /etc/apache2/sites-available to look like this.

/var/www/phpmyadmin]$ <VirtualHost *:80>
        ServerAdmin webmaster@localhost

        DocumentRoot /var/www/phpmyadmin
        <Directory />
                Options FollowSymLinks
                AllowOverride None
        </Directory>
        <Directory /var/www/phpmyadmin>
                Options Indexes FollowSymLinks MultiViews
                AllowOverride None
                Order allow,deny
                allow from all
        </Directory>

you dont have to copy this and paste, instead just go to your phpmyadmin file and edit DocumentRoot to look like the above, that is let it direct to /var/www/phpmyadmin, your application’s root path.

Rest in that file is itself a matter for a blog, but not this time. Coz now your phpmyadmin is waiting for you.
Direct your web browser to http://localhost/phpmyadmin

Have happy time with Mysql!!!!

Git Commit

While I was trying to commit the code to my GitHub account I started getting a strange error. After tweaking around a while, surfing through a couple of websites, I got these steps. And these steps solved the issue.

Have a look at the error: ( If you are getting the same error, proceed to read the rest of the blog.)

blogger$ git push remote master
fatal: 'origin' does not appear to be a git repository
fatal: The remote end hung up unexpectedly

Now the fix
running the commands listed below, did the thing for me. Running this once will do for the session of the terminal.

git notes --ref=bugzilla add -m 'bug #15'
git log --show-notes=bugzilla
git log -1 --show-notes=*
export GIT_NOTES_REF=refs/notes/bugzilla
git push origin refs/notes/bugzilla
git push origin master

Now every yime you want to commit the code just run

git commit -a -m "your message"
git push origin master

Enjoy sharing your code! 🙂

Coding Migrations ( Ruby on Rails )

I’m noting down some of the points that I come across while learning rails migrations

Migrations should not be repeated, and each migration should have coded delete for all that was created.
ie, in a similar way when we create a migration, there is a self.up and self.down defined in the Migration class, we should also create self.down for all sort of creations or insertions into the database via Migrations.

While implementing a HABTM ( has and belongs to many ) relationship, the intermediate database that serves as the link between two databases with HABTM should not have PRIMARY ID. To make the database table without primary id we should code the Migration file like this…

class BlogsTags < ActiveRecord::Migration
  def self.up
    create_table :blogs_tags, :id => false do |t|
      t.integer :blog_id
      t.integer :tag_id
    end
  end

  def self.down
    drop_table :blogs_tags
  end
end

Here, we are connecting two tables Blogs and Tags with HABTM relationship.

by naming convention Blog comes first to Tags, so the name of the intermediate Table should be Blogs_Tags
:id => false , makes the table without PRIMARY ID ( this is mandatory for an intermediate table of a HABTM relationship.

Why self.drop is important ?

Migrations are made with filenames specifying the time of creation of a Migration. Rails is providing us facility of reverting back actions we have done on the tables using that datetime. For that purpose, rails adds self.drop method which tells how to revert back. While we are creating Migrations by ourself coding, we should also write the code in self.drop to revert all actions we have done on the database, so that rails can help us rectify any error.

Proprietary Mac

Apple, the most widely accepted computers and systems in US, is the least accepted system in India. Their Mac policies are well know to all. Especially when it comes to i-Phone and i-Pod. I being a programmer who is learning android and iPhone Programming is very upset with Apple ideas of business. iTunes is the very application used to sync their iPhone and iPod. For US people who mostly prefer to own a mac itself, it doesn’t make a difference.
But if they have to sell the same in India, Indians are no way going to buy a mac , just so that they can sync their iPhone and iPod.
Thats why they provide iTunes for Windows. It’s not only about showing the mac beauty to windows users, but also , a method to market iPhone and iPod.
I don’t have any problem until here.
But the thing that they release iPhone sdk for mac only, is irritating me a bit.
Because i want to be an iPhone programmer, and now it compels me to buy a mac, that i cannot afford, as a beginner. The thing we have to keep in mind is that, all other sdks, like, Android, Palm Pre etc are available for Mac.
News are coming that iPhone market is getting more and more particular, and thus, more and more apps are getting rejected from the iPhone Market.

I only want to ask – is Apple thinking – ” If you want to make money with Apple, then just pay us a tribute of money first.”

But a comparison of market rates of Mac Book, US and Indian, shows a difference of 10,000Rs ( 217 USD ).

At least bring down the rates Steve.

Setting up a github project: A-Z

Setting up a github project

First create a github accound accross your gmail(my preference) account.
Now go to your Dashboard at the top part of your account home page.
you will see a link for “Create a Repository”.
Click on it.

Project name is the name you assign for you project, prefer it to have no white-space.
Description – fill it as descriptive it can be.
Now, create Repository.

Now, in your home page you can see “Public Repositories” and your Project Listed below that.
Click on the Project.

You will see two URLs namely, Public Clone URL and Your Clone URL.
Now we want this Your Clone URL, which will be

git@github.com:username/ProjectName

Now we are going to set the project on our Machine, which i am assuming to be kUbuntu9.10 for the time being.

Before that let me tell you something,
GitHub is highly secured and follow ssh-rsa
So we need to setup as ssh public key for our connection, and let github know about it.

take terminal and as user ( not root, usually many of us have a habit of typing sudo su as the first command at terminal, this time avoid it)
type

ssh-keygen -t rsa -C "yourmailid@gmail.com"

here key is generate against your mail id as a string

Here,
-t -> tells which encryption
-C ->try to use the same mail id you have given to github (for ease of memory)

now you will get two files
id_rsa and id_rsa.pub in ~/.ssh/

now copy the whole content in file id_rsa.pub without altering the content of the file.

Now go back to you github account.
go to account settings >>> SSH Public Keys
Add a new Key
and paste the content you copied into field “key” and save (give a title of your choice).

now github know to process the requests from your system.

now try

$ssh git@github.com

this must return

PTY allocation request failed on channel 0              
ERROR: Hi UserName! You've successfully authenticated, but GitHub does not provide shell access                                                              
                 Connection to github.com closed.

ignore this error, that is not an error.

but make sure , it shows Hi! UserName

okay! now we are going to set the repositories local copy on our machine and reflect changes at the remote system

make a directory ( as user, not root )

mkdir MyProject
cd MyProject
git init

( initialize an empty git repository there, see for a hidden folder .git/ there.)

after creating files in MyProjects, when you feel like adding it to your repository at github, do

git add

now run status and check the files you are going to commit next,

git status
git commit -m "Your comment about this commit"

( this updates .git/ folder in your local repository )

now we tell git about the remote repository to be updated

git remote add origin git@github.com:username/ProjectName

( you remember from where we got this URL, its Your Clone URL )

git push origin master

now we are done.
Go and check your github account, and the project in it,
You will see new files, and changes in the existing files, reflecting there.
Now explore more about Git – the fastest Subversion system.

My GNUstep user Suggestions

I prefer using GNUstep with Kubuntu9.10
It fits well

Kate – Text Editor is having pretty good sync with Objective-C
even though there is no code suggestions as far as i understand, but, if you use NSString once , you will get it on suggestions with CTRL + SPACE

Also vim is having good sync with Objective-C

both give code color identification for Objective-C.