skysight-inc/HackerNews huggingface dataset:
I don't advocate a completely if-less style, but I do often grep and count ifs and elses in a code base before digging in, just to get a sense of what sort of developers have been there.

I think the if-less style is great kata material. You learn a lot when you apply it on a toy project rather than a real one. Sometimes you need to overdo things in order to understand what their limitations are.
You know, I was wondering the same thing. I am guessing it is to protect websites against bots or something.
Ubuntu will be ‘all about mobile’ in 2013
http://www.j1nx.nl/xbmc-allwinner-a10-apologies-received-acc...

According to what XBMC devs say - it doesnt work at this point, and there is some online drama going on ;-)

Although i would be super happy to see progress on this.

One of the links you gave me:
"Allwinner officially only supports the Mali GPU driver on the Android platform only." :(
Is pattern matching really that different from switch statements, which are really just fancy if statements?

Trying not to sound sarcastic, but if people are for if-free programming, pattern matching does not seem to be the answer for me. When I add a new type in haskell, I usually find myself having to look through all my pattern matchings.
This is getting ridiculous

" ifs are a smelly thing in a Object Oriented language."

What's smelly is such a absurd assumption. Yes, let's replace every small decision in our program with inheritance and another level of abstraction, that will work out swell

Please go read an Assembly manual because you have obviously forgotten what a computer is and does

And then we end up with unmaintainable systems with a class hierarchy higher than the Empire State.

Of course, as mentioned, replacing an if with a "software structure" (like pattern matching in an functional language) is beneficial, but to call it a code smell is ridiculous
But when you're accounting for brute force attack, you can lock out an account for a certain number of incorrect tries. A bot wouldn't have a chance to correctly identify the pin unless it ran the correct combination in the first 3 tries.

With the use of all alphanumeric chars - it would be even greater security. The only risk I see is if people consciously decided to use 111, aaa, bbb etc and those of the like.

But you can also block these pins from the jump so people can't use them.
"Works in cents" can be generalized for an integer with implied decimals. 4 or 5 decimal places gives you plenty of room to work with if you are just using a double to exactly represent an integer value.
I wish the best of luck to this man.
How Canada has become America’s mobile app guinea pig
Cool story.My girlfriend is a flight attendant.
I hear a lot of stories from her and it is very common to ask if there are any doctors on the plane.
What crazy is that people in-flight non stop (we just don't hear about it). Anything from heart attacks to other health problems, even just because they are old.

Sometimes they will put a blanket over the body, sometimes they will pretend that the person is sleeping. Depending on the situation.

I don't really get into the details but that's the scoop.

=)
the Dev Console has an early early early (you get that?) version of what our console UI will look like.

Can somebody explain the joke?
Could you comment on getting Linux up and running with the ODROID boards? I'm thinking of using one of them for a hardware project and even though I haven't really looked into it yet, it seemed to me that a full blown distro was not ready yet.
If you put it in a script tag you need to ensure you escape </script>. Though, it is probably safer to escape <, >, and & just to be sure.
You only need to make a lasting difference for one new person in your life. That way, the chain isn't broken. Anything on top of that is a bonus.
Why I Don't Use ActiveSupport::Concern
Don't. Just don't. Do you think Da Vinci would've painted just with oil because people think real painters work just with that? No he didn't, and so you shouldn't too.

Don't limit yourself just to blindly comply to some silly idea. Use everything you know to get the job done, and once you get it working, make it beautiful.

If statements are an incredible tool. Just ask any Erlanger and they will either tell how much they miss it, or just lie to your face. ;)
Yeah, I've seen people go down this path. In the next step they realize they need an if-statement to determine whether to instantiate a PDFPrinter or a MSWordPrinter. Which they conveniently hide inside an AbstractPrinterFactory or a ComplexPrinterBuilder. This is probably how the whole Enterprise Java thing got started.
I0n1c: Jailbreak for iOS 6 Will Be Available On Saint Glinglin Day
The database containing everybody's PINs will be stolen. Even if you use 8 digit PINs and they are properly hashed, they will get brute-forced rather quickly. Any longer and people will not be able to remember their PINs or will use the same PIN with multiple websites --- exactly the same problems we have with passwords.

