HNHacker News
TopNewBestAskShowJobs

redsymbol

1,474 karma · joined August 14, 2007

Aaron Maxwell Software engineer and media buyer/marketer Author of Powerful Python: https://www.amazon.com/dp/1098175700 Contact: amax@redsymbol.net
submissionscomments
redsymbol··on GitHub responds to Dear GitHub letter
To any githubbers reading this:

A lot of people posting here are being unreasonable, demanding, and childish. Recognize that for what it is, don't let it affect you, and just continue moving forward based on the constructive part of the feedback.

redsymbol··on The C standard formalized in Coq
That's true. The immediate-term impact is probably minimal, for the reasons you mention. However, this is a major accomplishment. As this work is built upon, its longer-term impact has the potential to be very significant.
redsymbol··on Python 3 makes it easier to develop high-quality software
Does this serve well enough as a comprehensive diff?

http://migrateup.com/whats-really-new-in-python-3/

(Actually, maybe not, because it doesn't have code examples.)

redsymbol··on 9.5 Low Latency Decision as a Service Design Patterns
Thank you for this outstanding article.

Perhaps I missed it, but how exactly do you implement the timestamp logging? Do you use your normal application logging, or some other mechanism?

redsymbol··on Python 3.5.0
Python 3 keeps getting better and better. I've been writing more code in Python 3 than 2 for about three years now, and I absolutely love it. When I have to write code in 2.7 now, it feels like shifting from fifth gear down to second.
redsymbol··on Thoughts on a Container Native Package System
Ah. It clicks for me now. You're proposing a package management system that operates on the image level. Somehow I didn't fully understand that before.

I fully agree that "rerun the config tool on a pre-existing container" is an anti-pattern, and it's best to avoid it if at all possible. I can see how what you are proposing would be a great step in a positive direction.

I'm not convinced CM systems don't have a role, still. They are very flexible and powerful at accommodating many specialized system setup scenarios. But I think that's independent of what you're really focused on here.

Anyway, excellent and well-written article!

redsymbol··on Thoughts on a Container Native Package System
Am I the only one who thinks containers and config management tools - e.g., chef, puppet, ansible, salt - are completely orthogonal to each other, and actually work really well together? A simple cycle like the following solves at least a couple of the problems mentioned in the article:

1) Run a base docker image.

2) Run the config management tool on/in this image, (ansible playbook, chef cookbook, etc.)

3) Commit the container to the new image

Dockerfiles are very convenient and easy, and are great as far as they go. They also don't have idempotent actions built-in. As a result, a minor change requires one to rebuild the entire image from scratch.

In contrast, the CM systems mentioned above operate by letting you declare the desired system state - i.e., what it is, instead of how to create it. This lets the CM system runtime automatically skip unnecessary steps. For example, in (say) an Ansible playbook, instead of (in the Dockerfile):

  RUN mkdir -p /path/to/some/dir
... we'd say something like (in the Ansible playbook):

   - file:
       state: directory
       path: /path/to/some/dir
If /path/to/some/dir already exists, and I run this play twice, I do not get the "mkdir: cannot create directory ‘/path/to/some/dir’: File exists" error, because this is designed to be declarative. That means: Ansible first checks whether the directory exists, and if it does, it does nothing. If it doesn't, it recreates it.

It also helps a lot with surgical updates. For example, suppose my Dockerfile for a web service container contains the following:

  RUN apt-get install -y apache2 php5 libapache2-mod-php5
An analogous Ansible play might include the following:

   - apt:
       name: "{{ item }}"
       state: present
     with_items:
       - apache2
       - php5
       - libapache2-mod-php5
Now if an Apache security vulnerability is announced, with a fix pushed to the apt sources, I can rapidly modify the image like so:

1) Run the previous docker image.

2) Run the config management tool with the surgical-update action.

3) Commit the container to create an updated image.

The Ansible version of the update would be as simple as:

   - apt:
       update_cache: yes
       name: apache2
       state: latest
And again, this is a fast no-op if the package is already up-to-date. (It also doesn't needlessly restart apache, though when creating an image that doesn't matter much.)

Using a CM system like this doesn't solve all the problems outlined in the article - actually, I don't think it even solves a majority of them. But I can't figure out why so many smart people are focused on reinventing parts of it poorly, or thinking in terms of "docker vs. ansible/chef/puppet/salt". I know they're not idiots. Am I missing something? If so I'd sincerely like to know.

redsymbol··on BBC News meets a Bulgarian IT entrepreneur [video]
What fascinating timing. I'm a software engineer who has lived in San Francisco for 15 years, most of that time working at different tech-heavy startups, and starting my own twice. I've been in Europe for the past week, flying tomorrow to Sofia, BG for five days. If anyone in Sofia is reading this and would like to meet for coffee, etc., contact me at amax at redsymbol dot net.

