Hacker Newsnew | past | comments | ask | show | jobs | submit | more datphp's commentslogin

Your code doesn't work...

The catch will never be called, and you should never use isset() because it will return false if the value exists but is null.

    whatever->param = null;
    whatever->param = 123;
Both lines will execute here.

    function __set($k, $v){
        if (array_key_exists($k, $this->Properties)){
            throw new ReadOnlyException();
        }else{
            $this->Properties[$k] = $v;
        }
    }


Yes, thank you. I noticed the problem after it was too late to edit. Slightly embarrassing.


I've seen several schools decide to implement mandatory functionalities using ActiveX...

You know the thing that forces you to use the most dreaded program of all times...

Edit: I hope you were /s'ing


>You know the thing that forces you to use the most dreaded program of all times...

lotus notes?


Internet Explorer.


Dumbest comment I've read all week


No I'm really questioning this. I have both OSX and Ubuntu machines. For command line tools they are equal. Absolutely everything that works on Ubuntu (CLI app) works on OSX too. So what's the Linux advantage when you already paid for OSX?!


Package management is harder with OSX. With Linux, I can install everything from the commandline with an OS supported utility (e.g. yum).

With OSX, I'm left with 3rd party installers like brew which never really line up the dependencies completely.


Package management, kernel modifications, the ability to know whether or not your machine is back-doored, among other things. The ability to run an OS that will actually run on other hardware. The fact that it's open source also has a lot of indirect value to many of us as well.


I was with you until you implied Linux can't be back-doored. There's nothing about Linux that makes it immune to rootkits or backdoors despite what the hype would have you believe. Remember, Apple used to say the same thing about Macs, but you don't hear a lot of that rhetoric nowadays.


It's funny to see a guy who spent time on Google to research and answer trivial questions for points call people with more points than him "no-lifers".

Then there's the part about giving fishes instead of teaching how to fish. Duh. That's what the site is about. It's a resource for fishermen. It's a nice place to get samples of fishes you haven't heard of. You're free to just eat them, or study them further.

SO is amazing as a super cheat-sheet. It's not a tutorial, a school or a a forum. It's not Reddit or Farmville. Please stop.


Interesting thing that is happening right now in South America:

Somebody hijacked some servers from Movistar Peru / Argentina, and are serving a modified file for Google ads / analytics JS.

Here are some hijacked URLs: http://www.googletagservices.com/tag/js/gpt.js http://www.google-analitycs.com/ga.js http://pagead2.googlesyndication.com/pagead/show_ads.js

The LinkBucks script they serve instead: http://pastebin.com/mYYpYDkR

The script basically hooks mousedown on the whole page, and redirects you to http://dca14d4e.megaline.co/url/ORIGINAL_URL


In my opinion implementing the deletion of data in a way that can be forgiven by the user (and even worse API) is a bad idea. It's like burying unexpected clauses in the middle of a 50 page terms and agreements.

It's definitely not illegal or reprehensible, but anyone doing *aaS has exponentially more knowledge than it's users and knows it. Anyone who has once tried not to impose minimum password complexity knows what I mean.

To me it seems that data cleaning should be something you choose as you purchase the service. I understand that cost might be a factor in this particular case, but in then why not communicate about it and make a premium or discount system? It would probably come in good light to both users with sensitive data and those who don't care.


"Problems just become simpler"... here is my story about that!

I've smoked ever since I was 14. Most of the time about once a week, at times not smoking for a year, and sometimes all day for months.

Smoking very frequently has a negative effect on me when it comes to business. I have more trouble finding motivation and caring, I am less in control of myself and get along less easily with people.. I become a feral hacker pretty fast.

On the other hand, I find a lot of benefits in smoking occasionally.

It seems pot disconnects you from your "hard-drive". You have problems pulling data that is otherwise readily available, and much that happens when you smoke doesn't seem to get stored at all.

So what's the advantage? Well, it doesn't seem to affect what's in your "RAM". You're like a super AI with a completely fresh storage and barely any data. Now data in most cases is useful, specially when you're trying to reproduce things that worked previously. When you hit a wall though, it can become a burden.

Most of you probably remember the sentence "You must unlearn what you have learned"! Except in this case, you lose factual data, but not cognitive processes. You certainly won't suddenly be able to levitate, but it's amazing what the brain can come up with when you lose track of all the common practices.

I've done a year of math prep in one of EU's hardest universities, and it was amazingly hard. Trying to solve any of the problems while high would lead to a ton of execution mistakes (copying stuff wrong, losing track of what you were doing etc), and was generally bad. Being slightly high for a test would cut my grade in half.

On the other hand, on many occasions, I spent a couple hours attempting to solve something from any possible angle and failed, like solving a rubik's cube and always coming back to the same configuration. Then at some point, later in the day or week, I'd think about that problem again while being high, and have my mind elegantly walk through the complexity of it and see the solution.

I spoke about it with people at that school who smoked, and most of those who were naturals at math seemed to have had the same experience. Ever since, I've had it happen to me on many occasions about different implementation/design challenges. I've worked with other people who were occasional smokers, and sometimes when failing to solve problems (more policical / vision related than technical), mention them again when we were high, and have extremely interesting things come up.

Obviously you want to review / implement / apply those new ideas when you're sober, because you need to run them through your experience and memory extensively, but weed can be a great source when you need an alternate angle of approach.


I certainly understand your point. As a developer and power-user, keeping independent components well separated is something pretty obvious for both ethical and technical reasons.

What I don't like about this kind of argumentation is that it comes from an idealistic point of view (that I share), which isn't appropriate at all when analyzing a billion dollar company strategy.

Obviously at some point most big corporations are going to do stuff that completely puts off the elite. "Don't be evil" only lasts for so long (while building hype), and quickly "How much will that earn us" is all that's left (monetizing said hype).

I hope you realize that 99% of the profit of Google or Microsoft comes from masses of people who don't really understand anything that's happening, and click "next" and "accept" hoping they won't hit a wall. Did you ever click an Adword banner (except out of curiosity to see what's behind, using a private tab)? Do you purchase stuff only because it's presented to you as the next thing that justifies getting behind on your credit card payment? Neither do I.

Being the 1% is frustrating at times, but that's what we are. The 1%. Sometimes it's worth doing small things to please us, most of the time it's not.


Correct me if I'm wrong, but I doubt ATMs are connected directly to the internet.


They are, and if you flip one hardware switch inside you go into diagnostic mode and can print out the IP and all config information and trivially reconfigure without any sort of security or logging. The days of expensive dedicated lines are long gone. Most ATMs run off of the bank location's LAN, which given the quality of regional banking IT is not secured all that well.

A lot of the machines I worked on in remote locations (in highrise offices away from bank locations) were hooked up through the building's wifi via a wireless router sitting unsecured on top of the machine, just out of sight. I mean, you have easy physical access to the connections in that case.


I like lurking around SO as there is a lot of good knowledge flying around, and I've seen my share of closed questions.

Honestly, I hate the abuse of power you see on many forums, but I've never seen a topic closed without appropriate justification.

SO is meant to be a place to ask for a solution to a specific problem you've narrowed down as best as you could, not copy-paste a bunch of stuff you don't understand for people to analyze. I think it's awesome, because it keeps the quality very high, and makes it an extremely useful resource to quickly find solutions to not-so-obvious problematics.

Posting links to some of those threads would help having a better look at what you've witnessed though, maybe as someone said it's specific to certain areas of the site?


Consider applying for YC's Winter 2027 batch! Applications are open till November 2.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: