Latest Posts

A tool for removing duplicate files

[Down­load Re­moveDu­pli­cates.py][dl]

[dl]: http://non­graph­i­cal.com/me­dia/uploads/Re­moveDu­pli­cates.py

One of the prob­lems with us­ing hy­brid Win­dows and Lin­ux en­vi­ron­ments is that one needs to watch close­ly for filesys­tem and file anoma­lies and in­con­sis­ten­cies. Dif­fer­ing end-of-line mark­ers, for ex­am­ple, cause many prob­lems when shar­ing files be­tween the two op­er­at­ing sys­tems. One par­tic­u­lar prob­lem I’ve run in­to is that of hav­ing du­pli­cate files, or in other words, mul­ti­ple files with the same file­name. This can hap­pen if, say, you copy a di­rec­to­ry some­where in Win­dows, then switch to Lin­ux and use a tool such as rsync to copy that same di­rec­to­ry over again. If the cap­i­tal­iza­tion is dif­fer­ent, Lin­ux will not re­place the old files, be­cause Lin­ux, un­like Win­dows, is case-sen­si­tive. This will even hap­pen, and is tech­ni­cal­ly ac­cept­able, on NTFS filesys­tems.

The so­lu­tion I’ve come up with is this sim­ple script, called Re­moveDu­pli­cates.py. Ob­vi­ous­ly, you need [Python][py] in­stalled to run it, but it has no ad­di­tion­al de­pen­den­cies. Sim­ply run it *in the di­rec­to­ry you wish to clean*, and it should do the rest. Note that you shouldn’t use this for en­tire filesys­tems (yet), be­cause it will use ridicu­lous amounts of mem­o­ry if it is given a high num­ber of files. [Down­load it here][dl]!

[py]: http://www.python.org/

P.S. Al­so, I can­not guar­an­tee that this tool will work as in­tend­ed or will be bug-free. Use wise­ly.

Bad marketing gimmicks

Some of the stuff that Log­itech has been putting out re­cent­ly is cer­ti­fi­ably gim­micky. For ex­am­ple, the *wire­less* track­ball mice ([Cord­less Track­man Op­ti­cal][cto]) that Log­itech makes. The whole point of a track­ball is that it *stays put* on your desk: on­ly the ball moves! Why, then, is it made wire­less? Wire­less mice are cool be­cause the cord doesn’t get in the way when it moves along with the mouse, but the track­ball base doesn’t move! Log­itech’s site even calls the wire­less fea­ture “con­ve­nient” - I per­son­al­ly don’t think that need­ing to change bat­ter­ies for a fea­ture that the de­vice doesn’t re­quire is con­ve­nient.

[cto]: http://www.log­itech.com/in­dex.cfm/mice_point­ers/track­balls/de­vices/189&cl=us,en

One more seem­ing­ly-use­less Log­itech fea­ture: the G15 key­board’s LCD. Gamers that would buy the G15 key­board - most like­ly MMO play­ers and, to a lesser ex­tent, FPS play­ers. The G15’s most out­stand­ing fea­ture is its pletho­ra of assignable macro keys, which makes it won­der­ful for, say, WoW. Why, though, would you look down from the game on your mon­i­tor to check some dim­ly-lit stats on your key­board LCD? Seems point­less to me.

Don’t get me wrong: Log­itech is a won­der­ful pe­riph­er­al com­pa­ny. They make what I con­sid­er to be the world’s best gen­er­al-pur­pose mice (Dell’s ba­sic USB mouse in­clud­ed with their desk­tops, my per­son­al fa­vorite, was[^1] made by Log­itech). They make rel­a­tive­ly good, us­able key­boards, some­times with a touch of my pre­ferred min­i­mal­is­tic style (Di­Novo Edge). And, de­spite ar­gu­ments be­tween Log­itech, Raz­er, and now Mi­crosoft users about which gam­ing mouse is the *best*, there’s no doubt that Log­itech’s, espe­cial­ly the G5, are among the top gam­ing mice avail­able. It’s just that no­body re­al­ly wants to spend ex­tra money buy­ing fea­tures that are com­plete­ly un­nec­es­sary.