I am not an investor and don't fully understand how startup financing works even in SV, and certainly not anywhere in Europe. However, it seems to me that if you're an angel or VC, there is a remarkable opportunity in places like Bulgaria. Potentially a great deal of investment demand (i.e. entrepreneurial tech talent), compared to investment supply. Lots of new challenges, I'm sure, but competing with other investors apparently isn't one of them.

(Hmmm... if you're an SV [EDIT: American] angel/VC and are thinking the same, email me as well. In the event I meet some promising BG entrepreneurs in the next week, it's possible I might be able to make some meaningful introductions.)

redsymbol··on GitHub under ongoing DDoS attack
Maybe they've just too been busy to post it yet.
redsymbol··on Moved ~/.local/share/steam. Ran steam. It deleted everything owned by user
http://redsymbol.net/articles/unofficial-bash-strict-mode/
redsymbol··on Use the unofficial Bash strict mode
Hm, is that true? When I run this script:

  #!/bin/bash
  items=(
      'a'
      'b c'
      "d\te"
      "f\ng"
  )
  
  echo "Unquoted:"
  for item in ${items[@]}; do
      echo -e ".  $item"
  done
  
  echo "Quoted:"
  for item in "${items[@]}"; do
      echo -e ".  $item"
  done
  
  set -euo pipefail
  IFS=$'\n\t'
  echo "Unquoted strict mode:"
  for item in ${items[@]}; do
      echo -e ".  $item"
  done
... I get this output:

  Unquoted:
  .  a
  .  b
  .  c
  .  d    e
  .  f
  g
  Quoted:
  .  a
  .  b c
  .  d    e
  .  f
  g
  Unquoted strict mode:
  .  a
  .  b c
  .  d    e
  .  f
  g
Note the output for "Quoted" and "Unquoted strict mode" are identical.

(GNU bash, version 4.2.37(1)-release (x86_64-pc-linux-gnu))

redsymbol··on Use the unofficial Bash strict mode
Can you give an example of an exploit in bash? The link you give is excellent information, but doesn't have any shell script examples.

My first thought: It seems like only $@, $* and variables read from the environment could be possible attack vectors. But since shell scripts can't be setuid, it's hard for me to immediately imagine how unquoting could enable a new exploit.

EDIT: the most dangerous example I can think of right now is a script like this, where a webapp invokes the script and passes a GET param as an argument:

  #!/bin/bash
  exec $1
But if I execute this like so:

  ./badscript.sh 'some-benign-command ; cat /etc/passwd'
... then passwd is not exposed, because the tokens ";", "cat" and "/etc/passwd" are passed into the argv of some-benign-command.

(And if "cat /etc/password" itself can be passed as $1, then quoting won't help...)

redsymbol··on Use the unofficial Bash strict mode
That's the common answer, and while I practice that myself, I have to disagree with it as guidance. Maybe you and I are fastidious enough to always remember to quote all our variables, but many are not - I know I was writing shell scripts for a couple of years before I realized its importance, and it's very common that even experienced engineers don't know or care to do it. If someone writing or editing the code forgets to quote the variable that allows subtle bugs to sneak in.

It's unfortunate the semantics of bash don't have variable references behave like they are quoted by default. I really wish it did.

redsymbol··on Use the unofficial Bash strict mode
Oooh, this is my new favorite. Previously it was "echo exit >> ~/.bashrc" ;)
redsymbol··on San Francisco's guerrilla protest at Google buses swells into revolt
I'm a software engineer who lives in San Francisco, and pretty much agree with everything you say in your response, pavanky. No disclaimer :-)
redsymbol··on Another go at Go failed
I thought it was a really good article. I found you included some useful details both on relevant low-level technical aspects, as well as the more human-level process of development and client interaction.

After reading it, I thought it was really insightful and useful, and concluded you're clearly a good SW engineer - was surprised by the excess criticism here. Anyway, thank you for writing and publishing this.

redsymbol··on 7 Deadly Sins of Mobile Websites
Matt, this is fascinating. Not for tablets - there's been plenty of data suggesting people primarily use their (say) iPads in the home. But for smartphones, wifi being predominant is not what I would have expected.

Is the data you've seen internal Google data, or is any of it available to us non-Googlers? Would be interesting to know the ratio of usage, how it varies by time of day, by activity, etc.

