The Sorcerer's Code: Richard Stallman's quest to save us from a web of spyware - <AUTHOR> https://www.psychologytoday.com/articles/201611/the-sorcerers-code?collection=1095151 <comment><USER2> " In the process, he and others created a free operating system, GNU"

He never created Linux or the 'GNU' operating system. Linux uses the GPL/GNU license.

He created [https://www.gnu.org/software/hurd/hurd.html](https://www.gnu.org/software/hurd/hurd.html)

"That's a nonfree operating system. It tramples your freedom just by being there." Stallman explains that the operating system he helped birth can be swapped in. "I hope you will escape from Apple's power."

I suppose it really depends on your perspective. I just bought a brand-new TV. I don't really need to have the schematics to enjoy it.

The other side is that Stallman has tried to make open source software a law. This would mean that a software developer would be forced, by law, to release their source code.

This is considered freedom?

His ideals would make us all slaves to the big corporations, because they can make money on support, while this doesn't really scale well for a small company or single person.

I love open source, but it has slowly reduced the need to hire expensive developers and many companies can now hire students to hack on open source for much less. Why bother paying a software engineer when the engineers give out their work for free? You can just as easily pay a software mechanic and still get the job done.

Stallman doesn't see or care about this because he is insulated from it. He has a cushy job doing speaking engagements and research for various education institutions. He can pick his nose and eat his hair and still make $250,000+/year.

Money is the only true way to have true freedom, because it allows you to make your own decisions and it reduces the control others have over you. This is the case now and probably will be as long as humans are alive.

We should be empowering developers to make more money and have more control rather than less. This way, they can still make a good living with software and if they choose, release open source software.

The entire idea of the GPL also doesn't really make sense. If a company decides to use your software and not release changes, the original software is still out there for everyone to use and the original owner still has claim to it. The only thing you won't get is the changes, which aren't really yours in the first place.</comment>


Show HN: Raspberry Pi garage door opener - <AUTHOR> https://github.com/evzaboun/garage-door <comment><USER2> I'm not going to point out the big things wrong with this project, because someone might think "oh, if I just fix those things I'm good". I will say I think it's the worst garage door opener project I've seen on hackernews yet. Nothing wrong with messing around with motors in the workshop but the author of this one should keep his project away from other human beings. Probably pets too.

Here's the CPSC page on garage door openers: [https://www.cpsc.gov/Regulations-Laws-- Standards/Voluntary-S...](https://www.cpsc.gov/Regulations-Laws-- Standards/Voluntary-Standards/Topics/Garage-Door-OperatorsGate-Operators)

The pdf "Update of Automatic Garage Door and Garage Door Openers Entrapment Incidents. October 7, 2003" is a good introduction to the real, not internet- smart-guy-hypothetical, hazards of automatic door operation. It includes a summary of every entrapment incident found by the CPSC from 1982-2003.

The UL standard for openers UL325 is incorporated more or less verbatim into the mandatory standard 16 CFR Part 1211: [https://www.law.cornell.edu/cfr/text/16/part-1211/subpart-A](https://www.law.cornell.edu/cfr/text/16/part-1211/subpart-A) Have fun. This is the standard that an opener that retails for $99 on sale in the US has been engineered to meet. European and other international standards differ in particulars but are quite similar.

No, you will not accidentally meet real-world safety standards with your project by dint of your sterling virtue, high intelligence, wisdom in the ways of the world, and impeccable engineering skills. Nor will you do so by adding a couple more features. Safety is the result of deliberate processes.

<comment><USER3> > No, you will not accidentally meet real-world safety standards with your > project by dint of your sterling virtue, high intelligence, wisdom in the > ways of the world, and impeccable engineering skills. Nor will you do so by > adding a couple more features. Safety is the result of deliberate processes.

This is unnecessary condescending snark that I hope we see less of on HN. Everyone should be open to criticism, but how does that encourage the inventor?

<comment><USER2> There is no invention here, and nothing to encourage. Electrically operated doors date from the 19th century, and we have over 100 years of understanding of their hazards.

<comment><USER3> > nothing to encourage

Absolutely there is. You and I both agree we should encourage them to learn properly, experiment responsibly and proceed with safety in mind.

> There is no invention

I regret that you ever saw the word "inventor" and couldn't think past it. {Creator, engineer, maker, hacker, killer} Pick whatever word it takes for you to ignore the noun and focus on the idea and better way forward.

</comment></comment></comment></comment><comment><USER4> Related to "what raspberry pi projects can I start?"

For people that are interested in raspberry pi projects. I compiled a list, mostly for myself, but if it is semi-useful for anyone else, I'd consider that a win. I scoured HN and searched on YouTube, Google and thought of my own ideas to find the rpi projects that fascinated me.

[https://docs.google.com/document/d/1xT6-vN4sFnRLMOdj9wC4_ESW...](https://docs.google.com/document/d/1xT6-vN4sFnRLMOdj9wC4_ESWIXbCcSA4Xo0iqJv_j0k/edit?usp=sharing)

I'll put this project on there as well under the category "smart home". While the concerns are justified, such as insurance issues and fire hazards, I find it a cool use of what one can do with cheap hardware.

<comment><USER5> Thanks, I have three of these things hanging out in my desk drawer (and two more that run a NAS and Pi Hole). This weekend's project.

</comment></comment><comment><USER6> This is lacking some very critical safety systems such as breakbeam detection (someone walks into the path of a closing door), endstops (the system unexpectedly travels to the end of the track), torque/motor stall monitoring (aka crushing someone to death), and door speed monitor (the door starts moving faster than the motors are moving it)

<comment><USER7> Exactly, I was looking at the schematic and my jaw dropped when I saw it was connected directly to a mains motor.

</comment></comment><comment><USER8> I want to say cool project, because I love home automation and have done a fair bit in my own home (though mostly just lights...). But having recently experienced a failure with my own garage door opener that destroyed the door and could have seriously injured a person, I think I'd be reluctant to completely homebrew my own solution.

</comment><comment><USER9> It's a cool project, but for these kind of things I'd rather use a Shelly1. Runs locally, can easily be flashed with Tasmota firmware and it connects to my Home Assistant instance. This thing has never failed me and it's only $15, way cheaper than a Pi (keep the RBPi as your Home Assistant server!)

<comment><USER10> Or an ESP8266, using MQTT to "press" buttons on a standard garage door remote control through a relay module. I uploaded mine here: [https://imgur.com/a/l2wt40w](https://imgur.com/a/l2wt40w) (green and blue are ground and 5V, gray and white are the pulses to the relays).

<comment><USER11> This is great. Question - why did you use the relays and not just the GPIO pins on the ESP to short circuit the contact on the remote for a brief moment?

<comment><USER12> You can't use GPIO pins to short 2 contacts together.

The best you can do is apply voltage to the contacts (which might be workable, depending on how the remote is designed).

To short the contacts you need either a relay or a transistor.

<comment><USER11> Ah yes, of course. Perhaps a transistor could work as well for low voltage?

<comment><USER10> Yes but I wasn't too comfortable with hacking the remote control because I wasn't sure if the button shorted the two contacts towards Vcc or ground (so if I needed an NMOS or PMOS). My knowledge of electronics is super minimal, I can read schematics, design simple circuits, size resistors, etc. but reverse engineering is beyond my level.

Also I used this remote control only because one of the switches was broken, I didn't have a spare one so I couldn't afford breaking it.

An optocoupler would be better but I figured maybe one day I will repurpose the relay shields for something else, or unsolder the relays. Actually my next project involves both optocouplers (for efficient 12V->3.3V conversion) and relays to drive AC but I will probably have a PCB manufactured for that one!

</comment></comment></comment></comment></comment></comment><comment><USER13> As someone who has built products with a Raspberry Pi, I'm not sure I would bet on a WIFI connection.

I can almost guarantee you that you will sit in your car and scream bloody murder because the WIFI ist not connecting.

My products had to work with a lot of other networks around and were built on a Model 3 B, maybe it has improved since then.

Sadly I can't point you into the direction of solutions because we just switched to Ethernet.

<comment><USER14> Some kind of LoRa radio would do well. This 433 mhz one would have long range with a bidirectional link.

[https://www.adafruit.com/product/3179](https://www.adafruit.com/product/3179)

<comment><USER15> Haven't heard of LoRa before - is it some kind of alternative to zigbee?

<comment><USER16> It has been presented to me as an alternative to GSM. It's short for Long Range. They marketed it as a product for smart city, not smart home.

But of course that doesn't mean you can't use it that way.

</comment></comment></comment></comment><comment><USER11> Cool. I have been thinking about this myself recently, and I had a different approach in mind. If you already have a remote (which I suppose is mostly the case with garage doors), why not integrate with the remote directly?

I.e. clone an additional remote, then integrate with the buttons from a micro- controller to open/close. In addition, have some kind of way of detecting whether the door is open or closed, so I suppose the remote can be placed near the motor.

That way you can also easily integrate into your house's alarm system later on if need be, as it's most likely linked to your remote.

</comment><comment><USER17> An easier way to achieve this using a raspberry pi would be to simply have the pi press the right button on the garage remote. I took a pass at this a few years ago. Compared to messing with larger electronics, it's a much easier setup.

[https://www.heyraviteja.com/post/weekend-projects/open- garag...](https://www.heyraviteja.com/post/weekend-projects/open-garage/)

<comment><USER18> There are direct hookups on the back of basically every garage door opener for connecting wall switches you could use too to make it even simpler.

<comment><USER17> Would you need extra electrical components? The cool thing with the garage remote approach is that you don't need any extra electronics, just plain microcontroller.

<comment><USER19> Just a simple relay between the contacts.

</comment></comment></comment></comment><comment><USER20> I love these types of projects. It is not rocket science, nor anyhow complicated to solve and from security standpoint way better than any off the shelf solution. Think about it: you grant access to a random company, with people working there you do not know, security standards out of your control, and if they decide to change the product you simply have to deal with it.

I did a similar solution a while ago, documented all the steps to replicate such setup: [https://www.sascha- curth.de/projekte/004_Garagentor.html](https://www.sascha- curth.de/projekte/004_Garagentor.html)

I wrote it in german, but chrome/google translate is tested for English, Spanish and Portuguese. And comments/remarks are welcome via github issues.

</comment><comment><USER21> I'd recommend driving a FET or two to connect at the push button(s) (i.e. GPIO is "pushing the button") rather than the relay board to drive the motor. Not only is jumping the switch(es) more simple, you also stay on the low voltage side of things and any safeties built in would still be present.

ETA: by push buttons, I mean the "normal" garage door buttons that would open and close the door (typically on a wall in the garage.) these typically use some low power, e.g. 12-20V. And the safeties the manufacturer would have built in would still work as it'd be as if you were pressing the manufacturer's open/close button, but remotely.

<comment><USER18> There's no safeties built in according to their schematic they're directly spinning the motor at full speed with no current monitoring or feedback to the actual position of the door.

<comment><USER21> Exactly. What I'm saying is they should NOT be driving the motor directly like they've drawn up but instead, they should be "pressing the button via GPIO" on the real door opener attached to the garage wall.

</comment></comment></comment><comment><USER22> Don't commercial garage door openers have safety mechanisms to cut out the motor if there is a blockage. e.q. if someone gets caught under the door they won't get killed by the motor still trying to close the door but will rather cut out

<comment><AUTHOR> They do, check the comments the UI has some protection already built in. The rest are feature requests.

</comment></comment><comment><AUTHOR> Garage door opener using raspberry pi and web technologies.

Features:

\- Web interface with multiple user accounts. \- React/Material UI front end. \- NodeJS backend with registration/login flows.

<comment><USER23> .. all data stored on SD card and lost during one of power outages / if someone bumps the cable / if it gets too hot in the summer

<comment><USER15> Not sure this actually happens. In practice.

A friend works at an oil company, and they have dozens of rpis deployed on offshore rigs, and in land rigs in the middle east. They are working in pretty harsh conditions, with high salinity, sand in the air, high vibrations, very low temps, very high temps... and yet over the 6 years they have been running, not 1 has had a fault.

All use SD cards, and they haven't been glued in or secured in any way.

At this point, the RPi SD-card fault thing is becoming a meme.

<comment><USER24> Not my experience with commodity SD card, power supply and stock settings of Raspbian. They must be using some "secret sauce" to make them run 6 years without outages. I would suspect some industrial grade SD card (SLC or at least AMLC), high quality power supply (e.g. UPS with surge protection) and also some way to limit writes on the SD-card.

<comment><USER15> They are running stock Raspbian. For SD cards, they are using a mix of SanDisk, Kingston and others - consumer versions.

They are indeed using UPS', and the workloads naturally have a low write load.

<comment><USER25> That's nuts. I had to replace some old Cisco media players that we used as digital schedule boards outside of ~20 classrooms. The Cisco players were quite old and only needed to load a webpage that pulled schedule info from elsewhere and displayed it in the proper format.

I decided to do this with RPi and went through several revisions as I learned/relearned a lot about Linux. The first version was built on full Raspbian and added a basic server listening on some port or another so I could remotely reboot the things by clicking links on a simple website I put together. That build would usually crap out after a few months and the Pis would stop booting fully from the Sandisk MicroSD cards.

Most recent rev was built from the "Lite" version of Raspbian as I was looking to stay slim and have less stuff to update/run in the background/cause issues with the basic operation of a device that only needed to boot, load Chromium, and open a webpage defined in the startup script.

Those have been a lot more stable (no more reimaging a card here and there every month or two) but they still occasionally crap out and a reimage is the only option (maybe once every 6-8 months). This is in an air conditioned building with stable power, wired LAN connection, and fast SD cards. I can't imagine they would be even this reliable running all the time in any sort of "hostile" environment or even using wireless networking.

I looked into network boot but didn't really have the time or resources to set it all up on the school's network.

</comment></comment></comment></comment></comment></comment><comment><USER26> One of my first projects with the gen 1 raspberry pi in 2013 was controlling my garage door opener by pulsing a optocoupler and that could be triggered via a simple http endpoint that would run a out script It worked well , but didn't quite pass the WAF. So switched to a commercial product that had a mobile app. (zwave/Samsung smart things)

</comment><comment><USER27> Might as well show off my own attempt from high school :)

[https://github.com/Nexuist/Doorman](https://github.com/Nexuist/Doorman)

[https://github.com/Nexuist/Doorman- Remote](https://github.com/Nexuist/Doorman-Remote)

<comment><AUTHOR> Nice, thanks for adding them

</comment></comment><comment><USER28> Cool project. I built a couple myself (albeit not with a Pi, but with some Wemos D1) and can share a few lessons learned.

First of all, safeties. I was lucky to add my work to existing motorized garage doors - which already came with enough sensors, but since you are providing everything including the motor, these should be in from the very start, or in any accident you'd be held liable. Actually you may even be held liable if someone implements it from your github repo and then has an accident. I know you have a disclaimer, but I wouldn't rule out being sued.

You want a sensor which detects any anomalous power draw in the motor and immediately cuts off power. Something as simple as an ACS712 (follow guides for reading an inductive load though!) which is a couple bucks (or less if you buy a bucket from China). The motor may come with built in safeties if it's meant for a garage, but this is something I'd still consider.

You will want not only a sensor but also a couple emergency buttons on both sides of the door which instantly stop all movement. While you're there, activating a couple very visible flashing LEDs for a few seconds before you start any movement is also a good safety precaution. You have 2 relays which could due to a bug or other unexpected circumstance be energized at the same time - Depending on the motor this could cause a fire, or fry your relay board/Pi. I would use one relay with its NO contact going to the DOWN motor pin, and the NC going to the UP motor pin, and connect it in series with the other relay which cuts all power. This way it's not possible to energize both in any case (beware: even abruptly switching directions may ruin a motor - always cut power first, THEN toggle direction, THEN provide power again)

Happy to discuss a few more points if you feel like.

<comment><USER8> As someone who owns a normal Liftmaster garage door opener that malfunctioned last week and destroyed the door because it didn't adequately sense that the door was blocked, I have to say I don't think I'd want to homebrew my own opener. Especially not with kids in the house.

</comment></comment><comment><USER29> Very cool project, I've been wanting to do something with my Raspberry Pi as well.

I mainly wanted to focus on turning my AC units on and off. I assume I'll need some sort of IR transmitter, and possibly a receiver to understand the signals the remote is sending.

<comment><USER25> If they use IR remotes, I imagine you could plug in a network connected Pi with a USB IR blaster next to each AC unit. Then stick the IR emitter LED on the little window where the IR receiver is on the AC unit.

Then it's just a matter of capturing the remote codes and setting up a way to remotely command a given Pi to send that pattern of pulses out of its IR emitter.

edit: I just did a quick search and Sparkfun sell WiFi IR blaster boards for $20. I'd imagine you could find cheaper ones on Aliexpress or other places where you typically find cheap electronics. This would probably be simpler to set up versus a Pi with less things to break since it's not booting a "full" general purpose OS.

[https://www.sparkfun.com/products/15031](https://www.sparkfun.com/products/15031)

<comment><USER30> I can't speak to the quality of this yet, but I just bought [https://www.amazon.com/gp/product/B016D5L5KE/ref=ppx_yo_dt_b...](https://www.amazon.com/gp/product/B016D5L5KE/ref=ppx_yo_dt_b_asin_title_o03_s00?ie=UTF8&psc=1) kit to dork around with myself. It comes with an IR transmitter and a whole host of other stuff to play with.

That said, I do love adafruit and sparkfun for most purchases. My bank account doesn't, but I certainly do.

<comment><USER25> Oh, nice! I hadn't thought to look for multi-part kits like that but the next time I am looking for a sensor or emitter or whatever, I might check some of these kits if only because "more stuff!!"

I am the same with Adafruit et al. Their stuff is tested, easier to exchange/return if broken, often ship quickly since it's domestic to the US, etc. But when I need a bunch of something I tend to order more direct/bulk. My early LED strip projects were fine with a meter or two of "Neopixels" but when I wanted many many meters for bigger stuff, it was time to order reels from Ali Express. Shipping was slower, but even if I paid an extra $20 for fast shipping, it was much, much less than ordering from Adafruit. I just had to be aware that some of this stuff may not work and returning will be next to impossible. Luckily I had no issues.

<comment><USER30> Yep, that's my thought processes too; I usually go to Adafruit, and if they don't have it, I go to Sparkfun, and if they don't have it AND I know precisely what I want, Digikey, and then if all else fails, I go to amazon and buy a pack of "everythings" and see what I get.

Everything I've been doing is stepper motor related, and I didn't know what else I'd even use 3/4 of those sensors on, but for 25$ or whatever I figured I could buy them, try them, and see what comes out of it. They're like a flight of microbrews or something; just enough to tease me and get me started so I know what I actually want :D

</comment></comment></comment></comment></comment><comment><USER31> Very nice! I only have one question: I see there are pull-up resistors connected to push buttons. Aren't there built-in pullups on RPi GPIOs? Maybe you can enable them and use fewer elements on the breadboard.

<comment><USER32> Can confirm that the internal pull up/down are there and most libraries can enable them (alternatively this can be done manually via terminal after each restart).

</comment></comment><comment><USER33> Is there anywhere you can get hardware that can interface with HomeLink as a receiver, like to signal an opener like this, or to trigger smart home actions like turn on the lights?

</comment><comment><USER34> I recently replaced my physical garage door buttons with arcade push buttons (my kids love it) and I was thinking...."this box could hold a pi".

</comment><comment><USER35> Really cool. How do you trigger the opening ? Just via the pwa upon entering Wi-Fi range ?

<comment><AUTHOR> Yeap exactly.

</comment></comment><comment><USER36> Cool! I did something similar and it was a fun little project.

<comment><AUTHOR> Yeap, started as a small project, then grew and added proper front end with user signup/login flows. user roles admin/non-admin. Built progressive web app. And planning to add more elements. Camera for live streaming etc.

Do you have a repo to share?</comment></comment>


Unexpected challenges of making money on the internet - <AUTHOR> https://www.kapwing.com/blog/unexpected-challenges-of-making-money/ <comment><USER3> > Relying on Google and Facebook Identity is not sufficient for some > professional users...We like that accounts have mostly real names and > verified email addresses,...but I do think the validity of emails will > decrease. Takeaway: If you're creating a sign up flow for your app, you > should think about these trade offs between social and email-based auth.

This is absurd and shows that they aren't thinking from the perspective of their users (even though they have an "I really don't want to pay" option).

There are many reasons why people might want not to link everything together; in fact this is a reason why many prefer paypal (more transactional) to linking directly to their CC. This is also especially true for low-intensity sites like this one (you may see the justification for linking Tinder to your FB account, but you likely use this service much less than you use TInder!).

Secondly, and again related to low-intensity sites: why should they care about real names?

<comment><AUTHOR> Google Accounts are free and simple to create, so if a user doesn't want to "link everything together" they can create a new separate account that they only use for Kapwing. Plus, we're aren't "linking" to your Facebook/Google data; we're just reading your name and email from your account.

We decided to rely on Google and Facebook for three reasons: 1. It's technically easier, and since so few users care about needed to sign in with one of them it's a low-priority feature request to add email sign in. 2\. My co-founder and I worked on Google's identity team for a year. The fact is that passwords SUCK - people hate them and they lead to a huge amount of friction in UX. Reducing the number of passwords that a user needs to remember is a huge benefit. 3\. Having user's "real" identity helps with validating credit card transactions, sending follow-up receipts and confirmations, and personalizing the site. If we do one day become a social network, we're less likely to be taken over by bots.

<comment><USER3> Your blog post already explained why you thought this would be a good idea from _your_ POV; I was pointing out that it's not uniformly a good idea from your _customer 's_ POV. But your reply to me was also from _your_ perspective, not from a wide spectrum of customers'. That's a limit to growth. The friction of "simply" creating a new account on a different site in order to use yours? Forget it!

If your business runs the way you want it to then what I'm saying doesn't matter to you, and shouldn't. I don't mean this as criticism

(BTW I doubt you know about the failure rate because people who don't want to do that are most likely to silently go away without becoming customers. It's like a paywall, or those horrible splash screens that you have to click-away that try to get me to sign up before showing me the content. I simply refuse to visit those sites (I have a blacklist keystroke) so the people who deploy those antipatterns don't even know they are missing out on pageviews. Instead the collect only the positives and reason from there.)

<comment><USER4> I'm of the same mindset. I won't make a Google account just for a website login, and I won't use Facebook login for anything at all after an experience with winding up in "Facebook Jail" after they decided an image I posted "violated community standards" and then unable to log into another account I had tied to Facebook. I don't know if it was a transient issue or what, but it made me step back from using anything that required such logins.

I run my own email still, and I won't manage to get locked out of my own stuff. The same cannot be said of Google or Facebook.

</comment></comment></comment></comment><comment><USER5> > 6\. Many users prefer Paypal to credit cards:

I've had the same experience with my customers. I think Stripe is leaving a lot of money on the table by not promoting their brand to end users more. As an informed technical person, I would much rather hand my CC to Stripe than to PayPal, but Joe Sixpack doesn't feel the same way. Their impression is that they're giving randome websites their CC information, when actually Stripe's architecture is very reasonable.

If this affected conversions in a meaningful way for my business, I would have a hard time justifying not using PayPal instead of Stripe.

<comment><USER6> As a programmer AND a Joe Sixpack, I already have Paypal. They already have my bank/cc. I'm not going to get rid of it. By going to Stripe, now my attack vector has doubled.

That said, if there was an alternative that stored my CC info and let me do one-click buying (does Stripe do this??) that was integrated into 60%+ of payment systems, I'd gladly use it instead of Paypal, who I've grown to abhor.

<comment><USER7> Why are you worried about unauthorized use of your credit card number? Under US law, you are liable for $0 of the charges. If you lost your physical card or had it stolen, you're liable for up to $50 of charges made before you reported it as such.

Legally and financially, if a malicious website uses my card number poorly, the consequences for me are "I notice an issue and Chase mails me a new credit card".

 _Debit_ card numbers, sure, that's a whole other ball game. But a credit card number? IDGAF if it gets stolen. It's not my problem, and I like it that way.

<comment><USER8> > Why are you worried about unauthorized use of your credit card number? Under > US law, you are liable for $0 of the charges.

While you're correct, it's a huge PITA replacing a CC. I have almost all my bills going through my CC for points. Then there are places like my crap gym that charges a fee if the CC is ever denied for any reason.

<comment><USER9> Some (most) CCs will allow prior recurring charges to continue with an old/lost/stolen CC number for some period of time (potentially until the expiration date) so you can avoid that headache.

In the case of my AmEx, I have some monthly charges still using an old number from 3 years and 2 stolen cards ago. Discover used to offer this too, though I don't know if they currently do.

<comment><USER8> Except I think the vendor has to do something? I know some vendors immediately start failing and others seemingly work fine. Regardless of whose problem it is, it becomes a PITA for me.

<comment><USER9> I don't see why the merchant would have to do anything. If the card/bank allows the transaction, because they recognize the merchant using the "old" card info it'll go through.

</comment></comment></comment></comment></comment></comment></comment><comment><USER10> I wonder what's the impact of requiring Google/Facebook accounts to sign up. I never sign up for anything that requires either, but at the same time I'm not the target demographic.

I'm also surprised that users would ask for PayPal support. I've read too many PayPal horror stories to trust them, but apparently users like it.

<comment><USER11> I'm a sucker for PayPal.

Most of the time it's 2-3 clicks when I want to buy something off of a random website, worst case is I have to login again.

Compare that to reaching out for your credit card and putting in your info. Plus you'd have to trust them now with your CC data.

<comment><USER12> >Plus you'd have to trust them now with your CC data.

This is a failure of the CC provider, not that the customer cares. If you use something like 3D secure, you don't have to worry about the merchant misusing your data.

<comment><USER13> Don't underestimate laziness; I've given up on buying stuff just to avoid getting up from the couch or bed to get my phone :D

It also made purchases with the company CC annoying - couldn't buy anything when the boss was in a meeting.

</comment></comment></comment></comment><comment><USER14> Last two insights alone make this a worthwhile read:

> 8\. Customers are bad at telling you how much they would pay

> 9\. People will pay for things you wouldn't pay for: When we started > charging $10/month for our video meme maker (the first Kapwing tool), some > people on Product Hunt and Hacker News told us we were crazy.

<comment><USER15> 9 seems mind-blowing to us all at first. When you unpack it a bit more, you realize that there are literally tens of thousands of different kinds of business selling so many different kinds of products and services. Ask yourself, how many of those tens of thousands of businesses are/would you be a customer of? Your immediate answer is that you're only ever going to be a customer of a very, very small percentage. Then you ask yourself why are all the others still in business, then? And it is because of this reason. There are so many different kinds of needs and wants people have that are unlike your own and therefore, what you might not pay for, many others very well might (and do).

</comment></comment><comment><USER16> > I knew that people's credit cards failed and changed, but from my own > anecdotal experience I considered this a rare edge case. Wrong.

This is one of the biggest surprises when you build SaaS. Delinquent customers average 25% of churn rates.

Banks must be rolling in lost/new card fees.

<comment><USER17> If you're in the UK / Europe, using Direct Debit is a big win here - <USER2> accounts don't expire. Something to optimise once you're big, rather than as a startup, though.

<comment><USER18> Gocardless has an API to make direct debit fairly easy for most of europe.

It's only really good for subscriptions rather than one off payments though. Not knowing if the payment was successful for 5 days is probably the biggest downside. Very low fees and low churn is the upside.

<comment><USER19> If you're talking about B2B it's not just subscriptions - any continuous relationship can be a good fit for direct debits. For example many breweries in Ireland will sign up their clients (i.e. pubs and off-licenses) via direct debit. Then if they make a delivery the payment collection will be automated at the end of the month.

In this situation direct debit gives the vendor the comfort of delivering goods without payment, and it gives the customer the flexibility of ordering without having to go through a purchasing process.

</comment></comment></comment></comment><comment><USER20> And here I am, month 4, still coding away and waiting for perfection before I launch.

<comment><USER17> Launch! If your experience is anything like mine with Dependabot, optimising for a big launch is a terrible idea - we spent days fretting about how our infrastructure would handle the load, only to get zero pickup. Lots of sales and hustle since then have got us to ramen profitability, but the time we spent building up to the launch was worse than a waste of time - it made us way too emotionally invested in an event that was basically pot luck.

<comment><USER20> Thanks for your story and advice.

</comment></comment></comment><comment><USER21> Why do users get the option to skip payment and remove the watermark for free? Stop doing that.

<comment><USER22> Having this option makes me think that maybe the author is having a tough time being a capitalist. I've come across quite a few people who are uncomfortable making a profit off of someone else and instead provide the option to give things away so they don't "feel bad".

</comment></comment><comment><USER23> I think your pricing model, which includes a per use fee, a monthly fee, and an annual fee, is ideal.

I personally find the premise of recurring payments insulting when I want to try something or know I will only use it a few times. There are so many things that I have not tried, just because I don't want to have to go through the trouble to cancel it after I've tried it.

So I think your decision to allow me to pay a buck every time I use your service is very respectful of me and my finances!

</comment><comment><USER24> If that's a screenshot of your actual pricing page, you should not highlight the $2 per video option in green, it makes it more likely people will choose it.

I don't even understand why have a $2 per video option, it doesn't seem to be great value to you after credit card processing fees and you say 75% of people skip the paywall through the "I can't pay" link.

Also if your demographic for monthly/annual payment is creators and social media marketers, you should focus your marketing site on the tools they might be interested in. It seems to be your meme maker might have been great for exposure but it probably doesn't pay the bills? I'd highlight the other tools.

Maybe think about offering integration with third party software that your paying users are likely to be using as well, as a feature only for the annual plans, or even as an entirely new plan so keep the current monthly/annual as a "Creators" plan (give the option to choose payment frequency and default to annual) and add a new plan at a higher cost (also with monthly/annual choices) with extra features for people who are putting it on the company card.

Just my 2c, might be completely off the mark because I don't know enough about your numbers from a blog article, but these are things I've done with my clients that have worked out.

</comment><comment><USER25> _I would personally never pay $10 /month for Kapwing, but I'm also not a social media marketer and creator that needs the service._

Scratch your itch and all that.

<comment><USER26> Personal itch scratching is one strategy but scratching other people's itches is rather a good one too.

</comment></comment><comment><USER27> Great insights, thanks for the article. It inspires how you can grow incrementally with a relatively simple product. Could you share your tech stack?

<comment><AUTHOR> Hey, we're using a basic MERN stack (MongoDB, Express, React, Node) and using FFMPEG on the back end

</comment></comment><comment><USER28> key point:

"Customers are bad at telling you how much they would pay"

been there, done it. Got users telling me they'd pay $100/year for the thing, only to launch the thing and have them waffle about features.

The only way of testing if customers will pay for something is to ask for the money.

<comment><USER29> Preferably before you build it.

<comment><USER30> As in get them to pay before they can get the product?

Seems like they'll then blame you for not making the product you said you'd make, if they pay for a product that's made they can't reasonably make that objection (but could argue misselling I suppose).

<comment><USER31> When you don't charge, users who say "I would buy that" are not actually saying yes to your marketing pitch. They're usually saying "hmm, seems interesting"

When you say "preorder now!" the users who pay you money have most definitely said yes.

Some will be disappinted, yes. But, if you actually have a product, some people will still be disappointed and want a refund. This is inevitable.

What asking for a preorder does is it filters down to people actually interested in paying money for your pitch.

</comment></comment></comment></comment><comment><USER32> If anyone happens to like Python and wants to bypass a bunch of the challenges with accepting payments I do have a ~10 hour video course on building a SAAS app with Flask. The source code in that course has been used in production for years and is well tested / polished.

Details can be found at [https://buildasaasappwithflask.com/](https://buildasaasappwithflask.com/)

The course covers a lot of real world features but one thing we do is set up Stripe for both recurring subscriptions (multiple plans) and one off payments (microtransactions for the game we develop which is protected by the paywall). Everything you would expect such as changing subscriptions, billing history, etc. is included.

Lots of people have taken the course and then went on to build their own SAAS apps using the course's app as a base app for their project.

<comment><USER33> What are some of the SAAS apps that they have built?

</comment></comment><comment><USER34> User's feedback mentions some payment service PayPay in Europe. It's mispelled PayPal, or some European specific service of which I've never heard of?

</comment><comment><USER35> Thanks for this article. I'm looking at adding payments to a small project I've been making so this is really helpful stuff to think about.

</comment><comment><USER17> Congrats on Kapwing, and on some really great blog posts! 300% month-on-month is totally insane - fingers crossed things keeping going so well for you.

</comment><comment><USER36> Unrelated to the main post, a website where you edit video is total SaaSS (see [https://www.gnu.org/philosophy/who-does-that-server- really-s...](https://www.gnu.org/philosophy/who-does-that-server-really-serve) ) — it shouldn't be a thing, people should run such software locally

</comment><comment><USER37> It's ok. Little hacker news advertisement should help, right?

<comment><USER38> Advertisement or no, as a person who is still planning the payment model, this was quite useful.

<comment><USER39> Advertisement jes, but not in the form of traditional advertisement they have at best a 1% watch to pay rate so advertising by having people spread it in social media is way more money effective

</comment></comment></comment><comment><USER40> If anybody is interested I'm making a new currency called the Points on the internet, so literally making money on the internet, it's called [https://pointsproject.org](https://pointsproject.org)

</comment><comment><USER41> (A) I will almost never use a real facebook or google account on a small site like this since I will normally expect to be spammed to no end. So normally for signup I use some disposable gmail account

(B) I certainly prefer Paypal. First I never heard of Stripe before and I assume that the site will either: (a) try to store my CC info, will get hacked and I will have to deal with fraudulent charges or (b) keep trying to charge me after I completely forgot about this service and no longer need it.

(C) If I use a credit card on a site like this it will be a virtual account number with a single charge limit. This probably explains credit card charge failures</comment>


A dumb tv is a smart tv - <AUTHOR> https://www.subtraction.com/2016/10/18/a-dumb-tv-is-a-smart-tv <comment><USER2> I bought a SmartTV on woot a couple years ago. The input lag is so frustrating at times as well as random freezes.

I much prefer to plug in the Fire Stick and use that interface, so much faster and easier.

I'll never buy another smart TV. I'm of the mind the OS/Hardware should be agnostic to the display.

<comment><USER3> Pretty much impossible to buy a high-quality dumb tv these days. Better to just ignore the "SmartTV" features when shopping around, and then use your own solution.</comment></comment>


Cross-Zip: Cross-platform .zip file creation - <AUTHOR> https://github.com/feross/cross-zip <comment><USER2> This uses Node to call out to either "powershell.exe" (if on win32) or "zip". It assumes the correct executable can be found on the path. It also assumes the directory name does not contain a space or shell metacharacter.

For a more portable cross-platform .zip file creation, use Python's built-in "zipfile" module. There is even a simple command-line interface, which can be used like:

       python -m zipfile -l $FILENAME</comment>


Rich Hickey's Wikipedia page nominated for deletion - <AUTHOR> http://en.wikipedia.org/wiki/Wikipedia:Articles_for_deletion/Rich_Hickey <comment><USER2> I find it kind of strange just how dedicated "Artem Karimov" is to getting this page deleted.

In addition, the rule that's quoted, "Notability is inherited", is a bit strange - people are notable because of things they do. For example, I doubt that J.K. Rowling would be considered "notable" if it wasn't for the fact that she created Harry Potter. I fail to see why the same argument can't be applied here.

However, I shall end with a disclaimer: I don't edit Wikipedia at all, and I'm sure there are nuances that I'm missing. Still strange, though.

<comment><USER3> "Notability is not inherited" makes perfect sense. Doing something notable doesn't make you notable. Doing many notable things might make you notable. Doing something that is supremely notable might make you notable. Clojure clearly doesn't qualify.

<comment><USER4> I call bullshit. Please remove your wiki page for Grace Metalious. She never did anything but write a few trashy novels. I came up with that example in about two seconds. I'm pretty sure I could go on all day. Notability _is_ inherited. Except of course in the case of Wikipedia editors, whose contributions are minute and often negative.

<comment><USER3> Are those novels notable? Then by my definition she would gain notability for that.

As a general rule, if the only _interesting_ information about a person is that they did X, then they do not deserve a page of their own. It adds _no useful knowledge_.

Now that I think of it, that is really what this is about. Does having a page about this guy that basically says he created clojure add anything useful to the world? It's clear in this case it doesn't. At least nothing that couldn't be said in the clojure article.

Knowledge is about organization (it could be argued that knowledge literally is organizing information). Does having an article about a guy whose sole notable accomplishment is clojure help to increase knowledge, ie increase organization of information? No, there is nothing to organize. For your Grace Metalious example, having a page that organizes her notable accomplishments _is_ in fact adding knowledge to the world.

</comment></comment></comment></comment><comment><USER5> Clojure is new. Hickey's status as the designer of a major and taken-seriously programming language is new. My knowledge of Rich Hickey is itself new -- I started seeing articles about the guy about a year ago. New means that most of the things that will eventually be written about Hickey and Clojure have not yet been written. Clojure has a future, but Wikipedia is about the present.

The current Wikipedia article on Rich Hickey doesn't actually tell me a whole lot about him. He invented Clojure, he's a software developer (logical consequence of the preceding), he "has worked on scheduling systems, broadcast automation, audio analysis and fingerprinting, database design, yield management, exit poll systems, and machine listening." -- where? how? with whom? All of these are _potentially_ notable, but none are when they're shotgunned at the reader.

Of the sources there, _Code Quarterly_ might qualify as a respectable publication, if it takes off -- it _too_ is new.

Keep in mind that, say, moot, inventor of 4chan (more famous than Clojure) didn't have his own Wikipedia article until he started Canvas. Until as recently as June 2011, <http://en.wikipedia.org/wiki/Christopher_Poole> redirected to <http://en.wikipedia.org/wiki/4chan> and it was only moot's ascendance as an entrepreneur which changed that. Wikipedia notability relies on secondary source coverage, and secondary source coverage requires time to occur.

</comment><comment><USER6> Can someone explain the rationale behind Wikipedia deletionists? I don't understand their motives.

<comment><USER7> It depends on the person. Different people have different motivations for wanting an article deleted:

\- Purism with respect to Wikipedia policies (I would place this example in this category)

\- Ideological commitment to notions about what an encyclopedia "should" be

\- Personal vendettas

\- ...and so on

</comment></comment><comment><USER8> I have to admit being somewhat surprised to find a concise, interesting debate where neither side is being particularly dumb or unreasonable.

Of course by the time someone on HN reads this and follows the link, this may have changed.

</comment><comment><USER9> Posting things like this is frowned upon by WP:CANVAS[1] and I would wager is generally counter-productive to actually saving an article. The goal of these discussions is to determine if there is consensus[2] that the article should be deleted because of the English Wikipedia's policies[3]. Having a bunch of people that are not familiar with how things work on en.wiki bring very little light, but a lot of heat and generally are just ignored by the closer of the discussion.

[1] <http://en.wikipedia.org/wiki/WP:CANVAS>

[2] Wikipedia has a somewhat odd definition of this and it varies greatly on what process/discussion is taking place and whomever ends up making the decision. Ostensibly, <http://en.wikipedia.org/wiki/Wikipedia:Consensus> describes it, but nailing what it really means in practice is much more difficult.

[3] There are far too many to list. However, two of the most important ideas are that Wikipedia neutrally presents what other citable, good sources say.

<comment><AUTHOR> FWIW, I didn't submit to attempt to save the article. Wikipedia, deletionism and inclusionism on the same, and Clojure are all of varying interest to the HN populace, so it seemed like an interesting nugget of info.</comment></comment>


How ironic that ever since the future has arrived... - <AUTHOR> http://www.kk.org/newrules/blog/2008/12/how-ironic-that-ever-since-the-1.php <comment><USER2> Computing can't be compared to the car industry.

The car is just one industry that is (was?) part of the Industrial Revolution. And the Industrial Revolution isn't even over; it's still going on in places like China.

Computing is more like the whole Industrial Revolution. It's not just a new kind of gadget, it's a whole new set of principles. Business models will come and go but I don't see any end to rapid change for at least the next 50 years.

Even if we hit a limit to Moore's Law tomorrow, the world would take a long time to even come to grips with the technology we already have, but isn't widely distributed yet. Consider that Facebook doesn't rely on any technology that wasn't available in 1997. And yet it took until 2007 for the economies of scale and the changes in society to make Facebook possible.

</comment><comment><USER3> This is a reblog(?) of a book that Kevin Kelly wrote in 1998. It says that GM is junk and Microsoft is on top of the world, but won't be in 40 years. Glad to know that.</comment>


An interview with Ross Anderson on new threats to security and privacy - <AUTHOR> https://www.edge.org/conversation/ross_anderson-the-threat <comment><USER2> "And that's why Microsoft software is so insecure, and why everything that prevails in the marketplace starts off by being insecure. People race to get that market position, and in the process they made it really easy for people to write software for their platform. They didn't let boring things like access controls or proper cryptography get in the way."

If no one is using the internet or computers, then there's no point being sophisticated about its security and privacy. This unfortunately makes certain technologies like e-mail impossible to make truly private...and it's hard to get a few billion people to change their email protocol now, though not impossible. For example, https protocol was added and widely adopted for the internet.</comment>


BitNami (YC W13) Launches App Store for Server Software - <AUTHOR> http://techcrunch.com/2013/03/25/y-combinator-company-bitnami-makes-deeper-move-on-booming-app-store-market/ <comment><USER2> I've used BitNami a number of times and their product is incredibly polished and has a huge library of server apps. I needed to test some of our software with a couple of different versions of Drupal and I was able to spin up running instances in just a few minutes, without touching a command line. It's definitely a big step up from just launching an AMI.

</comment><comment><USER3> Don't we already had an app store for servers called apt-get?

<comment><AUTHOR> apt-get works for system libraries but not really that well for high-level apps which have different requirements and release schedules, specially the less mainstream ones. We also support Windows and OS X, which do not have anything like apt-get. In those cases we use regular installers or the OS X App Store

<comment><USER4> Say what? Isn't Firefox a high-level application? What about LibreOffice? Or Apache HTTPD?

Isn't the distro maintainers the ones who define the release schedules? Doesn't Fedora or SuSE, for example, release the newest versions for Firefox, KDE to the latest on their current distro for example?

I think an Application Store for servers is something redundant, re- engineering the wheel.

But that's my 2¢.

EDIT: And I'm even talking about similar tools to tasksel.

<comment><USER5> What happens if the distro maintainers are not doing a good job and keep lagging behind? Shouldn't developers themselves be able to take charge of the situation?

<comment><USER6> They already can if they want to produce packages. This sounds like it may make that easier.

I'd still prefer to use the ones built and maintained by the distro though.

</comment></comment></comment></comment></comment><comment><USER7> Hasn't Bitnami been going for years, though? (At least 4-5, I think). I'd be interested to find out why they took the Yc cash now.

<comment><AUTHOR> We are profitable and we certainly did not do it for the cash :) We did it for the advice. I know this sounds trite, but they have been incredibly helpful in taking BitNami to the next level and they have done it before which companies like Heroku, which we look up to.

<comment><USER7> Fair enough! I hope you get everything you want out of the deal.

I've been a fan of your products for a while. They were great when I was working at a bank and it was a quick way to get something up and running for a demo quickly.

</comment></comment></comment><comment><USER8> I have worked with Daniel and Erica (the Bitnami execs) for the last five years. They are smart and they have been steadily growing Bitnami for a while now. Their appliances make deploying and updating a snap.

</comment><comment><USER9> The BitNami Cloud Hosting Features page [1] doesn't say anything about how easy (or how difficult) it is to update an application (or stack). Will I be notified if there's a new version available? Can updates be automated?

Other "managed hosting" providers make updates a big selling point. For example, check out the marketing copy at Page.ly (managed WordPress hosting) [2].

[1] <http://bitnami.com/cloud/product-tour>

[2] <https://page.ly/features/>

</comment><comment><USER10> Fantastic news for the guys at Bitnami. I met Daniel López at LinuxCon 2012 in Barcelona and he let us all know there that they have an interesting proposal. I'm still missing some Nginx love on your stacks, btw, but I guess it'll come eventually.

</comment><comment><USER11> Is the pricing just for the one click launch? Or have the public AMIs you've been maintaining gone away and it's all pay to play?

<comment><AUTHOR> No, nothing has changed and we are not doing anything 'evil' :) The pricing is for our hosting service, which also has a free tier. We will continue to provide the AMIs for free.

</comment></comment><comment><USER12> I see only open source applications. Can someone offer commercial applications that are not open source?

<comment><AUTHOR> Yes, commercial apps are coming soon to the platform. We already provide commercial versions of Liferay and SugarCRM in our Cloud Hosting product

<comment><USER12> Would it be like just providing you the complete package and installation steps or is there some kind of integration required?

<comment><AUTHOR> Right now we handle all the packaging, but over the next few months you will be able to provide your own apps on top of the platform. We want to make this process as painless as possible :)</comment></comment></comment></comment>


IPhone help needed: Displaying 'à' in UI text view without corrupting text - <AUTHOR>

Hi All,
Sorry for the annon post, am quite embarrassed I can't solve this myself.
Would really appreciate some help from the HN community with an issue I am having developing an iPhone App for a French client.
When I include the character 'à' as part of a word rather than on its own in UI text view it removes the spaces from the surrounding letters/corrupts the text.
Any solution would be appreciated ever so much. <comment><USER2> Have you asked on stackoverflow.com? That site might be more likely to get you an answer than HN.</comment>


Dear Oracle: Get a clue - <AUTHOR> http://ianskerrett.wordpress.com/2010/10/22/dear-oracle-get-a-clue/

<comment><USER2> _The basic problem is that people don't trust you_

Bzzt wrong! There are plenty of organizations that DO trust Oracle enough to rely on their products for core mission-critical functions. Oracle cares what those organizations think. I guess the blogosphere got used to being able to bully Sun; they're in for a surprise of they think Oracle's going to be such a pushover.</comment>


Ask HN YAHOOS: What Yahoo Should do next? - <AUTHOR>

Keeping in mind that Yahoo has revenue of around $6Billion and profit is between 20-25% , which is not bad (looking at all the problems and issues) ...
IMHO :they shud just concentrate on core competencies, get rid of clumsy products and focus on Asian countries (which is 50% of world population and that's where the future growth is) and if you want more then try to deliver prod/services best suited to Africans and you'll cover 75% of world population. Remember serving bottom of the pyramid???
what would you suggest? <comment><USER2> This is not meant to be snarky... serious question...

at this point, what are Yahoo's core competencies?

<comment><AUTHOR> by core competencies i meant the product and services that are generating maximum revenue and profit ... they're making $6B so naturally something is working :-) with some good real estates (may be email, flickr, yahoo finance, yahoo movies etc.)

<comment><USER2> i get that but what are its core competencies? what is actually making them money other than their ad network?

<comment><AUTHOR> i guess most of their ads are displayed on their own properties , so the more the eyeballs, more the money AND most of the eyeballs are in asia and africa ... so focusing on world demography and their needs will serve the purpose in the long run.

</comment></comment></comment></comment><comment><USER3> I have a bunch of ideas but really don't feel like spending the effort typing them up. Maybe that's how they feel? Abandoned, unloved, salvageable but... who cares?</comment>


Go interfaces make test stubbing easy - <AUTHOR> http://blog.cloudflare.com/go-interfaces-make-test-stubbing-easy <comment><USER2> I find the mocking/stubbing in Go awkward. You have to implement all mocked methods, and if you want to record certain calls, you have a lot more code to write.

Let's translate the example to Java:

      public interface Job {
        int getPriority();
        void doWork();  // do is a reserved word
      }

Then, to mock it with JMockit:

      new Expectations() {{
        job.getPriority(); result = 1;
        job.doWork(); times = 1;
      }};

These 4 lines replace all this Go code:

      var Done bool

      type DummyJob struct {
      }

      func (j DummyJob) Priority() int {
        return 1
      }

      func (j DummyJob) Do() error {
        Done = true
        return nil
      }

If you imagine some larger interface, it would be _a lot_ of code in Go. Mocking in Go isn't fun.

<comment><USER3>
        type DummyJob struct {
            Job
        }

DummyJob now implements Job, you can override whatever methods you need.

[http://golang.org/ref/spec#Method_sets](http://golang.org/ref/spec#Method_sets)

<comment><USER2> This looks much better, although not as simple as mocking in Java with an advanced mocking tool like JMockit. It could be hard to avoid accidental _integration_ tests with this approach.

<comment><USER3> Do you mean that you're worried that calling a method on DummyJob will accidentally run some code you don't expect?

If you don't initialize the embedded interface, non-overridden methods called on the struct will panic.

[http://play.golang.org/p/4aqGof1ikp](http://play.golang.org/p/4aqGof1ikp)

</comment></comment></comment></comment><comment><USER4> Anyone here have experience building a classical http Api with GO ? By classical i mean rest,json,with a sql db and a bit of business logic in the middle ?

Last time i checked i found the db part lacking a bit in expressiveness ( a bit raw ), but that was half a year ago.

Ps : to me, the best i've found so far is flask with sqlalchemy, and play framework in second place. But i'm bothered by the lack of static check in python and the general messy impression from scala. Go seems perfect as a language but maybe a bit limited for building a good db abstraction layer (or at least one with lots of boilerplate code removed).

<comment><USER5> There are also ORMs such as sqlx or gorp.

Personally, for a high performance API, I am a bit old school and I would rather for a given type Foo, I would rather write a FooDB struct that implements a FooDS interface. Everything in your app just uses FooDS. (DB = database, DS = datastore)

Your FooDB implementation could be using any number of underlying technologies MongoDB, LevelDB, SQL, etc and it can change as your app changes and this change is transparent to the rest of your app (since the rest of your app uses FooDS).

<comment><USER6> > Your FooDB implementation could be using any number of underlying > technologies MongoDB, LevelDB, SQL, etc and it can change as your app > changes and this change is transparent to the rest of your app (since the > rest of your app uses FooDS).

While this is a noble goal, when someone is building a new API or project, it's often impractical to commit to building an entire, full featured data layer in the process.

Also in practice, database connectivity ends up being a fairly leaky abstraction, even if you write a database abstraction layer. Behaviors around CAP tradeoffs will bleed into your higher layers and require refactoring if you switch from one DB to another (unless you're going from one RDBMS to another).

<comment><USER7> For REST APIs, writing the database queries are easy enough; and, often less painful than trying to figure out an API. I don't know of any Rails app that hasn't required some amount of custom queries. When you consider that the most coupled endpoints just require a few joins/group by's/nested function queries, writing the rest of the queries takes only as long as it takes you to type a few sentences.

You could easily have a Database type which offers a few methods (e.g. Do(), Query(), &Result) and export a map of these for each resource. Keeping track and reasoning about these is easy if you clean up and break up your monolithic app into packages.

</comment></comment></comment></comment><comment><USER8> Go interfaces are great, but channels are also an awesome construct for creating testable code.

Here's a simple example similar to something I wrote yesterday:

      type CloudClient interface {
        StartInstance() (string, error)
        TerminateInstance(string) error
      }

Given this interface, I can easily create a reusable mock that uses a channel to simulate method calls:

      type MockCloudClient struct {
        Returns chan interface{}
      }

      func (c *MockCloudClient) StartInstance() (string, error) {
        value := <-c.Returns

        if err, ok := value.(error); ok {
          return nil, err
        }

        return value.(string), nil
      }

      func (c *MockCloudClient) StopInstance(id string) error {
        value := <-c.Returns

        if err, ok := value.(error); ok {
          return err
        }

        return nil
      }

I can then use the mock to test various aspects of a dependent struct creating nice readable test code:

      func TestStartServiceSuccess(t *testing.T) {
        client := &MockCloudClient{make(chan interface{}, 1)}
        service := Service(&client)

        // simulate successfull startup
        client.Returns <- "instance id"

        err := service.Start()
        if err != nil {
          t.Fatal(err)
        }

        if service.InstanceId == "instance id" {
          t.Fatal("expected 'instance id' was '%v'", service.InstanceId)
        }

        client.Returns <- nil

        err := Service.Stop()
        if err != nil {
          t.Fatal(err)
        }
      }

      func TestStartServiceFailed(t *testing.T) {
        client := &MockCloudClient{make(chan interface{}, 1)}
        service := Service(&client)

        // simulate un-successfull startup
        client.Returns <- errors.New("start instance failed")

        err := service.Start()
        if err == nil {
          t.Fatal("service started succesfully")
        }

        if err.String() != "start instance failed" {
          t.Fatal("expected 'start instance failed' was '%v'", err)
        }
      }

As you can see the channel allows me to easily inject return values through the mock.

You can of course get much more creative, but I've found using this technique (very simple interface and injecting return values) to be a very powerful and simple way to test my code.</comment>


DevOps for Embedded - <AUTHOR> https://www.stupid-projects.com/devops-for-embedded-part-1/ <comment><USER2> Three particular comments stood out to me:

> It's not necessary to automate the 100% of your infrastructure

This is true IMHO, although it's a good goal to strive for, even if you fall short. I will add that if you get to 95 or 99%, the remainder should be well documented and that documentation shared within your team. There's nothing more frustrating than finding that the automation _almost_ works, but there's those one or two manual steps that require that one guy who is on leave this week. Even more so if those steps could have been easily automated. Rediscovering this stuff is usually wasted effort.

> Some would argue that also the coffee machine should be also included in the > automation process

Unfortunately, even in companies worth $1bn+, I've seen the devops guys working on the coffee pot because it's more interesting than automating that last 5% of stuff that only they know about.

> You need only to find the simplest solution for your problem.

This is another thing I've seen devops teams fall foul of - using a much more complicated solution than is necessary, introducing extra tools with extra dependencies when a line of bash, python or perl somewhere would have done the trick. They could/should have invested the time they would have spent on the complicated solution finishing off that last 5% of automation that is missing from the source control repository and/or documentation.</comment>


Ecuador says it has granted nationality to WikiLeaks founder Julian Assange - <AUTHOR> http://abcnews.go.com/International/wireStory/ecuador-granted-nationality-wikileaks-founder-julian-assange-living-52283700 <comment><USER2> I saw a more detailed article a bit ago on it and it said that Ecuador gave him citizenship on December 12th and then sent a request on December 20th for the UK to treat Assange as an Ecuadorian diplomat and all of the protections that entails. UK rejected that a day later.

edit: article in question - [https://www.yahoo.com/news/ecuador-grants- citizenship-wikile...](https://www.yahoo.com/news/ecuador-grants-citizenship- wikileaks-founder-assange-foreign-minister-170743866.html)

<comment><USER3> How does the UK deny a sovereign nation's determination?

<comment><USER4> Well, I guess nations do that all the time. Certainly I've heard of it in the last year or so.

      https://www.independent.co.uk/news/world/middle-east/turkey-erdogan-president-us-ambassador-visa-latest-a7993116.html
      http://www.telegraph.co.uk/news/worldnews/the-pope/11527987/Pope-Francis-refuses-gay-French-ambassador.html
      https://www.radionz.co.nz/news/national/254049/israel-won%27t-recognise-nz-ambassador

In a legal manner (and not because I'm a UK citizen) I presume the host nation can decline and then the proposing nation can find another one or send them anyway but risk that he falls foul of the law and the host country does not recognise any diplomatic immunity. In this case though, if the UK declines then he is still stuck in there with no way out.

I think its kind of strange really that we have spent all this money pursuing this guy for what was a minor warrant (that they wanted to speak to him) which has since been cancelled and think that we (the UK) should just say enough already and turn a blind eye to him leaving on a jet plane. Oh yeah, but the strange part is that it really seems as if its _important_ to somebody that that doesn't happen.

<comment><USER5> the warrant was revoked, but prior to that he skipped bail, which is contempt of court

at worst it's a year in prison

</comment></comment></comment></comment><comment><USER6> I know there's not much more to say, but I think it's pretty funny that the title is also the contents of the 'article'. Is this someones tweet that was published as an article?

<comment><USER7> it is this tweet [https://twitter.com/AP/status/951486396618956802](https://twitter.com/AP/status/951486396618956802)

</comment></comment><comment><USER8> How much longer can the UK threaten him with arrest for breach of bail triggered by a closed procedure in a foreign country for a now-deemed-non- existent crime? is there a limitation period -- 10, 15, 20 years, or will he be hounded in perpetuity?

<comment><USER9> it doesn't matter what the law is, they'll bend the law

</comment></comment><comment><USER8> If one were in his position, how would one scheme a safe escape from the UK?

I can imagine scenarios to leave the embassy building (mob action, disguises...), but then what?

<comment><USER10> Do the UK authorities have to post agents all around the embassy 24/7 to be sure he doesn't just walk out?

<comment><USER8> They did until 2015 [1]. The UK government estimated that cost over GBP 12 million.

[1] [http://www.bbc.com/news/uk-34508500](http://www.bbc.com/news/uk-34508500)

</comment></comment></comment><comment><USER11> And right back to where he started. Its contingent on the UK to decide Assange's fate and their is no indication that they have changed their mind.

</comment><comment><USER12> I don't know why, but the first thing I searched for after reading this was: the CIA runs Ecuador.

Turns out, they do. I figured the overlords of the drug trade would want to make their home near the place of production. This is just theater.

<comment><USER13> Citation? You'll need a smoking gun.

<comment><USER12> Search for the same phrase? There are plenty.

Also, I don't need a smoking gun because I'm not bringing anybody into a court for trial.</comment></comment></comment>


Apple's New Map, Expansion #7 - <AUTHOR> https://www.justinobeirne.com/new-apple-maps-continental-united-states <comment><USER2> Excellent before & after Gifs of major cities.</comment>


Ask HN: Is the holiday season a good time to show one's project on HN? - <AUTHOR> Is it better to wait until January? <comment><USER2> My advice is to share the project as early as possible because that provides feedback sooner rather than later. In addition, it might be the case that during periods of relatively low traffic, the project has less competition for attention. It might also be the case that the fraction of casual users/asshats/trolls is lower [even thought the number of total users is also lower].

Again, just post it.</comment>


Ask HN: Which startups are hiring Product Managers in Silicon Valley? - <AUTHOR>

<comment><USER2> Hey Emile,

Here's what I'd do:

1\. Pick 3 - 4 startups you have to work for. Like would die to work for.

2\. Identify 3 or 4 projects you know they know they need done. It might be web design related, sales, marketing, etc, etc.

3\. E-mail them and say here are the 3 projects I've identified from the outside. Here's how I would do them. If you'd like to get more in-depth we can meet up.

<comment><AUTHOR> Thanks Noah - great advice!

</comment></comment><comment><USER3> 23andMe is hiring across the board (PM, Eng, Design). You'll work with tight- knit and talented team on a breakthrough product. Let me know if i can answer any questions: mikep _at_ 23andme.com

<comment><USER4> An apt handle you have.

</comment></comment><comment><USER5> [http://startuply.com/#/product%20manager%20in%20silicon%20va...](http://startuply.com/#/product%20manager%20in%20silicon%20valley%2C%20ca/1)

</comment><comment><USER6> Hi Emile,

AppMakr is hiring a variety of positions, including a product/project manager. Apply here: <http://www.appmakr.com/hiring/>

We're also looking for a senior Android developer, iPhone developer, and a web developer that's really good with Python/Django.

AppMakr is a platform helping anyone build mobile apps in 15 minutes or less with no coding experience required. We're based in San Francisco and recently closed an angel round.

Looking forward to hearing from you.</comment>


Ask HN: Americans, how would you change the H1B visa? - <AUTHOR>

Immigrant visas, most notably the H1B, is a hotly and long debated topic on HN and elsewhere. There seems to be three camps: the employers who claim that they can't find enough skill employees in the US, the want-to-move-to-US employers that just want to live and work in the US, and the American groups that opposes H1B either on ethical reason (indenture servant of the H1B employees), or out of job concerns for themselves (the employees are using H1B to repress wages) . Considering that all of us are probably biased to our own selfish reasons, the truth is probably somehwere in between.
That said, one of the things I've noticed about the third group is the lack of proposing of solution. Yes, the H1B is a very shitty visa, and as one of those currently on OPT with large group of friends who are also immigrants in one way or another, I can say with certainty that H1B is not a visa I want to be on. If you're opposing the H1B visa, what do you have in mind as an alternative system? Do you prefer a more restrictive, more open process/ visa? Or for some reasons I don't have yet an alternative that you like?
If at all possible, I'd like to hear a best-case "if I have magic" solution, and one that you think is a more realistic scenario?
Since this is a very emotional topic, please do read anything in this post, as well as the comments in good faith. <comment><USER2> Problem: Indentured servitude of H1B visa holders

Solution: Make any sort of "lock-in" illegal. No fees paid to employment agencies, no penalties for leaving early, no posting bonds, no contractual periods of work. Anything that keeps an H1B locked to a particular employer should be illegal.

Problem: Getting brightest engineers without causing wage suppression

Solution: Leave the cap where it is for now and bid for H1B talent so market forces can work. If the lowest bid is over say, $100K, maybe consider raising the cap.

Engineers are the raw material for tech companies and naturally, they'd like to keep their costs low. This has nothing to due with "keeping America competitive" and everything to do with sharing less of the value created with the engineers who created it in the first place.

</comment><comment><USER3> I think the emphasis should switch from employers to our citizens. In the US, we have the ability for everybody to be employed - if we required that everything that is sold here be made here. That would instantly improve everyone's quality of life.

But perhaps the biggest advantage is that it would allow us to stop the hiding of profits offshore and using derivatives - literally trillions in profits are being extracted and hidden pre-tax.

I would argue that every country should consider their own citizens first - and only after everyone has gotten to some reasonable standard of living should we consider outsourcing, offshoring, and foreign workers. Ironically, we could do much more for everybody in the world if we first fix the corruption in our own economy.

<comment><USER4> >"In the US, we have the ability for everybody to be employed - if we required that everything that is sold here be made here. That would instantly improve everyone's quality of life."

No. There are already enough limitations on international trade. Trade allows the transference of the creation of products or services to other countries which are more efficient with their own resources. Allowing both parties to focus on what they're good at. Benefitting both parties to the highest degree.

>"But perhaps the biggest advantage is that it would allow us to stop the hiding of profits offshore and using derivatives - literally trillions in profits are being extracted and hidden pre-tax."

They're not 'hidden' if you know about it. The company has a responsibility to their shareholders to use their scarce resources in the most efficient manner, that means moving their money to the area where the government forcibly takes the least.

>"I would argue that every country should consider their own citizens first - and only after everyone has gotten to some reasonable standard of living should we consider outsourcing, offshoring, and foreign workers. Ironically, we could do much more for everybody in the world if we first fix the corruption in our own economy."

Please specifically define "reasonable standard of living". If a country only used the resources which are inside its borders they would not be able to produce a large amount of the goods and services which we currently enjoy, it is not feasible to grow all crops, produce all goods and provide all services within the confines of a countries border.

<comment><USER3> Where do I start? Do you really believe Niall Ferguson when he says that all trade is good trade?

But let me address the hidden money issue. I worked for one multi-billionaire who set up offshore "parts" manufacturing to act as a middle man supplier to offshore companies. He inflated the costs to the company so that he and the other executives could extract billions.

At another company offshore "services" were set up to do various fake consulting engagements. We are talking billions and billions for the executives.

There were literally mazes of offshore companies through different countries, with many different classes of stock - owned by various groups of executives, bankers, and competitors (as payments for helping kill common competitors or dropping products to create effective monopolies in market segments.)

So maybe you really believe the things you're saying...they are the standard propaganda. But I've been working with the guys who have figured out how to legally hide their money - so I know better.

<comment><USER4> You haven't adressed any of the points I made, please take another look at them and address them individually. Your anecdote was hazy, unspecific and irrelevant.

<comment><USER3> This is just a comment section - not an economics class or a tutorial on offshore stocks and derivatives and their potential applications. If you find my comments irrelevant you should just ignore them - I'll do the same for you.

<comment><USER4> In other words, you'd rather spit out a meaningless incoherent story than bother to address and of the points I made.

</comment></comment></comment></comment></comment></comment><comment><USER5> A Master's degree from an accredited US university should get an automatic green card. We need extra enforcement so that certain academic departments at state U's don't become diploma mills. H1B should be ended. It's purpose is just to create an indentured class and that is un-American. All green card grantees should have to undergo diversity training because I see a lot of ethnic purging/discrimination by foreign managers in the US. Ethics training and enforcement needs to be upped also to keep foreign style systemic bribery out of the US.

</comment><comment><USER6> > a more realistic scenario?

We're competing for talent in a global market place. Current US policy forces foreign graduates of US universities to return home in most cases.

Canada however; has a smart post-graduate work permit worthy of emulation. Seems like a good place to start H1B Visa reform. > [http://www.canadavisa.com/post-graduation-work-permit- progra...](http://www.canadavisa.com/post-graduation-work-permit-program.html)

</comment><comment><USER7> Scrap H1B and legislate a point based system to offer work permit directly to the employee.

</comment><comment><USER8> [http://keepamericaatwork.com/we-should-be-cheering-for- india...](http://keepamericaatwork.com/we-should-be-cheering-for-india-if- this-is-true/)</comment>


Hacking for Jesus: Top projects from 'Code for the Kingdom' - <AUTHOR> http://www.geekwire.com/2014/faith-based-hackathon-meets-impact-hub/

<comment><AUTHOR> Some of the projects, I quote from the article, included "apps to fight human trafficking, streamline the process of connecting homeless people to social services, organize volunteer efforts and better meet the specific needs of non-profit medical teams".

It sounds like a very noble set of causes but I am disappointed by the need to invoke magic sky man to get this stuff done. I'm glad some good came of this, but really really hope that the participants weren't simply doing it in hope of some reward in heaven? D:</comment>


Ask HN: Who uses Discord for work? - <AUTHOR> I've been seeing some open source communities migrate to Discord from Slack. But are there companies that are doing the same migration? <comment><USER2> Our devs have integrated themselves into Slack's API's heavily. I don't think we could bribe them enough to move away from it.

Does Discord have all the same integration API's, hooks, etc? Can you set data retention policies per org?

</comment><comment><USER3> We started using discord about a month ago. It was a blessing. Some engineers work remotely, while others work from HQs. We were using Google Hangouts, but GH lacks the ability to silence the remote user locally. If you silence a user, he must undo the silencing himself, which didn't fit well in our use case.

Engineers who were not working from HQs could not stand all the crazy sounds that came through office mics, so eventually they'd had to quit and be accessible only through slack.

The fact that discord allows us to press a specific key before talking, is amazing. It solved one of the hardest problems we had.

</comment><comment><USER4> We have been using Discord at work but not for work. Unfortunately it is the only thing they haven't blocked other than HipChat and we all know HipChat ain't the greatest.

</comment><comment><USER5> I use Discord to post plans for my service. Everyone complains it doesn't send enough notifications. This is what I really like about slack. You never miss a mobile push notification, with Discord, sometimes you get a notifications, others you don't. It's hit or miss.</comment>


SpaceX SES-9 Mission Webcast - <AUTHOR> https://www.youtube.com/watch?v=Ml1RO4IcOG0 <comment><USER2> scrubbed for today :(</comment>


SpaceShipTwo has experienced an in-flight anomaly - mkr-hn https://twitter.com/virgingalactic/status/528233343599394817 <comment><AUTHOR> Sad day for space travel.

This happened between 10:07am and 10:13am

[0] [https://twitter.com/AlteredDeal/status/528246983803564032](https://twitter.com/AlteredDeal/status/528246983803564032)

[http://www.broadcastify.com/listen/ctid/197](http://www.broadcastify.com/listen/ctid/197)

[https://twitter.com/ABC7/status/528254343024111616/photo/1](https://twitter.com/ABC7/status/528254343024111616/photo/1)

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

</comment><comment> mkr-hn No clear info at the moment, but this is the original source, and will be the place to go for more details.

Some say parachutes have been spotted, some say no parachutes are on board. The usual uncertainty in situations like this. Most information at this point is second-hand from people listening to EMS scanners.</comment>


Getting the cow out of the ditch - <AUTHOR> http://www.economist.com/node/15496136a <comment><USER2> Broken link (the "a" at the end should not be there). Correct is [http://www.economist.com/node/15496136](http://www.economist.com/node/15496136)</comment>