Better HN
topnewbestaskshowjobs
Log inSign up

git-pull

1,787 karma · joined Oct 29, 2013 (13y ago) · 405 submissions

open source software plumber

author: The Tao of tmux (https://leanpub.com/the-tao-of-tmux) available to read for free online at https://leanpub.com/the-tao-of-tmux/free

software libraries: cihai, unihan-etl, tmuxp, libtmux, vcspull, libvcs

tony (at) git-pull.com

https://www.git-pull.com

(If what I say isn't helpful to you, disregard it. Spread the good will and good tidings!)

Submissions

comment 8y ago · link · parent

> And if you only waited until you have a firm financial backing behind you and you alone with nobody to split risk with, we wouldn't have very many start ups.

A programmer doesn't have to wait.

Try to take it from a programmer's perspective:

We already have ideas. There's a huge supply of programmers. One's that'd be happy to write an MVP for that inventor/artist/etc in exchange for 20k. But I guarantee you there's zero programmers waiting around, saying to themselves, "If only I had a visionary come along to give me an idea"

Programmer's get used to it. But at least once per year many of us hear something like, "I have a vision", "I got this idea, psst", because you can guarantee 99% of the time, they're not willing to put any cash into it themselves. What I get is a person bossing me around, while I don't get paid, and I absorb all the risk of their idea.

> This applies equally to every start up entrepreneur, from artists to inventor.

If I take on a co-founder, co-hacker, inventor, what do I get?

What role do they play? The "ideas guy". My above post was based on the assumption they have a 50% split. But since they view themselves as the unique, creative force behind everything, they want 51%. Maybe more.

Now, this co-founder thing would make sense if we laid transparent ground rules up front: while all this comes into formation, am I getting paid while I'm crafting this "vision"?

Programmers are in a unique position when it comes to tech startups. They can bootstrap by themselves. The burden lies on the prospective co-founder to balance that contribution through something more than dictating and having ideas. That usually is them going out and raising a seed or self-funding.

comment 8y ago · link · parent

Here's why I advise extreme caution when partnering up if you're a programmer:

If you have a co-founder or co-hacker that goes postal, off on their own, acting shady, behaving badly, for whatever reason, you're lost at sea. If you don't have a safety net or savings in place to catch you, you're going to be living on the street. Thanks to someone else.

You can't control other people. Your co-whatever could become a saboteur. The reasons why and how don't matter, it's about the ramification on your life and how deeply it reverberates.

If that's the only thing you have going - your life is wrecked. You're humiliated by being kicked out of what you created. You have to start over, with an added penalty to all your family you can't support, your networking in tatters, and so on. Make no mistake - have a co-founder - you're one person away from having collateral damage done to your life.

And they'll probably make the company tank afterwards. The main reason a co-founder was there was to keep each other's ideas/egos/visions/whatever in-check. Without that personality mechanism in place, the business is rudderless.

So consider me a skeptic to this whole idea of sharing when I coded everything without safeguards in place for myself. That's the exact opposite reason I run my own thing. This is the one thing where I get control.

If you got cash stashed away somehow, or other cash flow sources, you're in a safer spot to take your chances with a co-founder and bounce back should stuff hit the fan.

comment 8y ago · link · parent

Python is the best.

I converted from PHP -> Python a long long time ago. But it was my first programming language.

PHP and Laravel is excellent. In particular, Laravel developers come across as very intelligent to me. In the end though, Python has multi-spectrum dominance.

Post about Python's tools: https://news.ycombinator.com/item?id=15957273

Python has Django (https://www.djangoproject.com/). It's 90% as good as Laravel. Which means it's very, very good.

But the thing with Python is it owns PHP when you're doing non-website stuff. If you can be convinced to give up Laravel (it may be hard), Python is easily the best choice.

Python has PEP standards PEP8 (code style) and PEP257 (code docs) long before PHP PSR's became a thing.

Scraping. Normalizing data. Python can handle big data sets. Machine Learning/AI.

Has documentation via Sphinx. Here's an example of one of my projects: https://cihai.git-pull.com. Here's an example of generated API docs: https://cihai.git-pull.com/en/latest/api.html.

The nature of being "Pythonic" spreads into open source code, and later into teams, so the libraries you pull in have a familiar style.

OOP is implemented better in python. That rubs off onto the quality of the libraries and how enjoyable they are to implement.

In my opinion, once you get a hang of Python, it's much easier to read than PHP.

comment 8y ago · link · parent

Every programmer wants remote unless otherwise stated.

Work Remotely. Salary. Benefits. Software Stack. Chill Boss. That is what matters.

Just about anything else the startups have to offer is categorized as "meta". Not helping things ship.

Devs don't care about "culture". What does that mean? Mandatory stand-ups, weekly 2-hour meetings, signalling "values", and these group photos where everybody forces a smile? (You haven't exited. What is there to celebrate about?)

They don't want the politics. Colleagues trying to justify why they're there, instead of being in a conscience frame of mind to better the company. Anything else not helping the product to market (shipping), gaining users, and retaining them.

The requirement of "on-site", unless there's a legit reason, has become a red flag that invokes an image of a boss in a suit, reclining in their Aeron chair, that's an insecure, yapping, "expert beginner" micro manager who won't heed technical advice; a bozo.

So what makes a "Chill Boss" for programmers? A correlation worth testing is greater software development experience than employees. As opposed to just having a history going straight into management soon as possible.

comment 8y ago · link · parent

Reading code is best. Downloading and building the code locally and running it (debugging snags along the way) is a helpful skill.

Like this:

Ever use tmux? What if the system your building tmux against doesn't have queue.h (found in Free/OpenBSD)?

https://github.com/tmux/tmux/blob/master/compat/queue.h

How does tmux know to include queue.h? First, the build system detects if the system has the macros declared, https://github.com/tmux/tmux/blob/58e9d12/configure.ac#L481 and defines a C Preprocessor Symbol HAVE_QUEUE_H. That then gets swept up in the build process: https://github.com/tmux/tmux/blob/a3967de/compat.h#L82.

Look at queue.h, nice, portable, solid macros for linked lists. It's actually derived from BSD's queue.h decades ago.

I like how FreeBSD's fork of queue.h has a table of the macro's features: https://github.com/freebsd/freebsd/blob/releng/11.1/sys/sys/...

Here's the linked list for Postgres, https://github.com/postgres/postgres/blob/master/src/include....

Also, check out Postgres lexer and parser utilities: https://github.com/postgres/postgres/blob/master/src/backend... (for Flex) and https://github.com/postgres/postgres/blob/master/src/backend... (for BISON)

If you insist on an all-around programming book, Code Complete by Steve McConnell.

comment 8y ago · link · parent

If you're at an incubator / coworking space, that is the best place. Second to that, meetups. Third, you can start interviewing en masse - but when it gets to that point, both sides decay in quality.

I've gotten most of my work through incubators, people using my open source projects, and finally through HN.

In hindsight, the reason why incubators/coworking spaces were so effective is people can form a connection beforehand and know your personality. They can see that you're in front of a terminal happy getting stuff done, "in the zone" with your headphones, and not yapping about politics or meta stuff.

If you do python, django, or stripe, check my profile.

comment 8y ago · link · parent

This is why I say it hurts businesses too.

If they're interviewing people and giving them trivia questions, they fundamentally don't understand the job.

We keep docs open all day. That's what browser tabs are for. Even seemingly basic stuff. Too much to keep fresh in memory.

I don't remember libtmux's API (a library I created). How do you expect me to remember python standard libraries I never used?

It's futile to explain to the interviewer - no matter how gently - that it's not the way it's done. That's being a prima donna. That's upstaging them, and going to be taken as a slight.

Part of the reason I'm passive in interviews is they already googled me (even if they don't mention it). They know I can program. If they're throwing curve balls at me, I ask myself if this is someone I want as a colleague. Is this someone who would take my technical advice.

I leave the interview with a sense of relief I don't have to live through the hell of a nightmare boss or toxic environment. Like a MoBA game, this is the chance to dodge early.

Screening can works both ways.

comment 8y ago · link · parent

I have many times where founders call me right after submitting my application.

There are also times where they are ecstatic at first, but something happens. I don't know - maybe someone's being a bad reference and I have to check on them, or I come off as ragged to them, who knows. Maybe I'm just so honest and candid I talk them out of hiring me.

Part of it is me. In job interviews, I make myself vulnerable, rather than assertive. They already Googled me (whether they admit it or not) and know what I can do. This is someone I'd work for, not an equal. Can I trust them to have integrity and be fair? Because that's what employment is, they have overwhelming power over your life.

Or maybe they move their line of thinking forward, "where are we going to put him?"

I've created open source applications from end-to-end. I have my own way of doing things. I'm enough of a force where people use my software on their machines, import my libraries, and use my documentation. That's a lot to process. Compare that to a fresh candidate on a clean slate that passed their technical screenings. On top of that, there's a couple of hundred to pick from.

Hiring me poses friction and risk. The applicant that passed all the tests conformed and regimented themselves to follow instruction? That's a worker, not a mover/shaker.

See what I mean? It's great to be a "somebody" in a technical field, but sometimes even founders realize their "quest for talent" isn't really so.

But based on this post, I think your issue is you're playing by their rules, doing their take homes and tests, to make it into the pool of "safe picks". Unrealized to many is that hundreds throw themselves at these tests, and they exist only to give the one flipping through resumes less eye strain.

It's not a dignifying experience.

These technical screenings are a sham. They protect entrenched streetwise careerists and lock out honest, reliable people who get stuff done. It promotes imposter syndrome, and wastes thousands of hours of time. This is one of the biggest problems in tech.

To repeat: the reason you don't hear more of this is people don't like to announce they're a failing at "getting a job". It's universal in most cultures being unemployed is being a failure. Understandably, people aren't going to publicly announce their struggle.

They think it's them. Sometimes it is. But if you've interviewed over years, or many many times, you've ruled out the quirks. You're now going to have to come to grips that you're not crazy, that there are systemic realities outside your control pushing you out. Probably ones which don't jive with the ideals of (fairness? merit? esteem?) of being a software developer.

What do you fill your time with, while you're job searching? I don't think you said.

comment 8y ago · link · parent

I think that's an idealization of what it should be.

I think that's what would be best for business.

So, back at a company called Buzzr, we had an opportunity to hire a very talented programmer known in the Drupal community. Many many accomplishments, it's safe to say if we took him on, it'd radically change our day to day operations (we needed to do something, in my opinion). He really did espouse the best of the concepts of Drupal, which was perfect, since we were a Drupal SAAS platform.

We didn't take him on. There wasn't much chat - but I was able to scoop up hearsay of why: He'd shake things up too much; too opinionated.

Here's the thing though: who would he be butting heads against? Nobody really had strong technical opinions. I was really junior at the time, and would be honored to work with him.

If you're somebody that has accomplishments and a track record, you're going to have opinions and a style. And for some reason, even startups where there is open room for delegation, decision makers lean toward protecting their turf. Even in situations where they couldn't do better themselves. Even when they're desperate for help.

We're making the mistake of viewing organizations being game theorists that make the most optimal decision - that's not always the case. Organizations don't hire, divisions and teams within them do. In practice, it's more nuanced and political.

It's safe to say, the decision maker's self-preservation overshadows the business making the best decisions.

Sometimes irking the decision maker's pride - disdaining something superior to them - is enough to end the process. It's less cognitive dissonance to just move to the other 999 applications in the pile, than worry how we're going to manage a generative, creative force. The narrative shifts to finding the most "appropriate" candidate based on the hiring manager's sense of safety.

That's my anecdote.

comment 8y ago · link · parent

I disagree with the other comments. If you interviewed 30 times and are an expert in the field, you probably made up for the variants at this point.

The culture today systematically lacks respect for seniority.

You don't give non-standardized technical screenings to candidates with a demonstrable track record. What are you trying to do by screening people? Are you saying that the applicant is potentially fraudulent?

Why isn't their technical screening standardized? What is it testing for? Is there confirmation by an independent body the screening represents the responsibilities of the role?

Some more factors:

- If it's a startup and you have 10 years of experience, you'd have more experience than most founders. Outshining the master is super-unemployable, unless they're willing to split equity and let you in as a co-founder. Then they're serious. Otherwise, you're just another programmer to them.

- The person interviewing you doesn't want to hire the person who replaces them. Then they'd be stuck job hunting like you. Unless they're retiring in the near future, being too good is probably going to get you a sham technical screening, or some excuse that flunks you early on.

- There is a reporting bias. Due to survivor guilt, you don't see people chiming in every time they get their time wasted.

comment 8y ago · link · parent

For bulletproofing, I do tests + mock network calls.

I use pytest with parametrize: https://docs.pytest.org/en/latest/parametrize.html

Then responses for mocking network stuff from requests: https://github.com/getsentry/responses

Using fixtures and writing your own factory objects to simulate scenarios: https://docs.pytest.org/en/latest/fixture.html. Fixtures in pytest are like setup/teardown.

I keep the code live in production, and have sentry errors email me if someone hits a snag.

Decouple generic code into separate git repositories. Split up billing / generic django / ux stuff so you don't need to repeat it with every website.

I maintain a changelog https://devel.tech/site/updates. Helps to stay motivated while you build out your own IP.

At work, when a project flops, the code tends to go to waste. When you write your own code, unencumbered by any outside agreements/conflicts, it stays with you to reuse, improve, license to others, turn into a SAAS, use in a separate website, etc.

comment 8y ago · link · parent

> A large web application that's outgrown its framework to become an application which includes a web interface is one of the better candidates for something like Flask.

Even in that case, I'm not experiencing any temptation to go to Flask. Two django websites right now with pretty big codebases. One of them has huge backend non-django codebase (which I keep in a separate git repo). Since there's still a need for templates, authentication, rdbms, permission systems, and so on, I still use django and create apps to act as a front-end for the libraries.

> Since it don't try to be responsible for everything from ORM to HTTP, it actually is capable of serving as a thin web layer for existing non-web functionality. At least in theory.

Yep, that's what my intuition was, formerly. Then I realized I needed an ORM since the website needed auth (whether or not it was a legacy db, "unmanaged" in django parlance). Then those users only should have rights to view/update/create certain things - so that means permissions.

> Unfortunately, Flask's extension ecosystem seems to focus more on reinventing Django than supporting its unique strengths as a microframework.

What do you mean by this?

Inevitably most web development tasks will have the developer reinventing Django.

The issue is, at least in my experience, these libraries that just need a quick and dirty front-end, have never stayed that way, heh. Let's just use that slice as an example. Still, in the event that included web interface became non-trivial, the benefit of using Flask quickly turns to reinventing stuff that'd be done easily with Django.

My bigger issue is, the microframework dream hasn't worked for me in PHP or Python. Except once: When I was doing Facebook Page campaigns at Social Amp. Those campaigns were ephemeral, and since they were just designed to be thrown out after a month, a microframework worked quite well.

comment 8y ago · link · parent

I recommend (by most expensive, to free):

Marshall Kirk McKusick's FreeBSD Intensive Code Walkthrough: https://www.mckusick.com/courses/advdescrip.html

Also, The Design and Implementation of the FreeBSD Operating System (2nd Edition): https://www.amazon.com/Design-Implementation-FreeBSD-Operati...

Thirdly: grab a copy of FreeBSD (or OpenBSD) and (a) set it up in VirtualBox and SSH it into locally (b) use an old ThinkPad. Then grab the source code of the base system. Build and install it. And start reading code of things like usr.bin/grep/grep.c

comment 8y ago · link · parent

If it's a small application or prototype that's a front-end over a Python script you already made, Flask could provide a quick web interface for it.

I view Flask as interesting from an architectural standpoint only. It helped me understand Python better. I liked its test suites, use of string imports, and code quality.

When I wanted to get work done, Django did everything. It had a great ORM system, form handling, views, and a template engine.

I can't think of any benefits Jinja2 (Flask's template library) has over Django templates. Maybe Jinja2 performs a bit faster.

