skysight-inc/HackerNews huggingface dataset:
Not sure if science or performance art.
It's pretty high at the moment, since I'm paying for a lot of 1:1 instruction (7 hrs/wk split between tennis and fitness) and am still getting used to the new area. If you take that out, I'm probably spending something like $20-40k annually.
>I can't even remember ever being able to seek in a Windows Media file without breaking the entire playback.

What's that got to do with Quicktime?
"also are you seriously going to quiz someone about i18n for a interview?"

Absolutely - in fact asking whether that regex was a good way of matching all characters in an input might be a good interview question.
If that's all it takes(404) then Im a rockstar with my default apache page!
It wasn't really about whether they were good; it was about attitude. It had a very significant impact on music throughout the world; not just what people played, but also how they performed it (on stage).
> I wish "undefined behavior" wasn't a thing in C/C++. It's not worth it. :(

What do you suggest instead? Run-time checks?
Would you have a place in your list for António Damásio's work on consciousness and, generally, the embodied mind?
Samsung to bake more internet ads into its TVs, including legacy models
Evaluating that expression is undefined behavior if ptr is outside the +1 bounds of the array. Check out the enumerated defined behavior in the (old C99, working draft) standard - http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1256.pdf

6.5.8 Relational operators

...and pointers to array elements with larger subscript values compare greater than pointers to elements of the same array with lower subscript values...

... If the expression P points to an element of an array object and the expression Q points to the last element of the same array object, the pointer expression Q+1 compares greater than P.

In all other cases, the behavior is undefined.
*"2. How do I emigrate to a country with higher salaries for engineers?"

Hmm. You're not wrong, but I do wish location wasn't so critical for this kind of thing.

I've deliberately traded income potential for QoL, ability to buy a house, predictable hours, and job stability. But the prospect of using consultancy to move towards a part-time year with ability to work on my own projects is tempting me on the horizon.
I was thinking of Halfbakery as I writing my comment! I thought it had gone defunct a few years ago.
In the database terminology that's usually called "Isolation" to keep the concept separate from the rather restricted definition of atomicity.
For Startups, a Different Perspective Matters
Unix talk was awesome, I wish it would return.
You can do it by converting pointers to integers. No UB, but of course it is implementation defined.
Anything you want to do with MongoDB can be done better, faster and nicer looking with RethinkDB.

Never looked back after stared using it a few months ago.
Windows has it, but not many people seem to use it: https://msdn.microsoft.com/en-us/library/windows/desktop/aa3...
Windows has this.
The whole justification for whiteboard coding is total BS. Never have I ever written actual code on a whiteboard, not even "when we are banging our heads against a problem and there is a deadline looming and blablabla".

Yes we do go to the whiteboard. To design stuff. To organize components of the platform and figure out how the fuck to coordinate some f-ing distributed transaction, or how to send messages from A to B and not create a bottleneck. We don't try to write the pseudo-code for a palindrome detector.

I have nothing against coding interview, in front of a computer. Whiteboard coding? I just leave the room. If you give me a whiteboard coding exercise, you failed my interview.
The Military Is Building an Employee Database to Predict Traitors
the most amazing thing is that apparently javascript developers do not ever, ever think about any algorithms like the way a C++ programmer would. I was shocked that when the write-up explicitly calls for "the most efficient code possible" nobody cares that the example program starts off making two extraneous copies of data that might never need to be read. (why lowercase the characters inside when you can fail early working outside in.)

Can you imagine if the task were "write the most efficient code possible to check if an array of strings of integers such as "3423", "34356", etc, is sorted (treating the strings as base-ten numbers, "3423" representing 3423 and so on), ignoring any strings that include non-numerical characters" started out by making two copies of the whole damn array. That's what's happening here, it's kind of shocking that this is what javascript developers accept as the "most efficient possible" without anyone having the slightest issue.)

I'm shocked. Even the definition of efficient offered for "Write the most efficient function you can" is

> If you’re experienced, you should know that “efficient” in production code means three things:

> Runs fast.

> Doesn’t take up more memory than it needs to.

> Is stable and easy to maintain.

This is an absolutely shocking definition, given the example code offered. It really does show that javascript programmers do not in any sense consider algorithms the way Go or C++ programmers would. (I conclude this after reading the comments here and also the article.) Especially given the above definitions.

I mean, on a two megabyte input file the "most efficient function that you can" would start by copying the whole two megabytes...twice. Rather than working from the outside in, so it can reject the input and ignore the inside characters as fast as possible. Shocking!

What I'm really shocked about isn't that that's what the solution was - fine, no problem. But rather, that nobody comes close to thinking about most-efficient the way other types of programmers would think about it - and this includes the comment in the story which takes exception to the offered solution. It doesn't do it either. This post and this thread was a real eye-opener for me.
Oh yes. I do that a lot with HackerNews, actually. The show goes to one screen, HN goes to the other. I usually start skimming the site when the show gets "slower", only to realize few minutes later that I missed an important part of the action. An annoying habit I try to fight off.

I think it stems from the need to have the brain occupied to some level, and the show reaching close, but not to, that level. I feel the need to add something to cross the boundary. Eating while watching helps (it seems to require just enough cognitive effort to reach the comfort level), but it has its own bad side effects (like scheduling meals to the shows).
Voxel art
Theft behind Planet 9 in our solar system
Knot Resolver 1.0.0 released
it's a bit unclear but in the context of the whole document, it seems like they mean web pages and searches on their website, which is both legit and trivial. What worries me a bit is the fact that it's unclear.
Something sounds suspicious there, I would use DTrace to see what is going on with locking. I have no performance complaints, including the HBase cluster that is very demanding.
I felt when I was a student that some teachers just wanted everyone to know how clever they were and sometimes that could be achieved by putting someone else down. Someone who wasn't in a position to talk back. The good teachers gave criticism, pointed to the code standards for the course and were fair in their marking. The best teachers asked questions that made the students produce better work and took time to explain and discuss. They all knew which category they were in.
The problem isn't filtering but determining what to look for - a lot of these are hosted on things like AWS or some CDN, which means machines with very generic hostnames, and you'd have to catch a meaningful DNS lookup to get started. If the traffic is encrypted, you still have no great idea what's actually being sent (is it fragments of the file you're working on, which keys you've pressed in the last 10 secons, or an automatic update check? They could all be similar sizes), and if the application is doing security "correctly" it will be very hard to MITM.
This is the best resource on mindfulness I've come across:

http://www.urbandharma.org/udharma4/mpe.html

(scroll down for the chapter links.)
Alas, I feel the need for such a thing precisely because I only have ideas and lack the will to implement them. :(

I specified game design because I think it would benefit the most from such an "ideawiki"; there's still lots of untapped genres or cool things from 20+ year old games that haven't been reintroduced in a modern way, but really there must be all sorts of apps that people have ideas for but are unable to make themselves,
Thanks Dad.
Speaking of writing posts that people will read, this is just another one right? Because it feels like marketing, especially since you obviously have not given up on the app as proved by the last paragraph.

Not really judging, I find it quite clever.
It's still super slow, as in the UI (especially the scrolling) on OS X on a Retina Macbook (Early 2015). I wonder if it's my DownThemAll add-on.
This remind me of a story.

When Stephanov was implementing the STL, he needed a strict weak ordering among all pointers to implement things like std::map.

Instead of wasting time arguing within the committee on wether operator< should have the required semantics, he simply added std::less as a primitive and default comparison for std::map. It is specified to call operator< for every T, except that for pointer it relies on unspecified compiler support for doing the right thing.

On pretty much all implementations it simply calls operator< even for pointers.
> 85 percent of Facebook video is watched without sound

Probably for the better because I suspect a large percentage of watchings is happening in the office without the boss knowing.

Sadly, we are living in an era where everybody has a television set on their desk, and is watching the equivalent of America's funniest homevideos all day. Apparently without sound.
IMO in 2016 it is important to know the basics well enough to know if what you're doing is bad from an i18n perspective (at least for non-junior positions). Even a comment like "// TODO: localize" is OK

It is often a positive signal that a candidate has worked on software large enough to be used internationally or is thorough enough to worry about it. For most of us, day-to-day software work is about being thorough and careful with design and implementation, not heavy algorithmic lifting
That article finally convinced me to install an ad blocker for iOS (1block).

Then I had to toggle off "block comments" to see what was posted here. :)
How New Balance Ran into a Trademark Wall in China
It was definitely an option for AIM, and I believe it was an optional plugin rather than a default feature. I remember freaking out friends in high school :-)
MS_INVALIDATE is likely a no-op on any modernish Unix, including Linux. It is there to accommodate old systems with non-coherent mapped files and page caches or even multiple mappings of the same file.
It is helpful to understand what problem it solves.

