git add –patch and –interactive

I knew about git interactive staging for a while now, but I’ve never really used it.  Most days I work on a single feature or bug fix at a time and can commit sequentially, one change after another.  For an occasional mess, I found git interactive staging user interface too be too cumbersome.

The last couple of days at work were quite chaotic, with me jumping from one thing to another, and I decided to master that feature once and for all.  Looking for a better tutorial, I came across this blog post, which covers the interactive staging, but also provides a much simpler approach – “git add –patch“.

It’ll take some practice to get it into my finger memory, but I think I’m settled now.

Graphical vi-vim Cheat Sheet and Tutorial

Graphical vi-vim Cheat Sheet and Tutorial is yet another attempt to explain and visualize Vim commands to the editor’s new users.

This is a single page describing the full vi/vim input model, the function of all keys, and all major features. You can see it as a compressed vi/vim manual.

Using non-breakable spaces in test method names

Using non-breakable spaces in test method names is a great example of how something can start as a joke and quickly turn into something very practical and useful.

if we decide to not follow PSR-2 naming for test methods because of readability, we might as well use non-breakable spaces since it’s even more readable…

Why So Many Top Hackers Hail from Russia

Brian Krebs has an interesting post on “Why so many top hackers hail from Russia“:

Conventional wisdom says one reason so many hackers seem to hail from Russia and parts of the former Soviet Union is that these countries have traditionally placed a much greater emphasis than educational institutions in the West on teaching information technology in middle and high schools, and yet they lack a Silicon Valley-like pipeline to help talented IT experts channel their skills into high-paying jobs. This post explores the first part of that assumption by examining a breadth of open-source data.

Overall, not very surprising, but the details and references are interesting.  It seems a lot has changed since I graduated (back in 1995).

Via Slashdot, which also has some insightful comments.

How real is real? Or is it all fake?

Jason Kottke blog links to an interesting article about a guy submitting a fake, as in computer generated, image and getting his real French ID card.

The photo I submitted for this request is actually a 3D model created on a computer, by means of several different software and techniques used for special effects in movies and in the video game industry. It is a digital image, where the body is absent, the result of an artificial process.

The image corresponds to the official demands for an ID: it is resembling, is recent, and answers all the criteria of framing, light, bottom and contrasts to be observed.

The document validating my french identity in the most official way thus presents today an image of me which is practically virtual, a version of video game, fiction.

The article also links to a different image study, done by, supposedly, Google Street View camera, and then, possibly, manipulated in Photoshop.

I’ve been involved with some regulated industries (like Forex) which require proof of identity and residence, all submitted digitally (via email or web form file upload). There’s always a fair amount of obviously fake images sent in.  But the above two stories beg a question of where does one draw a line.  With the recent technological advances and an increasing reliance on digital ways, how can anybody reliably validate an image as fake or real?

I don’t have an answer, but I think the only way here is to fight fire with fire.  As in use technology to do image analysis, rather than an untrained human eye.  Are there well known or well established tools that can do the job?  Not sure about well known or established, but at least some tools do exist.