Better HN
topnewbestaskshowjobs
Log inSign up

phpnode

7,416 karma · joined Oct 23, 2009 (17y ago) · 1,582 submissions

Founder of https://codemix.com/ - authoritative product context which makes sure coding agents build the right thing and humans stay in control.

Email: charles@codemix.com

Submissions

comment 13y ago · link · parent

Yii can also do client side validation (without an ajax call) for most of its built in validation rules.

comment 13y ago · link · parent

He's doing his best to be comparable to Google and it provides a thin veil of legitimacy. The core business will still be based around copyright infringement, this is all just "plausible denyablity" in action. Interesting to see how it plays out.

comment 13y ago · link · parent

don't get me wrong, i love linux, but this is seriously dishonest, especially the "Forget about drivers" section http://www.whylinuxisbetter.net/items/drivers/index.php?lang...

comment 13y ago · link · parent

please don't help perpetuate the phrase "alternative medicine", if it was effective, it would just be called "medicine". A better description would be "Deepak Chopra, the charlatan"

comment 13y ago · link · parent

If they did that, every other country in the world would be within their rights to enter British embassies and detain people they don't like. That would not be a wise move

comment 13y ago · link · parent

It's a lovely tale but it stinks of fiction, it's a little too good to be true.

comment 13y ago · link · parent

My son is also starting to enjoy Duplo, he's mostly using my old sets from about 1986 and they stick together really well. For christmas some relatives bought him a new duplo set and it is noticeably less sticky. I suspect they're trying to make it easier for very young children to casually play with, but it comes at the expense of being able to make the really tall structures that kids inevitably want to build.

comment 13y ago · link · parent

sounds about right. I don't think anyone would choose Smarty for actual technical reasons at this point. I personally think plain PHP makes a far superior templating system. Smarty is slow, doesn't "protect" designers from any complexity because it's complex itself and is yet another thing to learn.

comment 13y ago · link · parent

JSON cannot be used for evil, unless you have permission from Crockford: http://www.json.org/license.html

comment 13y ago · link · parent

it is really horrible, just use isset().

comment 13y ago · link · parent

It'd be better if you told us why you are using Smarty in the first place. I suspect a lot of places use it simply because they've heard a lot of other places use it.

comment 13y ago · link · parent

There should be a big fat warning in front of this very bad advice, and I particularly dislike the last paragraph about intercepting error handlers to cover up your ugly hack.Some newcomer is going to run with this idea without understanding the many, many problems it can introduce. Until 5.4 the @ operator caused dramatic slowdowns on everything it touched because PHP had to jump through hoops to suppress the errors. It's funny to see someone advocating using it for performance reasons now. If you need a mutex, you should use a mutex.

Yet another reason not to use smarty I guess.

comment 13y ago · link · parent

kjackson2012 your account is dead - you've accidentally triggered a spam filter

comment 13y ago · link · parent

projects like this are why coffeescript needs to support macros. There are so many coffeescript dialects out there that make minor changes to the language to accomodate one or two extra features, e.g. IcedCoffee. I don't want to have to use a separate, presumably less well supported language for this kind of stuff, just let me plug it in!

comment 13y ago · link · parent

thanks for this, $15 for the ebook == immediate purchase

comment 13y ago · link · parent

Yours is such a wilfully ignorant post, I'm not sure where to begin, or even if it's worth replying...

How do you explain the countless genocides in countries where guns are or were freely available? What about the Soviet dissidents that were exterminated before 1929? Would widespread availability of guns have prevented the holocaust - of course not!

It is the people that have the power to prevent genocide, not guns.

comment 13y ago · link · parent

Please answer all my questions rather than just sniping at one of them.

How are your small arms going to defend against tanks, apaches, drones and the rest of your government's military might? Your reasoning is at least 60 years out of date. The prevalence of guns in america is a cancer on the american people.

comment 13y ago · link · parent

Your comparison of gun related deaths to natural deaths is completely nonsensical.