SQLAlchemy, while it's awesome (and I do use it a la carte), isn't much better than Django's ORM in the big scheme of things. In fact, the use of the QuerySet object across Django and its third party package ecosystem makes playing with your data a lot easier.

I never had the dream of "microservices" pan out. Most applications I make end up being monolithic more or less, heh. Any non-trivial application I've dealt with outgrown Flask quickly. In fact, they outgrow Django. In a large application, I maintain a lot of code that does't touch the web framework at all.

comment 8y ago · link · parent

I wrote a detailed article on Flask vs Django last year: https://devel.tech/features/django-vs-flask/

In the end, I recommend Django for a web framework over Flask. More productivity, better extensions, less reinventing the wheel.

Also, I wrote another Django article recently on its usage of import strings: https://devel.tech/tips/n/djms3tTe/how-django-uses-deferred-...

comment 8y ago · link · parent

Easy snags when learning Stripe's API:

1. Internalizing core objects, like the Customer, Card, Tokens, and Source. And Plans / Subscriptions. Card/Source can feel ambiguous, since the API lookups are similar.

2. Order for creating / pulling up some objects. Customer's can attach a source upon creation, but can also attach it later. But you can't just look up all cards - you retrieve a card by looking up the customer first.

This helps later on if your user wants to update their billing info. Think about it: You pull up the customer first. Then a customer has cards they can delete, update, or add.