Lets say that we have a banking application that consists of a program which updates someones bank account by $Y every time it is called. Y is the command line parameter. The program's algorithm is like this :

1. Read the current balance amount to X

2. Add Y to X and store it in Z

3. Write Z to the database.

This program cannot be called by multiple processes at the same time. Lets say that it is payday, the account holder holds two jobs and each employer is trying to deposit $10 into someone's account, at the same time. Both these processes call the program with Y = $10. What happens ?

1. Process 1 reads the current balance ( $100 ) to X

2. Now, process 2 reads the current balance ( $100 ) to X

3. Process 1 adds 10 to X ( Z = 110 )

4. Process 2 adds 10 to X ( Z = 110 )

5. Process 1 writes the updated value to the database ( Z = 110 )

6. Process 2 writes the updated value to the database ( Z = 110 )

Now the account reflects a balance of $110, when it should have reflected $120. What we need is a guarantee from the system that some actions will not be parallelized ( i.e, they will be atomic ). From TFA it is given that "mkdir" is an atomic operation in UNIX ( i.e, only one process can create a directory at the same time ). You can write the program with the following logic

1. mkdir /tmp/lock_dir

2. If above step was unsuccessful sleep 10 seconds and go back to step 1

3. Read current account balance to X

4. Add Y to X and store it in Z

5. Write Z to database

6. Remove /tmp/lock_dir

Multiple processes can invoke this program simultaneously.
The Megaprocessor is a micro-processor built large. Very large
Principal investigators as scientific entrepreneurs [pdf]
A little while ago, someone used Facebook's last active time to track their friends' sleep: https://medium.com/life-tips/how-you-can-use-facebook-to-tra...
>for the most part, they can compete on cost and free of the trappings of business deals.

Pirate sites are usually also run by small teams, don't have dedicated user interface experts, can't easily offer apps, etc. Users are willing to pay for convienience, there's lots of room for big companies to be competitive with pirates.

And yet, according to the article about 15% of SciHub users use SciHub because it's more convienient to use than the alternatives. If the pirates are cheaper and have the better user experience, why would anybody not use the pirate platform?

Of course building a product that's competitive with pirate offers doesn't prevent you from legally challenging them. A war can be fought on multiple fronts at once.
Project Soli – touchless gesture interactions by Google
It's not about OSS,it's about maintaining and understanding other people's code and revision control.

If you don't have kids at this point, then I'd go with the Pat Rothfuss method: http://blog.patrickrothfuss.com/2010/02/fanmail-q-advice-for...

If you do have kids at this point, your situation is significantly harder.

That said, if you don't have kids, are you really working/commuting 90 hours a week and don't have 20 to spare?
I agree with vertex, even with the male pronoun, it could still be confused( like a lot of things in English, you have to make an educated guess as to the meaning).

I hear that a lot from students.
Did you sit down with student and try to understand why they wrote comments like that, explain exactly why comments like that where bad and try to show them a better way, or did you just fail them and hope they'll work out all those things by themselves?
Try again.

For Forbes you could use incognito and click twice (find article in Google, click, close tab, click again) usually works for me.
Bug Poaching – A New Extortion Tactic
What alternatives are there? Just recently there was a HN story about a great add-on for Emacs that would find the definition of a symbol. That's been in VS for a decade or two but open source editors apparently don't have it. Same goes for renaming things and having them automatically renamed everywhere else. Background compiler that underlines and even corrects your errors as you type - what else does that?
sci-hub.cc works in eduroam in my German university.
Do the subtraction and divide by the size of the pointed-to type, like the expression says? Why would you expect the calculation to be any different if ptr was inside, one element past, two elements past, or 1000 elements away from the ends of the array?

I can understand it possibly being a problem if the two pointers being subtracted denote completely different address spaces (which is definitely possible on some architectures, particularly Harvard MCUs; the one that comes to mind immediately is the 8051 which has IRAM, XRAM, and PMEM), and even there you can "linearise" address spaces so one comes after another and subtraction still works despite possibly giving a meaningless result, but on any architecture where all pointers are in the same address space, the sensible behaviour is the most consistent and straightforward one.
Managed Service Sucks
How should we report bugs?
Ask HN: Generate random traffic for metadata obfuscation?
I remember some time ago a scare of meta data or something similar being leaked and specific peoples traffic being available (not security background so sorry if that doesn't even make sense), was just wondering if there were any scripts to randomly send requests to accumulate random meta data and obfuscate your real traffic?
Whelp... Is there a non undefined way to do bounds checking in C?
As always, the right tools for the job.

And those tools today are often a mix of my own code and some SaaS.

Depending on how much data management there is, I will ususally start with Django, specifically Django Cookie Cutter [1].

This bootstraps a lot of the basics for me like user auth, testing, front-end assets, etc.

For error console, I will use Sentry[2]. There are self-hosted and paid versions.

If I want some real-time type functionality, I will use Pubnub [3]

I am lazy and will always play to my strengths. That happens to be Python, Postgres, and constantly hunting tools that make me an even lazier developer.

[1] - https://github.com/pydanny/cookiecutter-django

[2] - https://getsentry.com

[3] - https://pubnub.com
For my course it is part of the criteria. They want every single line commented.

It's a nightmare of irritation.
I think the biggest biggest takeaway of this blog post
is how easy it is to hook into the code of a
well-structured modern web application.

So does this mean that spaghettification of your web application code will work as a higher barrier to enter against these kind of clever workarounds?

Admittedly, writing spaghetti code will make the programmer feel miserable, but does it really deter people from hacking on your code?
Beware, it appears to be deprecated:

"Microsoft strongly recommends developers utilize alternative means to achieve your application’s needs. Many scenarios that TxF was developed for can be achieved through simpler and more readily available techniques. Furthermore, TxF may not be available in future versions of Microsoft Windows."
That's true to an extent, except a compiled binary is much harder to decompile compared to what the author has done in the article with obfuscated JS. In future, I imagine more websites will use WebAssembly for this reason.
Infinite collections with ES6 generators
Thank you everyone for your replies. After carefully reading all opinions I think that TDD is the way to go because for larger projects sooner or later it will help me catch bugs when the project becomes complex. I also think that the 2x effort will be worth it with easier deployments.

I was kind of giving up on TDD but seeing that almost everyone thinks it is important (for larger projects), I will try to watch some more videos and try to write tests for my current project (for the work already done) and tests first for the code that hasn't started (maybe I'll add comments in the tests). This way I can compare the two, with which approach suits me better and fails more (i.e. catches more bugs) in future.
My first computer was a Compaq Deskpro Portable. It had a 5 1/4" floppy drive, a 40 MB hard drive and ran DOS 3.1 IIRC. I even wrote a custom autoexec.bat file so it booted into a fancy menu of common applications (like Volkswriter and BASICA). I still have the computer but am afraid to boot it up now, since the last time I turned it on it actually booted but smoke came out of the vent.
thanks. I'm not trying to be clever. I'm quite genuine. I've tried all I can think of. I'm sure it's a product that is, feature wise, on par easily with others valued in the millions. For that reason I'm hesitant to pull life support from my little project without at least one final push.
The build VMs are predefined Ubuntu LTS releases. The build system that sets everything up is a bunch of barely documented scripts.
Huh this was a really interesting write up on semi-obscured code. I had never seriously thought about crawling through popular sites code like that, I'm definitely going to have to give it a go!
Show HN: Cors-container – A CORS proxy in a container
> I remember freaking out friends in high school :-)

