zmoazeni's comments

zmoazeni | 7 years ago | on: Ask HN: How are you getting through (and back from) burning out?

I've been there before. I recently came across Jamis Buck's talking about his experience https://www.youtube.com/watch?v=71suekjBV9Y and I strongly recommend it. If only to hear someone eloquently talk about going through the process.

Previously, I saw his talk about generating mazes and it has always stuck with me. (Unfortunately that one wasn't recorded). Speaking as a developer, I have been writing code and solving problems professionally for so long that I have forgotten what it's like to just write code for fun. For me, and not for anyone else. Without any expectations or stress. And listening to him talking about rediscovering fun by exploring different ways to create mazes really clicked with me.

I've only recently gotten back into that, and it has been embarrassingly awkward to knock off the rust and put myself in the mindset of "Let's just do this because it could be cool".

I even bought his book on generating mazes. Not because I'm particularly into them, but to help exercise those sore muscles and I'm thinking I can perhaps feed on his passion. A coworker told me he also put one out about building ray tracers. To branch out beyond that, I've also begun putting together a list of fun hacks that interest me personally.

Now I say all of this, but I do think while time away from your day-to-day is very important (take some vacation time! spend time exploring other hobbies!), even after a significant time away, when you come back to your day job you may still be unmotivated/numb/demoralized. I'm hoping rediscovering the fun in what I do helps put things in perspective more than just listening to others preach. Helps rekindle the feelings and reasons why I pursued my career in the first place beyond just making a living.

Good luck. I wish you the best.

Edit: OH! I completely forgot. Make sure to prioritize the easy-to-ignore-things. Spend time with friends/family. Exercise. Make sure you're getting enough sleep.

Those sound so simple, but I strongly believe it's incredibly tough when you ignore those basics.

zmoazeni | 8 years ago | on: GitHub's online schema migration for MySQL

There is a big difference. You're only considering the "slowness" from the application perspective of querying a table without the index.

You need to also realize that database server itself takes a load hit when it kicks off these operations on large tables. I'm not sure on PostgreSQL, but I know sometimes you can not immediately cancel these operations in the middle on MySQL (it also takes time to revert).

With gh-ost you have full control over how fast this process goes and can even pause/resume it if you're experiencing issues.

But let's say it IS instantly cancelled. You're also ignoring the fact that you will take the same hit on any replicas if this statement is successful.

Some production environments don't take kindly to having all replicas lagging as the replication thread is blocking on the DDL change. My team has the luxury of being able to have our entire production environment served by a single master server (though we avoid it as much as possible), but it won't be long before we outgrow that and require at least one up to date replica. Many teams are already in that situation and for that, gh-ost is a godsend.

zmoazeni | 8 years ago | on: GitHub's online schema migration for MySQL

> which causes MySQL to copy the whole table

This is wrong on a couple levels. First it doesn't copy the whole table: https://dev.mysql.com/doc/refman/5.6/en/innodb-create-index-...

However, it can take a while if MySQL is evaluating the consistency. But you can disable that with `SET FOREIGN_KEY_CHECKS = 0` which turns it into a metadata change (nearly instantaneous).

You still will need to check for violations, but you can do that in a more friendly-to-load manner, and of course will need to deal with any violations manually.

But that strategy is a good middle ground to all-or-nothing FKs.

Edit: Whoops, looks like I was wrong on the table-copy part. Per "Otherwise, only the COPY algorithm is supported." So it does copy the data when `FOREIGN_KEY_CHECKS=1` (the default)

zmoazeni | 8 years ago | on: GitHub's online schema migration for MySQL

We use gh-ost at Harvest[1] and it's a dream in comparison to manually migrating on a replica and switching master/slave roles [2].

Also the linked post[3] in the readme hit us very close to home. We originally tried some of our migrations with pt-online-schema-change, which was great in theory but caused a lot of locking contention during the actual process.

I see many people hammering on the lack of foreign key support which is interesting to me. At some point, a database system grows to where relying on MySQL's Online DDL[4] "works" but not really with production load. I feel like a team knows when they need to bring in a tool like this.

The dev in me understands how wonderful FKs are for consistency. But the db-guy in me that has had to deal with locking issues recognizes FKs as a tradeoff, not dogma.

If you shy away from migrating your large or busy tables, or are scheduling frequent maintenance down times in order to migrate these tables, that's when gh-ost (and others) are appropriate to evaluate.

So for us it's not an immediate red flag that gh-ost doesn't support FKs. We just have to work around that limitation[5] because the alternatives are much worse.

For the record, we don't gh-ost all of our migrations. Only the ones that are deemed sufficiently large enough are gh-osted and those heuristics will change from team-to-team.

But as a guy who has had to deal with our database issues AND as a developer who doesn't want to be chained by a database design decision from a decade ago, I love the flexibility gh-ost gives us as we continue to grow.

[1] https://www.getharvest.com/

[2] https://dev.mysql.com/doc/refman/5.6/en/replication-features...

[3] https://dev.mysql.com/doc/refman/5.6/en/replication-features...

[4] https://dev.mysql.com/doc/refman/5.6/en/innodb-create-index-...

[5] https://github.com/github/gh-ost/issues/507#issuecomment-338...

zmoazeni | 8 years ago | on: Better Database Migrations in Postgres

No. https://githubengineering.com/gh-ost-github-s-online-migrati... has an excellent section on why triggers fail (at least in the MySQL world. I imagine the locking story is similar in postgresql).

I don't work for GitHub but we had the same problems using pt-online-schema-change independently of their issues (lots of locking contention affecting the app negatively). We're finally moving to gh-ost for our large/risky migrations and so far it's amazing.

zmoazeni | 12 years ago | on: Why you shouldn't use the Lesser GPL for your next library

It took some time for me wrap my brain the restrictions around the EPL while I was picking up clojure, but I don't understand how EPL would be frustrating to other developers or businesses. Could you elaborate?

As I understand it, as long as you use a library according to its stated API, you can do whatever you want with it and license the entire product under any license you choose. [1]

[1] - https://www.eclipse.org/legal/eplfaq.php#EXAMPLE

zmoazeni | 12 years ago | on: Thinking in Types

Just throwing my voice into the chorus, I know nothing about category theory either, and I don't think that hinders learning Haskell.

I do think there is a subset of Haskellers who use category theory to prove certain ideas and they are able to easily express that in code. However I haven't found it necessary to understand the theory behind why something is sound in order to practically use their work in my projects. That says more about Haskell's expressiveness than the target audience to me.

Setting aside years of imperative (and also OO) programming and learning a different approach to solving problems has been the biggest challenge for me, by far. That's why I agree wholeheartedly with https://news.ycombinator.com/item?id=7687200

zmoazeni | 12 years ago | on: Thinking in Types

I'm not sure which issues you're running into, but for what it's worth, I've had a lot better success using the newer cabal sandboxes[1] than just running `cabal install foo` all the time. (If you're from the Ruby world, it acts a lot more like bundler with `--standalone`).

Previously, I had more issues with conflicting version constraints which I think is more of an issue with library authors and not necessarily cabal itself.

[1] - http://coldwa.st/e/blog/2013-08-20-Cabal-sandbox.html

zmoazeni | 12 years ago | on: Thinking in Types

I'm all for more posts like this and I hope we see more. I think it helps tear down the misconception that Haskell is only for people who do a ton of research beforehand.

zmoazeni | 13 years ago | on: Csscss: a CSS redundancy analyzer that analyzes redundancy

This has come up a couple times. I wouldn't mind this topic moving it to github so the conversation doesn't get lost. And others can contribute to it long after this gets buried on HN.

My initial opinion is that even though your SCSS code is consolidated, the resulting CSS code is still duplicated all over the place. To me, that is a code smell. Particularly when I need to debug from the web developer tools.

zmoazeni | 13 years ago | on: Csscss: a CSS redundancy analyzer that analyzes redundancy

If you're a ruby developer I strongly encourage you to check out the source code and parsing in general. This is heavily using parslet [1] to build a css parser [2]. I'm sure there are edge cases I have missed, but still the LOC for this codebase is relatively small and fairly readable.

Stay away from the RedundancyAnalyzer though. There be dragons.

[1] http://kschiess.github.io/parslet/

[2] https://github.com/zmoazeni/csscss/tree/ae2f22f4416bca35f903...

zmoazeni | 13 years ago | on: If you run a contest as a startup, don't be dishonest. JPEGmini scammed me.

Just shelling out to shut up any random guy with a dropbox account or even be bullied into responding publicly to said random guy.

That's pride talking. Pick and choose your battles. If you're going to pick this one, make it overwhelmingly compelling. I've never heard of this company, but my first impression is negative. Turn that around.

I wouldn't advocate ignoring it. I'd rather you make me love your company or hate it. Ignoring stuff like this is cop out.

Hell, doesn't Nikon have a camera in the $300 range? Even a response like: "We already picked the winner, and we don't have a budget for two cameras, but we were able to spring for Nikon Dxxxx" would be miles better.

Right now, the fallout, as in negative publicity, is pretty limited.

You're right. They were thrown a curve ball, and they can turn it into an opportunity to leave a positive impression on potential customers who have never heard of their product before.

zmoazeni | 13 years ago | on: If you run a contest as a startup, don't be dishonest. JPEGmini scammed me.

OP has explained his side, which is compelling. JPEGmini tweeted "You have only seen one side of the story" https://twitter.com/jpegmini/status/222433391025459200

At what point does he-said/she-said matter for a company? How much is negative publicity worth to an early startup?

1) OP is completely legit, which paints JPEGmini in a bad light. Give him a camera and let it go quietly, and get some kudos for giving out two cameras.

2) OP is not legit, which with his compelling argument will still have people thinking something is fishy. Give him a camera and let it go quietly, and get some kudos for giving out two cameras.

For $850, I think winning the kudos would be far more important than a company trying to prove somebody wrong. Sounds like pride is getting in the way here. Chalk up the the drawing as a lesson-learned and figure out a less ambiguous way to deal with the next one.

zmoazeni | 13 years ago | on: Twitter Completely Down

I had this problem years ago against the Twitter API. It took a shot of rum and a cigarette before I figured it out. And I'm not a smoker.
page 1