Archive for the ‘Misc’ Category

Full Git Clone of Matz Ruby Subversion Repository

Thursday, June 19th, 2008

I’ve been wanting to have a full git clone of Matz Ruby Subversion repository for a while. In fact, I’ve been using a private git clone for a few months already, and really like the speed of switching between branches and immediate history search. This all gets really handy with current explosion of different versions of Ruby (1.8.5, 1.8.6 with more than 200 patch-levels, 1.8.7, 1.8-dev, 1.9). Using all these different versions is essential when writing the new RubySpec tests.

And since now more folks than ever are writing the RubySpecs, dealing with Subversion gets painful for many, and the public Git repository of Matz Ruby is going to address that. So here it is:

Full Git Clone of Matz Ruby Subversion Repository.

For more info on how to use, take a look at the README. In a nutshell, just clone the repository, create local tracking branches for those remote branches that of interest to you, and keep updating your repository periodically.

And for those who’d like to know the steps in order to repeat them on other Subversion repositories, read on.

First, I fully cloned the entire Matz Ruby Subversion repo, using git svn:

   1: git svn clone --stdlayout http://svn.ruby-lang.org/repos/ruby

Then, I created an empty git repository on GitHub. So far, pretty standard procedure. The only tricky part was to figure out how to push remote branches from my freshly svn-cloned repository to public branches in GitHub’s repository. Without this, it would be pretty complicated to keep all the branches updated (you’d need to create local branches, update them manually, one by one, and then push them).

