skysight-inc/HackerNews huggingface dataset:
The importance of DRY is proportional to what could go wrong if the repeated code has an issue. For instance, if the code is performing some vital calculation or is part of your security architecture, it had better not be repeated anywhere because somebody will need to patch it later and will need to guarantee that the update has been applied consistently.

Sometimes, it's just clearer to rewrite something yourself. For instance, just because you can express just about anything in terms of algorithms in the C++ standard library, you should instead write the simpler stuff by hand. (A great example is this silly idea of “copying to an ostream iterator” just to print out some data; I don’t care if that combination of standard functions happens to produce the desired result, because the code is painful to look at!)

It's also helpful to using aliasing (e.g. C++ reference variables) to make similar code look as similar as possible; i.e. rather than have two similar blocks using entirely different variable names throughout, declare references at the top to give them the same names so that the similarities are obvious. This also makes it easier to later pull common parts into functions if desired.
And why would that be dumb? Because my phone doesn't have the CPU power?

Granted, doing this set us back a few years. Still, for my day to day computing (everything except 3D gaming and maybe HD movies), I would totally love to have my phone run GNU/Linux with my favourite window manager when tethered, and an Android-like touch-based shell when unplugged.
> the reputation of the GOP as uniquely obstructive in comparison with previous Congresses is purely a construction of media propaganda

I'm pretty sure that's not the case. For example, I know the recent GOP Senators used dramatically more fillibusters than anyone before. Also, I'm pretty that some basic fiscal issues like raising the debt limit weren't politicized before recently.

> somehow the world continued to turn

I think this is a dangerous belief. Actions, especially by the U.S. Senate, have serious consequences for millions to billions of people. The world merely continuing to turn is not a standard; there are serious problems in the world that need to be addressed well, or human welfare in the U.S. and elsewhere will suffer greatly.
Search by Colour. Building an algorithm that sees colour as we do (2015)
The other thing that goes unmentioned here is that congress works on both a representation by population (house of representatives) and a representation by state irrespective of population (Senate). In the case of issues the senate has a say in, every state has an equal say regardless of population so in that case it wouldn't be appropriate to size a visual by population.
That's actually a good comparison between different mindsets. Even if it reads a bit biased pro-go (or pro-old-time-system-developer) it doesn't tell what's the best way to implement this - and in my opinion it's neither one.

So what's actually the best way to implement this? What are the motivations for choosing one way?

"Modern App Developer Way":
+ adoptable, scalable, readable data formats
- storage, computation

"Old-Time System Developer Way":
+ storage, computation
- "locked-in" data formats

"Database Developer Way":
+ ease of implementation
? storage, computation

Any other options/ideas?
Please explain this to me as you'd explain it to your grandma. Thanks!
Harvard: Prospective CS50 AP Teachers Must cc:Microsoft on Training Applications
There are other APIs and/or data models other than DOM, you know. Tree is the data structure there and it's not synonymous with DOM. But what always sucked is trying to work with trees using a procedural/imperative/OO language.

There's also a cadre of people, colloquially known as 'XML guys', that do use XML the right way.
Given that all these editors are cross-platform, I don't see how the continued development of Emacs could be starving out innovation in the Unix world.
This is what text editors will do to a person.
Could VC Be a Casualty of the Recession? (2008)
Work Remotely is the best place to find curated remote jobs
The deeper problem with TFA is that by hiring TFA teachers they are literally ensuring 100% turnover in 2-3 years since TFA teachers do not usually stay past their 2-3 year assignment in their placement areas. There are a few who do stay, however, as a pure numbers game, it is not enough. Also, you can Google (or Bing) away for stories of how TFA teachers are given inadequate training and special-needs students (or worse, disruptive students) are put into their classrooms.

Up the Down Staircase is a lightly fictionalized novel about teaching in the 1960s in a public school system. Bureaucracy, parents (or lack thereof), funding, burnout. Almost 60 years later, many of the same fundamental problems still exist.

