PHP Apprentice – An online, open-source book for learning PHP - <AUTHOR> https://phpapprentice.com/ <comment> Anthony-G The content is great. I like how you start off teaching the language by showing how to execute simple programs from the command line (I learned that you don't need the `-f` option to execute a file). I've come across far too many PHP introductions that confuse the new learner by attempting to get them to set up a web server (usually Apache) and then all the strings have to be wrapped in HTML markup when printed. There's a lot to be said for keeping it simple for teaching the essentials of a language.

The site is cleanly and beautifully formatted and I love how lightweight it is: HTML files, a CSS file, a JS file and an image. It's such a refreshing change from the thousands of visually cluttered sites that make hundreds of resource requests (most of them third-party) and whose content is not visible without allowing third-party JavaScript. When I completely disabled JavaScript on this site, all I noticed were non-essentials such as Solarized syntax highlighting and the Table of Contents; I could still navigate through the site using the _Previous_ and _Next_ links (and of course, the browser's Back button).

Kudos!

<comment><AUTHOR> Thanks! I really made it a goal to keep the site lightweight and simple.

</comment></comment><comment><USER2> Nice job. I would suggest all PHP devs spend some time with [https://phptherightway.com](https://phptherightway.com). Your resource looks to be a great starting point.

<comment><USER3> Not disagreeing but I usually recommend that people read [http://www.phpthewrongway.com/](http://www.phpthewrongway.com/) afterwards to get a more pragmatic viewpoint.

<comment><USER4> To be honest, it reads more as someone being salty they don't understand the point of frameworks.

<comment><USER3> I think you skimmed the article too quick then because there are plenty of good and well supported arguments in it.

<comment><USER4> I think I read mostly to the end before giving up on it.

There's a lot of arguments, I just don't think they're particularly good.

Don't misunderstand me, there is a point there, but it's buried under a load of text.

</comment></comment></comment></comment></comment><comment><AUTHOR> Thanks for reading! This is still a young project with room for improvement and new sections. I'm already planning some content for building web pages, database access and package management with Composer. I wrote an announcement post over on dev.to if you want to read more about how the site was built: [https://dev.to/restoreddev/announcing-php-apprentice- coc](https://dev.to/restoreddev/announcing-php-apprentice-coc)

</comment><comment><USER5> Very well done, there's a lot to help a novice PHP developer. I feel like the next chapters I'd love to see would take those concepts and apply them to building something. Everything so far unless I missed it is focused on the backend but it's important to show that it's also possible to use it as a front end and what the modern approaches to doing that are.

<comment><USER6> Thats a good point. PHP is a general language, but used almost exclusively for web development and most websites now use a framework (symfony/laravel......) etc.

I'm learning symfony framework after my micro framework of choice lost its support (Silex..).

The symfony documents are ok, but I wouldn't want to give them to someone starting out. (though looking again, they seem better..) [https://symfony.com/doc/current/page_creation.html](https://symfony.com/doc/current/page_creation.html)

Someone showed me the free video cast howto build a basic symfony site. I though it was pretty good. Like many of these, the basic tutorials are free, but its a subscription site.

[https://symfonycasts.com/tracks/symfony](https://symfonycasts.com/tracks/symfony)

</comment></comment><comment><USER7> Nice job and well written. A nice addition would be how to use pdo. I'm appalled by the number of ressources I see online which are using the old mysql api.

<comment><USER8> > I'm appalled by the number of ressources I see online which are using the > old mysql api

Recently authored articles? We have an internet filled with 20 years of PHP tutorials, and unfortunately for beginners there's not an easy way to evaluate if something utilizes modern best practices or is an Experts Exchange post from 2001.

<comment><USER9> I find strange you can't down-vote a link on Google, it should exist and Google should take it into account specially for technical links (less so for opinions articles or anything political)

<comment><USER10> Everything is political. I wouldn't want people to downvote Mercurial links into oblivion.

Anyway, Google links are pretty much already ordered by popularity.

<comment><USER9> That's the problem, in technical links popularity (as in number of visits) is not linked to correctness, that's one of the reasons StackOverflow is so useful, because the top-voted answer is like 99% of the times the most correct (useful) one.

<comment><USER11> Except when that answer is 5 years old and is as wrong as the ExpertsExchange post from 2001.

<comment><USER12> _Unlike_ EE, though, any user can propose an edit to that now-incorrect answer (or just edit it outright, if they have 2k rep).

A nice big "this answer is outdated, see [other answer]" note does wonders.

<comment><USER13> Unfortunately, such edits are rarely accepted. The _intent_ was for the site to be more wiki-like, but these days "respect the author's intent" is the prevailing wisdom. The cases where someone edits a top answer with a significant correction or update are very few, and require overwhelming community support or they'll be reverted.

This is particularly distressing in the case of security vulnerabilities. Vulnerable code being copied from Stack Overflow into consumer applications isn't hypothetical, it's been empirically demonstrated ([https://www.aisec.fraunhofer.de/en/stackoverflow.html](https://www.aisec.fraunhofer.de/en/stackoverflow.html)), yet the community and company refuse to accept responsibility and address the problem. (Of course the developer creating the application is more responsible, but Stack Overflow is in a position where they could help protect innocent end users and the common good.)

Pinning of accepted answers to the top of the list was a good idea when the site was young. These days, it prevents updated better answers from taking the place of ten-year-old misinformation.

</comment></comment></comment></comment></comment></comment></comment></comment><comment><USER14> I haven't used PHP in around 6 years (running PHP 4 I belive); has the language improved ? My biggest complaint was that the API was incredibly inconsistent, but that seemed like it could be improved in later versions if they weren't afraid of breaking backwards compatibility.

<comment><USER15> PHP 7+ is a totally different world from 4. It's actually a real programming language now. The massive API redundancy is still there, but you have classes, namespacing, etc.

<comment><USER16> Also adding libsodium directly into PHP core as of 7.2 was a big step in the right direction IMO.

</comment></comment></comment><comment><USER17> I love PHP, it was my first "real" programming language, and I'm glad there are still people trying to make it easier to adopt.

Having skimmed through several of these chapters, though, I just feel like it's too similar to the official PHP docs, even down to the TOC.

Wouldn't it have been better for everyone to put this effort into improving the docs, rather than developing yet another book in a silo that likely won't have the longevity we'd like?

<comment><USER18> Are there other technical reason's for advocating it, other than your love because it was your first "real" language?

<comment><USER19> I can't find a better language to use in 2019 in the backend if you are developing a website.

Is there a better language built for rapid web application development. You could debate which is better rails/laravel but in 2019 I would learn php.

You may suggest Go, python, .net, node, Perl or java. They could be used but each only offers an advantage in certain situations and make development slower or have another disadvantage.

If you want to make a website using php is the simplest easiest fastest choice available.

<comment><USER18> Thank you. I've looked for this sort of explanation.

</comment></comment></comment></comment><comment><USER20> The null coalescing operator ?? is not well explained. It returns the first operand but if it's not set or null, will return the second operand, i.e:

        $name = $_GET['name'] ?? $_POST['name'] ?? "unknown";

In the arrays section, I'd also introduce the $array[] shorthand for array_push(), i.e:

        $array[] = $new_element;

</comment><comment><USER21> Looks great! Perhaps, making it possible to turn pages with the arrow keys on the keyboard would make it a bit easier to navigate.

<comment><USER22> Yeah, that was my first reaction as well! With the chapters being this short (which itself is great) it would be really nice to be able to use the arrow keys.

</comment></comment><comment><USER23> Nice little reference for anyone who already knows how to program, but might not know PHP. For anyone else, this isn't really going to help. There seems to be no explanation of _why_ you would want to do anything here or even how it relates to a goal. Who is your audience?

<comment><USER24> IMHO, I think the audience is me. I can program (perl, java, c++). I know that php is easy but that there are many traps. I need a book to be able to develop quickly with sane practices. The official documentation contains too much old crust.

<comment><USER23> Too much old crust, but as other commenters around indicate, this isn't really solving that either: it doesn't talk about best practices or even highlight where the sharp edges are (EOLs and Namespaces are mentioned elsewhere).

</comment></comment></comment><comment><USER25> Good job ! Please add something about namespaces.

<comment><AUTHOR> It's on the roadmap!

</comment></comment><comment><USER26> Looks like good material and the formatting is nice so kudos.

</comment><comment><USER27> Well written and easy to read- hugely valuable resource! Can't wait to see more.

</comment><comment><USER28> Why not teach it better? [https://glot.io/snippets/f8g0wlar0d](https://glot.io/snippets/f8g0wlar0d)

No wonder PHP developers have a bad reputation.

<comment><USER29> I downvoted you because your comment doesn't help anybody and is offensive. Why do you think your example is better?

<comment><USER28> Because the examples given in this "book" teach a bad coding style and explain nothing in detail. If a trainee only used this to prepare for the final exams and I was to ask a more in depth question he would propably fail.

Example: "Why do you use double quotes everywhere?" Most probable answer: "Because I can use variables and the backslash-n thingies everywhere and its more convinient than using single quotes."

Example: "Why do you use '. "\n";' instead of the PHP_EOL constant?" Most probable answer: "What is PHP_EOL?";

Example: "Why aren't you using namespaces anywhere?" Most probable answer: "What are namespaces?"

Altough this might be a german perspective but I would not hire someone that presents me this kind of code. And for anyone saying "But this is only one book to learn the basics?" why not learn it the right way from the start?</comment></comment></comment>


Hackers counteract Microsoft COFEE with DECAF  - <AUTHOR> http://www.geek.com/articles/chips/hackers-counteract-microsoft-cofee-with-decaf-20091215/

<comment><USER2> A good comment on this is here: <http://news.ycombinator.com/item?id=995655></comment>


Digitizing the Personal Library - <AUTHOR> http://chronicle.com/blogPost/Digitizing-the-Personal/27222/

<comment><USER2> I have the Fujitsu ScanSnap scanner mentioned in this article. That thing is amazing and oddly addicting. It really makes you want to scan everything in site. I suspect that's what is really going on here. Professor Halavais has run out of loose papers and receipts to scan and has resorted to tearing pages out of his books. ;)

<comment><AUTHOR> I submitted this story because I have somewhere approaching 3000 books in a spare room that serves as my study, none of them scanned. Even though I enjoy having them displayed on shelves I've noticed lately that this may be the numeric point where being a bibliophile becomes painful; it's beginning to hurt my goals surrounding simplifying my ownership of dead tree pulp. The potential of having my library in digital format and searchable is pretty exciting. It is a major burden to move that number of books when necessary.

As for the Fujitsu ScanSnap, I saw it recommended by the folks at 37 Signals (DHH?) and looked it up and saw that it has 20ppm colour scanning and good document feeding.

Doing what is recommended in this article is very time consuming to begin with, but made even more difficult since you're depending on Adobe. Like the author, I cringe at the thought of destroying perfectly good out-of-print hardbacks.

I'd really love to start a business around electronic books and archiving.

<comment><USER3> _Even though I enjoy having them on shelves I've noticed lately that this may be the numeric point where being a bibliophile becomes painful; it's beginning to hurt my goals surrounding simplifying my ownership of dead tree pulp_

This was definitely on my mind when I posted about the Kindle: [http://jseliger.com/2010/09/29/the-last-word-on-this- version...](http://jseliger.com/2010/09/29/the-last-word-on-this-version-of- the-amazon-kindle) . I only have about ~1,000 books, but it's easy for me to see that at some point I'll have more books than space, and I don't want to get more space than books. Still, I probably have at least 100 that I could discard with little loss, and I've become much choosier about buying and keeping nonfiction because so much of it is only worth reading once. And I've become choosier about not keeping fiction I don't love.

Still, I'd use something like this: <http://www.diybookscanner.org/> over the Snapscan.

<comment><USER4> Speaking as someone who has come to all the same conclusions as the professor in the original article, and who is almost literally standing over his bookshelf, drumming his fingers on the saw and trying to convince himself to try using it...

... the DIY book scanner is indeed tempting. But the payoff is so lousy. From what I can see, you'll tinker and tinker with the DIY scanner just to get it to keep the pages in focus and well illuminated, and to get the software workflow pieced together. Then, because you probably don't have a big budget or a machine shop, you won't get a robot that turns the pages, even an imperfect one that skips pages and occasionally mangles a book. ;) You'll have to turn the pages yourself, by hand. That labor all by itself is more expensive then 90% of my books.

Meanwhile, the Scansnap is the real thing. My favorite piece of tech gear in years. It just works. The images come out nice. My magazine pages fit perfectly on the iPad screen.

Google has done all the hard work, of course, robotics, professional book- handlers, and all. Pity that I can't access most of the fruits of that.

So at some point you just have to try and convince yourself that it is no longer 1500 and printed books are a cheap commodity. As the article points out: Publishers routinely destroy printed books. They're just ink and paper. Even most of the books you think of as priceless collectibles are not particularly priceless. The really expensive part of an out-of-print book is the ability to read the words. If you want to decorate a room in beautifully bound old books, any old book will do.

And, thanks to the economics of publishing, most of my really hard-to-find out-of-print books are old trade paperbacks printed on cheap paper. It will be a challenge to preserve these books through my lifetime anyway. Rather than wait until the things age and fall apart, I might as well take them apart myself.

And this is how I argue to myself. But still, it's hard to bring myself to use that saw. What we need is a market in sawn-up books. Just rent a copy of your rare book that's already unbound and ready for scanning. Sell it on to someone else when you're done with it. Then you can keep the original rare book (in storage, somewhere upstate) but read the text whenever you want. The fact that this (AFAIK; IANAL) is legal but simply Bittorrenting a book you don't own is not is a very clear example of the brokenness of our legal system.

</comment></comment></comment></comment><comment><USER5> I would love nothing more than to have all my books in a digital format, but destroying the books in the process is horrendous.

There are better solutions for high speed book scanning that don't destroy the book in the process. [http://www.instructables.com/id/DIY-High-Speed-Book- Scanner-...](http://www.instructables.com/id/DIY-High-Speed-Book-Scanner-from- Trash-and-Cheap-C/)

<comment><USER6> Here is another good resource for the non-destructive book scanning route.

<http://www.diybookscanner.org/>

</comment></comment><comment><USER7> A nice scifi book about library scanning (among other things): Rainbows End <http://en.wikipedia.org/wiki/Rainbows_End>

A major portion of the book is dedicated to the destruction of the library's printed materials for digitization purposes.

</comment><comment><USER8> BitTorrent might be faster than scanning for a lot of books. Still, props for getting down to work.

<comment><USER9> BitTorrent could also be the next step as well. Yes, it's not legal for many of the books you'd scan, but for out of print rarities, wouldn't it be better to allow more people to read them?

</comment></comment><comment><USER10> I have a very small library of about 150 books that I am really proud of. I'm proud of it because I started building it while still taking an allowance from my parents.

But I'm also running out of space and I find that technical books become obsolete in a matter of months. So I stopped buying books that talk about frameworks and such and now only stick to the classics that won't lose value unless the technology substantially changes. Others, I now purchase in a digital format.(I have a Sony ebook reader)

Digitization is one approach, but I am too attached to the books to destroy them. And I agree with the sentiment of the article, it's just not the same.

<comment><USER11> I have a room actually dedicated now to book storage. And book shelves in all bedrooms, too. In the living room, I have CD and DVD shelves. A quick estimation would be : about 3000 books, 1000 magazines, 1500 CDs, 1000 DVDs.

The problem is that I won't ever buy DRM-laden shit. Evar, for chrissake, may they die and burn in the pits of hell. That unfortunately forces me to buy books and CDs, though I'm now an heavy user of my ebook reader and gutenberg.org.

</comment></comment><comment><USER12> I think this will become more and more common. So publishers and book writers would have to focus harder on making the physical object worthy of taking up space.

It's the tactile feeling that differentiate books from OCR scanned pages in a PDF. And wise publishers would use this differentiation to sell books when e-books is more popular.

</comment><comment><USER13> I also wouldn't advise destroying books. I have lots of books which are quite old and rare, and may be valuable in themselves as historical artefacts.

<comment><USER14> I don't think the books he was destroying were of any real value physically. A lot of them where probably massively distributed. Like the article says, publishers over produce and end up destroying tons of books all the time. Even years later when they are stuck with unsellable stocks.

<comment><USER13> In that case this might be ok, although because the OCR isn't perfect it would still involve a significant amount of work if you have more than a few books.</comment></comment></comment>


How to Take Smart Notes - <AUTHOR> https://praxis.fortelabs.co/how-to-take-smart-notes/ <comment><USER2> Note-taking seems to have gained popularity on HackerNews over the past few weeks (or my attention has been biased towards these submissions, at least).

I've long been interested in the domain of "personal knowledge engineering" and this clearly seems a common thread within our community. As a brief overview of the "SOTA:"

* Emacs and Vim users skew towards Org-mode or Vim wiki.

* Roam Research is sort of a recent web-based alternative.

* There's a lot of competition in the domain of fully-fledged note taking apps. Evernote has long been viewed as a king of note-taking but lost its edge over time (bad editor, bugs, lack of attention to their users). Memex seems to be gaining popularity even though their software looks somewhat buggy at the moment.

* Otherwise, people naturally develop their own (similar) systems. I myself have independently developed a custom-made Vim wiki before starting research into this topic. It basically consists of a few grepping/Vim aliases to search/create Markdown in a `~/.notes` folder, backed up to GitHub. `mod+-` is bound to an i3 sratchpad where Vim is constantly open to `~/.notes/index.md`. This drastically reduces friction when making new notes.

In any case, seems interesting that a lot of the personal note-taking systems have separately adopted similar principles to what Zettelkasten proposes:

1\. Heavy reliance on tagging

2\. Some sort of deep linking

3\. Preference to making small, independent "knowledge chunks"

<comment><USER3> I use a small subset of Org Mode myself. But I think people focus too much on tools vs method. Plain text plus ripgrep can work great. Lühmann used pen and paper, and he built some hugely successful Zettelkastens. Many users at Zettelkasten.de write super simple notes in Markdown.

Actually, I'd never move away from plain text or a plain text format like Org, Markdown or similar as it is really future proof. Will Roam or Evernote be around and well maintained in 20 years? Probably not. I'd recommend you to use your favorite text editor plus Markdown. If your favorite text editor is Emacs, then consider Org.

<comment><USER4> _I think people focus too much on tools vs method_

I've been guilty of this too. A note is a way to get something out of your head. I always return to plain text files on my computer because that's the fastest/least resistance and there just aren't any additional benefits for me to using other approaches. Linux command line tools are a simple yet effective way to work with text.

</comment></comment></comment><comment><USER5> In the realm of note taking and personal knowledge management apps, I've been shopping around recently.

Notion is very popular, and Roam Research [0] has been the popular scrappy upstart that people have been looking at, but I've been unhappy with these since neither has an API (and neither are open source.)

I would _strongly_ urge HN readers to take a look at Tiddlywiki [1]. It's popped up on Hacker News before, and I wrote it off, but I've been taking a closer look recently and its _incredibly_ powerful, as well as completely customizable and open source. It runs off of a micro-kernel architecture, so the core application itself is implemented in code that you can change, edit, and manage just like you would do with your own notes. It's really easy to get started (it's a self contained HTML file) but seems so have some robust saving and backup functionality.

Please please give it a look if you're looking at tools in this space. I've already started using it and I'm _very_ happy with it.

(Not affiliated with Tiddlywiki, just a really happy user.)

[0]: [https://roamresearch.com](https://roamresearch.com) [1]: [https://tiddlywiki.com](https://tiddlywiki.com)

<comment><USER6> Have you found anything like a hybrid between OneNote for its drawing/handwriting-with-stylus support + Roam or TiddlyWiki for the graph- like organization?

<comment><USER7> What about Trillium? ([https://github.com/zadam/trilium](https://github.com/zadam/trilium))

<comment><USER8> I used to love it, but I realized typing latency kills it (being electron). Also, export doesn't help as note links are internal references. So it's not future proof, it's a no for me. It has a great developer though. And the graph visualization is second to none.

<comment><USER9> > Also, export doesn't help as note links are internal references.

During export Trilium fixes the internal references to standard HTML links so they reference pages in the structure like "./sub-folder/my-topic.html" (but yeah, it was not always like that).

</comment></comment></comment></comment></comment><comment><USER10> The most important improvement to my note taking was the elimination of a computer. Ideas, digressions, illustrations, concerns, and more are difficult to translate to a machine using a keyboard or mouse. A tablet is better, but the fidelity of a drawing app isn't as good as paper.

Paper, it turns out, is always "on". There's no battery to worry about, no booting up and loading the app, and no Slack notification interrupting your flow. Paper calms you, because you know it never ever interrupts.

I've really enjoyed evolving the tools I use for notes. Right now I take all notes in a large dotted moleskin using a Rotring Pro. Turns out the more enjoyable a tool is to use, the more likely you are to use it. The notebook is the lower end Moleskin ($20 for a 3-pack), and that's a nice balance between quality and feeling comfortable "wasting" a page.

<comment><USER11> > the more enjoyable a tool is to use, the more likely you are to use it

That's why I often use a tablet and stylus for anything I intend to keep. I enjoy using the gear. I like having pens and markers created exactly how I like them and they never run out. I like being able to make my paper as big as I want it to be. Sometimes I want blank paper, sometimes dot grid, sometimes lines, etc... and I can have them all in the same notebook. I like that my handwriting is recognized and I can search it. It's great being able to paste in an image that I capture with the camera or find on the web. It's nice being able to move a paragraph to make space for something I forgot.

I don't have trouble with Slack or email because they aren't installed. No notifications are allowed on the tablet, except for OS-related ones (ie an update is available).

That said, I do still use a paper and pen all the time as well. I like paper and pen in meetings to capture and then after the meeting I format and transfer the notes to my digital system. I like pen and paper when I'm on the phone because I like scribbling and doodling as I talk.

Basically the divide comes down to what is ephemeral and what I want to keep. Anything that needs to last has to be digital for me.

<comment><USER6> I, too, thoroughly enjoy using a tablet. I have been on the hunt for something that has an organizational structure like graphs, paired with support for pen inputs. Right now I've been using OneNote and it is falling victim to the described problem of greater and greater segmentation of ideas.

Right now, it seems like the only real solution is to homebrew something that hits the Microsoft API and associates document IDs to contexts, then launches OneNote for the given document when it comes time to view/edit.

<comment><USER11> That's a really interesting idea.

My problem with a graph structure is that ultimately I end up with notes that fit more than one bucket. For that reason I usually gravitate to a structure built on tags.

</comment></comment></comment></comment><comment><USER12> Interesting the first few principles are not about note-taking, but writing in general. If you believe in the power of the written word to drive clarity (e.g. as in Amazon-style 6-page narratives), these principles are gold:

Principle #1: Writing is not the outcome of thinking; it is the medium in which thinking takes place

Principle #2: Do your work as if writing is the only thing that matters

Principle #5: Standardization enables creativity

Principle #6: Our work only gets better when exposed to high-quality feedback

<comment><USER13> Principle #1 is too extreme.

While I confirm that writing is a powerful medium for thinking, anybody writer with a shower to take or a hike to walk will tell you that thinking takes place in many ways.

Parts like "If you want to learn and remember something long-term, you have to write it down" depends so much of context. Again, writing down does help me to commit things in memory, but for some information, audio is better. For others, repeating in my head is better.

Good advice all in all, but the definitive tone of the article is not needed IMO.

<comment><USER14> There is this tendency to reduce everything to simple rules that are simply wrong. Nuance takes more effort to put into words and to understand. And so we end up with these 'soundbite' bits of wisdom that are worse than nothing at all.

Writing something down requires clarity, and clarity can be gained in many ways. Writing something down that isn't clear yet will result in (hopefully) spotting that lack of clarity before you press 'send' or 'publish'. But that doesn't mean that all for stuff that ends up written is happening while writing it down and without a _very_ good idea of what you are trying to communicate beforehand you'll end up with bad writing.

<comment><USER15> This is an interesting point because it could help explain why scientists enjoy programming, even when we sometimes do it to our own detriment. Nothing clarifies a quantitative thought process better than having to write it down in the form of code. And the code either runs or it doesn't, so you know that at least it has some level of self consistency before you walk away from it.

</comment></comment></comment></comment><comment><USER16> Simply keeping a list of ideas has made a huge difference for me. Instead of feeling distracted by an idea when I should be focusing on something else, storing it somewhere means I can come back to it. Reviewing the idea list inspires me and gives me something to do when I'm bored. Finding articles or papers related to an idea, or capturing random thoughts about it is as easy as dumping it in a folder (eg in Dropbox ) that is numbered by the idea. Appending the number to notes or file names makes it easy to find information as well.

I read an article that inspired me to write down every idea no matter how silly, and to try to work on 5 to 10 of them at once, and to always have one that is my main driver.

Over the last 4 years, I've tallied 264. One has supported my research for 3 years (#021). One is my primary hobby (#013). Several have since been announced as results or products by major companies, validating the idea and removing the need to work on it.

\---

EDIT: I cannot quickly find the article, but I'll summarize.

1\. Write down 100 ideas in one sitting. Any ideas. By the end, you'll be forced to really think outside your comfort zone, since everything prior is usually your first-order thoughts.

2\. Choose 10 of the most promising to work on. Work means just pay attention to, make incremental prototypes, etc.

3\. Choose the top contender to throw your weight behind. Maintain a 1/10/100 ratio as you retire ideas.

\---

My difference is I keep the list rolling and append new ideas as they come. I never sit down and make myself write a new batch (I should!). I'm actively working on about 5-10, in various stages of funding (I'm on a semi-soft money funding model).

EDIT 2: Found! [http://blog.fogus.me/2015/11/04/the-100101-method-my- approac...](http://blog.fogus.me/2015/11/04/the-100101-method-my-approach-to- open-source/)

<comment><USER17> Any chance you still have that article around? I would like to read it if possible.

<comment><USER16> I'm not able to find it, but it wasn't much more than a blog post exposing the points I mention in the edited comment. If anyone can remember it (it was a HN post), that'd be great!

<comment><USER18> maybe this one: [https://news.ycombinator.com/item?id=10513015](https://news.ycombinator.com/item?id=10513015)

<comment><USER16> Nice, thank you!

</comment></comment></comment></comment></comment><comment> Ahrens-Luhmann I feel the entire article is very confusing. Maybe I would need to have read the book to understand the article. I went in with the expectation of informative guidlines to effective notetaking, and left feeling i hade read a very lengthy way of saying taking notes is important. Coupled with a description of a complex way to archive notes(slip box), with no explanation of how to use the structure (your box).

<comment><USER19> That's no coincidence. The book on which this article is based on is _exactly_ the same (I read it). There are maybe a couple of ideas in the entire 200 pages book and it just runs in circles.

</comment></comment><comment><USER20> > For example, you could memorize the fact that arteries are red and veins are > blue.

This is not a "fact", it's just a common convention used in medical drawings. The actual fact is that arteries are bright red, and veins are a dull red.

<comment><USER21> Well. That kind of makes the full article of taking "smart notes" not that smart.

</comment></comment><comment><USER22> Useful past submissions:

[https://news.ycombinator.com/item?id=21208196](https://news.ycombinator.com/item?id=21208196)

[https://news.ycombinator.com/item?id=22085837](https://news.ycombinator.com/item?id=22085837)

[https://news.ycombinator.com/item?id=22337681](https://news.ycombinator.com/item?id=22337681)

</comment><comment><USER8> I'm sold on the zettelkasten method. I've tried zim, cherrynotes, trilium...

I've found two things that matter most for me: 1/ you need an editor where typing latency is low. Below 10ms. Otherwise you will get in a bad mood and make more mistakes. Electron apps need not apply

2/ creating, linking, and finding notes must be fast

On top of that, it must be future proof.

I've found the ideal solution in howl (howl.io). This is a text editor, built in moonscript and with sane default. Typing latency is 6ms, faster than anything else I could find (on linux, non compositing window manager)

The trick for liking (in markdown) is autocompletion. It will autocomplete based on all buffers open. My trick is to run :exec ls (list of files in the project directory) and leave this buffer open. Then ctrl space will autocomplete filenames. The rest is trivial.

Oh God, Howl deserves so much praise. I hope it gets picked up on HN one day. It's only missing a tiny push, having a community around it would be amazing.

<comment><USER19> nvALT fits the bill, as does "Archiver"

</comment></comment><comment> michael-ax Captured and tagged. Thank you vm!

I have seen so many play-things in the note-space that I want to give just a few stats from my 6yo personal emacs setup:

I capture and refile into 14 .orgs indexed at varying depth using the agenda ag and helm for search as needed.

grep "\ _\_ " bmarks/*.org |wc etc say there are 5669 notes, 62652 lines 437644 words 3,663,683 bytes total.

since 3/14 I have annotated 111 pdfs, linked many more, captured 508 images. 300+ days logged before switching to a weekly format 201 weeks ago.

I can attest to the sentiment that there is actual communication going on between creator and such a system. :) a multi-media key takes me into capture and either a line-oriented popup for 'jots', a floating window or a full- screen distraction free mode where i can quickly see, that the great thing i discovered yesterday slipped from my mind 5 years ago.

The most important improvement to my note taking was realizing that, like Luhmann, I wasn't taking notes but curating an exo-brain.

I had seen emacs as a rinky-dink over-complicated under-documented religious thing -- and not as the low-stress 'does everything except long-lines really well and never crashes' thing that is now at the heart of my computing life. So.. to continue learning emacs for the next 30 years is definitely on my agenda because its worth it for the quality without a name .. absent elsewhere.

It was cool to see how his manual linking (not just tags) would force him to review the neighborhood he would place his cards in. I neglect that sometimes and so the epiphanies and understanding I get from integrating content have to sometimes wait a cycle or two or come when i check things in or close out the day.

Anyway? My point? Invest yourself into org-mode and take notes for a few years to learn how to take better notes while building something that can last you a whole life long. it worked for me. ty!

</comment><comment><USER23> For me the steps are taking smart notes are

1\. Get started, doesn't matter how dumb your notes are

2\. Use tiddlywiki for connecting ideas

3\. Read the book How to Read a Book

4\. Repeat

</comment><comment> c-smile Thanks, just added the note about the notes into my Sciter Notes :)

[http://notes.sciter.com/wp-content/uploads/2020/02/note- note...](http://notes.sciter.com/wp-content/uploads/2020/02/note-note.png)

CTRL+C in browser and CTRL+V in Sciter Notes ([https://notes.sciter.com](https://notes.sciter.com)) + tag and book selection.

</comment><comment><USER24> I replied about this project before but surprised it hasn't reached more mainstream awareness. Piggydb former and now Cotoami [1]

[1]: [https://piggydb.net/2019/03/06/why-its-harder-to-discover- va...](https://piggydb.net/2019/03/06/why-its-harder-to-discover-valuable- knowledge-in-tree-structured-note-taking/)

</comment><comment><USER25> The slip box diagram reminds me of Ted Nelson's ZigZag. But then, the numbering system raises an issue: in Zettelkasten, as practiced in Roam, and to degree in FedWiki, you can effectively _transclude_ notes in other dimensions. In Roam and FedWiki, the identity system of slip boxes is replaced by _slugs_ based on the note's title.

</comment><comment><USER26> History of Zettelkasten and well-informed recommendations by an expert in the field. See also RoamResearch.com and NessLabs FTW

</comment><comment><USER27> Related from yesterday: [https://news.ycombinator.com/item?id=22337681](https://news.ycombinator.com/item?id=22337681)

Related from a few weeks ago: [https://news.ycombinator.com/item?id=22085837](https://news.ycombinator.com/item?id=22085837)

</comment><comment><USER28> I've tried this and failed with a Tiddlywiki. I found the Métis if entering data too cumbersome and gave up. All I want is a single text file that I Can take multiple notes in and link those notes internally in that single file. I wish Apple notes had an easy way of doing this but for now I'm stuck with writing HTML.

<comment><USER29> I am routinely blown away by the fact that apple doesn't expose URLs for individual pieces of your data that they store (emails, notes, messages, files, etc). There's no way to reference another note in the current note except to share the other note and get its iCloud link.

However, there is an editor that makes linking between notes seamless, called Bear (bear.app).

</comment></comment><comment><USER30> We are actually building a tool right now sharing many similar principles from the post. If you are also obsessed about this space, we are looking for more engineers to join us. we're pre-launch, reach out to me at firstname.lastname@example.com or on twitter : @s_abtin

</comment><comment><USER31> How does "21/3d26g53" fit into the numbering system described? Why even mention it?

<comment><USER32> I struggled with that too - but I think it's because the first (pre-/) line is the only one not to be lettered, in the diagram it's `1a` not because it's `a` on `1`, but because it's `a` on the `1`-th branch off `1`; in total it's `1/1a`.

So `3` is the third branch off `21`, `d` marking that it's the d-th (fourth) in line on that branch.

But maybe I'm still wrong, I agree it's not clear.

Edit: Having said that, even by what I'm saying it should end `53a`, not just `53`.

</comment></comment><comment><USER33> Is there an app for that? Seriously.

<comment><USER34> I believe this is what Roam[1] is kind of built for, whether they intended it or not. I haven't used it but was inspired to take another look at it after this article.

[1] [https://roamresearch.com/](https://roamresearch.com/)

<comment><USER35> Has anyone given this a try whose also used by analysts in the past? I'm curious how they compare

</comment></comment></comment><comment><USER36> There so many posts with stuff like this, but what's really had a positive impact for me is using my own custom notation. Nothing fancy, no org mode, wikis, markdown, just brackets and characters.

<comment><USER37> Why has that worked better for you?

<comment><USER36> It's concise, simple, portable so I can use whatever text editor or notes app. I've gotten burnt out on switching.

</comment></comment></comment><comment><USER38> Does anyone do this in org mode? Do you use Luhmann's numbering in headings?

</comment><comment><USER39> I find taking notes on "the guide" revolutionary. It's a tree like application to take notes.

[https://the-guide.it.softonic.com/](https://the-guide.it.softonic.com/)

<comment><USER40> A better link: [http://theguide.sourceforge.net/features.html](http://theguide.sourceforge.net/features.html)

</comment></comment><comment><USER38> Why is the first branch off 1 1/1 rather than 1a?

<comment><USER38> [https://niklas-luhmann-archiv.de/nachlass/zettelkasten](https://niklas- luhmann-archiv.de/nachlass/zettelkasten)

</comment></comment><comment><USER41> During my work as a business/data analyst, I have found a way to organize my project notes, scripts, dashboards and spreadsheets.

PART I - Paper notes (Yes I still keep paper notes)

1 - Prepare a batch of 10-20 prints of my special note-taking pdf for each project, depending on the size (small if within 4 sprints, and big if more than 4);

2 - Write down names of attendees during the meetings, so that I know who to contact when I need info

3 - Prepare a folder for each project and always put the notes, one page for a meeting, in the following order:

Top -> Always the most urgent or important meeting notes. E.g. KPI meetings, or telemetry meetings

Then I put the rest meeting notes on reverse chronological order (most recent at top)

In this way, I can always review the previous meetings, as well as the most urgent issues in under 5 minutes, which is good because I work in Agile and in most of the companies that I worked for, this means Fast, not Efficient.

PART II - Electronic notes, scripts, dashboards and spreadsheets

I have a top-level One-Drive folder called "Company_Team_Name", which is also shared between Win10 (Host) and Ubuntu (VirtualBox). I have two child folders under it, "Company_Team_Name/Project" and "Company_Team_Name/Task".

I use the following tools:

Excel, for results of analysis and other stuffs;

SQL, my bread and butter;

Python, sometimes I write Python scripts to help my analysis. I do not like notebooks so I write fully operational programs;

Shell, some Linux command line tools, like csvsql, are very useful for simple tasks;

Tableau, for all dashboards;

Typora, for all research note taking

I organize the project folders in Datagrip, as I pretty much need SQL for every report.

1 - In Ubuntu/Win10, create a new folder under "Company_Team_Name/Project" with the name of the new project, assuming it's a 4+ JIRA long project, not an overnight task.

2 - In Datagrip, create the following folders for each report (I worked long enough to know that we need these reports):

"./Pre_Analysis" -> For pre analysis of the project, usually some data dumps or small analysis of similar features in the past;

"./AB_Test";

"./Small_Analysis" -> We usually release a feature to only 5%-20% of the population for technical sanity check and small analysis (actually same as full analysis but only on most important KPIs);

"./Full_Analysis" -> 100% population Full Analysis, usually performed twice because CXOs will require a more detailed look after reading the first full analysis;

"./Tableau" -> put all dashboards here

3 - SQL scripts, Python scripts, Typora mds and Excel spreadsheets will be grouped under each report sub folder

In the meantime, I'm considering writing a shell script, or a Python script to automate creating those folders. I'm also considering using each Project folder as the venv directory for Python, but since all projects use the same Python package configuration (pandas, odbc, etc.) I just install packages on the primary Python interpreter.

This is a configuration that I find to be extremely efficient to work in an Agile environment.

</comment><comment><USER42> How I take notes:

For professional life: Pen + dot grid notepad - developed independently, but similar to the bullet journal technique. Dot grid plus pens make the whole thing ultra customizable. I can sketch engineering designs, make a calendar, track action items, take detailed notes, all in the same format. The key is to be strict with page numbers, dates, and index as much as possible.

Things I occasionally miss - keyword search (I can still look things up by date or subject in the index), multimedia inserts (think dragging video/photos/sound clips into one note), never ending space (notebooks run out of pages), easy backups (thinking about digitizing with photos or scans), team collaboration (if this is necessary I use Trello).

Things I like - no OS/tech stack compatibility issues, "it just works", lighter then a laptop/tablet, don't need to charge, easy to read, can bring into a secure area (where outside electronics are not permitted), travels well, hard to damage.

[http://bulletjournal.com/get-started/](http://bulletjournal.com/get-started/)

For personal life: add Google keep for simple lists, and then a mix of Trello and dot grid for larger projects (less strict formatting than professional life project management).

How I index using pen/paper:

Every page has a number in the upper outside corner.

Every entry into the note book has a title + subject tag, date, and the initials of a list of people linked to that entry. For easy reading and scanning I put all of this on one line. The title and subject are dark lined (thick), followed by the date MM/DD/YY, and then the initials inside a ( ). Each piece of info is separated by a ";". All of the info listed is underlined.

under the intro line, I also break down actions, notes, calendar adds, etc with 3-4 different symbols. All I all this makes it clear and easy to scan quickly as you are looking for things.

Each month I have 4 or 5 pages devoted to organization.

I have a task list. Two bulleted columns. Old tasked are migrated over from the previous month. New tasks are added as soon as they are generated. Completed tasks get an X through the bullet. Migrated tasks get an >. Tasks that are linked to journal entries get a page number and a tag.

I have a calendar page. 1 column, all dates of the month listed . Meetings, important actions and events are are listed by day, or with arrows over multiple days. Linked by tag/page number if applicable.

I have a subject index. Major tags, reoccurring subjects, get a line or two. Page numbers with those subjects are added to the index.

I realize this sounds complicated, but it's not once you get into a routine. The biggest this is it's okay to make "mistakes", and to get used to not having a delete key. Change is part of the notebook. Think of it like a change log. It's also important to be able to see what you change. Since I work in pen, I just make a single line through things I want to change.

Note: when I finish or complete something on a task list or the calendar, I'll mark or change the symbol, I won't cross something out just because I'm done with it.

Finally, I have a bunch of multi color pens I use. They are all the same brand/model, but I tend to use a different color each day. That makes it obvious as you are scanning that you are on the next day. I don't use specific colors for anything in particular, too hard to keep track of.

Hope this helps.

Reposted from an older thread @

[https://news.ycombinator.com/item?id=17799232](https://news.ycombinator.com/item?id=17799232)</comment>


Ask HN: Who are Russian Investors? - <AUTHOR>

While reading article about Plastic Logic's 700m investment, I noticed another major investment by 'Russian investors'. There seems to be a gigantic amount of investments by Russian investors in last few years (not only in tech like facebook, zynga but also in real estate etc.. google for more).<p>You don't hear so much about investment from investors from other countries (say Chinese/German/French investors). Does anybody know whose money is referred to as when we hear the term Russian investors? and more specifically, how they have this much free cash to invest (given Russia isn't obscenely rich)? <comment><USER2> There is huge oil and mineral wealth in Russia. After the fall of communism, the few well connected players bought up everything at ridiculously cheap prices

</comment><comment><USER3> "You don't hear much about investments from China"?! What about the Chinese sovereign wealth fund (SWF) that invested in some of our banks during the crisis (along with other major investments)? What about the Gulf State SWFs that did the same?

Russia's problem is it there are plenty of obscenely rich individuals (that's why Moscow is consistently ranked as one of the most expensive cities in the world) and no middle class- its oil money powers its own SWF. Many of the rich made their money in oil and other commodities, others are the result of the more recent consumer spending boom, many used their government positions or contacts, the list goes on and on...

</comment><comment><USER4> "how they have this much free cash" -- Russia has hydrocarbons; e.g. look up Gazprom.

</comment><comment><USER5> Oligarchs and their preferred investment vehicles</comment>


Show HN: Easily-configurable machine learning dataset pipelines - <AUTHOR> https://github.com/jake-mason/ml-pipeline <comment><AUTHOR> A few years ago, I began to grow old of working with dataset pre-processing scripts/"libraries" for machine learning and began to create my own sort-of "pipelines." Last year, I stumbled upon `sklearn.compose`, a relatively newer module within the scikit-learn ecosystem.

I have had a lot of success with this module since then, and wanted to share a tutorial I put together which touches on the idea of managing your machine learning dataset creation steps completely via a configuration.</comment>


New open source language for JSON transformations (Java implementation) - <AUTHOR> http://bytes.schibsted.com/jslt-open-source-language-json-processing/ <comment><USER2> This is cool. Do you internally have bindings or implementations in other languages?

For example, as far as I've heard most of vg.no (owned by Schibsted, biggest online newspaper in Norway [1]) is written in PHP. Don't know if that is still true, correct me if I am wrong.

If not through bindings or other implementations, how exactly do you use this internally? Do you have dedicated servers that serve a JSON API that makes these transformations, or do you write individual programs that insert the transformed data into databases before the data is used, or do you execute Java programs as du processes of your other programs and then read the transformed data from stdout? Or perhaps you are doing things in different ways in different places?

[1]: [https://en.wikipedia.org/wiki/Verdens_Gang](https://en.wikipedia.org/wiki/Verdens_Gang)</comment>


LaiNES – Cycle-accurate NES emulator in around 1000 lines of code - <AUTHOR> https://github.com/AndreaOrru/LaiNES <comment><USER2> This makes me wonder. The 6502 in the NES ran at 1.79MHz.

According to [https://en.wikipedia.org/wiki/Instructions_per_second](https://en.wikipedia.org/wiki/Instructions_per_second) , a modern i7 processor handles north of 100,000 MIPS.

According to [https://en.wikipedia.org/wiki/Transistor_count](https://en.wikipedia.org/wiki/Transistor_count), the 6502 had 3510 transistors.

At 100,000 MIPS, a modern CPU would have a budget of ~56k instructions to process one cycle of that CPU, or about 16 instructions per transistor.

So it would seem it might now be possible to simulate those old processors, at the transistor level, in real time. Is anyone aware of experiments in this domain? If not really useful, that sounds like an interesting fun (side) project.

<comment><USER3> [http://www.visual6502.org/](http://www.visual6502.org/) does it in the browser & flashes transistor states at you!

And if you liked that you'll probably also enjoy [http://www.megaprocessor.com/progress.html](http://www.megaprocessor.com/progress.html)

<comment><USER4> Also: Introducing the MOnSter 6502 [http://www.evilmadscientist.com/2016/6502/](http://www.evilmadscientist.com/2016/6502/)

</comment></comment></comment><comment><USER5> What does "cycle-accurate" mean? The README assumes the reader already knows; Wikipedia via Google is totally unhelpful: "A cycle-accurate simulator is a computer program that simulates a microarchitecture on a cycle-by-cycle basis."

<comment><USER6> The traditional way of coding a console emulator was to figure out the time interval to the next interrupt in units of CPU cycles, emulate enough instructions to cross that threshold, then emulate the interrupt and hook other routines (redrawing the screen, filling sound output buffers, reading input, etc.) off of those events (see e.g. Marat Fayzullin's classic Emulator HOWTO [1]). This approach runs a lot of stuff just fine because it does synchronize to the most important events, but can cause problems. For example, "well-behaved" code generally only writes to graphics registers or sprite tables during blanking periods, as writing during active display is usually undefined behavior. Some code breaks the rules. Sometimes this is done intentionally to do cool effects with the hardware. Other times it's a side effect of a bug that wasn't caught because there are coincidentally no symptoms with the timing of the actual hardware. But then you plug it into an emulator with only roughly accurate timing and it blows up.

In reality, the clocks for the various components don't necessarily run at the same rate, or even at integer multiples of the CPU clock. You can have a situation where, for example, there are 3.5 clock cycles on the graphics hardware for every one CPU clock cycle. For a lot of the classic systems, this happened because a single higher master clock is divided down for each component.

A "cycle-accurate" emulator is one that operates as if the emulated state of all hardware were updated on every tick of the master clock. This wasn't generally done in the past because it was far too slow ~20 years ago when emulation of classic consoles and computers really took off.

More sophisticated hardware doesn't necessarily have any single master clock in this sense, so it doesn't make much sense to talk about a "cycle-accurate" emulator of a modern PC, for example.

[1] [http://fms.komkon.org/EMUL8/HOWTO.html](http://fms.komkon.org/EMUL8/HOWTO.html)

<comment><USER7> I played around with this in my own NES emulator, which works roughly the way you describe. I found that, at least for major-brand titles (Mario/Zelda/Metroid/Kirby), cycle accuracy actually _doesn 't_ matter. Everything's based off PPU/APU/mapper interrupts.

In fact, doubling (or more) the CPU clock _enhanced_ some of the games I tried. Animations in Kirby's Adventure became more smooth (e.g. the Spark ability). Screens full of enemies in Metroid ran with no slowdown. The glitchy first scanline of status overlays in various games cleared up. I haven't yet observed negative effects in major-party titles.

I had designed my emulator as an experiment: treat the NES as an abstract specification, rather than a concrete implementation. Turns out that a lot of games seem to have actually been designed following the same principle. It was a wonderful feeling to see these games as I imagine they were intended to be experienced, as if I opened a letter from the game designers left unopened for thirty years.

<comment><USER8> Bear in mind that sometimes, people want to do tricks that depend on the slowdowns and glitches that happen on real hardware.

<comment><USER7> I'm sure. That wasn't the point of my experiment.

</comment></comment></comment></comment></comment><comment><USER9> People always say that terse code is hard to read and understand. I'd say I just learned a lot from a quick skim of the concise source here. If it had been structured with tons of white space and split over dozens of files/folders/modules, I'd have no chance of understanding it at a glance.

<comment><USER10> Terse code is easy to read. Gratuitously compact code isn't

The rule of thumb is that if it's short but in no way obfuscated, it's terse. If it's short, and impossible to read because of it, it's gratuitously compact.

<comment><USER11> It is in multiple files, but still very terse, eg. using single letter variables.

       /* CPU state */
       u8 ram[0x800];
       u8 A, X, Y, S;
       u16 PC;
       Flags P;
       bool nmi, irq;

I like it.

<comment><USER12> I'm the author.

The reason for the single letters is that those are the actual names of the 6502 registers.

Glad you like it overall. :)

<comment><USER11> accumulator xchange ... y, something stacky perhaps?

program counter

flagPort

non maskable interrupt, interrupt request

I'm sure you knew that though, it's common micro processor nomenclature.

<comment><USER13> Specifically on 6502-derived processors, you have the following registers: Accumulator, X and Y indexes, Stack Pointer, Program Counter, Flags. Of these, only the Program Counter is double-width.

Additionally, the zeroth "page" of memory (the lowest 256 bytes) are accessible with a dedicated addressing mode which saves space and time in the program, and can be used as a form of cache.

</comment></comment></comment></comment></comment></comment><comment><USER10> That is very cool.

I'm always kind of in awe of this sort of thing. Maybe I should try to do it. Should take some of the awe away.

But I should probably focus on sucking less, first.

<comment><USER14> Try making a small virtual machine first - [https://github.com/tekknolagi/carp/blob/master/README.md](https://github.com/tekknolagi/carp/blob/master/README.md)

<comment><USER15> Whoa, that's my project. Wouldn't recommend looking at that one, but definitely take a look at it's successor (linked on the README).

</comment></comment></comment><comment><USER16> First I'd like to say this project represents fantastically impressive achievement regardless.

However, putting this repo through `cloc` reveals the HN title to be rather misleading.

EDIT: I had initially read through {cpu,apu,ppu,gui,joypad,mapper}.{cpp,h} and noticed that the mental tally I was taking had run well over 1000LOC. In my haste I quickly cloned the repository and ran cloc against the current dir _which massively inflated the result_ (Doh!). See author's comment below for a more sensible figure.

<comment><USER12> Sorry, but that's really not fair. You are running that on all the folders inside the src/ directory (and the README?), including blargg's libraries that I'm using. I'm not counting that. Go ahead and include those if you want. It's code I didn't write, and bigger than the rest of the emulator! I don't think that's representative.

CPU and PPU implementations tend to be in the order of the thousands of lines -- they are around 200 and 300 lines respectively in LaiNES. In fact, most of the code is in the GUI that I could easily strip away if this was a competition. And this wasn't written to be small - it was written to be simple. It also came out small, but that's incidental.

Here's how I counted the lines and how I decided on the description for the repository, which by the way has been catapulted from totally unknown to worldwide attention overnight, and it's now object of unexpected, ruthless scrutiny that I couldn't foresee.

      [andrea@manhattan src]$ rm -rf boost nes_apu Sound_Queue.*
      [andrea@manhattan src]$ cloc .
            24 text files.
            24 unique files.
             1 file ignored.

      github.com/AlDanial/cloc v 1.70  T=0.03 s (780.3 files/s, 63170.2 lines/s)
      </comment></comment><comment></comment><comment></comment><comment></comment><comment></comment><comment></comment><comment></comment><comment></comment><comment></comment><comment></comment><comment></comment><comment></comment><comment></comment><comment>-
      Language                     files          blank        comment           code
      </comment><comment></comment><comment></comment><comment></comment><comment></comment><comment></comment><comment></comment><comment></comment><comment></comment><comment></comment><comment></comment><comment></comment><comment></comment><comment>-
      C++                             11            210            110           1163
      C/C++ Header                    12             87              7            285
      </comment><comment></comment><comment></comment><comment></comment><comment></comment><comment></comment><comment></comment><comment></comment><comment></comment><comment></comment><comment></comment><comment></comment><comment></comment><comment>-
      SUM:                            23            297            117           1448
      </comment><comment></comment><comment></comment><comment></comment><comment></comment><comment></comment><comment></comment><comment></comment><comment></comment><comment></comment><comment></comment><comment></comment><comment></comment><comment>-

<comment><USER16> I agree with this figure, please see my edited comment above.

Still though, my gripe with the HN title still stands: to say this is ~1000 LOC is a bit rich. It's still bloody small so why try to shoehorn it into this category?

> And this wasn't written to be small - it was written to be simple. It also > came out small, but that's incidental.

I think that why this is pure gold! Because it's _simple_ , it's easy to understand, I would have been hopping with glee if this had been available to me as a teenager, instead of having to read tons of articles/textfiles of varying quality with lots of trial, error and head-scratching. It's size is besides the point, and why the title is still - in my opinion - misleading. I can't help but feel the very people that would benefit the most from this might possibly be put off that they're going to be presented with some indecipherable demo comp entry.

Either way keep up the good work.

<comment><USER12> No problem, we are cool. I see your point.

I believe there is still a lot of room for improvement in terms of accuracy, clarity and code size. Note that this repository was more than 3 years old. Maybe this will motivate me to improve it even further.

<comment><USER16> I think that'd be pretty cool to see. I'd be especially be interested how quickly the returns in size diminish given your starting point. Likewise, how much it'd would have to change architecturally as it gets smaller. Sounds like a _slightly_ more extreme form of the game Shenzen-I/O.

While reading through the repo one thing I kept thinking was it would be nice IMO would be decoupling the everything from the GUI so that it was a little 'flatter'. So `main` would call `NES::run()` (or something), and `NES` would leverage GUI. GUI would be just drawing stuff. (In my head at least,) it feels like that way it might be easier to mentally partition things, for those using it as a learning project. As `NES` would be responsible for ownership and interop that GUI is doing now. I'll add it to my todo list and perhaps in god- knows-when I'll fork it and do this if you haven't gotten round to it :) Having said that it's inspired me to finish my first Go project which was a GameBoy emulator. Was started mainly to deep-dive the language, but I think it could be useful in a similar way if cleaned up and documented for folks.

</comment></comment></comment></comment><comment><USER17> Any plans for a libretro port?

</comment><comment><USER18> Maybe of you inline entire functions...

<comment><USER19> Functions which are only "called" once, which I think is a perfectly reasonable thing to do.</comment></comment>


Microsoft now has a fighting chance, as Ballmer quits the board - <AUTHOR> http://www.smh.com.au/it-pro/business-it/exceo-ballmer-quits-microsoft-board-to-focus-on-nbas-clippers-20140819-1061vl.html

<comment><USER2> Since he stepped down as CEO his influence was smaller and smaller so I think this is more a cosmetic change then anything else. Maybe the public perception of Microsoft will now move even more into the right direction.</comment>


Robel: Robotics Benchmarks for Learning with Low-Cost Robots - <AUTHOR> https://ai.googleblog.com/2019/10/robel-robotics-benchmarks-for-learning.html <comment><USER2> They may be lower cost than the status quo, but $3199 to $3699 is out of my reach as a (non professional) hobbyist. I hope maybe one day though!

[https://sites.google.com/view/roboicsbenchmarks/getting- star...](https://sites.google.com/view/roboicsbenchmarks/getting-started)

[https://www.trossenrobotics.com/d-kitty.aspx](https://www.trossenrobotics.com/d-kitty.aspx)

[https://www.trossenrobotics.com/d-claw.aspx](https://www.trossenrobotics.com/d-claw.aspx)

Not quite in the realm like the $50 to $90 'Google Voice / Google Vision AI' kits

[https://aiyprojects.withgoogle.com/](https://aiyprojects.withgoogle.com/)

<comment><USER3> You're not the intended audience. This is meant for small research labs that are just starting up and want to enter the RL/Robotics research space and can't afford a $400,000 PR2 or $150,000 shadow hand.

<comment><USER4> Totally worth the money :)

[https://youtu.be/c3Cq0sy4TBs](https://youtu.be/c3Cq0sy4TBs)

<comment><USER5> "The Proud Robot", Henry Kuttner, Astounding 1943

[https://www.prosperosisle.org/spip.php?article863](https://www.prosperosisle.org/spip.php?article863)

</comment></comment></comment></comment><comment><USER6> Maybe I am missing something but fundamentally you can "learn" in the ML sense with any sensor and effector.

Examples of cheap sensors: MEMS microphone, camera, voltage sensor, mass sensor, distance sensor, multi-axis position sensors (gyroscope/magnetometers).

Examples of effectors: Any kind of motor, solenoid, LEDs, etc.

If you want to constrain the question to 3D motion, here is a suggestion - hack the controller of any existing RC car platform. Add overhead position sensing within a fixed arena added via external camera. Maybe add a MEMS microphone (USD$3) or position sensor (~USD$10) to verify airtime/orientation. ML problem #1: Add a ramp. Try to get it to jump highest (longest time airborne). ML problem #2: Same with a power efficiency metric. ML problem #3: Same with a time efficiency metric applied to navigation from a random start point and orientation. ML problem #4: Motor noise vs. jump height optimization.

<comment><USER7> Byron Boot's lab at Georgia Tech does a lot of interesting work with larger- scale R/C vehicles. That being said, by adding more degrees of freedom you're making the configuration space of the robot higher. In many cases, higher dimension configuration spaces are more difficult for traditional sampling- based approaches. Learning approaches may be able to bias their solutions to avoid large sections of this configuration space.

</comment></comment><comment><USER8> I'm interested in hearing from anybody who has sucessfully built a useful research robot for < $1K. Even just a SCARA arm.

my experience has been everything < $1K uses crappy servos.

<comment><USER9> The servos are certainly where you can spend most money when building a robot for research. I tried building small research robots with small servos ($25 each), see results at the end of this video: [https://m.youtube.com/watch?v=q8jgu- EtCFc](https://m.youtube.com/watch?v=q8jgu-EtCFc)

The total cost for one robot was well below 1k. The servos are $25 each (Turnigy 306G if remember correctly), all connecting parts are 3d printed, the electronics and batteries are about $50, and you could add a raspberry pi for $50. So in total <$500, depending on number of DOFs.

Of course, these servos don't have the same torque as Dynamixles, for example. But they are lighter!

<comment><USER10> Do you have any videos of the actual robots or just the simulation?

</comment></comment></comment><comment><USER11> our lab uses Dynamixles in the widow x ([https://www.trossenrobotics.com/widowxrobotarm](https://www.trossenrobotics.com/widowxrobotarm)) and the servos alone are 70% of the total cost.

is anyone aware of an open-source alternative to these servos? this would be a great contribution to the community, if not available already

<comment><USER12> I have a hard time finding a good heavier duty servo that does not cost the price of a car. I looked into how to make one from a DC motor. There are some open source project about it:

[https://hackaday.io/project/9433-brushed-dc-servo- drive](https://hackaday.io/project/9433-brushed-dc-servo-drive)

[https://www.crowdsupply.com/citrus- cnc/tarocco](https://www.crowdsupply.com/citrus-cnc/tarocco)

But for some reason, most projects I found do not use DC motors:

[https://www.kickstarter.com/projects/tropicallabs/mechaduino...](https://www.kickstarter.com/projects/tropicallabs/mechaduino- powerful-open-source-industrial-servo-m)

[https://odriverobotics.com/](https://odriverobotics.com/)

If you ever find a good OSS servo, could you ping me?

</comment></comment><comment><USER13> Curious that they wouldn't include PPO in their related work, but DDPG. Did I miss something important that makes PPO inapplicable here?

</comment><comment><USER14> You can translate this short article of mine [https://www.linkedin.com/pulse/azzerare-con-poco-il- debito-t...](https://www.linkedin.com/pulse/azzerare-con-poco-il-debito- tecnico-dellingegnere-giuseppe-cornacchia/) to get real, low-cost "toys" for a small mechatronics lab suited to almost any dl & rl starting level endeavor you want. (tldr: less than $1.5k would suffice in first instance)</comment>


Show HN: Title Race – Race for the Premier League Title - <AUTHOR> https://titlerace.me/ <comment><AUTHOR> One for the Football fans out there...

I couldn't find an easy way to track the remaining fixtures for Liverpool and Manchester City (and also at the time Spurs) so I decided to build a website to make it super easy.

Everything updates automatically via data from: [https://www.football- data.org/](https://www.football-data.org/)</comment>


Widodo's Desperate Executions - <AUTHOR> http://www.newyorker.com/news/news-desk/widodos-desperate-executions

<comment><USER2> I am an Indonesian. Although majority of the people here support death penalty for drug trafficker, there are growing opposition to this execution on social media.[1] However, it seems the reasons are somewhat split:

\- Some people opposed to death penalty, whatever the reasons.

\- Some agree on death penalty, but only on select case.

\- Some concerned by the law enforcement corruption. For example in the case of Zainal Abidin, the Indonesian who get executed too, there are bureaucracy mishaps that prevented him from getting a retrial. New Yorker mentions there are bribe request allegations too.

On the other hand, nationalism is very big in Indonesia. When countries like Australia confront the execution strongly, they see it as an intervention. Moreover, you can point out that John Howard himself supported death penalty on bali bombers.[2]

Australians should learn diplomacy from the Phillipines, who is able to save their own Mary Jane Veloso.[3]

Ref:

[1][https://twitter.com/search?q=%23savemaryjane](https://twitter.com/search?q=%23savemaryjane)

[2][http://www.theage.com.au/news/national/metoo-policy- mess/200...](http://www.theage.com.au/news/national/metoo-policy- mess/2007/10/09/1191695909938.html)

[3][http://globalnation.inquirer.net/122263/indonesia-why- aussie...](http://globalnation.inquirer.net/122263/indonesia-why-aussie-pleas- failed-velosos-heard/)

<comment><USER3> I'm Australian. I don't think whether or not the death penalty is good or bad is the discussion here. This is about sentencing people to death in an unfair justice system and a president who obviously has political motives (gains) to see these executions go ahead, regardless. I.e. corruption.

Before Widodo came to power the death sentence was rarely enforced.

<comment><USER2> Yeah, drug-trafficking and capital punishment aside, I agree on your two points: Widodo's domestic popularity seems to be declining sharply and corrupt justice system getting stronger. We, Indonesian, experience it first hand sadly.

I am truly sorry for the Australian whose caught in the middle of this mess.

</comment></comment></comment><comment><USER4> I find it interesting that the author infers that Indonesia low drug (4% of population), compared to higher drug use in Europe and America, should preclude the from taking a tough stance to prevent drugs abuse from becoming an epidemic.

On the contrary, we should applaud Indonesia for having a system that keeps drug use at low levels.

<comment><USER3> I don't think that's what the article is about.

What I read was about a President who to eager to please a population with a sense of national pride. Indonesia, being a former colony, has obviously a low self esteem and only seem to be able to be ruled by some sort of iron fist which has to show the world that they are really smart, clever and "sovereign".

Whether or not the death penalty should have been applied and whether or not this "cures" the drug problem is not really the discussion (I believe). That a small group of people had to sacrifice their lives for political gain, and to prove a point, seems to be a more interesting discussion here.

I certainly hope Widodo and his henchmen will be brought in front of an international court to clarify themselves over this.

<comment><USER5> "That a small group of people had to sacrifice their lives for political gain"

They didn't "sacrifice" their lives, they were drug dealers and found guilty by the courts in Indonesia. There's nothing heroic about dying for this cause.

Furthermore it is widely known that Indonesia executes drug dealers no matter where they happen to come from and the Australians surely have known about this "business risk".

I'm against the death penalty but I recognize that I have no say about Indonesian laws. This is their own sovereign decision to make. If you don't like this then don't try to sell/import crystal meth or heroin in Indonesia.

<comment><USER6> It is however, quite hypocritical that Indonesia has lobbied for their own citizens to be taken off death row in other countries[1] yet they refuse the same for foreigners in Indonesia.

I don't disagree with you that the Australians must have known the risks and they chose to go ahead anyway, that was stupid. It is also Indonessia's perogative to enforce their chosen laws as they see fit. But there are political reasons why this whole situation has gone down the way it did, and those reasons are more to do with certain Indonesian politicians wanting to look like strong men in front of their electorates and the international community than it is about any specifics of this case with the Australians in particular.

1\. [http://www.dailytelegraph.com.au/news/nsw/indonesia-got- its-...](http://www.dailytelegraph.com.au/news/nsw/indonesia-got-its-own- citizens-off-death-row-but-aussie-bali-nine-duo-still-await-execution/story- fni0cx12-1227252877434?nk=a481bd1d80ca967407b76ee2af592263)</comment></comment></comment></comment>


The Invention of Telecommuting (2015) - <AUTHOR> https://www.citylab.com/life/2015/12/the-invention-of-telecommuting/418047/ <comment><USER2> > Some studies have shown that telecommuting can contribute to a significant > reduction in vehicle miles traveled—and, consequently, in greenhouse gas > emissions. But it's difficult to quantify the effects on traffic and energy > usage, the forces that directly inspired Nilles' book.

I wonder if the current crisis will supply us with some numbers.</comment>


Coshx Labs is giving away $50k: last day to vote (50k of development work) - <AUTHOR> http://competition.coshx.com/ideas 50k of development work <comment><USER2> Another YouTube audio player?

There's a reason why they come and go so fast: YouTube API TOS.

 _II. Prohibitions

Your API Client will not, and You will not encourage or create functionality for Your users or other third parties to:

8\. separate, isolate, or modify the audio or video components of any YouTube audiovisual content made available through the YouTube API;

9\. promote separately the audio or video components of any YouTube audiovisual content made available through the YouTube API;_

</comment><comment><USER3> Huge shoutout for Streamus which seems to be the top idea right now. It's a chrome extension that plays YouTube audio. It's so slick and is amazing for all those live/obscure tracks you can't get elsewhere. $50k would go a long way for the developer so he can work full time on smoothing out bugs and adding features.

</comment><comment><USER4> love streamus! is it still in the top?

<comment><AUTHOR> Apparently they're gonna win, however seems they'll choose a winner among top 5

<comment><USER5> Didn't win.

I messaged David Cohen directly and he stated,

"1\. normal people don't install extensions in their browser. so a bit hard to go mainstream. 2\. you're riding on top of a service (youtube) that can shut you down. 3\. music is a tough space for investors generally - many (like me) have just stayed away from it."

I'm excited to prove him wrong.

</comment></comment></comment><comment><USER6> $50k _of development work._

<comment><AUTHOR> Thanks, just updated the title</comment></comment>