skysight-inc/HackerNews huggingface dataset:
The problem with that construct is that trueaction itself must evaluate to true, or the expression will evaluate to falseaction, which most likely is not what you want:

>>> 0 if 1 else 2
0
>>> 1 and 0 or 2
2

Even crazier things can happen if trueaction has side effects:

>>> def trueaction():
... print 'trueaction called'
... return 0
...
>>> def falseaction():
... print 'falseaction called'
... return 'hello'
...
>>> True and trueaction() or falseaction()
trueaction called
falseaction called
'hello'
>>> trueaction() if True else falseaction()
trueaction called
0
The danger here is that this will fall through to the falseaction if trueaction returns a false result ("", False, 0, None, [], {}, etc). For example, this will evaluate to "etc":

True and "" or "etc"

So people started doing this instead, as [False] is still 'true' (non-empty lists are 'true' in Python):

(condition and [trueaction] or [falseaction])[0]

... which is a bit crufty. So this was added:

trueaction if condition else falseaction
It is inflammatory. Not only to the religious but also to the very large percentage of people who see it as a strident position.

For something to be inflammatory it only needs to inflame.
Because ESR is a tool.
The Electronic Wasteland Video - CBSNews.com
I've had a lot of success with BeautifulSoup. It turns terrible HTML into a usable DOM tree.
I know. And that's a problem it ought to fix. But seriously, Youtube? That's the worst alternate environment. Vimeo, Veoh, or one of the bigwigs like Yahoo or AOL, they all have good systems in place that aren't widely mocked as being home to the stupidest people in the world.
I completely agree. YouTube is one of those places I will go only if directly linked to and even then I attempt to escape as quickly as possible, especially without reading any comments which destroy at least one brain cell for every one read. The top videos on YouTube are either ones who's screenshot frame involves something sexual or R&B music videos. I feel dirty just going there.

It's sort of the bathroom of video sites. Get in, get out, avoid discussion.
Ah, that is much better. I've been learning from Dive Into Python which I know is a tad dated, and Pilgrim (sort of) endorses the and...or method.
The best resource on term sheet basics is

http://www.feld.com/blog/archives/2005/08/term_sheet_seri.ht...

http://www.startupcompanylawyer.com is also often quite good on the basics.
Switches,Spring Switch,Lock Switches,Push button switch,Metal Switches,Fasteners
Please don't post stuff from that uber-troll Jon Harrop.
Measuring spam conversion rates by infiltrating the Storm botnet
Anyone know of a similar library in rails that works well?
And the ironic part is your programming language of choice is coded in C and uses libraries with optimizations in assembly.

When all you know is the hammer... This saying applies to both extremes, be it a dynamic language or a low level language. I try to use the best tool for the job, from my knowledge chest. That's why it's important to learn several languages.
So obviously that was a foolishly harsh take on it. Here's my optimistic take so you don't think I was too reckless:

http://news.ycombinator.com/item?id=5815
* * disappears because those are for italizicing text here. Obviously they should really only be hidden if they're surrounding something.
Its not finding gold and bringing it back here that's necessarily the draw. Its finding enough titanium outside of the gravity well to build a space station the size of Texas...

Hell, if we're outside the well anyway, we could build the flippin thing from concrete.

In short, mining space solves just about all of our resource problems, up there and down here, forever.
For him, running `rake routes` prints 2500 lines of routes. This is not the same 2500 lines of code in routes.rb.
Along with the points other people have made,

trueaction if condition else falseaction

is marginally more clear than

condition and trueaction or falseaction

, at least to people who aren't used to seeing and/or used like that. A lot of people, especially newer programmers, aren't used to seeing and...or used for branching that directly.
How many people participated?
The answer has very little to do with both programming skills and abstract thinking:

<quote>

To solve this puzzle, you need to rearrange the stock symbols in an order that when read down, yields a useful phrase. There is no indication at how to order them, but through trial and error (there are only 120 possible orderings) you can arrive at this:

HCRE
UATN
RNHA
REEC
IOME