[^1]: I’m not en­tire­ly sure that it is any­more; I don’t have this in­for­ma­tion.

Casual games for the PC?

My cur­rent ques­tion is this: why are there few (if any!) ca­su­al/par­ty mul­ti­play­er games for the PC? I’ve been look­ing around for games that might ap­peal to more than just me and my hard­core gam­ing friends, in a (per­haps vain) at­tempt to cre­ate so­cial gath­er­ings through video games/LAN par­ties. Be­cause ev­ery­one here at school has a com­put­er, and net­work­ing is al­ready very-well tak­en care of, it’s def­i­nite­ly very plau­si­ble. The on­ly things miss­ing now are the games.
Read more…

VMware & Ubuntu 8.04

I have been hav­ing, to put it light­ly, some prob­lems with VMware server and an Ubun­tu guest. My guess as to why is this: VMware server is, in my eyes, built for pro­duc­tion-level server vir­tu­al­iza­tion. It’s not re­al­ly built for on-the-side home server vir­tu­al­iza­tion, like the kind that I’m do­ing, and on fair­ly desk­top-ori­ent­ed hard­ware to boot. Ba­si­cal­ly, my Ubun­tu in­stall often has trou­ble with disk ac­cess, and some­times net­work ac­cess as well. (I’m run­ning a Vis­ta Home Premi­um host with an Ubun­tu Server 8.04 guest.)
Read more…

Programming Club!

Hel­lo, fel­low pro­gram­mers! I’ll be post­ing use­ful in­for­ma­tion, prac­tice, tu­to­ri­als, re­sources, and all other things vague­ly pro­gram­ming-re­lat­ed here. Soon there will be post­ed a gen­er­al out­line of what’s go­ing to be hap­pen­ing this year, but for now, just let me say that we’ll be work­ing main­ly with web ap­pli­ca­tions and web de­vel­op­ment. It should be pret­ty ap­par­ent from read­ing re­cent tech­nol­o­gy news that the IT world is fo­cused on two main trends right now: web apps and the even­tu­al “web desk­top,” and of course server vir­tu­al­iza­tion. Suf­fice it to say that, after you’re through with this year’s pro­gram­ming club, you should have a very work­able ba­sic un­der­stand­ing of how the In­ter­net works and how to write ap­pli­ca­tions that are web-ac­ces­si­ble.

So with that said, our con­crete goal for the mo­ment is to be­come rel­a­tive­ly flu­ent in HTML and CSS. We won’t learn too much, just enough to un­der­stand how it all works and how to make it work for us. The­se two lan­guages will en­able us to cre­ate de­cent-look­ing web pages and will al­so provide the pre­sen­ta­tion lay­er of our later web de­vel­op­ment work.

Stay tuned for more in­for­ma­tion. I find this all rather ex­cit­ing, and I hope you guys do too!

Squid 3 authenticating proxy chaining

My school us­es an NTLM-au­then­ti­cat­ing proxy server, and this caus­es prob­lems with lots of ap­pli­ca­tions which don’t sup­port proxy servers. Many, many so­lu­tions have been pro­posed to this prob­lem, but I’ll fo­cus on one that I find par­tic­u­lar­ly ap­peal­ing: set­ting up a non-au­then­ti­cat­ing per­son­al proxy server which for­wards re­quests to the main proxy server.

**Up­date: use the [new ver­sion of this con­fig file][new­con­fig] - it works bet­ter.**
[new­con­fig]: http://non­graph­i­cal.com/2008/11/up­dat­ed-squid-3-con­fig­u­ra­tion/
Read more…

Call of Duty 2 problems on Windows Vista 32-bit