(Am I saying that security questions are secure? No.)
I second the question, pattern matching is cool for destructuring or for completeness checking (not sure those are fundamental properties of pattern matching though), but it does not solve the problem of adding new behaviour without changing existing code any more than an `if` does.
What world’s 3rd largest Internet population is like
I don't think it's a joke, just reaffirming the repetition to ensure people are expecting a more complete design.
Global Experts Predict Social Media Marketing Trends For 2013
Vulnerability in HTC website allow attacker to hijack accounts
Tata was first of all a trading company only in 1898, now it is a diversified business conglomerate, accusation of Corus Steel, Jaguar and Land Rover, and recently a hostile big for a international hotel group are just how far reaching the Tata has been.

The baton has been passed on to a new person now, lets see how it goes. Mr.Mistry is like Mr.Cook of Apple, while Mr.RN Tata was like Mr.Steve Jobs of Apple. Well thats the laymans perception of the new head.
I agree. The null coalescing is just a syntax sugar for if. While it should be used, it is not the right example in this context.
Build Your Own Iron Man Suit
Not endorsing, but much more expanded by the Anti-IF campaign http://www.antiifcampaign.com/ (which focuses on "bad IFs")
A free, simple, actionable guide to female orgasm
These are, as it was mentioned in another article, "CRUD systems" in their majority (http://en.wikipedia.org/wiki/CRUD)

In essence, several giant Java systems (+ Oracle usually).

But he surely can sell expensive systems to multibillion dollar companies and charge a lot of money, that's an important quality of his.

Did they contribute anything to free software? Did they contribute to the advancement of software development in any way (articles, libraries, books, etc?) Does Tata has the same level of employee attraction/retention as Google/Fb/Amazon or others?
> "ifs are a smelly thing in a Object Oriented language."

It is partially my fault because I failed to express what I really ment. English not my native, so sorry.

What I really ment in this sentece is "why using (a lot of) ifs can be a bad practice in a Object Oriented language"
Absolutely! And in the second example, what happens if "property" is 0 ? (My Ruby is rusty)
Drat, once again foiled by logic.
> The only reason to tax the rich as far as economic stimulation goes, is if you believe the Government can do better with the money than the market can.

I think this is a very important point. There's been an important ongoing debate in some European countries, on taxes paid vs. benefits provided by the state.
It's a natural tendency for some kinds of state to become increasingly dependent on tax money, be it through self-expansion (hiring more and more public servants) or provision of extra benefits to society. While this was no big deal in the post-WWII, it has become increasingly relevant with the consequent improvements in life expectancy and decrease in birth rate.

OTOH, the market is purely profit-oriented and profit is seldom in agreement with the public interest. "The rich" won't care to pay my unemployment benefits when I lose my job or my hypothetical child's health expenses.
Ok, with that I can agree.

Or maybe better: how can ifs be replaced (sometimes) using OO principles
Functional pattern matching (more rigorous IFs) is open for functions but closed for extension. You can write as many functions as you like, but you need to modify all of them if you add a new data type.

OO polymorphism is closed for functions but open for extension. You have a fixed number of functions (methods), but you don't need to update all the call sites if you add a new data type - merely implement all the methods.

The requirement for what needs to be open and what can be left closed is what determines which choice is better.

For example, a GUI framework is best left open for extension, because every application GUI usually ends up with specific widgets custom-designed for that app - sticking with standard widgets tends to make apps form-heavy and lacking in polish. But for the widgets to work in the framework, they need a fixed set of methods to be consistently manipulable.

A compiler AST is best left open for functions, because the majority of work on an AST is in algorithms that transform the AST. The language changes at a much slower pace than additional optimizations and analyses, and frequently new language additions can be represented in terms of existing AST constructs (where they are syntax sugar, effectively built-in macros). So having a more fixed set of AST node types is less of an issue.

Choosing one or the other on the basis of the orthodox religion of OO or functional programming, meanwhile, is just obtuse.
My own pet theory is that 95% of the enterprise code carefully architected to be extensible is never extended.
How To Deal With Vendor Prefixes
It's getting better, but most of the code I see from TCS in our code base is not very good. However I see lots of crappy code from all over the world so.

Main problem is that the best developers don't go to TCS or we just don't see them.
I was talking in terms of the constructs which the language can provide to avoid ifs.

> And suggests that this is better:

It depends in what terms are you thinking. A syntactic improvement is a also a benefit, isn't it?
You know whats a smelly thing in OOP ? Overblown abstractions, design patterns and stuff for the sake of flexibility which in the end mostly will never need that kind of flexibility but in turn readability and clearness suffers instantly.

I am all for Design Patterns and abstraction, but only when it makes sense.
if after you die you are remembered outside of your friends and family then you most likely did something wrong.

What?

What about Steve Jobs or Richard Feynman or Christopher Hitchens? (to pick three random examples)

They are dead and well known because they are highly accomplished.

Of course, doing things because you expect to be remembered for it is misguided. But being remembered after you die by large numbers of people is not a sign that you did something wrong.
16 Useful Responsive CSS Frameworks And Boilerplates
Nice article, I thought it'd be one of these self-help articles I personally can't stand, but I was quite surprised to see I've actually been following this very path.

I'm currently at Step #4, having a part-time job in the mornings and freelancing in the afternoon, and so far I've only been under stress occasionally for really short periods of time.

I just hope everything works out and I can reach the last step smoothly...
The site: http://web-beta.archive.org/web/20120525003840/http://domain...
If you have to use ALL alphanumeric chars - how can this possibly be brute forced quickly? If you're table of pins is stolen and the information readily connects a user to a pin - that system is horrible from the jump.

Human beings attempt to brute force their own pins, most of which have a greater insight into possible combinations and STILL get their account locked. Remember - 3 tries gets you locked.

Why would it get broken quicker? If there's something I'm missing, I want to know it for the sake of being a better developer.
Furthermore, it's not available for the world atm :)

You can look into open source, free software in the same category. I believe you can find decent one by googling :P
This is an aside, but don't use the ruby "to_proc" approach that listed in the article. i.e:

result = collection.select(&:condition?)

The "&:proc" methods are (very, very likely) slower and they also "leak".

When I say "leak", the VM doesn't Garbage Collect the parameters of the proc until it is used again. Most of the time this is fine, but when it's not, you're wasting considerable amounts of memory. This is known and is considered within the spec.

I know they are semantically equivalent, but the MRI is doing something weird internally. (ps. Learnt this the hard way).
Job / career / $$$ shouldn't be primary happiness drivers for anyone.
Realize that I will die and that the things important to be now may not necessarily always be important to me.

Let go of attachment to impermanent things like name and achievements and reputation, and just go to work.
> Who pays, which is the subject of the current "fiscal cliff" brinksmanship, is almost entirely a political question, not an economic one.

ORLY? There's a paragraph in the article which starts with "Proponents of trickle-downism" and ends with "A dollar given to a poor man multiplies faster, Keynes observed, than a dollar given to a rich man."

As far as I know, that paragraph is

1) Conventional wisdom, and not widely disputed.