Reading this down the columns gives the phrase "Hurricane or the Menace." The word that goes with both
"Hurricane" and "The Menace" is DENNIS.

</quote>

Good luck with making a hiring decision based on the ability to solve this puzzle.
Yeah. I loved it because I didn't know there was anything else. But Hulu and Vimeo have blown it out of the water. With Vimeo in particular I'm astonished at how GOOD the videos are. Amateurs turn up some wonderful stuff very often.
Wow, slide two was TERRIBLE! I couldn't read the text with that very distracting background, who does that?
I see Mono as huge disappointment, with C++ losing ground, C# could have been the language of choice in many ways if and only if Mono would have delivered. More to it with the Mobile Linux rising I a .NET based framework (Like Android only C# based) could have been ideal.
I think that many startups outsource their hacker needs, especially early on. Contact me [wirdog at gmail dot com], I would love to find out more about what your engineers can do for me.
http://decenturl.com/ in a way...
UPenn Internet and Web Systems Course (CIS455/555)
No, it demonstrates that you don't need to be nice to be religious.

PS: This is an ugly topic and a terrible article. Can we please get some moderation in here?
> One huge difference between adults and non-adults is adults tend to grab every opportunity to improve their skills, and understand that those don't come that often.

Not most of the adults I know. Nor most of the teenagers either, for that matter. Actually, I think "grab every opportunity to improve their skills" describes children under 10 more than any other age group.
Watching N.YC become reddit is more painful than I thought it would be.
But the real world experience doesn't paint such a grim picture. Minimum wage changes, have not been shown in real world case studies to have very much of an effect on employment rates. The effects are usually cloudy & cannot be distinguished from the effects of say, a credit crisis.

Now economists can rationalise this in lots of ways...

How about this one? No minimum wage increase yet has exceeded the actual market value of the jobs in question. They have simply been feel-good placebos that have marginalized very few real workers while gaining political kudos for the administrations in power.

Any real attempt to raise the minimum wage too far beyond the market value of the labor will result in mass unemployment, mass inflation, or both. Its actually a kind of rationing, and behaves as such.
I'm pretty sure this (HPricot) is the one most people use in Ruby:

http://code.whytheluckystiff.net/hpricot/
I'd love to see more details of this or follow on research. They did an excellent job. None of the suggestions here would be surprising to a UX expert but having them in context is really helpful.
I like dynamic languages too, and often wish C# was looser in its typing (or at least less verbose in its typecasting). If it were practical to use Ruby/C to do my job, I probably would.

That being said, C# is a huge step above C++, at least with respect to application development. Garbage collection aside, it has first-class functions, well-implemented closures, an integrated query DSL, and decent (if a little awkward) reflection capabilities. It's not an exciting language, and I don't feel particularly cool saying I use it, but I think it gets a pretty bum rap.
Must watch video - 30 min documentary on US debt.
Ask HN: Are email providers getting more strict with mail from your web app?
Lately, one of our web apps (Rails) has been receiving more bounce backs and delays when trying to send mail. Yahoo! mail seems to be the biggest problem. We've already lost a customer who was frustrated that they couldn't reset their password.

Has anyone else noticed email providers getting more strict with email from your app? I've set up SPF records and domainkeys. Still no love.
Whenever someone in the country works hard and produces something, it benefits every person in the US, including you and me.

So now we have trickle down, trickle across, and trickle up?
Some are christians some are not. I don't know why Danes or Swedes are labeled godless. In the surveys I have seen, most, but not all, Danes say they believe in God.

I know that in many other countries some a lot of people say they are Christian even though they are not very religious.

By the way it has been my experience that people in the US are very hospitable and offer to help strangers. I think more so than in Denmark. Additionally people in the US are more polite, which is nice, even though some people say it's just a superficial thing.

I don't think this article is very good. It states that there is a welfare state in Denmark, but what does that have to do with being nice? The majority are beneficiaries, so they just vote that the minority should fund the system. I don't think it's being nice. The welfare state works on the basis of coercion, not voluntary help.

