The curse of QWERTY

August 6, 2014 at 6:37 pm | Posted in art, community | 1 Comment
Tags: , , , , ,

An year back I started having pain in my hands, wrist joints, finger joints, neck and upper back. I searched about it and came to know lot of programmers face this and for some of them this pain turns into Repetitive Strain Injuries (RSI) or Carpal Tunnel Syndrome . This was serious . The height of chair and monitor and keyboard were pretty right and I did not feel any problem with that. Then the biggest surprise came in the form of DVORAK keyboard. I came to know that QWERTY keyboard was actually designed to slow down typing. You should check out DVZINE at http://www.dvzine.org/ . That is just one website with few solid articles. The problems with QWERTY keyboard are mentioned at so many places on internet that it is even difficult to count those sites. OWERTY is such a disgrace for humanity and I am amazed that with so much advancement in technology we still manufacture QWERTY keyboards. I came across so many different keyboard layouts: Colemak, Workman and Norman among the popular ones. I like to improve myself and the pain in hands, finger joints, neck and upper back was much of motivation to try something. I chose DVORAK above Colemak and Workman because latter two were based on QWERTY. I think one can not design a new and better model to solve a problem if its design is based on a faulty old model. Norman layout I could not find on Arch Linux. In India only QWERTY keyboards are available (as per hardware availability), so the only option was to change software and Linux has so many possibilities and options that it made me more happier. You do not need to change hardware, just some settings as per your distro. I have logitech wireless K260 motherboard and I decided to change the placement of keys on keyboard manually to DVORAK along with software settings. This is how it looks like:


As you can see every key was a fit for every other socket except these four: F, U, J and H. These four keys were fitting only in their original positions, I don’t know why. Hence I put handmade stickers on them and this is how my keyboard looks now:

Using this for 3 months now and pain in hands and finger joints is gone. Neck and upper back pain have reduced to a much larger degree but not totally gone. All these parts pain a lot if I sit for longer hours in front of computer (6-9 hours or more). I am not a doctor and you should consult a doctor if you are experiencing pains then please do not postpon a modical checkup. Here aro some points that may help:

  1. make sure monitor is at a height from ground where your neck is straight when you look at it
  2. make sure your chair has cushion and flexible back support. You can adjust the height of your chair to a comfortable level.
  3. Keyboard and mouse need to be at comfortable height and distance

The best option is to find a good computer table according to your height and build. It is very easy, you know your comfort level within few seconds of sitting on that chair and putting your hands on table. Please do not type (for Desktop Computer) while sitting on bed. It will cause lot of discomfort for many days.

There are many scientists/researchers/gvernment-organizations who after doing lots of research have concluded that all these alternatives like DVORAK, Colemak, Workman, Norman etc do not offer any advantages over QWERTY because human mind can adapt to any random pattern of keyboards, that a person can type as fast on QWERTY as on any other random pattern. Well that may be true and I can agree to that and I do not give much damn if my typing speed is 20 wpm or 50 wpm but what about RSI and Carpal Tunnel Syndrome ? I am using DVORAK from 3 months now and one day I just wanted to try QWERTY again to see how it feels. It was horrible experience to use QWERTY again. My hands were literally moving from one corner of keyboard to another (diaognally) causing mugh stress and pain in fingers. With DVORAK most of the words (of English language) exist on Home Row and hence there is not much diagonal movement of hands when you type. My mind did not forget the QWERTY layout though but that one hour was torture. I switched back to DVORAK and till date never tried that again. Though I face problems because keyboard is changed at Operating-System level(software level) than hardware level. So, when I have BIOS or a bootloader at my disposal then it behaves like QWERTY keyboard because this is what it is as per hardware construction. But this is a minor isssue compared to 99% of my time which I spent in OS than in BIOS/bootloader.

 


Copyright © 2014 Arnuld Uttre, Village – Patti, P.O – Manakpur, Tehsil – Nangal, Distt. – Ropar, Punjab (INDIA)

Verbatim copying and distribution of this entire article are permitted worldwide, without royalty, in any medium, provided this notice, and the copyright notice, are preserved.

Humbleness of comp.lang.c folks

