writing a "Why programmers work at night" book. Want to help? - <AUTHOR> https://leanpub.com/nightowls?repost <comment><USER2> A quote: "A popular saying goes that Programmers are machines that turn caffeine into code."

Lifted from here:

[http://en.wikipedia.org/wiki/Alfr%C3%A9d_R%C3%A9nyi#Quotatio...](http://en.wikipedia.org/wiki/Alfr%C3%A9d_R%C3%A9nyi#Quotations)

"Rényi, who was addicted to coffee, invented[7][8] the quote: "A mathematician is a device for turning coffee into theorems.""

I strongly advise you to attribute everything you can to its proper origins -- this increases the value of your writing, and your reputation as a thorough researcher. It has it all over seeming original, then later being found out.

Also, in my humble opinion, this idea merits an article, but doesn't justify a book. In a bygone age, you could write a detailed article, see it published it a monthly magazine, and have your work read by millions of avid readers. In the present, a well-placed article can win a very large audience -- likely more than a book will, given that the topic doesn't justify a book-length project.

Parenthetically, over a 40-year career in programming, I'm sure I've written 80% of my useful code under cover of darkness.

<comment><AUTHOR> I will do my best to attribute everything, but I'm also going to be writing this in an open manner and accepting bug reports on github :)

I think the idea justifies a _short_ book, more of a booklet almost. Something you'd want to read as an ebook, but would likely scoff at in a dead-tree version. I have a strong feeling that ebooks are to books like blogposts are to newyorker articles.

</comment></comment><comment><USER3> I keep pimping this link but for you it's perfect - <http://the-programmers- stone.com/the-original-talks>

It's several pages written over time but, it's the deepest thinking about the neuropsychology of programming I've seen. From stress, stress addiction, to the level of light (low is best). Some reading, but for someone writing a book you pretty much (imo) have to read it.

</comment><comment><USER4> I care less about "why" than about practical techniques for managing this reality, given clients, coworkers and suits who keep an 8-5 schedule.

<comment><AUTHOR> Yes, that's going to be a large part of the book. It's why I'm going to be doing interviews with programmers - to find out how they manage to fit in with the rest of the world.

The why part will be aimed more at people _around_ programmers, so they can better understand that freak occupying a part of their living space and being all maladjusted and odd.</comment></comment>


How Will You Measure Your Life? (2010) - <AUTHOR> https://hbr.org/2010/07/how-will-you-measure-your-life

<comment><USER2> Brilliant piece; thanks for posting it again so many years later. It's as relevant as ever.

</comment><comment><USER3> This article neither asks that question nor answers it.

It just espouses a simplistic "Stick to your principals! Have a plan! Work hard! Spend your time wisely!" set of life values - which aren't bad in and of themselves but are pretty bland advice.

Personally, I won't measure my life because in order to do so it must be over, and I will at that point be dead.

</comment><comment><USER4> I read this back in 2012. I thought some of the advice was suspect since it was faith based but overall a lot of the ideas are pretty good practices to undertake. They've served me well in the past few years. I think the idea of helping someone new everyday is a pretty good idea that is mutually beneficial to everyone involved.

</comment><comment><USER5> When Intel went for the "bottom of the market" with Celeron I don't think they went far enough down and now ARM has become a serious threat.

</comment><comment><USER6> good book, but somewhat confused why it would be particularly relevant now?!

<comment><USER7> isn't this relevant everyday?

</comment></comment><comment><USER8> For what it's worth, this article is from 2010. (How does one indicate that this should be added to the title? Does one do it through a comment like so, or is there a separate button to click somewhere?)

<comment><USER9> A comment in the thread, or an email to firstname.lastname@example.com if you want to be sure we know about it.</comment></comment>


Data-Mining Algorithm Reveals the Stormy Evolution of Mathematics Over 700 Years - <AUTHOR> https://www.technologyreview.com/s/601179/data-mining-algorithm-reveals-the-stormy-evolution-of-mathematics-over-700-years/ <comment><USER2> > The largest, with 100,000 descendants, originated in 1415 under the auspices > of Sigismondo Polcastro, a medical doctor in Italy

When I start tracing my mathematical lineage back, I find a couple bifurcations and eventually get to Ulrich Zasius (1501), Cristoforo Landino (late 1400s) Moses Perez (same), Elissaeus Jusaeus (late _13_ 00s) and Manuel Bryennios ( _early_ 1300s): [http://genealogy.math.ndsu.nodak.edu/id.php?id=184632](http://genealogy.math.ndsu.nodak.edu/id.php?id=184632) who has 128k descendants.

</comment><comment><USER3> "The second transition occurred between 1970 and 1980, when computer science and statistics merged to form one community." Right now, in the early XXI Century, there is a big overlap between computer science and statistics (especially for AI/Machine Learning), but I don't feel like they have merged.</comment>


Ask HN: What podcast manager do you use for desktop? - <AUTHOR> iTunes is fine but
- I find it doesn't refresh on it's own. I often have view the podcast in the store view to reveal the latest episode - Managing more than say 20 podcasts becomes annoying. You have to flick through each individually. I have a lot of low-volume podcasts I like. - Sometimes podcast that haven't had anything interesting in a while, and therefore I haven't listened in while, stopped getting updated
Really what I want is something similar to an RSS aggregator. I want to see the podcasts as a big stream and pick the ones that sounds interesting to listen to or save for later.
Open to suggestions! Paid is fine <comment><USER2> It's not really a desktop podcast manager, in that it does not run as a native application nor does it actually download podcasts, but I use the Pocket Casts web interface to listen to podcasts on my desktop/laptop.

I use Pocket Casts on my Android device, so the fact that the web client syncs both my list of podcasts and played status is nice. I can be listening to something in the car, get home, walk inside, and pick up where I left off on my desktop without having to do anything other than open the site and click play.</comment>


PySnooper: Never use print for debugging again - cool-RR https://github.com/cool-RR/pysnooper <comment><USER3> Happy to see new tools for debugging. Yet it's the good old print that I most often end up using. Debugging is very context-sensitive: adding prints makes sense because I know exactly what I'm interested in, and I can drill down on that without being disturbed by anything else. I can print low-level stuff or high-level indicators, depending where my debugging takes me. There's no ready-made recipe for that.

Some codebases have built-in logging or tracing functionality: you just flick a switch in a module and begin to get ready-made prints from all the interesting parts. But I've found myself never using those: they are not my prints, they do not come from the context I'm in and they don't have a meaning.

Use what you want but please don't underestimate prints.

<comment><USER4> I've definitely had the experience of using custom_logger.log("something"), then checking the system log. Nope, no there, must be in /var/log/app ... nope. Hmm oh I know! I'll turn up the logging in the config file, wherever that is. Still nothing. Did I need to compile in some flag?

Screw it. print, run directly from shell, done.

<comment><USER5> Fuck var/log/app.

<comment><USER6> honestly, fuck the whole standard logging library in Python. It is the _most_ infuriating thing to use. log4j has a lot to answer for

<comment><USER7> Why?

<comment><USER8>
        >>> import logging
        >>> logging.info('Hello, world!')
        >>> # right, my log message went nowhere

Because by default, logging goes nowhere. And if you configure logging - <AUTHOR> a most unintuitive config format (it's so weird that even the documentation _about it_ can't be bothered to use it, but reverts to yaml to explain what it means!) - there's a good chance that loggers created before you got around to configure it (for instance if you, God forbid, made the mistake of adhering to PEP-8 and sticking your import statements at the top) won't use your configuration - and thus send their log messages, again, nowhere.

Also, it's slow as hell.

<comment><USER9> You know, you could start by reading the documentation and stick one logging.basicConfig() call in your entrypoint, instead of spreading that kind of misinformation.

Python's logging infrastructure is pretty bad but you fail to give any good, factual reason why it is. Instead you just vent your frustration on HN, making that platform all the more depressing to read.

<comment><USER10> I for one am glad to hear this aired in a public forum, even though it took several pointless replies to get to the "hey, check out this bad default setting"... I'm learning Python as a distant third priority, I had only heard of pdb once, and I would have probably tripped over this logger that logs by default to nowhere at least once before I resorted to giving up and reading the documentation in anger.

Why is it this way, do you think? (Is it a reasoned stance? I would have expected the logger to send messages to stdout by default, so at the risk of getting a "Read the docs!" am I going to be equally surprised at the behavior of basicConfig?)

</comment></comment></comment></comment></comment></comment></comment></comment><comment><USER11> For my Django projects the development server is werkzeug [1] and anywhere a break point is needed I'll add 1/0 in the code then hit refresh in the browser which pulls up an interactive debugger [2].

[1] [https://django- extensions.readthedocs.io/en/latest/runserver...](https://django- extensions.readthedocs.io/en/latest/runserver_plus.html)

[2] [https://werkzeug.palletsprojects.com/en/0.15.x/debug/#using-...](https://werkzeug.palletsprojects.com/en/0.15.x/debug/#using- the-debugger)

<comment><USER12> FYI you can do

        import pdb; pdb.set_trace()

It pulls up console debugger and is a standard python package.

<comment><USER13> With python 3.7 you can just do 'breakpoint()' now, and it'll import pdb and run settrace. It also allows you to use other debuggers, pretty cool.

</comment></comment></comment><comment><USER14> Again, Ram - it's a really nice project. Good luck with it.

But just in case if you from print cult, you will like [https://github.com/gruns/icecream](https://github.com/gruns/icecream)

<comment><USER6> "Ram"? I went looking for a project called Ram but couldn't find one. Link?

<comment><USER15> It's the author of the package, the readme says: Copyright (c) 2019 Ram Rachum, released under the MIT license.

<comment><USER6> ah, thank you. I missed the forest for the trees.

</comment></comment></comment></comment><comment><USER16> This is a thoughtful hack but the real solution here is a) make debuggers easier to set up and b) make your project easily debuggable with a debugger from the beginning.

Like, debugging should be considered part of programming, and a local dev environment that can't be debugged should be viewed to be as broken as a codebase without e.g. a way to run the server in watch mode.

Also someone should make a debugger that supports the equivalent of print statements, e.g. set print breakpoint on a variable to print its value every time it's run, instead of typing print everywhere.

<comment><USER17> One situation where I would have wanted a real debugger and couldn't use one was in crash reporting on remote systems (like, machine learning code running in some container somewhere, or on a headless box far from the network).

Since Python's built-in tracebacks are pretty minimal, the default crash logs don't offer much help other than a line number. I ended up writing a tool that prints tracebacks along with code context and local variables [i], sort of a souped up version of the built-in crash message. It's surprising how much that already helped in a few situations, makes me wonder why it isn't the default.

So, yes, more debuggers, but also abundant logging everywhere!

[i] [https://github.com/cknd/stackprinter](https://github.com/cknd/stackprinter)

<comment><USER18> Old school neckbeard way

a) Crashes dump the program state to a file and then you load that in the debugger.

b) If the process is still running but broken, attach the debugger.

c) In my firmware I log bus fault addresses and restart. That allows me to see what code or memory access caused the error. 75% of the time it's fairly obvious what happened.

<comment><USER19> Crash dump debugging is tricky to implement Python, because its normal debugging APIs - sys.settrace, frame objects etc - require being inside the process with a running Python interpreter.

You can still do it, but you basically have to redo the whole thing from scratch. For example, instead of asking for a repr() of an object to display its value, you have to access the internal representation of it directly - <USER2> then accommodate all the differences in that between various Python versions. Something like this (note several different dicts): [https://github.com/Microsoft/PTVS/tree/bcdfec4f211488e373fa2...](https://github.com/Microsoft/PTVS/tree/bcdfec4f211488e373fa253583fefe3dbb320c87/Python/Product/Debugger.Concord/Proxies/Structs)

</comment></comment></comment></comment><comment><USER20> Is there an equivalent of Common Lisp's TRACE in the Python world?

IMO it is the most value for money (i.e. time and convenience) debugging tool I've used till now. Simply write (TRACE function1 function2 ...) in the REPL and you will get a nicely formatted output of arguments passed and value(s) returned for each invocation of the given functions. Another nice feature is that a deeper an invocation is in the stack the more it is indented -- so recursive functions are fairly easy to debug too.

You can't use it for everything but its sufficient most of the time.

PySnooper looks good, but it is inconvenient in a couple of ways:

1\. It prints every line of the traced function -- most of the time this is overkill and not what one needs. 2\. To snoop on a function you need to modify the source file. Not a deal breaker but you still have to remember to revert this.

<comment><USER21> I use this snippet:

``` import ipdb ipdb.set_trace() ```

It drops me into IPython, an interactive Python shell, with the interactive Python debugger. You can type variables and use `pdb` primitives like (c)ontinue, (u)p call stack, (n)ext line, etc. I really like it, but ofc YMMV.

<comment><USER22> Try pdb++ (pdbpp) instead — it's like a much improved ipdb. It monkeypatches itself into pdb rather than defining a new package, so it works from any context that drops into the debugger. Its "sticky mode" alone is worth the switch.

</comment></comment></comment><comment><USER23> Interesting project, though I'd suggest losing the line about "can't be bothered to set one up right now" regarding a full debugger. (i)pdb is built in and is simple to use. Perhaps focus on what this can add rather than framing the project as something like a lazy alternative (especially when this may actually be harder to set up than throwing in "import pdb; pdb.set_trace()")?

edit: spelling

<comment><USER24> I'd also lose the profanity.

> You can use it in your shitty, sprawling enterprise codebase without having > to do any setup.

Debugging is a sensitive subject, particularly given how frustrating it can be. There's a place for vulgarity somewhere, but I'd rather see your README provide authoritative info than crack jokes.

<comment><USER25> In practical terms, what would that achieve?

<comment><USER26> Professionalism.

<comment><USER27> "Any time somebody tells you that you shouldn't do something because it's "unprofessional," you know that they've run out of real arguments." \-- Joel Spolsky

<comment><USER26> Or there is a whole suite of behavior and conduct with well thought out reasons that have been comprehensively debated over the years that have been put under the rubric of professionalism and there is zero reason to rehash the same arguments over and over and over ad infinitum.

</comment></comment></comment></comment></comment></comment><comment><USER28> I have to say sometimes I do find it much easier to read logs than to muck about in an interactive interpreter. That said I did just add `export PYTHONBREAKPOINT=pudb.set_trace` to my bashrc and am slowly going through and removing all my old `from IPython import embed` lines. A much simpler workflow that doesn't incur major runtime costs.

<comment><USER29> For those, like me, who don't know about the new breakpoint():

[https://hackernoon.com/python-3-7s-new-builtin- breakpoint-a-...](https://hackernoon.com/python-3-7s-new-builtin-breakpoint-a- quick-tour-4f1aebc444c)

</comment></comment><comment><USER30> Using print is sometimes superior to pdb. If you want to quickly see how the program runs without stepping through each line print is justified. This looks like an evolved print. Nice tool!

<comment><USER31> Sometimes but not always, especially on large unfamiliar code bases.

</comment></comment><comment><USER32> While I sometimes use one debug tool or another, I have never understood the aversion to print statements reflected in the title. Sometimes, often even, a print statement is just fine, and anything else is overabstracting it. Not saying other options aren't nice to have available, just that there is nothing wrong with using a simple print statement in many situations.

<comment><USER18> Because the observability you get with a print statement is limited. You can't do further investigation without modifying the code and running it again. With a debugger you can explore the program state interactively.

My experience with python is limited but in my day job it's not uncommon to be tracking down stuff that happens infrequently. Debug cycles get brutally long.

<comment><USER33> You also can't be confident that a debugged program is in a natural state without restarting it, at which point the re-setting of the breakpoints and scripting you did in the last invocation - or saving and loading what you've already done - is a pain point. If all of this is quicker than recompiling/relaunching, then IMO there is a second bug in a lack of effective logging.

Most bugs I create are for simple reasons and can be found by scanning the first error logs. If I add print statement debugging because I couldn't then they'll often be adapted into additional logging. If I use a debugger for this as my first tool and don't add logs, I'll have to do it again next time, too[1].

If the bug is not a simple one and is not a structural bug, there's a decent chance it's something debuggers deal with poorly: data races, program boundaries, non-determinism, memory errors. If it's something that can be found by calling a function with certain parameters, it's a missing test case.

So the times I find debuggers to be worth it are after I've already decided it's a difficult yet uncommon bug. So I use them with despair.

[1] If I fix it with a debugger and then add the logs, I still have to prove it gives the right output when it fails.

</comment></comment></comment><comment><USER34> As a very mediocre ruby programmer, is there an equivalent in ruby to this? If you have a little pattern that is more clever than 'puts' everywhere, please share, it would be well received by at least one person out there. Thanks!

<comment><USER35> Yes, check out Pry: [https://pryrepl.org/](https://pryrepl.org/)

<comment><USER36> Second that, pry rules!

</comment></comment></comment><comment><USER37> Never use print for debugging again... If you're creating a reasonably complex project, spend some time to set up a nice and robust logging facility and always use it instead of print. That's the first thing you should do. You will not regret that decision.

I sometimes use a debugger to tackle with unfamiliar code, but I always prefer using trace/logging whenever possible, because 1) you can see the context and whole process that reached that point, and 2) the history of debugging can be checked into a VCS. I'd write an one-liner to scan the log file rather than setting up a conditional breakpoint. I particularly like doing this for a GUI application. A regression testing can be done by comparing logs.

</comment><comment><USER38> Super neat project. I am a print debugger myself and will definitely use this at some point in the future. For scenarios where PySnooper might be overkill and you just want to see the value of specific variables, I wrote a port of the Rust `dbg` macro for both Python and Go that are pretty nifty when looking at values really quickly:

[https://github.com/tylerwince/pydbg](https://github.com/tylerwince/pydbg)

[https://github.com/tylerwince/godbg](https://github.com/tylerwince/godbg)

</comment><comment><USER39> This is great! I'm currently working on a large Django project that has itself and all of it's services running in Docker containers via docker-compose. In order to use a traditional debugger, I would need to set up remote debugging and the integration with VS code for that is really not great. Not to mention that getting a remote debugger to work with Django's monkey-patched imports is a little wonky as well.

With this package, it seems like I can just get my debugging via stderr.

</comment><comment><USER40> IMO the real advantage of print() over a full-fledged debugger comes when you're testing. Just replace print() calls with assert(). (Also debuggers, especially on the front end, always seem incredibly laggy and slow.)

Using debuggers tends to encourage people to fix problems without writing regression tests.

Honestly, I'd prefer "better support for print-line debugging" to "better debugger that you can set up" in most cases.

</comment><comment><USER41> This looks pretty useful. I love these packages that seem like forgotten stdlib features.

</comment><comment><USER13> I missed this on HN last week but I just found it on Google. THANK YOU! I've been debugging weird serial errors for the last day, and this is helping a ton!

</comment><comment><USER29> This looks great, good job! It strikes a great balance between PuDB (my favorite, but can't easily run in Docker/remotely) and q (very simple to use but you need too many print() calls everywhere). PySnooper seems great to just drop in and get the full context of what I want to debug.

Can it be used as a context manager (`with pysnooper.snoop():`) for even finer targeting?

</comment><comment><USER42> Before clicking I was like: why would one not use pdb. With vim, python-mode, and 'find . -name "*.py"| entr python testcases.py', setting break point and re-running is painless.

I was wrong. Upon skimming, it seems a huge plus PySnooper have over pdb is auto inspecting states, sparing whole lot of manual typing

</comment><comment><USER43> Really love this. Seems like it captures a whole bunch of interesting information when a function is invoked.

I love auto-loggers like this where you can selectively capture interesting bits.

This is the basis of reverse debugging I.e capturing chronological snapshots. Would love to see a Vscode extension that allows to step forward/backwards through time when an interesting thing happens.

</comment><comment><USER44> This is super neat, and definitely a great tool for early debugging -- but for anything more in-depth, there's built-in pdb and third-party ipdb, which gives PDB an IPython frontend.

Both use gdb semantics which is great if that's what you're used to.

</comment><comment><USER45> Another (lightweight) tool for debugging is the q library: [https://pypi.org/project/q/](https://pypi.org/project/q/)

</comment><comment><USER46> I love this concept and will definitely be using it.

Presumably it works with Django? If yes then thrice thanks.

This project would justify an additional dedicated screen just for dumping function debug logs.

<comment> cool-RR I confirmed it worked with Django before releasing :)

</comment></comment><comment><USER47> I come from the php world now coding in python. There used to be a very nice library from Symfony called VarDumper: [https://symfony.com/doc/current/components/var_dumper.html](https://symfony.com/doc/current/components/var_dumper.html) that would just pretty print variables you dumped to the browser in an easy to consume form. Is there anything like this in python?

<comment><USER48> There is pretty-print [0], which you could dump inside pre tags, or print to stdout. But honestly, depending on the framework, quicker options exist than (basically) printf debugging.

[0] [https://docs.python.org/3/library/pprint.html#example](https://docs.python.org/3/library/pprint.html#example)

<comment><USER47> For Flask what would be the better option?

<comment><USER48> Pretty much the stuff already mentioned elsewhere on HN for this article. I often find Werkzeug's excellent debugger is enough: [https://news.ycombinator.com/item?id=19718869](https://news.ycombinator.com/item?id=19718869) . pdb/ipdb/pudb et al (pick your fav) can help for really tricky stuff. And sufficient logging, so you know what's going on at all times even without a debugger attached.

(occasionally, the low effort of print-debugging works, but if you keep having to print in more/different locations... it's a blunt tool IMO)

</comment></comment></comment></comment><comment><USER49> We have some fairly intense functions that needs to be profiled with realistic data and io conditions. I've been doing that by hand, line by line in the shell.

I just tried wrapping this around one of these functions in the django shell (actually shell_plus, but same thing). Just imported pysnooper, created a new function using `new_f = pysnooper.snoop()(original_f)` and called new_f on the realistic data and got a nice printout that included values and times.

Very useful.

</comment><comment><USER50> Dont think it works, tried few examples, it throws NotImplementedError at me all the time. Any hint?

~/anaconda3/lib/python3.7/site-packages/pysnooper/tracer.py in get_source_from_frame(frame) 75 pass 76 if source is None: \---> 77 raise NotImplementedError 78 79 # If we just read the source from a file, or if the loader did not

NotImplementedError:

</comment><comment><USER51> Does this work in Jupyter? That would be a good use case for it. In pretty much everything else you really should be setting up a debugger...

</comment><comment><USER52> This might be useful as a teaching aid. You can run some code and then get the line-by-line breakdown for newbie programmers.

</comment><comment><USER53> That looks really nice! I normally use pudb which is a curses-based debugger but pudb falls short when the debugged program runs with several threads or if it uses an asynchronous event loop. Having a non-interactive debugger like PySnooper could definitely help in such situations!

</comment><comment><USER54> Similar principle to my project [https://github.com/Quiark/overlog](https://github.com/Quiark/overlog) which has some more interactive data exploration.

</comment><comment><USER55> Can someone explain to me why to use this instead of `import pdb; pdb.set_trace()` ? I am new to python and am confused someone told me not to use print and use pdb, so how is this different ?

</comment><comment><USER56> Would this run in Cython. I am trying to understand a Cython code and something like this would be helpful.

</comment><comment><USER57> that gonna be huge chunk of log to search

<comment> cool-RR No, because by default it only logs what's happening directly in your function, not what happens deeper in the stack. (i.e. functions that your function calls.)

You can set depth=2 or depth=3 and then you'll get a huge chunk of log. The deeper levels will be indented.

<comment><USER58> Does it have an option to print the caller ? "u" is my fav cmd in pdb.

<comment> cool-RR No, feel free to add it as feature request on GitHub.

</comment></comment></comment></comment><comment><USER59> What's so hard about putting this at the beginning of the function? import pdb; pdb.set_trace()

</comment><comment><USER60> Does it work in multithreaded code? And is debug output nicely separated based on the thread?

</comment><comment><USER61> Will it work with multiprocessing?

<comment> cool-RR Good question.

If the function is launched in a spawned process, it'll work, though you might have trouble getting the stderr, so you better include a log file as the first argument, like this `@snoop('/var/log/snoop.log')`

If the function launches new processes internally... I'm not sure.

If you try it and it doesn't work, open an issue: [https://github.com/cool- RR/PySnooper/issues](https://github.com/cool-RR/PySnooper/issues)

<comment><USER58> There is a race condition when writting on the same log file from several processes at the same time, which is a typical use case for wsgi frameworks such as django or flask.

<comment><USER62> Seems like a "log to this unix domain socket" option could help for those cases? Or one to open a new file for new PIDs?

<comment><USER63> Could probably do:

        @pysnooper.snoop(f"/path/to/file.{os.getpid()}.log")

Something like that

</comment></comment></comment></comment></comment><comment><USER64> I think this is a very neat tool for educational purposes - sort of like python tutor!

</comment><comment><USER65> This is great, I'm definitely going to be using this in my next project.

</comment><comment><USER66> Github star count looks fake for a project so recent.

<comment><USER67> I mean, it's been on the front page of HN for 8 hours...

</comment></comment><comment><USER68> oh man, that example code is way too verbose! I like the idea though as I have never really liked the logging in python

</comment><comment><USER69> Is there anything like this for java?

<comment><USER70> To add on: Is there anything like this for Node.js? Would save lots of headaches.

</comment></comment><comment><USER71> Have you considered providing an option to pipe the output to a Slack channel or something similar to that?

<comment> cool-RR Haha. I don't know if this is satire or not, but in case it's not: You can pass any writable stream as the first argument and PySnooper will use it. So it should be easy to integrate with Slack or anything else.

<comment><USER71> It's not :) This way, I get to see the debug stream in real time, but separate from stdout.

<comment><USER72> You can output to file and use tail -f

<comment><USER71> Oh, yeah! Thanks for the suggestion!

</comment></comment></comment></comment></comment><comment><USER73> This is not a substitute for debug-level logging when you need it.

</comment><comment><USER74> > You'd love to use a full-fledged debugger with breakpoints and watches, but > you can't be bothered to set one up right now.

In VSCode: built in. Press the play icon.

In Emacs: M-x realgud:pdb

Is that really more effort than this?

Why invent inferior solutions to solved problems?

<comment><USER75> Installation for a module like this:

        cd project
        pip install pysnooper  # or pipenv or poetry

And it works.

That's far superior to poking around in the dark trying to make an IDE see my project correctly.

If IDE authors ever figure out how to implement a test button that invokes `python -c "some stuff"` and shows me the results, I'd consider using them.

<comment><USER74> > If IDE authors ever figure out how to implement a test button that invokes > `python -c "some stuff"`

You mean like both Emacs and VSCode already does?</comment></comment></comment>


Show HN: Conway's Game of Life in 40 Lines of JS - <AUTHOR> http://jsfiddle.net/franciscop/1c6n7ze5/7/embedded/result/

<comment><USER2> It's 50 lines by my count (excluding comments) but still a good implementation.

<comment><AUTHOR> I didn't include the `var table = [ ... ]` in the line count since that can be made as long as wanted. Fair enough though, and thanks.</comment></comment>


How to Spot Molex to SATA Adapters That Won't Catch Fire (YouTube) - <AUTHOR> https://www.youtube.com/watch?v=TataDaUNEFc <comment><AUTHOR> Having had this happen to me twice now, my interest was piqued enough for me to start investigating the details. The Molex end of things appears to be mostly irrelevant, and the fire hazard seems to arise from either the design of, or the poor quality manufacturing of, the _moulded_ SATA plugs, not the uh, un-moulded types. I would be interested to hear the experiences / opinions of the HN community in this matter.</comment>


Rentobo (YC S11) Helps Landlords Fill Apartments - <AUTHOR> http://rento.bo/tc_launch <comment><USER2> _The team, which was part of the Y Combinator Summer 2011 class, started off originally with the idea of auctioning off apartment rentals._

Auctioning rentals? Seriously?

Just what the world doesn't need: yet another tool to "help" landlords inflate rents by further distorting market data about housing supply and demand. Purchaser practices (like auctioning and credit discrimination) don't belong in the renter's sphere.

When will a startup build something that actually _helps_ renters?

 _the startup plans to make money from landlords based on the number of listings they manage using the platform._

Landlords tend to pass the cost of pretty much everything onto their renters, so let's make a theory about what this will do to the cost of rent in an area.

<comment><USER3> Yes, I wish there were more tools to help renters. The whole process is plagued by information assymetry with regards to transparency, and the renter is at a huge disadvantage. BadNYCApartments is trying to do something about this, but as far as I can tell, its NYC only still.

For example, some things I would like to know before renting a unit:

1) what persistent problems has this _specific_ unit had? I live in a complex that spans an entire block. I can not find such information for this unit.

2) what kinds of "fees" does this landlord add to rent? And what are those fees on average? Our landlord just recently (without anyone's approval) got Valet garbage removal. I'm amazed such a thing could exist. The dumpster is right there, but we are now being charged $35/mo for something that nobody wants. And there are more animals and bugs in the area. More people snooping around. The fees are being added when the lease is up for renewal.

3) What is the average rate increase between renewals?

4) Smoke free areas. Without getting into the debate of whether this should be regulated; I would like to know how I can find buildings which are smoke free. For a number of years, a chain smoker in the building caused problems for almost everyone, as the secondhand smoke escaped his unit and migrated to the ventilation systems of everyone else. The landlord may try to help, but often there is little that can be done (and this is, unsurprisingly, very common according to the ALA). When he moved out, a few prospective tenants changed their mind because that unit still smelled like smoke after it was turned over. I was sad to see a young lady move into said unit recently, I wonder if she would have if she knew the place was likely a toxic cesspool. It still smells like smoke even with multiple passes of ozone generators. In addition, its unlikely that unit will ever be free of contaminants.

[http://health.usnews.com/health-news/family- health/allergy-a...](http://health.usnews.com/health-news/family- health/allergy-and-asthma/articles/2010/12/17/smokers-former-homes-may-retain- tobacco-toxins)

5) What is the average amount of noise here? Noise is classified as pollution. I can guess from how close it is to a street, but there are lots of other factors.

<comment><USER4> On the other hand it would also be nice to have an equivalent site, BadNYCTenants, so that deadbeat tenants could be easily tracked and blacklisted.

</comment></comment></comment><comment><USER5> Very interesting - we applied to YC W11 with the idea for OpenRent ([http://www.openrent.co.uk](http://www.openrent.co.uk)), which is surprisingly similar, but failed at the interview stage.

We launched a couple of months ago in the UK, and it's going well so far. The only problem, which I'm sure you will also face, is reaching out to landlords in an effective/targeted manner.

Very happy to see people attempting to improve the rental market though, and I wish you all the best. If you guys ever wanted to get in touch, feel free to at [redacted] - would be happy to share our experiences.

Good luck with the rest of the launch!

</comment><comment><USER6> We've been doing this in the UK for about a year now (<http://rentify.com>).

Landlords are really receptive to it. We're currently processing about 4,000 tenants per month & acquiring landlords pretty quickly too. You shouldn't have any problems convincing them that this is an improvement on the alternatives :)

Credit checks are what sparked our interest. I was charged £450 for a credit check through a letting agent. I asked why it was so expensive and he instantly dropped the price to £150. (They're nowhere near that much wholesale.)

Good to see other people fixing a broken area.

<comment><USER7> > Do you do Rightmove/RentRight etc.? > At the moment we don't, but email us > to let us know if that's important to you and we'll take it on board.

I assume this means that there's a reason you don't. If you can share it, what is the reason? Rightmove is the only site I browse for apartment rentals, do they have restrictions on who can list on behalf of others?

<comment><USER5> Whilst I can't reply on behalf of Rentify, we have a Rightmove subscription at OpenRent, and I can see why Rentify might not have gone down that route for the time being.

Using Rightmove has a few extra costs associated, firstly the subscription fee, but more importantly the fact that tenant leads can't be passed directly onto landlords means that some intervention is required. Ie. People answering the phones and arranging viewings.

I also have the feeling that if you told Rightmove you were allowing landlords to list for free, they wouldn't be too pleased about it, as their main customer base is estate agents.

ps. Rentify - had no idea you guys had been up and running so long! We only spotted your service around the same time we were launching. If you wanted to get in touch - my details are in my profile.

</comment></comment></comment><comment><USER8> Congrats on the launch!

Are the founders HNers? I like the design and simplicity but I'm curious how Rentobo will differ from the other solutions out there (Appfolio, RentJuice, On-Site, YGL, Buildium, RealPage, PropertyBoss, Yardi, Property Solutions, RentSentinel, etc.).

<comment><AUTHOR> Gatsby - Thanks so much. We are HNers but should probably work on getting our karma up :-).

Those companies/sites cover pretty much full spectrum of size and focus for real estate software, so how they differ from Rentobo varies from one to the next.

In general I would say the biggest single differentiator for Rentobo is in ease of use and ease of access.

Our goal from day one has been to provide software that is powerful enough for a real estate professional but easy enough to use for a real estate novice. Anyone can signup for a Rentobo account directly from our home page and be up and running in minutes without any special training.

We are always looking to improve and welcome any feedback about how we could make things easier!

</comment></comment><comment><USER9> At first glance, this looks similar to PadLister (<http://padlister.com>), the companion service from the guy who did PadMapper. Both post your listings to multiple sites and can accept online applications and do a credit check. Is there a difference I'm missing or are these two direct competitors?

</comment><comment><USER10> A reputation economy for tenants/landlords would be worth a lot to both parties. I just bought a rental property in Chicago, and I'm terrified of a bad tenant because the state/local laws are so pro-tenant. It could take me months to get rid of someone, and I risk penalties if I don't do "essential" things like provide a timely statement of interest earned on a tenant's security deposit. I'd gladly accept $100 less/month for someone who has proven himself reliable in the past. Conversely, I'd like to develop a verifiable reputation as someone who hasn't screwed over any tenants.

A friend who is an attorney lives in Texas (a very pro-landlord state) and has had to threaten legal action against his past two landlords to get back security deposits. Even as someone who is more capable than most at fighting back, he would love to avoid the trouble by picking from landlords who haven't screwed over others.

</comment><comment><USER11> This looks great! As a former property manager, I can definitely say that integrated credit checks would be a godsend (when I was doing this there weren't any great web-based tools like there are now).

</comment><comment><USER12> Congrats guys on the launch. The site looks great! The rental listing page is particularly awesome. (Very envious of your awesome design, coming from another founder working in the rentals space!)

</comment><comment><USER13> Wow - seems like this space is getting a little crowded... what with padmapper's announcement and other sites like rentify.

Though, www.rento.bo redirects me to bitly.com?

<comment><AUTHOR> samstave - We use bitly as our link shortening provider for rento.bo. Our home page is rentobo.com.

<comment><USER9> This seems like something you need to fix. Pretty important IMO... if someone's trying to find you, don't send them to the wrong site.

</comment></comment></comment><comment><USER14> I'm a landlord and I would love this. Here's what I need it to do:

1\. List property on MLS.

2\. Be able to run credit checks.

3\. Is there anything it can do to make checking references easier?

<comment><AUTHOR> tocomment- We have been exploring some options to make checking references easier.

Many larger landlords use a Reference Verification form that they ask references to complete. One strategy would be to create an online version of that form. At this point we're trying to gauge landlord interest.

If you'd be interested in talking more about what type of solution would work for you, please reach out to me at the support email address on our web site.

<comment><USER14> Any progress on the MLS, or is that a hairy problem?

</comment></comment></comment><comment><USER15> Founders -- why'd you move away from auctions? Seems like a money machine for landlords.

</comment><comment><USER16> I wonder what it takes to make TechCrunch write about my startup too. :)</comment>


If you're trying to hack/deface a website, don't submit a pull request - <AUTHOR> https://github.com/CoderDojo/CoderDojo-Kata/pull/1/files

<comment><USER2> For anybody too lazy to read through them all, here are some gems:

\+


Ask HN: Socially very rusty .. how to fix things ? - <AUTHOR>

Hello HN'ers,
Recently I realized that during the past couple of years, due to various reasons (working a lot/ working remotely/working at places where I hated my job and was perenially bored/didn't want to talk to co-workers most of the time, etc,) I didn't have much face-to-face human interaction. Also, due to being very unhappy at work, I didn't feel like doing anything and that affected my personal life leading to little social interaction there. As a result, I have lost almost all my social skills.
Now, I find myself in a position where I am hesitant to talk to people and am afraid of social situations. This creates a vicious cycle where I don't get out much, which only serves to make the situation worse.
Have you been in a similar situation ? How did you get out of it ? Any advice for me ? How can I get a normal social life ?
Many thanks! <comment><USER2> Personally I find that being comfortable in my location really helps. As in I can be one charming man when I am at home, or at this coffee shop I always visit - but less so in new places.

Another thing I've noticed is how much easier it is to talk to someone once you've seen them trip up somehow (like forgetting a word or dropping their phone), I guess it's to do with perceiving status relative to your own. And it's only a matter of time before that person who seems intimidating does something silly/humanizing, see if you can wait it out.

Also look out you don't make things worse while you try to make them better, jumping in too deep too fast and panicking can play havoc with your fight or flight response - don't accidentally condition yourself to run by packing up and leaving every time the bar gets crowded or something. Try riding it out instead (at least just once).

All of this comes from my experiences moving from highschool, where I had gotten into a rut, to university where I had to start over. And from talking to some family friends who work as counselors. As always take random internet advice like my own with a grain of salt.

Goodluck!

</comment><comment><USER3> find social situations where you can bond over shared interests or things ... e.g., if you're really into Linux IT or something, then find local Linux IT meet-ups. you have a lot better chance bonding with people over shared interests than simply trying to chat up strangers at a bar or university

EDIT: or get involved in activities involving other people, but without an explicit goal of socializing. e.g., doing volunteer work to help out in your local community. the socializing opportunities will naturally arise, since you and your co-volunteers will be able to bond over your shared experiences of doing good for others. and in the worst-case, even if you don't mesh well with these people, at least you will still have succeeded in donating your time to do some good

</comment><comment><USER4> Put yourself though a socializing boot camp. Go out and force yourself into awkward and uncomfortable social situations. Put a couple hours a day into practicing conversation skills. Try to get strangers to be genuinely interested in you.

While you are doing this, be aware of the type of self-talk that you engage in and be sure to keep yourself pumped up with positive feelings. Smile and assure yourself of your desirability and confidence.

Practice, practice, practice, and don't make any excuses.

<comment><USER5> Where are these bootcamps?

<comment><USER6> It's a regimen that you need to apply yourself. It's good to keep in mind that, so long as you don't do anything totally outrageous, there is really no possibility of physical harm by going out and trying to socialize. You might get a bit of a bruised ego, but it's all part of learning.

</comment></comment></comment><comment><USER7> Carnegies "How to win friends" could be of help. It's something every engineer should read.</comment>


Who was the first human to sleep on the Moon? - <AUTHOR> https://space.stackexchange.com/questions/39881/who-was-the-first-human-to-sleep-perchance-to-dream-on-the-moon <comment><USER2> Well the Man in the Moon of course.</comment>


A Conditional Transformer Language Model for Controllable Generation - <AUTHOR> https://blog.einstein.ai/introducing-a-conditional-transformer-language-model-for-controllable-generation/ <comment><AUTHOR> Paper:

CTRL: A Conditional Transformer Language Mode for Controllable Generation (Largest Publicly Available Language Model)

[https://einstein.ai/presentations/ctrl.pdf](https://einstein.ai/presentations/ctrl.pdf)

Link to model release:

[https://www.github.com/salesforce/ctrl](https://www.github.com/salesforce/ctrl)</comment>


Google Chrome to Get a Reader Mode - <AUTHOR> https://www.zdnet.com/article/google-chrome-to-get-a-reader-mode/ <comment><USER2> "Distill page" ? Have google forgotten how to make software for average people?</comment>


Ask HN: My project died right after forming the company... - <AUTHOR>

I spent a butt-load on a lawyer and created a Delaware C-Corp. Unfortunately, my money dried up and my developer quit the project...right after I signed all the papers for the company.
I just want to walk away from it now, as I can't move forward with the project. What should I do? Do I have to officially dissolve the corporation somehow? I'm really disinclined to ask a lawyer for anything, as I'm already totally broke.
Suggestions? <comment><USER2> I meet a lot of first-time entrepreneurs who think that a company is some sort of magic thing that will give them credibility. In reality, it usually just costs you money in many cases.

I've learned that the most important thing is building a product, and that the actual incorporation can be done later. You technically don't even need a real corporation until much later in the process than you would expect (I have friends who run successful businesses as sole proprietorships).

As for what you can do now, IANAL, but having been in a similar situation myself (startup died and I was left with a C-Corp), you have a bunch of options. You can dissolve it right now, or hold on to it for a while to see if something else takes off. There's a certain minimum amount that having a company will cost you in taxes and fees (about a grand a year if you're in CA, and likely less if you're elsewhere). For a Delaware Corp that's actually elsewhere, you need to pay for a registered agent, which is like $200 a year. You need to file some report and pay some tax to Delaware as well, but the time/money involved with that requirement is pretty minimal.

If you want to dissolve it yourself, it isn't that hard. There are a bunch of forms you need to fill out, but it isn't all that difficult to do so (you can find them online). You could just let it die (if you don't pay the taxes/fees, it will eventually get shut down).

<comment><USER3> Thats right, you should always start working on it as a side-project and launch it, see if it gets any user base or if you can make money by monetizing. Forming a company can be done when you have VC's interested or you are making a lot of money. Until then you can just collect the money from sales or monetization and file it as 1099-MISC tax return. No company is required initially especially for web based startup

<comment><USER4> I agree but I'd just like to add the caveat that a company offers you some legal protection which depending on your market you may need or may be desirable.

Of course being a director/owner also brings it's own responsibilities which you must respect.

</comment></comment></comment><comment><USER5> Sorry to be mean here, but I'd like to know... Why would you spend a butt-load on a lawyer to create a C-Corp when as soon as you've done that your money will dry up?

</comment><comment><USER6> Is your startup pushing a web app? Learn to program. It's a lot easier these days.

<http://rubyonrails.org/>

</comment><comment><USER7> I'm confused.. your money dried up.. you were going to pay the developer if he hadn't quit though right? If so, why not just get a new one?

</comment><comment><USER8> Keep the corporation, and re-use it when you have a new idea? At least you'll be saved the time and expense.

</comment><comment><USER9> Email me with some details about your project. I might know people who will be able to help. My email is in my HN about.

</comment><comment><USER10> I think the important thing to focus on when starting out is getting a product launched and generating value, hopefully value which someone out there can attach a monetary value to.

Companies and accounts, while they are important, should only come as a second priority (or even lower, depending on your situation)

I would recommend getting rid of all the unnecessary burden and focusing on value.

I'm not sure how complex it is to dissolve companies in the US, but in UK it is fairly straight forward for a small company. Naturally, things get pretty complex if you've been established and active for a while.

</comment><comment><USER11> What is your skill set? Are you a developer or designer yourself? How much of your project can you build on your own?

If you do want to go forward with this, it sounds like you'll need a co- founder. That means giving-up equity and convincing someone to work with you. (PG often says that if you can't convince someone to go into business with you, then it's probably a bad idea.)

So _if_ you can build a prototype or at least a mock-up, and _if_ you can get a co-founder onboard, then you can consider applying to an accelerator or incubator.

</comment><comment><USER12> I've heard of reverse mergers, where people acquire a "used" company and transfer business assets into it. Not sure where to send you though.

</comment><comment><USER13> Build the company first, the product later.

<comment><USER14> Why do you say that?

I think most people on HN would agree that before incorporating, its smart to build a product and prove its viability/desirability. Except, of course, in capital intensive situations where funding (and thus incorporation) comes first.

<comment><USER13> Actually it's an often iterated advice/opinion here on HN to start with a company and follow up with products. Setup a website, start blogging, build a social network, all this helps give a product launch traction.

That is why I posted this in a sincere, although perhaps too short comment. The author should not be disillusioned but keep pushing forward, ideas are plentiful and worth very little without proper execution.

<comment><USER14> In this scenario, "company" is used to refer to an incorporated entity (C-Corp, S-Corp, LLC, etc). That is to say: You should not register a corporation with the government until you are sure that it has potential for growth.

You seem to be using the word "company" to referring to something different.

</comment></comment></comment></comment><comment><USER15> Suggestion: Learn to program and try again.</comment>


Do Startup Companies Need Community Managers? - <AUTHOR> http://www.readwriteweb.com/archives/hiring_a_community_manager.php <comment><USER2> You can always just promote some active members into moderators...they get the prestige of lording it over other users, and you get to save money.

\+ This way you'll get people into the position who are actually knowledgeable about your product, passionate about it, and aren't just doing it because it was the easiest job for the money they found

<comment><USER3> _"... You can always just promote some active members into moderators ..."_

Good idea.

Phil Greenspun advocates this approach in Philip and Alex's Guide to Web Publishing under "Community: The Big Problem & The Big Solution": <http://philip.greenspun.com/panda/community>

</comment></comment><comment><USER4> I think this article have just created 300 new positions in SV, and soon we will see guys commanding 80k to chat with your users while playing WOW.</comment>


Wirecard: The frantic final months of a fraudulent operation - <AUTHOR> https://www.ft.com/content/6a660a5f-4e8c-41d5-b129-ad5bf9782256 <comment><AUTHOR> Somebody should do a startup that just confirms money in a bank account.</comment>


Hackathon Playbook Part 2: How to Organize an Event - <AUTHOR> https://www.lob.com/blog/hackathon-playbook-part2

<comment><USER2> Point 2 is a bit much I think. I've attended/sponsored/prepared hackathons in the past and all have been great without needing their own mobile app.

The other points are all valid. I'd add that sponsors should be aware of point 8 from the get go. If you sound like a pushy sales guy trying to add your company's API to "hacks" that don't need it the attendees will remember your company for the wrong reasons. If you have product development, pitching, or technical experience that applies you should share it.

</comment><comment><USER3> > Many talented hackers will stay away from events with large prizes because > there's no way to win unless you use the most APIs/products that the main > sponsor(s) have provided

This has been my experience at both HackDuke and PennApps with the additional issue of favoritism towards students from the host college.

</comment><comment><USER4> You can rephrase "Don't let sponsors take over" to "Minimal participation from sponsors"

</comment><comment><USER5> What are some general guidelines around network speed to follow?

<comment><USER6> For 1000 Hackers: Backend: At minimum get a 1Gigabit line, try to get a 5Gigabit line. Frontend: This is usually where the problem is. Many hackathons spend 20-40k on this. Do not get super routers (those big routers that claim to handle 250 people at once), they get clogged. Hacktech.io had many problems with that. Have routers placed throughout the area. Get a wired internet connection for your sponsors at the minimum. At hackathon.launch.co they had wired connections for every hacker, which was impressive. You should definitely have 10-20 switches lying around for hackers to connect with. It will help unclog the network. But if you can get a wired connection for everyone that is even better.

<comment><USER6> Also, often times the computer that aren't capable of going on 5Ghz WiFi networks have lots of problems connecting. 5Ghz networks are capable of handling more connections and don't have as many problems with interference. All new macs and most new smartphones are capable of 5Ghz. Although many PCs may only be capable of 2.4Ghz, which can have many problems with interference. If you have any questions about your setup and how to do it cheaply, email me at firstname.lastname@example.com.</comment></comment></comment>


TikTok, Trump, and the Future of Open Source Surveillance - <AUTHOR> https://fossa.com/blog/tiktok-trump-and-the-future-of-open-source-surveillance/ <comment><USER2> For open source/free software code, provided that it is well designed, transparent, and straightforward to review, its nation of origin does not matter. The history can be relevant to maintainers, to understand why certain decisions were made. But "this code was written by someone in country-I-like" is not a code review shortcut.

<comment><USER3> Linux has over 25 million lines of code (as of 2018 [1]). Would an audit be straightforward?

[1] [https://www.phoronix.com/scan.php?page=news_item&px=Linux- Ke...](https://www.phoronix.com/scan.php?page=news_item&px=Linux-Kernel- Commits-2017)

<comment><USER4> "Straightforward" might not be a great choice of words, BUT, if you have enough money and engineers, you _could_ get them to do a full audit of everything. The source code is freely available, there's nothing stopping you.

Compare this to something like, for example, TikTok, where the code is completely closed. The only kind of auditing one may do is looking at network traffic, and maybe some disassembly/hex-editing.

I'm not saying that everything needs to be OSS but it _is_ nice to have options.

<comment><USER5> Auditing code that you don't have the source to is like an order of magnitude harder. Not the same, but not way impossible.

<comment> i-am-curious > Auditing code that you don't have the source to is like an order of > magnitude harder.

If you don't have code you can't audit code!

<comment><USER5> Perhaps you're thinking of source code?

</comment></comment></comment></comment></comment></comment><comment><USER6> I find it silly that this is seemingly the same privacy issues other privacy conscious people have pointed to for years with the more legacy tech/SM companies. However, now a Chinese company comes into the picture and it's a big deal. Pretty sure if China govt wanted this data so bad they would have it, probably do.

<comment><USER7> Why is it silly that Americans and the US government would make a distinction between a US-based company and a Chinese company? The CCP certainly makes this distinction.

<comment><USER6> Maybe I'm just in a cohort that doesn't trust US companies with this data either. If it's stored, CCP can find a way to get it, it's probably as easy as offering to buy it. So I don't see a big difference. I operate from a mindset that TikTok isn't opening a new floodgate of data. Maybe I don't fully understand what data they're allegedly collecting and if it's any different than what Google, FB would have on an active user. That said, I still don't agree that we should strive to be like CCP in terms of censorship, audits, govt regulations, etc.

<comment><USER8> But this should be looked at from the US government's perspective though.

US government definitely trusts US companies more that Chinese companies.

I don't find it unreasonable to want to ban TikTok. Seems like the national security's risk is real.

<comment><USER9> My problem with this is now it shifts the goal post on what's considered bad. Chinese companies collecting data is bad, US companies collecting data is better so we don't focus on it as much. When in fact in general massive data collection is a problem and should be dealt with. This is providing a smoke screen.

<comment><USER10> The US has much stronger legal barriers and recourse for abuse of data as well as strong separation between state and industry. It's not hard to think of why corporate data collection should be treated very differently in the two countries.

<comment><USER11> Unfortunately, only "top tier" companies really care about your data. I get where you are coming from, I just wish we'd also pass legislation that did something about negligent custodians of data.

</comment></comment></comment></comment></comment></comment></comment><comment><USER12> TikTok is not software. It is a _service_ that uses software. It is therefore not directly comparable with F/OSS projects.

I don't much care who contributes to an open source project. Let them inject their malware if they want to. Because it is OPEN source such efforts will be discovered and the bad actors brought to task. And F/OSS principals extend beyond the code. Because it is open, any user is free to walk away from suspect code. Fork the project. Create your own code. Use the version created by someone you do trust. If I suspect that the particular flavor of linux on my desktop has been infiltrated by bad actors, absolutely nothing is stopping me from switching to any of a hundred other distros. That freedom is the real power, the real safeguard against wrongdoers, not vetting who or who isn't allowed to contribute.

<comment><USER13> > Because it is OPEN source such efforts will be discovered and the bad actors > brought to task

as the article points out this isn't realistic because nobody actually has the resources or time to audit every piece of software this rigorously, let alone read or understand the entire codebase. A ton of open-source code is maintained by one or two or at best a handful of people and we'd be none the wiser if they'd put malicious code into the software until its to late, and as the article points out the permissiveness of open-source software makes it impossible to know for sure who contributed, after all the point of open- source is to let everyone contribute.

So as a system of trust open-source is no solution. The economics of it make it impossible to audit every bit of code, and the code could come from anywhere regardless even of what a Github profile says.

</comment></comment><comment><USER14> Three points:

(1) This issue isn't going away, no matter who wins the next election.

(2) Data collection is not the only goal or threat. The article mentions other critical systems: energy, financial, healthcare, transportation, military. Even agriculture is heavily software dependent now[1]. Also, once you depend on a cloud service, the open source used by it is brought into the attack surface.

(3) Open source is theoretically reviewable, which is good. But even if resources were brought to bear to review it at scale, you'd need to do it continually and track what has passed. This brings pressure to fork. Worse, because review is imperfect even with the best people and tools, it will never be enough by itself to establish that a system doesn't contain malicious code. Current program verification technology is simply not up to the task of formally verifying the behavior of large scale software systems. Maybe it could be used for smaller libraries.

[1]: [https://www.deere.com/en/technology-products/precision-ag- te...](https://www.deere.com/en/technology-products/precision-ag-technology/)

<comment><USER15> "it will never be enough by itself to establish that a system doesn't contain malicious code."

The track record of popular free software projects like for example Linux in preventing malicious code is very good as far as I know.

<comment><USER14> Linux isn't all of open source, nor likely to be the most attractive vector of infiltration for any given target, and not all of even Linux is examined with the same level of scrutiny.

</comment></comment></comment><comment><USER16> >On the other hand, some pundits believe nefarious foreign state data access is the greatest existential threat to the safety of the world's richest democracies.

Id say its something else entirely. Zucc needed a foil to get the president trained on something other than his own platform which, until the convenience of TikTok, was looking at serious legislative curtail. Knowing our president has the attention span of a jack russel terrier made it all the easier to torpedo what is arguably his biggest competition for Gen Z and younger, the lifeblood of his platform and what his advertisers arguably want the lions share of.</comment>


Next wave of mortgage foreclosures could stall recovery - <AUTHOR> http://www.nytimes.com/2009/09/09/business/09loans.html?partner=rss&emc=rss&pagewanted=all

<comment><USER2> I am sick of these articles and their sappy homeowners. You gambled and lost, plain and simple. You risked your future and your families. You do not get to pull your chips off the table when your number does not come up.

Default on your house already. Push the housing market lower. I sold my house 4 years ago and am ready to pick up yours at a realistic, but all be it "lower" price.

I happened to play the game correctly. Yet somehow you feel I should pay for your mistakes with higher taxes and bailouts - thanks jackass.

</comment><comment><USER3> _"I understand I took a risk," Mr. Janis said. "But I did not anticipate that the real estate market would go down 30 percent."_

Understanding a risk means that you should anticipate it having unexpected, and possibly unfavorable, returns. He obviously did not. I have much less sympathy for people with interest-only loans than I do for sub-prime borrowers. Sub-prime people were sold on a dream, these people were simply sold on greed.</comment>


Show HN: Visualizing the Front Page of HN - <AUTHOR> https://www.sizzleanalytics.com/HackerNews <comment><AUTHOR> We scrape the top stories off HN every 5 minutes and calculate these metrics. Interested in any feedback you may have. Enjoy.</comment>


PEAR PHP site breach lets hackers slip malware into official download - <AUTHOR> https://arstechnica.com/information-technology/2019/01/pear-php-site-breach-lets-hackers-slip-malware-into-official-download/ <comment> jbenner-radham I haven't done a lot of PHP coding over the past couple years so I am admittedly out of the loop. That being said, I'm slightly surprised that PEAR is still around. Composer usage has been so utterly dominant that I think the last time I encountered anyone using PEAR was around the PHP 4 days. Just curious what it's actual usage is like as opposed to my anecdotal experience.

<comment><USER2> I've spent the last two years doing mostly PHP dev (small company doing web dev for other small companies in a small town), and while I've never personally used it PEAR is still included in cPanel Apache PHP builds, so I'd hazard a guess that there are a number of servers who are still using it (at least marginally) even if they don't realize.

That said, this would really only apply to someone who rebuilt their Apache instance in the last six months, or manually re-installed PEAR. It has the potential to effect big cPanel based hosting companies like GoDaddy, but only if they were deploying new server instances and not using an image to do it (for some reason).

<comment><USER2> I found this linked in the comments of another article about this, so I wanted to link it here for completeness, as it means my above concerns are a little less valid:

[https://twitter.com/pear](https://twitter.com/pear)

Main Point:

>If you installed PEAR on your Linux system using your distribution's package management tool, it is hugely unlikely that go-pear.phar was included with it... and even more unlikely that you would have used it on that system.

<comment> jbenner-radham Interesting, thank you for the insight.</comment></comment></comment></comment>


I'm a Coastal Elite from the Midwest: The Real Bubble Is Rural America - <AUTHOR> http://www.rollcall.com/news/opinion/im-a-coastal-elite-from-the-midwest-the-real-bubble-is-rural-america <comment><USER3> I think it's fair to call the rural parts of America "real America;" they make up most of our country and probably will for a really long time!

</comment><comment><USER4> From an outsider's perspective, "bubble" isn't an accurate descriptor for either group. I find more sense in articles that describe two (or more) significant-minority factions speaking entirely different languages.

[http://www.theatlantic.com/politics/archive/2016/07/why- demo...](http://www.theatlantic.com/politics/archive/2016/07/why-democrats- and-republicans-literally-speak-different-languages/492539/)

[http://www.vox.com/2014/9/15/6131919/democrats-and- republica...](http://www.vox.com/2014/9/15/6131919/democrats-and-republicans- really-are-different)

[http://www.csmonitor.com/USA/Politics/2016/0407/Why- Democrat...](http://www.csmonitor.com/USA/Politics/2016/0407/Why-Democrats- and-Republicans-are-so-wrong-about-each-other)

</comment><comment><USER5> It's everyone's responsibility - I'm not giving a pass to the Heartland or the Coasts. I come from the kinds of demographics that connect with both - <USER2> and raised in a small, rural town just minutes north of Boston with a population of 6,000 that is nearly 98% white. I had never met a black person until elementary school when he came to town as part of the inner city outreach program to give promising kids a better school system. But when I did, his skin color didn't mean a thing to me, and I had always felt that way. I asked my mom why they shot Martin Luther King Jr because I didn't understand why it was because he was "brown" (as I referred to it at the tender age of 4). Just because you live in an insular, white community doesn't automatically make you an anachronistic bigot. It's an anecdotal reference point but so is this blog post.

Either way you side, this whole charade of "well rural America needs to read a few books and travel to the National Museum of African American History and Culture" is tiresome and making us progressives look bitter and callous to the fact that we lost, straight up, and we _did_ ignore rural America: in the polling, on the issues, and their struggle to retain jobs. Not to mention that many poor people in the middle of America can't actually afford to travel to Washington DC to wise up and learn about other cultures. A really easy thing to ask for and a hard thing for a lot of people to do.

Someone said it on HN earlier, there's a strong link between economic hardship, bigotry, and low education: when you've been deprived of jobs and a stable wage, and you don't understand how the world works but you do know that the news has said we've been shipping jobs off to China and India, you're going to blame other people that are different than you. It's not right, but the feelings of not being able to take care of yourself and your family are valid and heartfelt feelings. And we as the technologically-gifted are partially to blame: we are automating jobs away. I wouldn't say that technological progress is a bad thing, but we set high standards for who we employ, and we, as a nation, haven't done enough to educate that workforce to meet the demands of the changing workforce from manufacturing to services/technology.

</comment><comment><USER6> Anyone who presents themselves as the 'educated coastal elite' and espouse this sort of socially/economically contemptuous rhetoric for eighty to ninety percent of the country is throwing gasoline on the fire. This is precisely the pontificating that shuts down any chance to find common ground over the issues that people care about. Thats not smart strategy when your a small minority in a democratic political process. But maybe virtue signaling to the inner clique is more important then winning elections to these people.

<comment><USER7> Contempt for others, virtue signaling to an inner clique, and not looking for common ground, was a pretty good strategy in this election for Trump, so I'm not sure why you think it won't win elections—clearly, it just did.

</comment></comment><comment><USER8> I'm also from the rural Midwest. My home county [0] is 97.3% white. It also went heavily for Trump (72.95% vs. 21.88% for Clinton) and claims three astronauts. Enrollment in my high school for 2013-2014 was 552 [2]. The population of my home town has dropped by about 10% in the last 25 years (est. 4,252 for 2015). Basically, I have a lot in common with the author and can relate to where he's coming from.

Let me add a bit of context, however.

I don't live there now, although I'm not too far away. Most of my family still lives there but, roughly 15 years ago, I moved one county to the north, and now live in Bloomington, Indiana, which is much, much more diverse.

My hometown, as I mentioned, is overwhelmingly Republican. Regardless of who the Democrat was in the presidential race this election, they almost certainly would have lost my county. Suprisingly, there were a lot of folks in my hometown who did not care for Trump. At all. To them (and me), it truly came down to "the lesser of two evils". For many of them, that was Trump.

I'm lucky enough to have traveled a fair bit. I've been exposed to much more "culture" and "diversity" than many others I grew up with (who still live in my hometown, of course). My thoughts and beliefs have changed tremendously. I consider myself fortunate to have "gotten out".

A lot of my friends and family "back home", however, are the same as they've always been. I agree with the author when he says that us rural folks need to "get out more" (paraphrasing, of course).

I'm trying to avoid going on a way-too-long "defense" of "rural America" but I do want to mention one thing in particular. Immigration and globalization are huge issues to many folks here. They don't care much for foreigners and the "Mexico issue" is a big deal. You know why?

Even though the population of my home county is only ~45,000, I personally know several hundreds (possibly into the thousands) of people who have seen their (manufacturing) jobs disappear. My mother's last day of work -- after 30 years -- was just about two months ago. Her employer, after moving ~3,000 jobs to Mexico over the last 15 years, finally shut down for good... and that's just one company. Her fiancee will also be out of a job in a year or so. His employer is also moving operations to Mexico (his previous employer did the same). We've had several other companies around here do exactly the same thing.

The primary reason for the 10% population drop in my hometown is because a manufacturing company shut down and moved out. This area has probably lost 10-15k jobs in the last 20 years. No, they aren't high tech programming jobs making six figures, but they made a decent enough wage to support a family. People get bitter when they lose their job to someone who will do it for 5-10% of their wage.

This causes them to not care for "corporate greed" or the party that allowed it to happen (Secretary Clinton's husband is the one who signed NAFTA into law, remember). So no, they don't care for corporations or large government or the typical politician. They also don't want Hillary coming for their guns (yes, I've had that several times in the last month or so).

I'm not trying to "pin the problem" on any one group in particular and while I do agree that rural America could benefit by "getting out more", perhaps coastal America could try, just a little bit, to understand _WHY_ rural America feels and believes the way it does.

[0]: [https://en.wikipedia.org/wiki/Lawrence_County,_Indiana](https://en.wikipedia.org/wiki/Lawrence_County,_Indiana)

[1]: [http://www.wbiw.com/local/archive/2016/11/lawrence-co- genera...](http://www.wbiw.com/local/archive/2016/11/lawrence-co-general- election-results.php)

[2]: [https://en.wikipedia.org/wiki/Mitchell_High_School_(Indiana)](https://en.wikipedia.org/wiki/Mitchell_High_School_\(Indiana\))

<comment><USER9> The Democratic Party is still the party of labor unions, including manufacturing unions. The Republican party is still the party of corporate interests. Yes, Clinton signed NAFTA. But it was the Republican Congress who fast-tracked it; indeed, it was for NAFTA that Republicans devised the the fast-track treaty implementation mechanism. This was the time of the Republican Revolution ushered in by Newt Gingrich, who notably now counsels President-elect Trump on policy.

If you dislike Bill Clinton, it makes no sense to vote Republican. Bill Clinton, like Tony Blair, veered right in terms of economic policy. That's because the Thatcher and Reagan revolutions convinced people that the Tories/Republicans (representatives for the "job creators") were the only ones who understood economics and industry, and if you wanted to win an election you had to co-opt those ideologies.

The fact of the matter is that we've lost industry in this country because of _failed_ Anglo-American conservative economic theory (admittedly sometimes adopted in part by Democrats), and an anti-education ethos.

Germany and Austria have thriving heavy industry. And guess what, they also have thriving labor unions, ruling parties that are economically left of American politics, and sophisticated, often free post-secondary education programs--liberal, professional, and especially vocational. Which isn't to say they don't have problems, but manifestly they've done much better at retaining heavy industry, and they've done so using the exact opposite strategy of Anglo-American conservatives.

If you strip away the pretense, this election was absolutely about the racism, prejudice, and xenophobia of poor, conservative, and largely rural Americans. Are they sincerely and legitimately concerned about a loss of jobs? Yes, without a doubt.

But the politicians they elect and the cultural ethos they espouse are clearly a product of modern American identity politics, and modern American identity politics is a product of deep-seated bigotry and prejudice. There's no hiding that fact, or that it's at the heart of the matter.

And it's laughable to imply that because Bill Clinton voted for NAFTA, or because over the past two decades Democrats have shifted right, sometimes adopting Republican policies, that it makes sense to vote Republican. While Trump is a populist, his economic policies are generally quite conservative, the nativist angle notwithstanding. And in any event voters preserved Republican majorities in both the House and Senate. For the most part it's Congress that dictates national policy, not the President.

FWIW, I grew up in the rural South. In the 1990s a nearby small[er] town still regularly hung a noose outside the city limits with a sign telling blacks to keep out. My public high school history teacher literally spent a week instructing us on how the Civil War was about states' rights. (How the black students, nearly 1/3rd of the class, managed to sit quietly through it all I'll never understand, though I suppose keeping quiet is how you avoid conflict in such a thoroughly oppressive social context.) To this day, the racism and bigotry is barely hidden beneath the surface. While plenty of white Democrats in the North hold racist attitudes, they don't tend to adhere to the identity politics of whites elsewhere, even though they have the very same economic concerns. But the South is rising, and slowly creeping North.

And that's why the election turned out the way it did. The decline of industry has been happening for more than a generation. If anything industry is doing better than it was 10 years ago. Certainly the economy is doing better. Wages were finally rising for the working-class; many finally got healthcare. What explains this election isn't a concern about jobs; it's the increasing adoption of a bigoted, prejudiced narrative for a phenomenon that began decades ago, precipitated by the very same political class and ideology they continue to support with increasing vigor.

<comment><USER9> I should add, we've lost industry also because of the rise of China. Some loss was inevitable as the U.S. was too big and diverse to be able to sustain employment and profits across the board under pressure from lower-cost rivals. You'd have to seriously cripple the free market system and diminish overall wealth. Even at the heights of union power (1920s - 1950s), America was never remotely that socialist. Anyhow, economic equality is a means to an end (wealth, stability), not an end in itself.

Mexico is something of a red-herring. Vastly more industry has moved to China than Mexico. In fact, since NAFTA almost all of it went to China. It was only within the past 5 years that Mexico really saw significant NAFTA dividends, as China had been eating their lunch for years. Just ask Wal-Mart.

This is further proof for how racism, prejudice, and xenophobia is at the heart of the current political movement. The narrative is that Mexicans have taken all the blue collar jobs and depressed wages. In reality it's mostly due to China. But the Mexican narrative prevails because it resonates with people's prejudiced preconceptions.

There are similar parallels with immigration.

There's just no denying the inherent racist attitudes. It can't be denied and it shouldn't be denied. And admitting that doesn't discount what real, legitimate issues people face. In fact, admitting that is one of the first real steps necessary to addressing those issues. The inherently racist narratives make it impossible to reach effective compromise, socially and politically.

</comment></comment></comment><comment><USER10> This is an embarrassing article.

Let's not blame this on the coastal elites, let's blame it on mid america that is uneducated/doesn't travel/ doesn't have any exposure.

Ironically - that's exactly what defines coastal elitism (thinking that we are more educated and more cross cultural).

Some things will never change and then we wonder why "no one predicted the elections "

<comment><USER11> They do live in a bubble and they are more homogenerous. Why would we try to deny that fact?

<comment><USER10> Based on the outcome of the elections - you/we may in fact live in the bubble</comment></comment></comment>


No commission crypto investing - <AUTHOR> https://www.circle.com/en/invest <comment><USER2> No commission as in no management fee and no carry?

<comment><AUTHOR> that's right!</comment></comment>


Trouble with Google Experiments and the Multi-Armed Bandit Method  - <AUTHOR> http://www.whatmarkdid.com/2013/10/trouble-with-google-experiments.html

<comment><USER2> If you implement your own bandit, there are ways to tweak it if you suspect that one arm rarely gives a large payout so that it gets sampled better.</comment>


Apple's New iPad in Production  - <AUTHOR> http://voices.allthingsd.com/20110208/apples-new-ipad-in-production/ <comment><USER2> > _Read the rest of this post on the original site »_ > [http://online.wsj.com/article/SB1000142405274870436400457613...](http://online.wsj.com/article/SB10001424052748704364004576132643125168876.html) > \- already with a discussion on HN

</comment><comment><USER3> According to "people familiar with the matter" the new iPad will be better.

They've used "people familiar with the matter" three times in less than 500 words, however "people familiar with the matter" can't tell if they are paid per number of words. :)

</comment><comment><USER4> tl;dr - there will be a new iPad. It will be better than the old iPad. Someone told us so.

</comment><comment><USER5> Screen resolution will be "similar" to the first iPad's. That's a bit vague.

<comment><USER3> The entire article is vague.

</comment></comment><comment><USER6> It would appear their sources are very "familiar with the matter"</comment>


Washington state lost 'hundreds of millions of dollars' to unemployment fraud - <AUTHOR> https://www.seattletimes.com/business/economy/washington-adds-more-than-145000-weekly-jobless-claims-as-coronavirus-crisis-lingers/ <comment><USER2> OMG, Washington State, I live near Seattle, Inslee is a complete idiot. I have gotten several letters telling me my unemployment is on its way, I keep going online to the web site and telling them no, I have not filed a complaint. Then say we have frozen your ability to file a complaint. Total incompetence. Also they set up a tattle tail web site to report violators of the covid stay at home order. Then the identities of all of the people who made reports got stolen and promptly everyone on the list got unemployment claims made. Unbelievable.

<comment><USER3> _Please stay firmly tucked away while the scammers raid $100 for every man, woman, and child in our state._ :-P

</comment></comment><comment><USER3> This is epic, even by the advanced standards of bureaucratic stupidity. Hats off to the Nigerian scammers, now that we no longer have a fourth estate to alert us to such ineptitude.</comment>


Walmart, Huge U.S. Employer, Will Let Workers Take Pay Before Payday - <AUTHOR> https://www.nytimes.com/2017/12/13/business/walmart-workers-pay-advances.html <comment><USER2> a good concept.

I had the idea recently to offer a global "cash advance" / "payday loan" service.</comment>


Wall Street's Marijuana Madness: 'It's Like the Internet in 1997' - <AUTHOR> https://www.wsj.com/articles/wall-streets-marijuana-madness-its-like-the-internet-in-1997-1537718400 <comment><AUTHOR> An interesting counter consideration for market participants:

[https://www.politico.com/story/2018/09/13/canada-weed-pot- bo...](https://www.politico.com/story/2018/09/13/canada-weed-pot- border-783260)

Edit: Updated linked story to original source.</comment>


How I Make Explorable Explanations - <AUTHOR> http://blog.ncase.me/how-i-make-an-explorable-explanation/ <comment><USER2> I case anyone else was wondering, the emoji apparently depicts a thinking face [https://en.wiktionary.org/wiki/%F0%9F%A4%94](https://en.wiktionary.org/wiki/%F0%9F%A4%94)

Maybe it's just my font, but I can almost never tell what those pictures are actually supposed to represent without looking them up.

<comment><USER3> A tooltip on hover over the emoji that shows "THINKING FACE" would be a nice feature. Could even be browser native so websites don't have to change anything...

<comment><USER2> Your comment made me suspect that this already exists, and indeed there is an addon for Firefox (EDIT: works like a charm) [https://addons.mozilla.org/en- US/firefox/addon/emoji-to-engl...](https://addons.mozilla.org/en- US/firefox/addon/emoji-to-english/)

<comment><USER3> Thanks for looking... I sometimes forget addons exist ;)

Here it is for Chrome [https://chrome.google.com/webstore/detail/emoji-to- english/j...](https://chrome.google.com/webstore/detail/emoji-to- english/jjlpnhlbcmdgoggmnkjdgnodphmoppig) and the source code at [https://github.com/szupie/emoji-to-english](https://github.com/szupie/emoji- to-english)</comment></comment></comment></comment>


Bash socket programming with /dev/tcp - <AUTHOR> http://thesmithfam.org/blog/2006/05/23/bash-socket-programming-with-devtcp-2/

<comment><USER2> It's probably best to read the comments on the post (which is a few years old), which sum it up: the /dev/tcp device may not be accessible, it probably shouldn't be enabled, and better mechanisms exist.</comment>