Tech Talk

Linux, Python, E51, Scripting…

Archive for the ‘rambling’ Category

RC Files?

without comments

A friend of mine asked me “What is RC in RC Files?”. What is it anyway? I did some googling and some tcl wiki pointed me to this link. So RC actually seems to stand for run commands. I’ve been using them for about 4 years now but never once wondered why they are called so! Interesting learning for the day.

Written by abiya

September 1, 2008 at 9:11 am

Posted in rambling, technical

Tagged with , ,

How not to write software

with one comment

No, this is not another preaching or top ten tips or anything. This is about something I loved when I first understood it, felt people didn’t know to use it when I started using it and now feel is a bad design example. There are two facets to it : the windows registry and the nokia pc suite.

I knew about windows registry when I first started learning Visual Basic about 8 years ago. It felt exciting. You could actually register a service and some client could look it up and use much like the today’s hyped WSDL and SOA stuff. I was not a programmer then. Was just another curious kid trying to understand what my machine has installed.

After a while, I came across a whole lot of demo software that you could continue using by changing some entries in this registry. I felt that the programmers of these tools were missing something, or the entire idea of a demo is just a hype. Again it was too early for me to say anything about this. I just did not know enough of the software business then.

About three years back, I picked my first Nokia mobile phone. It came with this software called PC suite. At that time, I was as excited about it as I was about using windows registry. This was a time when I just started using linux. I used to regularly login to windows since I was not entirely comfortable with the toolset in linux and this nokia pc suite did not ship a linux version. It still doesn’t, but that is another issue.

But the pc suite experience left me wondering if it was written by software programmers. I was working in a software outsourcing co at this time and did understand something about software design and principles. But I found pc suite application very stupid. I seemed to eat a lot of my machine’s resources while trying to sync contacts with my phone, or transferring images from the phone. I have many times cursed the app and quit without doing anything.

Last week when I picked E51, the pc suite developers proved their capabilities. Pc suite wouldn’t install because the previous PC suite version was not completely uninstalled. WTH, you wrote both the versions, won’t you know how to upgrade between them? It left me irritated. I even thought I’ll return the phone to nokia and request them to hire some software engineers to do the user installation end of stuff also.

The issue : PC suite makes one million entries in various names across the entire registry making it almost impossible to remove them all. In fact, it must have gotten so out of their hands, that they even had a PC suite clean up application! Can you beat that? Anyways, after a couple of registry edits a lot of curses and about three restarts, the thing finally worked. Now I understand why they don’t ship PC suite for linux. You perhaps can never make it so complicated. Windows registry and Nokia PC suite combo is one perfect example for a “spaghetti pattern”, an anti-pattern that most software guys try to avoid. Do they really?

The reason for irritation has its seeds elsewhere. I have not used windows a lot in the last two years. I have a debian dual boot and am loving it. Installing something in linux can get just as painful, but most of the times, the issue is just unresolved dependancy. Rarely unresolvable. But in windows, they neither tell you what dependancy failed, nor what you can do to resolve them. You need somebody who speaks in “registry” to resolve the issue. Maybe this is because I don’t develop in a windows environment, but the user friendly part is totally lost. Why else is anyone using windows?

Blogged with the Flock Browser

Tags: , , , , , ,

Written by abiya

April 17, 2008 at 4:40 am

Firefox 3 is impressive

without comments

I have this age old machine in my hostel room. It is a 800MHz Celeron with 256M RAM. That is a good combination for CLI guys like me. It runs debian sid. Its primary purpose is documenting work over night, practicing a couple of scripts, occasional programming and movies. I use the gui only when browsing shares over dc, internet and movies. For movies I use no window manager. Default WM shifts between icewm and fluxbox.

I have installed iceweasel and dillo from the repository. Using iceweasel used to kill my machine. I can’t open a second tab and the machine resource monitor graph is mostly clamped to the top 98%. So, you know what time I spend on the internet after I get to my room.

Anyway, last weekend I downloaded firefox 3. Believe it or not, I am able to run firefox 3 along side django test server and emacs without saturating the machine resources. And even otherwise, I am able to have at least 3-4 tabs simultaneously open on my machine. I almost can’t believe this. Now I am really wondering if I ll update my firefox 3. I am just scared it might become memory hungry when they finally release it.

Blogged with the Flock Browser

Tags: , , ,

Written by abiya

March 13, 2008 at 11:01 am

Mind Maps

with 2 comments

