skysight-inc/HackerNews huggingface dataset:
If you're doing "ifs" on the same condition sets in various functions then you should consider encapsulating the condition in class hierarchy. If there is just one if for a condition set, introducing a class hierarchy is just bloat.
An often better alternative to inheritance for conditionals is configuration with functions as values.
Facebook's dirty poke app trick gets a thumbs down
I'm going to guess that lostnet is saying that it is easier to be remembered for doing something wrong than for doing something right, although I'm not sure what value that would have in terms of advice.
Channel that feeling into motivation to achieve more. A bit of dissatisfaction is natural and happens to folks irrespective of what they may have achieved -- it can be a healthy force that pushes you to do more with your life.
Show HN: Hacking a Raspberry Pi into a wireless airplay speaker
I totally agree with you, the purpose of the article was to explore but not to obsess over the subject.
I don't see how that's helpful. English can be an imprecise language and there is a lot of unspoken convention in interviewing for a job. Many have had to learn that convention by just plain interviewing badly enough times for it to click. Understanding these conventions and how to recognize and respond to them can really be helpful in landing the job you want.
You don't want a job for job's sake. You want it to earn money to spend it somewhere else.
Here's an heuristic for you: imagine you are old and are dying. What things would you like to say on your deathbed? "I had a great job, great career, earned lots of money"? Or maybe "I had a great life/kids/wife/contribution to society/whatever"? Before answering, take some time to really imagine the situation. Don't give a knee-jerk answer.

"
How Amazon ruined my Christmas
"We need to think about the effect our choices have on the next person who touches the code."

And that next person might be the newbie on the team that doesn't have the business domain knowledge built up over years of working for This Company. So I'll use the if statement to keep intent clear.

Or maybe it'll be someone whose primary programming language doesn't use the || operator. Or maybe, for some unknown reason, it'll be a PHB. So I'll use the if statement to keep intent clear.
Ask HN: What is a good way to host a Rails app for free? Or very cheap?
This is for a personal website.

Heroku's free tier sucks because servers take 5-10 seconds to spin up every time they are used. Amazon EC2 isn't working out for me either.

Any advice?
Python is a great language for iterating over collections - lists, tuples, dicts, sets, etc. - and all those elifs don't look very Pythonic to me. Let's clean it up a little:

colors = ('grey', 'red', 'green', 'yellow', 'blue', 'magenta', 'cyan')
for char in string:
print termcolor.colored(char, colors[string.index(char)%7])
If statements are rife for abuse and can be an indicator of poorly thought out structure. This article mimics my own experiences, namely that overuse of if statements is a smell and can usually be avoided to the benefit of the code.

I long ago abandoned else clauses. It was a short time thereafter that I realized that if statements themselves weren't all that necessary, most of the time.
>> I can't see what angle you are coming from, so I can't give you a specific refutation, I hope it was novel.

Why would you downvote or even refutate instead of asking?

Those shouldn't be your primary drivers but it doesn't mean you won't have them. I don't measure happiness with those variables, they are a result of what makes me happy, a consequence.
Make Your Visitor Stay Longer On Your Blog
This is a byproduct of the world being so far away for so long. The distance had an impact in both directions. I ran into people from other countries making ridiculous generalizations about the US when I first stepped on to the Internet in the '90s.

Now I know hundreds of people from other countries, and there's very little generalizing going on in either direction. But this is mostly people in their 20s and 30s, not people who grew up without a direct link to the world.
Classic computing embraces quantum ideas
They would probably have more if they were cheaper, all sorts of countries have random frequency bands being freed up for mobile. But I think power consumption still the limiting factor.
The Oatmeal's State of the Web Winter 2012-2013
Linode. The 20USD/month plan is guaranteed to meet your needs, and their service and support are top notch. The LISH shell is also really really useful - esp. if you are new to sysadmin stuff, and has saved my ass a lot of times. Their collection of tutorials on sysadmin stuff is another huge benefit.
Number 2 is simply misleading. It doesn't take in consideration HTML 5 Document Outline speification. It's not enough anymore to simply use h1-6 accordingly. You must take the whole document landing marks sructure in account (`article`, `section` etcetera.)