That was the primary feature :) It worked for the MSN/Microsoft Messenger protocol as well.
'drawing is done with a thing called GL'

very historical
PyCon 2016 Videos
Are there any privacy concerns if ublock origin extension is used with the Tor browser?
I'd guess that PAE on x86 systems might really hurt with this. Basically any system where the memory model is one of segment + offset will run into trouble with pointer comparisons. Ever since the 8086 I've assumed that pointer math is tricky and non portable (see http://catb.org/jargon/html/V/vaxocentrism.html for the 80s version of the same problem)
As many, from the average 90s Windows user, QT was just an awkward penguin plugin. It "felt" outdated even in these days.
Created an account to say how much I enjoyed this article, thank you for sharing it!
The average conversion from facebook videos are like 0.001%.

Just fyi.
Facebook users are apparently broadcasting the fact that they are typing to their conversation partners, why should you ignore that information? If you don't like that, disable that feature, or complain to Facebook if it is not something you can disable yourself (or don't use Facebook).

It can't hurt to raise some awareness of what you are invisibly broadcasting in terms of data on-line.

(I always liked how this feature could be disabled in Gaim and Pidgin.)
If that was the intent, then overflow should have been classified as enumerated implementation-defined behavior, just like the bit representation of an integer type which already deals with those variations.
Disclaimer: I've never written any C# code, I write Java code.

"Convert.ToDouble(Convert.ToInt32(hourStr)/60)+Convet.ToInt32(minStr)" -
while nobody writes code in this way in production this is exactly the way of coding endorsed by Codility-like programming challenges when you have 30 minutes to come up with a solution.
Tenants fume over apartment complex's new Facebook addendum
They reverted it 'by mistake'.
but it must have been something totally mad and not reasonably castable to int or even int.*

As long as you can impose an ordering on the elements in memory and thus derive a number for each one, it's possible to define the straightforward representation of a pointer. 4 chars per word is an easy case since you can just let char* be a number with the lowest 2 bits indicating the index within a single word, and the rest of the bits are the word-address. int* can be the same number with the lowest 2 bits always 0. If word addresses are smaller than 36 bits, then values with the higher bits set are invalid, and if they're larger, then use multiple words to hold them.

Working with chars on such a machine is going to involve a lot of shifting and otherwise data movement, but there you go, a way to implement C pointers on such a machine.
> If by "well documented" you mean "lots of people have whinged about it at great length", then I guess you're right. It's also a "tried and tested" method, too, so it's got that going for it.

You are wrong. Just because it's most used currently doesn't mean it's better. And it is actually well documented.

@tokenadult posted this numerous times: https://news.ycombinator.com/item?id=4879803
One of the take-home lessons from the last Global Game Jam was that there is https://ephtracy.github.io/ which can produce stunning voxel art (I saw quite a few participants using it).
Building a Culture of Data at Skyscanner
Weird, for example this https://github.com/360Controller/360Controller is open source and signed.
As usual, Apple's review system is completely arbitrary.
$3,000 – $25,000 to Grow Your Business
Krita 3.0 Released
Personal Loans You'll Love. Up to $25,000 to grow your business, APR starts from 2.9% and up to 15.9%. Clean History Required!
*Backers can reduce your rate by up to 41%
Try to run Pages, iTunes, XCode or Apple Script on KDE.
Find out what your age says about you if you're Indian #DataViz