HNHacker News
TopNewBestAskShowJobs

chrisfarms

1,029 karma · joined May 6, 2010

Web Developer, Brighton UK
submissionscomments
chrisfarms··on Email Regex that works 99.99%
Yeah this is not great practice.

We built an app where sending a validation email upfront was not a practical option some time ago, and the best strategy I found for ensuring the email was valid was to lookup the MX records and ask the mailserver for the given domain, by issuing RCPT commands. Many mailservers will just drop connections when RCPT is for someone who doesn't exist or can't be routed to which was a good indicator of a typo or invalid address. And of course if the MX lookup fails the domain is incorrect.

Still wouldn't recommend this method either though really.

chrisfarms··on Facebook's Name Policy Strikes Again, This Time at Native Americans
heh...

> (#11) People’s names are all mapped in Unicode code points.

Well, not really sure how to fix that one!. Maybe one day postgres will be able to index a column of handwritten images, but until then I think I'll just stick with being 99% ok.

chrisfarms··on Earth Primer
This looks pretty great.

Getting closer to a world where The Young Lady's Primer is possible :)

chrisfarms··on Datapath.io: Provider-Independent Elastic IP Addresses
I assume this is BGP routing as a service (which sounds cool).

But, would this not break the internet if everyone used it? routing individual IPs (rather than large blocks) sounds like it would end in chaos?

chrisfarms··on Riot – A React-like, 2.5K user interface library
Fantastic intro doc. I read the entire thing without really thinking. I like the aim, and I think I could learn to accept the weird looking javascript floating in the root node (though I think it might look easier on my eye if wrapped in a <script> tag, even if that tag is redundant)

But, I would _really_ love to see some render time benchmarks with large (2K+) loops adding/removing deeply nested nodes. This is where React really shines in my opinion, and I'm struggling to believe that Riot can compare with the implementation described.

chrisfarms··on Errors are values
One thing I love about the repetitive err pattern is that I find my self wrapping/appending errors with useful context more frequently (rather than say catching an exception five frames further down and just appending "mylib: oops").

I realise the later was just laziness on my part, but the constant err checking really does force good habits on me, which of course yields higher quality code that's easier to reason about when something goes wrong.

chrisfarms··on “Why does a car like the Tesla still have old-style fuses?”
When I first moved into my flat I discovered that the previous owner had wedged some kind of brass plate across the contacts for the cooker circuit. Terrifying.
chrisfarms··on Doom as a tool for system administration (1999)
UNIX groups could be handled by KeyCards, with the nice weird additional feature of User1 being able to let User2 into an area usually outside their permissions.

But really... idqd ... now bring on pid 1!

chrisfarms··on Encrypting Amazon RDS Resources
I see, thanks.

So there _is_ extra¹ care taken over the protection of the keys vs the protection of disks to significantly raise the barrier.

¹not saying that they just leave their data centers open to the public, but you know what I mean :)

chrisfarms··on Encrypting Amazon RDS Resources
This is encrypting the disk that the RDS instance is using to store the data right? And amazon are holding the decryption key.

What exactly is this protecting against? (Genuine question not rhetoric).

Without encryption, I guess someone with physical access to an Amazon data center could pull a drive somewhere and grab the data.

With encryption, that same person would also have to get hold of the key as well, but nothing seems to be said about the key storage being in some separate super secure location, so could that same malicious employee with physical access not also go on a key hunt and end up getting access anyway? So it's just another "layer" of protection not totally impossible.

.... or am I missing something crazy obvious where an unencrypted RDS disk is accessible by some other means? Maybe via to nature of disks being reused without proper cleaning or similar?

chrisfarms··on Echarts 2.0
This looks incredibly comprehensive! ...almost too good to be true, I'm waiting for the gotcha....

Does anyone have any experience to share experimenting with it yet?

chrisfarms··on Show HN: WordsAPI
The data is stored in postgres, so it should be simple enough to use the Snowball dictionary/stemmer and the tsvector/tsquery functions to sort this out.
chrisfarms··on An airline that has made sure its airplanes won't disappear
Maybe you're paying for the guaranteed access to the satellite network when it's needed rather than the tech on the plane itself. ....and of course a bit of a "no competition so deal with it" charge.
chrisfarms··on Wifiphisher: Fast automated phishing attacks against WPA networks
The key (nor a hash of the key) is sent over the air. It's a challenge. Since both sides should know the key they can challenge each other by saying things like "encrypt the word 'horse' using our secret key" ... then they can compare the result.
chrisfarms··on A Day in the Life of a Kiva Robot (2011) [video]
Yeah I thought this too. I guess treating the warehouse as a 2D grid vastly simplifies everything from algorithms to robotics so much that the reliability out ways any inefficiencies.

