Showing posts with label technology. Show all posts
Showing posts with label technology. Show all posts

Tuesday, November 26, 2024

Silk Route



Looking back at where we came from and where we stand today, it’s truly fascinating!  


There was a time when trade meant traversing vast continents on foot, braving harsh terrains, and risking lives and goods to connect with distant lands. Merchants on the Silk Route faced bandits, unfamiliar cultures, and relentless challenges. Yet, their determination bore fruit—they returned home enriched, not just economically but also with stories, knowledge, and connections that shaped civilizations.  


Now, the landscape of commerce has shifted entirely. Sitting comfortably in my chair, I can browse, click, and order almost anything from across the globe. A few days of waiting is all it takes for the item to arrive safely at my doorstep. It’s efficient, convenient, and astonishingly seamless.  


But this hyper-connectivity comes at a cost—we miss the human touch. Transactions today often lack the face-to-face exchanges that once fostered relationships, trust, and shared experiences. Perhaps, in our race for convenience, we’ve left behind the essence of connection.


Thursday, January 12, 2012

Laptop battery maintenance

The well known tips for maintaining laptop battery is to allow full charge of the battery, and remove the power. Use the laptop till the battery is drained and recharge to full again. Watching the battery usage is difficult and hard to switch on and off. Instead the system should have taken care of this. The charging should be cut off once 100% charge is done. Same way, when the battery runs low below a threshold, power flow should be switched on.

Hope we will have this in future.

Saturday, August 20, 2011

Hint for sudoku

I keep playing sudoku at http://www.websudoku.com Most of the time I solve the puzzle easily. There are situation where it is difficult to make any logical move. We get stuck without able to post numbers in any of the cells.

In such cases, I usually fill all the empty cells with the probable numbers that can fit in that cell. For eg, I place the numbers 278 if these three numbers have a chance of being placed in a cell. With all empty cells having such probable numbers, it is easy to apply some deduction logic to narrow down the correct numbers.

Filling in the probable numbers is a tedious task. I came up with a simple java code that would help in filling the numbers (just the hint, not the actual answers).

Instruction to use the code:
  • Install watij as mentioned at http://watij.com/webspec-api/
  • Copy the java code I had placed in the comment section (placed in 3 comments due to comment size restriction)
  • run the java code along with the classpath pointing to watij class and jars
  • This will open a window and websudoku site is opened
  • Settings page is accessed automatically and few settings are tweaked
  • once you get the puzzle page, play it as you would do in normal manner
  • When you get stuck, click on the 'Done' button in the top panel. The button name is marked as 'pauseUntil'
  • we should have numbers filled now. Once that happens, continue with the game

Happy sudoku.

Sunday, January 09, 2011

software for spammers

we all know about the princess with enormous wealth waiting for your help. Also the oil company needing your bank account to transfer billions of $. Wondering what kind of software tools and support these spammers use. Sure enough they have a powerful source of email ids. What is beyond them? Do they shoot out the mails and just wait for victims? How do they keep track of day to day activity with each victims?

I would suggest to go for a data managed system. Each victim is tracked stage by stage. The spammer could pull out particular record, quickly glance through the past conversation and development. Based on that, the current mediation could be exchanged. Template builders and generators could be another big plus for the spammer. Need a company establishment proof? The template engine would put appropriate date, time, place etc and churn out the required records. A visa with victim's detail is also a easy go.

Financial income from the victim could be tracked as well. This again helps in judging how much more to extract.

Data could be analyzed across the system, that is with all the victims' data. This data crunching will give interesting answers to questions like: how effective is spamming? which stage is tough to convince the victims? what strategy is working well and which is not? what is the average time to see the money? how to improve the income and increase the victims?

Wish some spammer sees this blog and contact me, not for spamming but for designing this system :-)

Thursday, January 14, 2010

film network

Here is a recipe for social networking website for film fans. The core site is a canvas board where users can drop an item. Item could be a movie, actor, director, musician etc. These items may be interconnected to each other. For eg, an actor connected to movies he acted. From the same movie, there may be connections to director and so forth. The items may have properties, like when the movie was released, dob of the actor etc. Also, item could point to a wiki page for users to update and post their comments.