2) Economics

3) Of direct impact on the political question of who should pay more tax, seeing as removing a dollar of tax is the same as "a dollar given".
Vim. But I'm a little bit confused when using vim with big file, it's getting slow. It'd be great if any of you guys already have the solution
< 3000$
In full agreement.

We have a rule about only using patterns if they become apparent rather than selecting a pattern up front.
You don't know Scheme if you think their differences are just syntactic. Hint: what about that whole prototype object sysytem?

There is a running joke in PL research that "programming languages = lambda calculus + constants". Scheme IS λ + k. JavaScript is that plus the kitchen sink with the Ringling Brothers Circus caravan in tow.
i want an armchair, which has one part of an divided keyboard embedded in each armrest, an extended right armrest for my mouse, and a monitor which is(somehow) mounted to the chair but adjustable. i couldn't afford it right now, but i value it at about 1,5-2k
If you’re going iOS, go all the way
Nonstandard proofs of countability of the rationals
China Toughens Its Restrictions on Use of the Internet
Those are actually good questions.

The work history serves as a nice interview warmup and is a good gauge of a candidate's ability to communicate. A bad answer is to mumble out what's on paper in front of you. A good answer will reframe the question in terms of what the job ad described.

The weakness question tells me how introspective you are. Someone aiming at self mastery that has a big picture view is going to give a vastly different answer than someone fresh out of school that's read an advice column and thinks they're a rock star.
Many, if not most, are having some problems. It does mean growth has slowed down, but it doesn't mean it has gone negative yet, especially not globally. It's interesting what you say about Brazil, especially about government action regarding credit in 2009. I haven't been following the situation there. It seems like 2012 will still show some growth but considering Brazil's potential it's pretty bad.
Is pattern matching really that different from switch statements, which are really just fancy of statements?

