Better HN
topnewbestaskshowjobs
Log inSign up

objectified

124 karma · joined Oct 3, 2011 (15y ago) · 51 submissions

Submissions

comment 11y ago · link · parent

Not to be confused with Amethyst, the tiling window manager for OS X.

https://github.com/ianyh/Amethyst

32.

Show HN: Vdist, creating OS packages for Python applications using Docker(vdist.readthedocs.org ↗)

1 points · by objectified · 11y ago · discuss

comment 11y ago · link · parent

The latter uses a Python context manager to open the file, the former doesn't. By using the open() context manager like this, you don't need to worry about closing the file yourself, since the context manager takes care of it. The code that runs inside the 'with' block gets yielded inside the context manager. The former version of the code does not store a reference to the file handle, thus cannot close the file handle. Of course you can close file handles without using a context manager too:

  f = open('foo.txt')
  contents = f.read()
  f.close()
But I'd prefer this way:

  with open('foo.txt') as f:
    contents = f.read()
Context managers can of course be used for all kinds of things. For more information, see https://docs.python.org/2/library/contextlib.html

comment 11y ago · link · parent

I do believe the need for virtualenv stays, in development as well as in production. Even when using a Docker container, you will still want to pin your dependencies strictly to specific versions and not risk any interference of Python modules that happen to be on the OS. I think it's important to not make assumptions in that area (dependency management) when wanting to create stable software.

comment 11y ago · link · parent

My "big plan" is to have only small plans this year, one plan at the time.

comment 11y ago · link · parent

Whether or not this theory is true, can be measured. A few important numbers come to mind.

- do you get more operations tickets right after a production deployment?

- do your call centers get an increased calls/hour rate after a production deployment?

- are there often noticeable anomalies in system resource usage that seem to be directly related to your deployment cycle?

- do your monitoring tools show a higher rate of warnings/criticals right after a production deployment?

Whether or not production deployments introduce more risk is probably largely subjective. How well do you test, what number of changes are inside a deployment, how collaborative are your operations/development teams, are your technical teams understaffed, and so on.

The advantages of a freeze (defined as "no production deployments during a certain time window") that I see, are at least the following.

- from my own experience while working in operations, I remember very well the many sleepless nights that somehow always seemed to be the immediate consequence of new (byte)code running in production

- it gives operations a break; they often work at ungodly hours the whole year, and getting some rest is very much needed

- it gives a moment to stand still and reflect; work on internal tooling, putting some structure into ad hoc things that sneaked in, etcetera.

Furthermore, I don't agree with the philosophy that "everything is always broken". Sure: disks and power supplies break all the time, even load balancers break, security patches need to be applied, and so on. But these are things that are part of day to day operations, and most operations engineers know how to do them. It's usually controllable. Unlike a bug in some newly introduced code by one developer that causes a stack overflow every time one certain application flow is being hit. That requires a different kind of discipline to solve.

I think it's a little dangerous to generalize these things without having actual numbers to back them up; before you know it, your operations team won't have any excuse to just sit and play Quake for a week. In most cases, that's a joke.

37.

Show HN: Web application monitoring with real browsers (Selenium Webdriver)(github.com ↗)

3 points · by objectified · 12y ago · discuss

comment 12y ago · link · parent

I use VimFx in Firefox as an alternative to Chrome's Vimium, it works quite well for me.

comment 12y ago · link · parent

It can point to Maven dependencies that are downloaded on the first launch

Please don't. Never assume that production machines have access to the internet or even an internal Maven repository. If they do, they're a security risk. There are plenty of scenarios I can think of where an attacker could possibly make your application download something from the internet, or has your application server functioning as an anonymous proxy by exploiting your application.

comment 12y ago · link · parent

If you had been able to choose Python/Backbone etc. in the big company, chances are that it would have taken even longer. In big companies, everything is different, and they have to take other things in regard than mere development time. They are most likely prepared for one or two kinds of tech stacks, and everything is in place for that. If suddenly they have to deploy new technology, they for example have to:

* build custom monitoring for the components in the new stack

* look at support contracts and patching procedures for these components

* figure out how to be able to respond to security incidents with these new components

