HNHacker News
TopNewBestAskShowJobs

cjh_

414 karma · joined January 9, 2013

followingthepath at gmail dot com
submissionscomments
cjh_··on Why 1 && 2 == 2
#include <stdio.h>

int main(void){ printf("1 && 2 = %d\n", 1 && 2); printf("1 || 2 = %d\n", 1 || 2); }

What were you doing?

cjh_··on Linus blasts again
I also quite like the bluntness in that it is very clear what his opinion is, I can easily understand where and how I went wrong and actively work to correct this.
cjh_··on Linus blasts again
"you are not your code"

an important lesson, learn it fast.

cjh_··on Probably not for hackers
thanks!
cjh_··on Probably not for hackers
If you have any more I would love one, email in profile.
cjh_··on Sublime Text Ctrl+P Like Fuzzy Matching In Few Lines of Python
I implemented something very similar in perl a few weeks back for my user interfaces project; I wrote a desktop search client that would take a query from the user and score results based on how many and how well it matches a series of different interpretations of the query (fuzzy was one of them).

I too am really amazed this isn't more prevalent as it is so easy to do, after discovering the vim ctrl-p [1] plugin I rarely go a day without using it.

[1] https://github.com/kien/ctrlp.vim

cjh_··on Bank robbery suspect wants NSA phone records for his defense
Very well put.

> Best chance for a conviction is to pretend the wiretaps never happened.

And this is why PRISM coming to light is a good thing as it gives the defense another reason to question intent, in the scenario above it would be Bob and Alice asking why Dan was staking out their house and searching their cars.

cjh_··on Warrant Canary
but your honour, by definition my stream is not(the godfather).
cjh_··on Where “nothing to hide” fails as logic
> But if everyone's secrets are unveiled, everyone benefit's.

I may be misinterpreting you, but I don't believe this is true. It only works if you find out other's have a similar or compatible secret.

If everyone found out you pick your nose and eat it, but no one else does it, how does that benefit the nose picker?

If bob finds out his boss hates him, and his boss finds out that he has racist tendencies, how does that benefit bob?

cjh_··on MYO - Gesture control armband
I think this has great potential for things beyond gesture control; if it can be accurate I would love to have one of these on each arm to replace my keyboard to allow me to type in the air (I have RSI).

That said, I am not spending a cent until you ship and get a lot of positive reviews.

cjh_··on Simple solution to the password reuse problem
One assumption in security / cryptography is that the process is always known, otherwise it is security by obscurity.

This is still better than password reuse as the plaintext doesn't disclose your other identified without further effort, however the users should be under no illusion of bullet-proof security.

cjh_··on Simple solution to the password reuse problem
I should have said 'possible to find the reverse'.

For a given length it is possible to find all the inputs that could generate a possible hash relatively easy (cheap compared to other one-way-hashes).

cjh_··on Simple solution to the password reuse problem
From the comments:

> I do something similar via a shell

> echo "masterpassword gmail" | md5

Please do not do this, md5 is not a cryptographic hash and is relatively trivial to reverse. Ie; is possible for someone to discover your 'masterpassword' given any one of your passwords generated via this method.

If one of your passwords is leaked then it is possible for an attacker to brute-force this to find out a list of possible 'masterpassword foo' combinations (although not knowing the length increases the search space).

If one of those foos is 'gmail' for your gmail password then it is game over.

Even if your foo is not similar to the service, if the attacker is able to get 2 of your passwords then the search-space is much smaller (looking only at the overlap of the reverse of both md5 functions).

This may not be relevant if you only take a 'random' sub-sequence from the generated md5, thus only disclosing part of the hash to the attacker.

cjh_··on Secure Boot isn't the only problem facing Linux on Windows 8 hardware
Many desktop machines still do, and most of the modern motherboards in full or mid-tower size still have a PS/2 port or two, for laptops PS/2 support is almost non-existent.
cjh_··on The house I was born in sold for $4000
Location. It may be possible to build a house for $12000, but land isn't free and the location of the land is part of determining it's price.
cjh_··on How far can you overhang blocks?
If you do this so that the top brick is overhanging by half it's length and then place another brick on it, the first brick is no longer the top brick so this no longer applies.
cjh_··on Tim Cook tells Congress why Apple won’t move $100 billion back home
You are only taxed for the difference between your US taxrate and your place of residency's taxrate, this means for many citizens the tax paid to the US is very little or even $0 (but they still have to go through the trouble of filing).
cjh_··on Repository redirects are here
At least with username level redirects this decreases the number of available usernames, unless this is somehow taken into account.
cjh_··on Etsy accused me of not assembling my synths by hand and shut down my shop
That could be due to other reasons, I prefer email correspondence over phone calls as it allows me to carefully think about my reply and documents it 'for free', and in the case of legal matters I can see this as being useful.

