Like what you see? Subscribe here and get it every week in your inbox!
Issue #35 - November 3, 2019
If you are looking for work, check out this month's Who is hiring?, Who wants to be hired? and Freelancer? Seeking Freelancer? threads.
Here are the top threads of the week, happy reading!
1. Ask HN: What is the most beautiful piece of code you've ever read?
Top comment by vatys
For me it's a BASIC one-liner which generates mazes
10 PRINT CHR$ (205.5 + RND (1)); : GOTO 10
I found this specific one via slashdot[1], but something similar, which I've never managed to find/replicate, was used to generate mazes on the Atari 800 XL at my school when I was a kid.[1] https://developers.slashdot.org/story/12/12/01/1847244/how-d...
2. Ask HN: What is your passive income 2019?
Top comment by gkoberger
I built an escape room! Startup Escape (https://startupescape.com), a parody of startups where you have "$1M to launch your startup" (1 hour to escape).
It's a physical game in San Francisco, but it's run day-to-day by a manager. Overall it makes about $15k/mo, and after rent/labor/etc I just make a few thousand dollars a month.
3. Ask HN: How do B2B startups sell to corporations?
Top comment by markbnj
The advice I'll give is based on my experience as cofounder of an early online banking technology company back in the mid-90s. We started with three people in rented class-C space and over seven years did high six-figure deals with large and small banks including Fleet, Bank of America, Citi and others.
There's not really a "how it works" for this. If I had to tell you how it works I'd say: it works by you making friends inside a corporation and convincing them to buy your product. Did that help? :). Probably not, so here's a little more: you preferably start with a member of your founding team who is articulate, outgoing, amiable and enjoys meeting and talking with people. That person needs to know the product and competitive environment cold, and it helps if they are passionate believers in the value prop. They need to have an identified list of target companies. They need to start calling and emailing and working contacts to get meetings. Eventually, if you actually have a value prop, one of those meetings will result in a relationship with someone who is willing to champion the product internally.
You then work outward from that contact, meeting with their colleagues, eventually identifying decision makers who control actual budget that can be used to pay you for something. If you do all this skillfully then you may get them to commit to a purchase. They will then have to shepherd you through a potentially long series of internal policy and legal hurdles. You may need to get on a qualified vendor list, or meet certain business stability criteria. You will likely need approvals of the deal from different departments, and their legal team will review and try to negotiate any agreements you request them to sign. You can see why developing internal champions is absolutely critical. In every single successful deal we did, by the time we got to the second or third round of meetings our internal champions were doing most of the selling.
The last thing I'll say is that it can be powerfully tempting to think you can purchase success at this by hiring the right magic person who can work their little black book and make sales happen. I tend to doubt it, and it definitely never worked for us. A founding sales person can make this happen. That's the person I'm talking about above. But just bringing in a hired gun is unlikely to result in success imo. I think you need to believe in your own thing enough, and be good enough at talking about it, that you can land your first few deals. Then when you do bring aboard professional sales people you'll have some actual idea of why people buy from you and how to systematize the approach. Good luck with it!
4. Ask HN: What do you automate in your life and work?
Top comment by acidburnNSA
Lots of home automation fun with Home Assistant (https://www.home-assistant.io)
* Self-hosted security system that e-mails me when triggered. It arms when everyone disconnects from the wifi and disarms when anyone in the home reconnects to wifi. Totally passive. Also arms at night when the kitchen lights have been out for 5 minutes after a certain time and disarms when motion patterns that can only be someone waking up are sensed.
* E-mails work and personal when smoke alarm goes off or when water is detected in basement
* E-mails pic from front door camera when doorbell pressed (yeah, like Ring, but with a ESP8266 monitoring my normal doorbell)
* Voice reminder on garbage day
* Northern loon call exactly at each sunset
* Ambient jungle noises and lights on when I wake up and it sees me
* Laundry timer + reminders
* Vacation mode random lights on/off
* Plays a Ship's bell chime on the hour, but only during daytime (ambiance)
* Tones when any outside door in the house opens. Optionally: random Seinfeld bass transitions
* Alert for power outage
* Alert if my mom's house temperature goes too low in winter when she's away (I've called the plumber to fix the furnace thanks to this)
* Turn on A/C if temperature above threshold at 4:00pm in anticipation of my return from work
Stuff like that. Loads of fun. Lots of fiddling.
5. Ask HN: I just wrote an O(N) diffing algorithm – what am I missing?
Top comment by ridiculous_fish
Diffing means computing the longest common subsequence (LCS); the edit script is everything that's not part of the LCS. The proposed algorithm greedily finds a matching element. However it may be that it would be better to skip this element, and not incorporate it into your sequence.
Consider the following sequences (here each letter represents a line).
AAAB
BAAA
Where the first one is "left" and the second one is "right".The LCS is AAA. The minimal edit script from left to right is:
1. Insert B at beginning.
2. Delete B at end.
The proposed O(N) algorithm finds B as the first matching line, and thereby exhaust `left`. So it finds the common subsequence of just "B" and its edit script is:
1. Delete 3 As at beginning
2. Insert 3 As at end
which is longer.
6. Ask HN: Getting started in biology with a software background
Top comment by iongoatb
I'm curious who all these sarcastic bio "experts" are that are suggesting getting a PhD or hiring one. I'm a former bio major and researcher/scientist that transitioned to software engineering years ago. I've published papers in bio and worked with many PhDs. Many of them were idiots. Being a PhD doesn't mean anything, it's the independent work that you put in yourself (in an academic lab or by yourself) that determines how skilled you become.
If you have strong CS skills then you should:
1) Focus on bioinformatics. You will immediately be of use as far as making your own product/service or working for a startup if you apply your skills there. Most bio specialists are incredibly weak at data analysis and/or any type of computing. Pretty much all the important problems in bio are computational in nature. The "impressive" bio researchers/scientists have the data science skills of a sub-par / average data scientist / CS grad.
2) Create a home lab or find one / start one locally. Look up the odin project. Work on DIY genetic engineering and you can even take classes from that site. If you just get to this point and stop you will literally have more practical skill and knowledge than the vast majority of graduates with bio degrees.
3) Lots of biohackers experiment with themselves for clout/hype/attention. It never ends well. There are plenty of lab organisms that you can easily source and ethically experiment with.
4) Don't listen to anyone that tells you that you can't do something because you don't have a PhD. Those are the same type of people that missed out on the computing and internet revolutions because they were busy doing trivial academic work.
7. I'm a Google SWE that's coached 50 through the FAANG interview process. AMA
Top comment by dilyevsky
Don’t you think it’s silly that Google’s interviews are so ineffective that candidates need to learn how to “game” them? Asking as someone who’s been on both sides of Google’s interview process.
8. Ask HN: What are some resources to improve speaking skills?
Top comment by the_watcher
There's a reason Toastmasters is so recommended in this thread: it's really good at what it is, so try that out.
For other options, try speaking a lot more in low pressure situations. At work, try small groups to start. Ask your manager if you can lead a team meeting where the agenda is defined, and your role is just to facilitate discussion. Present your work to 3 teammates and ask them to hold questions until the end.
In your personal life, if you are a regular at a coffee shop or lunch place and see the same person repeatedly, learn their name, then ask them how they are doing whenever you see them. Try to actually answer with something specific when people ask how you are doing. If you have kids or access to them (young relatives), try reading out loud to them. Join a writing seminar that asks you to read your work out loud.
The above are just a laundry list of ideas, the point is basically "find low pressure environments to speak, do it as often as possible, vary the scenarios."
9. Ask HN: Best language to share code between an Android and iOS app?
Top comment by toast0
Since no one else has said it, I'll be the voice of reason.
Share your design specs only, and let each platform team write the implementation in the language that they think best.
Yes, you'll have two teams spending time on doing the same thing. However, you'll get important benefits.
Each team will be able to implement appropriately for their platform. While iPhones and Android phones are rather similar in terms of capability, the interaction models have a lot of differences, and forcing a common component often results in non-native feeling apps. Users will be at best confused, and at worst insulted by this.
Additionally, when you have two teams working on similar problems, they can help each other. Training on this interaction with things known to be pretty much the same helps people realize they can do it with things that aren't obvious. Meeting on a regular basis to discuss things that worked/didn't on the various platforms will help them all.
10. Ask HN: Does anybody make good money from Google Adsense?
Top comment by aks232
I used to make decent amount (for my purposes) around $1000 a month. This was when the ads were based on the content. Then a few years ago they based ads on the user (as personalisation is all the rage) which for me was ridiculous as my site was about general social, political and environmental issues, so you'd end up seeing an add about shoes or something you were shopping for on another site which was completely unrelated to why people came to my site and completely out of context so the ad clicks and revenue dropped while site usage was growing. No way to reach a human to change it back. Some option on AdSense implies you can but has not worked.
Also at some point got banned for false clicks except the site they said that was violating their policy was not mine. Their automated responses of course did not help. Only a few months later a friend of a friend who luckily worked on the team was able to reinstate the account (but not the list revenue in the meanwhile if course). turns out they had a big they didn't admit false flagging my site. Wonder how many others they caught out...
Have ended up sticking with them as don't have time to look for alternatives (tried Chiquita but not very good). (The site is a side project only.) Would like to build my own niche for maybe non profits only, though I'm sure someone has done that already so I probably need to just invest some more time to look into it more...