Luckily, git’s flexibility allows to do all kinds of interesting things, sot it was easy to write some config entries to “re-wire” remote branches in local repository to public branches in  the GitHub’s one, I had to adjust the .git/config file:

   1: [remote "origin"]
   2:    url = git@github.com:vvs/ruby-mirror.git
   3:    push = refs/remotes/trunk:refs/heads/trunk
   4:    push = refs/remotes/ruby_1_8:refs/heads/ruby_1_8
   5:    push = refs/remotes/ruby_1_8_7:refs/heads/ruby_1_8_7
   6:    push = refs/remotes/ruby_1_8_6:refs/heads/ruby_1_8_6
   7:    push = refs/remotes/ruby_1_8_5:refs/heads/ruby_1_8_5
   8:    push = refs/remotes/ruby_1_6:refs/heads/ruby_1_6
   9:    push = refs/remotes/ruby_1_4:refs/heads/ruby_1_4
  10:    push = refs/remotes/ruby_1_3:refs/heads/ruby_1_3
  11:    push = refs/remotes/tags/*:refs/tags/*

With that change, every push to the “origin” repository (the GitHub one) will push remote branches in my private repository to the public branches of GitHub repository.

Finally, the process to keep the repository up-to-date is now straightforward:

   1: git svn fetch --all # fetches ALL branches from svn repo
   2: git push            # pushes all branches to public git repo

Update: The repository has been moved from my personal GitHub account to the RubySpec GitHub account, to compliment the currently existing RubySpec and Mspec repositories there.

Note #2: Nick Sieger has a JRuby’s git clone (only for the main trunk though): http://github.com/nicksieger/jruby

Wordpress 2.5 and Security

Sunday, March 30th, 2008

wp-logo I’ve learned my lesson the hard way. I’ve been running this blog on the older version of Wordpress, and some day it got hacked, and hidden spam links were inserted into the blog entries. I must say that was brilliant, nobody could see the spam links, but the search engines were indexing them. Luckily, the problem was visible at least in the RSS aggregator. So I started digging trying to figure out what’s going on and to my horror it turned out that these kinds of hacks are very common, especially against the outdated versions of Wordpress:

  1. Detailed Post-Mortem of a Website Hack Through WordPress
  2. Support » Weird and Dangerous
  3. Justaddwater.dk hacked
  4. Another Day, Another WordPress Hack

I checked with Wordpress folks on the #wordpress IRC channel, and was advised to purge the compromised install and redo it from scratch, and I did…

And the main lesson here is to pay attention to new Wordpress releases and upgrade when new security update is out. This entry sums it up nicely. On top of that, I decided to use the BARE MINIMUM of external plugins to minimize the risk.

Just in time, a new version of Wordpress has just been released, v2.5, so I took the opportunity to upgrade, since quite some changes were specifically improving the security situation. Also, I decided to change the theme for the blog. Using the default one was getting pretty old, too damn many blogs use it!

And so far, I like the new version, the admin interface is much cleaner and useable. But I’m not really sure that some “usability” improvements are useful, things like one-click plugin updates. After the security breach, I’m paranoid on this issue, and I’d like to minimize what can be done via web interface. Yes, doing manual updates via command line is not as fun, but I’d prefer it to stay that way.

P.S. If you’d like to make sure your blog is not hacked, just take a look into HTML code for your latest blog entry and make sure there are no hundreds of links at the end of it. :)

Dream PC for Software Developer

Friday, April 27th, 2007

With the recent fall of prices on Intel’s Core Duo processors, it’s that time of the year when I upgrade my hardware. I’ve been reading literally everything that I can find on the net about the recent hardware: reviews, blogs, articles, magazines, you name it.

And here’s the line-up:

  • Intel Core 2 Duo 6600
  • Scythe Infinity SCINF-1000 CPU Cooler
  • Coolermaster Stacker STC-T01 Case
  • Asus P5B-Deluxe Motherboard
  • 4 GB of DDR2-800 memory
  • Any recent video card with Dual-DVI outputs
  • Westen Digital “Raptor” Hard Drive (10000 rpm)

Processor choice was easy. You can’t go wrong with the Core 2 Duo CPUs, they are much faster and more energy efficient then AMD offerings. The 6600 was the cheapest CPU with 4mb of cache, and I really wanted to get as much cache as possible – my (unfounded) theory is that big cache should be nice for various build/compiles that I do all the day. Note: Intel recently released lower-end CPU models with 4Mb cache too, if you want to be cheap. :)

Core 2 Duo is extremely overclockable, from 266Mhz front bus up to 400Mhz! So, the great cooler is in order. And the Scythe Infinity seems to be in the sweet spot – it cools great, especially with 2×12cm low-speed coolers and it’s very quiet. The only downside – the cooler is huge!

Well, with huge Cooler one needs a huge case! Personally, I selected Coolermaster Stacker STC-T01, it looks nice, it has lots of space, and I can use quiet power supply and 12cm low-speed fans in it.

So, the plan is to have highly-overclocked PC (up to 400Mhz front side bus), and for this I need a very solid motherboard. Based on all the reviews, the Asus P5B-Deluxe is the king! This board, it seems, is de-facto standard for seasoned overclockers. And, personally, I always loved Asus boards.

Next, the memory. Obviously, 4GB is the bare minimum now. :) Java IDEs can be quite a memory hogs, and running various OSes in emulators very quickly eats up all the memory. A warning: in WinXp and WinVista (32-bit), only about 3GB can be used, which is funny – we reached yet another memory barrier. Hopefully, there will be no “memory expanders” and “emulators” like the last time with 640kb in DOS. :) Seriously, the faster everybody switches to 64 bit the better. But based on various reviews, it seems that 64bit versions of Microsoft OSes are not the best option right now – too much quirks and incompatibilities. I’ll go with Linux/Solaris dual-boot, thank you.

The next thing – a hard drive. I’m still debating this. The RAID support in the latest motherboards (and in Intel 865 chipset, in particular) is good, and probably it’s the time to start seriously using it. As for the “Raptor” hard drives, I’ve been using them in the past, and they work great. Obviously, it’s not that easy to notice ANY performance improvements between 10000 rpm drives and the rest of 7200rpm drives, but it gives a nice warm feeling…

Video card. Since I don’t plan to play games much, there is no point to buy expensive video card. Any decent card would be fine, as long as it has two DVI outputs. Dual monitors with DVI out is the _only_ way to go for software developers. I’ve been using this setup for years and can say that switching from one monitor to two monitors was the most successful upgrade for me. I can see more, I can have more windows, editors, browsers, consoles, etc. Seriously, if you have just one monitor, do yourself a favor and buy a second one, the rest of hardware upgrades can wait!

Welcome

Monday, March 26th, 2007

Welcome, stranger, to my new, shiny and completely empty blog. I do hope that this intro message is not going to be the last one, but we’ll see.

About

Monday, March 26th, 2007

VVSVladimir Sizikov is a software engineer at Sun Microsystems, with more then 9 years of experience in conformance and compatibility testing for Java SE and Java ME platforms.

Vladimir is an Engineering Lead for the ME Framework project and a JRuby Core contributor.

LinkedIn Profile.

Contact E-mail: vsizikov at gmail dot com.