Number 8 is not completely correct anymore. Javascript was recently included in the accessible tecnologies. Screen readers nowadays do own a DOM and a full rendering stack. ARIA, in fact, dictates a lot of interesting accessibility states and tools. That said, I do not push forward the use of javascript for structural functionalities, the rule that states that "Javascript is an enhancement" still works and will always work, but excluding enhancements for accessibility is naïve as far as the naïvete of the implementation.
nit: in the manufacturing and business worlds, two years (let's give benefit of the doubt and presume to assume that "until 2014" is "until 31 Dec 2014") is not enough time to be leisurely. I do suspect, however, with their PA Semi purchase, that Apple is in a good position to know who to buy and how to buy them and it wouldn't be a strenuous search.

All assuming, of course, that Apple is interested in such a purchase.
Not an if statement, but unnecessarily clever code that doesn't reveal its intent. An example of the tension between general clarity and a concise, well-known idiom. The kind of thing that makes C++ impenetrable to those who don't write it regularly.

I'd rather add a method to Object/Nil called something like #or_else so that we could write

param = object.property.or_else(default_param)

which, though still terse, at least describes what's going on.
Well the CETA (Canada EU trade agreement) with zero tariffs and improved labour mobility is close to being settled by the sound of it. It is not clear if the UK would ever manage to negotiate to join NAFTA.
0) Make sure all of your HTML is valid.
Better yet use enumerate to save looking up the character index:

for i,char in enumerate(string):
print termcolor.colored(char, colors[i%7])
Customer is the best investor
I had the same exact feeling at 25. My advice would be to work on small, achievable (side) projects and focusing on finishing each project before starting a new one. I remember having lots of ideas but never really finishing anything great or meaningful, which was a source of anxiety back then.

Remember, you don't have to create a new RoR or Facebook to feel successful. For example, many small open source projects provide great value for a number of people. Now at 30, I'm happy to be able to list a number of things I have done, however small or big they are.
Well, I had a bit of a fuss as they are using ARM TrustZone, so the 3.0.15 kernel didn't want to compile with a newer gcc than the one that Hardkernel uses by default (CodeSourcery 2010q1 - which translates to roughly GCC 4.4.1 with their extras.) - through the help of a friend that is patched up (but sadly breaks it building with CodeSourcery (heh) - patch is at https://gists.github.com/4395518 - that will let you build with GCC 4.6.3 (Linaro/Ubuntu defaults) - if you want to build with 4.7.2, you will also need to edit line 234 of drivers/video/samsung/s3cfb.h and remove the inline.

After that, it's just like every other rootfs. I focus on Gentoo, so other distros... I don't know, but they will have an Ubuntu image up soon.

There are no graphics until X though, so you're stuck with ssh or serial console until then.

Kernel sources come from the BSP download on hardkernel's site. Should be a tarball in there named kernel_4412.tar.gz
Yes, but that's probably a matter of familiarity over clarity. This is a perfect time to use the irrationally-dreaded ternary operator.

param = object.property.nil? ? default_value : object.property

Verbose, although less so, but reveals intent almost perfectly. Would be better if the colon were "else" or "otherwise".
Setting the baseline gives you a higher probability of a better change than you would have otherwise. This assumes that not everyone on the team is a newb or a code-dabbling PHB. If they are, there's not much point in writing any code.
Your speech is starting to sound too stereotypical and plain xenophobic to be taken seriously, but I'll give it a try.

Countries that "import unemployed people" do so for their own good. Or do you know a lot of Brits currently willing to do housecleaning work or have a factory job? Switzerland is a good example of that. ~30% foreign workers, most of them doing the jobs that Swiss people themselves would rather not do. It's very easy to blame people from other countries for you own problems, but they're paying their taxes too, just like anyone else.

