Ask HN: Legacy code – tests first or setup CI? - <AUTHOR> I've been working on a project for a large IT department to automate all the things. It started out small but more people are starting to use it, and also starting to contribute, adding features; it's starting to get some traction. This is a web based app (Python) that runs scripts to automate various infrastructure tasks, like building and patching servers. It's backed by a database and is very tightly coupled (although it's fairly modular, organized into packages, kind of like MVC). We had to move fast and there were just 2-4 of us, server admins learning to be developers, so we've never had a formal testing or CI/CD process. We do use version control. We have a dev branch, which is everyone's upstream, and once we're happy we merge that to a master branch and that's considered "production".
We know we need to get to CI/CD, unit tests, all the DevOps/Agile/XP stuff. I'm thinking since we don't have any tests at all, before we refactor the code to support unit tests or start integrating with Jenkins (CI), we should start with at least adding some high level tests. Maybe integration or UI tests... just something to make sure we're not breaking things as we clean up the code base.
Some people have suggested we start with getting it into Jenkins and set up an automated build (CI) system first, then start adding tests. I'm thinking start with tests first.
People are using it now, but there are a few bugs. Most of them are integration related - race conditions, DB sessions overlapping, things that come up when it's running under Gunicorn and handling a lot of requests. What's the best roadmap to get a legacy code base up to snuff to be considered a real product?
[edit] I should mention, everyone who develops on this runs it on systems that are almost identical to production. We use a requirements.txt, and the OS is at the same patch level and everything. Giving contributors a way to run tests locally against their changes on their dev boxes, with a testing framework, would be almost as good as running the app in production. Nobody's running this on their laptop or anything like that. <comment><USER3> After using most CI/CD tools I can tell you that for your tech stack there is no reason to use Jenkins. It sucks, typical Java software that looks like shit, has a buggy interface but somehow runs well enough to be "Enterprise ready".

Go with Drone, you will thank me later.

I would implement the CI pipeline first, write tests afterwards and make sure to integrate with Mattermost/Slack, which will make you aware if something is broken.

I am currently on a Gogs, Drone, Mattermost stack and am loving it. Everything was super easy to setup and runs just perfectly fine for months now without me doing anything other than the initial setup. Jenkins was a pain in the ass and it was the best decision for me to get rid of it.

The beauty of Go is also that it isn't using any resources, this is why I run Gogs (runs perfectly fine with 512MB RAM) instead of GitLab (you need 8GB+ RAM).

</comment><comment> laurence-myers They go hand in hand. If you write tests, but they're not run after each dev commits changes, you're not testing those changes for regressions. If you have CI without tests, what is the CI going to do? It could still be used for packaging executables/distributions, and possibly orchestrating deployments, but it sounds like that's not your goal.

Save yourself some grief and use a service like CircleCI, it provides isolated (Docker) environments that are spun up per test run. It supports many languages and background services (like databases).

As for writing tests, you would be best to start writing them at a "system boundary". This might take the form of sending HTTP requests to your endpoints and parsing the response.

<comment><USER4> I agree that they go hand in hand. In practical terms however it can take a long time to write comprehensive test cases for legacy code, even if only writing integration and system tests and ignoring unit tests.

A pragmatic approach would be to write a few tests quickly first. Then implement CI as quickly as possible. After the CI is working end-to-end running the few tests you quickly setup before then you can focus on expanding coverage of testing. Basically, I'd suggest writing only enough tests to test the CI first :-) Then once that's in place you can add tests.

One other thing that is important to get right is reporting (at the end of your CI flow, once each build and test run has completed). This will help you keep on top of regression but most notably demonstrate the real value of what's going on with all the work you're putting in now.

You don't have contact information in your profile but I wanted to add that I've worked in the role of a software engineer focused on automation (CI and testing) at large tech companies and I felt so strongly about how important the reporting aspect of this is that I started a web-based reporting service that is growing in usage. Check my profile for details, I'm the founder, contact me with any questions or feedback.

</comment></comment><comment><USER5> > before we refactor the code to support unit tests or start integrating with > Jenkins (CI), we should start with at least adding some high level tests.

Yes, this is a good idea. before trying to make dramatic changes to internals (refactoring etc) it is a good idea to get some kind of automated tests around the system.

you'll get quite a lot of value from a small number of basic smoke tests / end-to-end integration tests.

> Giving contributors a way to run tests locally against their changes on > their dev boxes, with a testing framework, would be almost as good as > running the app in production

a nice way i've seen this done is to focus on automating a build script for launching the app and any dependencies it needs, running automated tests against it, then tearing everything down.

figure out how to automate into a script that developers can use to run automated tests

figure out how to automate the environmental set up (e.g. installing package dependencies)

once you know how to do those things reasonably reliably for dev machines, set up a jenkins CI build to do the same thing: check out the code, set up dependencies, then run the automated test script

Since you've got a web app, it may already be difficult to get automated reliable set up and tear down of dependencies under control. E.g. you use a DB - can you automate setting that up and populating it with test data before a test suite runs? Your app automates infrastructure tasks -- how can you test that without actually triggering the changes, etc?

<comment><AUTHOR> > figure out how to automate into a script that developers can use to run > automated tests

That was my thought exactly. A test suite that starts with a setup, runs a few e2e "smoke" tests to make sure basic functionality is there, then a teardown.

Since the real action is handled by Ansible, I think it should be relatively easy to set up a dummy repo that only simulates playbook runs without actually doing anything. That way you can hit "build" or "patch", get a valid response back, output even, but it's not actually going out and hitting anything.

My main thing is, now that we've nearly tripled the number of devs working on it, and it's now being used by another team (was 2 teams using it, now 3), we'd be irresponsible to add any new features or do further development without a way for contributors to, at the very least, type "python runtests.py" or just type "pytest", and see that the site still has basic functionality.

Here's an example: There's a system in there that allows admins to assign roles to users. Some JS was added for a totally unrelated feature, but it ended up intercepting form submits on that page. I didn't find out there was a problem until a couple days later.

Another time, I was giving a demo to 4 different managers, and I went into this one section to do something, got a 500 error. Turns out I had a couple lines at the end of a view function at the wrong indent level.

It's embarrassing. Before trying to set up Jenkins, Docker, whatever else, a few basic high level tests that cover 5-10 areas of the UI would surely keep us from embarrassing ourselves at the very least.

Thanks for your input.

</comment></comment><comment><USER6> Your situation sounds remarkably like the state of our (also Python) codebase 18 months ago.

Start with CI and a couple of trivial tests that don't require refactoring - <USER2> smoke test or an end to end test that verifies your home page returns a 200 status code. Expand from there.

I say this because tests are useless if they don't get run. When I finally got CI set up for our code base, my next three weeks were spent updating abandoned tests that had been written to verify a dependency upgrade and then hadn't been run in months.

The real win, though, was integrating CI with Slack. Before that nobody noticed if a build broke, and I would have to point it out to them. Displaying an alert publicly in the middle of our primary channel of communication made it something that couldn't be ignored.

Once you have CI running, developers will start to feel the pleasure of expanding test coverage and using tests instead of clicks to verify their work... and the pain of breaking the test suite.