The end result would be a one big mess of complex connected graph. The beauty of this structure is that the data is generated by the users from scratch. Moderators could help in trimming the data and avoid duplication.

Tags on language or imdb style of genre could help in quick search.
Subjective queries like movies by particular actor+ actress, or Chinese romantic movies of 80s could be attempted.

Wednesday, December 31, 2008

Information flow in future

While hearing about molecular computing and nano memory cards, one would wonder how the future would be. Definitely different. Here is a preview.

You return home and settle at home. Want to know how organic is the tomato you bought. Pick one of them and use your TV remote as a scanner. Immediately picks of the universal identification number of the tomato and starts pumping data after data about the tomato. The shop it is been purchased, the date it is been stocked, the vehicle it came in .. You could use the remote to drill down the pouring info. The farm of the tomato is show live. The fertilizers used in the past, the chemical composition, the Dept of Agriculture's stance with respect to that fertilizer, What not ..

It is amazing to know the interconnected and data relatedness we can end up in.

Thou this kind of info access is technically feasible, I guess the legality over personal space, business confidentiality etc will hide these info.

Monday, November 24, 2008

Time convertor

How easy to convert a pacific std time to your local time? What if you need to deal with the london time too. Adding the 'day light saving' factor will increase the fun in the conversion.

I wish we have a simple plugin (mainly attached to the email client), that would scan through the document and highlight timestamp in different time zones.

Tuesday, September 23, 2008

Handling old laptop battery

If I disconnect the power from my laptop, the laptop shuts abruptly in 5 to 10 seconds. Looks like the battery is gone. However, I suspect some kind of firmware involvement also in this problem. When windows desktop is put under some prompt, then the laptop doesn't die even after removing the plug. So, if I wanted to move the laptop around while still working, I click on shutdown and leave the shutdown prompt as it is. After shifting, I cancel the prompt. So for this method helped in retaining for power for 15 minutes. Let to try beyond.

Monday, September 22, 2008

Ideal expense writer

We tried maintaining personal expense using different tools and techniques. Started with a fancy spreadsheet, then a website, moved on to traditional paper book, a pocket sized one etc. Nope, none helped us to stay on track. After couple of days, laziness pulled us away from these equipments.

While thinking about an ideal expense maintainer, here is what I wish to have. A box kept inside the house, close to the entrance. I can drop any receipt of different shape and texture. The box equipped with ocr will grab those pieces of papers, analyze them and find the expense to be entered. A calculator size panel in the side of the box would beep out the number it found. I can alter the number within 15 seconds, or else that number will be entered in a registered. The receipt will be filled neatly inside the box.

Blue toothed box will sync up with my computer on a daily basis. QED.

Friday, August 22, 2008

transparent editor

What if the text editors we use are transparent? Or transparentable? This occurred to be when I had to switch between different window, refer info at various source and come back to the editor to continue composing. Instead, if I have transparency, I will have focus on very few lines close to the current line I am editing. This patch of visible lines should be draggable/movable. Remaining area of the screen will be displaying the windows that are at the background. I can refer or even cut n paste from any of the available screen. With a snap of key or click, I should switch from transparent mode to opaque. Would be cool.

Friday, May 23, 2008

Drag and Drop class hierarchy

While working with gwt-ext library, I found difficult to understand the available set of classes related to drag and drop functionality. In order to demystify, I took a notes for myself and drew a flow chart. Sharing with others.

Also, if you are looking for useful info on the drag n drop classes, yui seem to have good documents.


Wednesday, May 21, 2008

Which college to go? None.

Couple of my relatives were sharing their dilemma about the colleges their kids should choose. I suggest them not to send to any college, particularly if the student is talented. Many couldn't digest this suggestion and repel away.

Off late colleges are open at every corner. Businessmen fund these college and their view will be obviously business oriented -- reduce the expense, increase the income. After paying heavy amount as capitation, what we get is poor quality education from incompetent staff.

