Archive for the 'Tips' Category

Mounting Remote DVD Drive on Windows XP

Monday, December 18th, 2006

Yesterday I bought a breathtaking DVD game — Fahrenheit: Indigo Prophecy — which appeared to be too heavy for my laptop. Unfortunately, even though my desktop PC has the cutting-edge video card and tons of memory it is relatively old and has no DVD drive. At first I tried creating a disk image and mounting it as a virtual drive, but the attempt spectacularly failed because of StarForce copy-protection system. It just refused to recognize the disk even though the key perfectly matched. Eventually I was able to find the solution (credits go to Kate for her sensible suggestion) — mounting the remote DVD drive.

(more…)

Preserving Links When Moving From MovableType To Wordpress

Thursday, November 2nd, 2006

So you plan on moving from MovableType to Wordpress for one or another reason. The Wordpress has an excellent Import function which lets you move all posts and comments from your MT to its database. The real problem is that the URLs of the posts won’t look the same. If you leave it this way, you will lose all the references to your posts. Here’s my complete recipe — the detailed step-by-step guide.

(more…)

Back to Life, Safe and Sound

Thursday, October 19th, 2006

Installed another anti-virus today, the fourth. The behavior of my poor Windows box has come out of control lately. At first, it was quite subtle, and the computer obeyed my orders. Reluctantly though, but still my actions meant something. Suddenly things started to worsen dramatically. Soon I ended up with the couple of nice blue screens, followed by minor data losses.

None of the installed anti-virus packages, I run at least twice a week, showed any signs of malware, except for the usual handful of tracking cookies in my browser. It’s quite irritating when you feel having absolutely no control of your own computer: the network indicators blink, the hard drive crunches like crazy, the memory is full of … and to complete the picture you are totally abandoned desperately clicking and pressing all alone. It lives its own life and I quite happy for it, but to tell the truth, my plans are a little bit… different.

After a quick lunch I decided to take a moment to run all of the checkers once again. When all of them reported a green light, I took it all in my hands: opened the processes list and started identifying what’s running module by module until several suspicious processes were spotted and recorded. Then Goodling their names, I learned they really were Trojan downloaders what perfectly explained the naughtiness of the box.


Prevx1
Information of this sort is usually provided by the producers or malware removers and in this case it was Prevx1 who seemed to know a lot about my troubles. I will put it shortly. It found and removed about 10 severe problems, and passed the control over the computer back to me. Phew, now I feel at home again.

Psshh… It’s watching you reading from my system tray.

Overriding DNS or How to Hack Microsoft

Monday, October 9th, 2006

Today I would like to share one extremely useful tip on overriding DNS information. But first, how it may be useful. Let’s imagine that:

  • You are running a site and planning the migration to a different provider. You wish to move your data first; then switch the name to point to the new location and then leave the old one. The problem is that before you switch the domain name to your new location, you can only guess if the site is working fine or not.
  • You are building a site for someone else and need / wish to access it using its target domain name. It may be necessary if there are some places where you hard-coded it etc.
  • You wish to show your friends what a great hacker you are. You open your browser, type in the name of some gigantic site you’ve “just hacked” ( i.e. microsoft.com ). Voila… “Vasya was here.”

(more…)

How to Download Whole Podcasts Archive

Tuesday, September 19th, 2006

I was planning to write something different today, but this just poped up in front of me and I can’t help sharing it with you. So please enjoy and hope you appreciate it.

It’s always interesting and, what’s more important, pleasant to learn some hack you could continue using; something really useful and not obvious. Yeah, it’s nice. I have something of a sort for you today. A feather in my hat actually; but at first, here’s some background.

I found couple of neat podcasts on English and one of them sounds incredibly. That’s the reason why I decided to stick to it and follow. In this specific moment I mean The Bob and Rob Show which is terrific and I really mean that. I will share my feelings on this matter later, but today I wish to turn your attention to something different. They do have a wonderful podcast feed with detailed show notes and all bells and whistles; admittedly, it’s universally great. But there’s a downside — it’s limited only to the latest eight episodes. What a trouble indeed!

I need to get off track here to say that I have become and avid iTunes user since my buying of iPod and have recently discovered the beauty of the tight integration of podcasts in it. So, as you have already realized, I’m using iTunes for podcasts fetching and monitoring.

As it supposed, there’s no surprise that iTunes picks only most recent 8 episodes from that feed. What about the rest? Am I supposed to wave my hand in goodbye to them? No way, and I decided to fight bravely against it. And here’s what I came up with.

