HNHacker News
TopNewBestAskShowJobs

justin_vanw

3,049 karma · joined June 2, 2009

submissionscomments
justin_vanw··on Kafka: An End or a Beginning?
I've been on HN for about 10 years now... It used to be 99.99% on topic stories about startups and technology.

Now it's just random 'interesting' things? That's what reddit is for IMO.

justin_vanw··on Writing more legible SQL
So I think it is much easier to read if you can line up like clauses:

  SELECT spf.blah_blah,
         count(*) AS cnt
    FROM jv_CTLG_ENTITY_ATTR_PROD_MAP prod_map
    JOIN jv_SSA_PRODUCT_FACT spf
         ON prod_map.prod_ref_id = spf.PROD_REF_ID
   WHERE prod_map.INVSBL_IND = '0' AND
         spf.LSTG_END_DT >= date_sub(from_unixtime(unix_timestamp()), 2) AND
         spf.LSTG_START_DT <= date_sub(from_unixtime(unix_timestamp()), 2) AND
         spf.lstg_site_id = 0 AND 
         prod_map.ENTITY_ATTR_TYPE_DESC IN ('BMPN','GTIN') AND
         spf.CTLG_ID = 1075 AND
         spf.LSTG_TYPE_CD NOT IN (10,12,15)
  GROUP BY spf.blah_blah;
justin_vanw··on Introducing TJSON, a stricter, typed form of JSON
wow, this looks awful and painful.

There's no reason to tag the type of a field when you have a typed syntax. The real problems with JSON aren't at all addressed by this:

keys have to be strings lack of 'attributes' like xml, which means you have to make a document convoluted from the start.

For example, lets say I am storing product data, I might do it like:

{'title': "Billy goes to Buffalo", 'page_count': 193, 'author': "Ray Broadbunky"}

But later I might want to be able to store attributes or metadata, in xml this doesn't change the schema of the document:

<product> <title>Billy goes to Buffalo</title> <page_count>193</page_count> <author>Ray Broadbunky</author> </product>

Can be extended to:

<product> <title human_verified="false">Billy goes to Buffalo</title> <page_count human_verified="true">193</page_count> <author human_verified="true">Ray Broadbunky</author> </product>

It's not beautiful but anything using this data will not have to change at all to add any metadata like this.

However, with JSON you have to either add new data that can somehow be joined to the data originally, or more commonly you have to be very defensive and 'plan for' this stuff, greatly complicating the schema.