June 26, 2013 at 4:06 pm | Posted in Programming | Leave a comment
Tags: , , ,

I mostly hang on comp.lang.c and sometime discussion go deep into technical details of C language while solving a current problem. At comp.lang.c, folks do not go into details for the sake of details but to solve a particular problem. I got stuck in some issue and was continuously referring to comp.lang.c and then to K&R2 and then to H&S5 and I discovered one error in H&S 5. Actually I did not even know this till Keith Thompson credited and mailed me on the discovery (he mailed Harbison too). You can get the original post at googlegroups or velocityreviews . I thought it is better if I share his kind and humble words here on my blog (I am kind of quite late to post this but better late than never :) ) :

Credit for finding this error goes to Arnuld Uttre, whom I’ve cc’ed on this e-mail (if I got his address right). It came up in a discussion on comp.lang.c, subject “strtoul() behavior”.

I have a first printing of H&S 5. On page 413, in the discussion of thestrto*() functions, it says (any typos are mine):

If no conversion is possible because the string does not match the expected number model (or is empty), then zero is returned, *ptr is set to the value of str, and errno is set to ERANGE.

In fact, errno is not set in this case. See C99 7.20.1.4p7:

If the subject sequence is empty or does not have the expected form, no conversion is performed; the value of nptr is stored in the object pointed to by endptr, provided that endptr is not a null pointer.

A quick experiment with one implementation shows that errno is in fact left as 0.

(A very small quibble: though the previous page mentions that ptr is ignored if it’s null, it might be worth changing “*ptr is set to …” to “*ptr (if it’s non-null) is set to …”. This is not actually necessary, but in my opinion it would make it slightly clearer.Feel free to ignore this.)


Copyright © 2013 Arnuld Uttre, Village – Patti, P.O – Manakpur, Tehsil – Nangal, Distt. – Ropar, Punjab (INDIA).

Verbatim copying and distribution of this entire article are permitted worldwide, without royalty, in any medium, provided this notice, and the copyright notice, are preserved.

The Programmer Hierarchy

March 17, 2013 at 11:09 am | Posted in community, Hacking | Leave a comment
Tags: , , , ,

Recently I came across a chart created by Luke Welling showing programmer hierarchy. Seems like Luke Welling has pencilled facts:

chart-Luke-Welling

I googled for ‘Programmer Hierarchy’ and came across another chart by Dmitry Ignatiev. Thougdt I needed to share this too

chart-Dmitry-Ignatiev


Copyright © 2013 Arnuld Uttre, Village – Patti, P.O – Manakpur, Tehsil – Nangal, Distt. – Ropar, Punjab (INDIA). Copyright does not apply to charts shown here. Please contact authors for copyright terms of respective charts.

Verbatim copying and distribution of this entire article are permitted worldwide, without royalty, in any medium, provided this notice, and the copyright notice, are preserved.

Why every C or C++ programmer must know pointers

March 4, 2013 at 9:00 am | Posted in C++, Programming | Leave a comment
Tags: , ,

Some computer science engineering students once asked me why it is so important to know about pointers in C and C++. They complained (and almost every computer programmer in industry complains) that pointers are so hard to learn and they can’t see why they should work so hard. I was travelling in MMTS (Local Train Service in Hyderabad). MMTS service uses several trains and compartments in few trains have a LED-Box where the name of railway station is displayed before train is about to reach the same. And here is how it shows railway station name sometimes :





Do you see the name there ? Those letters which look like boxes and Ys with tildes above on them are actually memory corruption rather than English language. Now I can guess the program must have been written in a language where programmer had to do memory management himself. Since it is a LED-Box, it must be a C or C++ prgram in embedded environment. This is a real-life result of not knowing how to respect memory constraints. My best guess is either prgroammer has some dangling-pointer in his code or he must have an array-overrun (a.k.a Buffer-Overflow). Imagine these situations:

  • Your C++ program does financial transactions for some company e.g. distributing salaries to its employees and your program uses a dangling-pointer to set salary amounts. With this dangling-pointer the CEO might get salary of a blue-collar worker or vice-versa.
  • Your C program is used in controlling a weapon like firing, pausing, continuous 20 seconds firing etc. With buffer-overflow gun may fire for 20 seconds continuously when you press pause.
  • Imagine your C program controlls a satellite orbiting around Earth being controlled from base station somewhere on Earth. Memory corruption can cause satellite to move left instead of right or even stop its motion or may burn all of its fuel while it orbits non-stop at full speed around earth.