Before we set up CI, every member of our dev team was somewhere between unenthusiastic and mildly resentful of requests for test coverage. That attitude has changed - most of our engineers now take pride in writing tests that pass, and one formerly resentful developer voluntarily chose to target 100% coverage (something we don't yet require) for the most recent feature he built.

Also, I want to echo another commmenter's suggestion about using a hosted CI service - assuming you're a small team. It'll get you up and running faster and require less maintenance overhead. Since we don't use Docker and have a fairly complex stack that won't run on typical services like CircleCI, we use a service that handles the queue, displays pass/fail, supports notifications, etc. but lets us run the test suite itself on our own boxes.</comment>


Covid-19 Dashboard (asking for feedback) - <AUTHOR> https://iterator.us/covid/ <comment><USER2> There are lots of dashboards out there right now, so if you're going to make a new one, make sure it stands out from the others in some way.

I like that you have the percent increase/decrease for each metric. That's relatively unique. Many dashboards focus on the number of new cases or the number of new cases per capita. The percent increase is an important number, because (assuming adequate testing) it tells you how fast the virus is spreading.

Some suggestions:

I would suggest adding a label for the time frame, i.e. is new deaths in NY down 89% in the last week or the last month?

There's no label on the Y-axis, so it's not obvious whether it starts at zero or some other baseline. I would suggest y-axis labels, but obviously you've omitted them to reduce clutter.

Is the smoothed-out line a 7-day rolling average, or some other smoothing function? It would be useful to know.

Including a full two months of data makes it harder to see changes in the last 28 or 14 days. I would suggest adding a way to adjust the scale, perhaps a button at the top to switch between 60-day, 28-day, and 14-day views.

Rt.live includes events such as lockdown/reopening/etc, and does so cleanly. That would be a nice addition here too. I'm not sure what data source is used for those dates.

Do you follow flowingdata.com? You can find lots of good advice there for visualization best practices.

<comment><AUTHOR> This is great feedback! I'm going to start with adding a way to change the time range.

I checked out Rt.live and flowingdata.com. Super helpful.

Things I couldn't find in other tools: \- As an expat I want Countries + US States in one view. \- Get a quick understanding if I can travel to certain areas and how my friends and family are doing. \- Minimize noise and anxiety: only show places I'm interested in + no other news.

[https://www.covidexitstrategy.org/](https://www.covidexitstrategy.org/) is doing a great job condensing information.</comment></comment>


The New American Slavery: Invited to the US, Foreign Workers Find a Nightmare - brown9-2 http://www.buzzfeed.com/jessicagarrison/the-new-american-slavery-invited-to-the-us-foreign-workers-f

<comment><AUTHOR> Wow, this is a popular story:

[https://news.ycombinator.com/item?id=9943296](https://news.ycombinator.com/item?id=9943296) \- 4 hours ago

[https://news.ycombinator.com/item?id=9942564](https://news.ycombinator.com/item?id=9942564) \- 5 hours ago</comment>


Android 2010 is Windows 1990 - <AUTHOR> http://blog.ablepear.com/2010/04/android-2010-is-windows-1990.html

<comment><USER2> In the linked to article, he doesn't say what device he was using. I never used voice input on my G1 because it didn't work that great and wasn't available until the later builds (cupcake and donut). However, it works great on my Droid with the 2.1 update. I've dictated complete sentences into a notes application and it got them first try. It's not perfect but it's good.

As far as too many apps causing instability, dropped calls etc. I have never experienced that at all with either of my phones and I have installed tons of apps. The only real issue I've ever had with multitasking is that on 3-4 occasions a web page would hang when loading (possibly on some Javascript) and it would drain my battery down prematurely.

<comment><USER2> Replying to self, sorry.

Maybe the issue is with the 'overlay' apps for android. (Sense, MotoBlur, etc). Both phones I have run the generic Android interface and I prefer it. My wife's phone has the Sense UI and she likes it. But she also doesn't have any of the troubles listed in the article. Just my $.02

</comment></comment><comment><USER3> Well - except that it's also open source, so while its producer may be headed for one or more monopolies, it probably isn't because of closed code on mobile platforms.</comment>


How to shoot yourself in the foot in any programming language - <AUTHOR> http://www.fullduplex.org/humor/2006/10/how-to-shoot-yourself-in-the-foot-in-any-programming-language/

<comment><USER2> Haskell - You try to shoot yourself in the foot, but instead, a new foot appears in front of you that is identical to your own except that it has a bullet in it. Oh, and it's wrapped inside a burrito for some reason...

<comment><USER3> Excellent. I also would have accepted

        Violence.hs:5:35:
            No instance for (Shootable BodyPart) arising from a use of 'shoot'
            Possible fix: add an instance declaration for (Shootable BodyPart)
            In the expression: shoot $ user ^. foot
            In an equation for 'violence': violence user = shoot $ user ^. foot

<comment><USER2> You should abstract this; you realize bullets are group actions on the set of feet, right?

Edit: Sorry, not group actions, monoid actions. Group actions would mean there was some kind of inverse bullet. Also note that bullets aren't commutative.

</comment></comment></comment><comment><USER4> Befunge [[http://en.wikipedia.org/wiki/Befunge](http://en.wikipedia.org/wiki/Befunge)]

          _  _  _ .'`;
        _(_)(_)(_)|  |
       (_)        `--'
        .-'``````---.          ,-.______________,</comment><comment>===,
        |            ;        [|  )_____________)#######((_
        `'-......---''         /</comment><comment></comment><comment>===.-.___,--" _\
        .-'``'.               "-._,__,__[JW]____\########/
        |    (                          \ (  )) )####O##(
        |     \                          \ \___/,.#######\
        :      \                          `===="  \#######\
        :       `.                                 \#######\
        :         \                                 )##O####|
        |          |                                )####__,"
         \         /                                `--""
          `'-...-'`

</comment><comment><USER5> The last version I saw, probably 20 years ago, had the APL version something like

"Somewhere a gun goes off and hole appears in your foot, but you don't remember enough linear algebra to figure out how this happened."

</comment><comment><USER6> Erlang:

* You send a message to your hand process to shoot yourself in the foot.

* Hand process sends a message to the gun process.

* Gun process sends a message to the primer process.

* Primer process sends a message to the foot process, using the bullet to contain state.

* Bullet state is passed to the foot process,

* Foot process creates a copy of your foot that contains a hole, and sends a message to the leg process indicating that it should accept the replacement foot...

</comment><comment><USER7> I don't like the CSS one.

Here are a few ideas:

You take the gun to a smaller room and it disappears.

You're left-handed but the gun doesn't support left-hand prefixed properties.

The gun is too big in your right hand but too small in your left hand.

You take the gun to a different range and your beautiful, well designed gun is suddenly too ugly to behold.

You miss your foot because you're standing in line next to a guy that's floating.

<comment><USER8> You try to center your gun over your foot but can only center bullets.

</comment></comment><comment><USER9> >Javascript

>You've perfected a robust, rich user experience for shooting yourself in the foot. You then find that bullets are disabled on your gun.

Anyone have a modern version for this?

<comment><USER10> My take:

> Javascript

> There're so many guns to choose from that when you finally choose one, it's > suddenly no longer cool to shoot yourself with it so you look for another > one.

ps. I love Javascript :)

<comment><USER7> My version of this: "You have the gun, but you never fire it because you can't decide on accessories."

</comment></comment></comment><comment><USER11> Along the same lines: "If programming languages were cars"

[http://users.cms.caltech.edu/~mvanier/hacking/rants/cars.htm...](http://users.cms.caltech.edu/~mvanier/hacking/rants/cars.html)

</comment><comment><USER12> Okay, I'll admit that the whitespace crack at the end was pretty funny.

<comment><USER13> They are all pretty funny, at least when I can actually understand the inside joke...

</comment></comment><comment><USER14> Objective C/Cocoa: Simply use the built-in API:

[[[FSGun alloc] initWithGunType: FSGunTypeShotgun] shootBodyPart: FSBodyPartFoot side: FSBodyPartFootSideLeft onPerson: self]

</comment><comment><USER15> Some classics there (there have been versions of this knocking around since at least the mid-90s and probably much earlier) but it's great to see some new ones.

<comment><AUTHOR> I first encountered it in 1991, I think. Probably on the Monochrome BBS.

</comment></comment><comment><USER16> I usually liken PHP to an AK-47.

Its rickety, it bends and moves when you use it, but no matter what it just keeps working. Although there have been new platforms to come out with superior technology, none can match its simplicity and ease of use, and because of this it has been used in more instances than any other. Hell, even a kid can operate it.

</comment><comment><USER17> my favorite is unix way of shooting in the foot.

<comment><USER18> That and Perl.

<comment><USER19> Mine is the 370 JCL, because of the surreal but instantly familiar "three years later, your foot comes back deep-fried".

The only problem is that neither i nor anybody else alive today has any idea what 370 JCL is. Can someone repurpose this to be about the Cloud?

<comment><AUTHOR> Thankfully, I don't have to deal with it any more, but Z/OS JCL is dealt with on a daily basis by people sitting within five feet of me.

<comment><USER19> They have five feet? Sounds like someone ran the batch too many times.

</comment></comment></comment></comment></comment><comment><USER20> Go: "Don't share a bullet by shooting, shoot yourself by sharing a bullet."</comment>


How to build a Twitter natural language recipe recommendation engine in 24 hours - <AUTHOR> http://engineering.autotrader.co.uk/2018/01/09/natural-language-recipe-recommendation-using-twitter.html <comment><USER2> I hate these "almost" stories because "almost" does not get you to MVP.

<comment><USER3> Well, they apparently did go a long part of the way to an MVP...

<comment><USER2> People have been killing A.I. since 1968 by trumpeting "almost" successes. It damages the credibility of serious practitioners.</comment></comment></comment>


"Trying to build the most sustainable modern town" [video] - <AUTHOR> https://kaluyala.com <comment><USER2> Seems that Bing maps trumps Google in deepest Panama, but both differ considerably:

[https://www.google.co.uk/maps/place/9%C2%B015'23.4%22N+79%C2...](https://email@example.com,-79.284778,963m/data=!3m2!1e3!4b1!4m2!3m1!1s0x0:0x0)

[http://www.bing.com/maps/default.aspx?q=Kala+Yala&mkt=en&FOR...](http://www.bing.com/maps/default.aspx?q=Kala+Yala&mkt=en&FORM=HDRSC4#Y3A9Ni41NTg2ODB+MTAxLjI5MDQ1NSZsdmw9MTkmc3R5PXImZW89MCZxPWthbGElMjB5YWxhJTJDJTIwcGFuYW1h)

[http://psgsinternship.blog.usf.edu/files/2012/07/sam- miguel-...](http://psgsinternship.blog.usf.edu/files/2012/07/sam-miguel- panama-map.jpg)

So is it sustainable to get interns to build your town for you?

</comment><comment><USER3> Um, that does not look modern or sustainable.

<comment><USER4> It looks like an excuse to tell people you're saving the world when you're really going on vacation.

</comment></comment><comment><USER5> Wasn't this the plot to The Beach (2000)?</comment>


Ask HN: What are day to day "problems" that have verified solutions? - <AUTHOR> Especially interested in those things that keep coming up at workplaces, at home, or anywhere between.
Maybe the people with these problems have not (yet) been exposed to the solution, or maybe it runs counter to intuition and doesn't 'stick', but our collective knowledge knows. And you know. It might even drive you a little crazy that it keeps coming up.
Some examples: Date formatting ( https://xkcd.com/1179/ ) and data integrity (Reed–Solomon error correction), or even more "mundane" things like how to fairly split something up between two people (one splits, the other chooses). <comment><USER2> I was thinking about this one for a long time. Finally I got one (at least I think so): If you (like me) like to buy the bread in advance and freeze it for later use, make sure to slice it up first. Otherwise you have to unfreeze the whole bread, slice it, and then freeze it back.

Doesn't sound as cool when I read it now as it was in my head :D.</comment>


Are Google putting mass surveillance onto London streets? - <AUTHOR> https://twitter.com/adrianshort/status/978939568157351937?s=21 <comment><USER2> I find it ironic that mass surveillance capital of the world London would complain about this. Companies such as google and Facebook make advertising profiles. Mass surveillance is something only governments would care about.

</comment><comment><USER3> Good investigative thread. If eu does decide to break Google up (and I hope they do), hopefully it will be the data collection and advertising in one completely separate firm. Preferably android in another and rest of Google another</comment>


What not to do during an interview - <AUTHOR> http://dandreamsofcoding.com/2014/06/29/interviewing-is-hard/

<comment><USER2> > Don't suck at something you say you're an expert at

This one. If you say you are expert/advanced at X, we will check for some level of competence. It's amazing how many candidates with CVs claiming 'advanced SQL skills' don't know about the existence of the HAVING clause. An exaggerated CV is a very easy filter.

<comment><USER3> I agree that people shouldn't exaggerate their skills but you need to be cautious about how you go about proving that they do not. It's easy to prove that someone is clueless by quizzing them about specific technical details or syntax. You will of course find something they do not know, but are you really trying to prove your own cleverness by catching them out? "You say you're an expert eh? We'll let me prove you're wrong and I'm smarter cause I'll ask arcane technical facts till I find something that shows you're not an expert!"

<comment><USER2> > I agree that people shouldn't exaggerate their skills but you need to be > cautious about how you go about proving that they do not. It's easy to prove > that someone is clueless by quizzing them about specific technical details > or syntax.

I agree, which is why I gave GROUP BY HAVING as an example filter for 'advanced' SQL skills (especially as my team manages data warehousing and analytics).

It's not a minor implementation detail, it's the major tool for filtering on aggregated values - something like 'find customers who have purchased two more products in one month' can either be done as a query of an aggregated sub- query, or as one query using HAVING to filter for customers with a COUNT(*) > 2.

Again, this is only for people claiming advanced skills, and it's not that an 'advanced' feature. I don't expect every developer to know about SQL:2003's window functions, but HAVING has been around since at least 1992.

I agree with not asking silly technicalities, as a Java developer, knowing why new Integer(100) == new Integer(100) but new Integer(1000) != new Integer(1000) is an interesting piece of trivia, but using it in an interview is a waste of everyone's time.

<comment><USER3> So you're saying you think that questions on syntax are important. We'll have to agree to disagree on that.

<comment><USER2> That isn't a question on syntax, sorry. We'll have to very much disagree if you think this is just syntax. It's a core part of SQL that anyone with advanced SQL skills should at least be aware of.

Syntax would be caring if they put the ORDER BY in front of the GROUP BY.

</comment></comment></comment></comment></comment><comment><USER4> >Don't swear

If it doesn't work out because I swear in the interview, it wasn't going to be a good culture fit in the first place. This goes both ways.

<comment><USER5> It's not a matter of it's a culture fit or not, it's a matter of showing that you care about the job.

We wear whatever the hell we want to at the office, but if I conduct an interview and the interviewee comes wearing jeans and a T-Shirt with holes, I problem will end the interview short and thank him for his time. If he doesn't care about this job enough to even make an attempt at dressing up then why waste our time.

Same with swearing. If you can't show to us that you care about this job enough to use professional language for an hour then I probably won't consider you past the first round. It's not whether we care about swearing, it's about proving to us you really want this job.

<comment><USER4> > cares enough about his job enough to even make an attempt at dressing up Why > not be yourself and let the right role culture find you?

If my employer won't swear in the interview out of principle, we are a bad culture fit.

</comment></comment></comment><comment><USER6> _" no one in her right mind will penalize you for not being immediately available"_

Not deliberately, but depending on how bad they need to fill the hole, they may find someone good enough that they don't bother holding out to see if you're better...

</comment><comment><USER7> And sometimes, no matter how much you read about interviews, you will suck at it.

Interviews are hard for some people.</comment>


Making a static blog with Python Pelican - <AUTHOR> http://nafiulis.me/making-a-static-blog-with-pelican.html

<comment><USER2> I put together a blog of Pelican themes demos: [http://ptd.pronoiac.org](http://ptd.pronoiac.org)

<comment><AUTHOR> Hey! This is pretty neat, do you mind if I add this to my post?

<comment><USER2> Go for it!</comment></comment></comment>


A Crash Course in X86 Assembly for Reverse Engineers (2013) [pdf] - <AUTHOR> https://sensepost.com/blogstatic/2014/01/SensePost_crash_course_in_x86_assembly-.pdf <comment><USER2> If you're interested in learning assembly language, I recommend checking out "Programming from the Ground Up" by Jonathan Bartlett [0]. It's a great introduction to ASM and how computers work at the low level. It's also used in universities such as Princeton to teach introductory CS classes [1]. Definitely worth checking out.

[0] [http://savannah.spinellicreations.com//pgubook/ProgrammingGr...](http://savannah.spinellicreations.com//pgubook/ProgrammingGroundUp-1-0-booksize.pdf) [1] [https://discuss.fogcreek.com/joelonsoftware5/default.asp?cmd...](https://discuss.fogcreek.com/joelonsoftware5/default.asp?cmd=show&ixPost=163350&ixReplies=17)

<comment><USER3> This is great! Thanks for sharing. I have not seen this before.

</comment></comment><comment><USER4> Learning x86 directly can be a bit hard. There are easier assemblies to begin with (e.g: 8085). There's an educational program called gnusim8085, which I found excellent to get started with assembly, because while it's similar to x86, it has fewer instructions and registers. It comes with a debugger, a tutorial and some example programs. [https://gnusim8085.github.io/screenshots](https://gnusim8085.github.io/screenshots)

To learn reverse engineering look for "crackme" programs. These are programs that contain challenges for you to crack, and come with graded levels of difficulty. [https://en.wikipedia.org/wiki/Crackme](https://en.wikipedia.org/wiki/Crackme).

Now, one of the techniques that I've found more useful is the NOP sled. [https://en.wikipedia.org/wiki/NOP_slide](https://en.wikipedia.org/wiki/NOP_slide). Easy to implement as well, just replace bytes with the opcode 90 (NOP, or no operation).

The editor I use is a clone of Hiew called ht: [http://hte.sourceforge.net/screenshots.html](http://hte.sourceforge.net/screenshots.html), which is free and multiplatform (just make sure to switch to disassemble mode with F6) This other tool is free and can be a good alternative to IDA Pro on Windows: [http://x64dbg.com/](http://x64dbg.com/)

In this way you can get started for free.

<comment><USER4> Having said that, I don't know of many people that use ht editor. Make sure you change to the disasm mode (F6) and you can edit bytes using (F4). Save with F2.

You can also follow functions around rather quickly. Supports PE (Windows), ELF (*nix) and many other formats.

</comment></comment><comment><USER5> I wish for this in x86_64, I know the difference but we need to move on from 32 bit.

<comment><USER6> While amd64 is better in that it gives more registers for compilers to use, we rarely need to "move on". In fact many programs will work better (more efficient, faster) with 32bit pointers (as many programs would with 16bit integers instead of 32bit ones, where possible ofc). Realistically nobody codes for performance anymore so x86 or amd64 is not much difference (for math stuff, sse(1-4)/avx(1/2) don't care about amd64 vs x86).

Anyway, learning amd64 when knowing x86 is easy as they are mostly the same.

<comment><USER7> I've been wondering whether it would be possible to write programs that have most of their memory in 32 bits, so most pointers would be 32 bits.

Also, such program would have int as a 32 bit value unless specifically declared to be larger - we could write programs that use less memory, but still use more registers, and use 64bit pointers and values as necessary

<comment> psi-squared One of the less-well-known features of Linux is that you can do this! Theres's a thing called the "x32 ABI" (use the option -mx32 with gcc or clang; you'll need all your libraries compiled with it too) where:

* As far as the processor itself is concerned, the code runs in 64-bit mode, so you get the extra (and wider) registers from that.

* But pointers are still 32 bits, so you get the memory savings of 32-bit mode.

In principle, as long as you're using <4GiB of memory, it should be at least as fast as the best of 32-bit or 64-bit mode for any particular program. But I haven't heard of it being used much.

[https://en.wikipedia.org/wiki/X32_ABI](https://en.wikipedia.org/wiki/X32_ABI)

<comment><USER8> Like GP, I thought I had cleverly thought of this idea up myself. So glad that smarter people than I have did this up right!

<comment><USER7> The only thing missing, I guess, is 64bit 'himem' pointers.

</comment></comment></comment></comment></comment></comment><comment><USER9> If you want to learn the low level today, where do you start ? Will x86 still be relevant in a few years ? Thinking about ARM, or is it about the same ? What does computer architecture optimize for today, besides more cycles per second ?

</comment><comment><USER10> "Note that the bytes are saved in reverse order in the memory as Intel uses Little Endian representation. That means the most significant bit of every byte is the most left bit."

Haven't they got this backwards? Little Endian means the least significant bit is stored first [0].

[0] [https://www.cs.umd.edu/class/sum2003/cmsc311/Notes/Data/endi...](https://www.cs.umd.edu/class/sum2003/cmsc311/Notes/Data/endian.html)

<comment><USER11> Little endian means that the least significant _byte_ is stored first. The bits _within_ each byte are stored with the most significant first.

</comment></comment><comment><USER12> Who is this for? If you're a regular reverse engineer, won't you just pick up the Intel reference manual and flick through it? (It has a sorted instruction reference, which you'll probably find much more useful than anything categorised.) And if you're not, I'd have thought knowing an assembly language already a rather important prerequisite - seems like a very strange line of work to pick otherwise - and in that case you'd presumably do the same thing.

<comment><USER13> >won't you just pick up the Intel reference manual and flick through it?

The Intel reference manual is incredibly bloated and dry reading. Yeah, it has literally everything you would want to know. But good luck trying to understand all of it in a reasonable amount of time.

I learned x86 while studying buffer overflows in college. We used Hacking: The Art of Exploitation which walked us through most of the core concepts really well.

[https://www.amazon.com/Hacking-Art-Exploitation-Jon- Erickson...](https://www.amazon.com/Hacking-Art-Exploitation-Jon- Erickson/dp/1593271441)

</comment></comment><comment><USER14> Does anyone know something similar for arm?

<comment><USER15> The ARM System Developer's Guide is one of the best ARM books I've ever read. Has nothing to do with reverse engineering, but a great ARM reference.

If you can reverse engineering in X86, a reference for ARM ASM is all you'll need. (could get by with the official docs but this book really is something special)

You'll weep tears of joy going from X86's nightmarish instruction set to the beauty of RISC ARM!

<comment><USER16> This one? - [https://www.amazon.com/ARM-System-Developers-Guide- Architect...](https://www.amazon.com/ARM-System-Developers-Guide- Architecture/dp/1558608745)

<comment><USER15> Yep.

<comment><USER16> Great. Thank you.</comment></comment></comment></comment></comment>


Show HN: Injectopi – A set of tutorials about code injection for Windows - <AUTHOR> https://github.com/peperunas/injectopi <comment><AUTHOR> Hello guys! Let me know what do you think about these tutorials!</comment>


Ask HN: What is the best way for a developer to get better at design? - <AUTHOR> I became kind of okay at designing websites just from experience, applying common sense, and using good software a lot, but now I want to take my skills to the next level. What is the best way I can improve, without making it my primary occupation?<p>Can you recommend some learning resources or share good advice? <comment><USER2> The two resources I recommend are The Designer of Everyday Things ([https://www.amazon.com/Design-Everyday-Things-Donald- Norman/...](https://www.amazon.com/Design-Everyday-Things-Donald- Norman/dp/1452654123)) and Designing Interactions ([https://www.amazon.com/Designing-Interactions-Press-Bill- Mog...](https://www.amazon.com/Designing-Interactions-Press-Bill- Moggridge/dp/0262134748/ref=sr_1_1?s=books&ie=UTF8&qid=1502753508&sr=1-1&keywords=designing+interactions))

Both focus on more than website design, but they helped me understand how users interact with my user interfaces. I'm sure there are also a ton of great blog posts out there too, but I found these books the most helpful.

</comment><comment><USER3> This book about typography has helped me a lot. When designing a new site I always begin with the text (but I mostly make pages where the text is the interesting thing) and having the text nailed down makes it so much easier to "see" how the rest of the page should look.

[http://practicaltypography.com/](http://practicaltypography.com/)</comment>


Automatic Photography with Google Clips - <AUTHOR> https://ai.googleblog.com/2018/05/automatic-photography-with-google-clips.html <comment><USER2> Seeing Google's approach to quantifying life's special moments in this blog post brings out the luddite in me.

When we had our first child every moment we captured felt special.

It was awe inspiring to watch our little human encounter and respond to the world.

The big ones like the first step, the first word, the first laugh.

And the smaller ones like encounters with new friends, grandparents, first time at the beach, etc.

After we had our second it was strange to see the similar reactions.

And we realized how many of these milestone responses were innate. And predictable.

It wasn't necessarily less endearing but a little less magical as parents.

Google's approach is spot on.

And it makes me sad that life's "special moments" aren't just predictable, they're inherently quantifiable by very basic AI.

As we barrel towards an AI enabled future it's going to be bittersweet to unwravel & index the human experience.

<comment><USER3> I don't really get the point you're making. The AI isn't aware of parental concerns, preferences or human behaviour specific to childhood activity. It's evaluating "interestingness" visually, after someone chooses to put the camera in front of an already interesting active area such as kids playing.

The AI is not waking up and saying to itself, "initiate full power mode immediately because I detect _children_ playing in an interesting manner".

While I love new photo gadgets, the 3 hour battery life is a little disappointing. I do like the general idea though, although what were they thinking not adding a microphone?

Incidentally, I wonder what machine learning would take from reading your post. Would it conclude that one sentence per paragraph is a good thing worth replicating? I hope not!

<comment><USER4> That's the problem when most laypersons (including many in tech) talk about AI. It adds noise to what machine learning actually is today, and makes it hard to argue about the ethics of it when most people don't know how to frame the problem.

</comment></comment></comment><comment><USER5> Google PHB: How can be bring in more data from the real world that we can analyze, categorize, and monetize?

Google dev: Photos are our most powerful data gathering tool.

Google marketing: People go lots of places and do lots of things that they don't photograph. How do we fix that?

Google PHB: We need to make it so they never ever stop taking pictures for us.

Google marketing: We'll make an app called "Clips" and tell them it's to make their lives better, while it takes pictures of all kinds of things around them that they didn't intend for anyone to see!

Google PHB: And we'll market it as "AI" because people will fall for anything if you call it "AI" or "Machine Learning."

Google management: Great idea! Raises all around! Except for the dev. Just throw another squeaky toy in his playpen. He'll think it's a bonus.

<comment><USER6> I know you meant it as a joke, but deep inside I feel there might be some truth to it.

</comment></comment><comment><USER7> I have one of these. It's neat, but the low frame rate for video makes the clips themselves look choppy and genrallly subpar compared to phone video. The "editorial" choices the camera makes are usually pretty great, though, erring on the side of conservative even at the higher settings.

<comment><USER3> I guess they're targeting the shareable gfycat style of clip. Silent, looping, eye-catching. I agree I'd prefer better framerate. I'd also prefer a mic. It's a shame that "privacy" may have been a factor in omitting the mic, when it should be a choice for the user.

What's the minimum focus distance? They don't say on their tech specs page.

</comment></comment><comment><USER8> If I understand it right, the best use-case would be a party or event where I could place the Clips camera pointed at the center/stage. The camera would record for 3 hours and then at the end I could sync it with my phone to get the best clips.

I can imagine having 3-4 of these 'Pick me up and point me at something interesting' cameras for guests at a wedding. Instead of a human having to filter through hours and hours of video, wedding photographers could offer a set of cameras for $100/hour and then use the clips to make a short video with the most interesting clips.

<comment><USER9> Yes, but it only captures short motion pictures with no audio.

<comment><USER10> As anyone who's been near a film set will tell you, capturing good quality audio in a busy environment is virtually impossible. You'll _never_ get good sound using today's technology in a form like Clips, so that it doesn't really matter that it doesn't record it. Just dub some music or commentary over the top later.

<comment><USER3> Tell that to the billions of people already happily capturing video with sound on their phones. Considering playback is often a phone speaker, it's not like people require "film set" quality audio recordings. They just want to hear audio from the recorded location, no matter how rough. In saying that, I understand the Google Clips position with no audio, but I'd likely skip it because of this.

<comment><USER6> Well, you can always add the audio manually from the original clip. If it marks the timestamps, this could be done by a simple mp4box script.

<comment><USER3> The Google Clips camera does not have a mic, there is no audio in the original clip.

</comment></comment></comment></comment></comment></comment><comment><USER11> I've thought for a while that the right thing, given bulletproof privacy controls anyway, was a wearable camera that just captures 24/7 video/audio with retrospective analysis for significance.

I don't know of anyone I'd trust with such a stream, though. It would have to be on device, as they say.

<comment><USER12> but if it is only on device, (the video) then it is easily possible to get the device damaged, lost, broken, robbed in order to stop that retrospective analysis by a bad actor.

<comment><USER11> My goal is not "preventing bad things", but rather "remembering interesting things".

</comment></comment></comment><comment><USER13> I wonder why it works only with the Pixels, iPhones and the Galaxy 7 and 8. Is there some special hardware in those phones that any other phone doesn't have?

<comment><USER14> Likely Bluetooth 5 if I had to guess. Much higher bandwidth

<comment><USER15> Tech specs say it requires wi-fi direct and Bluetooth le. The latter is part of Bluetooth 4 spec. The tech specs also say it requires Android 7.0; nothing of specific phones (or iPhones)

<comment><USER16> From the store page [1]:

"""

Compatible Android devices: Google Pixel, Google Pixel XL, Google Pixel 2, Google Pixel 2 XL, Samsung Galaxy S7, Samsung Galaxy S8.

Compatible iOS devices: iPhone 6, iPhone 6 Plus, iPhone 6s, iPhone 6s Plus, iPhone 7, iPhone 7 Plus, iPhone 8, iPhone 8 Plus, iPhone X.

"""

And the support page [2]:

"""

Google Clips™ currently supports the following Android devices running Android 7.0 Nougat and above:

Pixel and Pixel XL

Pixel 2 and Pixel 2 XL

Samsung Galaxy S7

Samsung Galaxy S8

Google Clips currently supports the following iOS devices running iOS 11 and above:

iPhone 6 and iPhone 6 Plus

iPhone 6s and iPhone 6s Plus

iPhone 7 and iPhone 7 Plus

iPhone 8 and iPhone 8 Plus

iPhone X

"""

[1] [https://store.google.com/us/product/google_clips_specs?hl=en...](https://store.google.com/us/product/google_clips_specs?hl=en- US)

[2] [https://support.google.com/googleclips/answer/7545354?hl=en&...](https://support.google.com/googleclips/answer/7545354?hl=en&ref_topic=7334536)

<comment><USER15> Annoyingly the tech specs part of that page says it requires Android 7.0, then the requirements page says something different.

</comment></comment></comment></comment></comment><comment><USER17> Am I the only one who thinks the advertised pictures on the site look awful? Low focal length, high aperture, no artistic look and feel at all. Why would I want such low quality looking pictures? With such images it seems to be more a device for scientific purposes than for capturing valuable moments of my life I want to frame and hang in my kitchen.

<comment><USER18> How do they compare with the typical smartphone camera picture? That's what they're aiming for here. Building an automated DSLR would raise both the price and the ML difficulty substantially.

Given your stated preferences, I am going to guess that you are not the target market for this. People who post on Facebook or order photo books from Shutterfly are.

<comment><USER17> The images advertised look worse than those of mid-range smartphone cameras. Compare those images with images of e.g. an iphone se and you will see that the focal length of google clip distorts people to a level of ridicule.

Do you think there is a market for this camera? Because I really think there is not: Extra gadget, needs to be setup anyways and, above all, poor image quality (see advertised images), not en par with mid range smartphones.

Let's wait for next year to see if that product worked.

</comment></comment></comment><comment><USER19> it's so weird that they are selling a camera but doesn't list resolution in tech spec but pixel density.

also for that price, one buy 3 raspberry pi with camera achieving same function

<comment><USER3> I agree their spec page is missing some specs.

Resolution appears to be 1080 x 1080 - after downloading the clip on their page. I assume this is max resolution but who knows.

One of the example videos is actually 30 fps, they must have bumped up the framerate before publishing for some reason, or maybe the app does this by default... [https://mannequin.storage.googleapis.com/austin- overview/sma...](https://mannequin.storage.googleapis.com/austin- overview/smart/video3.mp4)</comment></comment>


Why Apple has stopped making small phones–and why it should start again - <AUTHOR> https://arstechnica.com/?p=1668946 <comment><USER2> I don't so much mind the size of the iPhone 8 / new SE. But a phone that size with slippery curved edges isn't great. I imagine they kept the curved design for 2 reasons:

• The new SE fits cases made for the iPhon 8, which is good for customers and good for case makers

• The iPhone 12 is rumored to have squared-off edges, like the iPad Pro. If this is the case, they wouldn't want to have the same new design in both their low-end phone and their high-end phone. They want the premier devices to stand out visually.

</comment><comment><USER3> Remember when everyone was saying Apple was doomed because it didn't make big phones?</comment>


Ask HN: Anyone in Boston Interested in Teaming Up for Daily Fantasy Sports? - <AUTHOR> I figured I'd give this a try. I'm currently a casual player but my background in analytics-based marketing wants me to take a more systemic approach to DFS and perhaps pursue it more seriously. I'm of the opinion that there's still some low hanging fruit in the industry.  I'm looking for someone a little more mathematically inclined who lives near to me in the Boston area; if you're really motivated, I assume we can also make this work from other locations.<p>Anyway, I'm willing to bankroll this. I think it could be fun and educational. Perhaps we could make some money along the way as well. Let me know if you're interested and mention just a little of your background that would make you a good partner. <comment><USER2> I'm on the west coast and I'm an expert (Ph.D + Ivy postdoc) in mathematics. I've played a little bit recently and my feeling is that the low hanging fruit has been largely harvested - Large variations and playing against mostly experts means it's very hard to beat the 10% rake, without doing a lot of time-consuming tweaking. I'm more interested in doing this for the challenge and to test some data science tools in a tangible way (Kaggle gives a different kind of feedback)

mwfd541 at gmail</comment>


Ask HN: Is there any marketplace(Buy/Sell) for Research Work? - <AUTHOR>

Any market place for buy or sell research works?
I spent great amount of time researching about CAPTCHAs, published Research Paper through IEEE but as an author we don't get a single Penny.
I thought to Open Source the project, If I could raise some grant or funds. <comment><USER2> There are a few academics on elance offering for-hire research (i.e. actual research, not just paper writing). But very little market movement. Grants/funding is probably a completely different story.

</comment><comment><AUTHOR> I was wondering if some one can sell their Research work to some big organization? Is it possible today?</comment>


Ask HN: How to tell whether a query is a subset of another - <AUTHOR> http://home.wangjianshuo.com/cn/20100505_ccceeieeaece.htm Subject
Please write an algorithm to determine if a query expression is a subset of another.
a little bit more explaining:
Take the SQL statement, for example, if the query A is
age> 21
Query B is
age> 20
We know that the result of A is a subset of that of B. Those who meet the condition A will also  satisfy B. I need an algorithm that given any two expressions will tell this relationship.
code example: if ($ queryA-> isSubSet ($ queryB)) (echo ("A is subset of B");)
For simplicity, consider only simple AND, OR logical operations, greater than, equal to, less than comparisons.
This is one situation our less than 10 people technical team typically encountered . For example: to cope with more searches querying huge data that distributed in multiple cities on multiple servers. System administrators can use the data frequency and other patterns to set up several different databases (MySQL's, and Solr's). Thus, when a new item arrived, we can decide, which db to put it.
Then when a given query is a subset of another corresponding to a previously configured db, we can just check that one. This allows us to easily configure dozens of data sets, without changing a single line of code. <comment><AUTHOR> translated to English by Google with some revision

Subject: Please write an algorithm to determine if a query expression is a subset of another.

a little bit more explaining:

Take the SQL statement, for example, if the query A is age> 21 & Query B is age> 20

We know that, the result of A is a subset of that of B. Those who meet the condition A will also satisfy B. I need an algorithm that given any two expressions will tell this relationship.

code example: if ($ queryA-> isSubSet ($ queryB)) (echo ("A is subset of B");)

For simplicity, consider only simple AND, OR logical operations, greater than, equal to, less than comparisons.

This is one situation our less than 10 people technical team typically encountered . For example: to cope with more search querying on huge data that distributed on dozens of servers in multiple cities. System administrators can use the data frequency and other patterns to set up several different databases (MySQL's, and Solr's). Thus, when a new item arrived, we can decide, which db to put it.

And when a given query is a subset of another corresponding to a previously configured db, we can just check that one. This allows us to easily configure dozens of data sets, without changing a single line of code.</comment>


Rsync.net beating S3 for petabyte pricing - <AUTHOR> http://www.rsync.net/products/petabyte.html

<comment><USER2> Your claims seem inconsistent across the site. On the page you linked to it says _" Payment can be made monthly, but a two year contract is required."_ but then on the CEO page, it says _" There are no contracts, overages, fees, or license charges at rsync.net."_ \-- so am I missing something?

<comment><USER3> I'd guess there is no contract for "standard" prices (up to 10 TB: [http://www.rsync.net/products/pricing.html](http://www.rsync.net/products/pricing.html)) but then if you want more and go into the petabyte scale, arrangements have to be made.

It's also interesting to see that rsync.net pricing is higher for "standard" scales and can compete with S3 only when in the PB scale.</comment></comment>


Google Translate API is now deprecated. - <AUTHOR> http://code.google.com/apis/language/translate/overview.html

<comment><USER2> Wow, that is unexpected. I can think of a lot of developer tools that use google translate to give a rough first translate. Things like Wordpress and web framework plugins. It seems like they should have just dropped a fee structure on top of it and that would eliminate abuse.

If any developers out there are looking for a new API to target, you could consider mygengo. It's not free (because it isn't machine translation), but they do have developer tools and an API available: <http://mygengo.com/services/api/>

<comment><AUTHOR> Full disclosure: I currently work with myGengo.

That said, we definitely welcome developers to our services. I just wanted to take a second to note this for any Python developers interested in our services, though - if you don't like the supplied Python library (I didn't), I wrote a new more concise and documented version. It's easier to follow and extend, and has some functions to help with encoding/decoding characters.

We're considering adopting this as the main Python library in the near future. Always interested in input from other developers!

<https://github.com/ryanmcgrath/pygengo>

</comment></comment><comment><USER3> All I can say is give Micorsoft a try: <http://www.microsofttranslator.com/dev/>

<comment><USER4> Thanks for the hot tip. And now here's my python wrapper for the Microsoft Translate API (bing) -- <https://github.com/s29/mstranslate>

No limits, seemingly comparable translation quality. The API was a bit annoying, but hey no surprise there. Thanks Microsoft!

</comment></comment><comment><USER5> A little more discussion on Google APIs being killed at <http://news.ycombinator.com/item?id=2589635>

</comment><comment><USER6> It's interesting that the reason for this is 'extensive abuse', does anyone know if it is talking about the 'translate party' websites that translate back and forth in rapid succession.

<comment><USER7> That seems unlikely - there aren't too many, they don't make that many calls, and Google could just shut them down.

I think <http://news.ycombinator.com/item?id=2590551> (andymurd) presents a more likely explanation:

> I think the "abuse" they are referring to is the common practise among > blackhats of using Google Translate to spin stolen content to make it > unique. Translating English -> $LANGUAGE -> English makes for a cheap, low > grade article rewriter.

</comment></comment><comment><USER8> here is my comment on the google code blogpost [http://googlecode.blogspot.com/2011/05/spring-cleaning- for-s...](http://googlecode.blogspot.com/2011/05/spring-cleaning-for-some-of- our-apis.html?showComment=1306481143396#c3564212561169948866)

i recommend posting your disappointment there, too - as google obviously does not care about developers anymore (and so does also not care about hacker news discussions)

</comment><comment><USER9> This is a bit of a slap in the face -- could they not rate limit the service and charge for it?

</comment><comment><USER10> At least one developer is very upset about Google Translate API change: [http://groups.google.com/group/google-ajax-search- api/browse...](http://groups.google.com/group/google-ajax-search- api/browse_thread/thread/da649803321d338d?hl=en)

</comment><comment><USER11> Wow, this sucks. One of the reasons I historically haven't been worried about Google and some of the "evils" that people argue they are guilty of, is because they provide awesome APIs for developers free of charge and with next to no rate-limiting or authentication.

This is a slippery slope for Google. Why should I build applications on top of their products, if I know that the API can be ripped out from under me?

</comment><comment><USER12> Recent developments in the 'Google Platform' front (new App Engine price structure, API shutdowns, crippled Google Apps Standard offering, etc) severely dented my belief on a "full cloud" future. Perhaps we shouldn't outsource (== depend) too much to cloud vendors.

</comment><comment><USER13> Darnit Google. Can't you keep any API running for more than 2 years? Just take a hint from AWS and sell them!</comment>


Any good alternatives to Google app for work? - <AUTHOR> https://apps.google.com/intx/en_ie/pricing.html <comment><USER2> Rackspace offers email hosting for $2/user/month if you're not looking for the other features from Google. [https://www.rackspace.com/en-us/email- hosting](https://www.rackspace.com/en-us/email-hosting)

</comment><comment><AUTHOR> My emails are managed with google app for work, however I feel it's expensive any other options ?

</comment><comment><USER3> I just started using Zoho Mail a few weeks ago. So far so good.

</comment><comment><USER4> I like Fastmail as an email provider.

Other than that I like Skype and Office 365.</comment>


Circular Data Structures in Haskell - <AUTHOR> http://haskell.org/wikisnapshot/TyingTheKnot.html

<comment><AUTHOR> It took me a while to understand how he built the doubly linked list. Here's my explanation.

You want to build a function which takes two doubly linked lists (DLList) and some values and inserts the values in between the lists and returns the starting and ending nodes of the new DDList. Call the function go.

      go leftDLList values rightDLList -> (start, stop)

Now start and stop will end up being the original boundaries: RightDLList will be the DLList node which contains the first inserted element, and leftDLList will contain the last inserted element. Thus when we run out of elements to insert, just return the starting and stopping nodes. In Haskell:

go startingN [] stoppingN = (stoppingN, startingN)

If we haven't run out of values, then we simply build a new DLList node for the first value, and recurse with the new node as the first node.

      go prev (x:xs) next = (this, last)
        where this = DLNode prev x rest
              (rest, last) = go this xs next

That's it! now we just call go with starting and ending nodes which we haven't defined.

      (first, last) = go last (x:xs) first

Because Haskell is lazy, it doesn't try to evaluate last and first until it needs to. The recursive call to go will bind first to (DLNode last x rest). Last will be bound when the base case definition of go is called. By that time go is called with a real DLNode as it's first argument.</comment>


Read the email the whole Xbox team at Microsoft just received about sexism - <AUTHOR> http://www.theverge.com/2016/3/18/11264930/xbox-gdc-2016-sexist-event-response?utm_campaign=theverge&utm_content=chorus&utm_medium=social&utm_source=twitter <comment><USER2> yada yada yada, fire someone or I don't believe you.</comment>


The iPad Game That Took 9 Years to Finish, a Masterpiece - <AUTHOR> https://www.wired.com/2012/07/the-act-ios-game <comment><AUTHOR> I remembered this game and decided to play again after years. The sound is not working, so I wondered what happened to the company behind. Unfortunately, it is shutdown and the game was actually pulled from the store [1]. I can still download and play it on the latest iOS, but it is a pity that other people can't.

[1] [https://www.crunchbase.com/organization/react- entertainment#...](https://www.crunchbase.com/organization/react- entertainment#/entity)

</comment><comment><USER2> Needs a [2012] in the title.

Does anybody know how to play the game today?</comment>


Boston Dynamics' Spot Robot Dog Goes on Sale - <AUTHOR> https://spectrum.ieee.org/automaton/robotics/industrial-robots/boston-dynamics-spot-robot-dog-goes-on-sale <comment><USER2> If someone wants some nasty wild scrub woods to run one of these through, holler at me. I'll even let the real hounds run with it.</comment>


Googling for "conway's game of life" gives a simulation in the results page - <AUTHOR> https://www.google.com/search?q=conways+game+of+life <comment><USER2> Here's the interview I published with the creator! [http://www.readwriteweb.com/archives/how-a-google- engineer-b...](http://www.readwriteweb.com/archives/how-a-google-engineer- built-a-universe-in-an-easter-egg.php)

<comment><USER3> > So I made a demo and started showing my co-workers what it was and realized > that some of them had never seen the Game of Life before.

So let me get this straight, there are Google software engineers, that passed all the 3 month interview process which some considered the toughest in the world, and they never have heard of conway's game of life.

this makes me feel a little better about myself now.

<comment><USER4> I find it interesting that your metric of smart is whether or not someone has knowledge of the Game of Life.

<comment> brown9-2 The comment makes no mention of the word "smart", just that Google's interview process is long and hard.

<comment><USER5> It's hinted at by saying that the author feels better about himself now (implied superiority). Whether the particular trait that he feels superior about is "smart" is left up to your imagination!

I heard about the game of life, but I couldn't tell you the rules or describe it exactly. I never bothered to look into it. Judge away!

<comment><USER6> My interpretation would be that he saw Google-employees as omniscient demigods, and now has a more realistic view.

</comment></comment></comment></comment></comment></comment><comment><USER7> There appears to be a semi-persistent "Google" text - when I cleared out the 'G' it was recreated within 20 steps by the neighbouring 'o'. Can't possibly be organic can it?

E: it seems to always appear like that; so probably not organic and I'm not up for searching minified sources to verify.

<comment><USER8> It always appears like that because he's written it so that when the "Google" cells are active, they appear darker than normal active cells. Whether these cells get activated or not follow the normal rules of Conway's game of live. So yeah, it's organic, but with a little trickery, the "Google" stands out as the pixels in the area blink on and off.

You can confirm this by pausing the simulation and clicking on all the cells in the region to switch them to the 'active' state: <http://imageshack.us/a/img138/2751/71405409.png>

<comment><USER9> It appears that there is some sort of spawning behavior near the darkened "Google" tiles. I paused, turned off all the cells in the region (taking into account wrapping from the other side) and let it go. Cells started activating near the 'e'.

<comment><USER8> I can confirm this. I wiped all tiles and stepped ahead a hundred frames, but nothing new appeared. As soon as I hit 'play' though, within a dozen or so frames a few random tiles appeared in the vicinity and the area was soon teeming with life again.

</comment></comment></comment></comment><comment><USER10> Added to my list, thanks.

<http://www.pixelbeat.org/misc/google_search_easter_eggs.html>

<comment><USER11> Search "number of horns on a unicorn", it gives a google calculator result of 1.

<comment><USER12> It's basically an alias for 1.

[https://www.google.com/search?q=number+of+horns+on+a+unicorn...](https://www.google.com/search?q=number+of+horns+on+a+unicorn+%2F+2)

I know there are a ton more phrases that work as calculator aliases, but I can't think of any off the top of my head.

</comment></comment></comment><comment><USER3> Predicting the next HN front page article in the near future: "Show HN: weekend project - open source Google's conway's game of life"

<comment><USER13> "Do you still want to be writing Game of Life easter aggs when you're 50?"

<comment><USER14> And the rebuttal, "Yes, I want to be writing Game of Life easter eggs"

</comment></comment></comment><comment><USER15> What is it with all the Game of Life posts lately? There seems to be a new one every other day. Not that it's a bad thing, I think the GOL is a marvellous thing and the SmoothLife video was mesmerizing. I'm just wondering why they all pop up at the same time?

<comment><USER3> I'm sure there is a "game of life" like biological algorithm that can explain this and the flow of articles in the form of "X in GO" or "Don't use MongoDB" or "Y in pure CSS"

e.g. perhaps people see what's top on HN (a legitimate article) and search on the topic, and increase the probability of more posts in that topic, also, psychologically, if A is popular, then when seeing something that looks like A you might up vote it just by assuming it's popular too.

<comment><USER16> A Game of Life type visualization of this algorithm would be interesting. It might go something like:

      The seed of the system is a random cluster of N stories (cells)
      that represent the "front page".

      Each cell has votes and topics (Erlang, Apple, X in CSS, etc.).

      1. Any cell with fewer than N votes,
         and fewer than two neighbors dies
         (due to lack of interest and/or promotion).

      2. Any cell with two or three live neighbors,
         lives on to the next generation
         (riding along the front page wave).

      3. Any cell with more than three live neighbors,
         that share the same topic dies
         (due to overexposure of the topic).

      4. Any dead cell with exactly three live neighbors,
         becomes a live cell with a topic shared by one of the neighbors
         (the spread of interest of a topic).

      After any generation, votes and stories can be added.

      The low threshold of votes (N), is determined to be
      some percentage of all votes in the system.

Tempted to make this for fun now...

</comment></comment></comment><comment><USER17> Is it my imagination or does it spell out google at some point?

edit: I've realized that certain blocks are darker blue in the shape of the word Google.

</comment><comment><AUTHOR> It's funny. I simply Googled for 'conway's game of life' after reading all the posts here and was pleasantly surprised to find this nice easter egg. I submitted it, and now it has been #1 for the past couple of hours :)

</comment><comment><USER18> I've implemented Langton's Ant, another example of cellular automata, using canvas aswell <http://alecraeside.com.au/projects/langtons-ant/>

</comment><comment><USER19> First the knowledge graph, now the game of life animation.

It really seems Google is trying to be more and more like Wolfram|Alpha!

:)

<comment><USER12> I just checked Wolfram Alpha and couldn't find the Javascript animation of game of life. Could you link me to how you did it?

<comment><USER19> Every time you do a query on W|A you see a brief animation of the game of life while the result is loading. I was referring to that.

(and my comment was meant tongue in cheek)

</comment></comment></comment><comment><USER20> I want this as a live-tile background for my phone. Beautiful

</comment><comment><USER21> I am in Malaysia and it doesn't show up in FF or Chrome.

</comment><comment><USER22> Cool! A glider crawled all the way across my browser.

</comment><comment> mck- just spent 10 minutes staring at it full-screen.. beautiful.. my wife looked at my twinkly eyes and asked befuddled: "what is this?"

How would you explain it?

<comment><USER23> Ha, my daughter asked the same question, so I tried explaining all 4 rules, but she didn't seem to be very impressed. So I quickly googled, found this <http://www.bitstorm.org/gameoflife/> among the top result, and we went through all 4 rules, experimenting. That was a lot more interesting, especially when she found out about the 'objects'... :) So the page is bookmarked now :)

<comment> mck- Hehe, yeah, I tried explaining too, with all my passion, she just stared at me and said: "I have a nerdy husband" -_-'

I'll give it another shot with that link, perhaps tomorrow :)

</comment></comment></comment><comment><USER24> What a reminiscent moment :)

</comment><comment><USER25> not for me

<comment><USER26> If you are on a big screen, it might not be obvious. It's in the upper right and it's very subtle.

<comment><USER27> Very, very subtle. I had to adjust the angle of the screen

<comment><USER28> It might be worth recalibrating your screen. This page ff. is a good start: <http://www.lagom.nl/lcd-test/contrast.php>

<comment><USER29> It might also be dependent on the angle at which one is viewing the LCD -- on my laptop at work, I often cannot distinguish some of the lighter shades, as I have the screen at a glare-reducing angle.</comment></comment></comment></comment></comment>


Why Feedburner is trouble  - <AUTHOR> http://www.scripting.com/stories/2007/07/21/whyFeedburnerIsTrouble.html

<comment><USER2> It's trivial to move off Feedburner. If Google does anything stupid the whole blogging world will freak and move en mass. I think Winer is frustrated at not having an open alternative to suggest, so he's reduced to fear mongering.

</comment><comment><USER3> That's perhaps the most useless and poorly thought out argument I've ever read about anything. I found a anti-evolution propoganda pamphlet in an airport a week ago that was more cogent.

</comment><comment><USER4> Kind of loses the punch when you butcher it -- it's "DOS isn't done till Lotus won't run".

<comment><USER5> Well, it's an urban legend in any case:

[http://www.proudlyserving.com/archives/2005/08/dos_aint_done...](http://www.proudlyserving.com/archives/2005/08/dos_aint_done_t.html)</comment></comment>