You end up starting with: {'attributes': [ {'name':'title','value':"Billy goes to Buffalo"}, {'name':'page_count', 'value':193, ...

so that you can add unanticipated things later without breaking consumers of the data

but at least some are addressed: no standard way to store bytestrings lack of time type

justin_vanw··on Parse strings using a specification based on the Python format() syntax
so you take %s and replace it with .*? (Checking... Yep, basically this, but with a super ugly regex)

This library should include the tagline "why learn something useful like regular expressions, when you can use some custom library with 1/10th the power!"

justin_vanw··on How to Crash Systemd in One Command
I think it's probably not that valuable to write a blog post. Lets see if the UMASK problem, which is totally legitimate and the blog post makes a great case for fixing, actually gets fixed.
justin_vanw··on A MacArthur winner wants every child in the world to own a microscope
What? I don't know what you're talking about here.

I'm talking about basic human needs. A microscope is a dumb thing to hand to someone that is hungry.

justin_vanw··on How to Crash Systemd in One Command
Since shell scripts are Turing complete...
justin_vanw··on How to Crash Systemd in One Command
I don't know launchd, but upstart was a piece of crap that didn't even implement it's own documented functionality.
justin_vanw··on How to Crash Systemd in One Command
I basically agree with everything you're saying, I just think if the people who think systemd is misguided spend their time writing blog posts about it, nothing will change and the people actually writing the code will have the final say, right or wrong.
justin_vanw··on How to Crash Systemd in One Command
Agree 100%. There isn't some magic potion that makes commands compose simply and efficiently.
justin_vanw··on How to Crash Systemd in One Command
What are the other choices? Upstart was awful, and init is a hundred years old.
justin_vanw··on How to Crash Systemd in One Command
It seems like it is quite fashionable to hate on systemd, and it seems like systemd is kindof a piece of crap - in some ways.

However, linux is missing basic functionality other os's offer, and systemd is showing up and trying to fill in those blanks. This is open source, if you don't like systemd, if you think it's crap, if you think there are obviously better ways to do it, well, what are you waiting for then?

Systemd is winning because they showed up and basically nobody else did. It's open source fork it and 'do it right'. Or point out the problems and hope that someone else will step up instead?

I think the world would better place if people spent less time griping and more time fighting to get their patch that fixes the problems merged. I guess coding is harder than writing blog posts though.

EDIT: I'm not saying systemd is perfect or even good. My point is that the people writing the code are going to have the final say, whether it's right or wrong, and it is unlikely that people writing blog posts lampooning it are really going to make a difference. I mean systemd has been despised and highly criticized from the beginning, and look where we are.

justin_vanw··on A MacArthur winner wants every child in the world to own a microscope
It's not a false dichotomy, it's an actual dichotomy. Handing out microscopes vs handing out malaria medicine. If you can do both, that is wonderful, but we aren't even doing the malaria medicine very well, it's probably not time to start figuring out our microscope plan.

But lets just be honest here, getting every kid in the world a microscope is a dumb idea. Most kids that have microscopes don't use them, they collect dust, and then get thrown away eventually. For the handful of kids that actually use them, the kind of microscope you would be able to afford to give out to everyone would be a piece of crap.

justin_vanw··on A MacArthur winner wants every child in the world to own a microscope
Well as nice as it is for kids to have things, and I'm sure someday humanity will be wealthy enough in all locations on the globe to afford this, we should probably start with basic sanitation, vaccinations, nutrition, and education, ... (500 other things more important) ... and then microscopes, in about that order.
justin_vanw··on How three-day weekends can help save the world
Why not a 5 day week?

5/7 == 71.4% of days are work days

3/5 == 60% of days are work days

So we would lose 11% of working days, but you would get a weekend after every 3 work days.

I think the main objection would come from various religions which have hard-coded a 7 day week, but if they picked one holy day out of 5, that is even more visits to the designated building of that religion every year, so it seems like they could get on board with that.

justin_vanw··on Why are so many BASE jumpers dying?
They jump off of things.

Not to be too glib, but if it was, 'safe' nobody would be interested in watching them do it. If many didn't die doing it, well that is what safe means.

For example, my 12 hour video "United Flight, Coach, Extreme Red Eye" got way less views.

justin_vanw··on How I Built a Custom Camper Van (2015)
Awesome story, loved the pictures of building out the van.

One concern I have is that if you are idling the engine and have the fantastic fan on, wouldn't you be sucking exhaust fumes into the vehicle? Or is the hole at the back meant for exhaust with the fan pushing air in?

justin_vanw··on Here's what Yahoo CEO Marissa Mayer said that really made me angry
Right, I understand what you're saying, but even being a parent people might put a side project on hold or not have as much time to spend on it, but that doesn't mean they can't talk about what they have done in the past.
justin_vanw··on Here's what Yahoo CEO Marissa Mayer said that really made me angry
I'm not sure whether you even read my comments. It's not the weekend work that makes the difference, it's having the sort of people that show up on the weekend.
justin_vanw··on Here's what Yahoo CEO Marissa Mayer said that really made me angry
So what do you do when people work until 11pm every night and keep showing up on Saturday? Tell them to go home?

There are teams where people are having more fun 'kicking ass' and getting things done, and have a great time with the people they are there doing it with, and frankly they would laugh you out of the building (literally) if you even for one second referred to them as 'resources'. I have seen people wander into the office on the weekend just because they were bored (including myself), or were looking to hang out and hack on some stuff. It's not something that burns you out, it's a passion for some people. The good people.

I think you have had a very limited (and limiting) work experience, to be honest.

justin_vanw··on Here's what Yahoo CEO Marissa Mayer said that really made me angry
Sure, I mean I didn't say I actually use this test to make hiring decisions. I can just directly test lots of things like ability to code or problem solve (not perfectly for sure, but I do my best to evaluate directly the skills that can be evaluated directly). I am just making the point that there are often very highly correlated attributes that people can have, and one that is easy to test for can give you a lot of information about the ones that are harder to see.
justin_vanw··on 90-year-old Cryptanalytic Efforts Must Stay Secret, says NSA
I don't think this is right. I worked in military intelligence and for a civilian agency.

Tons of stuff is classified, sits in a safe for years and years, and eventually just gets shredded. Probably 99.99% of it. There is a cost to declassify documents, but for the mountains of stuff that never gets declassified (because it just goes into the memory black hole) there is no cost.

Honestly I think there is just a CYA mentality to just slap SECRET on documents rather than trying to thread the needle and figure out the exact correct classification. In theory these documents should be classified at the paragraph level, and in that case things like public statements by public figures would be unclassified even if they were a part of a highly classified document.

People will properly classify things if there is some reason to, but day to day it's not trivial to do and in the end nobody sees their goal as 'get the exact right classification on everything' vs 'find a terrorist or figure out what russia is planning'.

justin_vanw··on Here's what Yahoo CEO Marissa Mayer said that really made me angry
If you want to go 'slow and steady' and have great 'work/life balance' (and work with a lot of mediocre people and play a lot of political games..) go get a job at a big company.

Startups are not for that mentality, no startup has ever won by playing it safe and making sure people get plenty of sleep.

justin_vanw··on Here's what Yahoo CEO Marissa Mayer said that really made me angry
It has nothing to do with being there on Saturday. It has everything else to do with the kind of people and their ability to invest themselves in their goal, and showing up on Saturday is a great indicator of that.

I interview a lot of programmers, and I can tell you with about 95% precision whether they will work out and be great based on the single question 'tell me about the programming projects you work on for fun'. If they have some project they work on for fun, even one, that isn't for a class at school or for their job, then they are very very likely to be a great hire. If they don't they are very very unlikely to be a good hire. Side projects don't magically make you smart and capable and good at problem solving and getting things done, but it sure seems to be fundamentally related.

And from personal experience, I've worked for 2 startups, one where people worked all weekend and one where they didn't, and interestingly they were doing almost the exact same thing. One had an $80MM exit, the other just slowly went away. Small sample size, for sure.

justin_vanw··on Show HN: Make Slack Bots in Java
nah, I choose not to do this, or really anything else that I can avoid doing, in Java.
justin_vanw··on Goodbye, Object Oriented Programming
"demonstrably not true"

Where are the software projects that are built using functional languages?

I'll call out XMonad. What can you come up with? Obscure companies doing obscure things, or else people using Common Lisp in a nonfunctional way.

What major project or product is built using Haskel or Ocaml? There aren't any! The only thing I have ever used that were written in those languages are XMonad and csvtool respectively.

justin_vanw··on Goodbye, Object Oriented Programming
map, filter, etc are not 'functional'. 'functional' doesn't mean 'functions'. It is all about side effects, and that the procedures in the language are like mathematical functions: without state or side effects.

Using your definition, virtually every language in use today is 'functional', all the way down to Fortran 77, since really any language you can get a pointer or other handle to a function or callable object would let you implement map, filter, etc.

Really the existence of map, filter, etc are not a clue to a language being 'functional'. Yes, you would need such things, but they are not sufficient. C is not a 'functional language', even though technically you can write C that is completely functional in style.

In fact, almost any modern language can be used in a 100% functional style, avoiding side effects and state completely. Nobody does this.

Even if it is one of your favorite things, virtually no one uses functional languages. This isn't because people are dumb, it's because functional languages are cumbersome and inefficient.

justin_vanw··on Ask HN: Anonymous person sent proof of SSH access to our production server
Enable two factor authentication on your servers, or else two factor on a bastion server and disable external ssh other than from your bastions on all other servers.

I strongly recommend YubiKey, it is convenient and cheap and extremely secure.

With ssh it is very easy for someone to create an ssh key that does not have a passphrase. With that, it is possible to log into the server with just the key file and nothing else. At that point all it takes is someone to lose a laptop or leave a computer unlocked and unattended and someone can get access to your machines.

justin_vanw··on Goodbye, Object Oriented Programming
Not really? The claim that functional programming predates OO would require that functional programming languages existed before OO languages, which is clearly false. If anything they were both developed at approximately the exact same time, which has more to do with hardware coming into existence and wider use that could support higher level languages.
justin_vanw··on Goodbye, Object Oriented Programming
How is 'the same year as smalltalk' predating it?

Simula was working in like '67, which is like 5 years before smalltalk.

My point is that functional languages do not predate OO languages, and if anything come later, and you never really addressed that.

← PreviousPage 5 of 24Next →