But at this point this is all pure speculation.

cjh_··on Etsy accused me of not assembling my synths by hand and shut down my shop
If you live nearby is it possible for an Etsy representative to come and watch you manufacture a single item?

This way IP is kept relatively confidential, unless the viewer can remember every single detail and I doubt this unless they are very skilled with building electrical components. You could also get them to sign a non-disclosure agreement if you are concerned.

I also agree this seems unfair, many of the products on etsy don't seem to pass this same test.

cjh_··on Kickstarter project raised $196K and stopped responding
As soon as I saw how much over the minimum it had gone, I too had the same thoughts.

However I am not so sure about a kickstarter imposed maximum, as certain projects (say non physical goods) can grow indefinitely (in terms of the quantity of the product given out) but have a minimum amount before they are able to bring the product to market.

I think it is more useful for the creator of the kickstarter to set a minimum and optional maximum.

I also quite like the idea of holding some amount in escrow until progress has been made (maybe anything over twice the minimum or similar).

cjh_··on Go 1.1 is released
http://golang.org/doc/faq#generics
cjh_··on Bitcoin Network Speed 8 Times Faster than Top 500 Supercomputers Combined
It is a common term in concurrency and parallelism that refers to a specific kind of task [1]

[1]http://en.wikipedia.org/wiki/Embarrassingly_parallel

cjh_··on Modes in UI are bad; even worse are timed modes
haha yes, very common to the point where I no longer have a capslock key (my keyboard is programmable, so I nuked it).
cjh_··on Modes in UI are bad; even worse are timed modes
Good points, displaying the mode isn't enough as you cannot guarantee that the point of display will be sufficient to keep the mode as the user's locus of attention.

In vim I get around this by habit, I stay in command mode and only enter insert mode for text entry, and then at the end of a 'unit' of text entry I return to command mode.

Thus I always know when I am in insert or command mode by asking 'am I currently entering text', for me hitting ctrl-c after finishing a sentence is part of the act of writing the sentence.

cjh_··on Modes in UI are bad; even worse are timed modes
The definition of modes given by Jef Raskin in the Humane Interface (Page 42):

>"An human-machine interface is modal with respect to a given gesture when (1) the current state of the interface is not the user's locus of attention and (2) the interface will execute one among several different responses to the gesture, depending on the system's current state."

According to this definition an interface is not modal if the user is aware of the current mode at all times.

I am a vim user and have developed a habit of only ever being in insert mode when I am typing, after each unit of input I return to command mode. Using this approach modal error is very minimal.

I then remap away all the modes that cause me issues (record mode is a common cause of modal-error for me).

cjh_··on We got hacked
I read this as 'give a shirt' so I was reading the article the whole time wondering 'who gets the shirt?'.
cjh_··on U.S. citizens ditch passports in record numbers due to high taxes
It is more that the USA is one of the few countries that taxes on citizenship rather then residency, so this means that if you are living in another country you are still dealing with USA tax laws as well the tax laws of your country of residency.
cjh_··on Linux is not about choice (2008)
For the most part, sound is not still a problem.

I commonly use 3 machines where I want sound (work,home,laptop) running a variety of different distros (arch,debian,ubuntu) and sounds works for me in all of them, mostly alsa although ubuntu is pulseaudio.

In the 99% case it just works, the only config I have to do is for my external DAC and that requires a few line config file (telling alsa to default to using my DAC rather than the first card it finds)

cjh_··on Linux is not about choice (2008)
I think GP's point was that you either 'deal with it' or find someone else (a packager for a distribution) to deal with it on your behalf, if you are having issues then a distribution is a possible solution.
← PreviousPage 2 of 5Next →