News for hackers. Stuff that matters.

NoahSussman

Re:Speaking up on Monday February 04, 2013 @10:00AM (#5164370)
> there seems to still be a growing population of women in the community.

Just keep in mind that, whatever growth you've observed, the number of women in programming now is much lower than it was in the 1980s.

For some historical statistics see http://articles.washingtonpost.com/2011-08-26/opinions/35268...

Re:Ask HN: Do I need a CS degree or should I stay with my job? on Wednesday January 23, 2013 @10:26AM (#5103442)
Don't compromise your career for a piece of paper. I have made the mistake of going back to college when I couldn't really afford it. Initially I rationalized that although taking classes would basically preclude working, in a couple of years I'd have a degree and be able to make a lot more money -- it would be worth it in the long run. The stress of being broke turned out to be much worse than I'd anticipated. Even though I'd been broke before, it was different in the context of having made a commitment not to go out and get paying work.

Add to that the "normal" stress of doing course work and... I wound up dropping out after a year and a half. Two weeks later I was back at work as a programmer. It's been almost ten years since then and I've consistently had recruiters after me the entire time -- I've never had to actively look for work. I've met many other people with similar backstories to mine, and all of them were gainfully employed and relentlessly pursued by recruiters.

In the first 3 years of my career, I was asked about my degree in every interview. I'd say: I'm on hiatus from school due to financial concerns, but I have every intention of finishing my degree as soon as possible. This was a) true and b) enough to satisfy every single interviewer, without exception. Because all interviewers care about is your ability to deliver. As my career progressed, people pretty much stopped asking about my degree. Recently one of my managers told me (after 2 successful years of working together) that he'd never even checked whether or not I had a degree. He'd hired me solely based on my past accomplishments in the industry. I think this is a typical attitude for hiring managers, especially given the current, extremely tight market for programming talent.

School was extremely useful and I still intend to go back and complete my degree some day. But when I do, it will be for my own satisfaction, not because of the impact a degree would have on my career.

Re:What Compsci textbooks don't tell you: Real world code sucks on Saturday December 22, 2012 @10:53AM (#4956778)
> Unless there is a culture of teaching (incremental code reviews are not enough) within the company, you will not have good code for very long.

Very insightful observation. Bad code is a problem that is both technical and social. Purely technical solutions won't cut it.

In general, any Web functional testing tool can be used as a scraper. Scraping and testing are extremely similar. In both cases, one uses XPath or (hopefully) CSS to locate an element and examine certain aspects of that element's state. A scraper is only different from a functional test in that a scraper is focused only on the state of nodes (potentially) containing human-readable content. That, and a scraper saves the data it collects rather than discarding all data at the end of a test run.

Here's a very old Selenium 1.0 example that scrapes the full, rendered HTML of a page. After performing a scrape like this, I would then feed the HTML into a parser such as Nokogiri http://snipplr.com/view/7906/rendered-wget-with-selenium/

The onresize event fires whenever you change the sized of your browser window. Eg it occurs when you maximize the window or when you click-and-drag on the corner of the window in order to make it smaller or larger. See also https://developer.mozilla.org/en-US/docs/DOM/window.onresize
Reminded immediately of the Inclued tool for visualizing PHP include dependencies. Something like that for JavaScript would be very useful.

And of course now I'm wondering what I'd have to do get this working with code that targets a Web browser...

I'm pretty sure that I didn't say that testing is a fraud. Although I did say that I think production monitoring should be set up on day one of a new project, while unit testing can wait until the project has matured a bit. I also said that unit testing isn't going to be nearly as helpful without having production monitoring in place. And I said that with production monitoring in place it's possible to get by with a lot less unit testing than has been historically prescribed -- which is a good thing since production monitoring systems tend to be less expensive to maintain than unit tests.

I did at one point say "there's no such thing as rolling back." This is an idea to which I'm pretty dedicated. I've seen first hand many times that using an SCM revert command to attempt to restore "last good state" is a risky endeavor, especially when a large changeset is involved.