I found to­day that I was hav­ing prob­lems launch­ing Call of Du­ty 2 on Win­dows Vis­ta. I could not start ei­ther the sin­gle or mul­ti­play­er: both would crash and the Vis­ta “this pro­gram has stopped work­ing” di­alog box would pop up. A quick search on the In­ter­nets told me that this was def­i­nite­ly a com­mon prob­lem, and with the help of some pret­ty ob­scure fo­rum posts, I fi­nal­ly fig­ured it out. I’m go­ing to sum­ma­rize my so­lu­tion here for fu­ture ref­er­ence:

**Sys­tem en­vi­ron­ment:**

* nVidia graph­ics card
* Win­dows Vis­ta Home Premi­um 32-bit
* 2 GB RAM
* In­te­grat­ed “HD” au­dio

**The so­lu­tion for me:**

0. **Re­mem­ber to set CoD2 to com­pat­i­bil­i­ty mode with Win­dows XP SP2!** You can do this by right-click­ing the short­cut and se­lect­ing “Prop­er­ties”, then open­ing the “Com­pat­i­bil­i­ty” tab at the top.
1. First tried up­dat­ing Di­rec­tX 9. Vis­ta users should note that Di­rec­tX 9 and Di­rec­tX 10, while both com­ing pre-in­stalled on Vis­ta, are *sep­a­rate com­po­nents*. You should still up­date to the lat­est Di­rec­tX 9 even if you have Di­rec­tX 10. Un­for­tu­nate­ly, while a good first step, this didn’t work for me.
2. Then, added “+set com_in­tro­played 1” to the end of the short­cuts. You can do this by open­ing the short­cut prop­er­ties (see step 0) and adding those char­ac­ters, with­out quotes, to the end of the “Tar­get:” box, so that the full line looks like:
“C:\Pro­gram Files\Ac­tivi­sion\Call of Du­ty 2\cod2sp_s.exe” +set com_in­tro­played 1
This fixed the sin­gle-play­er for me, but I still could not open mul­ti­play­er.
3. I found on [NT­com­pat­i­ble.com][ntc] a seem­ing­ly-ridicu­lous lit­tle propo­si­tion. The poster sug­gest­ed that, to run CoD2 mul­ti­play­er, one should **plug some­thing in to the mi­cro­phone jack**. So, I did, and lo and be­hold, it worked! Rather a strange so­lu­tion, I do say. It like­ly has some­thing to do with the in­ter­ac­tion be­tween my in­te­grat­ed au­dio and the voice chat fea­tures of CoD2, so turn­ing off voice chat might al­low it to run with­out a mi­cro­phone plugged in.

[ntc]: http://www.nt­com­pat­i­ble.com/Call_Of_Du­ty_2_c12762.html

Any­ways, that’s how *I* got this game to work on Vis­ta; hope it helps some­body else too!

Google Chrome - first impressions

So here it is, fi­nal­ly: the le­gendary [Google browser][chromeurl].

[chromeurl]: http://www.google.com/chrome

And like ev­ery­thing else that Google puts out, it is a glo­ri­ous­ly in­cred­i­ble piece of work. It has the best char­ac­ter­is­tics a piece of soft­ware could have: it’s sim­ple, fast, re­spon­sive, and stable. I’ve been run­ning it for just a lit­tle while now, and while We­bKit’s ren­der­ing (espe­cial­ly of fonts) is slight­ly dif­fer­ent from Gecko’s, ev­ery­thing works just about the same as in Fire­fox… it’s all just way, way faster. Open­ing new tabs is faster. Us­ing Gmail is faster (thanks, no doubt, to the new V8 JavaScript engine). Writ­ing posts is faster. It’s re­al­ly quite in­cred­i­ble… in fact, pos­si­bly one of the most im­pres­sive open-source de­vel­op­ments to date, right up there with Fire­fox 1 and the Lin­ux ker­nel. [Give it a spin your­self and see][chromeurl].

Personal build - ultra-silent, uATX, gaming - part 2

