Terraforming 1Password - <AUTHOR> https://blog.agilebits.com/2018/01/25/terraforming-1password/ <comment><USER3> Great post. It's always good to see more examples of people putting these tools to work.

With that said, I consider getting the AMI id dynamically to be an anti- pattern which undermines the principles of infrastructure-as-code. Specifically, it introduces an implicit build variable "time of `terraform apply`", which is not tracked in version control. Happily, because of Terraform's design, this sort of thing mostly won't cause your infrastructure to drift into unexpected states (e.g. production instance 1 running AMI X and production instance 2 running AMI Y). Within an environment, things should be consistent, but your staging environment may run AMI X while production is running AMI Y, and you wouldn't know from looking at your Terraform definitions.

I previously wrote about similar ideas in the context of pinning dependency versions, where wildcards can and often do get you into bad states. [https://jonathan.bergknoff.com/journal/always-pin-your- versi...](https://jonathan.bergknoff.com/journal/always-pin-your-versions)

<comment><USER4> Interesting point. Here is the counter-argument.

With a Continuous Delivery Tool Like Go-CD (Not Continuous Integration) - <USER2> solve this problem with connected pipelines (value-streams.)

In this case - the ami-id is resolved dynamically, but the particular version comes from the pipeline, is entirely repeatable and traceable (and dare I say - immutable).

The scenario being that the first pipeline builds the ami, then stores the ami ID as a value/variable/text-file that is then passed on to the terraform apply pipeline. You can repeat the terraform apply with the same ami-id. You can run a new ami build, get a new terraform apply with the ami from that build.

With respect sir - I believe there is room for more nuance in your claim that 'dynamic ami-ids in terraform are an anti-pattern' \- this is a solveable problem. This has been solved.

<comment><USER5> We just store the AMI in a terraform file itself, and update it as needed. I mean, if you are already updating a text file, might as well update a a text file called ami.tf with the new AMI ID and store that in source control as part of the build process. This ensures that the terraform plan is an easy to read source of truth for what is supposed to be up in production.

</comment></comment></comment><comment><USER6> The code comparison between CloudFormation's abysmal JSON formatting and Terraform's DSL is a bit disingenuous.

CloudFormation has supported YAML for at least a year or two now, and it's leagues more readable and compact, not to mention maintainable—you can even add comments to your code with YAML (something that is impossible with the old JSON format).

I've spent a lot of time working between the two, and while Terraform does have a lot to offer and is often a very valid option, CloudFormation has its virtues, especially the fact that almost all bleeding edge AWS features are first available to be managed via CloudFormation (sometimes with weeks or months of lead time), and many bugs can be more readily ironed out with AWS support (assuming you have it).

Again, not saying don't use Terraform, just that I don't think the decision is quite as black and white as this blog post seems to make it.

<comment><USER7> Personally I find YAML for cloudformation worse than JSON because of the whitespacing requirements. JSON isn't much better mind, especially once your template reaches to hundreds of lines with nested objects.

Recently I've come around to using Troposphere [1] to write cloudformation templates, it's actually very pleasant to use. You just write your infrastructure in python, and it will generate you a template at the end. The developers seem to respond quickly to changes AWS make to the CF templating language too.

[1] [https://github.com/cloudtools/troposphere](https://github.com/cloudtools/troposphere)

<comment><USER8> I'm sorry, what? You don't like YAML because it uses whitespace as a delimiter instead of curly braces? That is probably the least important feature that YAML adds for CF templates.

YAML, despite its warts, is _much_ more readable and maintainable for CF templates than JSON, particularly when you are doing non-trivial things and need to use a lot of intrinsic functions and string manipulation. Or you want to put comments in your template.

I've worked on huge JSON and huge YAML CF templates (I'm talking templates that are thousands of lines long--in YAML). YAML is without a doubt easier to maintain.

I can't recommend any CF libraries for generating templates either, unless you want to wait around for new CloudFormation features to be implemented or suffer from half-broken existing implementations (or waste time hunting down bugs and submitting patches). _Sometimes_ it makes sense to use a template engine like Jinja or ERB. But I'd stay away from libraries that generate CF templates--they're mired with missing edge cases and they're mostly an unnecessary dependency.

<comment><USER9> One supports inline comments, the other doesn't. That should be enough for anyone to choose one over the other.

</comment></comment></comment></comment><comment><USER10> Side note, for anyone wondering like I was, the visualization tool is Cloudcraft: [https://cloudcraft.co/](https://cloudcraft.co/) . I'd love to have something similar for doing isometric views of any kind of diagramming.

<comment><USER11> I am not sure I get the point of making it (fake-)3D. Except for all text to be diagonal and me having to tilt my head to read it, and cute pseudo-3D pictures of variously formed boxes, I don't see any advantage. It's still essentially 2D - there's no third dimension I could usefully explore - it's just presented in a visually cute but informationally cluttering way. Is there any advantage to this form of presentation?

<comment><USER12> It's funny, I came to the comments to specifically complain about that graphic. There are significant disadvantages to the isometric view for that data, and absolutely no advantage that I can see, other than it looks pretty if you're not trying to get information out of it.

I think that Tufte needs to make a resurgence with this generation of designers.

<comment><USER13> Take it up with BeOS? :D

<comment><USER12> Hah, I think _icons_ are the place isometric views work really well, actually! Lots of room for highly differentiated objects with an isometric view. However, text and interconnections and maps are really not great at these isometric angles. And I _do_ really like the icons used in the figure in the original post, just not the whole.

</comment></comment></comment></comment></comment><comment><USER14> Here I am wishing that CloudFormation had one killer feature that would have allowed us to use it at work: the ability to adopt existing resources into a CF stack. When we were starting on the path of "hey maybe all our infra shouldn't be pointy clicky", we chose between CloudFormation, Terraform, and making something in-house. Out of those three, Terraform was the clear winner for us at the time, but it has not been without issues.

Nobody else in this whole thread seems to be complaining about state management. I think it's insane that Terraform encodes where a given resource is in your filesystem / module hierarchy into the state JSON structure. (Unless something has changed since I last looked,) if you want to move things around in your .tf source, terraform can only apply that by tearing down the old resource and recreating it.

For our large setup, in order to adopt Terraform, we've had to spend a ton of time upfront thinking very hard about how all of our .tf sources are going to look, and it's delayed our deployment by months.

<comment><USER15> Terraform allows you to make modifications to the state file yourself, both with terraform commands like terraform state mv, or manually if you're brave enough to edit the JSON. It requires confidence in using the tool, of course. But it also encourages you to create your cloud resources in a way where it's safe to let Terraform destroy and re-create most of it at any time.

<comment><USER16> `terraform state mv` is indeed the trick. It took me a while to understand it, but this blog post helped. [1] It leads you through refactoring some resources into a module.

The key takeaway for me was "we really only need to consider the nodes that map to the physical resources of our infrastructure when we are planning our state surgery. This means we can ignore all of the nodes that correspond to data sources, variables, and providers."

So after a refactor, this is what I do now: (1) run plan to get the names of everything terraform wants to delete and recreate; (2) pair all the resource nodes manually and translate them to state mv commands; (3) re-run plan and verify that terraform is now convinced there is nothing to do.

It would be nice if terraform could do this for me, of course, but I find that it is generally possible to avoid delete and recreate if all I've done is a refactoring.

[1] [https://ryaneschinger.com/blog/terraform-state- move/](https://ryaneschinger.com/blog/terraform-state-move/)

</comment></comment></comment><comment><USER17> Their AWS bill seems like it would be a lot higher than it needs to be. They're spinning up always-on staging, testing and development environments in 3 different regions. I know they've got autoscaling configured, so their production environment should be significantly larger than the others, but it still should be possible to be much more economical while accomplishing all of those non-production workloads.

The whole point of infrastructure-as-code should be the ability to spin up environments on-demand, do work, and then spin down. There's no reason to spin up an always-on shared development environment when developers can easily spin up their own environment when they need to do testing and kill it when they're done. Most development tasks can be tested in a single AZ, let alone region. Similarly, QA shouldn't need an always-on, 3-region setup.

<comment><USER18> You are right. Our AWS bill could certainly be lower and we will have to start optimizing it at some point.

It is does require extra time/effort though. We deployed 1password.ca and 1password.eu just a few months ago and never really got to that.

The only thing we "optimize" at the moment is the smaller number and size of EC2 instances in non-production environments.

<comment><USER17> FWIW, I wasn't trying to be critical. Or, at least, I was trying to be constructively critical. Getting to a Terraform setup is an excellent start...lots of companies can't get that far. I guess I'd just encourage you to view it as the beginning of a longer process that allows you to take full advantage of the fact that AWS bills by the hour and lets you launch as much infrastructure as you want.

Always-on non-production environments are, to my mind, a vestige of the time where you had physical servers that needed to be provisioned by a person and cost roughly the same amount when switched off. Or at least the time where OPS built and maintained each AWS VM by hand. On-demand just offers so much more flexibility...stuff like the example from my response to a sibling comment-- you should be able to type a single command and spin up an environment from a pull request any time a code reviewer wants to do testing to ensure that what code looks like it does is what it actually does.

The more you can leverage the work you've done to get to where you are, the more you can drive down your AWS costs while giving greater flexibility and isolation to your non-prod workload.

</comment></comment></comment><comment><USER19> I use CloudFormation to manage similar AWS web-app infrastructure. I've been continuously evaluating Terraform over the years (it is indeed maturing quickly), but have still decided to stick with CloudFormation for now, and would still continue to recommend the same for anyone managing an AWS- exclusive (or mostly-AWS) deployment.

To respond to some specific items mentioned in this post:

\- "Terraform has a more straightforward and powerful language (HCL) that makes it easier to write and review code."

It's easy to pipe configuration through your favorite 'straightforward and powerful' templating language of choice to generate the stack template used by CloudFormation. I definitely wouldn't use CloudFormation at all without an extra preprocessing step of some sort.

\- "Terraform has another gem of a feature that we rely on: terraform plan. It allows us to visualize the changes that will happen to the environment without performing them."

CloudFormation has a similar feature called "Change Sets" (released in March 2016).

Finally, two more things to note:

\- CloudFormation supports "Custom Resources", which allow you to write Lambda-function scripts to perform any custom operation you want (e.g., interact with third-party APIs, or support new AWS resources that don't yet have an official CloudFormation resource implementation). There's not as extensive a library of providers Terraform supports, but you can often find open-source providers to fill the gaps on AWS resource until an official implementation is released. And if not, you can just write a quick and dirty implementation yourself. Terraform supports a similar feature in "Custom Providers", but they are Go-only as opposed to the various supports Lambda- language runtimes.

\- CloudFormation and all official AWS-resource implementations not only have excellent public documentation but are officially supported by AWS Support, which is a big deal if you're deploying something with any degree of complexity or cost/risk.

As for Terraform's strengths: its extensive set of resource providers beyond AWS ecosystem can't be beat. Also, it has great support for mapping existing infrastructure resources, which is a feature still sorely lacking in CloudFormation. (I'm surprised the author of this post didn't take advantage of this for their migration to avoid downtime!)

<comment><USER20> Could you share what preprocessors/templating languages you've used with CloudFormation?

<comment><USER21> At JUXT we use Clojure's EDN, bolstered with some tag literals courtesy of our Aero library (described here: [https://juxt.pro/blog/posts/aero.html](https://juxt.pro/blog/posts/aero.html)). We use ClojureScript to compile to TF's JSON. EDN allows comments, ignores commas and otherwise is a nicer JSON. Aero allows us to encode multiple environments in a single document, and include ciphertext for secrets. We're pretty happy with the overall result.

</comment></comment></comment><comment><USER22> I've always wondered — from a security perspective, is this kind of an in- depth engineering blogpost a good idea? You're basically handing a map of your internal infrastructure to any potential attacker who reads the blog.

Of course obscurity is not security blah blah blah. Still I can't help feeling that writeups like this could backfire down the line.

<comment><USER23> The internal infrastructure of AWS apps are fairly guessable anyway. There are only a limited number of AWS resources and they fit together in predictable ways, VPC - Gateway - ASG - EC2 etc etc.

I think it's really great that they've talked about this, it's quite rare to hear about these kinds of internal migrations, and it's something I do a lot with clients but it's not really glamorous enough to talk about.

<comment><USER24> Hi vr46, where should I go / what resources should I consult if I want to start learning more about AWS & setting up infrastructure? Thanks!

<comment><USER25> Forgive the self promotion but I'm building a subscription video site - [http://stackleap.com/](http://stackleap.com/) \- to teach people how to build and deploy to AWS infrastructure.

The difference between StackLeap and sites like acloud.guru is that I'm focussing on the day to day stuff rather than high level concepts you need to know to pass the certification exams.

I'm hoping to launch a beta in the next few weeks.

<comment><USER26> I've been very impressed with CloudAcademy - it seems to issue AWS accounts per course/per lab - it guides you through the steps and check whether you completed them by checking the AWS account, and then tears it down at the end.

You might not be ready for that level of integration, but see if you can get a demo or trial.

</comment></comment></comment></comment></comment><comment><USER27> Interesting blog post, but AgileBits should have communicated planned downtime to their customers via email, which they did not. I've been a 1Password user for years and recently switched to their hosted offering. I know a massive infrastructure migration is rare, but that's all the more reason to be transparent ahead of time.

<comment><USER18> I am sorry if the downtime affected you in any way.

Sending several million emails could be a challenge considering that most of our customers depend on 1Password apps and usually not affected by the downtime.

We do have a status page and Twitter feed where we make announcements:

[https://status.1password.com](https://status.1password.com)

[https://twitter.com/1passwordstatus](https://twitter.com/1passwordstatus)

<comment><USER28> Have you considered building a notification system into the app?

</comment></comment></comment><comment><USER29> If you want to try out Terraform yourself for a simple Web server/DB Server/Load balancer infrastructure, I made a tutorial for just that here: [https://simonfredsted.com/1459](https://simonfredsted.com/1459)

</comment><comment><USER30> If you are using vim for terraform, then you should try this [https://github.com/juliosueiras/vim-terraform- completion](https://github.com/juliosueiras/vim-terraform-completion), hoping to migrate to langserver by this year so any editor can use it

P.S. sorry for the self-promo

</comment><comment><USER31> Awesome post! Always happy to see more committed infrastructure. We made this move a while back and were really happy with the results. Check out Packer for AMI builds and you're all set.

One suggestion re: TF files is to keep each service in a separate TF file/state and keep all your state files on S3 that way if someone does an apply it's always consistent. Keeping things separated means that you don't have to worry about hitting other services when you do an apply

</comment><comment><USER32> There is a Terraforming github project which exports existing Amazon EC2 infrastructure and creates Terraform infrastructure tf code and tfstate. Terraforming github repo does not seem to be related to 1password.

Terraforming github repo [https://github.com/dtan4/terraforming](https://github.com/dtan4/terraforming) [http://terraforming.dtan4.net/](http://terraforming.dtan4.net/)

</comment><comment><USER33> Wow, I found it fascinating to read such a detailed description of the architecture of a running business! Is anyone else aware of similar blog posts from other companies?

<comment><USER34> I've found [http://highscalability.com/](http://highscalability.com/) & [https://stackshare.io/featured-posts](https://stackshare.io/featured-posts) to be really useful. I constantly refer to these at work for design inspiration.

</comment></comment><comment><USER35> Terraform manages infrastructure; if you also want to manage the installed software in a declarative and reproducible way consider NixOps (based on Nix/ NixOS): [http://container-solutions.com/step-towards-future- configura...](http://container-solutions.com/step-towards-future- configuration-infrastructure-management-nix/)

</comment><comment><USER36> > servers will be down for the next few hours. We are recreating our entire > environment to replace AWS CloudFormation with @HashiCorp Terraform.

One of the greatest strengths of terraform (vs say, cloudformation) is that you can adopt existing resources, and ZERO downtime is needed to migrate.

Why take downtime?

<comment><USER37> Because we needed to re-deploy our database, which unfortunately requires downtime.

</comment></comment><comment><USER38> With infrastructure in multiple regions, do you have independent Aurora databases running in each region? Do you have any data synchronising between regions or are they running completely independently?

<comment><USER37> They are completely independent, that was the goal.

</comment></comment><comment><USER39> What are your thoughts on using modules inside terraform ?

<comment><USER40> Not the op, but I have some brief thoughts.

Given a bit of time with Terraform, the need for modules becomes obvious as you identify common resources for the infrastructure you're modeling. I thought writing modules first was the "right way," but starting with modules ended up being a waste.

<comment><USER41> I'll second this. I started out not using modules, but figured I'd migrate things over to using them as and when it would make things tidier. I never migrated things.

Modules are really neat but I don't think they're a sensible starting point if you're not doing a lot of repetition or don't exactly know what you need to build yet.

</comment></comment></comment><comment><USER42> I find that both terraform and cloudformation have their pros and cons like many things in life. It comes down to personal preference and how you think (vim/Emacs?).

For me, I choose cfndsl to build my cloudformation templates. This gives me the ability to actually write code. JSON, YAML, HCL aren't full languages. Yes tf and cf try to provide language like concepts (iteration, etc) but really at the end of the day they are just a definition of your environment and not strictly code.

Note: I maintain cfndsl, so I'm totally bias.

</comment><comment><USER38> One major drawback of Cloudformation is its inability to view changesets of nested templates.

</comment><comment><USER43> Two of my least favorite technology. I have been using pass for a while and will never go back

</comment><comment><USER44> would've been easier to just migrate to k8s and used some kind of ignition/managed k8s (and maybe ansible, if things still needs some manual tweaking).

<comment><USER45> I'm really interested in migrating some of our own systems/services to k8s and I'd love if you could elaborate a bit. How do IAM resouces or VPC subnets etc map to k8s concepts?

<comment><USER46> You can use IAM to auth to a cluster using heptio authenticator [https://github.com/heptio/authenticator/blob/master/README.m...](https://github.com/heptio/authenticator/blob/master/README.md)

You can grant IAM roles to individual pods running in k8s using kube2iam, though there are new advancements seemingly coming, or already out, now that amazon has announced eks. [https://github.com/jtblin/kube2iam](https://github.com/jtblin/kube2iam)

Kops can provision and manage a cluster that incorporates multiple subnets allowing you to have a multi-az buildout [https://github.com/kubernetes/kops/blob/master/docs/high_ava...](https://github.com/kubernetes/kops/blob/master/docs/high_availability.md)

</comment></comment></comment><comment><USER47> Wait. People are discussing and giving accolades how marvelous it is that a company is migrating infrastructure to a favor of the month because it is using a flavor of some other month tools when the company has the audacity to say they would be down for _hours_?

Are you kidding?

<comment><USER40> I don't think there is any shortage of literature on the need to avoid vendor lock-in. Selecting a cloud agnostic tool like those developed by Hashicorp and the opensource community offers the folks at 1Password additional flexibility in their choice of cloud providers. AWS is great, but still...

I don't see any mention of Terraform Enterprise here, either. I imagine they're perfectly capable of pursuing Terraform with the foss version, although the enterprise complement has some pretty great additional features.

<comment><USER47> It is possible I was not clear:

The blog post is patting itself on a back for migration that caused downtime.

It included this gem:

> Couldn't you've imported all online resources? Just > wondering.

> That is certainly possible, and it would have allowed us

> to avoid downtime. Unfortunately, it also

> requires manual mapping of all existing resources.

> Because of that, it's hard to test, and the chance of a

> human error is high – and we know humans are pretty bad

> at this. As a wise person on Twitter said: "If you can't

> rebuild it, you can't rebuild it". _</comment></comment></comment>


Ask: Ghost or Wordpress? - <AUTHOR>

I curate under different blogs mentioned, I want to curate at all them 1 single place, as a single blog, with well-displayed feeds with metadata loading up well.<p>Can you guys please help me make an informed decision - whether to go with Ghost or whether to go with Wordpress ? <comment><USER2> Well. As usual. There is no right answer for highly opinionated question.

I'm usually keen on choosing the right tool for the right job.

So here is a follow up questions that might lead you into the right direction ?

1\. What do you like more : NodeJS or PHP?

2\. Do you need specific functionality?

3\. Can you modify source code on your own or you will need developers to help you out ?

4\. Do you need a custom made template?

5\. Do you have a budget and you want to outsource or you just want to do it yourself?

6\. Are you familiar with any of those platforms?

<comment><AUTHOR> 1\. My developer is ROR guy but can work on both PHP and NodeJs 2\. Only Blogging + newsletters 3\. I would need a developer 4\. If i could i would use it, 5\. Well I am paying my developer to get this done. I do not want to pay to any of these sites, i'll be using freemium version 6\. Nope

<comment><USER2> Choose wordpress. Developers are cheaper and it's more popular. Probably you can do more in less time.

</comment></comment></comment><comment><USER3> Go with Wordpress. I used Ghost for my blog for a little over a year (started using it immediately after it was first released) and, despite it being a solid blog engine, it's very limiting if you want to do anything other than that.

Ghost does not yet have plugin support, so adding social meta data to your blog is much less intuitive than if you were to use something like WP's 'Yoast SEO plugin'. The Ghost team has made some great improvements that have resolved the woes of manually entering meta attributes to your posts, but Yoast's SEO plugin is still taking the lead with optimizing your page for sharing/SEO.

I had several woes when I used Ghost. At one point, I decided that I wanted to make a static splash page as my root page '(mysite).com', with a 'blog' button that takes you to the blog section at '(mysite.com)/blog' Turns out it's impossible to do this on Ghost. It would have to be implemented on Apache.

Next, I wanted to make a separate page to showcase my artwork. I was thinking of making a nice gallery page. The best way to do it with Ghost would be making a new blog post, setting it to be a static page, then embedding the pictures manually with Markdown. I _could_ have made a photo gallery with Javascript and tucked it under the Markdown, but it just felt unnecessarily hacky and I didn't want to deal with it. It would have been nice to just have a simple out-of-the-box feature plugin that would do that for me.

Wordpress is a massive, well-seasoned Goliath, and Ghost is the smaller, younger David. Like I said, Ghost is great for what it is: a blog engine. But if you want to add anything else to your blog and maybe make it work more like a website, you'll have to either write up your own theme for it or crawl under the code to tweak it around to your taste.

When I moved to Wordpress, I imported my posts, added a picture gallery, splash page, fully customized everything and it took just a few hours and it looked great. It was such a sigh of relief.

<comment><AUTHOR> You had used it before a year? Bu there is a chance, many features which would have been changed during this time period?

<comment><USER3> I started using it shortly after the official release in the Fall/Winter of 2013 and used it until about a month ago when I moved to Wordpress.

<comment><AUTHOR> Thanks

</comment></comment></comment></comment><comment><USER4> if you don't care about cool technology (nothing against Ghost), I will say it is hard to beat wordpress in terms of blogging. It literally is so simple to get started and even manage. In your case, you could look into setting up a Wordpress Multi-site network and quickly manage all the blogs from one dashboard.

</comment><comment><USER5> Shameless plug: check out valme.io - we just added custom domains with SSL support yesterday [1]

[1] [https://valme.io/c/gettingstarted/69qqs/valme-io-now-with- cu...](https://valme.io/c/gettingstarted/69qqs/valme-io-now-with-custom- domains-including-sslhttps-support-and-a-bunch-of-other-improvements-while-we- were-in-the-code-take-that-wordpress-and-tumblr)

</comment><comment><USER6> It might not be your primary concern but I found Ghost's performance to be much better than Wordpress': [http://www.anmolsarma.in/lazy-performance- comparison-of-word...](http://www.anmolsarma.in/lazy-performance-comparison- of-wordpress-and-ghost/)

</comment><comment><USER7> All the stuff you need to reply to this question:

[http://www.elegantthemes.com/blog/resources/wordpress-vs- gho...](http://www.elegantthemes.com/blog/resources/wordpress-vs-ghost)

<comment><AUTHOR> Thanks. But it is year old post. Many features in Ghost may have been updated by this time.

</comment></comment><comment><USER8> If you only want to aggregate content you might want to use planetplanet (www.planetplanet.org)

</comment><comment><USER9> I'm just going to leave this here... [http://www.cvedetails.com/product/4096/Wordpress- Wordpress.h...](http://www.cvedetails.com/product/4096/Wordpress- Wordpress.html?vendor_id=2337)</comment>


Ask HN: Best React Courses/ Books 2018? - <AUTHOR> I've resisted jumping on the React bandwagon but I can't do it any longer, every client wants React these days. What are your best suggestions for books or courses that I can use to get up to speed very quickly? <comment><USER2> For books, I recommend

\- Full Stack React ( [https://www.fullstackreact.com/](https://www.fullstackreact.com/) )

\- Robin Wieruch's "The Road to Learn React" ( [https://roadtoreact.com/](https://roadtoreact.com/) )

\- Dave Ceddia's "Pure React" ( [https://daveceddia.com/pure- react/](https://daveceddia.com/pure-react/) )

Beyond that, see these additional resources:

\- My suggested approach for getting started with React: [http://blog.isquaredsoftware.com/2017/12/blogged-answers- lea...](http://blog.isquaredsoftware.com/2017/12/blogged-answers-learn-react/)

\- My React/Redux links list, which contains links to many tutorials and articles on React concepts and use cases: [https://github.com/markerikson/react-redux- links](https://github.com/markerikson/react-redux-links)

\- The Reactiflux chat channels on Discord, which are a great place to ask questions and learn: [https://reactiflux.com](https://reactiflux.com)</comment>


Join WorldVentures - <AUTHOR> •Name / URL: WorldVentures / http://mbullard.worldventures.biz/ (Sign up is at the bottom)<p>•Explainer Video: http://vacationsooner.com/video/membership_rep_short/english<p>•More details: My business is in the early stages. Currently looking for 5 IBO's to come to the company to start building with.<p>•Are you looking for anything?: Absolutely looking to bring in IBO's to WorldVentures. Their background does not have to be in Travel Tourism to be successful.<p>•Discount for /r/startup subscribers?:(18-25 year olds get automatic discount on website) :)<p>Weather you are looking to take advantage of our amazing business opportunity, or be a customer, the deal still stands. <comment><AUTHOR> If you have any questions please feel free to email me at firstname.lastname@example.com</comment>


Airbnb Redesign – What works and what doesn't? - <AUTHOR> https://medium.com/p/872f7aa024a3

<comment><AUTHOR> A redesign that works mostly! Check out my initial thoughts on it. Thanks

</comment><comment><AUTHOR> Comments / feedback / questions appreciated</comment>


Elite colleges are making it easy for conservatives to dislike them - <AUTHOR> https://www.washingtonpost.com/amphtml/opinions/elite-colleges-are-making-it-easy-for-conservatives-to-dislike-them/2017/11/30/0d2ef31a-d52a-11e7-a986-d0a9770d9a3e_story.html <comment><USER2> Just as an anecdote, met a recent state school grad who said he arrived on campus as a dyed-in-the-wool liberal, tried to get into campus activism, and his fellow activists and teachers scared him so much that he's now not sure where he stands politically.

Obviously I can't verify this, but for example he had a professor who actively taught that nations are a completely artificial social construct, and as such all immigration policies of any sort are illegitimate and harmful.

France was brought up as a particular example. Also, this view point was not up for classroom debate -- you would get a bad grade if you deviated from this in homework essays.

I think true liberalism is not just having a general set of 'progressive' values, but also being open to dissenting opinions and facing them honestly and openly. That doesn't mean agreeing with those opinions, but it does mean being exposed to them and debating them.

What we see on campuses today doesn't sound like liberalism to me, but a reactionary movement that aims to protect an orthodoxy composed of generally liberal viewpoints not by engaging in debate, but by preemptively shaming and denouncing anyone who disagrees.

Even if you believe liberal viewpoints are generally correct, nobody has a total monopoly on Truth.

<comment><USER3> > nations are a completely artificial social construct

But if nations aren't simply social constructs, what are they? Is it the word "artificial" that is so surprising?

Maybe I have more fringe beliefs than I thought I did.

<comment><USER4> > if nations aren't simply social constructs, what are they?

A Schelling point for coordinated actions by large groups of people, organized around ethnic, cultural, and/or linguistic grounds?

<comment><USER3> Had to look up "Schelling point", so apologies if I'm not fully grasping what you mean by it.

However, "organized around ethnic, cultural, and/or linguistic grounds" seems like another way of saying "social construct".

If you were to compare and contrast what you suggest with a social construct how would they be different?

<comment><USER4> Too often I see people argue "X is a social construct" as a way of arguing that X "doesn't exist", or that people who believe in it have a kind of false consciousness.

I'm trying to show why people believe in it. Yes, it's a social construct; but that doesn't mean it's worthless - "money" is also a social construct: it only has value because other people think it has value.

The nation appears to be the largest stable unit of organization humans are capable of, at present at least. The history of the world has shown that Empires don't last too long these days.

</comment></comment></comment></comment></comment><comment><USER5> I'm in the UK, working at a university and I'm going to say, the conservatives do have something of a point, although they greatly exaggerate it.

Before the Brexit vote, I found it would offend many academics to even discuss that the vote might pass, and people might have legitimate greviences that would make them vote for Brexit.

Now, I'm personally against Brexit, but i think the main reason it passed was the "liberal elite" refused to even discuss with the people who wanted Brexit, so they they turned to the likes of UKIP, who would talk to them about the problems (and then lie to them, which is how we ended up in this Brexit mess).

</comment><comment><USER6> As the American right-wing moves further right and further way from participating in consensus reality, it should be no surprise they are increasingly less welcome in spaces dedicated to the pursuit of knowledge.

If you reject not only the politics of your opponents, but the value of fact itself, why should they listen to or accommodate you?

[https://www.vox.com/policy-and- politics/2017/11/2/16588964/a...](https://www.vox.com/policy-and- politics/2017/11/2/16588964/america-epistemic-crisis)

<comment><USER7> Perhaps it is the American right-wing moving further right, but I am more inclined to believe the American left is moving farther left: [https://www.theatlantic.com/magazine/archive/2016/01/why- ame...](https://www.theatlantic.com/magazine/archive/2016/01/why-america-is- moving-left/419112/)

Take for example this speech by Bill Clinton in 1995: [https://www.c-span.org/video/?c4654597/bill-clinton- illegal-...](https://www.c-span.org/video/?c4654597/bill-clinton-illegal- immigration): "That's why our administration has moved aggressively to secure our borders more by hiring a record number of new border guards, by deporting twice as many criminal aliens as ever before, by cracking down on illegal hiring, by barring welfare benefits to illegal aliens."

To think that this was a speech by a Democrat president about 20 years ago is unfathomable to the left today.

<comment><USER8> In the 90s, the Democrats were trying to enact a single-payer health care system, and the Republican response to it was similar to what we now know as the ACA. Now, the Democrats fight for the Republican plan and the Republicans want to do away with it altogether.

Democrats in the late 60s wanted a national gun registry and ban handguns for anyone who can't demonstrate a need, with household self-protection not considered sufficient need. Any existing guns that didn't qualify would be confiscated. Republicans only wanted to ban things like assault weapons, ownership by felons, and carrying loaded weapons in public. Now, Democrats struggle to ban assault weapons, and Republicans oppose almost all forms of gun control.

FDR enacted a top marginal income tax rate of 94%. Republicans wanted taxes reduced, after the war, to a level that would pay for postwar government spending. Now, the top marginal income tax rate is 39.6%, with Democrats proposing little tweaks like increasing it a bit or increasing the payroll tax cap, and Republicans wanting to slash tax rates (I saw one the other day saying that we should aim for 1-2%) and not caring in the least about the increased deficits this would bring.

Seems to me that the American left is moving sharply right, to the point where the Democratic Party would be considered centrist or mildly right-wing by most standards, while the American right is _also_ moving sharply right and is teetering on the precipice of going all-in on racist nationalism.

<comment><USER9> > Republicans only wanted to ban things like assault weapons, ownership by > felons, and carrying loaded weapons in public.

Citation needed.

<comment><USER8> Check out the Gun Control Act of 1968 which was greatly shaped by the NRA (cut down from a stricter version, but they were OK with banning gun ownership by felons), the Mulford Act which prohibited carrying loaded weapons in public in California and passed with bipartisan support (signed into law by none other than Ronald Reagan), and the 1994 Federal Assault Weapons ban (which didn't have Republican support in Congress but did have support from both Reagan and Gerald Ford).

</comment></comment></comment></comment></comment><comment><USER10> I think the article makes good points about some craziness on college campuses, particularly regarding actions restricting freedom of speech, but to use that as a justification to hurt seemingly left tilted institutions is a weak argument.

This kind of justification doesn't help the already partisan environment and further encourages tribalism and defence of bad ideas.

The optics of the article makes it looks like "we don't like you, so we're going to hit you where it hurts", something that the constitution seeks to prevent(re: "tyranny of majority").

Freedom of speech suppression isn't exclusively a left problem as can be seen in the link below, I'd agree that it's more of a left problem than right: [https://www.thefire.org/resources/disinvitation- database/](https://www.thefire.org/resources/disinvitation-database/)

What we need is more debate not less, and taxing endownments isn't going to help that, I'm, not sure what will though either, people seemingly don't want to debate anymore.

</comment><comment><USER11> I agree that the folks on "one side" get crazy at times, but without their presence to provide an anchor, the other is unrestricted and just as willing to go off the deep end.

</comment><comment><USER12> I thought we were going to stay away from politics on hacker news. especially becuase of the liberal bias in the community and the mods.

</comment><comment><USER13> > to tax large university endowments and make other tax and spending changes > that might adversely affect universities

Why shouldn't major universities pay their fair share to help society? Most of these elite universities literally pocket billions of dollars at the end of the fiscal year. Major universities have essentially evolved into corporations.

<comment><USER14> Not sure why you're being downvoted, this is absolutely the case. Just look at the exploding expenditure on "administration" rather than education at these universities.

Universities exploit ridiculous student loan programs to make indentured servants out of their customers.

<comment><USER15> It's being downvoted because a sentence like this: "Most of these elite universities literally pocket billions of dollars at the end of the fiscal year" is so vague that it's hard to tell what exactly he meas.

<comment><USER16> I'd imagine he's discussing the endowments of said universities, which are earning billions of dollars a year</comment></comment></comment></comment>


Don't Forget: You Can Use Amazon SimpleDB For Free - <AUTHOR> http://aws.typepad.com/aws/2009/10/dont-forget-you-can-use-amazon-simpledb-for-free.html

<comment><USER2> I've had a descent amount of experience with SimpleDb and unfortunately I don't find it as good as what Amazon makes it out to be. The name "Simple" defines the service very well.

There are too many limitations which makes SimpleDb almost impossible to use for complex data storage. A few examples of annoying limitations:

1\. SimpleDb is a Key to list value pair storage engine (e.g. Key = Name, Values = [John, George, Ringo, Paul]). Seems good but you can only have 256 values per record.

2\. Each value is limited to 1024 characters (512 for double byte)

3\. Where clauses of "select" statements are ordered by their ascii values. Makes things relatively complex numeric values. Here's some suggestions from amazon when working with numerical values.

[http://docs.amazonwebservices.com/AmazonSimpleDB/2007-11-07/...](http://docs.amazonwebservices.com/AmazonSimpleDB/2007-11-07/DeveloperGuide/index.html?NumericalData.html)

and floating points are especially annoying:

[http://stackoverflow.com/questions/691778/best-way-to- format...](http://stackoverflow.com/questions/691778/best-way-to-format- single-double-values-as-strings-for-simpledb)

Bottom line, my take is if you want to use SimpleDb for simple data storage, it's a wonderful service and relatively cost effective. If you're data is or will become complex then it's not the service for you. I'd look into Google App Engine for a robust and "free" service.

<comment><USER3> What you said is very true, and a good summary of shortcomings, but I'd like to note a real benefit it affords you despite these drawbacks.

While 3. is a pain-point in many systems, the fact that you _can_ do selects with where clauses on a key-value store that scales horizontally is impressive. The indexing they do can be very helpful in certain implementations.

<comment><USER4> 10 GB per domain isn't a hell of a lot of scaling.

<comment><USER3> True, it's no Cassandra :)

Anyway I think 10gb per domain is reasonable for many people, but it is another limit of the store that could cause problems. Fortunately Amazon knows the boundaries of SDB, so it can put these in place and help inform decisions about using it for, say, a project that will need more than 10gb per domain, or more than 100 domains.

</comment></comment></comment></comment><comment><USER5> Has anyone had experience utilizing memcached with SimpleDB? Were there issues?

In terms of price, after the free quota is surpassed, does SimpleDB make sense for relatively small sites? i.e. sites with fewer than 200k uniques / month

<comment><USER3> If you don't throw too much traffic at it you will be fine using it as a memcached alternative, but you will probably notice the overhead of an HTTP transaction. It largely depends on what you are doing.

It seems like you are referring to using it as a cache only, and on those terms, it really depends on your traffic profile. Chances are, though, with 200k uniques you would be pleased. If you are running in EC2, the bandwidth is free, so you only pay for computation. That can keep things pretty inexpensive.

</comment></comment><comment><USER6> 100Hectares.com is a global online resource specializing in bringing together consumers and relevant companies in all areas of the Property industry, allowing them to apply directly for their products and services through the site. Whether via traffic referral or direct application on our site we bring the right customers to our clients, in turn helping our users find the best deals and most appropriate services for their requirements.

100Hectares.com displays listings to cover the full range of Property needs, from buying, selling and renting to decorating, building; moving and financing, 100Hectares.com is an exhaustive resource for the entire Home and Garden industry. 100Hectares.com nice market position and expertise in Internet transactions, enables it to attract the highest level of relevant users looking for products and services in property sector. Providing a cutting-edge Internet matching and information service that brings together the best companies and the most informed consumers, 100Hectares.com is one of the best site serving an exclusive community, aiming to bring specialist, high quality companies together with Indian consumers in the most user friendly and efficient interaction possible. At our core is a team of professionals that value its clients, and our strong commitment to customer privacy is a key element of our success amongst users. 100Hectares.com has a strong and successful relationship with some of the top companies and suppliers in its relevant areas. This allows us to make thousands of quality offers available to the tens of thousands of relevant visitors every month.

<comment><USER6> Evergreen Real State in NCR - A Good and Faithful Investment option Delhi's posh localities command massive prices. Since, many families are living in these areas for many years and considering the high worth the properties in this area has nobody really wants to part with the owned houses. Hence, the number of properties on sale in these areas is very few. Owing to high demand and fewer supplies the prices of properties in these areas are sky- high...According to Delhi real estate brokers, residential property in any of the areas in 100 Hectares affordable cost and it further varies depending upon the location and unit area. Do you want to have your own property in a prime location of India and which must be away from the hassles of metropolitan cities? If yes, then you are most welcome to purchase properties in NCR city. If you are keen to invest in properties in NCR, then you can search 100 Hectares world class builders, constructors, promoters, real estate agents and brokers for availing you the ultimate real estate solution and best property deals at affordable rate. If you are looking for faithful hand to turn your property buying and selling dreams into reality in said region then put faith in 100hectares Real estate in Delhi & NCR, India. From integrated housing projects to commercial projects to corporate parks, the 100 Hectares has ventured into the various facets of real estate and property management. Delivering high quality and standards, projects undertaken by the group are changing the face of the national capital region (NCR). Already, NCR is beginning to boast of world class, comfortable, state-of-the-art construction. Considering the fast pace of international quality construction projects underway in this region, NCR will soon be able to compete with the best of residential and commercial complexes in the world. And, 100 Hectares a major player in the construction business for the many years is one of the constructions firms responsible for giving an innovative touch to its projects. A wide range of residential property is - <http://www.100hectares.com-> found in this area and it has caught the attention of real estate dealers in recent times. Flats and apartments are in great demand here because it has now become a very commercial area. These properties are either available for sale or can be rented out on a monthly basis. The other advantages of staying in this locality are: there is a very good drainage system and there is absolutely no scarcity of water and electricity. Therefore, the three most important requirements of any house owner or tenant are easily met.

</comment></comment><comment><USER7> That's a pretty substantial service to offer for free and it seems you can access it from Javascript too. I wonder if it would violate their terms of service to write an application where each user had their own Simple DB account?

<comment><AUTHOR> This would be perfectly acceptable, come on in!

You would have to ask each new user to create an AWS account (also free) and then enter their credentials (public key and private key). If you are building a browser-based app you need to protect the credentials from prying eyes/code.

<comment><USER8> > If you are building a browser-based app you need to protect the credentials > from prying eyes/code.

Isn't this the problem that oauth is intended to solve?

<comment><USER9> But having web users bring their own database is not the problem that AWS is trying to solve.

</comment></comment></comment></comment><comment><USER7> Could this be used as an alternative to the AWS Message Queue?

[Edit] Now that I am having a little coffee, I realize that you would have difficulty knowing what the keys are to the queued messages. I guess you could use a set of known keys, and cycle through them looking for messages, but why be a cheapskate.

</comment><comment><USER10> Can you upload files to SimpleDB and use it as a free alternative to Amazon S3? I imagine not but I'm curious anyway.

<comment><USER3> The only way to achieve this would be to shard the file across multiple entries. The limit per is 1k, so I doubt it would fit your needs. There is also a hard limit of 1gb per domain, which is not difficult to run up against if you treat it as a more generic data store.

<comment><USER10> It figures - I wouldn't expect them to canabalize S3. Thanks for the details though.

</comment></comment></comment><comment><USER11> ___if_ __you are already paying for AWS, correct?

<comment><USER3> AWS products are pay as you go, so I'm not sure what you mean by that. This will be free until you cross the limit.</comment></comment>


A fundamental distinction between management styles: Theories X and Y - <AUTHOR> http://www.economist.com/business/management/displayStory.cfm?source=hptextfeature&story_id=12370445 <comment><USER2> Of course, there's also Theory Z, which is (you guessed it) somewhere in the middle: <http://en.wikipedia.org/wiki/Theory_Z></comment>


JSON as a Universal DB Model DSL - <AUTHOR> http://pathdependent.com/2009/12/30/json-as-a-universal-db-model-dsl/

<comment><USER2> Well, apart from the fact that your "proposal" is incomplete and obviously not thought-through in the slightest (to put it politely) we also already have a canonical way to represent relational database schemas; <http://en.wikipedia.org/wiki/Data_Definition_Language>

Moreover the problem with database schemas has never been to represent them or reflect on them, but to migrate between them.

See <http://www.post-facto.org/> for an interesting approach (presentation by the author: <http://hosting3.epresence.tv/fosslc/1/watch/128.aspx>).

<comment><USER3> If I remember correctly, SQLite parses the DDL for tables and indexes each time the database file is opened. I always thought this was kind of weird, and felt a binary representation would be more appropriate, but when you consider that DDL exists to describe the schema, it makes perfect sense. There's no need for another representation, and parsing the DDL is more future-proof as features are added.

</comment></comment><comment><USER4> I like the following better:

        column name | generalized type | validation rule         | hidden?
        </comment><comment></comment><comment></comment><comment></comment><comment></comment><comment></comment><comment></comment><comment></comment><comment></comment><comment></comment><comment></comment><comment>
        first_name  | text             | name_regex              | false
        last_name   | text             | name_regex              | false
        middle_name | text             | name_regex              | false
        birth_date  | date             | over_18                 | false
        location    | [double,double]  | undefined               | true
        addresses   |                  | has_many                | false

Parsing it into JSON-equivalent is a programming exercise you can give your interviewees.

(my point is that data format doesn't matter - JSON, YAML, XML, |'s and -'s are just different "colors" giving semantic meaning to your data: but it's what you can do with that data which is important)

</comment><comment><USER4> Changing the data format to JSON isn't the solution to most problems involving DB models. Providing a group of operations on that data is: diffs, negation- diffs, and composition of diffs.

</comment><comment><USER5> Wait, so the author says we should design our own schema definition DSL, write some JSON that uses that DSL to define a database schema, and implement whatever transformations are required to generate a working migration from that DSL?

How is that lazy?

<comment><AUTHOR> The author (me) is being lazy by not writing this. I am outsourcing (hopefully) the implementation of an idea.

Also, the transformation into a db schema is only one alleged benefit.

E.G.

      class User < ActiveRecord::Base
        json_def 'user_model.json'
      end

      display_form(@obj)

      etc

<comment><USER5> I hope you take this as constructive criticism (and not me just being a jerk :), but I see a couple of problems:

1) JSON gives no benefit over a Ruby DSL (like ActiveRecord migrations). Is the schema file going to be consumed by client programs written in other languages? (Even so, in that case, you should probably just define ActiveRecord::Base.to_json_schema). Two languages are unnecessary when one will suffice.

2) When you start to define the schema in code[ft. 1], rather than in the database itself, you're leaving the Active Record pattern (as defined in PoEAA) and should probably look at other patterns (and the libraries that implement them). Data Mapper/DataMapper would probably be a good fit here.

Also, you're loosing the benefits that migrations give of dealing with changes to the schema over time non-destructively. Dr Nic's Sexy Migrations did something that would diff a single schema file with the existing DB schema, but this is not the default solution.

3) Automatically generating forms from a model has tempted many Rails developers over the years. A rudimentary method would be possible using the existing reflection data (i.e. no need for a JSON schema DSL) and some added metadata. Google "rails admin ui" for some examples.

However, "metadata" can easily turn into "writing forms in the model instead of the view" (I've seen it happen). That's why I'd avoid this.

Also any forms more advanced than a simple create/edit interface and you're probably going to end up writing a partial anyway, especially if you need to add markup for formatting (e.g. how do you control if the generated form vertically or horizontally oriented? Meant to go in a table with others or independent?).

ft. 1: Rails' Migrations are a special case. They should be a seen as a separate system from the ORM that was created later on to manage the complexity of changing schema. ActiveRecord classes still define their fields based on reflection from the database.

</comment></comment></comment><comment><USER6> This is what he actually wants: <http://www.lukas- renggli.ch/smalltalk/magritte>

</comment><comment><USER7> Should change the title to begin with "I want..."</comment>


Ask HN: lawyer needed for unpaid invoice (NYC) - <AUTHOR> Currently I'm looking at an unpaid invoice, for close to $10K, for a successfully completed freelancing gig at a certain very well-known interactive agency in NYC.  By "successfully completed" I mean there's no dispute here about the work being unfinished, late or not up to spec -- actually my work was very well received, the vibe with the team was quite good overall.
Which is why I'm quite dumbfounded by what's happened since then.  The promised payment date for the first leg of the project came and went two weeks ago, and they simply aren't communicating in any helpful way as to when (if ever) they intend to make good on it.  They won't even respond to requests for partial payment.  In the first week I got a couple of tepid apologies, and promises to call or write the next day with an update (no one did).  In the second week (last week), dead silence.
Compounding all of this is that I suffered a major financial disaster back in March (details won't fit in this post), which left me completely bottomed-out, cash-wise.  This April-May gig was supposed to be my "rebound", but I haven't yet received a dime of the promised compensation. Having gone down this road before, it's getting close to the time to hire to a lawyer, preferably a posh and menacing-sounding one, to at least write a Demand of Payment letter.  So what I would like would be a recommendation for someone who might feel inclined to work with me for a promise of future payment.  I can see the first letter costing $200-$250 or so, and hopefully one and only one letter will be required.
The lawyer doesn't have to be local (to NYC) but that might help of course.
Hopefully someone will respond soon -- my situation really is quite dire at the moment.  So I'd like to get the process moving by the end of the week, if possible.
I can be contacted at needthatcheck at yahoo.com. <comment><USER2> Wait wait wait wait wait wait wait. Hold up a second. Read 'philiphodgen and 'patio11's comments, but then wait a second.

Two weeks is not a long time to wait for a receivable. I'm sorry to tell you this, and I may get downvoted for pointing it out because HN doesn't like to hear it, but companies can be slow to pay invoices.

We've waited months before!

You should be aware that if you escalate your demands, it might take _longer_ to get paid. It's possible that you are at this moment stuck in some kind of payables limbo, especially if you're dealing with a sizable agency. The accounts payable people at the agency can get you out of that limbo. But if you sue, resolution of your dispute will involve legal, and legal is slower than accounting.

Can you tell us more about the situation you're in? Not why you need the money, but what kind of firm is it that owes you the money? If it's a reasonably big company, the odds of them actually intending to screw you are low; the risk/reward just isn't there. But maybe they're a smaller firm than you made it sound to me.

<comment><USER3> 'hedonist, listen to this advice. It's dead right.

You aren't going to collect this invoice in time to solve your pressing needs. So play the long game that 'tpacek suggests.

My suggestions were made on the assumption that your client is a smaller outfit where the nonpayment is due to, well, a desire to not pay you if they can get away with it.

If you're dealing with BigCo your invoice might be in payables hell. Endless followup is sometimes required. I get banks as clients. Sometimes they're fast. Sometimes they're ridiculously slow in paying.

</comment></comment><comment><USER4> So, for the benefit of everyone reading this: Not urgently needing the money, and not communicating that one urgently needs the money, is one way to avoid having this happen to you.

For your benefit:

a) Asking for partial payment sends a bunch of signals regarding your level of professionalism and need to see this check. Those signals are not helpful in getting you paid in a timely fashion.

b) Two weeks late is practically on time for a lot of clients. Many are just structurally incapable of getting checks cut that fast. Yes, insane, but also true.

c) I'm uncertain of the status of the project and your ongoing relationship with the client. Please note that escalating to lawyers is not in general something which improves client relations, if you wish to get more work from them in the future or if you have an ongoing work relationship for e.g. future milestones.

d) Prior to escalating to a lawyer, write them a short letter yourself and FedEx or courier it to their office. Pay the extra for signature confirmation of receipt. Contents could be similar to:

Dear $DECISIONMAKER:

I invoiced you ($IDENTIFYING_INFORMATION) for $AMOUNT on $PROJECT on $DATE, but to date have not been paid. Last week I spoke to $NAME and $NAME, who promised to handle this issue, but it remains unresolved.

The invoice is due immediately. I would prefer that we resolve this amicably without having to bring lawyers into it. If you have any questions, please call me at $CONTACT_INFO.

Regards,

$YOU

<comment><USER5> "Asking for partial payment sends a bunch of signals regarding your level of professionalism and need to see this check. Those signals are not helpful in getting you paid in a timely fashion."

Out of curiosity, do you think this also applies to asking for a downpayment for large contracts? Because the same logic seems to apply, but I usually see asking for downpayments talked about in a very positive light.

<comment> barry-cotter Asking for a down payment is a test of seriousness and someone's ability to pay the actual, real, full price. It is also an utterly normal business practice. Asking for partial payment because you are broke tells people you are broke. This gives people information about both your business acumen and negotiating position, not information that will redound to your advantage.

</comment></comment></comment><comment><USER6> I seem to be posting this link about once a month on HN, but here goes.

[http://vimeo.com/22053820](http://vimeo.com/22053820) \- Mike Monteiro - F*ck You, Pay Me

It's truly worth the listen. But, since there is already spilt milk, I'd advise your letter to include notification of the date by which you will be reporting them to Compunet, dunn and bradstreet, the BBB and whatever trade organizations that they belong to, including their bonding agency (which they might have).

</comment><comment><USER3> I'm a lawyer. I've written those letters. They're useless. Don't waste your time.

1\. If deadbeats have the money and won't pay, the only thing that will move them forward is a lawsuit. Yelling "Scary Monsters!" will not budge a normal business executive. They are acting in bad faith. A letter won't change that. You can't bullshit a bullshitter, etc.

2\. If they don't have the money, they are either good people or they are bad people.

(a) If they are good people they would have said "We don't have the money and here's a payment plan." You personally should make the payment demand and see if they offer monthly payments to pay you off. A lawyer's snarling letter is going to hamper this effort, not help.

(b) If they are bad people, the only thing that is going to do you any good is a lawsuit.

Your action plan is simple. You either decide to make one last collection effort or you don't. I recommend that you do so. I recommend that you do so on paper. Send a letter with the unpaid invoice. You want this proof so you look good in the litigation, not because they are suddenly going to wake up and pay you.

Then you sue. I don't know what the NYC rules are for small claims court, but that's where you go. You don't need a lawyer there.

For instance, if they owe you $10,000 but the maximum you can sue for in small claims court is $7,500, sue for $7,500 and take the haircut. You don't have to be afraid of the process. It's simple. "Hey Judge, here's my contract where they promised to pay me. Here's the work I did. Here's where they said they were happy with the work I did. Here are the things I tried to do so they would pay me. I ain't got nuttin' yet. Your Honor, I rest my case." Then the Judge will look at them with a Judge Judy-style look and say, in legalese, "WTF?" And they'll have a chance to explain themselves.

No decent lawyer will take on a tiny case like this. No decent lawyer will take on a tiny case like this for the promise of future payment. You're on your own.

Here's the blunt truth. Invoices like yours are worth the face value multiplied by the probability of payment. At the moment your probability approaches zero. You don't have something worth $10,000 to you. You, in fact, have a claim for money that is probably worth zero or close to it, by the time you put all of the time and effort into collection.

Mentally kiss this money goodbye. Put the minimum amount of effort into collection that you can -- use the model I have described above. Put your effort into doing things better next time.

Never put yourself in this position again. There have been endless threads on HN about this. Look for comments by tptacek and patio11, among others.

My personal feeling is that as soon as someone owes you about $1,500 or so (or pick your number), the balance of power shifts from the service provider to the customer. Pick a number where you can look at the customer, swear with all the potty-mouth words you know, and walk away. Then never let your accounts receivable get above that number. It's better to not work and not get paid than it is to work and not get paid.

<comment><USER7> I agree with many of these points, especially about not letting accounts receivable get more than $1-2k, and about having to settle for a fraction of the outstanding $10k in this case, but I do not agree about a lawyer not being willing to take this case or it not being worth it.

Many lawyers will take a small claims case, and at the very least will consult with you (probably 30-60 minutes for free) about it. And while state law will vary, around here most will work for a percentage of the awarded payment.

I knew someone that had a $12k invoice due, went to small claims court ($10k limit), had a lawyer write letters and represent them, and walk away with $8000+. Bear in mind it took 2 years to resolve, though.

</comment></comment><comment><USER8> Send them a cake invoice. Go to a bakery, have them decorate a cake just like your invoice, in red icing at the bottom "your invoice is past due, $10K due immediately". Have it sent to their receptionist. Everyone loves cake. The owner will be embarrassed as hell and pay up immediately if they can. The last thing they need is their employees wondering if they're solvent.

If they still don't pay, send another cake invoice, but instead of putting frosting on a cake, put frosting on a cardboard box.

I've had a friend use this three times. Two paid immediately. The third got the cardboard box invoice. All cheaper than an attorney.

If that doesn't work, perhaps a singing telegram?

Hope they pay you soon.

</comment><comment><USER9> In my industry I would deliver stuff, holding last bit in evaluation mode or in watermark mode due upon full payment.

That's of course prevention measure. If you already gave up whole piece of work for them to ran away with - then you're in chasing mode.

Forgetful clients next time will get preferential treatment - 100% advance payment requirement.

</comment><comment><USER10> You may want to send another invoice, followed by a "demand for payment" letter a couple of weeks later, prior to hiring a lawyer, especially since they aren't yet 30 days out.

<comment><AUTHOR> Actually they are 30+ out, already.</comment></comment>