https://en.wikipedia.org/wiki/Up_the_Down_Staircase
What is true is that Vi and Emacs are deeply tied to the Unix tradition. Whether they are 'antiquated' or whether there are 'better' alternatives is a matter of opinion. Personally I haven't seen any other editor that comes close.
Ask HN: Is Python dying?
Go for systems and backend, JS for frontend, Julia for data science.

It seems python is assaulted on all fronts..would now be a bad time to invest in a python stack, or will efforts to future-proof python (numba, blaze, nuitka, pyjion, Django channels, pyparallel) bare fruit?
Why not open source? The 3rd party dependencies can be put behind interfaces.
I haven't looked into LIGO at all, so this is very likely not just off-the-cuff but out to lunch. But I'll ask: What if people start looking at the (very) precise timing of particle beam circulation e.g. at CERN?

I would guess there is not sufficient resolution. And maybe it's beyond what's possible. But, thinking of additional avenues for measurement, and something that might be extant or require less build-out.

And now, there would be something against which to compare anomalies, were they to be measurable.
assuming by "soft drugs" you mean cannabis: rates of cannabis use have gone down in the UK.

https://www.gov.uk/government/uploads/system/uploads/attachm...
While on the other hand, I use it because I can open a shell from within Emacs.

I can also use tramp to ssh onto another machine from within emacs, and so don't have to bother installing my favourite editor on headless servers and Raspberry Pis.
Could you link to the code for `test.rs`?
I try to have at least one day a week in which I stay unhooked. I will use the phone just to call family while somewhere in nature doing nothing. It clears my mind and helps me get over procrastination.