Plans must be created before subscriptions. That's another huge favor. Because on your front end, you can have the user switch between plans and have a consistent selection site-wide. Rather than just declaring an arbitrary price.

3. Understanding the difference between stripe.createSource (a reusable billing object) and stripe.createToken (a temporary billing object) [1]

4. Getting effective coverage in billing systems. Requires a ton of mocks. In order to simulate the responses to create the mocks, you have to play with the test API to get the desired outputs. The docs don't give you that.

In fact, stripe-mock [2] doesn't give you all the possible scenarios. So there's going to be a lot of time spent "bullet proofing" a subscription system. Especially if it's self-service.

I'd estimate it took about 1.5 months to get it fully working when I did it at a startup. The second time around, it's taking more time since I want to be able reusable enough to use on other websites / clients. Maybe 2-2.5 months.

[1] https://stripe.com/docs/sources/cards#create-source [2] https://github.com/stripe/stripe-mock

comment 8y ago · link · parent

ctext is awesome. Here's a link to their Yi Jing (Book of Changes): http://ctext.org/book-of-changes

I volunteer as a sysadmin for wengu (http://wengu.tartarie.com/wg/wengu.php). We cover some of the Chinese Classics.

In the coming years, I intend to redo wengu in sphinx-doc + reStructuredText and make them available in a updated website and generated PDF's. There may be some copyright issues with Wilhelm's Yi Jing translation, though. I think there's still a few years left.

I also am creating a spiritual successor to Christoph Burgmer's cjklib (https://github.com/cburgmer/cjklib). It's called cihai, you can find it at https://cihai.git-pull.com.

comment 8y ago · link · parent

Allegro, SDL2, SFML, et al. do more things (audio, joystick support, keyboard/mouse events) across platforms. Skia does one thing really well, 2D graphics.

There is a ticket open for building an abstraction layer @ https://github.com/aseprite/aseprite/issues/139

In terms of Aseprite:

> > But what made it the choice over Allegro 5, SFML, and SDL2?

> through all these years I reached to the conclusion that you need full control of mouse and keyboard messages (and all window messages in particular, e.g. to give proper support to pen/stylus). [1]

[1] https://github.com/aseprite/aseprite/issues/139#issuecomment...

comment 8y ago · link · parent

Aseprite switched to Skia a year or so ago (https://github.com/aseprite/aseprite).

Regret it. Google doesn't care to maintain CMake support for it, so there goes pulling it in via source and building as a library dependency. https://github.com/aseprite/aseprite/issues/1598#issuecommen...

You may ask, "why don't you just write your own CMake module like everyone else?" I've tried. I think the build system changed a bit since, but back when I last tried, it required grabbing depot tools, checking out a source tree and a ton of other dependencies.

I am the original person that got Aseprite building on FreeBSD - but now I can't build it on any platform at all. Skia has too many points of failure in the build process. (Here's another issue where I spend hours trying to figure out what's going on https://github.com/aseprite/aseprite/issues/1081)

Every other graphics library (SDL2, Allegro, SFML) can work with CMake.

Another pain point: Skia isn't on any package managers to my knowledge. Here's the debian RFP https://bugs.debian.org/818180.

comment 8y ago · link · parent

IE 5.5 with no box models would be a contender [1]

At Social Amp (2012), I was making cross domain single-page applications for sites like 1-800-Flowers, where we had to support back to IE6, but, since a tag was missing from the main website, we had to do some hacks to "shore up" IE6 so the padding would be there.

It's feasible to have some pretty sweet JS (backbone.js, easyxdm) on IE6. The limitation came from the engine's performance, stylesheet and js caps, and really strict rules on, dangling commas (memory is a bit fuzzy in which instances, but it'd crash our whole script). In some cases, there'd be no errors, and it'd just freeze it.

[1] https://en.wikipedia.org/wiki/Internet_Explorer_box_model_bu...

comment 8y ago · link · parent

Here's a cool gem: https://github.com/atom/watcher

There are nice possibilities for this project, it could be abstracted out to work with FreeBSD and stuff. Grunt/gulp/etc. watch features may be able to utilize it in library form.

For a similar project, check out entr(1): http://entrproject.org/

I'm a full time VIM user, but I'm happy and glad anytime I see VSCode/Atom/etc win. I see it as a great editor for the sake of having one to recommend. Cross-platform, free, active plugin ecosystems.

comment 8y ago · link · parent

SEEKING WORK

Location: USA (Central)

Remote: Yes

Willing to relocate: No

I'm a bootstrapping solo-founder, open source programmer, and author.

SAAS eCommerce / subscription services, Frontend, Backend, ML/AI (text/language)

I work with Django, Python, Linux, Javascript (ES5+6), Backbone, webpack, sass, spaCy, DRF, reStructuredText, AWS, Postgres, SQLAlchemy, handlebars/mustache, jinja2, pytest, Some C++.

Email: tony at git-pull dot com

CV: https://stackoverflow.com/story/tony

Portfolio: https://www.git-pull.com

Github: https://github.com/tony

Publications: https://leanpub.com/the-tao-of-tmux

Articles: https://devel.tech/features/django-vs-flask/, https://devel.tech/tips/n/djms3tTe/how-django-uses-deferred-....

Sample sites: https://devel.tech, https://www.hskflashcards.com

Sample projects: https://cihai.git-pull.com, https://tmuxp.git-pull.com, https://unihan-etl.git-pull.com

More open source: https://openhub.net/accounts/git-pull, https://devel.tech/site/open-source

comment 8y ago · link · parent

SEEKING WORK

Location: USA (Central)

Remote: Yes

Willing to relocate: No

I'm a bootstrapping solo-founder, open source programmer, and author.

SAAS eCommerce / subscription services, Frontend, Backend, ML/AI (text/language)

I work with Django, Python, Linux, Javascript (ES5+6), Backbone, webpack, sass, spaCy, DRF, reStructuredText, AWS, Postgres, SQLAlchemy, handlebars/mustache, jinja2, pytest, Some C++.

Email: tony at git-pull dot com

CV: https://stackoverflow.com/story/tony

Portfolio: https://www.git-pull.com

Github: https://github.com/tony

Publications: https://leanpub.com/the-tao-of-tmux

Articles: https://devel.tech/features/django-vs-flask/, https://devel.tech/tips/n/djms3tTe/how-django-uses-deferred-...

Sample sites: https://devel.tech, https://www.hskflashcards.com

Sample projects: https://cihai.git-pull.com, https://tmuxp.git-pull.com, https://unihan-etl.git-pull.com

More open source: https://openhub.net/accounts/git-pull, https://devel.tech/site/open-source

12345
14