Presumably they could make the stacks shorter and have more "floors" to increase efficiency of each trip.

chrisfarms··on ModelQ is a code generator for creating Golang codes to access RDBMS
I experimented with a similar idea a couple of years ago for pre-generating structs from postgres[1]

Abandoned it pretty quickly though as I didn't find it idiomatic enough, and found the extra compile step rather annoying.

[1] https://bitbucket.org/pkg/pqm

chrisfarms··on Show HN: A search engine for python syntax
Is "syntax" the right word there?
chrisfarms··on DigitalOcean partners with Mesosphere
You can customize the cluster ... if you drop down to single core machines you could get a development cluster (1 master, 3 slaves) down to about $40/m I believe.
chrisfarms··on The fundamental problem of programming language package management
Nix, NixOS, Nix ... a thousand times Nix.

I can't believe the article doesn't mention it.

I've been using NixOS as my OS for development, desktop and we're in the middle of transitioning to using it for production deployments too.

Nix (the package manager not the distribution) solves so many of the discussed problems. And NixOS (the linux distribution) ties it all together so cleanly.

I keep my own fork of the Nixpkgs repository (which includes everything required to build the entire OS and every package), this is like having your own personal linux distribution with the but with the simplest possible way of merging changes or contributing from upstream.

I use it like I'd use virtualenv. I use it like I'd use chef. I use it like I'd use apt. I use it like I'd use Docker.

http://www.nixos.org

chrisfarms··on Why does Outlook map Ctrl+F to Forward instead of Find?
What I really like is when you get random J's in emails from people.

Took me a while to figure out this is some kind of autoreplace thing in Outlook that switches out emoticons with characters from the wingdings font, and J is a smiley face.

chrisfarms··on Jrnl – A simple command line journal application
If you are relying on that encryption, just remember to clear your bash history :)
chrisfarms··on Why Atom Can’t Replace Vim – Learning the lesson of vi
Ag [1] has served me very well if you haven't come across it.

[1] https://github.com/rking/ag.vim

chrisfarms··on Using the wrong dictionary
We always play a scrabble rule where you can challenge someone to give a definition of the word they "claim" is real ... and if the definition is not in the chosen dictionary, then they are not allowed it ... even if it's a real word.
chrisfarms··on Baby Name Predictor
> Adolph last peaked in 1913 . It will next peak as a baby name in 2029.

Well it's bound to come back someday I guess, 2029 is as good a time as any :)

chrisfarms··on DynDNS ends free services
We've been using dnsmadeeasy[1] for years. There's something dated about their interface/presentation, but the service has been rock solid and fast since day one.

[1] http://www.dnsmadeeasy.com

chrisfarms··on StoreDot’s Bio-Organic Battery Tech Can Charge From Flat to Full in 30 Seconds?
I believe they are referring to the use of Cd in displays that utilize Quantum Dots (QD-LED) not regular LED/LCD displays.
chrisfarms··on Ask HN – Simple APIs Without Authentication?
Yahoo weather API[1] might be usable.

A Text-to-Speech API[2] could be fun for kids I guess.

[1] http://developer.yahoo.com/weather/

[2] http://tts-api.com/

chrisfarms··on [dead]
Start of original discussion thread:

http://lkml.iu.edu/hypermail/linux/kernel/1404.0/01327.html

chrisfarms··on Generator For Fullwidth Characters (2011)
It wouldn't have done anything for ranking ... but I guess the idea was to increase click's the same way people used to love a good...

    `·.¸¸.·´´¯`··._.· My Homepage `·.¸¸.·´´¯`··._.· 
..type <title> banner to get attension.
chrisfarms··on PostgreSQL Columnar Store for Analytic Workloads
I've never really digged into column-oriented storage, so had a quick skim... Would the below excerpts/example be a fair note of pros/cons of the general idea?

> Column-oriented organizations are more efficient when an aggregate needs to be computed over many rows but only for a notably smaller subset of all columns of data, because reading that smaller subset of data can be faster than reading all data.

Example: SELECT sum(a) FROM things;

> Column-oriented organizations are more efficient when new values of a column are supplied for all rows at once, because that column data can be written efficiently and replace old column data without touching any other columns for the rows.

Example: UPDATE things SET a = a+1;

> Row-oriented organizations are more efficient when many columns of a single row are required at the same time, and when row-size is relatively small, as the entire row can be retrieved with a single disk seek.

Example: SELECT * FROM things;

> Row-oriented organizations are more efficient when writing a new row if all of the row data is supplied at the same time, as the entire row can be written with a single disk seek.

Example: INSERT INTO things (a,b,c,d,e,f,g) VALUES (1,2,3,4,5,6,7);

← PreviousPage 2 of 8Next →