The first 5 minutes are the worst. Then you realize how bad it must be if 5 minutes feel like an eternity.
For those who are curious, this is what the current WLW radio tower looks like in Mason, OH (http://www.johninarizona.com/wlw/wlw-700-cincinnati-oh-tower...). It's hard to get a sense of how big it is in the picture but this thing is MASSIVE
IMHO, August 2015. It's usually better not to bother trying to convince others, though; just bet your book and either you're right or wrong, but at least you won't have wasted your time.
That isn't the case with some of the ones that I have on hand. This "128GB" stick is "128GB" as a multiple of 1,069,285,120. Presumably, it's 128GiB less an allocation of spare blocks and the filesystem overhead.
Funny quote from the article: "This is a big data problem." Hmm maybe on a raspberry pi, or some kind of retrocomputing challenge (Do this on a simulated IBM 1130!).

I don't know how an app developer thinks, but I know the article characterization of the old developer is wrong, we'd chuck it into the existing relational DB, maybe spin up a new cloud instance and reserve some NAS space if necessary but this is a pretty small data set by modern standards so probably nothing special is required. All the reporting devolves into silly SQL onliner competition. The first question is a COUNT(*) and GROUP BY. The second question is a ridiculously simple SELECT. The third question is another simple select if you stored your ip addr bytes in separate columns, even if you allow non /24 addrs. The fourth is another GROUP BY.

The article does fit the stereotype I've seen that new programmers prioritize ease of storing data over ease of reporting, and old timers vice versa. Like the difference between coming up with the fastest next move in checkers vs "solving" checkers in the game theory sense.
Seconded. All that mentality does is create "bullshit jobs" (not my wording) designed to employ people without actually giving meaning to their lives. http://strikemag.org/bullshit-jobs/
Keep in mind that the society they are conforming to is much more open-minded, tolerant, and freethinking. It is possible that earlier "rebellious" generations have done some work in toppling barriers, and those positive effects are long-lasting in such a way that future generations can simply benefit from and enjoy them.
How does this work security-wise? Can any user deploy on your clusters? AFAIK Guix requires root/chroot. This would never fly at our site...
"if the data set becomes too large to fit in memory on a single machine?"

You just use mmap. If it become bigger than the disk capacity of single machine, you can still mount a distributed filesystem and use mmap.
I'm not sold on Martin's proposal, however I recently spent some time getting clean cancellation into some code I was working on so I can sympathize with what he is going through. Here are a few tips that will hopefully help others who face a similar situation:

1. The simplest way to cancel something is to have a "cancelled" channel and close it, don't send a cancel message! This is important because closing the channel acts as a broadcast. Multiple goroutines can listen for the same signal and you don't have to spend time managing who's sending what message to whom and when. Close the channel and everybody is immediately notified.

2. You can select on both send and receive. You should check if the cancelled channel has been closed on sends so that your goroutines don't block forever. It's incredibly difficult to guarantee that somebody will be listening on the channel to unblock your goroutine after cancellation happens, so you should check on send as well.

Example receive:

select {
case message := <-c:
// do something with message
case <-cancelled:
// cleanup and exit goroutine
}

Example send:

select {
case c <- message:
case <-cancelled:
// cleanup and exit goroutine
}

3. One commenter asked Martin why he doesn't use the standardized context package. Martin replied stating there is no way to distinguish between hard and soft cancels. While this is true, given a single context, there's nothing saying you can't use more than one context or cancellation channel. I'm not saying this is a particularly good idea, but these are not singletons and you can have as many as you need.

Doing cancellation cleanly is still a tough problem, but with some focus and especially #1 and #2 it's doable, but you have to roll up your sleeves and put some effort into it.
And that is so often the best kind of response.
While imperfect, test scores provide some context for comparison.

The being said, back in 2013, this article was widely shared. It demonstrates that you can teach STEM ways of thinking (e.g. CS), starting from early elementary grades. It does not have to be a AP-level course.

https://neil.fraser.name/news/2013/03/16/
The thing is, in this day and age most people don't need their editor to last 100 years. Because of https://en.wikipedia.org/wiki/IBM_Common_User_Access & friends, you can just switch to another editor.

Meanwhile, if you're used to Vi's modal editing or Emacs's elisp, you're basically going to hate the other tools forever if for whatever reason. For example if you need IDE features for your project or the Vim/Emacs extensions for language X are no stable/flexible enough.
Russia’s Radical Battlefield Plan: 3D Printing for Tanks
I no longer understand my PhD dissertation
Use Redis?
Perhaps try reading the article first then?
XSLT is cool "theoretically". It was made to solve real problems with correct approach. But practical implementation is not cool at all. XML is not good as a programming language representation.

As an alternative to XSLT consider CDuce language. It was made to solve a similar problem: XML manipulation. But language itself uses traditional syntax and much easier to use and understand.
"how have times changed before the enemies were Emacs vs Vi.
Now Emacs and Vim are allies against visual studio and eclipse." read long ago in Hnews comment.
Becoming Non-technical
> Remember seeing something like this in Little Big Planet, like eight years ago.

The big difference is that LBP has a basic scripting system (circuit boards). Whereas this is a mechanical calculator based on nothing but Mario physics.
> Maps of political sentiment give more space to the political right. Although Obama took just over 50% of the vote in the 2012 election, his voters account for only 38% of the space on a typical election map — making it look like his opponent should have won.

I don't recall encountering sour grapes from even the least educated Republicans over the amount of the map colored red. Most people are aware of population density. And they always show the total votes bar chart next to the map.

> why [do] we keep drawing maps of land when it's the people we're interested in

Well, because America has states and electoral votes, so we really are kind of interested in land when talking about elections.
It may be because I haven't had my coffee yet, but how would using OR help here? 1 OR 0 OR 0 returns 1, but the host was offline in 2 of the past 3 months, which means that it should be 0...
I was thinking this as well. This is a problem with a well-defined schema. Why would you use a schemaless NoSQL database? Additionally, many of the bitwise operations used by the old school dev have analogous abstractions in SQL, which are probably easier to understand.
Go doesn't have anywhere near the amount of libraries or support that we see with Python.

Python isn't being assaulted on any front. We have always had multiple programming languages and some are better than others.

My issue is that we seem to have these fad languages, like Ruby-on-rails. I still remember when it was rammed down our throats on HN around ~2008 and you were instantly down voted if you wanted to objectively talk about it's pros and cons.

Now, all of the same people from that community (which I noticed, are mostly designers, not developers) have jumped ship and moved into Javascript frameworks like Ember.js and node.js.

PHP, while flawed and not cool anymore, is still one of the most popular languages.

Python will be around for a long time.
Old-time system developers use C.
Russian--schoolgirls--anal--lessons--2--scene1 – XVIDEOS.COM
The National Park Service has a series of videos about the project for those who are curious.

http://www.nps.gov/olym/learn/nature/elwha-ecosystem-restora...
Avoiding redundant container builds
I don't understand this argument. Is it really likely that a spaghetti nest of Python, json, Hadoop, and Elasticsearch is easier to understand and to maintain than maybe 100-200 lines of self-contained Go code with minimal (no?) outside dependencies?

Or that new hires are going to think bit counting and XOR are ninja CS voodoo, while everyone already knows how to Elasticsearch?

How about cost? What's the monthly all-in cost for each approach?

This is a nice satire. It points out why modern software can be faddy, inefficient, fragile, hard to maintain, and expensive to run, with no obvious benefits (including "easy to understand", which seems to be code for "I already know how to use all those dependencies and APIs, so let's assume new hires will too.")
Old timer spends rest of 2016 to implement his solution that saves $100 in computing resources.
This is because of Debian's recent announcement about packaging ZFS, right? Or is more work involved in getting ZFS into Xenial?
Funny how that in 2016 we are further removed from when this article was written (18y) than it from the original Mac (14y).
Indeed.

I basically cannot get either Business Insider or Huffington Post to load on my laptop unless I have an Ad Blocker installed.
>As an aside, the Garmin routing is terrible: it (for example) frequently "optimizes" for distance by doing endless zigzags on small roads instead of a single turn on big roads

Google sometimes does this as well. I joke that it seems as if Google Maps sometimes just wants to take a drive in the country. Not that I always mind but, especially if the weather isn't great, I'd probably prefer the simpler route even if it theoretically takes a minute more.
Thankfully, for Arch and Arch derivatives, the AUR package removes this before building.

https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=atom-...
Yeah.. Spring batch comes to mind.
A couple of errors near the end for "How Many Hosts Were “Up” Last Month But Now It’s “Down”" and vice versa. The error is that using xor on the same item twice is a no-op...

(A xor B) xor A == B.

The correct equations would be,

!this_month and last_month = "up" last month, down now.

and

this_month and !last_month = "down" last month, up now.
I've done a few experiments with myself where I went entirely without checking my phone and favorite websites for a week at a time. I found myself much more tired (either willpower depletion or not being stimulated as much), and my productivity didn't really increase.
Companies. Unfortunately, there are still plenty of corporate environments with machines using XP, and 3DES is usually kept on to support those.
If you have NFNT fonts, I don't think they shipped with Mac OS 1.0. NFNT stands for 'new font', the original OS used the more logical FONT as resource type for fonts.

I guess NFNT already is a conversion of an original FONT, but my memory is getting vague. I think I know there also were FOND resources at one time, but Google doesn't help much there (to complicate matters, https://developer.apple.com/fonts/TrueType-Reference-Manual/... talks about 'fond' and 'sfnt' resources. There clearly has been quite a bit of evolution in font formats over time)
I won't use an IDE on OSX or windows that doesn't support VIM or Emacs key bindings because I'm not an animal that wants to take his fingers off the line to use the mouse or arrow keys every time needs to move the cursor (or run a regex real fast to mass update code).

Luckily there are VIM bindings for nearly every single IDE of importance out there.
Red Blob Games
Actually, yes. That's exactly what I'm advocating. Whether they are separate assignments or just chains broken up into multiple lines, the end is the same as far as what I'm talking about.
tesla model S has over 500kW peak power
You don't need to be clever to represent data as bit arrays. All you need is to have some CS basics and not be completely brain-dead.
Pentester: I'll use mass scan, someone else already solved this problem.
https://github.com/robertdavidgraham/masscan
Whether you need to introduce variables is dependent on the language. Some allow for chains to continue onto a newline, while others won't.
Absolutely. Benchmark should be done with idiomatic code you'd like too see in a documentation. Not ultra optimized ones. At least not only.
Helm may be the most flagrant example of a terrible package that remains inexplicably popular. I haven't uninstalled it yet, because there are a few packages that use helm that don't have ido equivalents yet, but I try to minimize my usage of it as much as possible. Issues include:

- Significant performance issues

- Constant bugs - updates often break the package completely, especially if you're using the melpa version (melpa is another rant for another time - standard melpa is totally brain-dead)

- An atrocious version of "fuzzy matching" (you have to separate terms with spaces, which are then turned into ".asterisk" (can't type a single asterisk in HN comments) and everything's concatenated into a regex to match)

- The default helm-mode (what they recommend using for completing-read, which controls execute-extended-command, i.e. M-x, and such) is unsorted. Not badly sorted - unsorted.

- Doesn't use a lot of the standard layout functions, instead replacing them with its own stuff that can't be customized in a standard way.

- Dictatorial maintainers that only allows options and features that they deem the "right way" to do it. This is fine for some projects, but total control of my editing experience is the primary reason I use Emacs in the first place.

ido with a few simple plugins is vastly better, less buggy, more compatible, faster, has better matching, and is easier to customize. I recommend against using helm for completing-read unequivocally.
I suppose I'm a modern app developer, so here's what I would actually do:

Postgres.

1) I'm not going to invent my own system. I am not the first person who wants to store addresses and boolean values. If I'm looking at this occasionally over many months, I don't want to keep relearning my elegant bit-structure.

2) SQL is great, Postgres is even better with built-in network operators[1] for the more specific queries (e.g. subnets.)