* train and _keep_ training people specifically for this new special snowflake you just created for the years to come

* look into how various operational concerns are implemented with this technology: scaling, separation of concerns (can I deploy the admin part separately?), logging and log rotation, and so forth

In startups, developer cost and time to market may be the most important things. In bigger companies, a lot of other things start to matter.

comment 12y ago · link · parent

While reading your great comment, I was hoping you'd continue explaining where these desires and ambitions would come from, and why they can cause burnout. But yes, people will have to figure that out for themselves. I've found that the patterns you describe come very close to conversations I've been having with people about playing music (which I've been doing intensively for quite a while now):

I hear a lot of people "wanting to play guitar", or "wishing they could play like <player X>". I often ask them whether they want to a) be seen as a great guitarist, or b) actually play guitar. There's a big difference between a and b. A revolves around the idea that you "are" something, and often, where others can see you as being something. B is about actually enjoying to play guitar, for no other reason than playing guitar. No recognition, no fame, no secondary intentions.

Everything you invest large amounts of time in should come from nothing but enjoying that thing you do in itself. But it's not easy. Motivations always get distorted by psychological influences (and that's what you meant by the last line of your comment, if I understood it correctly). There are many people who haven't received much validation or acceptance on a personal level while growing up, for instance. These people will keep reaching, but they'll never reach actual self acceptance. Burnout.

It's really important to confront yourself with issues that you can identify inside yourself, and keep (re)defining yourself. Not what you do, but who you are. What you do should be a consequence of who you are, not a reaction to personal shortcomings you're not looking in the eye directly.

I'm not a psychologist, this is just my take on things.

comment 13y ago · link · parent

But why would you ask a question like that in an interview? What does it tell you about the person you're interviewing? Or does it tell you something about yourself?

comment 13y ago · link · parent

Well, you could just copy a bunch of files, if that's all you need to do. But ideally you'd use a tool like Fabric to do your copying/moving, symlinking, server config changes, etc.

We use Python for a number of things too (and yes, I like the language a lot). The only trouble I have with Python in this context is actually cross platform support. It's a bit harder to get packages for the latest and greatest versions of modules and the interpreter if you have to deploy to e.g. Solaris 9 systems, unless you create them yourself. Theoretically it should have the same advantages, yes.

comment 13y ago · link · parent

Probably because they were in fact "bolted on". Saying that Java is OO from head to toes, I can't agree with. Java has primitive types as well, and not everything is a first class object (like methods). Python is more OO in that sense, for example. In a sense, Java is having trouble incorporating modern features in the language too. Just take a look at how generics are implemented, and the endless closure debate.

comment 13y ago · link · parent

I can't agree with that. Personally I happen to use PHP not for web development, but almost exclusively for system administration and monitoring (I'm not a web developer). It's very comfortable using PHP in these areas, as:

- PHP and many of the PHP extensions are packaged for about every major OS and architecture

- a lot of functionality is already shipped with the interpreter (so no additional stuff necessary)

- it's very easy to deploy We've tried a number of options, especially in the monitoring area, but PHP eventually seemed to be the most suitable for the job.

comment 13y ago · link · parent

You may want to take a look at Silex, which is based on Symfony2 components.

http://silex.sensiolabs.org/

47.

Show HN: Seymour - monitoring web applications with Nagios through Selenium(github.com ↗)

2 points · by objectified · 14y ago · discuss

comment 14y ago · link · parent

Agreed. That's why I use the cURL bindings combined with human_curl.

comment 14y ago · link · parent

Nice idea. In addition to the comments already made, I would find it useful to see how many comments an entry has from the overview pages. Right now you have to click the link to figure that out.

50.

HTTP with Python - PycURL by Example(angryobjects.com ↗)

2 points · by objectified · 15y ago · discuss

comment 15y ago · link · parent

Although Requests looks very nice, I've wondered why most people wouldn't simply use pycurl - http://pycurl.sourceforge.net/ ? It's stable and you get all the power that cURL has (which is a lot), and the API is fairly simple - although maybe not as pythonic as the Requests API is.

On a side note: last time I checked urllib2 (which actually drives Requests) could not do SSL requests over a proxy, which gave me the feeling that this implementation still isn't very mature.

12