Is there any alternate? I suggest talented kids to learn skills over net. This is by assuming computer job is what one aims for, which 95% of students aspire towards. The 5% should go to a very good college of their dream fields. Surely those seats will be available without competition and prosperity rate ought to be better.

Will students without world experience, job experience gain technical skills over net? Can they settle comfortably in say, over a year? I feel some kind of collaboration, guidance is needed - which need not be a college. If a college can provide such guidance, it is good.

In such skill acquisition mode for 2 years, I believe the person should be able to solve problems to an extend of matching the expenses to income. With 3+ years, real money should be pumping in. Believe me, there are so much work that needs to be done outside.

Any evidence that this is feasible? Yes, think about the top companies in the country hiring non-computer science students for their software development projects. They see the talented pool to learn things and start working in real projects. They give a 6 month training for them.

If 6 months is all the training one needs, y not we start that when we are out of school?
Many have the secure feeling with having a degree. Correspondence course is the answer.

PS: I went through colleges. My comments above are relevant to the current scenario where colleges focus on minting money in contrast to industry looking for quality engineers.

Friday, May 16, 2008

adding a background grid

Ever wondered how to get a grid background like in some designer tools? Here is a simple way.

Decide on the cell size you want. You may choose 20*30 pixel. Create a image of that size in paint. Draw a line in the last row and last column. You should get a image like this :




Include this image as a background in your canvas. Allow the image to be repeated horizontaly and vertically.

In case of html+css, you may specify as :

.grid
{
background-image:url(../images/bluegrid.JPG) !important;
background-repeat: repeat;
opacity:0.1;
filter:alpha(opacity=10);
}



This should give out the desired result :


Sunday, April 27, 2008

gwtExt panel to fill the page

While using gwtExt tools, I wanted the panel to occupy the entire screen. Found that Viewport is the component to use. However I didnt see the required effect in spite of using the Viewport as per the guide. I just got a small, shrinked panel as it used to be. After couple of trial and error, the culprit turned out to be an auto-height method called by the main panel. Commenting this statement cured the problem.
// panel.setAutoHeight(true);

Wednesday, April 09, 2008

Compare two properties files

I had two properties files and the parameter names were almost same in those two files. I had to go through them to find difference in the values. Searching for any utility didnt get a positive result. So, implemented the following logic.

Load both the file data into a hash map

(the param will be the key; we will end up having two hash maps)

for loop into sorted keys of first map

{

if (key exist in second map)
{

if
(firstMap.valueof(key) == secondMap.valueof(key))

{


key = firstMap.valueof(key) in both maps

}
else

{


key differs in the maps with firstMap.valueof(key)


and secondMap.valueof(key)



}

}

else

{

key exist only in first map


}

}

for loop into sorted keys of second map

{

if (key not exist in first map)

{

key exist only in second map


}

}

Friday, March 28, 2008

Unidentifiable error

Came across an interesting error while starting with script.aculo.us A test code was working fine. I moved the same script to the real project code. Then the script started throwing error, 'undefined object'. Spent lot of time in comparing the test code and actual one. Couldn't find any issue.

Then placed few alert statements and narrowed down the issue by applying divide n conquer. What caught was this function :
function $(id){return document.getElementById(id)}

Seems like scriptaculous.js is using prototype.js and the later is defining a function with the same signature as above. After going thru the function defined in prototype.js, I found that to be sophisticated and served my requirement too. I commented my definition and the page flies through without error.

Moral : don't duplicate function names, it is going to be lot difficult to debug.

Monday, March 17, 2008

Gadget for the railways

There is a nice neon board displayed inside the train compartments. The location of the train is constantly displayed. It is very useful to know the approaching station, the distance and the time etc.

It would be nice to extend this facility. How about having a personal alarm when desired station approaches? Like, we set our mobile phone with the city code. The display board keeps sending mobile recognizable signals for each approaching stations. If the station code is same as the one I had set in my mobile, my mobile will wake me with an alarm.

