HNHacker News
TopNewBestAskShowJobs

th

1,013 karma · joined March 16, 2010

My name is Trey Hunner. I help Python developers & teams level-up their skills.

https://www.pythonmorsels.com http://truthful.technology http://www.treyhunner.com

[ my public key: https://keybase.io/treyhunner; my proof: https://keybase.io/treyhunner/sigs/BZJaTqLkF7FN0VfkNWSvBpSYH0KUmIsrTshacYyW-to ]

submissionscomments
th··on San Diego Hacker News Meetup 48 this Friday (1/31)
Unlike some of the hack nights some groups hold, this event is meant to be completely social. Sometimes I'll see someone sharing a website or picture on their phone/tablet/laptop but only rarely.

I hope to see you there!

th··on Movie Subtitle Fansite Raided By Copyright Industry And Police
The studios could probably claim the audio, script dialog, or subtitles as a work of their own, meaning the derivative is not sampling a "small portion of the work".
th··on Movie Subtitle Fansite Raided By Copyright Industry And Police
That's a bold claim. Could you site a source or some examples to back it up?
th··on San Diego Hacker News Meetup 42 (Fri 6/28)
The Friday meetup is a social one. It's the only meetup I attend that is still active after 10pm.

We are planning a mid-week meetup a couple weeks from now in downtown. We'll decide on a date after this week's meetup and post it to the mailing list. Sign up if you'd like to be notified.

th··on Ubuntu 13.04 Raring Ringtail Released
You can also hold down shift and click on the icon to open up a new window.

Similarly if you use a keyboard shortcut to open your icons (like Win+1 to open the first icon) holding shift while pressing the shortcut will open a new window (Shift+Win+1 will open a new window for the first icon).

th··on Things I Wish I Had Known About Django Development Before Starting My Company
I'm using exactly that setup and it does work, it just took me many hours and over 100 lines of custom storages + settings code to get it working.

I had to solve issues with custom domains, HTTPS, gzip, separate media/static files buckets, and storages/compressor not playing nicely together in general.

th··on Click on a few dots and our program will guess your age
It told me I was 33 also and I'm 25.

The survey at the end was fairly short. I wonder what factors they might be missing. I type most of the day in a terminal and rarely use my touchpad except for scrolling and occasional clicks on websites. I also don't play video games often. It seems like both of those facts could have affected my speed.

th··on Workflow in tmux
He is using the vim-powerline bundle for vim, but it looks like you're right about the tmux config.
th··on Workflow in tmux
The status bar with the arrow breadcrumbs is powerline: https://github.com/Lokaltog/powerline

There are bindings for tmux, bash, zsh, vim, and ipython (among others).

th··on Python __dunder__ Functions [video]
I have actually heard "dunder" used in conversation multiple times at Python meetups. I think it's more useful in verbal conversation.

I usually hear it used to replace the phrase "double underscore". For example: "a dunder call method can be used to make an object callable".

th··on tmux 1.8 Released
I agree. It takes surprisingly few lines of code to make a nice wrapper with some shortcut aliases/functions to simplify the scripts. My whole tmux workflow is managed by about 30 lines of code to bootstrap by tmux session management: https://github.com/treyhunner/tmuxstart/blob/master/tmuxstar...
th··on tmux 1.8 Released
If you don't like the YAML format of teamocil or tmuxinator and just want to write shell scripts to do the same thing, check out tmuxstart: https://github.com/treyhunner/tmuxstart

I made it shortly after switching to tmux last year. I hope this kind of functionality will eventually be built-in to tmux.

th··on San Diego Hacker News Meetup 39 (Fri 3/29)
It would be nice if there were a site dedicated to Hacker News meetups. It would be a lot easier to organize meetups when there were a place to go look for them and chat about them.
th··on San Diego Hacker News Meetup 39 (Fri 3/29)
You could always just sit, listen, and absorb the conversations. :)
th··on San Diego Hacker News Meetup 39 (Fri 3/29)
Most people tend to show up for part 1 at the bakery, but there's usually a couple people that show up late or only show up for part 2 at O'Brien's. Feel free to show up whenever you'd like. See you Friday!
th··on JS Git
Income is a strange thing.

Scenario 1:

Make a product in a month and sell it online. Assume you make $60,000 dollars over 2 years, performing only minor maintenance tasks occasionally.

One way to look at it: That's $2,500 per month in income.

Another way: That's $60,000 for one month of work.

Scenario 2:

Perform a large task for a company charging them $12,000 and promising to deliver it in a month. Depending on the work being delivered, that's not necessarily an unreasonable cost.

One way to look at it: That's paying $12,000 for $12,000 in value

Another way: That's approximately a rate of $75 per hour.

--

A company paying an employee $12,000 every month for developing software is probably unreasonable. A consultant, contractor, or self-employed entrepreneur making that money for a one-off job may not be unreasonable.