redsymbol··on Twitter pays SVP of Engineering $10 million as Silicon Valley tussles for talent
There are three big differences. First, to be effective in the role, a VPE must have a much stronger social and communication skills. Most engineers, as a side effect of how they spend their waking hours, are below average in this area. The VPE must be far above average.

Second, the VPE must have a larger focus - seeing what's good for the entire company, not just what's good for engineering, and certainly more than what's good for the current projects. Often a straight up engineer will be (quite properly) focused mainly on whatever their current project is, and may not even have the business knowledge to fully grok how it fits in the big picture.

Lastly, the VPE needs exceptional management and leadership skills. A tech lead will have this too, but it must be much stronger at the veep level.

redsymbol··on Left with Nothing
Absolutely - I noticed that too. Exceptionally well done from a web publishing standpoint.
redsymbol··on Why I should have written ZeroMQ in C, not C++ (2012)
Go's 1.0 release didn't happen until 2012. He started working on ZeroMQ in 2007.

Not sure what "spends no time at HN" means. Martin is an unusually excellent software engineer by almost any measure, as evidenced by his years of impactful open-source development - 0MQ being just one example.

And Haskell wouldn't make sense for a project like this, only because of some of his goals with the project - which include: to eventually have it integrated in the Linux kernel; to make it easily usable by code in any language; to have it easily and universally cross-platform; etc.

(Dang... did I just feed a troll?)

redsymbol··on NSA Collects 'Word for Word' Every Domestic Communication, Says Former Analyst
Holy crap:

RUSSELL TICE: ...The NSA were targeting individuals. In that case, they were judges like the Supreme Court. I held in my hand Judge Alito's targeting information for his phones and his staff and his family.

If true, that's... mind boggling. What possible valid reason could the NSA have to secretly monitor the calls of a US Supreme Court justice? And his staff, AND family?

I really hope this allegation is false.

redsymbol··on I bootstrapped a $10 million company and need serious help
Ben, just want to say - congratulations! This is a FANTASTIC problem to have :-) Great job to you and your team getting this far... I think you realize how special and rare it is. Great job!
redsymbol··on Snowden’s whereabouts unknown
From the article: The flight from [Moscow] was packed with journalists who had purchased tickets believing that Snowden would be on the flight.

It would be hilarious if Snowden and his companions tried to get seats on that flight, but could not, because it was already fully booked by these proactive journalists.

redsymbol··on Partial Tesla Model S recall
What hotel was it?
redsymbol··on Congress takes aim at patent trolls
This abuse of overbroad patents - including software patents - isn't your average bad idea. It is powerfully toxic to innovation. In the global context, it is literally a threat to human progress. For the USA in particular, patent trolls are a threat to its continued eminence as a superpower.

So it's strange that some in congress still support the current patent situation. I want to believe those who serve there are generally smart and competent, regardless of whether their opinion on something agrees with mine. But the pro-troll arguments seem massively short-sighted.

Allowing the current situation to continue would be massively harmful to our descendants. I'm grateful there seems to be swelling bipartisan support to end it.

redsymbol··on Sorry, Digital Ad Exec, I Probably Don’t Want To Work For You
I'm guessing that some people thought "if everybody can read and write, then we'll all become educated and be able to write great novels". Unsurprisingly, that didn't happen, but other huge benefits were accrued.... So I totally agree with you that "everybody should learn to program" sounds very similar to "everybody can write a novel". It's wrong. But "everybody should be computer literate" is a very worthwhile cause.

This is perhaps the most insightful comment I've encountered about computer literacy (and, maybe, literacy in general). Thank you for posting it and enlightening me a bit.

redsymbol··on JQuery's API documentation gets a redesign
Just on HN, right now it's close to the #1 position; likely this site is getting hit with massive traffic as we speak, from diverse sources. Wait until that dies down before passing judgment.
redsymbol··on Gaussian distributions are monoids and why machine learning experts should care
Noel, did you mean to say "while the Gaussian is important it is by far NOT the only distribution of interest in machine learning"? Not trying to put words in your mouth, just seems to me you may have intended that.
redsymbol··on Richard Stallman: Let’s Limit the Effect of Software Patents
This is really impressive. It's a cogent, insightful articulation of the current situation, including the realistic constraints (e.g. that Supreme Court ruling re: private privileges), and a practical suggested solution that could actually be implemented in the current political environment. Don't always agree with Stallman, but this one's well done.
redsymbol··on GitHub hit by DDoS attack second day in a row
Maybe it's because I just personally identify with the founders of github (i.e. entrepreneurial sw engineers), but I'm starting to get mad at whoever keeps doing this. Here's hoping that with all the smart people this is affecting, the people responsible will be tracked down and exposed.
← PreviousPage 5 of 9Next →