I am trying to learn and use this technique for problem solving for some time now. I’ve heard quite a few people say that it works great and all that. Maybe it does. I don’t have enough data to substantiate either way. Today I stumbled upon this useful web tool that can create a mind map for you online. They call it bubbl.us. Maybe you’ve heard of it or maybe you are already using this, but this is entirely new to me. I just created my first mind map of things that I need to complete this month. I am not posting it here, because it is as chaotic as my thought process. Good, that gives me confidence that I have mapped my mind (mindlessly).

Blogged with the Flock Browser

Tags: , , ,

Written by abiya

March 12, 2008 at 12:13 pm

Posted in rambling, technical, web

Offline Blog Editors

with 3 comments

Had no internet yesterday. And this is not the first “no-internet” days after I changed my ISP. Incidentally, I changed the ISP because of “no-internet” weeks. Anyways, this no-internet day seems to do me some good. I was really wondering how people on the move with laptops and mobiles for internet manage to blog, if they do that is. There had to be some offline editors such that you can publish when you have a connection..

I was not alone and there are people who have thought on these lines. Some links I found are here and here.
And with google I found these tools.

Each has its own set of goods and bads. Just trying out drivel, bleezer and scribefire. Qumana is for Mac and Windows, neither of which I use now! Should see what I end up with. Wondering if it is any good to try and write my own offline blog editor, for the heck of it ?!

Blogged with Flock

Tags: , , , ,

Written by abiya

February 28, 2008 at 4:58 am

Posted in links, rambling, technical, web

Ciao Netscape

without comments

It is not as though I feel strongly about netscape being brought down, but it certainly is a bad feeling. Netscape was the only browser I was using when I had my first PC. Internet explorer was already shipping as part of Windows at that time. It was about 1996-1997 when I got my first PC and about 98-99 when I got the first dial-up connection. I was running Windows 98 at that time. I distinctly remember using Netscape 4.7 communicator and the mail client to receive Yahoo mail. I remember y! was allowing pop access those times.

I faithfully followed netscape to 6.2, and then to some 7 or 8. Until a couple of months back I was using Netscape 9 on linux. Although, 9 is more or less firfox 2.0, I felt good about netscape for no apparent reason.  Anyway, now it is flock on linux and firefox on windows. No, there are no reasons for the choice.

Anyways, ciao netscape.

Blogged with Flock

Tags: , ,

Written by abiya

February 23, 2008 at 7:11 am

Posted in rambling, technical, web

@LIBICONV@ trouble

with 3 comments

I was trying to compile and install pcb from source on my centos installation when I began running into all sorts of weird errors. The package requires to have gd library installed. I didn’t bother searching for RPMs and decided to install the library too from source. I guess that was where the trouble started.

The installation of libgd itself was painless. It would configure without errors or deps, compile and link also well. ‘make install’ seemed to work well too. It had copied the library to my prefix properly. But in all this, a rather simple regex-replace failed to work. I had not researched to where the failure happens (configure or install). The library creates a gdlib-config script that will be used by other libgd dependant packages for their linking and include referencing. This script seems to have used place-holders for detected libraries like @LIBICONV@ for libiconv. I don’t know if I have included iconv support. At least libgd didn’t seem to mind the absence. But inspite of not minding the absence, the place holder had remained in the script much to my annoyance.

While configuring pcb, it would complain that my installation of gd had no jpeg/png/gif support or my libgd was too old! Neither was possible : libgd was just downloaded from its hosting site; configure of libgd announced that I had configured to include jpeg/png and gif support in my compile. When I viewed the config.log for the causes, it would have failed because gcc would have a -l@LIBICONV@ flag and failed not finding the library. Well, quite obviously lib@LIBICONV@.so is not there on my machine.

I grepped the entire pcb source code to see where this particular library was getting referenced.. In vain. I reinstalled gd about three times. Funnily, each time I tried running gdlib-config but not ‘gdlib-config –libs’ even once!! After about six hours of fist-fighting with the machine, a round of cursing the pcb authors, centos maintainers, myself for being so oblivious of such ’simple’ things and another couple of hours later a little bulb flickered! I tried every option with gdlib-config command to find that gdlib was making such a ridiculous reference! Cursed myself another time for not trying hard enough and edited the gdlib-config shell script to remove the reference. Now pcb is all installed and working fine.

Ironically, this problem didn’t occur in the RedHat EL4 machine I tried to install pcb on. It did not have any -liconv, so @LIBICONV@ got removed somehow!

Written by abiya

July 9, 2007 at 1:30 pm

Posted in c, centos, pcb, rambling, technical

Abcissa and Ordinate Components

without comments

I was helping a friend of mine construct a simple robot to plot some characters written in a text file or just follow a random scribble updated-live between the robot and the paint tool used. We were only at very higher levels of abstraction because how-on-earth-will-you-get-the-actions-done-in-paint is certainly an unanswered question.

