Anybody knows How to set your own password in WordPress?

July 25, 2010

Currently if I forget my password, WordPress changes it to its own randomly generated one, that too after I have confirmed it by clicking on two mails sent by WordPress from my gmail account.  There’s nothing obvious in the menu for ‘Change password

Advertisements

Interesting distributed computing problem

July 22, 2010



Routing items from seller to buyer for an Ebay like company. If 1 item has to be sent from 1 seller to 1 buyer, the shortest (cheapest) path can be found easily. But sending 10,000 items from 1000 sellers to 5000 buyers using the same algorithm will obviously be inefficient. Sending all the items to a central location and then distributing it is also non-optimal. Theoretically solving the problem is obviously NP-hard. We were more interested in building a real-time distributed system which does the task using limited knowledge. Given 100 distribution centers, how do they communicate between themselves to distribute huge number of items per day between different buyers and sellers. Servers can fail, two servers can potentially give conflicting information.

The system should support fault tolerance and state machine replication. Realize that making all servers agree on one routing path for x items is a Distributed Consensus problem.

Cluster Computing Magazines

November 29, 2009

Obviously there are people who know far more about cluster computing than me. I subscribe to Linux Magazine, and I manage to get just High Performance Computing resources (as a HPC Weekly) and something called Virtualization (I have yet to figure out what that is). I don’t claim that this is the best source for cluster computing, but it seems to be sponsored by IBM. It also contains far too many impressive words and acronyms that I don’t know.

I also subscribe to other things and read other sites; soon you will be asking for my entire bookmarks list, which I will share online as soon as I can figure out how to attach a file in this blog. WordPress seems to think that any file should contain an image of Katrina Kaif to get uploaded. Junta, any ideas how to share a file through WordPress? Anyway, it’s Google bookmarks, there should be some way of sharing it by googling.

Coding in Java using Vim

November 28, 2009

This is one topic born out of necessity. I had to do it and had a discussion on the vim-use group about it. Since I am lazy, I just cut-paste the conversation instead of summarizing it.

Hi,
I code Java in Vim using Vjde(http://www.vim.org/scripts/script.php?script_id=1213). But I am not able to use many of the features because the documentation is entirely in Chinese, with a brief tutorial in English.
1) While it recognizes standard packages ( java.* ) for code completion, it does not recognize my custom packages. I am following the ctags instructions specified in the script homepage exactly as far as I can understand them.
2) The auto-import feature works for standard packages but not mine.Questions:
1) Is there any other tool for coding Java in Vim other than Vjde?
2) Why am I using vim to code Java instead of Eclipse? Well, I have to code java over a VPN halfway across the world and the bandwidth makes a full fledged Eclipse IDE very slow. My question is, if there was a full fledged java plugin for vim with as many features as Eclipse, wouldn’t it be even slower, since it would have to do the parsing and matching in a language-generic way?

 

Thanks,
Srikanth

> 1) Is there any other tool for coding Java in Vim other than Vjde?

You may want to give a try to eclim (http://eclim.org/) I’ve not used it by myself but some people have told me that it’s good enough.

It requires you to run an instance of eclipse in the background though. Not sure if this poses a problem for the OP.

Marc Weber

Yes, of course vim script is slower than Java. There is one plugin on vim.org which implements a Java parser. However it wasn’t updated within the last year. And I think there are many reasons for it. It is insane to duplicate the work which was done on Eclipse. Eclim probably won’t solve the speed issues for you.

Maybe you can look at your problem in a different way?
Maybe you can implement kind of file caching so that accessing files is faster ?
Maybe you can start using a version control system so that you can keep a local copy of the source code.

Why do you have to use files which are stored on a server having a slow connection to you?
What is your real problem?

Be aware that Netbeans has very good vi keybindings. Eclipse also has a vi-plugin.

Maybe try only reading .java files from the remote location while linking Eclipse stuff to a local disk. Using ntfs you can create different kinds of links etc.

Also be aware that you can’t debug Java code as comfortable as in Eclipse or netbeans. I”d also join #eclipse and ask how others work with a setup like yours.

There are alternative solutions: Eg log into the server and work using a terminal. I don’t know which works best for you. You have to try.

Good luck.
Marc Weber

Hi,
Thanks for all the replies. I didn’t expect so many and so quick.
>> Eclim probably won’t solve the speed issues for you.
Actually it partly did. The background eclipse runs on the server (half the world away) and doesn’t have to transport the entire GUI across the n/w since the frontend s only a terminal vi..

>> log into the server and work using  a terminal.
Exactly what I do.

>>Maybe you can implement kind of file caching so that accessing files is
faster ?
>> Maybe you can start using a version control system so that you can keep
a local copy of the source code.
Uh Oh… This is company code so strictly no checkouts allowed locally (at home). Of course we check out a local copy in the office so there is no problem using Eclipse/Netbeans there. At home, even connecting to the local server is slow.

>>  What is your real problem?
Can’t checkout code at home (officially atleast)
Currently using Eclim at home is sufficient for me, so thanks for all the help. This thread can be closed.

Thanks,
Srikanth

Why PhDs don’t write technical blogs

November 28, 2009

The first thing when I decided to write a technical blog was to see how and where my erstwhile PhD colleagues designed theirs.  But surprise, surprise not one of them have a technical blog.

Then it became obvious; anything technical could end up theoretically being a paper – even if it turns out be explaining their vim settings.  Since a paper can be published once and only once anywhere in any form, that means keeping it secret even if you itching to show it off to the world.  This itching is partly satisfied by some secret huggery-muggery at conferences over coffee.

On the other hand, every friend who’s in industry has a blog. Why? Because their companies ask them to write it to sell their product! If you see a description of a product coming from a blog, you would think it’s a reliable independent third party opinion. But no, it’s officially company made and certified.  So be wary of the opinions expressed in them.

OpenMP, MPI and pthreads

November 24, 2009

OpenMP and MPI are complementary.  OpenMP is used to optimize performance of a program running on a single machine with multiple CPUs, i.e an SMP.  MPI uses a message passing mechanism to divide a big problem into smaller problems. Each small problem runs on a separate machine, in parallel with the other.  It then uses a MapReduce paradigm to collect the result and solve the big problem. The advantages of the MapReduce paradigm will be explained separately in another post.

To combine them to solve a big problem, first use MPI to divide the problem into parts which can be solved on a single machine. Now to solve this single-machine problem optimally, use OpenMP to efficiently allocate the work among the multiple CPUs on that machine. This will result in a multithreaded program.

Why should we use OpenMP over pthreads? Both of them use threads to divide the work, right? Well, OpenMP enables you to specify a program at a higher abstraction than pthreads. You need not explicitly write the synchronization part of the code which is the trickiest part in multi-threaded computing.

All three, OpenMP, MPI, and pthreads are portable while internally taking advantage of the underlying OS and hardware architecture.

Of course, there are cons here. MPI is extremely difficult to learn and code and involves many low level implementation details. You may not be able to entirely substitute pthreads with MPI.  MPI parallelizes only loops; any producer-consumer kind of situation has to be explicitly dealt with using pthreads.