Graveyard

Tuesday, May 5, 2009

Windows 7 RC

Sorry for another rant, but I must. I've been using Windows 7, Microsoft's successor to the failure that was Vista, since build 7000 (which was one of the first public betas). Yesterday Release Candidate version was released, available to TechNet/MSDN subscribers ( and everybody else). Keys for this version are freely available everywhere, both for 32 an 64 bit versions.

So what are my experiences? In short, it is a real relief after the terribly slow buggy Vista. Elaborating:

  • Amazingly responsive (on par with XP) - how this was achieved is still a mystery to me, MS claims new testing/tracing technologies helped identify bottlenecks
  • Low memory footprint (something like 200MB for the OS with Aero, down from almost 500Mb in Vista)
  • Usable, usability improvements in almost all system components - control panel, task bar, command line, system software, media libraries are actually usable now, and so on
  • Many improvements in the OS core and new functions like VHD (virtualization built-in which is a must in modern OS)
  • UI feels "nice" - almost like Macintosh but without proprietary interfaces and software absence problems of Apple (try Win-Left/Right combo)
  • All software which worked on XP/Vista works here, I did not need compatibility mode for anything yet
  • Driver coverage: everything was supported on the three computers that I installed it on, so it's been 100% for me with no manufacturer disks (YMMV)
  • The fact that Microsoft gives you over one year of free evaluation is pretty nice, too (expiration for this RC is June 2010)


Would I immediately upgrade from Vista? Without doubt, even if this new OS would've crashed with BSOD every other day :) From XP? Yes, if only for the new taskbar. Some tips on Windows 7 installation:

  • Upgrading from previous builds: unpack downloaded ISO and edit sources/cversion.ini file in notepad - where it says "MinClient=7077.0" lower the version to any number below your currently installed build.

  • Installing on Asus EEE PC: just did a test install and with some services/control panel tweaks it runs pretty well on Asus's netbook. To install you would need a bootable USB flash, 4GB in size (you need exactly 4GB, which now costs something like 15$). Copy all the files from inside Windows 7 ISO (7zip can unpack ISOs) to the bootable USB flash, tweak EEE bios to boot from removable devices first, and then during EEE startup press ESC to bring up the boot selector menu, done.

  • There are many services and scheduled tasks which send usage stats of this RC to MS. You can either opt-out during installation, or, to be double sure (although ingrate), disable all services and scheduled tasks related to customer experience.

  • Silly tip, but as the 'Run' start menu item has been removed by default, you will have to use Win-R combo (you are probably using it already).



Everything else is pretty obvious, this is Windows afterall, so enjoy. Windows 7 looks like it very well might be MS's answer to the superiority of apples and penguins on desktops and netbooks which was becoming increasingly obvious with dated XP still being the only really used MS OS. We'll have to see how well businesses adopt this new system.

Labels: , , , ,

Thursday, December 18, 2008

Multiple Computer Sync - DropBox and alternatives

Life has become mobile. Even office workers have at least two locations - work and home - that they need to keep in sync if they want to be productive and have control over all their electronic appliances. More so if you also have notebook(s), smartphones, summer house computers, media station computers and so on. Each of these often requires access to your personal data like work projects, passwords, texts, keys, setting XMLs, summer pictures and so on. Sometimes you need access to these at the most inappropriate time and place, so web access is a huge plus.

There are many solutions to this common problem, I personally used FolderShare for a couple of years, which allowed me to sync everything between any number of computers running Windows. No Linux/Mac though was a large downside. Another downside was that the service was heavily unreliable, failing often (hey, it's Microsoft after all). Things were getting worse until one day it just died and refused to sync for a month (last I checked, it still crashes at the simplest operation with a cryptic MS error).

So I switched to PowerFolder, an opensource Java attempt to do the same with some openness - working on any OS, what a promising idea! Well, it did not work, since the program is extremely lacking in all areas, usually it just loses connection or crashes, syncs only if you are very lucky. Even worse, some glue-sniffin management of theirs decided they are ready for primetime, removed the free version, and started charging money for this. Here goes another wasted day of setting things up.

Surely, I also tried traditional methods like USB flash, mobile HDD with Allway Sync N Go, etc etc but all of these solutions turned out to be unacceptable - they require you to remember about them, and that quickly turns out to be too intrusive. Not mentioning that the media itself is highly unreliable.

Non-traditional approaches like rsync work, but that's only good for Unix boxes, configuring it on other OSes is a pain and that is a pure peer-to-peer, means you have to enable connectivity between machines - which is not always possible.

Long story short, I have just found a beta of what looks to be the solution to this. Solution that I always thought of doing myself (but the need to develop clients stopped me :) ). Which I also think would be purchased by Google in the very near future (maybe after switching storage backend from Amazon S3 to Google's own cloud), because it does fit in their overall idea for a complete set of SOAS.

So check DropBox out for sure, and have fun in the process!
Very simple to set up and use on any OS (native rich clients developed). 2GB for free, 50GB for 9.99$/month.

Update: DropBox now runs a limited time promotion, too, giving 250 extra MB for every sign-up to both new user & me. So go while it lasts, you'll thank me later :)

Labels: , , , ,

Sunday, May 25, 2008

music: iPhone sync, iTunes alternative

A post unrelated to coding - about a problem that was occupying my hobby time ever since I got the iPhone - it's called iTunes, one of the most offending pieces of commercial software I have seen, right after RealPlayer and Quicktime. Apple is notorious for unusable software (while having the best hardware design), as if they outsource their coding to some African tribe, receiving the deliverables engraved on banana leafs.

So, I've had enough of iTunes when one day it removed all of my tracks on the 16GB iPhone. Before that, it was making computer unusable when opening (pretty small by today's standards) 60Gb music lib, suddenly destroying the library index, being unable to sync with more than one computer (amazing brainstorming Apple!) and so on. Considering that iTunes is a total joke in it's music organization attempts with the need to manually add/remove every file to the library, manage tags and album art by hand, not showing directory album structure, and forcing it's own tag-based categorization it could be only useful for random pop-track purchasing iTunes customers. Uninstalled, and started looking for some sane alternatives. I have tried mostly every piece of software that claimed it could sync iPhone/iPod music with a Windows computer, including iPhone-based ones, with no luck - they either don't work with the new Apple encryption, or don't do their simple job well, crashing left and right.