3) Bitfields are all fun and games until you want to change things. I'm already having flashbacks to rails `has_bitfield` columns. Also, fewer people can confidently twiddle bits than can understand boolean SQL columns.

4) The author mentions possible compression methods. I'd rather a tested project like Postgres think about everything to do with storing my data.

I understand the criticism, but with cloud storage so cheap it feels like optimization just to show off. I'd rather save time than bits. If there is a satire that involves me using Postgres when I shouldn't, that would be welcome.

[1] http://www.postgresql.org/docs/current/static/functions-net....
And likely C89... certainly not Go.
How many people got lost and died or whatever before GPS navigation?

How many people have been lost in dangerous situation but were able to get to safety due to GPS navigation?

How many people are balls stupid and will win a Darwin Award regardless of what technology the use or don't.
Nearly every IDE of importance has either a full VIM plugin or is working hard on it. Not having to take your hands off the keyboard line to hit the arrows or mouse is a big deal to a lot of devs. Having easy and powerful regex is nearly as important. And having buffers is probably a close number three.
Ask HN: Power Raspberry Pi in car, after engine goes off?
Hi All,
can somone recommend and system or USB battery that will hold Raspberry Pi, in car for some time after the engine is off?

I think for USB power banks it feature is called "Passthrough charging".
Can you recommend some proven concept.

I need the pover the PI maybe for minutes, the time doesn't matter so much.

Thanks,
t.
> The UI could be improved, maybe, but there's a lot to be said for knowing that your editor will still exist next year. I'm frankly not confident in ST3, but I'm 100% certain that Emacs will be there.

This is misleading. In the era of JetBrains and its perpetual licensing and Steam and whatnot, it's worth pointing out that ST3 is a binary that you download and have complete access to, so of course it will be there next year.

You're probably getting at the fact that development may stop on it next year, and that's true, but the product is still pretty polished and useful now.

I also don't have your confidence that Emacs will always be there. I don't have statistics - but have contributions been increasing or decreasing in the last decade? In any case, I hope that Emacs fades away: text editing is great, but I think there's still plenty of room to advance our craft. Things like Lamdu and Eve (nee Light Table) are interesting explorations.
Does anyone else think this title is ridiculous?
Some people will always flock to Teh Shiny -- but python isn't going anywhere.