These are some of the not so serious consequences of not knowing pointers. So, if you want to write correct C and C++ code, learn howe to use pointers. Yes, they are hard to learn and more than hardness, pointers requires experience. It is a very useful skill that will reduce debugging sessions from days to hours. Kernighen and Ritchie said in the preface of their book “The C Programming Language” printed in 1978 that C wears well as one’s experiecne with it grows. When 2nd edition was printed in 1988 (affectionately known as K&R2) they said they still feel same about C with decade more experience. They had a point (they had pointers in those 10 years ;) ). Experience makes a good C programmer and you achieve that by following the footsteps of masters. In order te be a brilliant C programmer, You need to follow brilliant masters. Start with c-faq.com


Copyright © 2013 Arnuld Uttre, Village – Patti, P.O – Manakpur, Tehsil – Nangal, Distt. – Ropar, Punjab (INDIA).
Verbatim copying and distribution of this entire article are permitted worldwide, without royalty, in any medium, provided this notice, and the copyright notice, are preserved.

GNOME 3 – Reincarnation of User Interface

January 17, 2013 at 9:08 am | Posted in community, Programming | Leave a comment
Tags: , ,

I am using Stumpwm from last 2 years and a month back I came to know about GNOME 3. Little bit googling will tell you the kind of harsh and brutal criticism GNOME 3 developers have received for their new ideas. MATE and Cinnamon have come out of that criticism to preserve traditional desktop look and feel. So what is this new interface in GNOME 3 ? Well you can read HIG (Human Interface Guidelines) of GNOME project, I am here to talk about practical aspects not mentioned anywhere but have come out of my own experience of using GNOME 3 for few minutes. I order to explain that you need to know something about dektop and window managers.

I am not a fan of desktop. I focus on work I need to do and then find methods to accomplish the task in an effcient and faster way without wasting time and energy. This way of thinking had pushed me from Desktop to virtual WMs (window manager), virtual and floating WMs and then to pure tiling WMs. Hence I travelled from KDE, GNOME and Xfce few years back to Fvwm, windowmaker and then to wmii, xmonad and now to Stumpwm and Ratpoison. Still I keep an eye on how different technologies develop in software world and that is how I came to know about new developments in GNOME 3. As per the viewpoint of an average user there are two kinds of interfaces you get on computer: an ugly, hard to use, anti-user black command line and a beautiful, cozy, pleasing and user-friendly graphical-interface a.k.a desktop . Almost all average “Joes” love desktop as it works faster for them (in fact, it is actually opposite). Come to Linux world, we have desktops too, unlike all those average Joes believing otherwise. A desktop usually has menus, folders, windows, icons, supports atractive features like drag and drop, openeing a document/file/folder by double-clicking etc. On Command-Line you have to type commands to do anything and you don’t get icons, windows, menus and or any fancy stuff requiring graphical interface. These are two opposing ways average Joe thinks computers are. Come to Linux world again, here we have X Window System on the top of which a desktop runs. X Window System is the first graphical interface. What I mean by that ? X is the base on the top of which any graphical interface (or GUI) runs as far as Linux is concerned. While Windows XP users only have one kind of desktop, Linux has several as per the likes and needs of the users, GNOME, KDE and Xfce etc. This kind of design gives a lot of flexibility, power and control to Linux users. Like I mentioned earlier a desktop environment consists of several components. Along with menus, icons, panel etc., it has a window manager and a file manager (check Wikipedia for full list). What most users want is to do the necessary work and then get on with life e.g one person wants to write an email and hence uses a browser, one wants to watch a movie, one wants to his office work and others just want to browse the internet and many want to do all of these (and that includes me too). So, they need something which is simple, helps them do tasks in an effective way and finishes tasks fast. That was my motto and that pushed me towards Linux after I was mentally tortured, made insane and almost killed psychologically by Windows’s virus problems, frequent slow downs, weekly-installations and loads of other crap that every Windows user has experienced. Coming back to Linux, now if there is a way to finish the tasks faster then that means current way of doing work must be inferior because if you already doing what is best then there is no way you need anything else. There is another way of saying this: you are doing tasks in an effective way and there is always room for improvement and there is lot of room if what you are doing is being done same way from a decade. . I think that is exactly what GNOME team was thinking when they were lying the foundation for GNOME 3. What is this new foundation ? For that I need to explain tiling WMs. In a tiling WM (I use StumpWM) there is no minimize/maximize/resize when it comes to your windows (when you open an application e.g a video player then it opens in a window. If you open 2 applications e.g. video player (lets say VLC) and a browser (lets say Firefox) then you got 2 windows, Firefox window and VLC window). In a usual desktop you can minimize/maximize/resize any window and each window will have buttons to do that including a button, which looks like leter ‘x’, to close the window, usually these 3 buttons are in upper right corner of a window). A tiling WM does not provide any of these facilities, windows will always be maximized and no buttons. Tiling WMs are based on concept that a user wastes too much time in minimizing/maximizing/resizing windows, changing their locations and sizes across the screen and they are right. Screen is divided into panes, like a Paned-Window, and you will have one window in one pane. There are no menus, no icons, almost nil mouse support (yes, no left-right clicks and tricks), tiling WMs are keyboard driven. You want any application then know its name and run it as a command and you will not waste your time in trying to find it inside menus or searching pseudonym driven icons/shortcuts and finding where that shortcut points to when you accidentlly loose one. When you sit in front of your computer then most of your attention should be on your work, not on distractions and pure tiling WMs make you do exactly that.