Relief came when I discovered and installed a little gem called MediaMonkey. Purchasing it was a no-brainer - even though it syncs through the evil iTunes, you can erase iTunes's library and disable iTunes syncing so it should not be able to do any harm. MediaMonkey works with the existing music library wonderfully, through a set of views and filters, not locking you into a stupid "vision", with a lightning fast presentation of any amount of albums. It converts FLAC/OGG to iPod-compatible mp3 on the sync (once), so you don't have to keep two copies of the same albums. You can view the track/album/artist conveniently and you can re-tag albums from freedb/web. You can actually see the directory structure from within the program. You are able to get album art without using iTunes Store. Rip/Burn Cd-Dvds. Music DB is automatically updated with watched folders feature (yes you don't have to add each file manually). And so much more is done right in that little Monkey-driven app that comparing it to iTunes is an offense. Did I mention that the sync check takes 1 second, instead of eons with iTunes?

Apple software engineers should download a trial version of MM and then go hang themselves in shame.

Labels: , , ,

Tuesday, March 25, 2008

RoR: Caching Dynamic Association Conditions

The problem which is verbosely described in a previous post on dynamic associations still does not have a clean solution - I've been researching possible workarounds, and there is no definite answer. One feasible workaround is specifying :conditions => 'send(:method)' in single quotes, this way Rails will only eval the conditions when forming the SQL string. This, and what was suggested in my previous post, both would work... Unless you would want to reuse that association with different (or no) conditions later on.

And here comes the trouble - Rails preloads all model classes on startup, and any changes that your controller actions do to the model classes stay cached for all further requests. So on production system, modifying an association in run-time would affect all future references through that association (and that's in fact what has happened to me). We better restore the conditions back after modifying them in with_conditions method. But if your Rails app is anything complicated, it probably uses delayed loading when rendering the views, so you can not reset association conditions right away in the model. Let's delay it until the next request:

class ActiveRecord::Base
@@saved_conds = Hash.new

# dynamically modify conditions as there is no other way in Rails
# to specify run-time conditions on joins...
def self.with_conditions(assoc, conditions)
@@saved_conds[self.to_s] ||= Hash.new
# only save if that's the first call during this request
@@saved_conds[self.to_s][assoc] ||=
reflect_on_association(assoc).options[:conditions]
reflect_on_association(assoc).options[:conditions] = conditions
yield
end

# reset association conditions if any has been modified by our
# with_conditions calls in the previous request
def self.reset_conditions
return if @@saved_conds.empty?
@@saved_conds.each { |klass,associations|
associations.each { |assoc,saved|
model = klass.constantize
model.reflect_on_association(assoc).options[:conditions] = saved
}
}
@@saved_conds = Hash.new
end
end


This solution I came up with is pretty hacky - but it works. If you know of a better way to mark a class for reload in Rails, let me know. This code saves modified conditions in a hash by class and association and then you would need to add code to restore them to a mint condition in a before_ or around_ filter in ApplicationController (call like Magazine.reset_conditions). Using class name as a Hash parameter since class variable behavior in Ruby is strange to say the least - it is shared in all inherited classes and the parent class :)

Labels: , , , ,

Wednesday, February 27, 2008

PHP: XCache Installation

A quick note to self: IBM site has a very nice writeup on installing XCache, a php opcode and variable caching which seems popular lately. Other sources of information are missing all the important details which leads to wasted time. Visit the linked page for details (http://www.ibm.com/developerworks/library/os-php-fastapps1/).

It does not have a walkthrough on configuring xcache options in the php.ini or xcache.ini, but they are self-explanatory if you read comments. Out of practice, variable cache (xcache.var_size) has to be about 10% size of the opcode cache (xcache.size).

Labels: , , ,