Mostly, yes. Pattern matching also provides destructuring, allowing you to bind constructor arguments and pattern match against such arguments as well. For instance:

fun (Just (x:_)) = ...

But some of the downsides are comparable to switch statements, e.g. if you modify:

data MyType = Foo | Bar

to

data MyType = Foo | Bar | Baz

You will have to (potentially) update all functions or case expressions to account for Baz. One could use parametric polymorphism, comparably to the linked article, to make more extensible code. In such a case, one would define a type class such as:

class (Show a) => Printer p where
printIt :: p -> a -> IO ()

And one could make particular printers of this typeclass. You could even throw in existential quantification so that a function does not specialize to a particular Printer.
totally agree. Working too much without knowing what happens around the world is bad.
But I am sometimes stuck in one side of these, too much involving social or too much working. Finding my own balance
Pattern matching is a lot more expressive that switch and if statements, as it combines testing with elimination. For instance, let's say we want to write a new tail function, which returns the tail of a list but returns [] when the list is empty (pseudo-Haskell):

tail2 xs = case xs of { Nil => []; Cons(x,xs) => xs }

tail2' xs = if xs == Nil then [] else tail xs

In the second case, tail2', the compiler won't stop us if we switch the two branches. In the first case, tail2, we only get access to the tail of the list if the list is actually non-empty.

In essence, the difference is that if statements throws away any static information about the test result, whereas pattern matching constructs lets that information flow to each branch through variable binding.
McAfee Labs predicts the decline of Anonymous
I'm sorry, but that's a very naive and dangerous view. Being satisfied by what you do has always been a good goal, and society has always rewarded you for doing well at your job.

I can't see what angle you are coming from, so I can't give you a specific refutation, I hope it was novel.
Haven't read any comments here yet, but I firmly believe this analysis to be spot fucking on. Will be interesting to find out why this critique which aligns so closely to my own thoughts is 'wrong' or at least flawed.
Google Hired A Man Who Believes He Will Bring His Father Back To Life (GOOG)
Shoot me a message at https://www.facebook.com/bentzenj
> get the code, make it work

I've developed on Windows and for Windows for quite some time and I can tell you while it's not hard to make *nix code work on Windows, it can be devilishly complicated to make Windows code portable to anything else. Usually, the best strategy is to keep a very clear separation between core functionality and user interface code and forget about making the UI portable unless you use absolutely nothing Windows-specific.