Sadly almost all people use desktops and waste their time and energy on icons, menus and mouse-clicks. Whole software industry is based and competing on who gives more desktop-eye-candy. Like high-school kids, users keep on eating those candies and spoil their teeth (brain in our case). Tiling WMs have a short learning curve and that takes some time (toook me a month to replace my desktop with StumpWM) and not everyone likes empty screens and black backgrounds. So, something was needed which could bring the usability of tiling WMs and pleasing-candy feelings of desktop under one roof and that is what GNOME 3 did. you can’t minimize a window in GNOME 3 ()it does not have those buttons) and it has no panel. Each Window is maximized, It does not have right-click menu on desktop. GNOME 3 does not have a menu and you can still find list of all of your applications and settings there, it does not have Home icon but it possesses a file manager for your tasks. GNOME 3 has been criticized by lot of people, even Linus Torvalds finds it a mess . I say GNOME 3 will change the way desktop will be looked at and used, GNOME 3 has redefined the word usability and it has put that word back into desktop. It has combines the effectivemess, speed and usability of tiling WMs and user-frindliness of desktops. There are many desktop UIs already developed for your desktop computers and many will be developed in future. The only difference is inbetween past and future desktop UIs lies GNOME 3. GNOME 3 will pave the way for future desktop UIs. I am using computers from last 10 years and WMs from last 5 years and in last 3 years I tried to use different desktops but could never use any for more than 2 minutes. Now I am using GNOME 3 from 2 weeks because GNOME 3 is not just a desktop, it is the reincarnation of desktop. I see that desktop is moving from traditional way (eye-candy) towards more usable way (tiling WMs) and GNOME 3 team has shown us the way. GNOME 3 team is decade ahead in innovation, is solving practical problems and I think it needs a well-done pat-on-the-back from me at least for their great work :)

 well-done-gnome-3


Copyright © 2013 Arnuld Uttre, Village – Patti, P.O – Manakpur, Tehsil – Nangal, Distt. – Ropar, Punjab (INDIA). Image produced above is a modified work of art (originally taken from Wikipedia) and hence released under the license mentioned at http://en.wikipedia.org/wiki/Thumbs_signal

Verbatim copying and distribution of this entire article are permitted worldwide, without royalty, in any medium, provided this notice, and the copyright notice, are preserved.

Next Page »

Blog at WordPress.com. | The Pool Theme.
Entries and comments feeds.

Follow

Get every new post delivered to your Inbox.