Plus, Germany exports a lot to other EU countries. It's not like they're in the EU for the sole noble purpose of European prosperity.
Amazon tops customer service while Apple slips out of top 5
The work history question is a valid one, because there are some things that are better to communicate in a conversation rather than on a resume. But at least half of the onus is on the interviewer to make it a conversation rather than expecting the candidate to try and turn it into some kind of egotistical sales pitch. I'm glad I spent more time preparing for questions about algorithms than I did figuring out how to spin my work history.

"What's your greatest weakness" is an awful question. As a candidate, you never really know what the interviewer's angle with that question is. Almost no candidate will answer it with complete honesty, just like a wife asking her husband "does this make me look fat?", and for the same reason--any answer you'll give will be used against you, with only a vague, remote chance that it'll help you at all. It's also lazy and arrogant on the part of the interviewer, since it implies that instead of actually probing the candidate's expertise and skill and history for weaknesses, they're going to sit back and let you volunteer something and save them the effort. There are less adversarial ways to probe for a candidate's point of view on their own development.

There are exceptions for these rules. For instance, if you're hiring salesmen or spin doctors, you can ask just about any question and see if they try and turn it into a sales pitch for themselves. Likewise, if you're hiring someone into a position that involves negotiation, watching how they game their way through the "what's your greatest weakness" question could be instructive. For my part, I'm glad my field has actual technical substance that I can be interviewed about.

Finally, there are a lot of unspoken cultural assumptions with these kinds of questions as well, especially with regards to selling yourself. Americans sell themselves--other cultures don't necessarily. This might be another difference between engineers and the rest of the workforce. Engineers are far more scarce, and you're forced to pull from a global candidate pool, or at least from a local candidate pool that's already pulled in lots of immigrants. In other fields, it doesn't actually hurt you to have more implicit biases in favor of American candidates because there are plenty of American candidates.
Findings on been featured on the HN front page
There's a real art to this. If you are not accommodating at all - you're a jerk and no one wants to help a jerk..

Too accommodating, you're a doormat and no respects a doormat and no one wants to help someone they don't respect....
Changing the defaults takes 2 minutes in Rails. What's the problem? Besides, there are gems like Rails Composer [1], which allow you to create new projects based on a template.

[1] - https://github.com/RailsApps/rails-composer/#your-options
"For some people, there are NO alternatives."

I would suggest to these people: get a Mac. If you're seriously fretting over having no alternatives, then you should be getting the Real Thing. Is it really worth trying to "stick to the man" or waste time trying to deal with all the inevitable bugs when running on a non-native platform?

If you seriously want to spend a couple hundred bucks for a netbook to run Linux and this OS X emulation layer, you're not going to get any serious work done for A) slowness and B) bugs. You'll have a cool toy, you can stick your tongue out at Apple, but you're not going to be designing, developing and compiling that Next Big Multimillion Dollar iOS Game.

Hell, even Mr. Linux himself (you know, that Torvalds dude) uses a MacBook Air. If he wants to run OS X, he can just dual boot.
I'm 21 and still feel exactly the same, except without "$$, job and status"
It's not one or the other. Having a good job/career and in turn $$$ means you can contribute more to the society, and provide for your family better.

So on my deathbed, I'd like to say: "I was good at making $$$ which allowed me to spend more time with my family, give some to charities and see a good portion of my mother earth with the ones I love."
1. You missed point 1. It's not about making 26K/day, but it's about 26K not being a huge amount of money.

Tell you what, I live in Tunisia, and still $26K is not huge or even big by any measures

2. Within a 24 hour period, he earned 26k.

Not true, if he were to do it again, he'll need to write another book; and that can't be done in 24 hours. But again, tell you what, I'll accept that argument.

He made a lot of money in a short time based on notoriety and marketing.

