[extract from book Version Control with Git]
Tracking the renaming of a file engenders a perennial debate among developers of
version control systems.
A simple rename is fodder enough for dissension. The argument becomes even more
heated when the file’s name changes and then its content changes. Then the scenarios
turn the parley from practical to philosophical: Is that “new” file really a rename, or is
it merely similar to the old one? How similar should the new file be before it’s considered
the same file? If you apply someone’s patch that deletes a file and recreates a similar
one elsewhere, how is that managed? What happens if a file is renamed in two different
ways on two different branches? Is it less error-prone to automatically detect renames
in such a situation, as Git does, or to require the user to explicitly identify renames, as
Subversion does?
In real-life use, it seems that Git’s system for handling file renames is superior, because
there are just too many ways for a file to be renamed, and humans are simply not smart
enough to make sure Subversion knows about them all. But there is no perfect system
for handling renames…yet.
Archive for the ‘Tech’ Category
“Buy once, read everywhere”, I love this statement of Amazon Kindle.
I’ve used Sony Reader for a year. I chose it over Kindle because of its touch screen. Double-tap to look up words is a good feature.
Then I saw Kindler for PC, Kindle for MAC. I didn’t get Amazon’s idea until I installed Kindle for Android lately. Yes, that’s “buy once, read everywhere”. The most annoying thing of DRM is the binding to device. Digital is supposed to be read on multiple devices. What’s the point of binding to one?