I fi­nal­ly re­ceived my new moth­er­board and in­stalled it in­to my com­put­er. It runs quite well, quite cool, and very qui­et. Here’s the fi­nal de­tails on the qui­et cool­ing sys­tem:

**Fans/air­flow:**

* 2 x qui­et 60mm fans be­hind the CPU cool­er
* 1 x SilenX 60mm fan next to video card, dou­bles as case ex­haust
* 1 x 120mm fan in PSU, helps move air through CPU cool­er
* 1 x Arc­tic Cool­ing 90mm PWM fan on other side of CPU cool­er

**Heatsinks:**

* Ther­mal­take Big Ty­phoon (mod­i­fied) on CPU (re­moved fan and fan mount)
* Arc­tic Cool­ing Ac­celero S2 on video card
* Tu­niq Sanc­tum hard drive si­lencer/cool­er

Ef­fec­tive­ness? CPU tem­per­a­tures at 37-40 de­grees C at idle. Not too shab­by, I sup­pose. I’m plan­ning to use (and al­ready us­ing) this ma­chine for some se­ri­ous com­put­er work, in­clud­ing 3D pro­gram­ming and graph­ics. I’ve ac­tu­al­ly re­cent­ly in­stalled Vi­su­al C# 2008 Ex­press Edi­tion, and I’m find­ing C# (and Mi­crosoft’s IDE) to be an in­cred­i­bly pow­er­ful and in­tu­itive lan­guage. I think I might switch to us­ing C# in­def­i­nite­ly, un­til some­one writes a de­cent­ly sim­ple and pow­er­ful IDE for [D][dsite], my cross-plat­form lan­guage of choice. Oh, and fix X11 and give us *one* win­dow­ing toolk­it that works and has amaz­ing graph­i­cal tools while you’re at it, please?

[dsite]: http://www.dig­i­tal­mars.com/d/

I’m al­so run­ning VMware server (and hav­ing lots of prob­lems with that…) with an Ubun­tu 8.04 Server guest, to han­dle my req­ui­site Apache and MySQL stuff, and al­so to keep up with the very few Lin­ux-on­ly soft­wares I use.

DDvorak, a programmer’s keyboard layout

Some­thing I dis­cov­ered to­day: [DDvo­rak][dd], a key­board lay­out loose­ly based on Dvo­rak which caters specif­i­cal­ly to de­vel­op­ers or pro­gram­mers. There’s a [lay­out tester][lt] on the same site that mea­sures the over­all ef­fi­cien­cy of var­i­ous typ­ing lay­outs with any text that you choose.

[dd]: http://www.si­teuri.ro/dvo­rak/DDvo­rak.aspx
[lt]: http://www.si­teuri.ro/dvo­rak/

DDvo­rak, on first glance, is a com­plete­ly unortho­dox typ­ing lay­out. It re­quires com­ma as a dead key for many sym­bols, and Alt­Gr as a mod­i­fier for many others. Ad­di­tion­al­ly, many things are moved to un­con­ven­tion­al lo­ca­tions (BackSpace is where ‘B’ is on QW­ER­TY key­boards, for ex­am­ple). How­ev­er, the [lay­out tester][lt] con­sis­tent­ly mea­sures the ef­fi­cien­cy of DDvo­rak as sig­nif­i­cant­ly high­er than ei­ther Dvo­rak or [Cole­mak][cm], no mat­ter whether typ­ing English or code.

[cm]: http://cole­mak.com/

I think I’m go­ing to have to give DDvo­rak a try, soon, if on­ly I could fig­ure out how to rad­i­cal­ly change key­board lay­outs in X.org… of course, it’s easy with [Win­dows][msklc]. It wouldn’t be Win­dows if there weren’t a tool for ev­ery­thing.

[msklc]: http://www.mi­crosoft.com/glob­aldev/tools/msklc.mspx

« Newer PostsOlder Posts »

Projects

Pages


Articles

Reviews

Categories

Tags

Archives

Meta

Powered by WordPress
1.85 seconds