It's almost as if it's done on purpose. Microsoft gains very little from making code written originally for Windows portable to other platforms and a lot from making it next to impossible to port your code away from Windows once you get it running on it.
It seems people here are forgetting that in the case of Aadhaar, the real reason for it is the official one, which is in short term, it is to track that the 40,000 crore (7.2 Billion$) subsidy given to the poor people of the country should reach the right people, right now, the paper and pen system has lot of room of corruption seeking in, and infact thats true, that a lot of the subsidy bill, doesn't arrives in a timely manner to its correct beneficiaries. When the record system would be digitalised, and centralized, it won't be that easy to tamper with the records as it is right now.

Additionally, in long term, it will allow the govt to track the implementation of its various policies more precisely.

In short it is what the SOCIAL SECURITY NUMBER is to the western civilization.
Nobody asked me the two later questions. The one about problems with coworkers would have been a lot of fun. I have plenty of juicy anecdotes.

I have an objection to The hiring manager doesn't need you to walk him through your resume chronologically—he can read what's on the page, after all.

Most interviewers I've met actually have not read the cv further than the absolute minimum to match keywords, and are not interested in reading the printed cv, that appears to be a write-only piece of paper... they take notes on it.

The interviewers who did read the CV beforehand are also the ones that direct the conversation themselves and always ask in chronological order anyway.

It seems that they do that because they're seeking to make up a narrative, a logical evolution of the career, so Ramit's advice stands after all.
To be honest, most of the ifs I write are usually error handling conditions so I sort of agree with the principle.

If you've been writing OO code for 10-15 years, you evolve into a model which is pretty if and block free. It just sort of happens one day. It isn't decomposed into millions of classes either - just a data model and some kind of effector such as specification/Builder/visitor. SRP only needs to go as far as method really as well.

I don't use functional pattern matching either.

If your code reads like math, I expect that its probably done right.
You've struck a chord there.... I graduated from a college and got a high paying job in a big enterprise, the pay was good so, I stuck to it, I am a mediocre developer, I faked my way and moved up into the organization, now I am Group Lead and pretty good at it, I love working with people. However, I'ev recently developed an itch and really want to code. Now with 10 years of "experience" behind me, I am not getting the roles of developer, as in India, there is very high importance attached to the number of years of experience. I want to make a move and start all over again, but again the pay is too good to quit.
App Entrepreneur’s Dilemma: To Go Native Or Cross Platform?
Mark Zuckerberg's sister learns life lesson after Facebook photo flap
Whether or not the second example represents a syntactic improvement is more of a personal preference. Personally, I find the first example more readable when quickly scanning code.
I mean what sort of adivce would you give him ?
My bad, I tried the drag and drop in chrome, but it seems that I'm doing something wrong, perhaps a snapshot would be cool! (if not a youtube video)

Thanks
Rumors Running Wild About Ubuntu's Top-Secret New Product
So I lose the bet, but it's still mathematics that shouldn't be patentable in the first place.
I guess it depends on what you learn from the subject. The general attitude I have is "Here's this thing, let's think about it", rather than "ZOMG, drop your ifs, they are BAD"
This shameless post alongside its comments is the reason I and others have left OSS.
Run a marathon. It won't improve your $$, job, or status, but it will probably be the hardest thing you've done up to this point in your life, and once it's done you won't feel like a loser anymore.
No. This a feudal phenomenon right from the Middle Ages. The Papal Rome (EU) that deals with the big stuff and regionalization. That's why many historians and philosophers claim that times we are living in will be referred to as neo-feudal in the future:

http://en.wikipedia.org/wiki/Neo-feudalism

That's backwardation. Similarly, in the Middle Ages there was no concept of nation states. Sounds like EU agenda, doesn't it?

Not to mention other similarities: 1% above the law elites, bankers, etc. and 99% of serfs. Definition of serf: born in debt and dies in debt. Religious wars (think crusades to Afghanistan, Iraq, Pakistan to enforce our Christian-born values), etc, etc. Whatever you touch in terms of social sciences in the modern societies of the West is feudal. Including things like rise of Asia and deterioration of the West.

We're in the process of building of a neo-feudal society.

Not fun. Just trying to fight against it every step it takes.
I guess nothing stays in the family anymore...