But doing this excercise just gave me another point that I never seemed to use all this time. It is nothing we have not known so far. Components of a vector along the axes of interest. One of the things I am interested in doing includes assembling a robot that would move about like one of us in a workshop floor. Only I want to do this without all that complex research done all over the world. Ridiculous, isn’t it? (By the way, I meant my thought is ridiculous and not the research work done!)

One of the problems I faced in my project work was passing on the control information to the robot over a wireless link. I had not thought about/read research papers on how to do this in an efficient manner. I was trying to send the entire bit sequences to keep the motor rolling! But there seems to be better ways.

Suppose I generate a constrainted box in my application and map it to the space that my robot will move about in. Then all I need to send over the link is just some binary representation of the component angle. Since I mapped the space onto my application, I can hardwire all the other constants such that any binary sequence read in will cause the motors to move such that the robot itself moves in that angle.

Now the question remains, how-will-i-hardwire-computation on a pcb?? I don’t plan to by FPGA kits!! Let me see. Maybe there will be an easier way out to do this too. Or probably an easier way to do the entire thing. How much easier can easier get without doing any research??

Written by abiya

January 5, 2007 at 10:47 am

Characterestic Plots

without comments

Current or Voltage characterestic curves of transistors were introduced to me as early as my twelfth standard. There were other curves, heat transfer et al, that were taught in physics text books for a major part of school. But, in school we just used to laugh our heads off when the teacher displayed a graph and explained something. I don’t remember even one graph that made sense at that time. The trend was similar all through engineering classes. The plots/graphs made no particular sens, at least because we never chose to make any sense out of it.

One primary reason for this, I would say, is the way some of us did our lab work in school. When we had to obtain a characterestic curve, the text book told us what they looked like. More often, we plotted a curve, picked the points and fitted the observation!! I hope my physics teacher is not reading this. Some time in engineering, we used some part of this technique to get satisfactory graphs! Even otherwise, this is way easier than doing that experiment correct enough to get believable curves.

Last week, I had to obtain an estimate of the current flowing through a pMOS device for a particular lab work. For the calculations part, we used a simple model. This model needed me to identify the region of operation of the device. The trouble started here. I was trying various references to figure out a way to do this. My teacher suggested that I use the Vds – Ids characterestics for a pMOS transistor. Of course, I set up the simulation and got the curves and located the region of operation to be saturation due to pinch off.

So, why am I writing all this? That was the first time I used a characterestic curve of any kind known to me! Maybe, I should get back to all those physics and engineering text books and redo the stuff to see if the curves have other significant points missed in ignorance!!

Interestingly, I could have done the same with some theoretical reasoning also. The current equation uses a voltage which is the minimum of three possible values – triode, velocity saturated or saturation due to pinch off. The plots suggest the same too. Now, I know why I will remember the characterestic curves of devices I use.

Written by abiya

September 5, 2006 at 2:42 pm

Posted in rambling, technical

A Quest to understanding Humanoids

with 2 comments

Ok. My Manager used to repeat a question (he was an image processing person for a long time) about the understanding implicit to the human brain. It was this. Show a four year old kid a toy model of a car, tell him it is a car and that kid would just as easily identify all the other road going vehicles as a car. Mind you, he might never call a two-wheeler a car. Maybe he would call a HMV lorry as a car. This, according to him, is a major image recognition problem. How on earth did that kid relate a toy to all those monsters on the road?

I was dweling on this question for some time. Though I am not thoroughly an image processing guy, there are portions of this science that I wish to master and which I believe are perfectly related to robotics as a whole and humanoid in particular. Yes, Machine vision systems. I don’t very much know how all those humanoids already built recognize whatever they do recognize. But, is it someplace possible to mime the way a kid understands and learns something? This is precisely what I ve begun studying now. I haven’t gotten too far yet. Primarily because, I not a student of biology and I don’t quite understand the idea of neurons and their communication paradigms completely yet!

On the other hand, I was attending some lectures on gene mapping. Nothing related to what I do, alright. Some lectures could give insights on how protiens are formed from the huge gene pattern etc.. Again I can’t express much here because of my poor grasp of the subject. But, there could be simpler engineer’s explanation of the whole thing. After all, the last cell is a bunch of some atoms, right? So, a particular group of atoms in particular combinations and conditions emulate what we call “life”. So, can there be a definition for life, in terms of chemistry and physics instead of a whole lot of philosophy? Is there anybody working in these directions? I should love to be there and work along to understand this in its primitives. For, that can surely answer my above question and many more road blocs in constructing a true humanoid. Are there know road blocs to constructing a humanoid, by the way?

Written by abiya

March 14, 2006 at 7:52 am