This system needs a download to install in the mobile and the announcement signal to reach the mobiles.

Just a thought occurred in between the sleeps.

Sunday, March 09, 2008

Refined RGB color grouping logic

As I mentioned earlier, I had to group colors. I wrote a simple logic where I put zeros in the last n number bits of each color pigment of each color pixel. This gave the required result, but gave distorted colors.
In the quest of minimizing the distorting, I arrived at a better calculation. The line of thought is:
  • if we want to group colors together, we will have to mask the LSB bits of each color
  • Masking can be either making those choosing last n bits as all zeros or all ones
  • choosing either one of the above would lead to distortion
  • Instead of fixing the bits towards 0s or 1s, I tried to find a uniform number that could be placed at the last n bit.
  • This involves scanning all the red pigment of all the pixels. Add the last n bit values from these pixels and find average. Trim this average number to n bit size and paste this n bit at the end of all red pigment for all the pixel colors. Do this for green and blue as well.

After trying this approach, I got a better colors that were grouped together.

grouping the RGB colors

As I mentioned in the image handling utility, ChitraDeepam, I had to club colors together. The need arised due to the vast color range listed out of the given image; whereas the user was expecting to see few basic colors strikingly visible to human eye.

I was thinking about comparing the individual pigment of a particular color, (pigments => red, green, blue), and deciding which band of basic color it, (the given color), will fit into. However this was a complicated logic as we will end up into infinite comparison and may end up where we started.

A simpler logic occurred to me of masking the LSBs (least significant bits). User can have control over how many LSBs to mask. If I make those bits as zero, (for 3 of the pigment in each pixel color) then I am reducing the set of colors. This masking results in distortion of colors. As we are loosing few bits of data, we move from accurate image colors towards inaccurate colors.

Here is the code:

public Color trimColor(Color color, int accuracy)
{

// find the mask to be applied on color
int trimBar = (0xff << accuracy) & 0xff;


int red = color.getRed() & trimBar;
int green = color.getGreen() & trimBar;
int blue = color.getBlue() & trimBar;


return new Color(red, green, blue);
}


I am looking out for reducing the distortion and still achieving the color grouping. A friend had suggested to check with image processing utilities and libs. Seems like there are lots of possibilities for these minor features to have exists for ages. Let me go through.


Update: check the refined approach.

Saturday, March 08, 2008

Programming in local language

A professor at medical college requested me to write a small image processing application. He wanted to analyze any image and identify various color concentration and different ratios. I pitched in a java code that would read the bmp file and go thru pixel colors, count the rgb values etc.

Since the apps is a home-made, free-lanced small utility, I had lots of flexibility in scribbling to my heart's content. While doing so, I wanted to have convenient names for the classes and variables. I started using Indian words in coining class names.

I had to handle each color element and count their occurrences, manipulate the colors etc. The holder for such activities was named Varna which is color in Samskritam. The opposite color fetching function is from this class.
All colors from the image was extracted into a big double dimensional array. The huge volume of such colors prompted me to label it as VarnaSagar, ocean of colors.
A portion of image was handled at a time. So, I had to have some container which fetched colors from the VarnaSagar and processed them. The name for such small container is VarnaKalasam, pot of colors.
Even the screens were not spared. Image displaying modules and panels were termed Chitram, means a picture. The controls that open up the image is called by Darshan .. something to show up or see.



Would you like to guess the utility name? It is ChitraDeepam. Deepam is shine or light or glow. In our context, ChitraDeepam is a tool that illuminates more info about any chitram or image.


It was a nice experience to go thru in writing this utility. Using familiar names or related words made a lot of difference. It improved the way we conceptualize the problem domain. It also shows how powerful over native languages play even at a computer language level.

I remember few concepts I couldn't understand mainly because of the name. For eg, facet is one such topic. I never took time to understand the meaning of this word. Due to that I couldn't fully understand the topic, thou I attempted reading it couple of times. If I had known the meaning of the word, probably I might have been able to understand faster.

Anyway, here is the screen shot of the tool I wrote.