How about this, the USA has both one of the highest murder rates, and some of the most relaxed gun laws in the first world. I am 3.5x as likely to get murdered in the USA compared to the UK. Around 66% of murders in the USA involve a firearm compared to 7% in the UK.

I am 33x as likely to be shot to death in the USA compared to the UK.

Don't you think that someone with easy access to a gun is more likely to commit murder in the heat of an argument compared to someone who doesn't?

Do you really believe that easy access to guns is a good thing?

Do you really believe that having access to guns will prevent a dictatorship in the USA? I don't. I think that would ensure a bloody civil war. As someone else on here pointed out recently, non violent mass protest is far more likely to effect change because a striking workforce can cripple an economy rather quickly.

comment 13y ago · link · parent

Guns are tools that kill. They have no other purpose. How anyone can defend the concept of gun ownership in a civilised society is genuinely beyond me.

comment 13y ago · link · parent

levers as in how to operate a specific kind of lever/switch or do you mean "teaching" the abstract concept of levers? e.g. recognising that this thing can be used as a lever? The latter sounds much harder

comment 13y ago · link · parent

I agree that you could potentially reduce the search space based on rules, but English especially is not well known for it's adherence to rules, see http://en.wikipedia.org/wiki/Buffalo_buffalo_Buffalo_buffalo...

Conversations like this are why I come to hacker news.

comment 13y ago · link · parent

Long sales pages convert. There are a few reasons, one is that long pages give you the chance to pre-empt and answer each and every question or concern that the customer might have. The other reason is that merely by spending a long time reading your sales page, that person has made an "investment" (of their time) in what you're offering, and now they want to get something for that investment.

comment 13y ago · link · parent

I think that just comes down to numbers. There are only about 40 million people in Australasia compared to 740 million people in Europe and 312 million in USA.

comment 13y ago · link · parent

If you've ever tried to do this you'll know that while it works in theory, getting it working in practise is much harder than you'd think. In the past I've tried to create acapellas using a song and its instrumental (both digital recordings taken from the same source) using this technique and even with the highest possible quality digital audio the results are mixed at best.

comment 13y ago · link · parent

The problem is that you have no hints about what is correct or not because presumably a one way hash is being used, so even if you get the first 29 words right, you don't know that.

Assuming the cracker just uses a wordlist containing 200,000 terms and unsophisticated brute force, this thing could crack a 3 word password in a day and a 4 word password in 800 years[1]. It would certainly be an interesting project, but I honestly think this is a safe approach for now.

[1] http://www.wolframalpha.com/input/?i=%28200000**4+%2F+63+bil...

comment 13y ago · link · parent

I thought about that, but presumably since so very few people use sentence based passwords, crackers don't optimize for this use case yet. Regardless it's quite a long sentence and that should afford some additional protection against this kind of attack, i can imagine 3 or 4 word sentences being defeated by this kind of technique, 30 words seems a lot more difficult

comment 13y ago · link · parent

Honest question - what can you do with bytecode that you can't do with javascript? Modern javascript is fast and ubiquitous and is clearly not going away anytime soon. Isn't the human readable nature of javascript more suitable for debugging anyway?

comment 13y ago · link · parent

or you can literally write the whole sentence, which is even more secure and you don't have to remember any special rules, just the sentence itself. Of course it's more typing:

    Guess what? Back in 2009 I saw a uniquely attired man traipsing round local places with a high number of legs, necks and shirt collars.
136 characters or 14 Gigayears to crack. Wow today I learnt that there's such a thing as a Gigayear.

comment 13y ago · link · parent

they could be doing something as crazy as putting the key in the "share this" URL. If they put it after the fragment then it doesn't get sent to the server and they can continue to deny having the ability to read file contents. Someone did a "Show HN" with a site that did something similar a month or two back.

Presumably mega then don't offer a site search but instead rely on google to index warez forums with links to the site that include the decryption key. I don't know.

Edit: found the site that did this: http://news.ycombinator.com/item?id=3852649

1
434445
53