Their feed link looks like this:

http://www.englishcaster.com/bobrob/?feed=rss2

The site runs on top of the Wordpress platform, so I took the sources for deeper analysis and found I can add a parameter to control which page is displayed, like ‘paged=2‘ to display the second page. I also found the protected parameter to control the number of posts on the page, but its nature doesn’t let manipulate the numbers. That’s why I took this page number thing and started experimenting.

The idea was to dump all pages into XML files, merge them into consolidated XML and feed it to iTunes somehow. Plus preferably, it shouldn’t be a different podcast as I still wished to continue following the original once I finished with archives. The goal was clear and I jumped right into action.

It was an easy yet a little mundane task to dump all pages (7) into separate files and copy-paste item tags from them into one big consolidated XML (200 Kb).

Here comes the tricky part. I needed iTunes to pick up this file when it looks for the podcast updates next time. To do so, I needed to put the handmade XML on some server and route the query to it, but how? The magic trick here is to route all the calls to the original server (www.englishcaster.com) to some other server with my file. I decided to use my local Apache server for this purpose: created the ‘bobrob’ directory and ‘index.php’ in it. You know that when there’s no file mentioned in the URL (like it is in our case; see the link above), the server will look for ‘index.php‘ and ‘index.html‘ before throwing out the white flag.

I named the file ‘index.php‘ and added some simple code to set the content type header for iTunes to think it’s valid XML. Here’s how the code looks like:

<?php
header(”Content-type: text/xml”);
echo ‘<?xml version=”1.0″ encoding=”UTF-8″?>’;
?>
<!– generator=”wordpress/2.0.2″ –>
<rss version=”2.0″ > … </rss>

The last, the most interesting part was to tell Windows to route all requests to my local site. There’s a file ‘hosts‘ in ‘c:\Windows\system32\drivers\etc‘. The file holds aliases for site names and maps them to IP addresses. The address ‘127.0.0.1‘ stands for local PC (as you might know). All I had to do was to put the desired host name ‘www.englishcaster.com‘ to the end of the localhost mapping line, and upon saving changes, the system started to recognize my PC under the new name.

The last move was to open iTunes and ask it to update the feed. It showed the complete list of 51 episodes (at the moment of writing) ready for fetching. Delicious…

I removed the fake mapping and continued with downloading. That’s all tricks for today. I hope it helps you some day.

Let me know what you think of this. Was it clear? Do you have any enhancements or alternative tricks? How would *you* cope with this situation? These are all interesting questions and I would love to hear from you.

Have a nice day and happy listening!

Writing Revising

Wednesday, March 1st, 2006

Recently I’ve been working on improving my writing skills: reading articles, books and recommendations from all over the web. It’s essential for me to be able to communicate the ideas freely in a written form as writing is the only pipe between me and most of my friends. Apart of it, I simply like to write and doing it in a right and easy way brings much more excitement than desperate attempts to put thoughts into order. But this is a whole different story…

Today I stumbled across the Hints for Revising by Brian Marick which are a good collection of advices on how to make your writing clear, well-structured and deeply pleasurable. I suggest running through this article briefly even if you aren’t going to become the next Shakespear. Personally, I found several interesting tips and got the proof of that my post-writing reading technique works and works pretty well on behalf of the greatest minds out there. Oh, and I’m not the author of it of course. It’s just that I didn’t see it mentioned anywhere before, but regularily used it to revise my own creations.

Blogrolling with BlogBridge

Wednesday, February 15th, 2006

Today we deployed one very interesting feature. But first, look at the Favorites section of the sidebar. Would you believe if I told you that this list is generated right from the “Favorites” guide in my BlogBridge client? The guide is being published as a Reading List. I’m simply dragging feeds to it, removing, renaming and tagging them as I wish and the BlogBridge Service does all the rest. Science fiction? No, absolutely not.

Here’s the HTML excerpt of this particular page:

<h2>Favorites</h2>
<script xsrc="http://www.blogbridge.com/rl/2/Favorites.js?tags=true" mce_src="http://www.blogbridge.com/rl/2/Favorites.js?tags=true"></script>
<p style="margin: 15px 0 0 20px;">
<a xhref="http://www.blogbridge.com/rl/2/Favorites.opml" mce_href="http://www.blogbridge.com/rl/2/Favorites.opml">
<img border="0" xsrc="http://blog.noizeramp.com/images/readinglist.gif" mce_src="http://blog.noizeramp.com/images/readinglist.gif">
</a>
</p>