- a Dane living outside of Denmark

P.S. Are people going to upvote lolcats next? I think lolcats are funny, but for I can go to icanhascheezburger for that.
i am using beatiful soup, it works with malformed markup
That's the way I write these if..else statements
fib = lambda n: n in [0, 1] and n or fib(n-1) + fib(n - 2)
This breaks down when people think that "being efficient" means "not doing enough work". It looks like you're doing a lot of work when you waste time building a database in a spreadsheet rather than loading the data into an actual database to do analysis and reporting. Often times, efficient means using the right tool for the job, and if that means that someone's going to call me lazy, because I can do in 8 hours what it takes someone else 40 hours to do, they can phone it in to me while I'm on vacation because my work is done.
I would recommend considering being more ambitious and learning how to design and prototype digital circuits on an FPGA development board. Pong Chu's book "FPGA Prototyping by VHDL Examples--Xilinx Spartan-3 Version" is really excellent, with lots of well-explained projects.

You can get really nice Xilinx starter kits compatible with this book for cheap. To be absolutely compatible, you can get the old Spartan-3 starter board from digilentinc.com for $99, but be aware that you need a PC with a parallel port. If you prefer like me to connect your FPGA board to your computer using USB, I recommend either the Nexys-2 board for $99 or the Spartan-3E starter board for $149, available at digilentinc.com, or the more up-to-date Spartan-3A starter board for $189, which you can buy at nuhorizons.com or avnet.com. These boards are mostly compatible with the book, and you can get lots of peripheral modules like seven-segment LED's for them from Digilent.

The software necessary to program these starter boards is available for free from Xilinx. The only slight problem is that you need to use Windows or Linux--no Mac OS X.
How do you name your server ?
I don't think that is true. There are a large number of people in almost all countries that earn minimum wage.

In Australia, the minimum wage or equivalent ranges $14-$18 (AUD $1 = aprox US$0.95 a month ago, approx $0.70 now). This is probably close to the median for countries of comparable GDP pp. Many employers pay the minimum.

The minimal US minimum wage is relatively low. But there are plenty of other examples around.
Hey, I've got a nice-and-healthy fear of the robot apocalypse, thank you.
See if the sites in question are part of an affiliate network, like Commission Junction or Link Share. They often provide plain-text feeds to affiliates through these programs, and many of their terms of service enable you to set up these kinds of services (although some have restrictions on mixing their data with data from their competitors). However, I've found that even this data isn't all that great, cleanliness wise (sometimes you can't trust the name of the product, the price, the link, or the SKU to even match the website) and isn't updated very often (like product availability). But it's a hell of a lot easier than writing a custom parser for each site's HTML (although when I was working on project like this, I had to write a custom parser for each feed in order to put them in a more consistent format).
UPenn gets pretty pissed about being confused with PSU.
Most atheists, if you probe them a little, turn out to be skeptical agnostics. The atheist position "there absolutely, unequivocally is no god" is untestable scientifically and is therefore a position of faith. In that sense, atheism has religious aspects.
Wow--it really surprised me how much I take for granted in interacting with a UI. The big piece of information for me was the placement of the buttons in Safari. Extremely interesting.

The carrier in the images is T-Mobile; jailbroken iPhone?
I think everything you have said is true, but it does not address the original question:

"What's a good book to teach me the basics of electronics, e.g., why do circuits need resistors, when do I use a capacitor, etc?"

I.e. he wants to learn how analog electronics work, amongst other things.

I own The Art of Electronics, but find it a bit theoretical. If you just starting out you might even wants something aimed at high-school kids (no offense intended)

If you like to learn by being taught (vs. self-taught) then sign up for class at a local school, or if you don't have the time/money then try sneaking into some lectures at your local university (I don't know how illegal / difficult that is in the US, so beware). If you do want to be self-taught then see if you can borrow the lecture notes from someone who has taken electronic engineering.
Or try this http://www.varsitynotes.com/electrical_engineering/electroni...

I would highly recommend buying a kit (lots have been mentioned) and if necessary supplementing it with components from your local electronic components store. And take things apart,