He has a brand. No one is born with a brand. You make the brand. The brand is a capital, just like a car or something of value you have. You can't make a brand in 24 hours, far from it.
Oh great. What will you people come up with next? Variableless programming?
(Almost) All Link Building is Gray Hat
It's odd that the word entitlements is no where in the OP. Entitlement spending is the biggest contributor to the debt.

It's odd that the OP fails on basic math. If you took ALL of the money from the top 10% wealthiest people and put it towards the debt it would barley make a dent.

It's odd that the OP fails to see what's happened in other countries when the tax rate is cranked up on the rich ... many leave the country. And many outside entrepreneurs considering the US as a place to start a business will take their ideas, their jobs and money elsewhere.

The debt will only get fixed when jobs get created, the tax system gets modernized and entitlements get reformed.
The paradox is that the more dynamic and "app-like" you want your site to feel, the more javascript you need, and eventually you need a better way to organize it than the jQuery spaghetti code you typically end up with, which inevitably leads you to a javascript framework like Backbone or Angular. It's not necessarily a good idea or a bad idea, it's just a problem that needs to be solved.

It is also, by the way, the same problem native app developers have to solve when they create an app that relies on a web server for its data. They must make sure their models are in sync and that authentication and validation happens on the client or is at least represented consistently.

If it still doesn't feel right to have a thick javascript application on the client, though, you might want to do a little research into how 37 Signals wrote Basecamp two. They did it without relying on a thick javascript client framework and instead pass up all the JS/HTML necessary on each request and use HTML5 pushstates to keep the app dynamic and snappy.

As a related note, I highly, highly recommend Angular.js. Aside from all the awesome two-way bindings stuff (which you get with a lot of other frameworks), the big selling point for me was the fact that dependency injection is baked in at every level and the emphasis on writing testable code that doesn't rely on DOM manipulation.
Windows 8 Passes the 35,000 app Milestone
Personally family/kids are a big part of what I want from life, but there are people out there who don't actually want that.

Job may not be everything, just as kids may not be everything (find my a homeless person who has had kids and tell me his life is perfect), but that doesn't mean that a career can't be enjoyable and a big positive in your life, not just a necessity.
Discover The Most Profitable Price For Your App
First of all, if native JSON parsing exists, jQuery will use that.

The validation code they use in case there is no native JSON implementation available is borrowed from Douglas Crockford's json2.js ( https://github.com/douglascrockford/JSON-js/blob/master/json... ) which was the inspiration for the native JSON implementations and should really be correct by now, both in terms of correctness but also circumventing regexp weaknesses in some engines.
That's the classic "Expression Problem" (aptly named wrt its common appearance in ASTs).

Note that it's relatively straight forward to express the function-extensibility through the visitor pattern in an OO language; in a functional language, you could probably implement your own dynamic dispatch technique to get the type-extensibility.

In both cases, you'll end up with some boilerplate, depending on your language. E.g. for a complex language with lots of different AST node types, you'll end up with lots of tiny classes, mostly just implementing stupid constructors.
We investigated using Backbone vs. Angular for a project and went with Angular and could not be happier. It's not just the two-way data binding, which you can get with frameworks like Knockout.js and Ember.js; it's the dependency injection and testability of the code. Never before have we had this good of test coverage in a pure javascript app, and most of it is unit tests which is very impressive considering how concerned javascript usually is with manipulating the DOM.
Can i have a question why Amazon EC2 doesn't work for you ?
Reading this guys bio humbles me. He's done more in the last 10 years as a student than I've done in the past 10 years professionally.
Clovertrail Convertible vs Ultrabook in Application Performance Test
Quick Clean Laundromats on Delhi Ajj Tak
Welcome to HN where all subjects are obsessed over obsessively..

That said I do think all things in moderation. At some point if you abstract the logic so far out humans have a hard time reading it or computers have a hard time optimally running it then you've lost the gains. I can think of several times when I was coding something using a class and noticed I had to write a lot of logic to really use the class the way I wanted. I wish in those situations the class was better designed to avoid spaghetti code to use it.