th··on The Easter Egg Song
> Note: This was at a time when we didn’t have version controls like git and people didn’t commit for every small feature. Change list sometimes varied between 10 lines to 25 files during a refactor.

Does this mean you weren't using version control at all or you weren't using a distributed version control system? The former would surprise me since CVS, SVN, and similar tools have been around for years and are a lot easier than emailing patches back and forth.

th··on npm install firebase
This is meant to be run in Node.js on a server, not in client-side JavaScript within a web browser.
th··on Twenty dollars in an envelope
I gave away and eventually sold snippets of front end web tools (example code mostly) shortly after picking up basic JavaScript/HTML/CSS skills as a pre-teen in the late 90's.

My first product was a "login" script (just JavaScript which generated an encoded version of a username and password and navigated to that URL). I remember when I received my first envelope with a $10 check and an email address inside. That was an awesome feeling.

I also made a fairly complicated "calendar creator" script which allowed a user to stylize and customize a calendar template that would be output in the form of HTML, CSS, and JavaScript. Since HTML, CSS, and JavaScript were the only tools I knew how to use that's naturally what I wrote the program using. Everything was output in a textarea field for "easy" copy-pasting into the user's website.

After a few years I realized the programs were becoming dated (I started receiving more frequent refund requests) and I stopped charging and open sourced them.

In hindsight, the programs were fairly poorly written but I'm glad to know that at least a couple dozen people found them useful.

th··on Scheduling morning emails with Python and Celery
I mean that starting mid-March a user who had previously been in a -8:00 UTC offset would then be in a -7:00 UTC offset and you wouldn't know the timezone offset changed until they visited the website again.
th··on Scheduling morning emails with Python and Celery
Would this create a problem around Daylight Saving Time until the user logs in again to reset their time offset?
th··on Getting Started with Django
The TDD Django Tutorial is both a good example of Django TDD and a good introduction to using Selenium for integration/functional tests. It was my first introduction to both.
th··on Why Linux is better
That sections states that drivers are built in to the kernel, which is not always true.

There is a section below called "your hardware is not yet supported" under the "cases where you should stick to Windows" section, but that misses the biggest issue which is poorly supported drivers.

There are still many wireless cards, scanners, tablets, and other peripherals that have poorly written proprietary drivers or not-quite-functional open source drivers. The number is decreasing, but it's still a concern when buying new hardware.

th··on Our Django Book is Launched
This is a really great book. The formatting does need a lot of work (I see no chapter or section headings in the PDF) and an ePub version would be very useful.

The actual content of this book is excellent though. I feel like I keep up with new developments in the Django community pretty well, but there's a lot of advice in this book I hadn't heard before.

th··on Love Your Terminal
I would recommend a primarily tmux-based workflow unless you use a number of graphical programs that benefit greatly from the tiling paradigm.

I used to use Xmonad with tmux (and still do sometimes). I primarily use Unity with tmux now. I came to the realization that tmux had nearly nullified my need for a tiling window manager after I switched from gVim to terminal vim and noticing how much easier it made my workflow. My "ah ha" moment was the discovery of the distinction between sessions, windows, and panes and how each could interact with (or sometimes transform into) the each other.

th··on San Diego: join us for SD Hacker News meetup #35 (Fri 11/30)
Cool. Have fun in Japan!
th··on Ask HN: What Are Some Good GitHub "Contributing" Examples?
CONTRIBUTING.md files in:

* [OpenGovernment][1]

* [Factory Girl][2]

* [agner][3]

* [suspenders][4]

[1]: https://github.com/opengovernment/opengovernment/blob/master...

[2]: https://github.com/thoughtbot/factory_girl_rails/blob/master...

[3]: https://github.com/agner/agner/blob/master/CONTRIBUTING.md

[4]: https://github.com/thoughtbot/suspenders/blob/master/CONTRIB...

th··on Show HN: garlic.js - don't let your users lose their form data
JavaScript is an extremely bare language that largely lacks a standard library. Libraries like jQuery make code easier to write and easier to maintain and sometimes even result in smaller downloads for the user.

Ii your website uses the Google CDN to download jQuery new visitors will often not even download jQuery when arriving at your website because their browser probably has it already cached from visiting one of the dozens of other websites they have visited.

th··on Show HN: a small jQuery Form Validation library
This is a great idea. It looks like there are at least two plugins already that claim to validate the new HTML5 attributes: [html5-form][1] and [h5Validate][2]

[1]: http://www.matiasmancini.com.ar/jquery-plugin-ajax-form-vali...

[2]: http://ericleads.com/h5validate/

th··on The Future of Markdown
> Without, conformance tests different interpretations of a spec lead to divergent behavior.

I think you mean either:

> Without conformance tests incorrect interpretations of a spec lead to divergent behavior

Or

> Without conformance tests different interpretations of an ambiguous spec lead to divergent behavior.

Conformance tests should test specific behavior defined in the spec. Tests will never (or rarely) prove spec conformance but spec conformance should always prove test conformance.

← PreviousPage 2 of 6Next →