Re:Falsehoods Programmers believe about Time on Wednesday June 20, 2012 @12:48AM (#4135670)
The specific issue that bit me wrt units of time was seconds vs. milliseconds. This came up the first time I needed to mix PHP time stamps with Jenkins build log time stamps. One is in seconds, the other in milliseconds. Unfortunately the PHP date() function exhibits odd behavior when a time stamp contains two extra digits. I could have saved myself the debugging time had I not been so attached to the assumption that time stamps are always in seconds rather than sometimes in milliseconds.
Re:Falsehoods Programmers believe about Time on Wednesday June 20, 2012 @12:38AM (#4135654)
Heh for this I like Cheops' Maxim: "nothing is ever built on time or within budget." There's also Hofstadter's Law: "it always takes longer than you expect, even when you take into account Hofstadter's law."
Re:Falsehoods Programmers believe about Time on Wednesday June 20, 2012 @12:35AM (#4135646)
Falsehoods we believe about estimating development time/effort:

1. For any non-trivial project, it is possible to estimate development time and/or effort with a reasonable degree of accuracy.

Re:Falsehoods Programmers believe about Time on Wednesday June 20, 2012 @12:24AM (#4135620)
If the tests are failing because the production code is confused about daylight savings time, then you may have a serious problem.

If on the other hand it's just the test code that's flaky, usually such problems can be alleviated by refactoring such that one passes the time function as a parameter. This is in preference to hard-coding calls to the system time in test, which imho one should never do.

Once an arbitrary time function can be passed as a parameter, one can provide a mock or fake system clock for test purposes. Ideally one would still want to test under daylight savings' conditions. But at the least this approach leaves one in a place where one can test the common 24-hours-in-a-day case without having the tests spuriously fail two days out of every year.

Re:Falsehoods Programmers believe about Time on Tuesday June 19, 2012 @11:24PM (#4135476)
I could tell you some stories about not being able to expire cookies.
Re:Falsehoods Programmers believe about Time on Tuesday June 19, 2012 @11:03PM (#4135428)
#40 actually made me laugh out loud. Bitterly, but out loud :-)
Re:Falsehoods Programmers believe about Time on Tuesday June 19, 2012 @10:46PM (#4135389)
'items from the original list aren't exactly "truths" as much as implementations or configurations' QFT.
Re:Falsehoods Programmers believe about Time on Monday June 18, 2012 @11:06PM (#4130048)
You are right. I said "a month" but I meant something more like "a period of 28 days" or "a month-long period." I'll think about how to word this more clearly.
Re:Deployinator: Etsy's deploy tool open sourced on Sunday July 31, 2011 @01:10PM (#2828828)
If you are specifically interested in this kind of continuous deploy process then "Continuous Delivery[1]" is a decent book on the subject. The IMVU post "Doing The Impossible 50 Times A Day[2]" is another good place to start reading.

[1] http://www.amazon.com/gp/product/0321601912

[2] http://timothyfitz.wordpress.com/2009/02/10/continuous-deplo...

Re:Divide and Concur - testing code at etsy on Monday May 02, 2011 @06:17AM (#2505774)
Yes, most deployments contain only a couple of changesets -- ideally no more than a few dozen lines of code per push. And even these small changes are deployed behind config flags. Flickr has a similar continuous deploy strategy, see http://bit.ly/esoXiX

There is intended to be no end user impact whatsoever. Releasing behind config flags means that feature rollouts are decoupled from deploying code. New code runs "dark" for a long time in production. There we can log and graph and adjust its performance before it is ever visible to the user.

And of course, we can see dark features in production before they're released or even complete. This means that at Etsy we've been using and tweaking our features long before they are made public.

Since we've been closely monitoring and recording the performance of each new feature since its inception, we are highly aware of how that changes once the code is live to a known, small number of our users. Gather data, make adjustments, rinse and repeat until eventually the feature is live to 100% of users.

See also

http://codeascraft.etsy.com/2011/02/04/how-does-etsy-manage-...

http://codeascraft.etsy.com/2010/12/08/track-every-release/

http://codeascraft.etsy.com/2011/02/15/measure-anything-meas...

Re:Divide and Concur - testing code at etsy on Sunday May 01, 2011 @07:35PM (#2504398)
Both of the authors are Web developers with a deep interest in software quality and automated testing. Etsy has followed the same software quality model as Facebook: a dedicated testing team, but no dedicated manual QA team. See also http://b.qr.ae/hJVb4W

Etsy's engineering culture puts great emphasis on personal responsibility and taking pride in the quality of one's work. Because of that, no, there has never yet been a problem with people taking tests offline simply so they could deploy. The issue is more that tests "wear out" over time and need to be either rewritten, replaced or discarded (for more on this phenomenon see Boris Beizer and his "pesticide paradox").