That said many times the use of an object is nothing like what the original author thought it would be. It is hard to think in advance about every potential use case, shoot for the most common cases and make it all readable. Hopefully later someone else will come along and make it more useful to the real world use cases.. :-)
The </script> issue is why JSON and Javascript both allow you to escape the slash character with a backslash.

So just going <\/script> is enough.
YouTube kills billions of video views faked by Music Industry
Yes, I think there should be a "probable cause" standard to warrant intercepting a call between Chicago and Cairo, especially when the people on each end of that call are American citizens.
^^ u crazy :D
China Tightens Rules on Internet
you mean acquisition, not accusation.
Go for a walk in the nearest Park, it's a good way to have a think about what you want.
I don't want to make math and computer science sound unimportant -- it's an important distinction because pure math is not supposed to be patentable. But for whatever reason if you include a hypothetical machine it is suddenly patentable.
>> Rails should be baking in support for creating API only apps

Right now, I can create a rails app that doesn't use templates at all. I can start with a basic rails 4 install and quickly prototype an API that communicates through JSON or any other format I can think of. I can leverage handlebars and ember.js if I want to go that route, or I can stick with dumb old 'templates' to display my data. When you start coding ruby on rails you quickly realize that 'template' is just a word and that you are free to do literally anything you can think of, easily.

>> people of our generation have a bias towards thinking of UX and web-apps as desktop-first

Let us assume this is absolutely true. Why does rails keep you from writing code that honors this bias? Rails gives you abstractions you can use to decouple. If I want local data persistence perhaps I'll need support from other libraries--but only if I'm too shy to take a shot at writing a tool myself.
I think you're on to something with the 'desktop-first' remark. We do need to be able to store data browser-side. We do need to address performance issues--especially as it relates to decoupling server-side data logic and application data logic. Rails is a very good tool for supporting solutions to these types of problems and packaging them in easy to implement applications.

>> But, I'm done with it. I'm looking at the next wave of leading edge of innovations for the masses..........

Obviously rails is useless if you don't want to make applications, but otherwise you can really do anything and it's not actually hard to configure rails.

I used to think that david hh and many other experts in the community were mean. Then I realized they have to deal with people all the time; not the 'grievances', but the attitudes. There are many trolls and one cannot be too careful.
Biggest earners and spenders in 2012 by country and mobile platform
If anyone is looking to run an old 68K app, let me recommend Basilisk. It runs System 7 really well. I haven't tried anything newer.
I tell my girlfriend how I feel. She always tells me she's proud and I'm not a loser. Sometimes you just need somebody to give you some reassurance.

So go and talk to somebody you love.
Erlang is mostly IF-less (destructuring pattern matching in function heads) and doesn't have variables.

A = 1,

A = 2, % fatal error because 1 != 2

So, yeah, variabless programming FTW!
... I still don't know what HN Karma is for or how it's gained.
Last noteworthy S3 outage was in 2008.
Show HN: Singularity Chess: due to a warped board some pieces can make Uturns
Guess so.

It certainly seems easier to get notoriety - at least for a short time - by doing something significantly hurtful to people (e.g. die in a violent blaze of glory while mass murdering others, like the recent incident in Newtown, CT).

However, I agree that this isn't necessarily useful information for someone who has an innocent question about feeling like a loser.
It's not only easier to read, but it clearly shows the intent, that it is only an assignment. It's faster to comprehend too, you don't even have to look at the right hand side if you're not interested. The first example obfuscates the intent a bit. Also, in other languages, you'd have to declare the variable first and that's even more lines of code.
White House's Talking Points On Why Senate Should Trample The 4th Amendment
"Associate more with people who you'd like to be like and less with people who you wouldn't like to be like"

This. I always tell exactly this to my friends who come to me for advice related to career. You want to be a successful manager/executive ? Try and associate with those. You don't want to be a loser in life ? Stop associating with ppl who always think so about themselves.

Overall, associate with people who you think are better than you in the context of things that you wish to achieve.