Better HN
topnewbestaskshowjobs
Log inSign up

thelastnode

76 karma · joined Oct 28, 2010 (16y ago) · 32 submissions

Submissions

1.

Understanding the Emotional Response (2015)(alistapart.com ↗)

26 points · by thelastnode · 9y ago · 1 comment

2.

The Uber Game: can you make it in the gig economy?(ig.ft.com ↗)

2 points · by thelastnode · 9y ago · discuss

comment 11y ago · link · parent

You can use a good number of these today with Retrolambda: https://github.com/orfjackal/retrolambda

comment 11y ago · link · parent

Yes, the initial parts of the example could be accomplished with awk and xargs, but as the article goes on to demonstrate, even doing something like printing every nth element would be difficult.

I think the intent was for this to be more of a demonstrative example, and with a more complex, evolving, real-world processing pipeline, Akka streams could be really useful.

5.

Understanding the Emotional Response (2015)(alistapart.com ↗)

1 points · by thelastnode · 11y ago · discuss

comment 11y ago · link · parent

It looks like the TodoMVC[1] example has a bug:

1. Create an entry "foo"

2. Check the box, observe strikethrough on "foo"

3. Check the "check/uncheck all" box (left of input box)

4. Observe strikethrough still present on "foo"

Digging in to the code[2], it looks like the "model-less" tenet caused the CSS class on the text and checkbox to go out of sync. In React, this would be a re-render and change in the virtual DOM, or in Angular, both would be bound to a shared model/scope.

If the simple TodoMVC example has a bug like this, the framework might not work too well for larger applications.

[1]: http://t3js.org/examples/todo/

[2]: https://github.com/box/t3js/blob/gh-pages/examples/todo/live...

7.

Writing a Spotify Client in Emacs in 16 Minutes(youtube.com ↗)

15 points · by thelastnode · 13y ago · discuss

comment 13y ago · link · parent

The videos are hosted on Dropbox. Dropbox disabled the videos because there has been too much public traffic.

comment 13y ago · link · parent

True, but sometimes there isn't a choice, e.g., working with a clowntown library, poorly designed legacy code, etc.

comment 13y ago · link · parent

I like to put a summarizing comment in the code for lines that require justification like the ones you mention. That way the discussion happens on GitHub and the conclusion is in the code, where future developers will see it.

comment 14y ago · link · parent

Best tweet: "Code so hard, VC's wanna find me"

comment 14y ago · link · parent

Took me a second to find, but here's the all-on-one-page version: http://www.linuxprogrammingblog.com/all-about-linux-signals?...

comment 14y ago · link · parent

Even in the movie 3 Idiots, at the end of the movie, the man with the pen points out that there's a reason for the complexity: bits of graphite flying around in zero gravity near instrument panels and people's eyes, etc.

Simplicity is great, but sometimes complexity is warranted. More importantly, assuming other smart people (many other smart people) are wrong without deep thought is not a good idea.

comment 14y ago · link · parent

Why?

While I have worked through a decent amount of CLRS myself, I think there are much better ways to learn how to solve algorithmic problems. For example, programming competition books like Programming Challenges[1] forces students to solve real-world-ish problems according to performance constraints - a time constraint, either artificial (e.g., problem statement requires execution within 2 seconds) or actual (e.g., choosing an algorithm that is too slow means the sun will burn out before the algorithm terminates).

Books and contests of this nature teach algorithmic thinking, which is far more important than the actual algorithms themselves. It also provides a context for implementing these algorithms, which means the student gets to see the more practical aspects as well: testing it on corner cases, fighting with the chosen implementation language, relying on compiler optimization, etc.

If the goal of the undergraduate program is to develop practitioners of computer science, or even graduates headed for academia, algorithmic thinking is essential. I don't think CLRS is necessarily the best way to teach that, and it certainly isn't the only way.

[1]: http://www.programming-challenges.com/pg.php?page=index

comment 14y ago · link · parent

Regarding the Coffeescript-Javascript difference, Coffeescript and Javascript can be used transparently in node. Once require('coffee-script') is run, the module replaces the require function with one that can load both Coffeescript and Javascript.

This means that if there is a file ./lib/foo.coffee, the following code in bar.js will work:

    require('coffee-script');
    var foo = require('./lib/foo');
Yes, some people may not like Coffeescript anywhere in their project, but this functionality makes it easy to add Coffeescript to an existing Javascript project or use Coffeescript modules as a blackbox in a Javascript project.

comment 14y ago · link · parent

How does this compare to Heroku?

Neither seem to support WebSockets (though the Heroku article I found was a bit dated[1]) for the time being.