I'd also recommend building something that has an interest to you outside of electronics, e.g. if you're into cars then build a radio controlled car.
On Having Opinions
Ix web hosting review after 19 months hosted
www.ixwebhostingreview.org with hundred of ix web hosting review articles and ixwebhosting user reviews. This is the largest independent ix web hosting review site online.
Many you have to purchase; the whole web-friendly bit is an different thread.

Using tools like FLIR (AJAX-driven server-side image generation) [http://facelift.mawhorter.net/] bite into legal grey area. If done right, it won't expose the font file or curves, but that's still contentious.

The SIFr implementation does work to address legalities as well as FLIR. I haven't kept up on it, so I can't speak definitives.
Why Most Small Business Consultants Suck
"Consultants trade their time for your money"!

I love that quote - it is far too true!!
Out of curiosity, who is your registrar?

I would recommend checking out Slicehost's articles and ebook on DNS topics:
http://articles.slicehost.com/tags/dns

They have helped me quite a bit. From my experience, I would say the following are the most useful concepts to grasp:

* Knowing the difference between an A record and a CNAME record

* Understanding MX records (especially with the prevalence of Google Apps for email)

* Understanding SPF records (helps if you have a web app or form that sends mail)
that's a big help callmeed, just the sort of thing i was looking for. thank-you very much. not being sure what search terms i should use, i was coming up with a lot results for "domaining" frustratingly. the registrar i am using is joker.com.
I'm aware of the feature set, I just don't think it buys you that much over modern C++ (different story six years ago). If you're using boost correctly garbage collection isn't necessary, and higher order stuff is quite doable.

I have dealt with Java memory problems several times now and am convinced that garbage collection has no business near performance bottleneck code.
YouTube gets MGM content--this time with permission
Selecting the right picture for your Canvas Photos
There has been much interest about Canvas Prints of late. It seems that there are some new and interesting ways to use this simple method to create really imaginative pieces of wall art. If you haven’t heard of Canvas Printing or you have no idea what it is, then it’s time to get yourself acquainted. Canvas Prints use ordinary digital photos that are then converted and printed onto canvas. There is no painting or drawing involved, everything is completely automated and once it is done, you have a perfect copy of the original, except for the added artistic touch that only canvas can give.
Come on, geeks! You are my last resort.

You need to help me out! :)
I'm equally surprised that the Broderbund name still exists; last I heard they were called Ubisoft. According to Wikipedia it's had a twisty life: http://en.wikipedia.org/wiki/Br%C3%B8derbund
I think that Hulu's interface is terrible compared to youtube. You can't watch and browse additional videos at the same time because the page is so vertical heavy and there's a lot of wasted space (this is especially a problem when you're watching a lot of shortform stuff in series, like SNL clips). The same set of "popular" items shows up at the top of every list, which only enforces the continued perpetuence of these same top items; browsing via youtube is much better. Additionally, the page is extremely flash heavy with there being so many instances of font selection for headings (and it's inconsistent too, I notice today that some of the headings are images of Furtura, some of them are flash that render Futura). Youtube also lets you queue up a playlist without being logged in.
TinyUrl lets you make up your own descriptive identifier now.
Doesn't this completely miss the point?

Most religions claim some level of enlightenment in showing grace over condemning another person's morality. The effects of religion on morality should, by definition, be irrelevant to atheists.
Damn, I'm amazed. This is one of the very few computer-related things I remember from when I was a kid.
Ah, thanks. Fixed now.
I don't think it's terribly misleading - it's a puzzle from one of Microsoft's recruiting programs.
If someone's work is worth 100 units/time period but society spends 200 u/t to make them feel good about themselves, then that's a net loss. And this isn't just an academic point; a society that eats itself from inside like this can't last and will be replaced by something considerably less warm and fluffy.
Perl's WWW::Mechanize module is a good choice for scraping & automating website interactions.
Childrens Museum Design
Jack Rouse Associates is a diverse group of writers, designers, producers and media specialists who conceive, visualize and realize exceptional visitor experiences around the world
great work technation!
Maybe this index needs it's own site?
For the lazy:
"After 26 days, and almost 350 million e-mail messages, only 28 sales resulted — a conversion rate of well under 0.00001%. Of these, all but one were for male-enhancement products and the average purchase price was close to $100. Taken together, these conversions would have resulted in revenues of $2,731.88—a bit over $100 a day for the measurement period or $140 per day for periods when the campaign was active. However, our study interposed on only a small fraction of the overall Storm network — we estimate
roughly 1.5 percent based on the fraction of worker bots we
proxy. Thus, the total daily revenue attributable to Storm’s pharmacy campaign is likely closer to $7000 (or $9500 during periods of campaign activity). By the same logic, we estimate that Storm self-propagation campaigns can produce between 3500 and 8500 new bots per day.

The next obvious question is, “How much of this revenue is
profit”? Here things are even murkier. First, we must consider how much of the gross revenue is actually recovered on a sale. Assuming the pharmacy campaign drives traffic to an affiliate program (and there are very strong anecdotal reasons to believe this is so) then the gross revenue is likely split between the affiliate and the program (a annual net revenue of $1.75M using our previous estimate). Next, we must subtract business costs. These include a number of incidental expenses (domain registration, bullet-proof hosting fees, etc) that are basically fixed sunk costs, and the cost to distribute the spam itself."
Anyone wanting to know about electronics shouldn't start with FPGAs. I do FPGA design for a living. I wouldn't really consider it "electronics." It is closer to embedded programming than circuit design. To an outsider, they are almost exactly the same. Many companies lump FPGA design with firmware.

With FPGA design, you start with a board with an FPGA on it and then write some code in Verilog (Verilog is much easier to learn than VHDL). Once the design is complete, you hit the synthesize and place and route buttons and download the reulting file into the FPGA.

With embedded programming, you start with a board with a microcontroller on it and then write some code in assembly (you could also use C or something else). Once the design is complete, you hit the compile button and download the resulting file into the microcontroller.
You can two finger tap to zoom out in Maps?! Frick. Did not know that. I suck at iPhone.
what about people at HN ? how do you DO it ?
Wireless Car mouse
Yes. That's about right but I am afraid that the lazy's are gonna miss out on the intricate command & control hierarchy of a botnet and how the researchers injected their machines within the command & control channel to effectively control a portion of the botnet. I am quite surprised about the level of sophistication these botnets are - well ... I guess that programmers in Russia are smarter than their U.S counterparts.

The only thing that we should be weary of (or some of us happy about) is the fact that with this paper, somebody could go ahead and employ the botnet to do their evil bidding instead of the botnet's owner's original evil bidding. Talk about what comes around goes around!
Does anyone here know the correct way to recycle a CRT? I mean, besides dumping them in vast acres of dead monitors somewhere, how are they safely broken down and the hazardous materials recovered? How much does doing it right cost?

In short, how much does the evil mustachioed villain save by shipping them to hapless Chinese orphans?
I love PDFs. I hate Acrobat.
No you can't. You can not come up with a common morality from first principles. It always must be imposed/started from above. Two people can think about the same very difficult moral situation, and come up with opposite answers - each person thinks the other is a horrible amoral human being. There is no way from logic to decide who is right.

To go with the simplest example: abortion. Is it murder?

How about: is it OK to kill in self defense? What about kill 10 people to keep yourself alive? What about killing someone who is not harming you, in order to keep yourself alive? What about kill a baby to save 100 people?

None of these questions can be answered by thinking about them.
Are you saying you are a "gay, handicapped, unattractive Muslim woman who never attended college"?

:)
I wonder how this jolly industry settled on its limited range of products.

The spammers are infinitely creative in creating new ways to say 'penis enlargement,' but they can't think past selling one of about three products?.
The non-entrepreneurs see that failure as a final outcome. The entrepreneurs see it as one more iteration on the path to success.

Losing is simply not an acceptable outcome. So you keep trying until you win.