Amazon knew this. It sees itself a platform, rather than a reader manufacturer. Sony is still a manufacturer. If it wants to get its slice in the ebook market share, do something. Ditch the stupid DRM.
I’ve been traveling with some colleagues to Jeju, South Korea this week. Something is unexpected: free wifi can be found in many public area. Checking in 4sq becomes easy.
But we still found going around the city not easy due to the language barrier. For a city whose income comes mostly from tourism, it should make the navigation much easier.
Free mobile data plan for tourist is a good start. Let tourist rent a sim card in the airport, for free os at a very low price. The city might also provide free navigation software, android and iPhone. Users Can display information of a place multilingually.
In fact, this job can be done by google. Google already has geo data in many languages. Google need to provide an offline version of google map. And the city just need to cooperate with google in data gathering, or at least don’t get in the way.
As Beijing is taking some measures to apply more strict control on internet map services, we can predict there could be some day Google Maps/Earth is blocked in China. No matter what the reason is, censorship or economic interest, Chinese internet users still need the good service of Google Maps.
It may be not just a technical problem. But google can do something technically to help some Chinese internet users to go around the blocking.
Foursquare was blocked several days ago. And there is a developer who wrote a very simple php program to build a proxy. https://code.google.com/p/ls-api-proxy/ So we can modify the official Foursquare software to insert the Custom API on our own hosts. Foursquare can be used on the cellphone again.
We need the same function on Google Map Apps(especially on mobile device), which is allowing us to set custome API. Please consider adding this feature to your next version. Thanks.
Source: Custom API Support Needed
“Oops… How did you figure that out?” I thought when @czbug, a very smart colleague of mine, gave me the initial password of my new account. That’s exactly the password of the wifi router in my home.
It’s not hard to guess, not a strong password after all. There are rules telling me not to put birthday or the name of my family member in my password. All of them are broken.
But this is just of my router. Of course I don’t use such weak password for my gmail account. But my gmail account password is still not strong enough, not including symbols and capital letters.
For login password to my computer, it’s even simpler. I’m so obsessed to the single-handed password. No matter how I change it, the login password must be able to be inputed with a single hand, left or right. That means the keys converge either in the left or the right section of the keyboard. My theory is that I can always finish the repeated boring password input without putting down my mug. I think that’s already safe enough. If the IT guy wants to break into my computer, he could just boot it with another portable disk. Brute force is never necessary.
When you have hundreds of online accounts, how to specify password will be a headache. Since they are from websites of different security requirement, you can’t just use same password for all of them. But you can’t possibly remember all of them if they are all exclusive.
The approach I use consists of two steps. First, I categorize them as important or irrelevant. Then for the latter, I use all the same simple password, birthday is OK. For the important accounts, I don’t use the same password, but I use the same algorithm. The password is calculated according to the website name, trademark or something.
I’d been pretty satisfied to my approach, until someday I found it is still vulnerable. I’m not always so sure about the security of the website. Actually I will never know. So it’s highly possible 4 or 5 of them will be stolen. With those disclosed passwords, hackers can easily figure out my algorithm. So, for my very important account, like gmail, I use a unique password, staying away from that algorithm.
This is becoming more and more complicated. If I dwell on this, it will drive me crazy. So I just switch to other questions: How safe is enough? How much damage can I afford when password is lost?
For online payment account like Paypal and important account like Gmail, I use unique and complicated passwords for them. Other relatively important account, I may just take that risk, sharing the same algorithm between them. In case I lose them, I can still reset them and get the new ones from my gmail account. Of course, I’ll permanently lose them if the websites let users change email setting without any verification mechanism.
I can use an encrypted text file to jot down all those unique passwords. But that’s very counterproductive. I’d rather lose the account.
One of my friends said he uses random password for almost every website, using the ‘save password’ function of the browser to save it. If he loses the password, he just resets it and gets a new one through email. This idea is not bad, except that it will be a nightmare when you’re using it on multiple computers, including cellphones.
Hi,
I’m located in China, where Twitter is blocked by the government. So when I use Twidroid, I’ve to specify an custom API, a twip API on my own server in US, rather than using the default official one. Everything is fine except for the List part. In the home screen, open the menu and choose “view list”, nothing will show. I tried many times and finally figure out how to work around it. I connect my phone to an openvpn, which enables me to connect to twitter.com. Then I add another account, set it to the default type. I could load my lists then. And I delete the official site account, disconnect my vpn and switch back to my custom api account. The lists are still shown, which are cached I guess. From now on I can access the timelines of those lists smoothly. What I should not do is trying to refresh the list of my lists, which could empty everything.
My custom API is ok, many other software are using it, the list function works fine. I guess the bug is from the api call of loading the list of my twitter lists. Maybe that call is not through the custom API, but still be directed to the official twitter.com. Then it’s blocked by the firewall of Chinese government. Please look into this. Thank you very much.
Best regards,
Raymond
There is no online privacy at all. When you decide to write or do something online, you’d better be ready for a full exposure to the public, no matter what the terms & agreements are.
When I was reading the simplified version of Facebook’s privacy setting, I still felt confused. To be fair, it is much simplier than its predecessor. But it’s still not easy to choose. For many people, maybe just choose the ‘Recommend’, letting the system make decisions for you. Facebook will love that.
Maybe your privacy is well-protected now by the service provider. But who knows whether in the future it will merge, cooperate with or even be acquired by a company controlled by a North-Korea-friendly regime. By then, do you want to or remember to delete all your data? Even you do so, your data can still be recovered from backup archive. In this case, privacy leak is not the first thing to be worried about.
Will a programming language or a platform die? Sure, especially when self-evolving is regarded as some sort of death.
When we were discussing EJB3 and JPA in a tech-sharing discussion, a guy got a little bit emotional when we talked about the downfall of EJB. We later found out that he had used EJB to do some projects in college. That explained a lot. It is some emotional attachment. We, as human-beings, may all has such feelings, right?
Later I read a following statement in an email: such great technology won’t die.
I think it’s simply not true. Great technology dies either, just like great man dies, too.
I had a friend who found his fist job for a telecom company, which used Cobol language. Of course he switched to Java when he switched job. I think I can say Cobol is a dieing language, if not already dead, from application developer’s prospect. And what happened to my friend? He is a shrink now, helping his patients with their mental problems. In his view, programming with any language is dead(maybe dead end, to be precisely).
It’s not important whether a technology dies or not. Just make sure you’re not the last one to know and always be able to find the exit.
I had this feeling before. But I didn’t figure out that word, coercion, until hearing in in one talk show about Facebook.
Yes, if all your friends are using Facebook to interactive, it is sort of a coercion. It looks like that you still have a choice, but actually you don’t, not in the way they care.
This is like pop music star. The best way to beat it, is to work out more attractive alternatives.
Greasemonkey is so easy. If you are familar with JavaScript, you’ve literally already known it.
With the help of the free PDF from diveintogreasemonkey.org, learning and finishing my first app only took me an hour. I’ve not finished the book yet, and I don’t have to.
The first one is simple, just replacing some keyword in the web page. And I finished my second app this morning. It can help me fill the form automatically, quite useful when I need to bulk-register lots of account.
It’s an itch-scratching product, with very flat learning curve.