You can see that the list of blogs/feeds is generated by the JavaScript scriptlet provided by the BlogBridge service for my favorites reading list. This scriptlet gives immediate access to the most fresh version of the reading list I publish which makes my site a little bit more dynamic and keeps maintenance at its minimum.

A little geeky? There’s another, more official post rich on technicalities available on the BlogBridge home site.

That’s one small step for BlogBridge… one giant leap for blogkind. ;)

Have a good time!

Testing Method Signature

Friday, January 27th, 2006

Today I had some new interesting testing task. What I needed was to ensure that some method has public and non-static signature. The method plays role of hook in OPML import utility class — the hook, which is used to create Reader object for a given URL. By default, it uses simple InputStreamReader wrapper, but the client application may wish to have something more sophisticated. So, the task was clear — to ensure that this method does not lose its signature, because it already happened once when I was reviewing the code and noticed that this method had unjustified public modifier. That time I changed it to “private static” and the application using this library lost its encoding detection skills.

Today, when I was looking for a bug in encoding detection it was a sort of revelation to see that the code even doesn’t get called. Yeah, sort of blown off the entire leg instead of simply shooting off the boots. So, traditionally I fixed the signature and put some warning for the future, but… the next thought was how to make an automated test to be one hundred per cent sure about it. It appeared simple and I would like to share it with you just to encourage.

public class ImporterTest extends TestCase
{
  // lots of other stuff skipped ...

  public void testCreateReaderForURLDefinition()
    throws NoSuchMethodException
  {
    Method crfu = Importer.class.getMethod(
      "createReaderForURL", new Class[] { URL.class });

    assertEquals("Method should be public and non-static.",
      Modifier.PUBLIC, crfu.getModifiers());
  }
}

Easy and bulletproof.

Mail Backup in Gnome Evolution

Thursday, December 1st, 2005

Some of you may know Gnome Evolution project which is a complete Outlook-like solution for Linux with contacts, calendars, mail client and god knows what else. I kind of like it as it has some indexing features allowing me to search through the years of letters in a reasonable time. It basically performs well, but recently I found that it started to slow down.

It wasn’t until my mail base grew big enough having about 10K messages at a present. Pretty good and solid number, no? Unfortunately, Evolution engine doesn’t think so. Hardly had we got over 7-8K when it became really slow clearing and re-indexing things after the mail box checks. It took seconds to complete a simple check and it hung for a while, doing some “expunging” as they say.

I had a plan X. I wished to backup whole mail base, then remove all the mail older than a month manually and continue with a nearly blank lists. It should unload Evolution allowing it to do quicker, that’s obvious. The execution of the plan didn’t even started. Where I stuck was a clear understanding of that I wouldn’t be able to look through my past email in the backup. For me it’s dead necessary to have a chance to pick letters from the past.

I did several attempts to find an utility application which would allow me to do scans through backups and display letters, but I couldn’t find any.

Do you know any of them? Or maybe there’s a better recipe?

Extended Desktop on iBook G4

Wednesday, November 23rd, 2005

Yesterday Kate asked me whether it’s possible to connect her professional Sony display to her iBook G4 to get a better picture and color representation or no. I answered, yes, without any hesitation and… it’s where the tricky part started.

While it was farily easy to connect the other monitor by simply plugging it in, it quickly become clear that it’s useless. Firstly, the second screen showed exactly what was on the main. Secondly, the resolutions of both were the same. That’s what is called Mirror Mode there in Macs. I couldn’t believe my eyes. While I could clearly see that the display settings dialog box has everything for laying out several screens to form a bigger virtual space and controls to change resolutions of the screens separately, there obviously were no ways to enable Extended Desktop functionality itself.

I made a quick Googling and found a very interesting page about Macs firmware patching, enabling this multi-screen feature. Well, I hesitated… There were so many warnings that I started to doubt this pilgrimage. I made a little more Googling and finally found what I was looking for — a prove that it’s relatively safe. It was an article on MacWorld site telling the complete recipe. And again the first site has been mentioned there.

I took a deep breath and installed the DMG… Woohoo, now we have a bigger CRT monitor connected to the iBook. The native screen and the display show their own part of a virtual desktop, having different resolutions, different refresh rates and even different background images. :)

Life is good again!