From the article, it seems like AppHarbor doesn't automagically pull in the dependencies from the package.json, which Heroku does.

Add-ons wise, there is a lot of overlap, but Heroku definitely has more at the moment.

Heroku lets you run one-off processes, which is nice for debugging. I couldn't find this functionality on AppHarbor.

[1]: http://blog.heroku.com/archives/2011/6/22/the_new_heroku_2_n...

comment 14y ago · link · parent

For Javascript, async.js[1] offers some good tools for different kinds of control flow with callbacks.

[1]: https://github.com/caolan/async

comment 14y ago · link · parent

A fix to the halting problem?

Jokes aside, timing out would be useful.

comment 14y ago · link · parent

What are the consequences of running this in production? What's the performance hit like, is it unsafe, etc.?

comment 15y ago · link · parent

For find, you need to use single quotes so your shell doesn't automatically expand the .java glob into the names of all the files. Also, find uses one dash for parameters, and can take an exec parameter: find . -name .java -exec wc -l {} \;

The {} means "replace with filename" and the semicolon (escaped so your shell doesn't eat it). This will run wc -l <filename> for every file that matches.

The -regex flag lets you do the same thing as -name with regular expressions.

The problem with this is we run n different wc's, as opposed to just one with all the parameters. We can use xargs to fix this: find . -name .java | xargs wc -l

This even gives you a total!

The

really* simple solution (which is probably best) is to just use shell globbing: wc -l *.java

While find and xargs are definitely useful, the easy solution here works better

comment 15y ago · link · parent

This is an interesting alternative to StackOverflow, though I think that you might be able to hit a wider and more skilled audience in an already established community.

comment 15y ago · link · parent

This also works with live camera feed because of how OpenCV handles video streams. You can extract frames from the stream and then run the same face detection code on those extracted frames.

This is a great post given that a lot of the OpenCV functions, while powerful, are either missing documentation or have outdated documentation.

comment 15y ago · link · parent

I definitely agree; it's just a matter of finding the right people.

Anecdote: attending some of the tech talks that companies give at Tech, there is always a gradient of people, from the people that are there for free food to the people that are there to ask questions and get something out of it. These tech talks are thinly veiled recruiting events, and the latter set of people are always approached afterwards for interviews or networking purposes.

comment 15y ago · link · parent

No idea where this came from (or if it's a good idea to feed the trolls; "hn_is_dumb" - really?), but Tech does have the policy to accept most and then fail out those who don't belong there. Only 29% of incoming freshman graduate in 4 years.

I'm glad Tech has this policy because there are lots of bright people here that did the same thing I did in high school and they do well here for similar reasons.

comment 15y ago · link · parent

This is the problem that I had when I was applying to colleges: I used to ignore classes that bored me but were required and instead spent time that should have been spent on homework, etc. doing programming side projects and learning CS concepts.

When application season rolled around, I had to compete with candidates who had a much shallow understanding of their area of study, but had a much stronger overall GPA, loads of random APs, etc. While I did mention my side projects and depth in my area of interest, I didn't think to submit code or the actual projects; I usually just mentioned it in the questions or essays (which I'm not certain anyone even reads). This lead to quite a few rejections.

I'm at Georgia Tech now and doing well, because all my classes, more or less, are related to what I'm interested in. While I'm very happy here, I'm curious if I would be as happy if I wasn't accepted to Tech, and were instead studying in a place without such abundance of opportunity. I'm sure there are others in similar situations.

comment 15y ago · link · parent

Does not work on a Thinkpad T410 on Arch Linux.

With Chrome I can see the marble but it doesn't move, with Firefox 4 nightly I can't even see the marble.

comment 15y ago · link · parent

Which then opens the print dialog, so actually two :P

comment 15y ago · link · parent

Another great resource for learning about vim is the Vim Tips Wiki [1]. The have a LOT of content on there, most of which will be useful at some point.

The best tips page [2] has a good set to get started.

[1]: http://vim.wikia.com/wiki/Vim_Tips_Wiki [2]: http://vim.wikia.com/wiki/Best_Vim_Tips

comment 15y ago · link · parent

I actually did this recently! I kept vim as vim though, so if I REALLY needed to edit something quickly, I still could.

It's very natural to type "vi <filename>", so it certainly helped.

comment 16y ago · link · parent

The regular way to do this would be just trudging through them after grouping by date or something.

A cooler way (albeit significantly harder, at least until it's working) way to do this would be to consider it an AI classification problem... maybe with enough training (as you go, since you'll be organizing anyways), it can start to suggest categories, so you can just hit accept as you fly through your pictures!

12